sigpro 1.1.20 → 2.0.3

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.
@@ -0,0 +1,78 @@
1
+ function C_({update:z,notify:J,unwatched:Q}){return{link:Z,unlink:$,propagate:X,checkDirty:Y,shallowPropagate:U};function Z(H,G,W){let q=G.depsTail;if(q!==void 0&&q.dep===H)return;let B=q!==void 0?q.nextDep:G.deps;if(B!==void 0&&B.dep===H){B.version=W,G.depsTail=B;return}let E=H.subsTail;if(E!==void 0&&E.version===W&&E.sub===G)return;let K=G.depsTail=H.subsTail={version:W,dep:H,sub:G,prevDep:q,nextDep:B,prevSub:E,nextSub:void 0};if(B!==void 0)B.prevDep=K;if(q!==void 0)q.nextDep=K;else G.deps=K;if(E!==void 0)E.nextSub=K;else H.subs=K}function $(H,G=H.sub){let{dep:W,prevDep:q,nextDep:B,nextSub:E,prevSub:K}=H;if(B!==void 0)B.prevDep=q;else G.depsTail=q;if(q!==void 0)q.nextDep=B;else G.deps=B;if(E!==void 0)E.prevSub=K;else W.subsTail=K;if(K!==void 0)K.nextSub=E;else if((W.subs=E)===void 0)Q(W);return B}function X(H,G){let W=H.nextSub,q;z:do{let B=H.sub,E=B.flags;if(!(E&60)){if(B.flags=E|32,G)B.flags|=8}else if(!(E&12))E=0;else if(!(E&4))B.flags=E&-9|32;else if(!(E&48)&&_(H,B))B.flags=E|8|32,E&=1;else E=0;if(E&2)J(B);if(E&1){let K=B.subs;if(K!==void 0){let F=(H=K).nextSub;if(F!==void 0)q={value:W,prev:q},W=F;continue}}if((H=W)!==void 0){W=H.nextSub;continue}while(q!==void 0)if(H=q.value,q=q.prev,H!==void 0){W=H.nextSub;continue z}break}while(!0)}function Y(H,G){let W,q=0,B=!1;z:do{let E=H.dep,K=E.flags;if(G.flags&16)B=!0;else if((K&17)===17){let F=E.subs;if(z(E)){if(F.nextSub!==void 0)U(F);B=!0}}else if((K&33)===33){W={value:H,prev:W},H=E.deps,G=E,++q;continue}if(!B){let F=H.nextDep;if(F!==void 0){H=F;continue}}while(q--){if(H=W.value,W=W.prev,B){let L=G.subs;if(z(G)){if(L.nextSub!==void 0)U(L);G=H.sub;continue}B=!1}else G.flags&=-33;G=H.sub;let F=H.nextDep;if(F!==void 0){H=F;continue z}}return B&&!!G.flags}while(!0)}function U(H){do{let G=H.sub,W=G.flags;if((W&48)===32){if(G.flags=W|16,(W&6)===2)J(G)}}while((H=H.nextSub)!==void 0)}function _(H,G){let W=G.depsTail;while(W!==void 0){if(W===H)return!0;W=W.prevDep}return!1}}var GQ=0,W2=0,v_=0,iz=0,G2=0,O0,l4=[],j1=[];var{link:WQ,unlink:q2,propagate:N_,checkDirty:w_,shallowPropagate:y_}=C_({update(z){if("getter"in z)return x_(z);if("currentValue"in z)return v7(z);return z.flags=1,!0},notify(z){let J=G2,Q=J;do if(l4[J++]=z,z.flags&=-3,z=z.subs?.sub,z===void 0||!(z.flags&2))break;while(!0);G2=J;while(Q<--J){let Z=l4[Q];l4[Q++]=l4[J],l4[J]=Z}},unwatched(z){if("getter"in z){if(z.depsTail!==void 0)z.flags=17,y7(z)}else if("currentValue"in z);else if("fn"in z)w7.call(z);else BQ.call(z)}});function qQ(z){return h_.bind({currentValue:z,pendingValue:z,subs:void 0,subsTail:void 0,flags:1})}function k4(z){let J={fn:z,cleanup:void 0,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:6},Q=O0;if(O0=J,Q!==void 0)WQ(J,Q,0),Q.flags|=64;j1.push(new Map);try{++W2;let Z=J.fn();J.cleanup=typeof Z==="function"?Z:void 0}finally{--W2,O0=Q,j1.pop(),J.flags&=-5}return w7.bind(J)}function C7(z){let J={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:1},Q=O0;if(O0=J,Q!==void 0)WQ(J,Q,0),Q.flags|=64;j1.push(new Map);try{z()}finally{j1.pop(),O0=Q}return BQ.bind(J)}function x_(z){if(z.flags&64){let Q=z.depsTail;while(Q!==void 0){let{prevDep:Z,dep:$}=Q;if(!("getter"in $)&&!("currentValue"in $))q2(Q,z);Q=Z}}z.depsTail=void 0,z.flags=5;let J=O0;O0=z;try{++GQ;let Q=z.value;return Q!==(z.value=z.getter(Q))}finally{O0=J,z.flags&=-5,x7(z)}}function v7(z){return z.flags=1,z.currentValue!==(z.currentValue=z.pendingValue)}function b_(z){let J=z.flags;if(J&16||J&32&&w_(z.deps,z)){if(J&64){let Z=z.depsTail;while(Z!==void 0){let{prevDep:$,dep:X}=Z;if(!("getter"in X)&&!("currentValue"in X))q2(Z,z);Z=$}}if(z.cleanup){if(N7(z),!z.flags)return}z.depsTail=void 0,z.flags=6;let Q=O0;O0=z,j1.push(new Map);try{++GQ,++W2;let Z=z.fn();z.cleanup=typeof Z==="function"?Z:void 0}finally{--W2,O0=Q,j1.pop(),z.flags&=-5,x7(z)}}else if(z.deps!==void 0)z.flags=2|J&64}function g_(){try{while(iz<G2){let z=l4[iz];l4[iz++]=void 0,b_(z)}}finally{while(iz<G2){let z=l4[iz];l4[iz++]=void 0,z.flags|=10}iz=0,G2=0}}function h_(...z){if(z.length){if(this.pendingValue!==(this.pendingValue=z[0])){this.flags=17;let J=this.subs;if(J!==void 0){if(N_(J,!!W2),!v_)g_()}}}else{if(this.flags&16){if(v7(this)){let Q=this.subs;if(Q!==void 0)y_(Q)}}let J=O0;if(J!==void 0)WQ(this,J,GQ);return this.currentValue}}function N7(z){let J=z.cleanup;z.cleanup=void 0;let Q=O0;O0=void 0;try{J()}finally{O0=Q}}function w7(){if(BQ.call(this),this.cleanup)N7(this)}function BQ(){this.flags=0,y7(this);let z=this.subs;if(z!==void 0)q2(z)}function y7(z){let J=z.depsTail;while(J!==void 0){let Q=J.prevDep;q2(J,z),J=Q}}function x7(z){let J=z.depsTail,Q=J!==void 0?J.nextDep:z.deps;while(Q!==void 0)Q=q2(Q,z)}function M6(z){let J=O0;O0=void 0;try{return z()}finally{O0=J}}var H2=typeof document<"u"?document:null,u_="http://www.w3.org/2000/svg",m_=new Set("svg path circle rect line polyline polygon g defs text textPath tspan use symbol image marker ellipse foreignObject clipPath mask linearGradient radialGradient pattern filter stop animate animateMotion animateTransform view desc metadata title switch feGaussianBlur feOffset feBlend feColorMatrix feComponentTransfer feComposite feConvolveMatrix feDiffuseLighting feDisplacementMap feDistantLight feFlood feFuncA feFuncB feFuncG feFuncR feImage feMerge feMergeNode feMorphology fePointLight feSpecularLighting feSpotLight feTile feTurbulence".split(" "));function F6(z,J,Q,Z){if(J==="class"||J==="className"){if(Z)if(Q==null||Q===!1)z.removeAttribute("class");else z.setAttribute("class",Q===!0?"":Q);else z.className=Q??"";return}if(Q==null||Q===!1){z.removeAttribute(J);return}if(J==="style"&&typeof Q==="string"){z.setAttribute("style",Q);return}if(Z){z.setAttribute(J,Q===!0?"":Q);return}if(J in z&&typeof z[J]!=="function")z[J]=Q;else z.setAttribute(J,Q===!0?"":Q)}function c_(z){let J=[z];while(J.length){let Q=J.pop();if(Q._stopScope)Q._stopScope(),Q._stopScope=null;if(Q._cln){for(let Z of Q._cln)Z();Q._cln=null}for(let Z=0;Z<Q.childNodes.length;Z++)J.push(Q.childNodes[Z])}}function L6(z,J={},...Q){if(typeof z==="function"){let U,_=C7(()=>{U=z(J,Q)}),H=(G)=>{if(G instanceof Node)G._stopScope=_;else if(Array.isArray(G))G.forEach(H)};return H(U),U}if(J instanceof Node||Array.isArray(J)||J!==null&&typeof J!=="object"||J===void 0)Q=[J,...Q],J={};let Z=m_.has(z),$=Z?H2.createElementNS(u_,z):H2.createElement(z),X,Y=!1;for(let U in J){let _=J[U];if(U==="ref"){if(typeof _==="function")_($);else if(_!=null&&typeof _==="object")_.current=$;continue}if(z==="select"&&U==="value"){X=_;continue}if(U==="html"){if(Y=!0,typeof _==="function")k4(()=>{$.innerHTML=_()??""});else $.innerHTML=_??"";continue}if(U.startsWith("on")&&typeof _==="function"){let H=U.slice(2).toLowerCase();$.addEventListener(H,_),($._cln||($._cln=[])).push(()=>$.removeEventListener(H,_))}else if(typeof _==="function")k4(()=>F6($,U,_(),Z));else F6($,U,_,Z)}if(!Y){let U=(_)=>{if(Array.isArray(_)){for(let H of _)U(H);return}if(_==null||_===!1||_===!0)return;if(typeof _==="function"){let H=H2.createComment("");$.appendChild(H),k4(()=>{let G=_(),W=Array.isArray(G)?G:[G],q=[];for(let B of W){if(B==null||B===!1||B===!0)continue;q.push(B instanceof Node?B:H2.createTextNode(String(B)))}for(let B of q)$.insertBefore(B,H);return()=>{for(let B of q)c_(B),B.remove()}});return}$.appendChild(_ instanceof Node?_:H2.createTextNode(String(_)))};U(Q)}if(X!==void 0)if(typeof X==="function")k4(()=>F6($,"value",X(),Z));else F6($,"value",X,Z);return $}var EQ=qQ(typeof window<"u"?window.location.hash.slice(1)||"/":"/"),p_=qQ({});if(typeof window<"u")window.addEventListener("hashchange",()=>{EQ(window.location.hash.slice(1)||"/")});var KQ=(z)=>()=>{let J=L6("div",{class:"router-hook"});return k4(()=>{let Z=EQ().split("/").filter(Boolean);return C7(()=>{let $=z.find((_)=>{let H=_.path.split("/").filter(Boolean);return H.length===Z.length&&H.every((G,W)=>G[0]===":"||G===Z[W])})||z.find((_)=>_.path==="*");if(!$){J.replaceChildren();return}let X={};$.path.split("/").filter(Boolean).forEach((_,H)=>{if(_[0]===":")X[_.slice(1)]=Z[H]}),p_(X);let Y=typeof $.component==="function"?L6($.component,X):$.component,U=Y==null?[]:Array.isArray(Y)?Y:[Y];J.replaceChildren(...U)})}),J};KQ.to=(z)=>{if(typeof window<"u")window.location.hash=z.replace(/^#?\/?/,"#/")};KQ.back=()=>{if(typeof window<"u")window.history.back()};KQ.path=()=>EQ();var $C=qQ("en");function N(z){if(!z?.length)return;return z[z.length-1]}function Z0(z,J,Q){if(z===J)return!0;if(!z||!J)return z==null&&J==null;let Z=z.length;if(Z!==J.length)return!1;if(Q){for(let $=0;$<Z;++$)if(z[$]!==J[$]&&!Q(z[$],J[$]))return!1;return!0}for(let $=0;$<Z;++$)if(z[$]!==J[$])return!1;return!0}function i_(z,J){if(!J)return[];let Q=J.length;if(z&&z!==J&&z.length===Q){for(let Z=0;Z<Q;++Z)if(z[Z]!==J[Z])return J.slice();return z}return J.slice()}function B2(z,J){if(!z)return;for(let Q of z)if(J(Q))return!0}function X0(z,J){let Q=z.indexOf(J);if(Q>=0)z.splice(Q,1)}function b2(z,J){let Q=0,Z=0;for(;Q<z.length;Q++)if(!J.includes(z[Q]))z[Z]=z[Q],Z++;while(Z<z.length)z.pop()}function b7(z,J,Q){for(let Z=0;Z<J.length;Z++)X0(z,J[Z]);for(let Z=J.length-1;Z>=0;Z--)z.splice(Q,0,J[Z])}var U0=(z)=>{if(z==null||z==="")return null;return z};function I(z){return z!=null&&z!==""}function n(z){return!I(z)}var d0=(z)=>{return z!=null&&typeof z.toString==="function"?z.toString():null},UJ=(z,J)=>{let Q=z?JSON.stringify(z):null,Z=J?JSON.stringify(J):null;return Q===Z},n1=(z,J,Q=!1)=>{if(typeof z==="object"&&z!==null&&typeof z.toNumber==="function")z=z.toNumber();if(typeof J==="object"&&J!==null&&typeof J.toNumber==="function")J=J.toNumber();if(z==null)return J==null?0:-1;if(J==null)return 1;if(!Q||typeof z!=="string"){if(z>J)return 1;if(z<J)return-1;return 0}return z.localeCompare(J)},P4=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(z){this.frameworkOverrides=z}getListeners(z,J,Q){let Z=J?this.allAsyncListeners:this.allSyncListeners,$=Z.get(z);if(!$&&Q)$=new Set,Z.set(z,$);return $}noRegisteredListenersExist(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0}addEventListener(z,J,Q=!1){this.getListeners(z,Q,!0).add(J)}removeEventListener(z,J,Q=!1){let Z=this.getListeners(z,Q,!1);if(!Z)return;if(Z.delete(J),Z.size===0)(Q?this.allAsyncListeners:this.allSyncListeners).delete(z)}addGlobalListener(z,J=!1){this.getGlobalListeners(J).add(z)}removeGlobalListener(z,J=!1){this.getGlobalListeners(J).delete(z)}dispatchEvent(z){this.dispatchToListeners(z,!0),this.dispatchToListeners(z,!1),this.firedEvents[z.type]=!0}dispatchEventOnce(z){if(!this.firedEvents[z.type])this.dispatchEvent(z)}dispatchToListeners(z,J){let Q=z.type;if(J&&"event"in z){let U=z.event;if(U instanceof Event)z.eventPath=U.composedPath()}let{frameworkOverrides:Z}=this,$=(U)=>{let _=Z?()=>Z.wrapIncoming(U):U;if(J)this.dispatchAsync(_);else _()},X=this.getListeners(Q,J,!1);if((X?.size??0)>0){let U=new Set(X);for(let _ of U){if(!X?.has(_))continue;$(()=>_(z))}}let Y=this.getGlobalListeners(J);if(Y.size>0){let U=new Set(Y);for(let _ of U)$(()=>_(Q,z))}}getGlobalListeners(z){return z?this.globalAsyncListeners:this.globalSyncListeners}dispatchAsync(z){if(this.asyncFunctionsQueue.push(z),!this.scheduled){let J=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)},Q=this.frameworkOverrides;if(Q)Q.wrapIncoming(J);else J();this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;let z=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[];for(let J of z)J()}},d_=/[&<>"']/g,n_={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function g2(z){return z?.toString().toString()??null}function L0(z){return g2(z)?.replace(d_,(J)=>n_[J])??null}function TZ(z){return typeof z==="string"&&z.length>1&&z.codePointAt(0)===61}function r_(z){if(!z||z==null)return null;let J=/([a-z])([A-Z])/g,Q=/([A-Z]+)([A-Z])([a-z])/g;return z.replace(J,"$1 $2").replace(Q,"$1 $2$3").replace(/\./g," ").split(" ").map(($)=>$.substring(0,1).toUpperCase()+($.length>1?$.substring(1,$.length):"")).join(" ")}function c0(z){return z.eRootDiv.getRootNode()}function d(z){return c0(z).activeElement}function Y0(z){let{gos:J,eRootDiv:Q}=z,Z=null,$=J.get("getDocument");if($&&I($))Z=$();else if(Q)Z=Q.ownerDocument;if(Z&&I(Z))return Z;return document}function Tz(z){let J=d(z);return J===null||J===Y0(z).body}function SZ(z){return Y0(z).defaultView||window}function Sz(z){let J=null,Q;try{J=Y0(z).fullscreenElement}catch{}finally{if(!J)J=c0(z);let Z=J.querySelector("body");if(Z)Q=Z;else if(J instanceof ShadowRoot)Q=J;else if(J instanceof Document)Q=J?.documentElement;else Q=J}return Q}function t_(z){return Sz(z)?.clientWidth??(window.innerWidth||-1)}function s_(z){return Sz(z)?.clientHeight??(window.innerHeight||-1)}function s0(z,J,Q){if(Q==null||typeof Q==="string"&&Q=="")IZ(z,J);else B4(z,J,Q)}function B4(z,J,Q){z.setAttribute(Y9(J),Q.toString())}function IZ(z,J){z.removeAttribute(Y9(J))}function Y9(z){return`aria-${z}`}function H0(z,J){if(J)z.setAttribute("role",J);else z.removeAttribute("role")}function l_(z){let J=z?.direction;if(J==="asc")return"ascending";else if(J==="desc")return"descending";else if(J==="mixed")return"other";return"none"}function U9(z){return Number.parseInt(z.getAttribute("aria-posinset"),10)}function a_(z){return z.getAttribute("aria-label")}function G0(z,J){s0(z,"label",J)}function ez(z,J){s0(z,"labelledby",J)}function r1(z,J){s0(z,"describedby",J)}function _9(z,J){s0(z,"live",J)}function o_(z,J){s0(z,"atomic",J)}function e_(z,J){s0(z,"relevant",J)}function fZ(z,J){s0(z,"invalid",J)}function _J(z,J){s0(z,"level",J)}function H9(z,J){s0(z,"disabled",J)}function HJ(z,J){s0(z,"hidden",J)}function S0(z,J){B4(z,"expanded",J)}function G9(z){IZ(z,"expanded")}function h2(z,J){B4(z,"setsize",J)}function u2(z,J){B4(z,"posinset",J)}function zH(z,J){B4(z,"multiselectable",J)}function JH(z,J){B4(z,"rowcount",J)}function h6(z,J){B4(z,"rowindex",J)}function QH(z,J){B4(z,"colcount",J)}function W9(z,J){B4(z,"colindex",J)}function ZH(z,J){B4(z,"colspan",J)}function $H(z,J){B4(z,"sort",J)}function XH(z){IZ(z,"sort")}function GJ(z,J){s0(z,"selected",J)}function WJ(z,J){B4(z,"checked",J===void 0?"mixed":J)}function YH(z,J){s0(z,"controls",J)}function kZ(z,J){YH(z,J.id),ez(J,z.id)}function g7(z,J){s0(z,"owns",J)}function q9(z,J){s0(z,"haspopup",J===!1?null:J)}function CZ(z,J){return J===void 0?z("ariaIndeterminate","indeterminate"):J===!0?z("ariaChecked","checked"):z("ariaUnchecked","unchecked")}function vZ(z,J,Q){let Z=z.parentElement,$=Z&&Z.firstChild;while($){if(J)$.classList.toggle(J,$===z);if(Q)$.classList.toggle(Q,$!==z);$=$.nextSibling}}var UH="[tabindex], input, select, button, textarea, [href]",B9="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function D2(z){if(!z)return!1;if(!z.matches("input, select, button, textarea"))return!1;if(!z.matches(B9))return!1;return B0(z)}function x(z,J,Q={}){let{skipAriaHidden:Z}=Q;if(z.classList.toggle("ag-hidden",!J),!Z)HJ(z,!J)}function _H(z,J,Q={}){let{skipAriaHidden:Z}=Q;if(z.classList.toggle("ag-invisible",!J),!Z)HJ(z,!J)}function T2(z,J){let Z=J?(X)=>X.setAttribute("disabled",""):(X)=>X.removeAttribute("disabled");Z(z);let $=z.querySelectorAll("input")??[];for(let X of $)Z(X)}function sz(z,J,Q){let Z=0;while(z){if(z.classList.contains(J))return!0;if(z=z.parentElement,typeof Q=="number"){if(++Z>Q)break}else if(z===Q)break}return!1}function t1(z){let{height:J,width:Q,borderTopWidth:Z,borderRightWidth:$,borderBottomWidth:X,borderLeftWidth:Y,paddingTop:U,paddingRight:_,paddingBottom:H,paddingLeft:G,marginTop:W,marginRight:q,marginBottom:B,marginLeft:E,boxSizing:K}=window.getComputedStyle(z),F=Number.parseFloat;return{height:F(J||"0"),width:F(Q||"0"),borderTopWidth:F(Z||"0"),borderRightWidth:F($||"0"),borderBottomWidth:F(X||"0"),borderLeftWidth:F(Y||"0"),paddingTop:F(U||"0"),paddingRight:F(_||"0"),paddingBottom:F(H||"0"),paddingLeft:F(G||"0"),marginTop:F(W||"0"),marginRight:F(q||"0"),marginBottom:F(B||"0"),marginLeft:F(E||"0"),boxSizing:K}}function m2(z){let J=t1(z);if(J.boxSizing==="border-box")return J.height-J.paddingTop-J.paddingBottom-J.borderTopWidth-J.borderBottomWidth;return J.height}function z1(z){let J=t1(z);if(J.boxSizing==="border-box")return J.width-J.paddingLeft-J.paddingRight-J.borderLeftWidth-J.borderRightWidth;return J.width}function E9(z){let{height:J,marginBottom:Q,marginTop:Z}=t1(z);return Math.floor(J+Q+Z)}function u6(z){let{width:J,marginLeft:Q,marginRight:Z}=t1(z);return Math.floor(J+Q+Z)}function K9(z){let J=z.getBoundingClientRect(),{borderTopWidth:Q,borderLeftWidth:Z,borderRightWidth:$,borderBottomWidth:X}=t1(z);return{top:J.top+(Q||0),left:J.left+(Z||0),right:J.right+($||0),bottom:J.bottom+(X||0)}}function m6(z,J){let Q=z.scrollLeft;if(J)Q=Math.abs(Q);return Q}function c6(z,J,Q){if(Q)J*=-1;z.scrollLeft=J}function J0(z){while(z?.firstChild)z.firstChild.remove()}function P0(z){if(z?.parentNode)z.remove()}function F9(z){return!!z.offsetParent}function B0(z){if(z.checkVisibility)return z.checkVisibility({checkVisibilityCSS:!0});return!(!F9(z)||window.getComputedStyle(z).visibility!=="visible")}function NZ(z){let J=document.createElement("div");return J.innerHTML=(z||"").trim(),J.firstChild}function L9(z,J,Q){if(Q?.nextSibling===J)return;if(!z.firstChild)z.appendChild(J);else if(Q)if(Q.nextSibling)z.insertBefore(J,Q.nextSibling);else z.appendChild(J);else if(z.firstChild&&z.firstChild!==J)z.prepend(J)}function M9(z,J){for(let Q=0;Q<J.length;Q++){let Z=J[Q],$=z.children[Q];if($!==Z)z.insertBefore(Z,$)}}function HH(z){return z.replace(/[A-Z]/g,(J)=>`-${J.toLocaleLowerCase()}`)}function c2(z,J){if(!J)return;for(let Q of Object.keys(J)){let Z=J[Q];if(!Q?.length||Z==null)continue;let $=HH(Q),X=Z.toString(),Y=X.replace(/\s*!important/g,""),U=Y.length!=X.length?"important":void 0;z.style.setProperty($,Y,U)}}function g1(z){return()=>{let J=z();if(!J)return!0;return D9(J)||GH(J)}}function D9(z){return z.clientWidth<z.scrollWidth}function GH(z){return z.clientHeight<z.scrollHeight}function p6(z,J){if(J==="flex")z.style.removeProperty("width"),z.style.removeProperty("minWidth"),z.style.removeProperty("maxWidth"),z.style.flex="1 1 auto";else h4(z,J)}function h4(z,J){J=wZ(J),z.style.width=J,z.style.maxWidth=J,z.style.minWidth=J}function R2(z,J){J=wZ(J),z.style.height=J,z.style.maxHeight=J,z.style.minHeight=J}function wZ(z){return typeof z==="number"?`${z}px`:z}function p2(z){return z instanceof Node||z instanceof HTMLElement}function j4(z,J,Q){if(Q==null||Q==="")z.removeAttribute(J);else z.setAttribute(J,Q.toString())}function WH(z,J){if(!J.isContentEditable)return;let Q=SZ(z).getSelection();if(!Q)return;let Z=Y0(z).createRange();Z.selectNodeContents(J),Z.collapse(!1),Q.removeAllRanges(),Q.addRange(Z)}function S4(z,J,Q){let $=SZ(z).ResizeObserver,X=$?new $(Q):null;return X?.observe(J),()=>X?.disconnect()}function I4(z,J){let Q=SZ(z);if(Q.requestAnimationFrame)Q.requestAnimationFrame(J);else if(Q.webkitRequestAnimationFrame)Q.webkitRequestAnimationFrame(J);else Q.setTimeout(J,0)}var R9="data-ref",FQ;function h7(){return FQ??(FQ=document.createTextNode(" ")),FQ.cloneNode()}function W0(z){let{attrs:J,children:Q,cls:Z,ref:$,role:X,tag:Y}=z,U=document.createElement(Y);if(Z)U.className=Z;if($)U.setAttribute(R9,$);if(X)U.setAttribute("role",X);if(J)for(let _ of Object.keys(J))U.setAttribute(_,J[_]);if(Q)if(typeof Q==="string")U.textContent=Q;else{let _=!0;for(let H of Q)if(H)if(typeof H==="string")U.appendChild(document.createTextNode(H)),_=!1;else if(typeof H==="function")U.appendChild(H());else{if(_)U.appendChild(h7()),_=!1;U.append(W0(H)),U.appendChild(h7())}}return U}var qH=["touchstart","touchend","touchmove","touchcancel","scroll"],BH=["wheel"],LQ={},tQ=(()=>{let z={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return(Q)=>{if(typeof LQ[Q]==="boolean")return LQ[Q];let Z=document.createElement(z[Q]||"div");return Q="on"+Q,LQ[Q]=Q in Z}})();function qJ(z,J){if(!J||!z)return!1;return KH(J).indexOf(z)>=0}function EH(z){let J=[],Q=z.target;while(Q)J.push(Q),Q=Q.parentElement;return J}function KH(z){let J=z;if(J.path)return J.path;if(J.composedPath)return J.composedPath();return EH(J)}function FH(z,J,Q){let Z=LH(J),$;if(Z!=null)$={passive:Z};z.addEventListener(J,Q,$)}var LH=(z)=>{let J=qH.includes(z),Q=BH.includes(z);if(J)return!0;if(Q)return!1};function A9(z,J,Q){if(Q===0)return!1;let Z=Math.abs(z.clientX-J.clientX),$=Math.abs(z.clientY-J.clientY);return Math.max(Z,$)<=Q}var C1=(z,J)=>{let Q=z.identifier;for(let Z=0,$=J.length;Z<$;++Z){let X=J[Z];if(X.identifier===Q)return X}return null};function S2(z,J){return z.gos.isElementInThisInstance(J.target)}function BJ(z,J,Q){let $=z.getBoundingClientRect().height,X=t_(Q)-2,Y=s_(Q)-2;if(!z.offsetParent)return;let _=K9(z.offsetParent),{clientY:H,clientX:G}=J,W=H-_.top-$/2,q=G-_.left-10,B=Y0(Q),E=B.defaultView||window,K=E.pageYOffset||B.documentElement.scrollTop,F=E.pageXOffset||B.documentElement.scrollLeft;if(X>0&&q+z.clientWidth>X+F)q=X+F-z.clientWidth;if(q<0)q=0;if(Y>0&&W+z.clientHeight>Y+K)W=Y+K-z.clientHeight;if(W<0)W=0;z.style.left=`${q}px`,z.style.top=`${W}px`}var f6=(z,...J)=>{for(let Q of J){let[Z,$,X,Y]=Q;Z.addEventListener($,X,Y),z.push(Q)}},yZ=(z)=>{if(z){for(let[J,Q,Z,$]of z)J.removeEventListener(Q,Z,$);z.length=0}},T1=(z)=>{if(z.cancelable)z.preventDefault()};function MH(z,J){return J}function j9(z){return z?.getLocaleTextFunc()??MH}function xZ(z,J,Q,Z){let $=J[Q];return z.getLocaleTextFunc()(Q,typeof $==="function"?$(Z):$,Z)}var R0=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(z){this.beans=z,this.stubContext=z.context,this.eventSvc=z.eventSvc,this.gos=z.gos}destroy(){let{destroyFunctions:z}=this;for(let J=0;J<z.length;J++)z[J]();z.length=0,this.destroyed=!0,this.dispatchLocalEvent({type:"destroyed"})}addEventListener(z,J,Q){if(!this.localEventService)this.localEventService=new P4;this.localEventService.addEventListener(z,J,Q)}removeEventListener(z,J,Q){this.localEventService?.removeEventListener(z,J,Q)}dispatchLocalEvent(z){this.localEventService?.dispatchEvent(z)}addManagedElementListeners(z,J){return this._setupListeners(z,J)}addManagedEventListeners(z){return this._setupListeners(this.eventSvc,z)}addManagedListeners(z,J){return this._setupListeners(z,J)}_setupListeners(z,J){let Q=[];for(let Z of Object.keys(J)){let $=J[Z];if($)Q.push(this._setupListener(z,Z,$))}return Q}_setupListener(z,J,Q){if(this.destroyed)return()=>null;let Z;if(DH(z))z.__addEventListener(J,Q),Z=()=>{return z.__removeEventListener(J,Q),null};else{let $=RH(z);if(z instanceof HTMLElement)FH(z,J,Q);else if($)z.addListener(J,Q);else z.addEventListener(J,Q);Z=$?()=>{return z.removeListener(J,Q),null}:()=>{return z.removeEventListener(J,Q),null}}return this.destroyFunctions.push(Z),()=>{return Z(),this.destroyFunctions=this.destroyFunctions.filter(($)=>$!==Z),null}}setupPropertyListener(z,J){let{gos:Q}=this;Q.addPropertyEventListener(z,J);let Z=()=>{return Q.removePropertyEventListener(z,J),null};return this.destroyFunctions.push(Z),()=>{return Z(),this.destroyFunctions=this.destroyFunctions.filter(($)=>$!==Z),null}}addManagedPropertyListener(z,J){if(this.destroyed)return()=>null;return this.setupPropertyListener(z,J)}addManagedPropertyListeners(z,J){if(this.destroyed)return;let Q=z.join("-")+this.propertyListenerId++,Z=($)=>{if($.changeSet){if($.changeSet?.id===this.lastChangeSetIdLookup[Q])return;this.lastChangeSetIdLookup[Q]=$.changeSet.id}let X={type:"propertyChanged",changeSet:$.changeSet,source:$.source};J(X)};for(let $ of z)this.setupPropertyListener($,Z)}getLocaleTextFunc(){return j9(this.beans.localeSvc)}addDestroyFunc(z){if(this.isAlive())this.destroyFunctions.push(z);else z()}createOptionalManagedBean(z,J){return z?this.createManagedBean(z,J):void 0}createManagedBean(z,J){let Q=this.createBean(z,J);return this.addDestroyFunc(this.destroyBean.bind(this,z,J)),Q}createBean(z,J,Q){return(J||this.stubContext).createBean(z,Q)}destroyBean(z,J){return(J||this.stubContext).destroyBean(z)}destroyBeans(z,J){return(J||this.stubContext).destroyBeans(z)}};function DH(z){return z.__addEventListener!==void 0}function RH(z){return z.eventServiceType==="global"}var j=class extends R0{},sQ=new Set,EJ=(z,J)=>{if(!sQ.has(J))sQ.add(J),z()};EJ._set=sQ;var AH={pending:!1,funcs:[]},jH={pending:!1,funcs:[]};function lQ(z,J="setTimeout",Q){let Z=J==="raf"?jH:AH;if(Z.funcs.push(z),Z.pending)return;Z.pending=!0;let $=()=>{let X=Z.funcs.slice();Z.funcs.length=0,Z.pending=!1;for(let Y of X)Y()};if(J==="raf")I4(Q,$);else window.setTimeout($,0)}function i0(z,J,Q){let Z;return function(...$){let X=this;return window.clearTimeout(Z),Z=window.setTimeout(function(){if(z.isAlive())J.apply(X,$)},Q),Z}}function u7(z,J){let Q=0;return function(...Z){let $=this,X=Date.now();if(X-Q<J)return;Q=X,z.apply($,Z)}}function bZ(z,J,Q,Z=100){let $=Date.now(),X=null,Y=!1,U=()=>{if(X!=null)window.clearInterval(X),X=null};z.addDestroyFunc(U);let _=()=>{let H=Date.now()-$>Z;if(J()||H)Q(),Y=!0,U()};if(_(),!Y)X=window.setInterval(_,10)}var VH=new Set(["__proto__","constructor","prototype"]);function OH(z,J){if(z==null)return;if(Array.isArray(z)){for(let Q=0;Q<z.length;Q++)J(Q.toString(),z[Q]);return}for(let Q of Object.keys(z).filter((Z)=>!VH.has(Z)))J(Q,z[Q])}function M0(z,J,Q=!0,Z=!1){if(!I(J))return;OH(J,($,X)=>{let Y=z[$];if(Y===X)return;if(Z){if(Y==null&&X!=null){if(typeof X==="object"&&X.constructor===Object)Y={},z[$]=Y}}if(m7(X)&&m7(Y)&&!Array.isArray(Y))M0(Y,X,Q,Z);else if(Q||X!==void 0)z[$]=X})}function m7(z){return typeof z==="object"&&z!==null}var gZ=class z{static applyGlobalGridOptions(J){if(!z.gridOptions)return{...J};let Q={};if(M0(Q,z.gridOptions,!0,!0),z.mergeStrategy==="deep")M0(Q,J,!0,!0);else Q={...Q,...J};if(z.gridOptions.context)Q.context=z.gridOptions.context;if(J.context){if(z.mergeStrategy==="deep"&&Q.context)M0(J.context,Q.context,!0,!0);Q.context=J.context}return Q}static applyGlobalGridOption(J,Q){if(z.mergeStrategy==="deep"){let Z=PH(J);if(Z&&typeof Z==="object"&&typeof Q==="object")return z.applyGlobalGridOptions({[J]:Q})[J]}return Q}};gZ.gridOptions=void 0;gZ.mergeStrategy="shallow";var hZ=gZ;function PH(z){return hZ.gridOptions?.[z]}var TH={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2000,tooltipSwitchShowDelay:200,tooltipHideDelay:1e4,noteTrigger:"hover",noteShowDelay:180,noteHideDelay:220,tooltipMouseTrack:!1,tooltipShowMode:"standard",tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:"\t",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:1000,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,groupHideColumnsUntilExpanded:!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},V9="https://www.ag-grid.com";function I2(z,J,...Q){if(z.get("debug"))console.log("AG Grid: "+J,...Q)}function y4(z,...J){EJ(()=>O9(z,...J),z+J?.join(""))}function v1(z,...J){EJ(()=>SH(z,...J),z+J?.join(""))}function SH(z,...J){console.error("AG Grid: "+z,...J)}function O9(z,...J){console.warn("AG Grid: "+z,...J)}var P9=new Set,i6={},lz={},k6,T9=!1,S9=!1,IH=!1;function fH(z){let[J,Q]=z.version.split(".")||[],[Z,$]=k6.split(".")||[];return J===Z&&Q===$}function kH(z){if(!k6)k6=z.version;let J=(Z)=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${Z} Please update all modules to the same version.`;if(!z.version)v1(J(`'${z.moduleName}' is incompatible.`));else if(!fH(z))v1(J(`'${z.moduleName}' is version ${z.version} but the other modules are version ${k6}.`));let Q=z.validate?.();if(Q&&!Q.isValid)v1(`${Q.message}`)}function f2(z,J,Q=!1){if(!Q)T9=!0;kH(z);let Z=z.rowModels??["all"];P9.add(z);let $;if(J!==void 0){if(S9=!0,lz[J]===void 0)lz[J]={};$=lz[J]}else $=i6;for(let X of Z){if($[X]===void 0)$[X]={};$[X][z.moduleName]=z}if(z.dependsOn)for(let X of z.dependsOn)f2(X,J,Q)}function CH(z){delete lz[z]}function aQ(z,J,Q){let Z=($)=>!!i6[$]?.[z]||!!lz[J]?.[$]?.[z];return Z(Q)||Z("all")}function uZ(){return S9}function vH(z,J){let Q=lz[z]??{};return[...Object.values(i6.all??{}),...Object.values(Q.all??{}),...Object.values(i6[J]??{}),...Object.values(Q[J]??{})]}function NH(){return new Set(P9)}function I9(z,J){let Q=lz[z]??{};return[...Object.values(Q.all??{}),...Object.values(Q[J]??{})]}function wH(){return T9}function mZ(){return IH}var f9=class{static register(z){f2(z,void 0)}static registerModules(z){for(let J of z)f2(J,void 0)}};var p="35.3.0",c7=2000,p7=100,k9="_version_",C9=null,N1=`${V9}/javascript-data-grid`;function yH(z){C9=z}function xH(z){N1=z}function v9(z,J,Q){return C9?.(z,J)??[uH(z,J,Q)]}function KJ(z,J,Q,Z,$){z(`${Z?"warning":"error"} #${J}`,...v9(J,Q,$))}function bH(z){if(!z)return String(z);let J={};for(let Q of Object.keys(z))if(typeof z[Q]!=="object"&&typeof z[Q]!=="function")J[Q]=z[Q];return JSON.stringify(J)}function gH(z){let J=z;if(z instanceof Error)J=z.toString();else if(typeof z==="object")J=bH(z);return J}function C6(z){return z===void 0?"undefined":z===null?"null":z}function oQ(z,J){return`${z}?${J.toString()}`}function hH(z,J,Q){let Z=Array.from(J.entries()).sort((X,Y)=>Y[1].length-X[1].length),$=oQ(z,J);for(let[X,Y]of Z){if(X===k9)continue;let U=$.length-Q;if(U<=0)break;let _="...",H=U+_.length,G=Y.length-H>p7?Y.slice(0,Y.length-H)+_:Y.slice(0,p7)+_;J.set(X,G),$=oQ(z,J)}return $}function N9(z,J){let Q=new URLSearchParams;if(Q.append(k9,p),J)for(let X of Object.keys(J))Q.append(X,gH(J[X]));let Z=`${N1}/errors/${z}`,$=oQ(Z,Q);return $.length<=c7?$:hH(Z,Q,c7)}var uH=(z,J,Q)=>{let Z=N9(z,J),$=`${Q?Q+`
2
+ `:""}Visit ${Z}`;if(mZ())return $;return`${$}${Q?"":`
3
+ Alternatively register the ValidationModule to see the full message in the console.`}`};function V(...z){KJ(y4,z[0],z[1],!0)}function r(...z){KJ(v1,z[0],z[1],!1)}function L2(z,J,Q){KJ(v1,z,J,!1,Q)}function w9(z,J,Q){KJ(y4,z,J,!0,Q)}function mH(z,J){let Q=J[0];return`error #${Q} `+v9(Q,J[1],z).join(" ")}function U4(...z){return mH(void 0,z)}function y9(z,J){return z.get("rowModelType")===J}function o(z,J){return y9(z,"clientSide")}function Iz(z,J){return y9(z,"serverSide")}function T0(z,J){return z.get("domLayout")===J}function o4(z){return d6(z)!==void 0}function x9(z){return typeof z.get("getRowHeight")==="function"}function cH(z,J){if(J)return!z.get("enableStrictPivotColumnOrder");return z.get("maintainColumnOrder")}function pH({gos:z,formula:J}){let Q=z.get("rowNumbers");return Q||!!J?.active&&Q!==!1}function k2(z,J,Q=!1,Z){let{gos:$,environment:X}=z;if(Z==null)Z=X.getDefaultRowHeight();if(x9($)){if(Q)return{height:Z,estimated:!0};let _={node:J,data:J.data},H=$.getCallback("getRowHeight")(_);if(eQ(H)){if(H===0)V(23);return{height:Math.max(1,H),estimated:!1}}}if(J.detail&&$.get("masterDetail"))return iH($);let Y=$.get("rowHeight");return{height:Y&&eQ(Y)?Y:Z,estimated:!1}}function iH(z){if(z.get("detailRowAutoHeight"))return{height:1,estimated:!1};let J=z.get("detailRowHeight");if(eQ(J))return{height:J,estimated:!1};return{height:300,estimated:!1}}function b9(z){let{environment:J,gos:Q}=z,Z=Q.get("rowHeight");if(!Z||n(Z))return J.getDefaultRowHeight();let $=J.refreshRowHeightVariable();if($!==-1)return $;return V(24),J.getDefaultRowHeight()}function eQ(z){return!isNaN(z)&&typeof z==="number"&&isFinite(z)}function g9(z,J,Q){let Z=J[z.getDomDataKey()];return Z?Z[Q]:void 0}function J1(z,J,Q,Z){let $=z.getDomDataKey(),X=J[$];if(n(X))X={},J[$]=X;X[Q]=Z}function w1(z){if(z.get("ensureDomOrder"))return!1;return z.get("animateRows")}function s1(z){return!(z.get("paginateChildRows")||z.get("groupHideOpenParents")||T0(z,"print"))}function x4(z){return!z.get("autoGroupColumnDef")?.comparator&&!z.get("treeData")}function c4(z){let J=z.get("groupAggFiltering");if(typeof J==="function")return z.getCallback("groupAggFiltering");if(J===!0)return()=>!0;return}function i4(z){return z.get("grandTotalRow")}function FJ(z){let J=z.get("groupTotalRow");if(typeof J==="function")return z.getCallback("groupTotalRow");return()=>J??void 0}function i2(z){if(!!z.get("groupHideOpenParents"))return!0;return z.get("groupDisplayType")==="multipleColumns"}function cZ(z){return i2(z)&&z.get("groupHideColumnsUntilExpanded")&&o(z)}function LJ(z,J){if(J)return!1;return z.get("groupDisplayType")==="groupRows"}function h9(z,J,Q){return!!J.group&&!J.footer&&LJ(z,Q)}function zZ(z){let J=z.getCallback("getRowId");if(J===void 0)return J;return(Q)=>{let Z=J(Q);if(typeof Z!=="string")EJ(()=>V(25,{id:Z}),"getRowIdString"),Z=String(Z);return Z}}function dH(z,J){let Q=z.get("groupHideParentOfSingleChild");if(Q===!0)return!0;if(Q==="leafGroupsOnly"&&J.leafGroup)return!0;if(z.get("groupRemoveSingleChildren"))return!0;if(z.get("groupRemoveLowestSingleChildren")&&J.leafGroup)return!0;return!1}function MJ(z,J){let Q=z.get("suppressGroupChangesColumnVisibility");if(Q===!0)return!1;if(J&&Q==="suppressHideOnGroup")return!1;if(!J&&Q==="suppressShowOnUngroup")return!1;let Z=z.get("suppressRowGroupHidesColumns");if(J&&Z===!0)return!1;let $=z.get("suppressMakeColumnVisibleAfterUnGroup");if(!J&&$===!0)return!1;return!0}function Dz(z){return z?.checkboxes??!0}function v6(z){return z?.mode==="multiRow"&&(z.headerCheckbox??!0)}function h1(z){if(typeof z!=="object")return;return z.checkboxLocation??"selectionColumn"}function MQ(z){return z?.hideDisabledCheckboxes??!1}function nH(z){return typeof z.get("rowSelection")!=="string"}function u9(z){return z.get("cellSelection")!==void 0}function m9(z){let J=z.get("cellSelection");if(J===void 0)return z.get("suppressMultiRangeSelection");return typeof J!=="boolean"?J?.suppressMultiRanges??!1:!1}function n0(z){let J=z.get("cellSelection");return J!==void 0?!!J:z.get("enableRangeSelection")}function DJ(z){let J=z.get("cellSelection");if(J===void 0)return{mode:"fill",setFillValue:z.get("fillOperation"),direction:z.get("fillHandleDirection"),suppressClearOnFillReduction:z.get("suppressClearOnFillReduction")};return typeof J!=="boolean"&&J.handle?.mode==="fill"?J.handle:void 0}function e4(z){let J=z.get("cellSelection")??!1;return(typeof J==="object"&&J.enableColumnSelection)??!1}function c9(z){let J=z.get("rowSelection")??"single";if(typeof J==="string"){let Q=z.get("suppressRowClickSelection"),Z=z.get("suppressRowDeselection");if(Q&&Z)return!1;else if(Q)return"enableDeselection";else if(Z)return"enableSelection";else return!0}return J.mode==="singleRow"||J.mode==="multiRow"?J.enableClickSelection??!1:!1}function rH(z){let J=c9(z);return J===!0||J==="enableSelection"}function tH(z){let J=c9(z);return J===!0||J==="enableDeselection"}function JZ(z){let J=z.get("rowSelection");if(typeof J==="string")return z.get("isRowSelectable");return J?.isRowSelectable}function d6(z){let J="beanName"in z&&z.beanName==="gos"?z.get("rowSelection"):z.rowSelection;if(typeof J==="string")switch(J){case"multiple":return"multiRow";case"single":return"singleRow";default:return}switch(J?.mode){case"multiRow":case"singleRow":return J.mode;default:return}}function C2(z){return d6(z)==="multiRow"}function sH(z){let J=z.get("rowSelection");if(typeof J==="string")return z.get("rowMultiSelectWithClick");return J?.enableSelectionWithoutKeys??!1}function n6(z){let J=z.get("rowSelection");if(typeof J==="string"){let Q=z.get("groupSelectsChildren"),Z=z.get("groupSelectsFiltered");if(Q&&Z)return"filteredDescendants";else if(Q)return"descendants";else return"self"}return J?.mode==="multiRow"?J.groupSelects:void 0}function p9(z,J=!0){let Q=z.get("rowSelection");if(typeof Q!=="object")return J?"all":void 0;return Q.mode==="multiRow"?Q.selectAll:"all"}function lH(z){let J=z.get("rowSelection");if(typeof J==="string")return!1;return J?.mode==="multiRow"?J.ctrlASelectsRows??!1:!1}function v2(z){let J=n6(z);return J==="descendants"||J==="filteredDescendants"}function i7(z){let J=z.get("rowSelection");return typeof J==="object"&&J.masterSelects||"self"}function aH(z){return z.isModuleRegistered("SetFilter")&&!z.get("suppressSetFilterByDefault")}function F0(z){return z.get("columnMenu")==="legacy"}function pZ(z){return!F0(z)}function oH(z){if(!z||z.length<2)return z;return"on"+z[0].toUpperCase()+z.substring(1)}function v(z,J){return z.addCommon(J)}function iZ({gos:z},J){return J.button===2||J.ctrlKey&&z.get("allowContextMenuWithControlKey")}var eH={resizable:!0,sortable:!0},zG=0;function i9(){return zG++}function H4(z){return z instanceof E4}var JG=["asc","desc",null],QG=[{type:"absolute",direction:"asc"},{type:"absolute",direction:"desc"},null],E4=class extends j{constructor(z,J,Q,Z){super();this.colDef=z,this.userProvidedColDef=J,this.colId=Q,this.primary=Z,this.isColumn=!0,this.instanceId=i9(),this.autoHeaderHeight=null,this.sortDef=$4(),this.moving=!1,this.resizing=!1,this.menuVisible=!1,this.formulaRef=null,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.colEventSvc=new P4,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.flex=null,this.colIdSanitised=L0(Q)}destroy(){super.destroy(),this.beans.rowSpanSvc?.deregister(this)}getInstanceId(){return this.instanceId}initState(){let{colDef:z,beans:{sortSvc:J,pinnedCols:Q,colFlex:Z}}=this;J?.initCol(this);let $=z.hide;if($!==void 0)this.visible=!$;else this.visible=!z.initialHide;Q?.initCol(this),Z?.initCol(this)}setColDef(z,J,Q){let Z=z.spanRows!==this.colDef.spanRows;if(this.colDef=z,this.userProvidedColDef=J,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),Z)this.beans.rowSpanSvc?.deregister(this),this.initRowSpan();this.dispatchColEvent("colDefChanged",Q)}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:z,colDef:{field:J,tooltipField:Q}}=this,Z=z.get("suppressFieldDotNotation");this.fieldContainsDots=I(J)&&J.includes(".")&&!Z,this.tooltipFieldContainsDots=I(Q)&&Q.includes(".")&&!Z}initMinAndMaxWidths(){let z=this.colDef;this.minWidth=z.minWidth??this.beans.environment.getDefaultColumnMinWidth(),this.maxWidth=z.maxWidth??Number.MAX_SAFE_INTEGER}initTooltip(){this.beans.tooltipSvc?.initCol(this)}initRowSpan(){if(this.colDef.spanRows)this.beans.rowSpanSvc?.register(this)}addPivotListener(){let z=this.beans.pivotColDefSvc,J=this.colDef.pivotValueColumn;if(!z||!J)return;this.addManagedListeners(J,{colDefChanged:(Q)=>{let Z=z.recreateColDef(this.colDef);this.setColDef(Z,Z,Q.source)}})}resetActualWidth(z){let J=this.calculateColInitialWidth(this.colDef);this.setActualWidth(J,z,!0)}calculateColInitialWidth(z){let J=z.width??z.initialWidth??200;return Math.max(Math.min(J,this.maxWidth),this.minWidth)}isEmptyGroup(){return!1}isRowGroupDisplayed(z){return this.beans.showRowGroupCols?.isRowGroupDisplayed(this,z)??!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(z,J){this.colEventSvc.addEventListener(z,J)}__removeEventListener(z,J){this.colEventSvc.removeEventListener(z,J)}addEventListener(z,J){this.frameworkEventListenerService=this.beans.frameworkOverrides.createLocalEventListenerWrapper?.(this.frameworkEventListenerService,this.colEventSvc);let Q=this.frameworkEventListenerService?.wrap(z,J)??J;this.colEventSvc.addEventListener(z,Q)}removeEventListener(z,J){let Q=this.frameworkEventListenerService?.unwrap(z,J)??J;this.colEventSvc.removeEventListener(z,Q)}createColumnFunctionCallbackParams(z){return v(this.gos,{node:z,data:z.data,column:this,colDef:this.colDef})}isSuppressNavigable(z){return this.beans.cellNavigation?.isSuppressNavigable(this,z)??!1}isCellEditable(z){return this.beans.editSvc?.isCellEditable({rowNode:z,column:this})??!1}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle}isAutoHeight(){return!!this.colDef.autoHeight}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight}isRowDrag(z){return this.isColumnFunc(z,this.colDef.rowDrag)}isDndSource(z){return this.isColumnFunc(z,this.colDef.dndSource)}isCellCheckboxSelection(z){return this.beans.selectionSvc?.isCellCheckboxSelection(this,z)??!1}isSuppressPaste(z){return this.isColumnFunc(z,this.colDef?.suppressPaste??null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(z){return this.colDef[z]??eH[z]}isColumnFunc(z,J){if(typeof J==="boolean")return J;if(typeof J==="function"){let Q=this.createColumnFunctionCallbackParams(z);return J(Q)}return!1}createColumnEvent(z,J){return v(this.gos,{type:z,column:this,columns:[this],source:J})}isMoving(){return this.moving}getSort(){return this.sortDef.direction}getSortDef(){if(!this.sortDef.direction)return null;return this.sortDef}getColDefAllowedSortTypes(){let z=[],{sort:J,initialSort:Q}=this.colDef,Z=J===null?J:T4(J?.type),$=Q===null?Q:T4(Q?.type);if(Z)z.push(Z);if($)z.push($);return z}getSortingOrder(){let z=this.getColDefAllowedSortTypes().includes("absolute")?QG:JG;return(this.colDef.sortingOrder??this.gos.get("sortingOrder")??z).map((J)=>$4(J))}getAvailableSortTypes(){let z=this.getSortingOrder().reduce((J,Q)=>{if(Q.direction)J.push(Q.type);return J},this.getColDefAllowedSortTypes());return new Set(z)}setSortDef(z){this.sortDef=z}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return this.getSort()==="asc"}isSortDescending(){return this.getSort()==="desc"}isSortNone(){return n(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(z,J){if(this.oldLeft=this.left,this.left!==z)this.left=z,this.dispatchColEvent("leftChanged",J)}isFilterActive(){return this.filterActive}isHovered(){return V(261),!!this.beans.colHover?.isHovered(this)}setFirstRightPinned(z,J){if(this.firstRightPinned!==z)this.firstRightPinned=z,this.dispatchColEvent("firstRightPinnedChanged",J)}setLastLeftPinned(z,J){if(this.lastLeftPinned!==z)this.lastLeftPinned=z,this.dispatchColEvent("lastLeftPinnedChanged",J)}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(z,J){let Q=z===!0;if(this.visible!==Q)this.visible=Q,this.dispatchColEvent("visibleChanged",J);this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){return!this.colDef.suppressSpanHeaderHeight}getFirstRealParent(){let z=this.getOriginalParent();while(z?.isPadding())z=z.getOriginalParent();return z}getColumnGroupPaddingInfo(){let z=this.parent;if(!z?.isPadding())return{numberOfParents:0,isSpanningTotal:!1};let J=z.getPaddingLevel()+1,Q=!0;while(z){if(!z.isPadding()){Q=!1;break}z=z.parent}return{numberOfParents:J,isSpanningTotal:Q}}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(z){let J=z!==this.autoHeaderHeight;return this.autoHeaderHeight=z,J}createBaseColDefParams(z){return v(this.gos,{node:z,data:z.data,colDef:this.colDef,column:this})}getColSpan(z){if(n(this.colDef.colSpan))return 1;let J=this.createBaseColDefParams(z),Q=this.colDef.colSpan(J);return Math.max(Q,1)}getRowSpan(z){if(n(this.colDef.rowSpan))return 1;let J=this.createBaseColDefParams(z),Q=this.colDef.rowSpan(J);return Math.max(Q,1)}setActualWidth(z,J,Q=!1){if(z=Math.max(z,this.minWidth),z=Math.min(z,this.maxWidth),this.actualWidth!==z){if(this.actualWidth=z,this.flex!=null&&J!=="flex"&&J!=="gridInitializing")this.flex=null;if(!Q)this.fireColumnWidthChangedEvent(J)}this.dispatchStateUpdatedEvent("width")}fireColumnWidthChangedEvent(z){this.dispatchColEvent("widthChanged",z)}isGreaterThanMax(z){return z>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(z,J,Q){let Z=this.createColumnEvent(z,J);if(Q)M0(Z,Q);this.colEventSvc.dispatchEvent(Z)}dispatchStateUpdatedEvent(z){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:z})}};function $4(z){if(y1(z))return{direction:z.direction,type:z.type};return{direction:RJ(z),type:T4(z)}}function Rz(z){return z==="asc"||z==="desc"||z===null}function dZ(z){return z==="default"||z==="absolute"}function y1(z){if(!z||typeof z!=="object")return!1;let J=z;return dZ(J.type)&&Rz(J.direction)}function N6(z,J){if(!z)return J?J.direction===null:!0;if(!J)return z?z.direction===null:!0;return z.type===J.type&&z.direction===J.direction}function RJ(z){return Rz(z)?z:null}function T4(z){return dZ(z)?z:"default"}function nZ(z,J,Q){let $=Q?.()??J.sortSvc.getDisplaySortForColumn(z),X=T4($?.type),Y=RJ($?.direction),U=z.getAvailableSortTypes(),_=U.has("default"),H=U.has("absolute");return{isDefaultSortAllowed:_,isAbsoluteSortAllowed:H,isAbsoluteSort:X==="absolute",isDefaultSort:X==="default",isAscending:Y==="asc",isDescending:Y==="desc",direction:Y}}function _0(z){return z instanceof az}var az=class extends j{constructor(z,J,Q,Z){super();this.colGroupDef=z,this.groupId=J,this.padding=Q,this.level=Z,this.isColumn=!1,this.expandable=!1,this.instanceId=i9(),this.expandableListenerRemoveCallback=null,this.expanded=!!z?.openByDefault}destroy(){if(this.expandableListenerRemoveCallback)this.reset(null,void 0);super.destroy()}reset(z,J){if(this.colGroupDef=z,this.level=J,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(){if(this.children)return this.children.some((z)=>z.isVisible());return!1}isPadding(){return this.padding}setExpanded(z){this.expanded=z===void 0?!1:z,this.dispatchLocalEvent({type:"expandedChanged"})}isExpandable(){return this.expandable}isExpanded(){return this.expanded}getGroupId(){return this.groupId}getId(){return this.getGroupId()}setChildren(z){this.children=z}getChildren(){return this.children}getColGroupDef(){return this.colGroupDef}getLeafColumns(){let z=[];return this.addLeafColumns(z),z}forEachLeafColumn(z){if(!this.children)return;for(let J of this.children)if(H4(J))z(J);else if(_0(J))J.forEachLeafColumn(z)}addLeafColumns(z){if(!this.children)return;for(let J of this.children)if(H4(J))z.push(J);else if(_0(J))J.addLeafColumns(z)}getColumnGroupShow(){let z=this.colGroupDef;if(!z)return;return z.columnGroupShow}setupExpandable(){if(this.setExpandable(),this.expandableListenerRemoveCallback)this.expandableListenerRemoveCallback();let z=this.onColumnVisibilityChanged.bind(this);for(let J of this.getLeafColumns())J.__addEventListener("visibleChanged",z);this.expandableListenerRemoveCallback=()=>{for(let J of this.getLeafColumns())J.__removeEventListener("visibleChanged",z);this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let z=!1,J=!1,Q=!1,Z=this.findChildrenRemovingPadding();for(let X=0,Y=Z.length;X<Y;X++){let U=Z[X];if(!U.isVisible())continue;let _=U.getColumnGroupShow();if(_==="open")z=!0,Q=!0;else if(_==="closed")J=!0,Q=!0;else z=!0,J=!0}let $=z&&J&&Q;if(this.expandable!==$)this.expandable=$,this.dispatchLocalEvent({type:"expandableChanged"})}findChildrenRemovingPadding(){let z=[],J=(Q)=>{for(let Z of Q)if(_0(Z)&&Z.isPadding())J(Z.children);else z.push(Z)};return J(this.children),z}onColumnVisibilityChanged(){this.setExpandable()}},ZG={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}};function QZ(z,J,Q){let Z={},$=z.gos;return Object.assign(Z,$.get("defaultColGroupDef")),Object.assign(Z,J),$.validateColDef(Z,Q),Z}var $G=class{constructor(){this.existingKeys={}}addExistingKeys(z){for(let J=0;J<z.length;J++)this.existingKeys[z[J]]=!0}getUniqueKey(z,J){z=d0(z);let Q=0;while(!0){let Z=z??J;if(Z){if(Q!==0)Z+="_"+Q}else Z=Q;if(!this.existingKeys[Z]){let $=String(Z);if(z&&Q>0)V(273,{providedId:z,usedId:$});return this.existingKeys[$]=!0,$}Q++}}},d9=(z,J)=>{if(_0(z))z.setupExpandable();z.originalParent=J};function n9(z,J=null,Q,Z,$){let{existingCols:X,existingGroups:Y}=r9(Z),U=new Map(X.map((K)=>[K.getId(),K])),_=new Map(Y.map((K)=>[K.getId(),K])),H=0,G=(K,F)=>{if(H=Math.max(H,F),a9(K)){if(!z.colGroupSvc)return null;let A=K.groupId,O=_.get(A),T=QZ(z,K,A),S=new az(T,A,!1,F);if(z.context.createBean(S),O)S.setExpanded(O.isExpanded());return S.setChildren(K.children.map((k)=>G(k,F+1))),S}let L=K.colId,M=U.get(L),D=Qz(z,K,M?.colId??L);if(!M)M=new E4(D,K,L,Q),z.context.createBean(M);else M.setColDef(D,K,$),l9(z,M,D,$);return z.dataTypeSvc?.addColumnListeners(M),M},W=J?.map((K)=>G(K,0))??[],q=0,B={getUniqueKey:(K,F)=>String(++q)},E=z.colGroupSvc?z.colGroupSvc.balanceColumnTree(W,0,H,B):W;return u4(null,E,d9),{columnTree:E,treeDepth:H}}function rZ(z,J=null,Q,Z,$){let X=new $G,{existingCols:Y,existingGroups:U,existingColKeys:_}=r9(Z);X.addExistingKeys(_);let H=t9(z,J,0,Q,Y,X,U,$),{colGroupSvc:G}=z,W=G?.findMaxDepth(H,0)??0,q=G?G.balanceColumnTree(H,0,W,X):H;return u4(null,q,d9),{columnTree:q,treeDepth:W}}function r9(z){let J=[],Q=[],Z=[];if(z)u4(null,z,($)=>{if(_0($)){let X=$;Q.push(X)}else{let X=$;Z.push(X.getId()),J.push(X)}});return{existingCols:J,existingGroups:Q,existingColKeys:Z}}function t9(z,J,Q,Z,$,X,Y,U){if(!J)return[];let{colGroupSvc:_}=z,H=Array(J.length);for(let G=0;G<H.length;G++){let W=J[G];if(_&&a9(W))H[G]=_.createProvidedColumnGroup(Z,W,Q,$,X,Y,U);else H[G]=XG(z,Z,W,$,X,U)}return H}function XG(z,J,Q,Z,$,X){let Y=YG(Q,Z);if(Y)Z?.splice(Y.idx,1);let U=Y?.column;if(!U){let _=$.getUniqueKey(Q.colId,Q.field),H=Qz(z,Q,_);U=new E4(H,Q,_,J),z.context.createBean(U)}else{let _=Qz(z,Q,U.colId);U.setColDef(_,Q,X),l9(z,U,_,X)}return z.dataTypeSvc?.addColumnListeners(U),U}function s9(z,J,Q,Z,$,X,Y,U){let{sortSvc:_,pinnedCols:H,colFlex:G}=z;if(Q!==void 0)J.setVisible(!Q,U);if(_){if(_.updateColSort(J,Z,U),$!==void 0)_.setColSortIndex(J,$)}if(X!==void 0)H?.setColPinned(J,X);if(Y!==void 0)G?.setColFlex(J,Y)}function l9(z,J,Q,Z){s9(z,J,Q.hide,Q.sort,Q.sortIndex,Q.pinned,Q.flex,Z);let $=J.getFlex();if($!=null&&$>0)return;if(Q.width!=null)J.setActualWidth(Q.width,Z);else{let X=J.getActualWidth();J.setActualWidth(X,Z)}}function YG(z,J){if(!J)return;for(let Q=0;Q<J.length;Q++){let Z=J[Q].getUserProvidedColDef();if(!Z)continue;if(z.colId!=null){if(J[Q].getId()===z.colId)return{idx:Q,column:J[Q]};continue}if(z.field!=null){if(Z.field===z.field)return{idx:Q,column:J[Q]};continue}if(Z===z)return{idx:Q,column:J[Q]}}return}function Qz(z,J,Q,Z){let{gos:$,dataTypeSvc:X}=z,Y={},U=$.get("defaultColDef");M0(Y,U,!1,!0);let _=UG(z,Y,J,Q);if(_)_G(z,_,Y);let H=Y.cellDataType;if(M0(Y,J,!1,!0),H!==void 0)Y.cellDataType=H;let G=$.get("autoGroupColumnDef"),W=x4($);if(J.rowGroup&&G&&W)M0(Y,{sort:G.sort,initialSort:G.initialSort},!1,!0);return X?.postProcess(Y),X?.validateColDef(Y,J,U,Q),$.validateColDef(Y,Q,Z),Y}function UG(z,J,Q,Z){let $=z.dataTypeSvc?.updateColDefAndGetColumnType(J,Q,Z),X=Q.type??$??J.type;return J.type=X,X?r6(X):void 0}function _G(z,J,Q){if(!J.length)return;let Z=Object.assign({},ZG),$=z.gos.get("columnTypes")||{};for(let X of Object.keys($)){let Y=$[X];if(X in Z)V(34,{key:X});else{if(Y.type)V(35);Z[X]=Y}}for(let X of J){let Y=Z[X.trim()];if(Y)M0(Q,Y,!1,!0);else V(36,{t:X})}}function a9(z){return z.children!==void 0}function u4(z,J,Q){if(!J)return;for(let Z=0;Z<J.length;Z++){let $=J[Z];if(_0($))u4($,$.getChildren(),Q);Q($,z)}}var Y1="ag-Grid-AutoColumn",o9="ag-Grid-SelectionColumn",e9="ag-Grid-RowNumbersColumn",z$="ag-Grid-HierarchyColumn";function AJ(z){let J=[],Q=(Z)=>{for(let $=0;$<Z.length;$++){let X=Z[$];if(H4(X))J.push(X);else if(_0(X))Q(X.getChildren())}};return Q(z),J}function a4(z){return z.reduce((J,Q)=>J+Q.getActualWidth(),0)}function G4(z,J,Q){let Z={};if(!J)return;if(u4(null,J,(X)=>{Z[X.getInstanceId()]=X}),Q)u4(null,Q,(X)=>{Z[X.getInstanceId()]=null});let $=Object.values(Z).filter((X)=>X!=null);z.context.destroyBeans($)}function U1(z){return z.getId().startsWith(Y1)}function d4(z){return(typeof z==="string"?z:("getColId"in z)?z.getColId():z.colId)?.startsWith(o9)??!1}function w0(z){return(typeof z==="string"?z:("getColId"in z)?z.getColId():z.colId)?.startsWith(e9)??!1}function d2(z){return d4(z)||w0(z)}function r6(z){let J=[];if(z instanceof Array)J=z;else if(typeof z==="string")J=z.split(",");return J}function n2(z,J){return Z0(z,J,(Q,Z)=>Q.colId===Z.colId)}function r2(z){z.map={};for(let J of z.list)z.map[J.getId()]=J}function Az(z){return z==="optionsUpdated"?"gridOptionsChanged":z}function m4(z,J){return z===J||z.colId==J||z.colDef===J}var HG=(z,J)=>(Q,Z)=>{let $={value1:void 0,value2:void 0},X=!1;if(z){if(z[Q]!==void 0)$.value1=z[Q],X=!0;if(I(Z)&&z[Z]!==void 0)$.value2=z[Z],X=!0}if(!X&&J){if(J[Q]!==void 0)$.value1=J[Q];if(I(Z)&&J[Z]!==void 0)$.value2=J[Z]}return $};function tZ(z,J){let Q={...z,sort:void 0,colId:J},Z=J$(z);if(Z)Q.sort=Z.direction,Q.sortType=Z.type;return Q}function J$(z){let{sort:J,initialSort:Q}=z,Z=y1(J)||Rz(J),$=y1(Q)||Rz(Q);if(Z)return $4(J);if($)return $4(Q);return null}function Q$(z,J){return z+"_"+J}function K0(z){return z instanceof N2}var N2=class extends j{constructor(z,J,Q,Z){super();this.providedColumnGroup=z,this.groupId=J,this.partId=Q,this.pinned=Z,this.isColumn=!1,this.displayedChildren=[],this.autoHeaderHeight=null,this.parent=null,this.colIdSanitised=L0(this.getUniqueId())}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}getUniqueId(){return Q$(this.groupId,this.partId)}isEmptyGroup(){return this.displayedChildren.length===0}isMoving(){let z=this.getProvidedColumnGroup().getLeafColumns();if(!z||z.length===0)return!1;return z.every((J)=>J.isMoving())}checkLeft(){for(let z of this.displayedChildren)if(K0(z))z.checkLeft();if(this.displayedChildren.length>0)if(this.gos.get("enableRtl")){let J=N(this.displayedChildren).getLeft();this.setLeft(J)}else{let z=this.displayedChildren[0].getLeft();this.setLeft(z)}else this.setLeft(null)}getLeft(){return this.left}getOldLeft(){return this.oldLeft}setLeft(z){if(this.oldLeft=this.left,this.left!==z)this.left=z,this.dispatchLocalEvent({type:"leftChanged"})}getPinned(){return this.pinned}getGroupId(){return this.groupId}getPartId(){return this.partId}getActualWidth(){let z=0;for(let J of this.displayedChildren??[])z+=J.getActualWidth();return z}isResizable(){if(!this.displayedChildren)return!1;let z=!1;for(let J of this.displayedChildren)if(J.isResizable())z=!0;return z}getMinWidth(){let z=0;for(let J of this.displayedChildren)z+=J.getMinWidth();return z}addChild(z){if(!this.children)this.children=[];this.children.push(z)}getDisplayedChildren(){return this.displayedChildren}getLeafColumns(){let z=[];return this.addLeafColumns(z),z}getDisplayedLeafColumns(){let z=[];return this.addDisplayedLeafColumns(z),z}getDefinition(){return this.providedColumnGroup.getColGroupDef()}getColGroupDef(){return this.providedColumnGroup.getColGroupDef()}isPadding(){return this.providedColumnGroup.isPadding()}isExpandable(){return this.providedColumnGroup.isExpandable()}isExpanded(){return this.providedColumnGroup.isExpanded()}setExpanded(z){this.providedColumnGroup.setExpanded(z)}isAutoHeaderHeight(){return!!this.getColGroupDef()?.autoHeaderHeight}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(z){let J=z!==this.autoHeaderHeight;return this.autoHeaderHeight=z,J}addDisplayedLeafColumns(z){for(let J of this.displayedChildren??[])if(H4(J))z.push(J);else if(K0(J))J.addDisplayedLeafColumns(z)}addLeafColumns(z){for(let J of this.children??[])if(H4(J))z.push(J);else if(K0(J))J.addLeafColumns(z)}getChildren(){return this.children}getColumnGroupShow(){return this.providedColumnGroup.getColumnGroupShow()}getProvidedColumnGroup(){return this.providedColumnGroup}getPaddingLevel(){let z=this.parent;if(!this.isPadding()||!z?.isPadding())return 0;return 1+z.getPaddingLevel()}calculateDisplayedColumns(){this.displayedChildren=[];let z=this;while(z?.isPadding())z=z.parent;if(!(z?z.getProvidedColumnGroup().isExpandable():!1)){this.displayedChildren=this.children,this.dispatchLocalEvent({type:"displayedChildrenChanged"});return}for(let Q of this.children??[]){if(K0(Q)&&!Q.displayedChildren?.length)continue;switch(Q.getColumnGroupShow()){case"open":if(z.getProvidedColumnGroup().isExpanded())this.displayedChildren.push(Q);break;case"closed":if(!z.getProvidedColumnGroup().isExpanded())this.displayedChildren.push(Q);break;default:this.displayedChildren.push(Q);break}}this.dispatchLocalEvent({type:"displayedChildrenChanged"})}},sZ="ROOT_NODE_ID",ZZ="rowGroupFooter_",d7="detail_",GG=ZZ+sZ,R={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"},WG=65,qG=67,BG=86,EG=68,KG=90,FG=89;function Z$(z){let{keyCode:J}=z,Q;switch(J){case WG:Q=R.A;break;case qG:Q=R.C;break;case BG:Q=R.V;break;case EG:Q=R.D;break;case KG:Q=R.Z;break;case FG:Q=R.Y;break;default:Q=z.code}return Q}function $$(z){return typeof z.then==="function"}function LG(z,J){return new b((Q)=>{Q(window.setInterval(z,J))})}var b=class z{constructor(J){this.status=0,this.resolution=null,this.waiters=[],J((Q)=>this.onDone(Q),(Q)=>this.onReject(Q))}static all(J){return J.length?new z((Q)=>{let Z=J.length,$=Array(Z);J.forEach((X,Y)=>{X.then((U)=>{if($[Y]=U,Z--,Z===0)Q($)})})}):z.resolve()}static resolve(J=null){return new z((Q)=>Q(J))}then(J){return new z((Q)=>{if(this.status===1)Q(J(this.resolution));else this.waiters.push((Z)=>Q(J(Z)))})}onDone(J){this.status=1,this.resolution=J;for(let Q of this.waiters)Q(J)}onReject(J){}},MG=class extends R0{constructor(){super(...arguments);this.beanName="dragAndDrop",this.dragSourceAndParamsList=[],this.dragItem=null,this.dragInitialSourcePointerOffsetX=0,this.dragInitialSourcePointerOffsetY=0,this.lastMouseEvent=null,this.lastDraggingEvent=null,this.dragSource=null,this.dragImageCompPromise=null,this.dragImageComp=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0,this.dropTargets=[],this.externalDropZoneCount=0,this.lastDropTarget=null}addDragSource(z,J=!1){let Q={capturePointer:!0,dragSource:z,eElement:z.eElement,dragStartPixels:z.dragStartPixels,onDragStart:(Z)=>this.onDragStart(z,Z),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),onDragCancel:this.onDragCancel.bind(this),includeTouch:J};this.dragSourceAndParamsList.push(Q),this.beans.dragSvc.addDragSource(Q)}setDragImageCompIcon(z,J=!1){let Q=this.dragImageComp;if(Q&&(J||this.dragImageLastIcon!==z))this.dragImageLastIcon=z,Q.setIcon(z,J)}removeDragSource(z){let{dragSourceAndParamsList:J,beans:Q}=this;for(let Z=0,$=J.length;Z<$;Z++)if(J[Z].dragSource===z){let X=J[Z];Q.dragSvc?.removeDragSource(X),J.splice(Z,1);break}}destroy(){let{dragSourceAndParamsList:z,dropTargets:J,beans:Q}=this,Z=Q.dragSvc;for(let $ of z)Z?.removeDragSource($);z.length=0,J.length=0,this.externalDropZoneCount=0,this.clearDragAndDropProperties(),super.destroy()}nudge(){let z=this.lastMouseEvent;if(z)this.onDragging(z,!0)}onDragStart(z,J){this.lastMouseEvent=J,this.dragSource=z,this.dragItem=z.getDragItem();let Q=z.eElement.getBoundingClientRect();this.dragInitialSourcePointerOffsetX=J.clientX-Q.left,this.dragInitialSourcePointerOffsetY=J.clientY-Q.top,z.onDragStarted?.(),this.createAndUpdateDragImageComp(z)}onDragStop(z){let{dragSource:J,lastDropTarget:Q}=this;if(J?.onDragStopped?.(),Q){let Z=this.dropTargetEvent(Q,z,!1);Q.onDragStop?.(Z)}this.clearDragAndDropProperties()}onDragCancel(){let{dragSource:z,lastDropTarget:J,lastMouseEvent:Q}=this;if(z?.onDragCancelled?.(),J&&Q){let Z=this.dropTargetEvent(J,Q,!1);J.onDragCancel?.(Z)}this.clearDragAndDropProperties()}onDragging(z,J=!1){this.positionDragImageComp(z);let Q=this.findCurrentDropTarget(z),{lastDropTarget:Z,dragSource:$,dragItem:X}=this,Y=!1;if(Q!==Z){if(Y=!0,Z){let U=this.dropTargetEvent(Z,z,J);Z.onDragLeave?.(U)}if(Z!==null&&!Q)this.handleExit($,X);else if(Z===null&&Q)this.handleEnter($,X);if(Q){let U=this.dropTargetEvent(Q,z,J);Q.onDragEnter?.(U)}this.lastDropTarget=Q}else if(Q){let U=this.dropTargetEvent(Q,z,J);if(Q.onDragging?.(U),U?.changed)Y=!0}if(this.lastMouseEvent=z,Y)this.updateDragImageComp()}clearDragAndDropProperties(){this.removeDragImageComp(this.dragImageComp),this.dragImageCompPromise=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0,this.lastMouseEvent=null,this.lastDraggingEvent=null,this.lastDropTarget=null,this.dragItem=null,this.dragInitialSourcePointerOffsetX=0,this.dragInitialSourcePointerOffsetY=0,this.dragSource=null}getAllContainersFromDropTarget(z){let J=z.getContainer(),Q=z.getSecondaryContainers?.(),Z=Q?.length;if(!Z)return[[J]];let $=Array(Z+1);$[0]=[J];for(let X=0;X<Z;++X)$[X+1]=Q[X];return $}isMouseOnDropTarget(z,J){let Q=this.getAllContainersFromDropTarget(J),Z=!1,$=(U,_)=>{for(let H of _){let{width:G,height:W,left:q,right:B,top:E,bottom:K}=H.getBoundingClientRect();if(G===0||W===0)return!1;let F=U.clientX>=q&&U.clientX<B,L=U.clientY>=E&&U.clientY<K;if(!F||!L)return!1}return!0};for(let U of Q)if($(z,U)){Z=!0;break}let{eElement:X,type:Y}=this.dragSource;if(J.targetContainsSource&&!J.getContainer().contains(X))return!1;return Z&&J.isInterestedIn(Y,X)}findCurrentDropTarget(z){let J=[],Q=this.dropTargets;for(let Y=0,U=Q.length;Y<U;++Y){let _=Q[Y];if(this.isMouseOnDropTarget(z,_))J.push(_)}let Z=J.length;if(Z===0)return null;if(Z===1)return J[0];let X=c0(this.beans).elementsFromPoint(z.clientX,z.clientY);for(let Y=0,U=X.length;Y<U;++Y){let _=X[Y];for(let H=0,G=J.length;H<G;H++){let W=J[H],q=this.getAllContainersFromDropTarget(W),B=!1;for(let E=0,K=q.length;E<K&&!B;E++){let F=q[E];for(let L=0,M=F.length;L<M;L++)if(F[L]===_){B=!0;break}}if(B)return W}}return null}addDropTarget(z){if(this.dropTargets.push(z),z.external)this.externalDropZoneCount++}removeDropTarget(z){let J=z.getContainer(),Q=this.dropTargets,Z=0;for(let $=0,X=Q.length;$<X;++$){let Y=Q[$];if(Y.getContainer()===J){if(Y.external)--this.externalDropZoneCount;continue}if(Z!==$)Q[Z]=Y;++Z}Q.length=Z}hasExternalDropZones(){return this.externalDropZoneCount>0}findExternalZone(z){let J=this.dropTargets;for(let Q=0,Z=J.length;Q<Z;++Q){let $=J[Q];if($.external&&$.getContainer()===z)return $}return null}dropTargetEvent(z,J,Q){let{dragSource:Z,dragItem:$,lastDraggingEvent:X,lastMouseEvent:Y,dragInitialSourcePointerOffsetX:U,dragInitialSourcePointerOffsetY:_}=this,H=z.getContainer(),G=H.getBoundingClientRect(),{clientX:W,clientY:q}=J,B=W-(Y?.clientX||0),E=q-(Y?.clientY||0),K=this.createEvent({event:J,x:W-G.left,y:q-G.top,vDirection:E>0?"down":E<0?"up":null,hDirection:B<0?"left":B>0?"right":null,initialSourcePointerOffsetX:U,initialSourcePointerOffsetY:_,dragSource:Z,fromNudge:Q,dragItem:$,dropZoneTarget:H,dropTarget:X?.dropTarget??null,changed:!!X?.changed});return this.lastDraggingEvent=K,K}positionDragImageComp(z){let J=this.dragImageComp?.getGui();if(J)BJ(J,z,this.beans)}removeDragImageComp(z){if(this.dragImageComp===z)this.dragImageComp=null;if(z)z.getGui()?.remove(),this.destroyBean(z)}createAndUpdateDragImageComp(z){let J=this.createDragImageComp(z)??null;this.dragImageCompPromise=J,J?.then((Q)=>{let Z=this.lastMouseEvent;if(J!==this.dragImageCompPromise||!Z||!this.isAlive()){this.destroyBean(Q);return}this.dragImageCompPromise=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0;let $=this.dragImageComp;if($!==Q)this.dragImageComp=Q,this.removeDragImageComp($);if(Q)this.appendDragImageComp(Q),this.updateDragImageComp(),this.positionDragImageComp(Z)})}appendDragImageComp(z){let J=z.getGui(),Q=J.style;if(Q.position="absolute",Q.zIndex="9999",this.beans.dragSvc?.hasPointerCapture())Q.pointerEvents="none";this.gos.setInstanceDomData(J),this.beans.environment.applyThemeClasses(J),Q.top="20px",Q.left="20px";let Z=Sz(this.beans);if(!Z)this.warnNoBody();else Z.appendChild(J)}updateDragImageComp(){let{dragImageComp:z,dragSource:J,lastDropTarget:Q,lastDraggingEvent:Z,dragImageLastLabel:$}=this;if(!z)return;this.setDragImageCompIcon(Q?.getIconName?.(Z)??null);let X=J?.dragItemName;if(typeof X==="function")X=X(Z);if(X||(X=""),$!==X)this.dragImageLastLabel=X,z.setLabel(X)}};function X$(z){return typeof z==="object"&&!!z.component}function DG(z){if(!z)return!1;return z.prototype&&"getGui"in z.prototype}function Y$(z,J,Q,Z){let{name:$}=Q,X,Y,U,_,H,G;if(J){let W=J,q=W[$+"Selector"],B=q?q(Z):null,E=(K)=>{if(typeof K==="string")X=K;else if(K!=null&&K!==!0)if(z.isFrameworkComponent(K))U=K;else Y=K};if(B)E(B.component),_=B.params,H=B.popup,G=B.popupPosition;else E(W[$])}return{compName:X,jsComp:Y,fwComp:U,paramsFromSelector:_,popupFromSelector:H,popupPositionFromSelector:G}}var RG=class extends j{constructor(){super(...arguments);this.beanName="userCompFactory"}wireBeans(z){this.agCompUtils=z.agCompUtils,this.registry=z.registry,this.frameworkCompWrapper=z.frameworkCompWrapper,this.gridOptions=z.gridOptions}getCompDetailsFromGridOptions(z,J,Q,Z=!1){return this.getCompDetails(this.gridOptions,z,J,Q,Z)}getCompDetails(z,J,Q,Z,$=!1){let{name:X,cellRenderer:Y}=J,{compName:U,jsComp:_,fwComp:H,paramsFromSelector:G,popupFromSelector:W,popupPositionFromSelector:q}=Y$(this.beans.frameworkOverrides,z,J,Z),B,E,K=(D)=>{let A=this.registry.getUserComponent(X,D);if(A)_=!A.componentFromFramework?A.component:void 0,H=A.componentFromFramework?A.component:void 0,B=A.params,E=A.processParams};if(U!=null)K(U);if(_==null&&H==null&&Q!=null)K(Q);if(_&&Y&&!DG(_))_=this.agCompUtils?.adaptFunction(J,_);if(!_&&!H){let{validation:D}=this.beans;if($&&(U!==Q||!Q))if(U){if(!D?.isProvidedUserComp(U))r(50,{compName:U})}else if(Q){if(!D)r(260,{...this.gos.getModuleErrorParams(),propName:X,compName:Q})}else r(216,{name:X});else if(Q&&!D)r(146,{comp:Q});return}let F=this.mergeParams(z,J,Z,G,B,E),L=_==null,M=_??H;return{componentFromFramework:L,componentClass:M,params:F,type:J,popupFromSelector:W,popupPositionFromSelector:q,newAgStackInstance:()=>this.newAgStackInstance(M,L,F,J)}}newAgStackInstance(z,J,Q,Z){let $=!J,X;if($)X=new z;else X=this.frameworkCompWrapper.wrap(z,Z.mandatoryMethods,Z.optionalMethods,Z);this.createBean(X);let Y=X.init?.(Q);if(Y==null)return b.resolve(X);return Y.then(()=>X)}mergeParams(z,J,Q,Z=null,$,X){let Y={...Q,...$},_=z?.[J.name+"Params"];if(typeof _==="function"){let H=_(Q);M0(Y,H)}else if(typeof _==="object")M0(Y,_);return M0(Y,Z),X?X(Y):Y}},AG={name:"dateComponent",mandatoryMethods:["getDate","setDate"],optionalMethods:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","refresh"]},jG={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"]},VG={name:"headerComponent",optionalMethods:["refresh"]},OG={name:"innerHeaderComponent"},PG={name:"innerHeaderGroupComponent"},TG={name:"headerGroupComponent"},SG={name:"innerRenderer",cellRenderer:!0,optionalMethods:["afterGuiAttached"]},IG={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0};var fG={name:"loadingCellRenderer",cellRenderer:!0},kG={name:"cellEditor",mandatoryMethods:["getValue"],optionalMethods:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},CG={name:"tooltipComponent"},lZ={name:"filter",mandatoryMethods:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethods:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},vG={name:"floatingFilterComponent",mandatoryMethods:["onParentModelChanged"],optionalMethods:["afterGuiAttached","refresh"]},NG={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},wG={name:"loadingCellRenderer",cellRenderer:!0},yG={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],cellRenderer:!0},xG={name:"detailCellRenderer",optionalMethods:["refresh"],cellRenderer:!0};function bG(z,J){return z.getCompDetailsFromGridOptions(jG,"agDragAndDropImage",J,!0)}function t2(z,J,Q){return z.getCompDetails(J,SG,void 0,Q)}function gG(z,J,Q){return z.getCompDetails(J,VG,"agColumnHeader",Q)}function hG(z,J,Q){return z.getCompDetails(J,OG,void 0,Q)}function uG(z,J){let Q=J.columnGroup.getColGroupDef();return z.getCompDetails(Q,TG,"agColumnGroupHeader",J)}function mG(z,J,Q){return z.getCompDetails(J,PG,void 0,Q)}function cG(z,J){return z.getCompDetailsFromGridOptions(NG,void 0,J,!0)}function pG(z,J){return z.getCompDetailsFromGridOptions(wG,"agLoadingCellRenderer",J,!0)}function iG(z,J){return z.getCompDetailsFromGridOptions(yG,"agGroupRowRenderer",J,!0)}function dG(z,J){return z.getCompDetailsFromGridOptions(xG,"agDetailCellRenderer",J,!0)}function Vz(z,J,Q){return z.getCompDetails(J,IG,void 0,Q)}function n7(z,J,Q){return z.getCompDetails(J,fG,"agSkeletonCellRenderer",Q,!0)}function U$(z,J,Q){return z.getCompDetails(J,kG,"agCellEditor",Q,!0)}function aZ(z,J,Q,Z){let $=J.filter;if(X$($))J={filter:$.component,filterParams:J.filterParams};return z.getCompDetails(J,lZ,Z,Q,!0)}function nG(z,J,Q){return z.getCompDetails(J,AG,"agDateInput",Q,!0)}function rG(z,J){return z.getCompDetails(J.colDef,CG,"agTooltipComponent",J,!0)}function oZ(z,J,Q,Z){return z.getCompDetails(J,vG,Z,Q)}function _$(z,J){return Y$(z,J,lZ)}function DQ(z,J,Q){return z.mergeParams(J,lZ,Q)}var K4=((z)=>{return z[z.ToolPanel=0]="ToolPanel",z[z.HeaderCell=1]="HeaderCell",z[z.RowDrag=2]="RowDrag",z[z.ChartPanel=3]="ChartPanel",z[z.AdvancedFilterBuilder=4]="AdvancedFilterBuilder",z})(K4||{}),tG=class extends MG{createEvent(z){return v(this.gos,z)}createDragImageComp(z){let{gos:J,beans:Q}=this;return bG(Q.userCompFactory,v(J,{dragSource:z}))?.newAgStackInstance()}handleEnter(z,J){z?.onGridEnter?.(J)}handleExit(z,J){z?.onGridExit?.(J)}warnNoBody(){V(54)}isDropZoneWithinThisGrid(z){return this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody.contains(z.dropZoneTarget)}registerGridDropTarget(z,J){let Q={getContainer:z,isInterestedIn:(Z)=>Z===1||Z===0,getIconName:()=>"notAllowed"};this.addDropTarget(Q),J.addDestroyFunc(()=>this.removeDropTarget(Q))}};function H$(z){return!!z.operator}var G$="ag-resizer-wrapper",Gz=(z,J)=>({tag:"div",ref:`${z}Resizer`,cls:`ag-resizer ag-resizer-${J}`}),sG={tag:"div",cls:G$,children:[Gz("eTopLeft","topLeft"),Gz("eTop","top"),Gz("eTopRight","topRight"),Gz("eRight","right"),Gz("eBottomRight","bottomRight"),Gz("eBottom","bottom"),Gz("eBottomLeft","bottomLeft"),Gz("eLeft","left")]},eZ=class extends R0{constructor(z,J){super();this.element=z,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,...J}}wireBeans(z){this.popupSvc=z.popupSvc,this.dragSvc=z.dragSvc}center(z){let{clientHeight:J,clientWidth:Q}=this.offsetParent,Z=Q/2-this.getWidth()/2,$=J/2-this.getHeight()/2;this.offsetElement(Z,$,z)}initialisePosition(z){if(this.positioned)return;let{centered:J,forcePopupParentAsOffsetParent:Q,minWidth:Z,width:$,minHeight:X,height:Y,x:U,y:_}=this.config;if(!this.offsetParent)this.setOffsetParent();let H=0,G=0,W=B0(this.element);if(W){let q=this.findBoundaryElement(),B=window.getComputedStyle(q);if(B.minWidth!=null){let E=q.offsetWidth-this.element.offsetWidth;G=Number.parseInt(B.minWidth,10)-E}if(B.minHeight!=null){let E=q.offsetHeight-this.element.offsetHeight;H=Number.parseInt(B.minHeight,10)-E}}if(this.minHeight=X||H,this.minWidth=Z||G,$)this.setWidth($);if(Y)this.setHeight(Y);if(!$||!Y)this.refreshSize();if(J)this.center(z);else if(U||_)this.offsetElement(U,_,z);else if(W&&Q){let q=this.boundaryEl,B=!0;if(!q)q=this.findBoundaryElement(),B=!1;if(q){let E=Number.parseFloat(q.style.top),K=Number.parseFloat(q.style.left);if(B)this.offsetElement(Number.isNaN(K)?0:K,Number.isNaN(E)?0:E,z);else this.setPosition(K,E)}}this.positioned=!!this.offsetParent}isPositioned(){return this.positioned}getPosition(){return this.position}setMovable(z,J){if(!this.config.popup||z===this.movable)return;this.movable=z;let Q=this.moveElementDragListener||{eElement:J,onDragStart:this.onMoveStart.bind(this),onDragging:this.onMove.bind(this),onDragStop:this.onMoveEnd.bind(this)};if(z)this.dragSvc?.addDragSource(Q),this.moveElementDragListener=Q;else this.dragSvc?.removeDragSource(Q),this.moveElementDragListener=void 0}setResizable(z){if(this.clearResizeListeners(),z)this.addResizers();else this.removeResizers();if(typeof z==="boolean"){if(z===!1)return;z={topLeft:z,top:z,topRight:z,right:z,bottomRight:z,bottom:z,bottomLeft:z,left:z}}for(let J of Object.keys(z)){let Q=!!z[J],Z=this.getResizerElement(J),$={dragStartPixels:0,eElement:Z,onDragStart:(X)=>this.onResizeStart(X,J),onDragging:this.onResize.bind(this),onDragStop:(X)=>this.onResizeEnd(X,J)};if(Q||!this.isAlive()&&!Q){if(Q)this.dragSvc?.addDragSource($),this.resizeListeners.push($),Z.style.pointerEvents="all";else Z.style.pointerEvents="none";this.resizable[J]=Q}}}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:z,width:J}=this.lastSize;if(J!==-1)this.element.style.width=`${J}px`;if(z!==-1)this.element.style.height=`${z}px`}getHeight(){return this.element.offsetHeight}setHeight(z){let{popup:J}=this.config,Q=this.element,Z=!1;if(typeof z==="string"&&z.includes("%"))R2(Q,z),z=E9(Q),Z=!0;else if(z=Math.max(this.minHeight,z),this.positioned){let $=this.getAvailableHeight();if($&&z>$)z=$}if(this.getHeight()===z)return;if(Z)Q.style.maxHeight="unset",Q.style.minHeight="unset";else if(J)R2(Q,z);else Q.style.height=`${z}px`,Q.style.flex="0 0 auto",this.lastSize.height=typeof z==="number"?z:Number.parseFloat(z)}getAvailableHeight(){let{popup:z,forcePopupParentAsOffsetParent:J}=this.config;if(!this.positioned)this.initialisePosition();let{clientHeight:Q}=this.offsetParent;if(!Q)return null;let Z=this.element.getBoundingClientRect(),$=this.offsetParent.getBoundingClientRect(),X=z?this.position.y:Z.top,Y=z?0:$.top,U=0;if(J){let H=this.element.parentElement;if(H){let{bottom:G}=H.getBoundingClientRect();U=G-Z.bottom}}return Q+Y-X-U}getWidth(){return this.element.offsetWidth}setWidth(z){let J=this.element,{popup:Q}=this.config,Z=!1;if(typeof z==="string"&&z.includes("%"))h4(J,z),z=u6(J),Z=!0;else if(this.positioned){z=Math.max(this.minWidth,z);let{clientWidth:$}=this.offsetParent,X=Q?this.position.x:this.element.getBoundingClientRect().left;if($&&z+X>$)z=$-X}if(this.getWidth()===z)return;if(Z)J.style.maxWidth="unset",J.style.minWidth="unset";else if(this.config.popup)h4(J,z);else J.style.width=`${z}px`,J.style.flex=" unset",this.lastSize.width=typeof z==="number"?z:Number.parseFloat(z)}offsetElement(z=0,J=0,Q){let{forcePopupParentAsOffsetParent:Z}=this.config,$=Z?this.boundaryEl:this.element;if(!$)return;this.popupSvc?.positionPopup({ePopup:$,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:()=>({x:z,y:J}),postProcessCallback:Q}),this.setPosition(Number.parseFloat($.style.left),Number.parseFloat($.style.top))}constrainSizeToAvailableHeight(z){if(!this.config.forcePopupParentAsOffsetParent)return;let J=()=>{let Q=this.getAvailableHeight();this.element.style.setProperty("max-height",`${Q}px`)};if(z&&this.popupSvc)this.resizeObserverSubscriber?.(),this.resizeObserverSubscriber=S4(this.beans,this.popupSvc?.getPopupParent(),J);else if(this.element.style.removeProperty("max-height"),this.resizeObserverSubscriber)this.resizeObserverSubscriber(),this.resizeObserverSubscriber=void 0}setPosition(z,J){this.position.x=z,this.position.y=J}updateDragStartPosition(z,J){this.dragStartPosition={x:z,y:J}}calculateMouseMovement(z){let{e:J,isLeft:Q,isTop:Z,anywhereWithin:$,topBuffer:X}=z,Y=J.clientX-this.dragStartPosition.x,U=J.clientY-this.dragStartPosition.y,_=this.shouldSkipX(J,!!Q,!!$,Y)?0:Y,H=this.shouldSkipY(J,!!Z,X,U)?0:U;return{movementX:_,movementY:H}}shouldSkipX(z,J,Q,Z){let $=this.element.getBoundingClientRect(),X=this.offsetParent.getBoundingClientRect(),Y=this.boundaryEl.getBoundingClientRect(),U=this.config.popup?this.position.x:$.left,_=U<=0&&X.left>=z.clientX||X.right<=z.clientX&&X.right<=Y.right;if(_)return!0;if(J)_=Z<0&&z.clientX>U+X.left||Z>0&&z.clientX<U+X.left;else if(Q)_=Z<0&&z.clientX>Y.right||Z>0&&z.clientX<U+X.left;else _=Z<0&&z.clientX>Y.right||Z>0&&z.clientX<Y.right;return _}shouldSkipY(z,J,Q=0,Z){let $=this.element.getBoundingClientRect(),X=this.offsetParent.getBoundingClientRect(),Y=this.boundaryEl.getBoundingClientRect(),U=this.config.popup?this.position.y:$.top,_=U<=0&&X.top>=z.clientY||X.bottom<=z.clientY&&X.bottom<=Y.bottom;if(_)return!0;if(J)_=Z<0&&z.clientY>U+X.top+Q||Z>0&&z.clientY<U+X.top;else _=Z<0&&z.clientY>Y.bottom||Z>0&&z.clientY<Y.bottom;return _}createResizeMap(){let z=(J)=>({element:this.element.querySelector(`[data-ref=${J}Resizer]`)});this.resizerMap={topLeft:z("eTopLeft"),top:z("eTop"),topRight:z("eTopRight"),right:z("eRight"),bottomRight:z("eBottomRight"),bottom:z("eBottom"),bottomLeft:z("eBottomLeft"),left:z("eLeft")}}addResizers(){if(this.resizersAdded)return;let z=this.element;if(!z)return;z.appendChild(W0(sG)),this.createResizeMap(),this.resizersAdded=!0}removeResizers(){this.resizerMap=void 0,this.element.querySelector(`.${G$}`)?.remove(),this.resizersAdded=!1}getResizerElement(z){return this.resizerMap[z].element}onResizeStart(z,J){if(this.boundaryEl=this.findBoundaryElement(),!this.positioned)this.initialisePosition();this.currentResizer={isTop:!!J.match(/top/i),isRight:!!J.match(/right/i),isBottom:!!J.match(/bottom/i),isLeft:!!J.match(/left/i)},this.element.classList.add("ag-resizing"),this.resizerMap[J].element.classList.add("ag-active");let{popup:Q,forcePopupParentAsOffsetParent:Z}=this.config;if(!Q&&!Z)this.applySizeToSiblings(this.currentResizer.isBottom||this.currentResizer.isTop);this.isResizing=!0,this.updateDragStartPosition(z.clientX,z.clientY)}getSiblings(){let J=this.element.parentElement;if(!J)return null;return Array.prototype.slice.call(J.children).filter((Q)=>!Q.classList.contains("ag-hidden"))}getMinSizeOfSiblings(){let z=this.getSiblings()||[],J=0,Q=0;for(let Z of z){let $=!!Z.style.flex&&Z.style.flex!=="0 0 auto";if(Z===this.element)continue;let X=this.minHeight||0,Y=this.minWidth||0;if($){let U=window.getComputedStyle(Z);if(U.minHeight)X=Number.parseInt(U.minHeight,10);if(U.minWidth)Y=Number.parseInt(U.minWidth,10)}else X=Z.offsetHeight,Y=Z.offsetWidth;J+=X,Q+=Y}return{height:J,width:Q}}applySizeToSiblings(z){let J=null,Q=this.getSiblings();if(!Q)return;for(let Z=0;Z<Q.length;Z++){let $=Q[Z];if($===J)continue;if(z)$.style.height=`${$.offsetHeight}px`;else $.style.width=`${$.offsetWidth}px`;if($.style.flex="0 0 auto",$===this.element)J=Q[Z+1]}if(J)J.style.removeProperty("height"),J.style.removeProperty("min-height"),J.style.removeProperty("max-height"),J.style.flex="1 1 auto"}isResizable(){return Object.values(this.resizable).some((z)=>z)}onResize(z){if(!this.isResizing||!this.currentResizer)return;let{popup:J,forcePopupParentAsOffsetParent:Q}=this.config,{isTop:Z,isRight:$,isBottom:X,isLeft:Y}=this.currentResizer,U=$||Y,_=X||Z,{movementX:H,movementY:G}=this.calculateMouseMovement({e:z,isLeft:Y,isTop:Z}),W=this.position.x,q=this.position.y,B=0,E=0;if(U&&H){let K=Y?-1:1,F=this.getWidth(),L=F+H*K,M=!1;if(Y){if(B=F-L,W+B<=0||L<=this.minWidth)M=!0,B=0}if(!M)this.setWidth(L)}if(_&&G){let K=Z?-1:1,F=this.getHeight(),L=F+G*K,M=!1;if(Z){if(E=F-L,q+E<=0||L<=this.minHeight)M=!0,E=0}else if(!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&F<L&&this.getMinSizeOfSiblings().height+L>this.element.parentElement.offsetHeight)M=!0;if(!M)this.setHeight(L)}if(this.updateDragStartPosition(z.clientX,z.clientY),(J||Q)&&B||E)this.offsetElement(W+B,q+E)}onResizeEnd(z,J){this.isResizing=!1,this.currentResizer=null,this.boundaryEl=null,this.element.classList.remove("ag-resizing"),this.resizerMap[J].element.classList.remove("ag-active"),this.dispatchLocalEvent({type:"resize"})}refreshSize(){let z=this.element;if(this.config.popup){if(!this.config.width)this.setWidth(z.offsetWidth);if(!this.config.height)this.setHeight(z.offsetHeight)}}onMoveStart(z){if(this.boundaryEl=this.findBoundaryElement(),!this.positioned)this.initialisePosition();this.isMoving=!0,this.element.classList.add("ag-moving"),this.updateDragStartPosition(z.clientX,z.clientY)}onMove(z){if(!this.isMoving)return;let{x:J,y:Q}=this.position,Z;if(this.config.calculateTopBuffer)Z=this.config.calculateTopBuffer();let{movementX:$,movementY:X}=this.calculateMouseMovement({e:z,isTop:!0,anywhereWithin:!0,topBuffer:Z});this.offsetElement(J+$,Q+X),this.updateDragStartPosition(z.clientX,z.clientY)}onMoveEnd(){this.isMoving=!1,this.boundaryEl=null,this.element.classList.remove("ag-moving")}setOffsetParent(){if(this.config.forcePopupParentAsOffsetParent&&this.popupSvc)this.offsetParent=this.popupSvc.getPopupParent();else this.offsetParent=this.element.offsetParent}findBoundaryElement(){let z=this.element;while(z){if(window.getComputedStyle(z).position!=="static")return z;z=z.parentElement}return this.element}clearResizeListeners(){while(this.resizeListeners.length){let z=this.resizeListeners.pop();this.dragSvc?.removeDragSource(z)}}destroy(){if(super.destroy(),this.moveElementDragListener)this.dragSvc?.removeDragSource(this.moveElementDragListener);this.constrainSizeToAvailableHeight(!1),this.clearResizeListeners(),this.removeResizers()}},s2=class extends eZ{},P=null;function u1(z){return typeof z?.getGui==="function"}var W$=class{constructor(z){this.cssClassStates={},this.getGui=z}toggleCss(z,J){if(!z)return;if(z.includes(" ")){let Z=(z||"").split(" ");if(Z.length>1){for(let $ of Z)this.toggleCss($,J);return}}if(this.cssClassStates[z]!==J&&z.length)this.getGui()?.classList.toggle(z,J),this.cssClassStates[z]=J}},lG=0,v0=class extends R0{constructor(z,J){super();if(this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=lG++,this.cssManager=new W$(()=>this.eGui),this.componentSelectors=new Map((J??[]).map((Q)=>[Q.selector,Q])),z)this.setTemplate(z)}preConstruct(){this.wireTemplate(this.getGui()),this.addGlobalCss()}wireTemplate(z,J){if(z&&this.gos)this.applyElementsToComponent(z),this.createChildComponentsFromTags(z,J)}getCompId(){return this.compId}getDataRefAttribute(z){if(z.getAttribute)return z.getAttribute(R9);return null}applyElementsToComponent(z,J,Q,Z=null){if(J===void 0)J=this.getDataRefAttribute(z);if(J){let $=this[J];if($===P)this[J]=Z??z;else{let X=Q?.[J];if(!this.suppressDataRefValidation&&!X)throw Error(`data-ref: ${J} on ${this.constructor.name} with ${$}`)}}}createChildComponentsFromTags(z,J){let Q=[];for(let Z of z.childNodes??[])Q.push(Z);for(let Z of Q){if(!(Z instanceof HTMLElement))continue;let $=this.createComponentFromElement(Z,(X)=>{let Y=X.getGui();if(Y)for(let U of Z.attributes??[])Y.setAttribute(U.name,U.value)},J);if($){if($.addItems&&Z.children.length){this.createChildComponentsFromTags(Z,J);let X=Array.prototype.slice.call(Z.children);$.addItems(X)}this.swapComponentForNode($,z,Z)}else if(Z.childNodes)this.createChildComponentsFromTags(Z,J)}}createComponentFromElement(z,J,Q){let Z=z.nodeName,$=this.getDataRefAttribute(z),X=Z.indexOf("AG-")===0,Y=X?this.componentSelectors.get(Z):null,U=null;if(Y){let _=Q&&$?Q[$]:void 0;U=new Y.component(_),U.setParentComponent(this),this.createBean(U,null,J)}else if(X)throw Error(`selector: ${Z}`);return this.applyElementsToComponent(z,$,Q,U),U}swapComponentForNode(z,J,Q){let Z=z.getGui();J.replaceChild(Z,Q),J.insertBefore(document.createComment(Q.nodeName),Z),this.addDestroyFunc(this.destroyBean.bind(this,z))}activateTabIndex(z,J){let Q=J??this.gos.get("tabIndex");if(!z)z=[];if(!z.length)z.push(this.getGui());for(let Z of z)Z.setAttribute("tabindex",Q.toString())}setTemplate(z,J,Q){let Z;if(typeof z==="string"||z==null)Z=NZ(z);else Z=W0(z);this.setTemplateFromElement(Z,J,Q)}setTemplateFromElement(z,J,Q,Z=!1){if(this.eGui=z,this.suppressDataRefValidation=Z,J)for(let $=0;$<J.length;$++){let X=J[$];this.componentSelectors.set(X.selector,X)}this.wireTemplate(z,Q)}getGui(){return this.eGui}getFocusableElement(){return this.eGui}getAriaElement(){return this.getFocusableElement()}setParentComponent(z){this.parentComponent=z}getParentComponent(){return this.parentComponent}setGui(z){this.eGui=z}queryForHtmlElement(z){return this.eGui.querySelector(z)}getContainerAndElement(z,J){let Q=J;if(z==null)return null;if(!Q)Q=this.eGui;if(p2(z))return{element:z,parent:Q};return{element:z.getGui(),parent:Q}}prependChild(z,J){let{element:Q,parent:Z}=this.getContainerAndElement(z,J)||{};if(!Q||!Z)return;Z.prepend(Q)}appendChild(z,J){let{element:Q,parent:Z}=this.getContainerAndElement(z,J)||{};if(!Q||!Z)return;Z.appendChild(Q)}isDisplayed(){return this.displayed}setVisible(z,J={}){if(z!==this.visible){this.visible=z;let{skipAriaHidden:Q}=J;_H(this.eGui,z,{skipAriaHidden:Q})}}setDisplayed(z,J={}){if(z!==this.displayed){this.displayed=z;let{skipAriaHidden:Q}=J;x(this.eGui,z,{skipAriaHidden:Q});let Z={type:"displayChanged",visible:this.displayed};this.dispatchLocalEvent(Z)}}destroy(){if(this.parentComponent)this.parentComponent=void 0;super.destroy()}addGuiEventListener(z,J,Q){this.eGui.addEventListener(z,J,Q),this.addDestroyFunc(()=>this.eGui.removeEventListener(z,J))}addCss(z){this.cssManager.toggleCss(z,!0)}removeCss(z){this.cssManager.toggleCss(z,!1)}toggleCss(z,J){this.cssManager.toggleCss(z,J)}registerCSS(z){if(this.css===r7)this.css=[z],this.addGlobalCss();else this.css||(this.css=[]),this.css.push(z)}addGlobalCss(){if(Array.isArray(this.css)){let z="component-"+Object.getPrototypeOf(this)?.constructor?.name;for(let J of this.css??[])this.beans.environment.addGlobalCSS(J,z)}this.css=r7}},r7=Symbol(),y=class extends v0{},RQ,AQ,jQ,VQ,$Z,XZ,OQ;function fz(){if(RQ===void 0)RQ=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);return RQ}function Q1(){if(AQ===void 0)AQ=/(firefox)/i.test(navigator.userAgent);return AQ}function q$(){if(jQ===void 0)jQ=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform);return jQ}function zz(){if(VQ===void 0)VQ=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1;return VQ}function YZ(z){if(!z)return null;let J=z.tabIndex,Q=z.getAttribute("tabIndex");if(J===-1&&(Q===null||Q===""&&!Q1()))return null;return J.toString()}function aG(){if(OQ!==void 0)return OQ;if(!document.body)return-1;let z=1e6,J=Q1()?6000000:1e9,Q=document.createElement("div");document.body.appendChild(Q);while(!0){let Z=z*2;if(Q.style.height=Z+"px",Z>J||Q.clientHeight!==Z)break;else z=Z}return Q.remove(),OQ=z,z}function z5(){if(XZ==null)B$();return XZ}function B$(){let z=document.body,J=document.createElement("div");J.style.width=J.style.height="100px",J.style.opacity="0",J.style.overflow="scroll",J.style.msOverflowStyle="scrollbar",J.style.position="absolute",z.appendChild(J);let Q=J.offsetWidth-J.clientWidth;if(Q===0&&J.clientWidth===0)Q=null;if(J.parentNode)J.remove();if(Q!=null)XZ=Q,$Z=Q===0}function E$(){if($Z==null)B$();return $Z}var UZ=!1,t6=0;function oG(z){if(t6>0)return;z.addEventListener("keydown",s6),z.addEventListener("mousedown",s6)}function eG(z){if(t6>0)return;z.removeEventListener("keydown",s6),z.removeEventListener("mousedown",s6)}function s6(z){let J=UZ,Q=z.type==="keydown";if(Q){if(z.ctrlKey||z.metaKey||z.altKey)return}if(J===Q)return;UZ=Q}function zW(z){let J=Y0(z);return oG(J),t6++,()=>{t6--,eG(J)}}function l1(){return UZ}function O4(z,J,Q=!1){let Z=UH,$=B9;if(J)$+=", "+J;if(Q)$+=', [tabindex="-1"]';let X=Array.prototype.slice.apply(z.querySelectorAll(Z)).filter((_)=>{return B0(_)}),Y=Array.prototype.slice.apply(z.querySelectorAll($));if(!Y.length)return X;return((_,H)=>_.filter((G)=>H.indexOf(G)===-1))(X,Y)}function E0(z,J=!1,Q=!1,Z=!1){let $=O4(z,Z?".ag-tab-guard":null,Q),X=J?N($):$[0];if(X)return X.focus({preventScroll:!0}),!0;return!1}function I0(z,J,Q,Z){let $=O4(J,Q?':not([tabindex="-1"])':null),X=d(z),Y;if(Q)Y=$.findIndex((_)=>_.contains(X));else Y=$.indexOf(X);let U=Y+(Z?-1:1);if(U<0||U>=$.length)return null;return $[U]}function jJ(z,J=5){let Q=0;while(z&&YZ(z)===null&&++Q<=J)z=z.parentElement;if(YZ(z)===null)return null;return z}var J5="ag-focus-managed",K$=class extends R0{constructor(z,J={isStopPropagation:()=>!1,stopPropagation:()=>{}},Q={}){super();this.eFocusable=z,this.stopPropagationCallbacks=J,this.callbacks=Q,this.callbacks={shouldStopEventPropagation:()=>!1,onTabKeyDown:(Z)=>{if(Z.defaultPrevented)return;let $=I0(this.beans,this.eFocusable,!1,Z.shiftKey);if(!$)return;$.focus(),Z.preventDefault()},...Q}}postConstruct(){let{eFocusable:z,callbacks:{onFocusIn:J,onFocusOut:Q}}=this;if(z.classList.add(J5),this.addKeyDownListeners(z),J)this.addManagedElementListeners(z,{focusin:J});if(Q)this.addManagedElementListeners(z,{focusout:Q})}addKeyDownListeners(z){this.addManagedElementListeners(z,{keydown:(J)=>{if(J.defaultPrevented||this.stopPropagationCallbacks.isStopPropagation(J))return;let{callbacks:Q}=this;if(Q.shouldStopEventPropagation(J)){this.stopPropagationCallbacks.stopPropagation(J);return}if(J.key===R.TAB)Q.onTabKeyDown(J);else if(Q.handleKeyDown)Q.handleKeyDown(J)}})}},F$="__ag_Grid_Stop_Propagation";function a0(z){z[F$]=!0}function _4(z){return z[F$]===!0}var kz={isStopPropagation:_4,stopPropagation:a0},$z=class extends K${constructor(z,J){super(z,kz,J)}},JW={applyFilter:"Apply",clearFilter:"Clear",resetFilter:"Reset",cancelFilter:"Cancel",textFilter:"Text Filter",numberFilter:"Number Filter",bigintFilter:"BigInt Filter",dateFilter:"Date Filter",setFilter:"Set Filter",filterOoo:"Filter...",empty:"Choose one",equals:"Equals",notEqual:"Does not equal",lessThan:"Less than",greaterThan:"Greater than",inRange:"Between",inRangeStart:"From",inRangeEnd:"To",lessThanOrEqual:"Less than or equal to",greaterThanOrEqual:"Greater than or equal to",contains:"Contains",notContains:"Does not contain",startsWith:"Begins with",endsWith:"Ends with",blank:"Blank",notBlank:"Not blank",before:"Before",after:"After",andCondition:"AND",orCondition:"OR",dateFormatOoo:"yyyy-mm-dd",filterSummaryInactive:"is (All)",filterSummaryContains:"contains",filterSummaryNotContains:"does not contain",filterSummaryTextEquals:"equals",filterSummaryTextNotEqual:"does not equal",filterSummaryStartsWith:"begins with",filterSummaryEndsWith:"ends with",filterSummaryBlank:"is blank",filterSummaryNotBlank:"is not blank",filterSummaryEquals:"=",filterSummaryNotEqual:"!=",filterSummaryGreaterThan:">",filterSummaryGreaterThanOrEqual:">=",filterSummaryLessThan:"<",filterSummaryLessThanOrEqual:"<=",filterSummaryInRange:"between",yesterday:"Yesterday",today:"Today",tomorrow:"Tomorrow",last7Days:"Last 7 Days",lastWeek:"Last Week",thisWeek:"This Week",nextWeek:"Next Week",last30Days:"Last 30 Days",lastMonth:"Last Month",thisMonth:"This Month",nextMonth:"Next Month",last90Days:"Last 90 Days",lastQuarter:"Last Quarter",thisQuarter:"This Quarter",nextQuarter:"Next Quarter",lastYear:"Last Year",thisYear:"This Year",yearToDate:"Year To Date",nextYear:"Next Year",last6Months:"Last 6 Months",last12Months:"Last 12 Months",last24Months:"Last 24 Months",filterSummaryInRangeValues:(z)=>`(${z[0]}, ${z[1]})`,filterSummaryTextQuote:(z)=>`"${z[0]}"`,minDateValidation:(z)=>`Date must be after ${z[0]}`,maxDateValidation:(z)=>`Date must be before ${z[0]}`,strictMinValueValidation:(z)=>`Must be greater than ${z[0]}`,strictMaxValueValidation:(z)=>`Must be less than ${z[0]}`};function A4(z,J,Q){return xZ(z,JW,J,Q)}function Q5(z,J){let{debounceMs:Q}=z;if(a1(z)){if(Q!=null)V(71);return 0}return Q??J}function a1(z){return(z.buttons?.indexOf("apply")??-1)>=0}function L$(z,J,Q,Z){let $=A4(z,Q);if(typeof J==="function"){let X=A4(z,Z);$=J({filterOptionKey:Z,filterOption:X,placeholder:$})}else if(typeof J==="string")$=J;return $}var _1=class extends y{constructor(z,J){super();this.filterNameKey=z,this.cssIdentifier=J,this.applyActive=!1,this.debouncePending=!1,this.defaultDebounceMs=0}postConstruct(){let z={tag:"div",cls:`ag-filter-body-wrapper ag-${this.cssIdentifier}-body-wrapper`,children:[this.createBodyTemplate()]};this.setTemplate(z,this.getAgComponents()),this.createManagedBean(new $z(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=this.createBean(new s2(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}))}handleKeyDown(z){}init(z){let J=z;this.setParams(J),this.setModelIntoUi(J.state.model,!0).then(()=>this.updateUiVisibility())}areStatesEqual(z,J){return z===J}refresh(z){let J=z,Q=this.params;this.params=J;let{source:Z,state:$,additionalEventAttributes:X}=J;if(Z==="colDef")this.updateParams(J,Q);let Y=this.state;this.state=$;let U=X?.fromAction;if(U&&U!=="apply"||$.model!==Y.model||!this.areStatesEqual($.state,Y.state))this.setModelIntoUi($.model);return!0}setParams(z){this.params=z,this.state=z.state,this.commonUpdateParams(z)}updateParams(z,J){this.commonUpdateParams(z,J)}commonUpdateParams(z,J){this.applyActive=a1(z),this.setupApplyDebounced()}doesFilterPass(z){V(283);let{getHandler:J,model:Q,column:Z}=this.params;return J().doesFilterPass({...z,model:Q,handlerParams:this.beans.colFilter.getHandlerParams(Z)})}getFilterTitle(){return this.translate(this.filterNameKey)}isFilterActive(){return V(284),this.params.model!=null}setupApplyDebounced(){let z=Q5(this.params,this.defaultDebounceMs),J=i0(this,this.checkApplyDebounce.bind(this),z);this.applyDebounced=()=>{this.debouncePending=!0,J()}}checkApplyDebounce(){if(this.debouncePending)this.debouncePending=!1,this.doApplyModel()}getModel(){return V(285),this.params.model}setModel(z){V(286);let{beans:J,params:Q}=this;return J.colFilter.setModelForColumnLegacy(Q.column,z)}applyModel(z="api"){return this.doApplyModel()}canApply(z){return!0}doApplyModel(z){let{params:J,state:{valid:Q=!0,model:Z}}=this;if(!Q)return!1;let $=!this.areModelsEqual(J.model,Z);if($)J.onAction("apply",z);return $}onNewRowsLoaded(){}onUiChanged(z,J=!1){this.updateUiVisibility();let Q=this.getModelFromUi(),Z={model:Q,state:this.getState(),valid:this.canApply(Q)};this.state=Z;let{params:$,gos:X,eventSvc:Y,applyActive:U}=this;if($.onStateChange(Z),$.onUiChange(this.getUiChangeEventParams()),!X.get("enableFilterHandlers"))Y.dispatchEvent({type:"filterModified",column:$.column,filterInstance:this});if(!Z.valid)return;if(z??(z=U?void 0:"debounce"),z==="immediately")this.doApplyModel({afterFloatingFilter:J,afterDataChange:!1});else if(z==="debounce")this.applyDebounced()}getState(){return}getUiChangeEventParams(){return}afterGuiAttached(z){this.lastContainerType=z?.container,this.refreshFilterResizer(z?.container)}refreshFilterResizer(z){let{positionableFeature:J,gos:Q}=this;if(!J)return;let Z=z==="floatingFilter"||z==="columnFilter";if(Z)J.restoreLastSize(),J.setResizable(Q.get("enableRtl")?{bottom:!0,bottomLeft:!0,left:!0}:{bottom:!0,bottomRight:!0,right:!0});else J.removeSizeFromEl(),J.setResizable(!1);J.constrainSizeToAvailableHeight(Z)}afterGuiDetached(){this.checkApplyDebounce(),this.positionableFeature?.constrainSizeToAvailableHeight(!1)}destroy(){this.positionableFeature=this.destroyBean(this.positionableFeature),super.destroy()}translate(z,J){return A4(this,z,J)}getPositionableElement(){return this.getGui()}areModelsEqual(z,J){if(z===J||z==null&&J==null)return!0;if(z==null||J==null)return!1;return this.areNonNullModelsEqual(z,J)}};var Z5=class extends v0{isPopup(){return!0}setParentComponent(z){z.addCss("ag-has-popup"),super.setParentComponent(z)}destroy(){let z=this.parentComponent;if(z?.isAlive())z.getGui().classList.remove("ag-has-popup");super.destroy()}},QW=class extends Z5{constructor(){super(...arguments);this.errorMessages=null}init(z){this.params=z,this.initialiseEditor(z),this.eEditor.onValueChange(()=>z.validate())}destroy(){this.eEditor.destroy(),this.errorMessages=null,super.destroy()}};function $5(z){let J=z.rowModel;return J.getType()==="clientSide"?J:void 0}var t7="row-group-",ZW="t-",$W="b-",XW=0,Cz=class{constructor(z){this.id=void 0,this.destroyed=!1,this._groupData=void 0,this.master=!1,this.detail=void 0,this.rowIndex=null,this.field=null,this.rowGroupColumn=null,this.key=null,this.sourceRowIndex=-1,this._leafs=void 0,this.childrenAfterGroup=null,this.childrenAfterFilter=null,this.childrenAfterAggFilter=null,this.childrenAfterSort=null,this.allChildrenCount=null,this.childrenMapped=null,this.treeParent=null,this.treeNodeFlags=0,this._expanded=void 0,this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=XW++,this.alreadyRendered=!1,this.formulaRowIndex=null,this.hovered=!1,this.__selected=!1,this.beans=z}get groupData(){let z=this._groupData;if(z!==void 0)return z;if(this.footer)return this.sibling?.groupData;return this.beans.groupStage?.loadGroupData(this)??null}set groupData(z){this._groupData=z}get primaryRow(){let z=this.footer&&this.sibling||this;if(z.rowPinned){let J=z.pinnedSibling;if(J){if(z=J,z.footer)z=z.sibling??z}}return z}get allLeafChildren(){let z=this._leafs;return z===void 0?this.beans.groupStage?.loadLeafs?.(this)??null:z}set allLeafChildren(z){this._leafs=z}get expanded(){let z=this.beans.expansionSvc;return z?z.isExpanded(this):this.level===-1?!0:!!this._expanded}set expanded(z){this._expanded=z}setData(z){this.setDataCommon(z,"set")}updateData(z){this.setDataCommon(z,"update")}_updateDataNoSibling(z){this.setDataCommon(z,"updateNoSibling")}setDataCommon(z,J){let{valueCache:Q,eventSvc:Z}=this.beans,$=this.data,X=J!=="set";this.data=z,Q?.onDataChanged(),this.updateDataOnDetailNode(),this.resetQuickFilterAggregateText();let Y=this.createDataChangedEvent(z,$,X);if(this.__localEventService?.dispatchEvent(Y),J!=="updateNoSibling"){let _=this.sibling;if(_){_.data=z;let H=_.createDataChangedEvent(z,$,X);_.__localEventService?.dispatchEvent(H)}}Z.dispatchEvent({type:"rowNodeDataChanged",node:this});let U=this.pinnedSibling;if(U)U.data=z,U.__localEventService?.dispatchEvent(U.createDataChangedEvent(z,$,X)),Z.dispatchEvent({type:"rowNodeDataChanged",node:U})}updateDataOnDetailNode(){let z=this.detailNode;if(z)z.data=this.data}createDataChangedEvent(z,J,Q){return{type:"dataChanged",node:this,oldData:J,newData:z,update:Q}}getRowIndexString(){if(this.rowIndex==null)return r(13),null;if(this.rowPinned==="top")return ZW+this.rowIndex;if(this.rowPinned==="bottom")return $W+this.rowIndex;return this.rowIndex.toString()}setDataAndId(z,J){let{selectionSvc:Q}=this.beans,Z=Q?.createDaemonNode?.(this),$=this.data;if(this.data=z,this.updateDataOnDetailNode(),this.setId(J),Q)Q.updateRowSelectable(this),Q.syncInRowNode(this,Z);let X=this.createDataChangedEvent(z,$,!1);this.__localEventService?.dispatchEvent(X)}setId(z){let J=zZ(this.beans.gos);if(J)if(this.data){let Q=this.parent?.getRoute()??[];if(this.id=J({data:this.data,parentKeys:Q.length>0?Q:void 0,level:this.level,rowPinned:this.rowPinned}),this.id.startsWith(t7))r(14,{groupPrefix:t7})}else this.id=void 0;else this.id=z}setRowTop(z){if(this.oldRowTop=this.rowTop,this.rowTop===z)return;this.rowTop=z,this.dispatchRowEvent("topChanged");let J=z!==null;if(this.displayed!==J)this.displayed=J,this.dispatchRowEvent("displayedChanged")}clearRowTopAndRowIndex(){this.oldRowTop=null,this.setRowTop(null),this.setRowIndex(null)}setHovered(z){this.hovered=z}isHovered(){return this.hovered}setRowHeight(z,J=!1){this.rowHeight=z,this.rowHeightEstimated=J,this.dispatchRowEvent("heightChanged")}setExpanded(z,J,Q){this.beans.expansionSvc?.setExpanded(this,z,J,Q)}setDataValue(z,J,Q){let{colModel:Z,valueSvc:$,gos:X,editSvc:Y}=this.beans;if(z==null)return!1;let U=Z.getColOrColDefCol(z);if(!U)return!1;let _=U.colDef.pivotValueColumn;if(!this.group&&!this.rowPinned&&_)U=_;let H=$.getValueForDisplay({column:U,node:this,from:"data"}).value;if(X.get("readOnlyEdit")){let{beans:{eventSvc:W},data:q,rowIndex:B,rowPinned:E}=this;return W.dispatchEvent({type:"cellEditRequest",event:null,rowIndex:B,rowPinned:E,column:U,colDef:U.colDef,data:q,node:this,oldValue:H,newValue:J,value:J,source:Q}),!1}if(Q!=="data"&&Y&&!Y.committing){let W=Y.setDataValue({rowNode:this,column:U},J,Q);if(W!=null)return W}let G=$.setValue(this,U,J,Q);if(this.dispatchCellChangedEvent(U,J,H),G)this.pinnedSibling?.dispatchCellChangedEvent(U,J,H);return G}getDataValue(z,J){let Q=this.beans,Z=Q.colModel.getColOrColDefCol(z);if(!Z)return;let $;if(J==="data"||!J){if($=Q.valueSvc.getValue(Z,this,"data",!1),$==null)return $}else{let X=J==="data-raw",Y=X||J==="value"?"data":J;if($=Q.valueSvc.getValue(Z,this,Y,X),X||$==null)return $;if(typeof $==="object"&&Z.aggFunc){if(typeof $.toNumber==="function")return $.toNumber();if("value"in $)return $.value}if(J!=="value")return $}if(Z.colDef.allowFormula){let X=Q.formula;if(X?.isFormula($)&&Z.isAllowFormula())$=X.resolveValue(Z,this)}return $}updateHasChildren(){let z=this.group&&!this.footer||!!this.childrenAfterGroup?.length,{rowChildrenSvc:J}=this.beans;if(J)z=J.getHasChildrenValue(this);if(z!==this.__hasChildren)this.__hasChildren=!!z,this.dispatchRowEvent("hasChildrenChanged")}hasChildren(){if(this.__hasChildren==null)this.updateHasChildren();return this.__hasChildren}dispatchCellChangedEvent(z,J,Q){let Z={type:"cellChanged",node:this,column:z,newValue:J,oldValue:Q};this.__localEventService?.dispatchEvent(Z)}resetQuickFilterAggregateText(){this.quickFilterAggregateText=null}isExpandable(){return this.beans.expansionSvc?.isExpandable(this)??!1}isSelected(){if(this.footer)return this.sibling.isSelected();let z=this.rowPinned&&this.pinnedSibling;if(z)return z.isSelected();return this.__selected}depthFirstSearch(z){let J=this.childrenAfterGroup;if(J)for(let Q=0,Z=J.length;Q<Z;++Q)J[Q].depthFirstSearch(z);z(this)}getAggregatedChildren(z,J){let Q=this.beans;return Q.aggChildrenSvc?.getAggregatedChildren(this,Q.colModel.getCol(z),J)??[]}dispatchRowEvent(z){this.__localEventService?.dispatchEvent({type:z,node:this})}setSelected(z,J=!1,Q="api"){this.beans.selectionSvc?.setNodesSelected({nodes:[this],newValue:z,clearSelection:J,source:Q})}isRowPinned(){return!!this.rowPinned}__addEventListener(z,J){(this.__localEventService??(this.__localEventService=new P4)).addEventListener(z,J)}__removeEventListener(z,J){this.removeLocalListener(z,J)}addEventListener(z,J){this.beans.validation?.checkRowEvents(z);let Q=this.__localEventService??(this.__localEventService=new P4);this.frameworkEventListenerService=this.beans.frameworkOverrides.createLocalEventListenerWrapper?.(this.frameworkEventListenerService,Q);let Z=this.frameworkEventListenerService?.wrap(z,J)??J;Q.addEventListener(z,Z)}removeEventListener(z,J){let Q=this.frameworkEventListenerService?.unwrap(z,J)??J;this.removeLocalListener(z,Q)}removeLocalListener(z,J){let Q=this.__localEventService;if(Q){if(Q.removeEventListener(z,J),Q.noRegisteredListenersExist())this.__localEventService=null}}isFullWidthCell(){if(V(61),this.detail)return!0;let z=this.beans.gos.getCallback("isFullWidthRow");return z?z({rowNode:this}):!1}getRoute(){if(this.level===-1)return[];if(this.key==null)return;let z=[],J=this;while(J?.key!=null)z.push(J.key),J=J.parent;return z.reverse()}setRowIndex(z){if(this.rowIndex!==z)this.rowIndex=z,this.dispatchRowEvent("rowIndexChanged")}setAllChildrenCount(z){if(this.allChildrenCount!==z)this.allChildrenCount=z,this.dispatchRowEvent("allChildrenCountChanged")}setUiLevel(z){if(this.uiLevel!==z)this.uiLevel=z,this.dispatchRowEvent("uiLevelChanged")}getFirstChild(){let z=this.childStore;if(z)return z.getFirstNode();return this.childrenAfterSort?.[0]??null}_destroy(z){if(this.destroyed)return!1;this.destroyed=!0;let J=this.pinnedSibling;if(J?.rowPinned&&!this.rowPinned)this.beans.pinnedRowModel?.pinRow(J,null);if(z===!0)this.clearRowTopAndRowIndex();else if(z===!1)this.setRowTop(null),this.setRowIndex(null);else this.oldRowTop=null,this.rowTop=null,this.rowIndex=null,this.displayed=!1;if(!this.footer){let Q=this.detailNode;if(Q)Q._destroy(z);let Z=this.sibling;if(Z)Z._destroy(z)}return!0}};function X5(z,J,Q){return v(J,{type:Q,node:z,data:z.data,rowIndex:z.rowIndex,rowPinned:z.rowPinned})}var YW=new Set(["__autoHeights","__checkAutoHeightsDebounced","__localEventService","__objectId","_groupData","_leafs","childStore","groupValue","oldRowTop","sticky","treeNodeFlags","treeParent"]),M$=(z,J)=>{let Q=new Cz(J);for(let Z of Object.keys(z)){if(YW.has(Z))continue;Q[Z]=z[Z]}return Q.oldRowTop=null,Q},D$=(z,J,Q)=>{if(!Q)return;let Z=Q.rowIndex;if(Z==null)return;Z+=J;let $=z.getRowCount();while(Z>=0&&Z<$){let X=z.getRow(Z);if(!X||!X.footer&&!X.detail)return X;Z+=J}return};var UW=500,_W=550,D6,HW=(z)=>{if(!D6)D6=new WeakSet;else if(D6.has(z))return!1;return D6.add(z),!0},p0=class{constructor(z,J=!1){this.eElement=z,this.preventClick=J,this.startListener=null,this.handlers=[],this.eventSvc=void 0,this.touchStart=null,this.lastTapTime=null,this.longPressTimer=0,this.moved=!1}addEventListener(z,J){let Q=this.eventSvc;if(!Q){if(Q===null)return;this.eventSvc=Q=new P4;let Z=this.onTouchStart.bind(this);this.startListener=Z,this.eElement.addEventListener("touchstart",Z,{passive:!0})}Q.addEventListener(z,J)}removeEventListener(z,J){this.eventSvc?.removeEventListener(z,J)}onTouchStart(z){if(this.touchStart||!HW(z))return;let J=z.touches[0];this.touchStart=J;let Q=this.handlers;if(!Q.length){let Z=this.eElement,$=Z.ownerDocument,X=this.onTouchMove.bind(this),Y=this.onTouchEnd.bind(this),U=this.onTouchCancel.bind(this),_={passive:!0},H={passive:!1};f6(Q,[Z,"touchmove",X,_],[$,"touchcancel",U,_],[$,"touchend",Y,H],[$,"contextmenu",T1,H])}this.clearLongPress(),this.longPressTimer=window.setTimeout(()=>{if(this.longPressTimer=0,this.touchStart===J&&!this.moved)this.moved=!0,this.eventSvc?.dispatchEvent({type:"longTap",touchStart:J,touchEvent:z})},_W)}onTouchMove(z){let{moved:J,touchStart:Q}=this;if(!J&&Q){let Z=C1(Q,z.touches);if(Z&&!A9(Z,Q,4))this.clearLongPress(),this.moved=!0}}onTouchEnd(z){let J=this.touchStart;if(!J||!C1(J,z.changedTouches))return;if(!this.moved)this.eventSvc?.dispatchEvent({type:"tap",touchStart:J}),this.checkDoubleTap(J);if(this.preventClick)T1(z);this.cancel()}onTouchCancel(z){let J=this.touchStart;if(!J||!C1(J,z.changedTouches))return;this.lastTapTime=null,this.cancel()}checkDoubleTap(z){let J=Date.now(),Q=this.lastTapTime;if(Q){if(J-Q>UW)this.eventSvc?.dispatchEvent({type:"doubleTap",touchStart:z}),J=null}this.lastTapTime=J}cancel(){this.clearLongPress(),yZ(this.handlers),this.touchStart=null}clearLongPress(){if(this.longPressTimer!==0)window.clearTimeout(this.longPressTimer),this.longPressTimer=0;this.moved=!1}destroy(){let z=this.startListener;if(z)this.startListener=null,this.eElement.removeEventListener("touchstart",z);this.cancel(),this.eElement=null,this.eventSvc=null}},n4=((z)=>{return z[z.VALUE=0]="VALUE",z[z.DIMENSION=1]="DIMENSION",z})(n4||{}),GW=1,WW=class{constructor(z){if(this.beans={},this.createdBeans=[],this.destroyed=!1,this.instanceId=GW++,!z?.beanClasses)return;this.beanDestroyComparator=z.beanDestroyComparator,this.init(z)}init(z){this.id=z.id,this.beans.context=this,this.destroyCallback=z.destroyCallback;for(let J of Object.keys(z.providedBeanInstances))this.beans[J]=z.providedBeanInstances[J];for(let J of z.beanClasses){let Q=new J;if(Q.beanName)this.beans[Q.beanName]=Q;else console.error(`Bean ${J.name} is missing beanName`);this.createdBeans.push(Q)}for(let J of z.derivedBeans??[]){let{beanName:Q,bean:Z}=J(this);this.beans[Q]=Z,this.createdBeans.push(Z)}if(z.beanInitComparator)this.createdBeans.sort(z.beanInitComparator);this.initBeans(this.createdBeans)}getBeanInstances(){return Object.values(this.beans)}createBean(z,J){return this.initBeans([z],J),z}initBeans(z,J){let Q=this.beans;for(let Z of z)Z.preWireBeans?.(Q),Z.wireBeans?.(Q);for(let Z of z)Z.preConstruct?.();if(J)z.forEach(J);for(let Z of z)Z.postConstruct?.()}getBeans(){return this.beans}getBean(z){return this.beans[z]}getId(){return this.id}destroy(){if(this.destroyed)return;this.destroyed=!0;let z=this.getBeanInstances();if(this.beanDestroyComparator)z.sort(this.beanDestroyComparator);this.destroyBeans(z),this.beans={},this.createdBeans=[],this.destroyCallback?.()}destroyBean(z){z?.destroy?.()}destroyBeans(z){if(z)for(let J=0;J<z.length;J++)this.destroyBean(z[J]);return[]}isDestroyed(){return this.destroyed}};function qW(z){return{beanName:"gridApi",bean:z.getBean("apiFunctionSvc").api}}var BW=["licenseManager","environment","eventSvc","gos","paginationAutoPageSizeSvc","apiFunctionSvc","gridApi","registry","agCompUtils","userCompFactory","rowContainerHeight","horizontalResizeSvc","localeSvc","pinnedRowModel","dragSvc","colGroupSvc","visibleCols","popupSvc","selectionSvc","colFilter","quickFilter","filterManager","colModel","headerNavigation","pageBounds","pagination","pageBoundsListener","rowSpanSvc","stickyRowSvc","rowRenderer","expressionSvc","alignedGridsSvc","navigation","valueCache","valueSvc","autoWidthCalc","filterMenuFactory","dragAndDrop","focusSvc","cellNavigation","cellStyles","scrollVisibleSvc","sortSvc","colHover","colAnimation","autoColSvc","selectionColSvc","changeDetectionSvc","animationFrameSvc","undoRedo","colDefFactory","rowStyleSvc","rowNodeBlockLoader","rowNodeSorter","ctrlsSvc","pinnedCols","dataTypeSvc","syncSvc","overlays","stateSvc","expansionSvc","apiEventSvc","ariaAnnounce","menuSvc","colMoves","colAutosize","colFlex","colResize","pivotColsSvc","valueColsSvc","rowGroupColsSvc","colNames","colViewport","pivotResultCols","showRowGroupCols","validation"],s7=Object.fromEntries(BW.map((z,J)=>[z,J]));function EW(z,J){let Q=(z.beanName?s7[z.beanName]:void 0)??Number.MAX_SAFE_INTEGER,Z=(J.beanName?s7[J.beanName]:void 0)??Number.MAX_SAFE_INTEGER;return Q-Z}function KW(z,J){if(z?.beanName==="gridDestroySvc")return-1;if(J?.beanName==="gridDestroySvc")return 1;return 0}function r4(z){let{rowIndex:J,rowPinned:Q,column:Z}=z;return`${J}.${Q==null?"null":Q}.${Z.getId()}`}function o1(z,J){let Q=z.column===J.column,Z=z.rowPinned===J.rowPinned,$=z.rowIndex===J.rowIndex;return Q&&Z&&$}function q0(z,J){switch(z.rowPinned){case"top":if(J.rowPinned!=="top")return!0;break;case"bottom":if(J.rowPinned!=="bottom")return!1;break;default:if(I(J.rowPinned))return J.rowPinned!=="top";break}return z.rowIndex<J.rowIndex}function a(z,J){if(!z&&!J)return!0;if(!z||!J)return!1;return z.rowIndex===J.rowIndex&&z.rowPinned==J.rowPinned}function m1(z){let J=0,Q,{pinnedRowModel:Z,rowModel:$,pageBounds:X}=z;if(Z?.getPinnedTopRowCount())Q="top";else if($.getRowCount())Q=null,J=X.getFirstRow();else if(Z?.getPinnedBottomRowCount())Q="bottom";return Q===void 0?null:{rowIndex:J,rowPinned:Q}}function Oz(z){let J,Q=null,{pinnedRowModel:Z,pageBounds:$}=z,X=Z?.getPinnedBottomRowCount(),Y=Z?.getPinnedTopRowCount();if(X)Q="bottom",J=X-1;else if(z.rowModel.getRowCount())J=$.getLastRow();else if(Y)Q="top",J=Y-1;return J===void 0?null:{rowIndex:J,rowPinned:Q}}function j0(z,J){switch(J.rowPinned){case"top":return z.pinnedRowModel?.getPinnedTopRow(J.rowIndex);case"bottom":return z.pinnedRowModel?.getPinnedBottomRow(J.rowIndex);default:return z.rowModel.getRow(J.rowIndex)}}function Y4(z,J){let Q=z.spannedRowRenderer?.getCellByPosition(J);if(Q)return Q;let Z=z.rowRenderer.getRowByPosition(J);if(!Z)return null;return Z.getCellCtrl(J.column)}function FW(z,J,Q){let{rowModel:Z,pinnedRowModel:$}=z,X;if(X??(X=Z?.getRowNode(J)),Q)X??(X=$?.getPinnedRowById(J,Q));else X??(X=$?.getPinnedRowById(J,"top")),X??(X=$?.getPinnedRowById(J,"bottom"));return X}function r0(z,J,Q=!1){let{rowIndex:Z,rowPinned:$}=J,{pageBounds:X,pinnedRowModel:Y,rowModel:U}=z;if(Z===0){if($==="top")return null;if($==="bottom"&&U.isRowsToRender())return{rowIndex:X.getLastRow(),rowPinned:null};return Y?.isRowsToRender("top")?{rowIndex:Y.getPinnedTopRowCount()-1,rowPinned:"top"}:null}if(Q){let _=$?void 0:U.getRow(Z);return R$(z,_,!0)??{rowIndex:Z-1,rowPinned:$}}return{rowIndex:Z-1,rowPinned:$}}function Y5(z,J){let{pinnedRowModel:Q,rowModel:Z}=z,$=Q?.getPinnedTopRowCount()??0,X=Z.getRowCount(),{rowPinned:Y,rowIndex:U}=J;if(Y==="top")return U;if(Y==="bottom")return $+X+U;return $+U}function D0(z,J,Q=!1){let{rowIndex:Z,rowPinned:$}=J,{pageBounds:X,pinnedRowModel:Y,rowModel:U}=z;if(LW(z,J)){if($==="bottom")return null;if($==="top"&&U.isRowsToRender())return{rowIndex:X.getFirstRow(),rowPinned:null};return Y?.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null}if(Q){let _=$?void 0:U.getRow(Z);return R$(z,_)??{rowIndex:Z+1,rowPinned:$}}return{rowIndex:Z+1,rowPinned:$}}function R$(z,J,Q=!1){let{gos:Z,rowRenderer:$}=z;if(!J?.sticky||!s1(Z))return;let X=$.getStickyTopRowCtrls(),Y=$.getStickyBottomRowCtrls(),U=!Y.some((W)=>W.rowNode.rowIndex===J.rowIndex),_=U?X:Y,H=(Q?-1:1)*(U?-1:1),G;for(let W=0;W<_.length;W++)if(_[W].rowNode.rowIndex===J.rowIndex){G=_[W+H];break}return G?{rowIndex:G.rowNode.rowIndex,rowPinned:null}:void 0}function LW(z,J){let{rowPinned:Q,rowIndex:Z}=J,{pinnedRowModel:$,pageBounds:X}=z;if(Q==="top")return($?.getPinnedTopRowCount()??0)-1<=Z;if(Q==="bottom")return($?.getPinnedBottomRowCount()??0)-1<=Z;return X.getLastRow()<=Z}function vz(z,J,Q){J.addManagedElementListeners(Q,{keydown:(Z)=>{if(!Z.defaultPrevented&&!DW(Z)&&Z.key===R.TAB){let $=Z.shiftKey;if(!I0(z,Q,!1,$)){if(W4(z,$))Z.preventDefault()}}}})}function D4(z){return z.gos.get("suppressHeaderFocus")||!!z.overlays?.exclusive}function l6(z){return z.gos.get("suppressCellFocus")||!!z.overlays?.exclusive}function W4(z,J,Q=!1){let Z=z.ctrlsSvc.get("gridCtrl"),$=Z.focusNextInnerContainer(J);if($===!0)return!0;if($===!1)return $;if(Q||!J&&!Z.isDetailGrid()&&Z.isFocusInsideGridBody())Z.forceFocusOutOfContainer(J);return!1}function U5(z,J){let Q=z.focusSvc,Z=Q.getFocusedCell();if(Z&&J&&o1(Z,J)){let{rowIndex:$,rowPinned:X,column:Y}=J;if(Tz(z))Q.setFocusedCell({rowIndex:$,column:Y,rowPinned:X,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!l1()})}}function MW(z,J){let Q=z.getFocusableContainerName();if(Q==="gridBody")return J();return A$(z,()=>O4(z.getGui(),".ag-tab-guard").length>0)?Q:null}function A$(z,J){z.setAllowFocus?.(!0);try{return J()}finally{z.setAllowFocus?.(!1)}}var j$="__ag_Grid_Skip_Focusable_Container";function V$(z){z[j$]=!0}function DW(z){return z[j$]===!0}function O$(z){if(!z.cols)return-1;return z.cols.treeDepth+1}function Z4(z){return z.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0}function _5(z){let J=[],Q=z.ctrlsSvc.getHeaderRowContainerCtrls();for(let Z of Q){if(!Z)continue;let $=Z.getGroupRowCount()||0;for(let X=0;X<$;X++){let Y=Z.getGroupRowCtrlAtIndex(X),U=J[X];if(Y){let _=RW(z,Y);if(U==null||_>U)J[X]=_}}}return J}function RW(z,J){let Z=z.colModel.pivotMode?jW(z):T$(z),$=J.getHeaderCellCtrls();for(let X of $){let{column:Y}=X,U=Y.getAutoHeaderHeight();if(U!=null&&U>Z&&Y.isAutoHeaderHeight())Z=U}return Z}function H5(z){let Q=z.colModel.pivotMode?AW(z):VJ(z);return z.colModel.forAllCols((Z)=>{let $=Z.getAutoHeaderHeight();if($!=null&&$>Q&&Z.isAutoHeaderHeight())Q=$}),Q}function VJ(z){return z.gos.get("headerHeight")??z.environment.getDefaultHeaderHeight()}function P$(z){return z.gos.get("floatingFiltersHeight")??VJ(z)}function T$(z){return z.gos.get("groupHeaderHeight")??VJ(z)}function AW(z){return z.gos.get("pivotHeaderHeight")??VJ(z)}function jW(z){return z.gos.get("pivotGroupHeaderHeight")??T$(z)}function VW(z,J){return z.headerRowIndex===J.headerRowIndex&&z.column===J.column}function OW(z){return z?.headerRowIndex!=null}var PW=class extends j{setComp(z,J,Q){this.comp=z,this.eGui=J;let{beans:Z}=this,{headerNavigation:$,touchSvc:X,ctrlsSvc:Y}=Z;if($)this.createManagedBean(new $z(Q,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)}));this.addManagedEventListeners({columnPivotModeChanged:this.onPivotModeChanged.bind(this,Z),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this,Z)}),this.onPivotModeChanged(Z),this.setupHeaderHeight();let U=this.onHeaderContextMenu.bind(this);this.addManagedElementListeners(this.eGui,{contextmenu:U}),X?.mockHeaderContextMenu(this,U),Y.register("gridHeaderCtrl",this)}setupHeaderHeight(){let z=this.setHeaderHeight.bind(this);z(),this.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],z),this.addManagedEventListeners({headerRowsChanged:z,columnHeaderHeightChanged:z,columnGroupHeaderHeightChanged:()=>I4(this.beans,()=>z()),stylesChanged:z,advancedFilterEnabledChanged:z})}setHeaderHeight(){let{beans:z}=this,J=0,Q=_5(z).reduce((Y,U)=>Y+U,0),Z=H5(z);if(z.filterManager?.hasFloatingFilters())J+=P$(z);J+=Q,J+=Z;let $=z.environment.getHeaderRowBorderWidth(),X=J+$;if(this.headerHeightWithBorder!==X){this.headerHeightWithBorder=X;let Y=`${X}px`;this.comp.setHeightAndMinHeight(Y)}if(this.headerHeight!==J)this.headerHeight=J,this.eventSvc.dispatchEvent({type:"headerHeightChanged"})}onPivotModeChanged(z){let J=z.colModel.pivotMode;this.comp.toggleCss("ag-pivot-on",J),this.comp.toggleCss("ag-pivot-off",!J)}onDisplayedColumnsChanged(z){let Q=z.visibleCols.allCols.some((Z)=>Z.isSpanHeaderHeight());this.comp.toggleCss("ag-header-allow-overflow",Q)}onTabKeyDown(z){let J=this.gos.get("enableRtl"),Q=z.shiftKey,Z=Q!==J?"LEFT":"RIGHT",{beans:$}=this,{headerNavigation:X,focusSvc:Y}=$;if(X.navigateHorizontally(Z,!0,z)||!Q&&Y.focusOverlay(!1)||W4($,Q,!0))z.preventDefault()}handleKeyDown(z){let J=null,{headerNavigation:Q}=this.beans;switch(z.key){case R.LEFT:J="LEFT";case R.RIGHT:{if(!I(J))J="RIGHT";if(Q.navigateHorizontally(J,!1,z))z.preventDefault();break}case R.UP:J="UP";case R.DOWN:{if(!I(J))J="DOWN";if(Q.navigateVertically(J,z))z.preventDefault();break}default:return}}onFocusOut(z){let{relatedTarget:J}=z,{eGui:Q,beans:Z}=this;if(!J&&Q.contains(d(Z)))return;if(!Q.contains(J))Z.focusSvc.focusedHeader=null}onHeaderContextMenu(z,J,Q){let{menuSvc:Z,ctrlsSvc:$}=this.beans;if(!z&&!Q||!Z?.isHeaderContextMenuEnabled())return;let{target:X}=z??J;if(X===this.eGui||X===$.getHeaderRowContainerCtrl()?.eViewport)Z.showHeaderContextMenu(void 0,z,Q)}},G5=class extends y{constructor(z,J){super(z);this.ctrl=J}getCtrl(){return this.ctrl}},TW={tag:"div",cls:"ag-header-cell",role:"columnheader",children:[{tag:"div",ref:"eResize",cls:"ag-header-cell-resize",role:"presentation"},{tag:"div",ref:"eHeaderCompWrapper",cls:"ag-header-cell-comp-wrapper",role:"presentation"}]},SW=class extends G5{constructor(z){super(TW,z);this.eResize=P,this.eHeaderCompWrapper=P,this.headerCompVersion=0}postConstruct(){let z=this.getGui(),J=()=>{let Z=this.ctrl.getSelectAllGui();if(Z)this.eResize.insertAdjacentElement("afterend",Z),this.addDestroyFunc(()=>Z.remove())},Q={setWidth:(Z)=>z.style.width=Z,toggleCss:(Z,$)=>this.toggleCss(Z,$),setUserStyles:(Z)=>c2(z,Z),setAriaSort:(Z)=>Z?$H(z,Z):XH(z),setUserCompDetails:(Z)=>this.setUserCompDetails(Z),getUserCompInstance:()=>this.headerComp,refreshSelectAllGui:J,removeSelectAllGui:()=>this.ctrl.getSelectAllGui()?.remove()};this.ctrl.setComp(Q,this.getGui(),this.eResize,this.eHeaderCompWrapper,void 0),J()}destroy(){this.destroyHeaderComp(),super.destroy()}destroyHeaderComp(){if(this.headerComp)this.headerCompGui?.remove(),this.headerComp=this.destroyBean(this.headerComp),this.headerCompGui=void 0}setUserCompDetails(z){this.headerCompVersion++;let J=this.headerCompVersion;z.newAgStackInstance().then((Q)=>this.afterCompCreated(J,Q))}afterCompCreated(z,J){if(z!=this.headerCompVersion||!this.isAlive()){this.destroyBean(J);return}this.destroyHeaderComp(),this.headerComp=J,this.headerCompGui=J.getGui(),this.eHeaderCompWrapper.appendChild(this.headerCompGui),this.ctrl.setDragSource(this.getGui())}},IW={tag:"div",cls:"ag-header-group-cell",role:"columnheader",children:[{tag:"div",ref:"eHeaderCompWrapper",cls:"ag-header-cell-comp-wrapper",role:"presentation"},{tag:"div",ref:"eResize",cls:"ag-header-cell-resize",role:"presentation"}]},fW=class extends G5{constructor(z){super(IW,z);this.eResize=P,this.eHeaderCompWrapper=P}postConstruct(){let z=this.getGui(),J=(Z,$)=>$!=null?z.setAttribute(Z,$):z.removeAttribute(Z),Q={toggleCss:(Z,$)=>this.toggleCss(Z,$),setUserStyles:(Z)=>c2(z,Z),setHeaderWrapperHidden:(Z)=>{if(Z)this.eHeaderCompWrapper.style.setProperty("display","none");else this.eHeaderCompWrapper.style.removeProperty("display")},setHeaderWrapperMaxHeight:(Z)=>{if(Z!=null)this.eHeaderCompWrapper.style.setProperty("max-height",`${Z}px`);else this.eHeaderCompWrapper.style.removeProperty("max-height");this.eHeaderCompWrapper.classList.toggle("ag-header-cell-comp-wrapper-limited-height",Z!=null)},setResizableDisplayed:(Z)=>x(this.eResize,Z),setWidth:(Z)=>z.style.width=Z,setAriaExpanded:(Z)=>J("aria-expanded",Z),setUserCompDetails:(Z)=>this.setUserCompDetails(Z),getUserCompInstance:()=>this.headerGroupComp};this.ctrl.setComp(Q,z,this.eResize,this.eHeaderCompWrapper,void 0)}setUserCompDetails(z){z.newAgStackInstance().then((J)=>this.afterHeaderCompCreated(J))}afterHeaderCompCreated(z){let J=()=>this.destroyBean(z);if(!this.isAlive()){J();return}let Q=this.getGui(),Z=z.getGui();this.eHeaderCompWrapper.appendChild(Z),this.addDestroyFunc(J),this.headerGroupComp=z,this.ctrl.setDragSource(Q)}},kW={tag:"div",cls:"ag-header-cell ag-floating-filter",role:"gridcell",children:[{tag:"div",ref:"eFloatingFilterBody",role:"presentation"},{tag:"div",ref:"eButtonWrapper",cls:"ag-floating-filter-button ag-hidden",role:"presentation",children:[{tag:"button",ref:"eButtonShowMainFilter",cls:"ag-button ag-floating-filter-button-button",attrs:{type:"button",tabindex:"-1"}}]}]},CW=class extends G5{constructor(z){super(kW,z);this.eFloatingFilterBody=P,this.eButtonWrapper=P,this.eButtonShowMainFilter=P}postConstruct(){let z=this.getGui(),J={toggleCss:(Q,Z)=>this.toggleCss(Q,Z),setUserStyles:(Q)=>c2(z,Q),addOrRemoveBodyCssClass:(Q,Z)=>this.eFloatingFilterBody.classList.toggle(Q,Z),setButtonWrapperDisplayed:(Q)=>x(this.eButtonWrapper,Q),setCompDetails:(Q)=>this.setCompDetails(Q),getFloatingFilterComp:()=>this.compPromise,setWidth:(Q)=>z.style.width=Q,setMenuIcon:(Q)=>this.eButtonShowMainFilter.appendChild(Q)};this.ctrl.setComp(J,z,this.eButtonShowMainFilter,this.eFloatingFilterBody,void 0)}setCompDetails(z){if(!z){this.destroyFloatingFilterComp(),this.compPromise=null;return}this.compPromise=z.newAgStackInstance(),this.compPromise.then((J)=>this.afterCompCreated(J))}destroy(){this.destroyFloatingFilterComp(),super.destroy()}destroyFloatingFilterComp(){this.floatingFilterComp?.getGui().remove(),this.floatingFilterComp=this.destroyBean(this.floatingFilterComp)}afterCompCreated(z){if(!z)return;if(!this.isAlive()){this.destroyBean(z);return}this.destroyFloatingFilterComp(),this.floatingFilterComp=z,this.eFloatingFilterBody.appendChild(z.getGui()),z.afterGuiAttached?.()}},vW=class extends y{constructor(z){super({tag:"div",cls:z.headerRowClass,role:"row"});this.ctrl=z,this.headerComps={}}postConstruct(){this.getGui().setAttribute("tabindex",String(this.gos.get("tabIndex"))),h6(this.getGui(),this.ctrl.getAriaRowIndex());let J={setHeight:(Q)=>this.getGui().style.height=Q,setTop:(Q)=>this.getGui().style.top=Q,setHeaderCtrls:(Q,Z)=>this.setHeaderCtrls(Q,Z),setWidth:(Q)=>this.getGui().style.width=Q,setRowIndex:(Q)=>h6(this.getGui(),Q)};this.ctrl.setComp(J,void 0)}destroy(){this.setHeaderCtrls([],!1),super.destroy()}setHeaderCtrls(z,J){if(!this.isAlive())return;let Q=this.headerComps;this.headerComps={};for(let Z of z){let $=Z.instanceId,X=Q[$];if(delete Q[$],X==null)X=this.createHeaderComp(Z),this.getGui().appendChild(X.getGui());this.headerComps[$]=X}if(Object.values(Q).forEach((Z)=>{Z.getGui().remove(),this.destroyBean(Z)}),J){let Z=Object.values(this.headerComps);Z.sort((X,Y)=>{let U=X.getCtrl().column.getLeft(),_=Y.getCtrl().column.getLeft();return U-_});let $=Z.map((X)=>X.getGui());M9(this.getGui(),$)}}createHeaderComp(z){let J;switch(this.ctrl.type){case"group":J=new fW(z);break;case"filter":J=new CW(z);break;default:J=new SW(z);break}return this.createBean(J),J.setParentComponent(this),J}},W5=class extends j{constructor(z,J=!1){super();this.callback=z,this.addSpacer=J}postConstruct(){let z=this.setWidth.bind(this);if(this.addManagedPropertyListener("domLayout",z),this.addManagedEventListeners({columnContainerWidthChanged:z,displayedColumnsChanged:z,leftPinnedWidthChanged:z}),this.addSpacer)this.addManagedEventListeners({rightPinnedWidthChanged:z,scrollVisibilityChanged:z,scrollbarWidthChanged:z});this.setWidth()}setWidth(){let z=T0(this.gos,"print"),{visibleCols:J,scrollVisibleSvc:Q}=this.beans,Z=J.bodyWidth,$=J.getColsLeftWidth(),X=J.getDisplayedColumnsRightWidth(),Y;if(z)Y=Z+$+X;else if(Y=Z,this.addSpacer){if((this.gos.get("enableRtl")?$:X)===0&&Q.verticalScrollShowing)Y+=Q.getScrollbarWidth()}this.callback(Y)}};function l2(z,J,Q){if(Q)z.addDestroyFunc(()=>J.destroyBean(Q));return Q??z}var q5=class extends j{constructor(z,J,Q,Z){super();this.columnOrGroup=z,this.eCell=J,this.colsSpanning=Z,this.columnOrGroup=z,this.ariaEl=J.querySelector("[role=columnheader]")||J,this.beans=Q}setColsSpanning(z){this.colsSpanning=z,this.onLeftChanged()}getColumnOrGroup(){let{beans:z,colsSpanning:J}=this;if(z.gos.get("enableRtl")&&J)return N(J);return this.columnOrGroup}postConstruct(){let z=this.onLeftChanged.bind(this);this.addManagedListeners(this.columnOrGroup,{leftChanged:z}),this.setLeftFirstTime(),this.addManagedEventListeners({displayedColumnsWidthChanged:z}),this.addManagedPropertyListener("domLayout",z)}setLeftFirstTime(){let{gos:z,colAnimation:J}=this.beans,Q=z.get("suppressColumnMoveAnimation"),Z=I(this.columnOrGroup.getOldLeft());if(J?.isActive()&&Z&&!Q)this.animateInLeft();else this.onLeftChanged()}animateInLeft(){let z=this.getColumnOrGroup(),J=this.modifyLeftForPrintLayout(z,z.getOldLeft()),Q=this.modifyLeftForPrintLayout(z,z.getLeft());this.setLeft(J),this.actualLeft=Q,this.beans.colAnimation.executeNextVMTurn(()=>{if(this.actualLeft===Q)this.setLeft(Q)})}onLeftChanged(){let z=this.getColumnOrGroup(),J=z.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(z,J),this.setLeft(this.actualLeft)}modifyLeftForPrintLayout(z,J){let{gos:Q,visibleCols:Z}=this.beans;if(!T0(Q,"print"))return J;if(z.getPinned()==="left")return J;let X=Z.getColsLeftWidth();if(z.getPinned()==="right"){let Y=Z.bodyWidth;return X+Y+J}return X+J}setLeft(z){if(I(z))this.eCell.style.left=`${z}px`;if(K0(this.columnOrGroup)){let J=this.columnOrGroup.getLeafColumns();if(!J.length)return;if(J.length>1)ZH(this.ariaEl,J.length)}}},NW="ag-column-first",wW="ag-column-last";function OJ(z,J,Q,Z){if(n(z))return[];return I$(z.headerClass,z,J,Q,Z)}function PJ(z,J,Q,Z){if(n(z))return[];return I$(z.toolPanelClass,z,J,Q,Z)}function S$(z,J,Q){z.toggleCss(NW,Q.isColAtEdge(J,"first")),z.toggleCss(wW,Q.isColAtEdge(J,"last"))}function yW(z,J,Q,Z){return v(J,{colDef:z,column:Q,columnGroup:Z})}function I$(z,J,Q,Z,$){if(n(z))return[];let X;if(typeof z==="function"){let Y=yW(J,Q,Z,$);X=z(Y)}else X=z;if(typeof X==="string")return[X];if(Array.isArray(X))return[...X];return[]}var xW=0,f$="headerCtrl",B5=class extends j{constructor(z,J){super();this.column=z,this.rowCtrl=J,this.resizeToggleTimeout=0,this.resizeMultiplier=1,this.resizeFeature=null,this.lastFocusEvent=null,this.dragSource=null,this.reAttemptToFocus=!1,this.instanceId=z.getUniqueId()+"-"+xW++}postConstruct(){let z=this.refreshTabIndex.bind(this);this.addManagedPropertyListeners(["suppressHeaderFocus"],z),this.addManagedEventListeners({overlayExclusiveChanged:z})}setComp(z,J,Q,Z,$){if(J.setAttribute("col-id",this.column.colIdSanitised),this.wireComp(z,J,Q,Z,$),this.reAttemptToFocus)this.reAttemptToFocus=!1,this.focus(this.lastFocusEvent??void 0)}shouldStopEventPropagation(z){let{headerRowIndex:J,column:Q}=this.beans.focusSvc.focusedHeader,Z=Q.getDefinition(),$=Z?.suppressHeaderKeyboardEvent;if(!I($))return!1;let X=v(this.gos,{colDef:Z,column:Q,headerRowIndex:J,event:z});return!!$(X)}getWrapperHasFocus(){return d(this.beans)===this.eGui}setGui(z,J){this.eGui=z,this.addDomData(J),J.addManagedListeners(this.beans.eventSvc,{displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this)}),J.addManagedElementListeners(this.eGui,{focus:this.onGuiFocus.bind(this)}),this.onDisplayedColumnsChanged(),this.refreshTabIndex()}refreshHeaderStyles(){let z=this.column.getDefinition();if(!z)return;let{headerStyle:J}=z,Q;if(typeof J==="function"){let Z=this.getHeaderClassParams();Q=J(Z)}else Q=J;if(Q)this.comp.setUserStyles(Q)}onGuiFocus(){this.eventSvc.dispatchEvent({type:"headerFocused",column:this.column})}setupAutoHeight(z){let{wrapperElement:J,checkMeasuringCallback:Q,compBean:Z}=z,{beans:$}=this,X=(W)=>{if(!this.isAlive()||!Z.isAlive())return;let{paddingTop:q,paddingBottom:B,borderBottomWidth:E,borderTopWidth:K}=t1(this.eGui),F=q+B+E+K,M=J.offsetHeight+F;if(W<5){let A=!Y0($)?.contains(J),O=M==0;if(A||O){lQ(()=>X(W+1),"raf",$);return}}this.setColHeaderHeight(this.column,M)},Y=!1,U,_=()=>{let W=this.column.isAutoHeaderHeight();if(W&&!Y)H();if(!W&&Y)G()},H=()=>{Y=!0,this.comp.toggleCss("ag-header-cell-auto-height",!0),X(0),U=S4(this.beans,J,()=>X(0))},G=()=>{if(Y=!1,U)U();this.comp.toggleCss("ag-header-cell-auto-height",!1),U=void 0};if(_(),Z.addDestroyFunc(()=>G()),Z.addManagedListeners(this.column,{widthChanged:()=>Y&&X(0)}),Z.addManagedEventListeners({sortChanged:()=>{if(Y)window.setTimeout(()=>X(0))}}),Q)Q(_)}onDisplayedColumnsChanged(){let{comp:z,column:J,beans:Q,eGui:Z}=this;if(!z||!J||!Z)return;S$(z,J,Q.visibleCols),W9(Z,Q.visibleCols.getAriaColIndex(J))}addResizeAndMoveKeyboardListeners(z){z.addManagedListeners(this.eGui,{keydown:this.onGuiKeyDown.bind(this),keyup:this.onGuiKeyUp.bind(this)})}refreshTabIndex(){let z=D4(this.beans);if(this.eGui)j4(this.eGui,"tabindex",z?null:"-1")}onGuiKeyDown(z){let J=d(this.beans),Q=z.key===R.LEFT||z.key===R.RIGHT;if(this.isResizing)z.preventDefault(),z.stopImmediatePropagation();if(J!==this.eGui||!z.shiftKey&&!z.altKey&&!z.ctrlKey&&!z.metaKey)return;if(this.isResizing||Q)z.preventDefault(),z.stopImmediatePropagation();if((z.ctrlKey||z.metaKey)&&Z$(z)===R.C)return this.beans.clipboardSvc?.copyToClipboard();if(!Q)return;let X=z.key===R.LEFT!==this.gos.get("enableRtl")?"left":"right";if(z.altKey){this.isResizing=!0,this.resizeMultiplier+=1;let Y=this.getViewportAdjustedResizeDiff(z);this.resizeHeader(Y,z.shiftKey),this.resizeFeature?.toggleColumnResizing(!0)}else this.moveHeader(X)}moveHeader(z){this.beans.colMoves?.moveHeader(z,this.eGui,this.column,this.rowCtrl.pinned,this)}getViewportAdjustedResizeDiff(z){let J=this.getResizeDiff(z),{pinnedCols:Q}=this.beans;return Q?Q.getHeaderResizeDiff(J,this.column):J}getResizeDiff(z){let{gos:J,column:Q}=this,Z=z.key===R.LEFT!==J.get("enableRtl"),$=Q.getPinned(),X=J.get("enableRtl");if($){if(X!==($==="right"))Z=!Z}return(Z?-1:1)*this.resizeMultiplier}onGuiKeyUp(){if(!this.isResizing)return;if(this.resizeToggleTimeout)window.clearTimeout(this.resizeToggleTimeout),this.resizeToggleTimeout=0;this.isResizing=!1,this.resizeMultiplier=1,this.resizeToggleTimeout=window.setTimeout(()=>{this.resizeFeature?.toggleColumnResizing(!1)},150)}handleKeyDown(z){let J=this.getWrapperHasFocus();switch(z.key){case R.PAGE_DOWN:case R.PAGE_UP:case R.PAGE_HOME:case R.PAGE_END:if(J)z.preventDefault()}}addDomData(z){let J=f$,{eGui:Q,gos:Z}=this;J1(Z,Q,J,this),z.addDestroyFunc(()=>J1(Z,Q,J,null))}focus(z){if(!this.isAlive())return!1;let{eGui:J}=this;if(!J)this.reAttemptToFocus=!0;else this.lastFocusEvent=z||null,J.focus();return!0}focusThis(){this.beans.focusSvc.focusedHeader={headerRowIndex:this.rowCtrl.rowIndex,column:this.column}}removeDragSource(){if(this.dragSource)this.beans.dragAndDrop?.removeDragSource(this.dragSource),this.dragSource=null}handleContextMenuMouseEvent(z,J,Q){let Z=z??J,{menuSvc:$,gos:X}=this.beans;if(X.get("preventDefaultOnContextMenu"))Z.preventDefault();if($?.isHeaderContextMenuEnabled(Q))$.showHeaderContextMenu(Q,z,J);this.dispatchColumnMouseEvent("columnHeaderContextMenu",Q)}dispatchColumnMouseEvent(z,J){this.eventSvc.dispatchEvent({type:z,column:J})}setColHeaderHeight(z,J){if(!z.setAutoHeaderHeight(J))return;let{eventSvc:Q}=this;if(z.isColumn)Q.dispatchEvent({type:"columnHeaderHeightChanged",column:z,columns:[z],source:"autosizeColumnHeaderHeight"});else Q.dispatchEvent({type:"columnGroupHeaderHeightChanged",columnGroup:z,source:"autosizeColumnGroupHeaderHeight"})}clearComponent(){this.removeDragSource(),this.resizeFeature=null,this.comp=null,this.eGui=null}destroy(){super.destroy(),this.column=null,this.lastFocusEvent=null,this.rowCtrl=null}},bW=class extends B5{constructor(){super(...arguments);this.refreshFunctions={},this.userHeaderClasses=new Set,this.ariaDescriptionProperties=new Map}wireComp(z,J,Q,Z,$){this.comp=z;let{rowCtrl:X,column:Y,beans:U}=this,{colResize:_,context:H,colHover:G,rangeSvc:W}=U,q=l2(this,H,$);if(this.setGui(J,q),this.updateState(),this.setupWidth(q),this.setupMovingCss(q),this.setupMenuClass(q),this.setupSortableClass(q),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight({wrapperElement:Z,checkMeasuringCallback:(E)=>this.setRefreshFunction("measuring",E),compBean:q}),this.addColumnHoverListener(q),this.setupFilterClass(q),this.setupStylesFromColDef(),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(q),this.setupSelectAll(q),this.setupUserComp(),this.refreshAria(),_)this.resizeFeature=q.createManagedBean(_.createResizeFeature(X.pinned,Y,Q,z,this));else x(Q,!1);G?.createHoverFeature(q,[Y],J),W?.createRangeHighlightFeature(q,Y,z),q.createManagedBean(new q5(Y,J,U)),q.createManagedBean(new $z(J,{shouldStopEventPropagation:(E)=>this.shouldStopEventPropagation(E),onTabKeyDown:()=>null,handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addResizeAndMoveKeyboardListeners(q),q.addManagedPropertyListeners(["suppressMovableColumns","suppressMenuHide","suppressAggFuncInHeader","enableAdvancedFilter"],()=>this.refresh()),q.addManagedPropertyListener("cellSelection",()=>this.refreshAria()),q.addManagedListeners(Y,{colDefChanged:()=>this.refresh(),formulaRefChanged:()=>this.refresh(),headerHighlightChanged:this.onHeaderHighlightChanged.bind(this)});let B=()=>this.checkDisplayName();q.addManagedEventListeners({columnValueChanged:B,columnRowGroupChanged:B,columnPivotChanged:B,headerHeightChanged:this.onHeaderHeightChanged.bind(this)}),q.addDestroyFunc(()=>{this.refreshFunctions={},this.selectAllFeature=null,this.dragSourceElement=void 0,this.userCompDetails=null,this.userHeaderClasses.clear(),this.ariaDescriptionProperties.clear(),this.clearComponent()})}resizeHeader(z,J){this.beans.colResize?.resizeHeader(this.column,z,J)}getHeaderClassParams(){let{column:z,beans:J}=this,Q=z.colDef;return v(J.gos,{colDef:Q,column:z,floatingFilter:!1})}setupUserComp(){let z=this.lookupUserCompDetails();if(z)this.setCompDetails(z)}setCompDetails(z){this.userCompDetails=z,this.comp.setUserCompDetails(z)}lookupUserCompDetails(){let z=this.createParams(),J=this.column.getColDef();return gG(this.beans.userCompFactory,J,z)}createParams(){let{menuSvc:z,sortSvc:J,colFilter:Q,gos:Z}=this.beans;return v(Z,{column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,enableFilterButton:this.openFilterEnabled&&!!z?.isHeaderFilterButtonEnabled(this.column),enableFilterIcon:!!Q&&(!this.openFilterEnabled||F0(this.gos)),showColumnMenu:(X,Y)=>{z?.showColumnMenu({column:this.column,buttonElement:X,positionBy:"button",onClosedCallback:Y})},showColumnMenuAfterMouseClick:(X,Y)=>{z?.showColumnMenu({column:this.column,mouseEvent:X,positionBy:"mouse",onClosedCallback:Y})},showFilter:(X)=>{z?.showFilterMenu({column:this.column,buttonElement:X,containerType:"columnFilter",positionBy:"button"})},progressSort:(X)=>{J?.progressSort(this.column,!!X,"uiColumnSorted")},setSort:(X,Y)=>{J?.setSortForColumn(this.column,$4(X),!!Y,"uiColumnSorted")},eGridHeader:this.eGui,setTooltip:(X,Y)=>{Z.assertModuleRegistered("Tooltip",3),this.setupTooltip(X,Y)}})}setupSelectAll(z){let{selectionSvc:J}=this.beans;if(!J)return;this.selectAllFeature=z.createOptionalManagedBean(J.createSelectAllFeature(this.column)),this.selectAllFeature?.setComp(this),z.addManagedPropertyListener("rowSelection",()=>{let Q=J.createSelectAllFeature(this.column);if(Q&&!this.selectAllFeature)this.selectAllFeature=z.createManagedBean(Q),this.selectAllFeature?.setComp(this),this.comp.refreshSelectAllGui();else if(this.selectAllFeature&&!Q)this.comp.removeSelectAllGui(),this.selectAllFeature=this.destroyBean(this.selectAllFeature)})}getSelectAllGui(){return this.selectAllFeature?.getCheckboxGui()}handleKeyDown(z){if(super.handleKeyDown(z),z.key===R.SPACE)this.selectAllFeature?.onSpaceKeyDown(z);else if(z.key===R.ENTER)this.onEnterKeyDown(z);else if(z.key===R.DOWN&&z.altKey)this.showMenuOnKeyPress(z,!1)}onEnterKeyDown(z){let{column:J,gos:Q,sortable:Z,beans:$}=this,X=!1;if(z.ctrlKey||z.metaKey)X=this.showMenuOnKeyPress(z,!0);if(!X){if(!z.altKey&&e4(Q))$.rangeSvc?.handleColumnSelection(J,z);else if(Z)$.sortSvc?.progressSort(J,z.shiftKey,"uiColumnSorted")}}showMenuOnKeyPress(z,J){let Q=this.comp.getUserCompInstance();if(!l7(Q))return!1;if(Q.onMenuKeyboardShortcut(J))return z.preventDefault(),!0;return!1}onFocusIn(z){if(!this.eGui.contains(z.relatedTarget))this.focusThis(),this.announceAriaDescription();if(l1())this.setActiveHeader(!0)}onFocusOut(z){if(this.eGui.contains(z.relatedTarget))return;this.setActiveHeader(!1)}setupTooltip(z,J){this.tooltipFeature=this.beans.tooltipSvc?.setupHeaderTooltip(this.tooltipFeature,this,z,J)}setupStylesFromColDef(){this.setRefreshFunction("headerStyles",this.refreshHeaderStyles.bind(this)),this.refreshHeaderStyles()}setupClassesFromColDef(){let z=()=>{let J=this.column.colDef,Q=OJ(J,this.gos,this.column,null),Z=this.userHeaderClasses;this.userHeaderClasses=new Set(Q);for(let $ of Q)if(Z.has($))Z.delete($);else this.comp.toggleCss($,!0);for(let $ of Z)this.comp.toggleCss($,!1)};this.setRefreshFunction("headerClasses",z),z()}setDragSource(z){if(this.dragSourceElement=z,this.removeDragSource(),!z||!this.draggable)return;this.dragSource=this.beans.colMoves?.setDragSourceForHeader(z,this.column,this.displayName)??null}updateState(){let{menuSvc:z}=this.beans;this.menuEnabled=!!z?.isColumnMenuInHeaderEnabled(this.column),this.openFilterEnabled=!!z?.isFilterMenuInHeaderEnabled(this.column),this.sortable=this.column.isSortable(),this.displayName=this.calculateDisplayName(),this.draggable=this.workOutDraggable()}setRefreshFunction(z,J){this.refreshFunctions[z]=J}refresh(){this.updateState(),this.refreshHeaderComp(),this.refreshAria();for(let z of Object.values(this.refreshFunctions))z()}refreshHeaderComp(){let z=this.lookupUserCompDetails();if(!z)return;if(this.comp.getUserCompInstance()!=null&&this.userCompDetails.componentClass==z.componentClass?this.attemptHeaderCompRefresh(z.params):!1)this.setDragSource(this.dragSourceElement);else this.setCompDetails(z)}attemptHeaderCompRefresh(z){let J=this.comp.getUserCompInstance();if(!J)return!1;if(!J.refresh)return!1;return J.refresh(z)}calculateDisplayName(){return this.beans.colNames.getDisplayNameForColumn(this.column,"header",!0)}checkDisplayName(){if(this.displayName!==this.calculateDisplayName())this.refresh()}workOutDraggable(){let z=this.column.colDef;return!this.gos.get("suppressMovableColumns")&&!z.suppressMovable&&!z.lockPosition||!!z.enableRowGroup||!!z.enablePivot}setupWidth(z){let J=()=>{let Q=this.column.getActualWidth();this.comp.setWidth(`${Q}px`)};z.addManagedListeners(this.column,{widthChanged:J}),J()}setupMovingCss(z){let J=()=>{this.comp.toggleCss("ag-header-cell-moving",this.column.isMoving())};z.addManagedListeners(this.column,{movingChanged:J}),J()}setupMenuClass(z){let J=()=>{this.comp?.toggleCss("ag-column-menu-visible",this.column.isMenuVisible())};z.addManagedListeners(this.column,{menuVisibleChanged:J}),J()}setupSortableClass(z){let J=()=>{this.comp.toggleCss("ag-header-cell-sortable",!!this.sortable)};J(),this.setRefreshFunction("updateSortable",J),z.addManagedEventListeners({sortChanged:this.refreshAriaSort.bind(this)})}setupFilterClass(z){let J=()=>{let Q=this.column.isFilterActive();this.comp.toggleCss("ag-header-cell-filtered",Q),this.refreshAria()};z.addManagedListeners(this.column,{filterActiveChanged:J}),J()}setupWrapTextClass(){let z=()=>{let J=!!this.column.getColDef().wrapHeaderText;this.comp.toggleCss("ag-header-cell-wrap-text",J)};z(),this.setRefreshFunction("wrapText",z)}onHeaderHighlightChanged(){let z=this.column.getHighlighted(),J=z===0,Q=z===1;this.comp.toggleCss("ag-header-highlight-before",J),this.comp.toggleCss("ag-header-highlight-after",Q)}onDisplayedColumnsChanged(){if(super.onDisplayedColumnsChanged(),!this.isAlive())return;this.onHeaderHeightChanged()}onHeaderHeightChanged(){this.refreshSpanHeaderHeight()}refreshSpanHeaderHeight(){let{eGui:z,column:J,comp:Q,beans:Z}=this,$=_5(this.beans),X=$.reduce((q,B)=>q+B,0)===0;if(Q.toggleCss("ag-header-parent-hidden",X),!J.isSpanHeaderHeight()){z.style.removeProperty("top"),z.style.removeProperty("height"),Q.toggleCss("ag-header-span-height",!1),Q.toggleCss("ag-header-span-total",!1);return}let{numberOfParents:Y,isSpanningTotal:U}=this.column.getColumnGroupPaddingInfo();Q.toggleCss("ag-header-span-height",Y>0);let _=H5(Z);if(Y===0){Q.toggleCss("ag-header-span-total",!1),z.style.setProperty("top","0px"),z.style.setProperty("height",`${_}px`);return}Q.toggleCss("ag-header-span-total",U);let H=(this.column.getFirstRealParent()?.getLevel()??-1)+1,G=$.length-H,W=0;for(let q=0;q<G;q++)W+=$[$.length-1-q];z.style.setProperty("top",`${-W}px`),z.style.setProperty("height",`${_+W}px`)}refreshAriaSort(){let z=null,{beans:J,column:Q,comp:Z,sortable:$,gos:X}=this;if($){let Y=this.getLocaleTextFunc(),U=J.sortSvc?.getDisplaySortForColumn(Q)??null;Z.setAriaSort(l_(U)),z=e4(X)?Y("ariaSortableColumnWithCellSelection","Press ALT ENTER to sort"):Y("ariaSortableColumn","Press ENTER to sort")}else Z.setAriaSort();this.setAriaDescriptionProperty("sort",z)}refreshAriaMenu(){let z=null;if(this.menuEnabled)z=this.getLocaleTextFunc()("ariaMenuColumn","Press ALT DOWN to open column menu");this.setAriaDescriptionProperty("menu",z)}refreshAriaFilterButton(){let z=null,{openFilterEnabled:J,gos:Q}=this;if(J&&!F0(Q))z=this.getLocaleTextFunc()("ariaFilterColumn","Press CTRL ENTER to open filter");this.setAriaDescriptionProperty("filterButton",z)}refreshAriaFiltered(){let z=null;if(this.column.isFilterActive())z=this.getLocaleTextFunc()("ariaColumnFiltered","Column Filtered");this.setAriaDescriptionProperty("filter",z)}refreshAriaCellSelection(){let z=null,{gos:J,column:Q}=this;if(e4(J)&&!w0(Q))z=this.getLocaleTextFunc()("ariaColumnCellSelection","Press Enter to toggle selection for all visible cells in this column");this.setAriaDescriptionProperty("cellSelection",z)}setAriaDescriptionProperty(z,J){let Q=this.ariaDescriptionProperties;if(J!=null)Q.set(z,J);else Q.delete(z)}announceAriaDescription(){let{beans:z,eGui:J,ariaDescriptionProperties:Q}=this;if(!J.contains(d(z)))return;let Z=Array.from(Q.keys()).sort(($,X)=>$==="filter"?-1:X.charCodeAt(0)-$.charCodeAt(0)).map(($)=>Q.get($)).join(". ");z.ariaAnnounce?.announceValue(Z,"columnHeader")}refreshAria(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFilterButton(),this.refreshAriaFiltered(),this.refreshAriaCellSelection()}addColumnHoverListener(z){this.beans.colHover?.addHeaderColumnHoverListener(z,this.comp,this.column)}addActiveHeaderMouseListeners(z){let J=($)=>this.handleMouseOverChange($.type==="mouseenter"),Q=()=>{this.setActiveHeader(!0),this.dispatchColumnMouseEvent("columnHeaderClicked",this.column)},Z=($)=>this.handleContextMenuMouseEvent($,void 0,this.column);z.addManagedListeners(this.eGui,{mouseenter:J,mouseleave:J,click:Q,contextmenu:Z})}handleMouseOverChange(z){this.setActiveHeader(z),this.eventSvc.dispatchEvent({type:z?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column})}setActiveHeader(z){this.comp.toggleCss("ag-header-active",z)}getAnchorElementForMenu(z){let J=this.comp.getUserCompInstance();if(l7(J))return J.getAnchorElementForMenu(z);return this.eGui}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function l7(z){return typeof z?.getAnchorElementForMenu==="function"&&typeof z.onMenuKeyboardShortcut==="function"}var gW=0,PQ=class extends j{constructor(z,J,Q){super();this.rowIndex=z,this.pinned=J,this.type=Q,this.instanceId=gW++,this.comp=null,this.allCtrls=[];let Z="ag-header-row-column";if(Q==="group")Z="ag-header-row-group";else if(Q==="filter")Z="ag-header-row-filter";this.headerRowClass=`ag-header-row ${Z}`}setRowIndex(z){this.rowIndex=z,this.comp?.setRowIndex(this.getAriaRowIndex()),this.onRowHeightChanged()}postConstruct(){this.isPrintLayout=T0(this.gos,"print"),this.isEnsureDomOrder=this.gos.get("ensureDomOrder")}areCellsRendered(){if(!this.comp)return!1;return this.allCtrls.every((z)=>z.eGui!=null)}setComp(z,J,Q=!0){if(this.comp=z,J=l2(this,this.beans.context,J),Q)this.setRowIndex(this.rowIndex),this.onVirtualColumnsChanged();this.setWidth(),this.addEventListeners(J)}getAriaRowIndex(){return this.rowIndex+1}addEventListeners(z){let J=this.onRowHeightChanged.bind(this),Q=this.onDisplayedColumnsChanged.bind(this);z.addManagedEventListeners({columnResized:this.setWidth.bind(this),displayedColumnsChanged:Q,virtualColumnsChanged:(Z)=>this.onVirtualColumnsChanged(Z.afterScroll),columnGroupHeaderHeightChanged:J,columnHeaderHeightChanged:J,stylesChanged:J,advancedFilterEnabledChanged:J}),z.addManagedPropertyListener("domLayout",Q),z.addManagedPropertyListener("ensureDomOrder",(Z)=>this.isEnsureDomOrder=Z.currentValue),z.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],J)}onDisplayedColumnsChanged(){this.isPrintLayout=T0(this.gos,"print"),this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()}setWidth(){if(!this.comp)return;let z=this.getWidthForRow();this.comp.setWidth(`${z}px`)}getWidthForRow(){let{visibleCols:z}=this.beans;if(this.isPrintLayout){if(this.pinned!=null)return 0;return z.getContainerWidth("right")+z.getContainerWidth("left")+z.getContainerWidth(null)}return z.getContainerWidth(this.pinned)}onRowHeightChanged(){if(!this.comp)return;let{topOffset:z,rowHeight:J}=this.getTopAndHeight();this.comp.setTop(z+"px"),this.comp.setHeight(J+"px")}getTopAndHeight(){let z=0,J=_5(this.beans);for(let $=0;$<J.length;$++){if($===this.rowIndex&&this.type==="group")return{topOffset:z,rowHeight:J[$]};z+=J[$]}let Q=H5(this.beans);if(this.type==="column")return{topOffset:z,rowHeight:Q};z+=Q;let Z=P$(this.beans);return{topOffset:z,rowHeight:Z}}onVirtualColumnsChanged(z=!1){if(!this.comp)return;let J=this.getUpdatedHeaderCtrls(),Q=this.isEnsureDomOrder||this.isPrintLayout;this.comp.setHeaderCtrls(J,Q,z)}getUpdatedHeaderCtrls(){let z=this.ctrlsById;this.ctrlsById=new Map;let J=this.getColumnsInViewport();for(let Z of J)this.recycleAndCreateHeaderCtrls(Z,this.ctrlsById,z);let Q=(Z)=>{let{focusSvc:$,visibleCols:X}=this.beans;if(!$.isHeaderWrapperFocused(Z))return!1;return X.isVisible(Z.column)};if(z)for(let[Z,$]of z)if(Q($))this.ctrlsById.set(Z,$);else this.destroyBean($);return this.allCtrls=Array.from(this.ctrlsById.values()),this.allCtrls}getHeaderCellCtrls(){return this.allCtrls}recycleAndCreateHeaderCtrls(z,J,Q){if(z.isEmptyGroup())return;let Z=z.getUniqueId(),$;if(Q)$=Q.get(Z),Q.delete(Z);if($&&$.column!=z)this.destroyBean($),$=void 0;if($==null)switch(this.type){case"filter":{$=this.createBean(this.beans.registry.createDynamicBean("headerFilterCellCtrl",!0,z,this));break}case"group":$=this.createBean(this.beans.registry.createDynamicBean("headerGroupCellCtrl",!0,z,this));break;default:$=this.createBean(new bW(z,this));break}J.set(Z,$)}getColumnsInViewport(){if(!this.isPrintLayout)return this.getComponentsToRender();if(this.pinned)return[];let z=[];for(let J of["left",null,"right"])z.push(...this.getComponentsToRender(J));return z}getComponentsToRender(z=this.pinned){if(this.type==="group")return this.beans.colViewport.getHeadersToRender(z,this.rowIndex);return this.beans.colViewport.getColumnHeadersToRender(z)}focusHeader(z,J){let Q=this.allCtrls.find(($)=>$.column==z);if(!Q)return!1;return Q.focus(J)}destroy(){this.allCtrls=this.destroyBeans(this.allCtrls),this.ctrlsById=void 0,this.comp=null,super.destroy()}},hW=class extends j{constructor(z){super();this.pinned=z,this.hidden=!1,this.includeFloatingFilter=!1,this.groupsRowCtrls=[]}setComp(z,J){this.comp=z,this.eViewport=J;let{pinnedCols:Q,ctrlsSvc:Z,colModel:$,colMoves:X}=this.beans;this.setupCenterWidth(),Q?.setupHeaderPinnedWidth(this),this.setupDragAndDrop(X,this.eViewport);let Y=this.refresh.bind(this,!0);this.addManagedEventListeners({displayedColumnsChanged:Y,advancedFilterEnabledChanged:Y});let U=`${typeof this.pinned==="string"?this.pinned:"center"}Header`;if(Z.register(U,this),$.ready)this.refresh()}getAllCtrls(){let z=[...this.groupsRowCtrls];if(this.columnsRowCtrl)z.push(this.columnsRowCtrl);if(this.filtersRowCtrl)z.push(this.filtersRowCtrl);return z}refresh(z=!1){let{focusSvc:J,filterManager:Q,visibleCols:Z}=this.beans,$=0,X=J.getFocusHeaderToUseAfterRefresh(),Y=()=>{let W=Z.headerGroupRowCount;if($=W,!z)this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls);let q=this.groupsRowCtrls.length;if(q===W)return;if(q>W){for(let B=W;B<q;B++)this.destroyBean(this.groupsRowCtrls[B]);this.groupsRowCtrls.length=W;return}for(let B=q;B<W;B++){let E=this.createBean(new PQ(B,this.pinned,"group"));this.groupsRowCtrls.push(E)}},U=()=>{let W=$++;if(this.hidden){this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl);return}if(this.columnsRowCtrl==null||!z)this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl),this.columnsRowCtrl=this.createBean(new PQ(W,this.pinned,"column"));else if(this.columnsRowCtrl.rowIndex!==W)this.columnsRowCtrl.setRowIndex(W)},_=()=>{this.includeFloatingFilter=!!Q?.hasFloatingFilters()&&!this.hidden;let W=()=>{this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)};if(!this.includeFloatingFilter){W();return}if(!z)W();let q=$++;if(this.filtersRowCtrl){if(this.filtersRowCtrl.rowIndex!==q)this.filtersRowCtrl.setRowIndex(q)}else this.filtersRowCtrl=this.createBean(new PQ(q,this.pinned,"filter"))},H=this.getAllCtrls();Y(),U(),_();let G=this.getAllCtrls();if(this.comp.setCtrls(G),this.restoreFocusOnHeader(J,X),H.length!==G.length)this.beans.eventSvc.dispatchEvent({type:"headerRowsChanged"})}getHeaderCtrlForColumn(z){let J=(Q)=>Q?.getHeaderCellCtrls().find((Z)=>Z.column===z);if(H4(z))return J(this.columnsRowCtrl);if(this.groupsRowCtrls.length===0)return;for(let Q=0;Q<this.groupsRowCtrls.length;Q++){let Z=J(this.groupsRowCtrls[Q]);if(Z)return Z}}getHtmlElementForColumnHeader(z){return this.getHeaderCtrlForColumn(z)?.eGui??null}getRowType(z){return this.getAllCtrls()[z]?.type}focusHeader(z,J,Q){let $=this.getAllCtrls()[z];if(!$)return!1;return $.focusHeader(J,Q)}getGroupRowCount(){return this.groupsRowCtrls.length}getGroupRowCtrlAtIndex(z){return this.groupsRowCtrls[z]}getRowCount(){return this.groupsRowCtrls.length+(this.columnsRowCtrl?1:0)+(this.filtersRowCtrl?1:0)}setHorizontalScroll(z){this.comp.setViewportScrollLeft(z)}onScrollCallback(z){this.addManagedElementListeners(this.eViewport,{scroll:z})}destroy(){this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl),this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl),this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls),super.destroy()}setupDragAndDrop(z,J){let Q=z?.createBodyDropTarget(this.pinned,J);if(Q)this.createManagedBean(Q)}restoreFocusOnHeader(z,J){if(!J)return;let{column:Q}=J;if(Q.getPinned()!=this.pinned)return;z.focusHeaderPosition({headerPosition:J,scroll:!1})}setupCenterWidth(){if(this.pinned!=null)return;this.createManagedBean(new W5((z)=>this.comp.setCenterWidth(`${z}px`),!0))}},uW={tag:"div",cls:"ag-pinned-left-header",role:"rowgroup"},mW={tag:"div",cls:"ag-pinned-right-header",role:"rowgroup"},cW={tag:"div",cls:"ag-header-viewport",role:"rowgroup",attrs:{tabindex:"-1"},children:[{tag:"div",ref:"eCenterContainer",cls:"ag-header-container",role:"presentation"}]},TQ=class extends y{constructor(z){super();this.eCenterContainer=P,this.headerRowComps={},this.rowCompsList=[],this.pinned=z}postConstruct(){this.selectAndSetTemplate();let z={setDisplayed:(Q)=>this.setDisplayed(Q),setCtrls:(Q)=>this.setCtrls(Q),setCenterWidth:(Q)=>this.eCenterContainer.style.width=Q,setViewportScrollLeft:(Q)=>this.getGui().scrollLeft=Q,setPinnedContainerWidth:(Q)=>{let Z=this.getGui();Z.style.width=Q,Z.style.maxWidth=Q,Z.style.minWidth=Q}};this.createManagedBean(new hW(this.pinned)).setComp(z,this.getGui())}selectAndSetTemplate(){let z=this.pinned=="left",J=this.pinned=="right",Q=z?uW:J?mW:cW;this.setTemplate(Q),this.eRowContainer=this.eCenterContainer!==P?this.eCenterContainer:this.getGui()}destroy(){this.setCtrls([]),super.destroy()}destroyRowComp(z){this.destroyBean(z),z.getGui().remove()}setCtrls(z){let J=this.headerRowComps;this.headerRowComps={},this.rowCompsList=[];let Q,Z=($)=>{let X=$.getGui();if(X.parentElement!=this.eRowContainer)this.eRowContainer.appendChild(X);if(Q)L9(this.eRowContainer,X,Q);Q=X};for(let $ of z){let X=$.instanceId,Y=J[X];delete J[X];let U=Y?Y:this.createBean(new vW($));this.headerRowComps[X]=U,this.rowCompsList.push(U),Z(U)}for(let $ of Object.values(J))this.destroyRowComp($)}},pW={tag:"div",cls:"ag-header",role:"presentation"},iW=class extends y{constructor(){super(pW)}postConstruct(){let z={toggleCss:(Z,$)=>this.toggleCss(Z,$),setHeightAndMinHeight:(Z)=>{this.getGui().style.height=Z,this.getGui().style.minHeight=Z}};this.createManagedBean(new PW).setComp(z,this.getGui(),this.getFocusableElement());let Q=(Z)=>{this.createManagedBean(Z),this.appendChild(Z)};Q(new TQ("left")),Q(new TQ(null)),Q(new TQ("right"))}},dW={selector:"AG-HEADER-ROOT",component:iW},R4={AUTO_HEIGHT:"ag-layout-auto-height",NORMAL:"ag-layout-normal",PRINT:"ag-layout-print"},E5=class extends j{constructor(z){super();this.view=z}postConstruct(){this.addManagedPropertyListener("domLayout",this.updateLayoutClasses.bind(this)),this.updateLayoutClasses()}updateLayoutClasses(){let z=this.gos.get("domLayout"),J={autoHeight:z==="autoHeight",normal:z==="normal",print:z==="print"},Q=J.autoHeight?R4.AUTO_HEIGHT:J.print?R4.PRINT:R4.NORMAL;this.view.updateLayoutClasses(Q,J)}},k$=class extends y{constructor(z,J){super();this.direction=J,this.eViewport=P,this.eContainer=P,this.hideTimeout=0,this.setTemplate(z)}postConstruct(){this.addManagedEventListeners({scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this)}),this.onScrollVisibilityChanged(),this.toggleCss("ag-apple-scrollbar",q$()||zz())}destroy(){super.destroy(),window.clearTimeout(this.hideTimeout)}initialiseInvisibleScrollbar(){if(this.invisibleScrollbar!==void 0)return;if(this.invisibleScrollbar=E$(),this.invisibleScrollbar)this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles()}addActiveListenerToggles(){let z=this.getGui(),J=()=>this.toggleCss("ag-scrollbar-active",!0),Q=()=>this.toggleCss("ag-scrollbar-active",!1);this.addManagedListeners(z,{mouseenter:J,mousedown:J,touchstart:J,mouseleave:Q,touchend:Q})}onScrollVisibilityChanged(){if(this.invisibleScrollbar===void 0)this.initialiseInvisibleScrollbar();I4(this.beans,()=>this.setScrollVisible())}hideAndShowInvisibleScrollAsNeeded(){this.addManagedEventListeners({bodyScroll:(z)=>{if(z.direction===this.direction){if(this.hideTimeout)window.clearTimeout(this.hideTimeout),this.hideTimeout=0;this.toggleCss("ag-scrollbar-scrolling",!0)}},bodyScrollEnd:()=>{this.hideTimeout=window.setTimeout(()=>{this.toggleCss("ag-scrollbar-scrolling",!1),this.hideTimeout=0},400)}})}attemptSettingScrollPosition(z){let J=this.eViewport;bZ(this,()=>B0(J),()=>this.setScrollPosition(z),100)}onScrollCallback(z){this.addManagedElementListeners(this.eViewport,{scroll:z})}},nW={tag:"div",cls:"ag-body-horizontal-scroll",attrs:{"aria-hidden":"true"},children:[{tag:"div",ref:"eLeftSpacer",cls:"ag-horizontal-left-spacer"},{tag:"div",ref:"eViewport",cls:"ag-body-horizontal-scroll-viewport",children:[{tag:"div",ref:"eContainer",cls:"ag-body-horizontal-scroll-container"}]},{tag:"div",ref:"eRightSpacer",cls:"ag-horizontal-right-spacer"}]},rW=class extends k${constructor(){super(nW,"horizontal");this.eLeftSpacer=P,this.eRightSpacer=P,this.setScrollVisibleDebounce=0}wireBeans(z){this.visibleCols=z.visibleCols,this.scrollVisibleSvc=z.scrollVisibleSvc}postConstruct(){super.postConstruct();let z=this.setFakeHScrollSpacerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:z,displayedColumnsWidthChanged:z,pinnedRowDataChanged:this.refreshCompBottom.bind(this)}),this.addManagedPropertyListener("domLayout",z),this.beans.ctrlsSvc.register("fakeHScrollComp",this),this.createManagedBean(new W5((J)=>this.eContainer.style.width=`${J}px`)),this.addManagedPropertyListeners(["suppressHorizontalScroll"],this.onScrollVisibilityChanged.bind(this))}destroy(){window.clearTimeout(this.setScrollVisibleDebounce),super.destroy()}initialiseInvisibleScrollbar(){if(this.invisibleScrollbar!==void 0)return;if(this.enableRtl=this.gos.get("enableRtl"),super.initialiseInvisibleScrollbar(),this.invisibleScrollbar)this.refreshCompBottom()}refreshCompBottom(){if(!this.invisibleScrollbar)return;let z=this.beans.pinnedRowModel?.getPinnedBottomTotalHeight()??0;this.getGui().style.bottom=`${z}px`}onScrollVisibilityChanged(){super.onScrollVisibilityChanged(),this.setFakeHScrollSpacerWidths()}setFakeHScrollSpacerWidths(){let z=this.scrollVisibleSvc.verticalScrollShowing,J=this.visibleCols.getDisplayedColumnsRightWidth(),Q=!this.enableRtl&&z,Z=this.scrollVisibleSvc.getScrollbarWidth();if(Q)J+=Z;h4(this.eRightSpacer,J),this.eRightSpacer.classList.toggle("ag-scroller-corner",J<=Z);let $=this.visibleCols.getColsLeftWidth();if(this.enableRtl&&z)$+=Z;h4(this.eLeftSpacer,$),this.eLeftSpacer.classList.toggle("ag-scroller-corner",$<=Z)}setScrollVisible(){let z=this.scrollVisibleSvc.horizontalScrollShowing,J=this.invisibleScrollbar,Q=this.gos.get("suppressHorizontalScroll"),Z=z?this.scrollVisibleSvc.getScrollbarWidth()||0:0,X=!Q?Z===0&&J?16:Z:0,Y=()=>{if(this.setScrollVisibleDebounce=0,this.toggleCss("ag-scrollbar-invisible",J),R2(this.getGui(),X),R2(this.eViewport,X),R2(this.eContainer,X),!X)this.eContainer.style.setProperty("min-height","1px");this.setVisible(z,{skipAriaHidden:!0})};if(window.clearTimeout(this.setScrollVisibleDebounce),!z)Y();else this.setScrollVisibleDebounce=window.setTimeout(Y,100)}getScrollPosition(){return m6(this.eViewport,this.enableRtl)}setScrollPosition(z){if(!B0(this.eViewport))this.attemptSettingScrollPosition(z);c6(this.eViewport,z,this.enableRtl)}},tW={selector:"AG-FAKE-HORIZONTAL-SCROLL",component:rW},C$=class extends j{constructor(z,J){super();this.eContainer=z,this.eViewport=J}postConstruct(){this.addManagedEventListeners({rowContainerHeightChanged:this.onHeightChanged.bind(this,this.beans.rowContainerHeight)})}onHeightChanged(z){let J=z.uiContainerHeight,Q=J!=null?`${J}px`:"";if(this.eContainer.style.height=Q,this.eViewport)this.eViewport.style.height=Q}},sW={tag:"div",cls:"ag-body-vertical-scroll",attrs:{"aria-hidden":"true"},children:[{tag:"div",ref:"eViewport",cls:"ag-body-vertical-scroll-viewport",children:[{tag:"div",ref:"eContainer",cls:"ag-body-vertical-scroll-container"}]}]},lW=class extends k${constructor(){super(sW,"vertical")}postConstruct(){super.postConstruct(),this.createManagedBean(new C$(this.eContainer));let{ctrlsSvc:z}=this.beans;z.register("fakeVScrollComp",this),this.addManagedEventListeners({rowContainerHeightChanged:this.onRowContainerHeightChanged.bind(this,z)})}setScrollVisible(){let{scrollVisibleSvc:z}=this.beans,J=z.verticalScrollShowing,Q=this.invisibleScrollbar,Z=J?z.getScrollbarWidth()||0:0,$=Z===0&&Q?16:Z;this.toggleCss("ag-scrollbar-invisible",Q),h4(this.getGui(),$),h4(this.eViewport,$),h4(this.eContainer,$),this.setDisplayed(J,{skipAriaHidden:!0})}onRowContainerHeightChanged(z){let Q=z.getGridBodyCtrl().eBodyViewport,Z=this.getScrollPosition(),$=Q.scrollTop;if(Z!=$)this.setScrollPosition($,!0)}getScrollPosition(){return this.eViewport.scrollTop}setScrollPosition(z,J){if(!J&&!B0(this.eViewport))this.attemptSettingScrollPosition(z);this.eViewport.scrollTop=z}},aW={selector:"AG-FAKE-VERTICAL-SCROLL",component:lW};var Wz="Viewport",a7="fakeVScrollComp",SQ=["fakeHScrollComp","centerHeader","topCenter","bottomCenter","stickyTopCenter","stickyBottomCenter"],o7=100,IQ=150,oW=class extends j{constructor(z){super();this.clearRetryListenerFncs=[],this.lastScrollSource=[null,null],this.scrollLeft=-1,this.nextScrollTop=-1,this.scrollTop=-1,this.lastOffsetHeight=-1,this.lastScrollTop=-1,this.lastIsHorizontalScrollShowing=!1,this.scrollTimer=0,this.isScrollActive=!1,this.isVerticalPositionInvalidated=!0,this.isHorizontalPositionInvalidated=!0,this.eBodyViewport=z,this.resetLastHScrollDebounced=i0(this,()=>this.lastScrollSource[1]=null,IQ),this.resetLastVScrollDebounced=i0(this,()=>this.lastScrollSource[0]=null,IQ)}wireBeans(z){this.ctrlsSvc=z.ctrlsSvc,this.animationFrameSvc=z.animationFrameSvc,this.visibleCols=z.visibleCols}destroy(){super.destroy(),this.clearRetryListenerFncs=[],window.clearTimeout(this.scrollTimer)}postConstruct(){this.enableRtl=this.gos.get("enableRtl");let z=this.invalidateVerticalScroll.bind(this),J=this.invalidateHorizontalScroll.bind(this);this.addManagedEventListeners({displayedColumnsWidthChanged:this.onDisplayedColumnsWidthChanged.bind(this),bodyHeightChanged:z,scrollGapChanged:J}),this.addManagedElementListeners(this.eBodyViewport,{scroll:z}),this.ctrlsSvc.whenReady(this,(Q)=>{this.centerRowsCtrl=Q.center,this.fakeVScrollComp=Q.fakeVScrollComp,this.fakeHScrollComp=Q.fakeHScrollComp,this.onDisplayedColumnsWidthChanged(),this.addScrollListener()})}invalidateHorizontalScroll(){this.isHorizontalPositionInvalidated=!0}invalidateVerticalScroll(){this.isVerticalPositionInvalidated=!0}addScrollListener(){this.addHorizontalScrollListeners(),this.addVerticalScrollListeners()}addHorizontalScrollListeners(){this.addManagedElementListeners(this.centerRowsCtrl.eViewport,{scroll:this.onHScroll.bind(this,Wz)});for(let z of SQ){let J=this.ctrlsSvc.get(z);this.registerScrollPartner(J,this.onHScroll.bind(this,z))}}addVerticalScrollListeners(){let z=this.gos.get("debounceVerticalScrollbar"),J=z?i0(this,this.onVScroll.bind(this,Wz),o7):this.onVScroll.bind(this,Wz),Q=z?i0(this,this.onVScroll.bind(this,a7),o7):this.onVScroll.bind(this,a7);this.addManagedElementListeners(this.eBodyViewport,{scroll:J}),this.registerScrollPartner(this.fakeVScrollComp,Q)}registerScrollPartner(z,J){z.onScrollCallback(J)}onDisplayedColumnsWidthChanged(){if(this.enableRtl)this.horizontallyScrollHeaderCenterAndFloatingCenter()}horizontallyScrollHeaderCenterAndFloatingCenter(z){if(this.centerRowsCtrl==null)return;if(z===void 0)z=this.centerRowsCtrl.getCenterViewportScrollLeft();this.setScrollLeftForAllContainersExceptCurrent(Math.abs(z))}setScrollLeftForAllContainersExceptCurrent(z){for(let J of[...SQ,Wz]){if(this.lastScrollSource[1]===J)continue;let Q=this.getViewportForSource(J);c6(Q,z,this.enableRtl)}}getViewportForSource(z){if(z===Wz)return this.centerRowsCtrl.eViewport;return this.ctrlsSvc.get(z).eViewport}isControllingScroll(z,J){if(this.lastScrollSource[J]==null){if(J===0)this.lastScrollSource[0]=z;else this.lastScrollSource[1]=z;return!0}return this.lastScrollSource[J]===z}onHScroll(z){if(!this.isControllingScroll(z,1))return;let J=this.centerRowsCtrl.eViewport,{scrollLeft:Q}=J;if(this.shouldBlockScrollUpdate(1,Q,!0))return;let Z=m6(this.getViewportForSource(z),this.enableRtl);this.doHorizontalScroll(Z),this.resetLastHScrollDebounced()}onVScroll(z){if(!this.isControllingScroll(z,0))return;let J=z===Wz?this.eBodyViewport.scrollTop:this.fakeVScrollComp.getScrollPosition(),Q=J;if(this.shouldBlockScrollUpdate(0,Q,!0))return;if(z===Wz)this.fakeVScrollComp.setScrollPosition(Q);else if(this.eBodyViewport.scrollTop=J,Q=this.eBodyViewport.scrollTop,this.invalidateVerticalScroll(),Q!==J)this.fakeVScrollComp.setScrollPosition(Q,!0);let{animationFrameSvc:Z}=this;if(Z?.setScrollTop(Q),this.nextScrollTop=Q,Z?.active)Z.schedule();else this.scrollGridIfNeeded(!0);this.resetLastVScrollDebounced()}doHorizontalScroll(z){let J=this.fakeHScrollComp.getScrollPosition();if(this.scrollLeft===z&&z===J)return;this.scrollLeft=z,this.fireScrollEvent(1),this.horizontallyScrollHeaderCenterAndFloatingCenter(z),this.centerRowsCtrl.onHorizontalViewportChanged(!0)}isScrolling(){return this.isScrollActive}fireScrollEvent(z){let J={type:"bodyScroll",direction:z===1?"horizontal":"vertical",left:this.scrollLeft,top:this.scrollTop};this.isScrollActive=!0,this.eventSvc.dispatchEvent(J),window.clearTimeout(this.scrollTimer),this.scrollTimer=window.setTimeout(()=>{this.scrollTimer=0,this.isScrollActive=!1,this.eventSvc.dispatchEvent({...J,type:"bodyScrollEnd"})},IQ)}shouldBlockScrollUpdate(z,J,Q=!1){if(Q&&!zz())return!1;if(z===0)return this.shouldBlockVerticalScroll(J);return this.shouldBlockHorizontalScroll(J)}shouldBlockVerticalScroll(z){let J=m2(this.eBodyViewport),{scrollHeight:Q}=this.eBodyViewport;return z<0||z+J>Q}shouldBlockHorizontalScroll(z){let J=this.centerRowsCtrl.getCenterWidth(),{scrollWidth:Q}=this.centerRowsCtrl.eViewport;if(this.enableRtl){if(z>0)return!0}else if(z<0)return!0;return Math.abs(z)+J>Q}redrawRowsAfterScroll(){this.fireScrollEvent(0)}checkScrollLeft(){let z=this.scrollLeft,J=!1;for(let Q of SQ)if(this.getViewportForSource(Q).scrollLeft!==z){J=!0;break}if(J)this.onHScroll(Wz)}scrollGridIfNeeded(z=!1){let J=this.scrollTop!=this.nextScrollTop;if(J){if(this.scrollTop=this.nextScrollTop,z)this.invalidateVerticalScroll();this.redrawRowsAfterScroll()}return J}setHorizontalScrollPosition(z,J=!1){let Z=this.centerRowsCtrl.eViewport.scrollWidth-this.centerRowsCtrl.getCenterWidth();if(!J&&this.shouldBlockScrollUpdate(1,z))if(this.enableRtl)z=z>0?0:Z;else z=Math.min(Math.max(z,0),Z);c6(this.centerRowsCtrl.eViewport,Math.abs(z),this.enableRtl),this.doHorizontalScroll(z)}setVerticalScrollPosition(z){this.invalidateVerticalScroll(),this.eBodyViewport.scrollTop=z}getVScrollPosition(){if(!this.isVerticalPositionInvalidated){let{lastOffsetHeight:Q,lastScrollTop:Z}=this;return{top:Z,bottom:Z+Q}}this.isVerticalPositionInvalidated=!1;let{scrollTop:z,offsetHeight:J}=this.eBodyViewport;return this.lastScrollTop=z,this.lastOffsetHeight=J,{top:z,bottom:z+J}}getApproximateVScollPosition(){if(this.lastScrollTop>=0&&this.lastOffsetHeight>=0)return{top:this.scrollTop,bottom:this.scrollTop+this.lastOffsetHeight};return this.getVScrollPosition()}getHScrollPosition(){return this.centerRowsCtrl.getHScrollPosition()}isHorizontalScrollShowing(){if(this.isHorizontalPositionInvalidated)this.lastIsHorizontalScrollShowing=this.centerRowsCtrl.isHorizontalScrollShowing(),this.isHorizontalPositionInvalidated=!1;return this.lastIsHorizontalScrollShowing}scrollHorizontally(z){let J=this.centerRowsCtrl.eViewport.scrollLeft;return this.setHorizontalScrollPosition(J+z),this.centerRowsCtrl.eViewport.scrollLeft-J}scrollToTop(){this.setVerticalScrollPosition(0)}ensureNodeVisible(z,J=null){let{rowModel:Q}=this.beans,Z=Q.getRowCount(),$=-1;for(let X=0;X<Z;X++){let Y=Q.getRow(X);if(typeof z==="function"){if(Y&&z(Y)){$=X;break}}else if(z===Y||z===Y.data){$=X;break}}if($>=0)this.ensureIndexVisible($,J)}ensureIndexVisible(z,J,Q=0){if(T0(this.gos,"print"))return;let{rowModel:Z}=this.beans,$=Z.getRowCount();if(typeof z!=="number"||z<0||z>=$){V(88,{index:z});return}this.clearRetryListeners();let{frameworkOverrides:X,pageBounds:Y,rowContainerHeight:U,rowRenderer:_}=this.beans;X.wrapIncoming(()=>{let H=this.ctrlsSvc.getGridBodyCtrl(),G=Z.getRow(z),W,q,B=0;this.invalidateVerticalScroll();do{let{stickyTopHeight:E,stickyBottomHeight:K}=H,F=G.rowTop,L=G.rowHeight,M=Y.getPixelOffset(),D=G.rowTop-M,A=D+G.rowHeight,O=this.getVScrollPosition(),T=U.divStretchOffset,S=O.top+T,k=O.bottom+T,C=k-S,w=U.getScrollPositionForPixel(D),m=U.getScrollPositionForPixel(A-C),g=Math.min((w+m)/2,D),e=S+E>D,t=k-K<A,u=null;if(J==="top")u=w-E;else if(J==="bottom")u=m+K;else if(J==="middle")u=g;else if(e)u=w-E;else if(t)if(m-w>C)u=w-E;else u=m+K;if(u!==null)this.setVerticalScrollPosition(u),_.redraw({afterScroll:!0});W=F!==G.rowTop||L!==G.rowHeight,q=E!==H.stickyTopHeight||K!==H.stickyBottomHeight,B++}while((W||q)&&B<10);if(this.animationFrameSvc?.flushAllFrames(),Q<10&&(G?.stub||!this.beans.rowAutoHeight?.areRowsMeasured())){let E=this.getVScrollPosition().top;this.clearRetryListenerFncs=this.addManagedEventListeners({bodyScroll:()=>{let K=this.getVScrollPosition().top;if(E===K)return;this.clearRetryListeners()},modelUpdated:()=>{if(this.clearRetryListeners(),z>=Z.getRowCount())return;this.ensureIndexVisible(z,J,Q+1)}})}})}clearRetryListeners(){for(let z of this.clearRetryListenerFncs)z();this.clearRetryListenerFncs=[]}ensureColumnVisible(z,J="auto"){let{colModel:Q,frameworkOverrides:Z}=this.beans,$=Q.getCol(z);if(!$)return;if($.isPinned())return;if(!this.visibleCols.isColDisplayed($))return;let X=this.getPositionedHorizontalScroll($,J);Z.wrapIncoming(()=>{if(X!==null)this.centerRowsCtrl.setCenterViewportScrollLeft(X);this.centerRowsCtrl.onHorizontalViewportChanged(),this.animationFrameSvc?.flushAllFrames()})}getPositionedHorizontalScroll(z,J){let{columnBeforeStart:Q,columnAfterEnd:Z}=this.isColumnOutsideViewport(z),$=this.centerRowsCtrl.getCenterWidth()<z.getActualWidth(),X=this.centerRowsCtrl.getCenterWidth(),Y=this.enableRtl,U=(Y?Q:Z)||$,_=Y?Z:Q;if(J!=="auto")U=J==="start",_=J==="end";let H=J==="middle";if(U||_||H){let{colLeft:G,colMiddle:W,colRight:q}=this.getColumnBounds(z);if(H)return W-X/2;if(U)return Y?q:G;return Y?G-X:q-X}return null}isColumnOutsideViewport(z){let{start:J,end:Q}=this.getViewportBounds(),{colLeft:Z,colRight:$}=this.getColumnBounds(z),X=this.enableRtl,Y=X?J>$:Q<$,U=X?Q<Z:J>Z;return{columnBeforeStart:Y,columnAfterEnd:U}}getColumnBounds(z){let J=this.enableRtl,Q=this.visibleCols.bodyWidth,Z=z.getActualWidth(),$=z.getLeft(),X=J?-1:1,Y=J?Q-$:$,U=Y+Z*X,_=Y+Z/2*X;return{colLeft:Y,colMiddle:_,colRight:U}}getViewportBounds(){let z=this.centerRowsCtrl.getCenterWidth(),J=this.centerRowsCtrl.getCenterViewportScrollLeft(),Q=J,Z=z+J;return{start:Q,end:Z,width:z}}},e7={horizontal:{overflow:(z)=>z.scrollWidth-z.clientWidth,scrollSize:(z)=>z.scrollWidth,clientSize:(z)=>z.clientWidth,opposite:"vertical"},vertical:{overflow:(z)=>z.scrollHeight-z.clientHeight,scrollSize:(z)=>z.scrollHeight,clientSize:(z)=>z.clientHeight,opposite:"horizontal"}};function eW(z,J,Q=z5()||0,Z,$){return v$(z,J,"horizontal",Q,Z,$)}function zq(z,J,Q=z5()||0,Z,$){return v$(z,J,"vertical",Q,Z,$)}function v$(z,J,Q,Z,$,X){let Y=e7[Q],U=e7[Y.opposite],_=$?B0($):!0,H=X?B0(X):!0,G=Y.overflow(z);if(G<=0)return!1;if(!J||Z===0)return!0;let W=U.overflow(J);if(W<=0)return!0;if(G<=Z){if(_&&H&&Jq({candidateOverflow:W,candidateScrollSize:U.scrollSize(J),candidateClientSize:U.clientSize(J),scrollbarWidth:Z}))return!1;let q=Y.clientSize(z)+Z;return Y.scrollSize(z)<=q}return!0}function Jq({candidateOverflow:z,candidateScrollSize:J,candidateClientSize:Q,scrollbarWidth:Z}){if(z<=0||z>Z)return!1;let $=Q+Z;return J>Q&&J<=$}var Qq=class extends j{constructor(z){super();this.centerContainerCtrl=z}wireBeans(z){this.scrollVisibleSvc=z.scrollVisibleSvc}postConstruct(){this.beans.ctrlsSvc.whenReady(this,(z)=>{this.gridBodyCtrl=z.gridBodyCtrl,this.listenForResize()}),this.addManagedEventListeners({scrollbarWidthChanged:this.onScrollbarWidthChanged.bind(this)}),this.addManagedPropertyListeners(["alwaysShowHorizontalScroll","alwaysShowVerticalScroll"],()=>{this.checkViewportAndScrolls()})}listenForResize(){let{beans:z,centerContainerCtrl:J,gridBodyCtrl:Q}=this,Z=()=>{I4(z,()=>{this.onCenterViewportResized()})};J.registerViewportResizeListener(Z),Q.registerBodyViewportResizeListener(Z)}onScrollbarWidthChanged(){this.checkViewportAndScrolls()}onCenterViewportResized(){if(this.scrollVisibleSvc.updateScrollGap(),this.centerContainerCtrl.isViewportInTheDOMTree()){let{pinnedCols:z,colFlex:J}=this.beans;z?.keepPinnedColumnsNarrowerThanViewport(),this.checkViewportAndScrolls();let Q=this.centerContainerCtrl.getCenterWidth();if(Q!==this.centerWidth)this.centerWidth=Q,J?.refreshFlexedColumns({viewportWidth:this.centerWidth,updateBodyWidths:!0,fireResizedEvent:!0})}else this.bodyHeight=0}checkViewportAndScrolls(){this.updateScrollVisibleService(),this.checkBodyHeight(),this.onHorizontalViewportChanged(),this.gridBodyCtrl.scrollFeature.checkScrollLeft()}getBodyHeight(){return this.bodyHeight}checkBodyHeight(){let z=this.gridBodyCtrl.eBodyViewport,J=m2(z);if(this.bodyHeight!==J)this.bodyHeight=J,this.eventSvc.dispatchEvent({type:"bodyHeightChanged"})}updateScrollVisibleService(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)}updateScrollVisibleServiceImpl(){if(!this.isAlive())return;let z={horizontalScrollShowing:this.centerContainerCtrl.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleSvc.setScrollsVisible(z)}onHorizontalViewportChanged(){let{centerContainerCtrl:z,beans:J}=this,Q=z.getCenterWidth(),Z=z.getViewportScrollLeft();J.colViewport.setScrollPosition(Q,Z)}};function N$(z){if(z.altKey||z.ctrlKey||z.metaKey)return!1;return z.key?.length===1}function w6(z,J,Q,Z){let $=J.getColDef().cellRendererParams?.suppressMouseEventHandling;return w$(z,J,Q,Z,$)}function Zq(z,J,Q,Z){let $=J?.suppressMouseEventHandling;return w$(z,void 0,Q,Z,$)}function w$(z,J,Q,Z,$){if(!$)return!1;return $(v(z,{column:J,node:Q,event:Z}))}function y$(z,J,Q){let Z=J;while(Z){let $=g9(z,Z,Q);if($)return $;Z=Z.parentElement}return null}var a6="cellCtrl";function a2(z,J){return y$(z,J,a6)}var o6="renderedRow";function K5(z,J){return y$(z,J,o6)}function _Z(z,J,Q,Z,$){let X=Z?Z.colDef.suppressKeyboardEvent:void 0;if(!X)return!1;let Y=v(z,{event:J,editing:$,column:Z,node:Q,data:Q.data,colDef:Z.colDef});if(X){if(X(Y))return!0}return!1}function $q(z){let{pinnedRowModel:J,rowModel:Q,rangeSvc:Z,visibleCols:$}=z;if(!Z||$.allCols.length===0)return;let X=J?.isEmpty("top")??!0,Y=J?.isEmpty("bottom")??!0,U=X?null:"top",_,H;if(Y)_=null,H=Q.getRowCount()-1;else _="bottom",H=J?.getPinnedBottomRowCount()??-1;Z.setCellRange({rowStartIndex:0,rowStartPinned:U,rowEndIndex:H,rowEndPinned:_})}var Xq=class extends j{constructor(z){super();this.element=z}postConstruct(){this.addKeyboardListeners(),this.addMouseListeners(),this.beans.touchSvc?.mockRowContextMenu(this),this.editSvc=this.beans.editSvc}addKeyboardListeners(){let J=this.processKeyboardEvent.bind(this,"keydown");this.addManagedElementListeners(this.element,{["keydown"]:J})}addMouseListeners(){let z="mousedown";if(tQ("pointerdown"))z="pointerdown";else if(tQ("touchstart"))z="touchstart";let J=["dblclick","contextmenu","mouseover","mouseout","click",z];for(let Q of J){let Z=this.processMouseEvent.bind(this,Q);this.addManagedElementListeners(this.element,{[Q]:Z})}}processMouseEvent(z,J){if(!S2(this.beans,J)||_4(J))return;let{cellCtrl:Q,rowCtrl:Z}=this.getControlsForEventTarget(J.target);if(z==="contextmenu"){if(Q?.column)Q.dispatchCellContextMenuEvent(J);this.beans.contextMenuSvc?.handleContextMenuMouseEvent(J,void 0,Z,Q)}else{if(Q)Q.onMouseEvent(z,J);if(Z)Z.onMouseEvent(z,J)}}getControlsForEventTarget(z){let{gos:J}=this;return{cellCtrl:a2(J,z),rowCtrl:K5(J,z)}}processKeyboardEvent(z,J){let{cellCtrl:Q,rowCtrl:Z}=this.getControlsForEventTarget(J.target);if(J.defaultPrevented)return;if(Q)this.processCellKeyboardEvent(Q,z,J);else if(Z?.isFullWidth())this.processFullWidthRowKeyboardEvent(Z,z,J)}processCellKeyboardEvent(z,J,Q){let Z=this.editSvc?.isEditing(z,{withOpenEditor:!0})??!1;if(!_Z(this.gos,Q,z.rowNode,z.column,Z)){if(J==="keydown"){if(!(!Z&&this.beans.navigation?.handlePageScrollingKey(Q)))z.onKeyDown(Q);if(this.doGridOperations(Q,Z),N$(Q))z.processCharacter(Q)}}if(J==="keydown")this.eventSvc.dispatchEvent(z.createEvent(Q,"cellKeyDown"))}processFullWidthRowKeyboardEvent(z,J,Q){let{rowNode:Z}=z,{focusSvc:$,navigation:X,notesSvc:Y}=this.beans,_=$.getFocusedCell()?.column;if(!_Z(this.gos,Q,Z,_,!1)&&J==="keydown")this.processFullWidthRowKeyDown(z,Q,_,X,Y);if(J==="keydown")this.eventSvc.dispatchEvent(z.createRowEvent("cellKeyDown",Q))}processFullWidthRowKeyDown(z,J,Q,Z=this.beans.navigation,$=this.beans.notesSvc){switch(J.key){case R.PAGE_HOME:case R.PAGE_END:case R.PAGE_UP:case R.PAGE_DOWN:Z?.handlePageScrollingKey(J,!0);return;case R.LEFT:case R.RIGHT:if(!this.gos.get("embedFullWidthRows"))return;case R.UP:case R.DOWN:z.onKeyboardNavigate(J);return;case R.F2:this.processFullWidthRowNoteShortcut(z,J,Q,$);return;case R.TAB:z.onTabKeyDown(J);return;default:}}processFullWidthRowNoteShortcut(z,J,Q,Z=this.beans.notesSvc){if(!J.shiftKey||!Z?.hasDataSource())return;let $=z.rowNode,X=z.findFullWidthInfoForEvent(J),Y;if(X){let{pinned:_}=X;Y={rowNode:$,location:"fullWidthRow",pinned:_==="left"||_==="right"?_:void 0}}else if(Q)Y={rowNode:$,column:Q};if(!Y)return;let U=Z.getNoteAccess(Y);if(!U)return;if(!U.isSuppressed||U.canView)Z.showNote(U.params,!0),J.preventDefault()}doGridOperations(z,J){if(!z.ctrlKey&&!z.metaKey)return;if(J)return;if(!S2(this.beans,z))return;let Q=Z$(z),{clipboardSvc:Z,undoRedo:$}=this.beans;if(Q===R.A)return this.onCtrlAndA(z);if(Q===R.C)return this.onCtrlAndC(Z,z);if(Q===R.D)return this.onCtrlAndD(Z,z);if(Q===R.V)return this.onCtrlAndV(Z,z);if(Q===R.X)return this.onCtrlAndX(Z,z);if(Q===R.Y)return this.onCtrlAndY($);if(Q===R.Z)return this.onCtrlAndZ($,z)}onCtrlAndA(z){let{beans:{rowModel:J,rangeSvc:Q,selectionSvc:Z},gos:$}=this;if(Q&&n0($)&&!lH($)&&J.isRowsToRender())$q(this.beans);else if(Z)Z.selectAllRowNodes({source:"keyboardSelectAll",selectAll:p9($)});z.preventDefault()}onCtrlAndC(z,J){if(!z||this.gos.get("enableCellTextSelection"))return;let{cellCtrl:Q}=this.getControlsForEventTarget(J.target);if(this.editSvc?.isEditing(Q,{withOpenEditor:!0}))return;J.preventDefault(),z.copyToClipboard()}onCtrlAndX(z,J){if(!z||this.gos.get("enableCellTextSelection")||this.gos.get("suppressCutToClipboard"))return;let{cellCtrl:Q}=this.getControlsForEventTarget(J.target);if(this.editSvc?.isEditing(Q,{withOpenEditor:!0}))return;J.preventDefault(),z.cutToClipboard(void 0,"ui")}onCtrlAndV(z,J){let{cellCtrl:Q}=this.getControlsForEventTarget(J.target);if(this.editSvc?.isEditing(Q,{withOpenEditor:!0}))return;if(z&&!this.gos.get("suppressClipboardPaste"))z.pasteFromClipboard()}onCtrlAndD(z,J){if(z&&!this.gos.get("suppressClipboardPaste"))z.copyRangeDown();J.preventDefault()}onCtrlAndZ(z,J){if(!this.gos.get("undoRedoCellEditing")||!z)return;if(J.preventDefault(),J.shiftKey)z.redo("ui");else z.undo("ui")}onCtrlAndY(z){z?.redo("ui")}},R6=(z)=>z.topRowCtrls,A6=(z)=>z.getStickyTopRowCtrls(),j6=(z)=>z.getStickyBottomRowCtrls(),V6=(z)=>z.bottomRowCtrls,O6=(z)=>z.allRowCtrls,fQ=(z)=>z.getCtrls("top"),kQ=(z)=>z.getCtrls("center"),CQ=(z)=>z.getCtrls("bottom"),Yq={center:{type:"center",name:"center-cols",getRowCtrls:O6,getSpannedRowCtrls:kQ},left:{type:"left",name:"pinned-left-cols",pinnedType:"left",getRowCtrls:O6,getSpannedRowCtrls:kQ},right:{type:"right",name:"pinned-right-cols",pinnedType:"right",getRowCtrls:O6,getSpannedRowCtrls:kQ},fullWidth:{type:"fullWidth",name:"full-width",fullWidth:!0,getRowCtrls:O6},topCenter:{type:"center",name:"floating-top",getRowCtrls:R6,getSpannedRowCtrls:fQ},topLeft:{type:"left",name:"pinned-left-floating",container:"ag-pinned-left-floating-top",pinnedType:"left",getRowCtrls:R6,getSpannedRowCtrls:fQ},topRight:{type:"right",name:"pinned-right-floating",container:"ag-pinned-right-floating-top",pinnedType:"right",getRowCtrls:R6,getSpannedRowCtrls:fQ},topFullWidth:{type:"fullWidth",name:"floating-top-full-width",fullWidth:!0,getRowCtrls:R6},stickyTopCenter:{type:"center",name:"sticky-top",getRowCtrls:A6},stickyTopLeft:{type:"left",name:"pinned-left-sticky-top",container:"ag-pinned-left-sticky-top",pinnedType:"left",getRowCtrls:A6},stickyTopRight:{type:"right",name:"pinned-right-sticky-top",container:"ag-pinned-right-sticky-top",pinnedType:"right",getRowCtrls:A6},stickyTopFullWidth:{type:"fullWidth",name:"sticky-top-full-width",fullWidth:!0,getRowCtrls:A6},stickyBottomCenter:{type:"center",name:"sticky-bottom",getRowCtrls:j6},stickyBottomLeft:{type:"left",name:"pinned-left-sticky-bottom",container:"ag-pinned-left-sticky-bottom",pinnedType:"left",getRowCtrls:j6},stickyBottomRight:{type:"right",name:"pinned-right-sticky-bottom",container:"ag-pinned-right-sticky-bottom",pinnedType:"right",getRowCtrls:j6},stickyBottomFullWidth:{type:"fullWidth",name:"sticky-bottom-full-width",fullWidth:!0,getRowCtrls:j6},bottomCenter:{type:"center",name:"floating-bottom",getRowCtrls:V6,getSpannedRowCtrls:CQ},bottomLeft:{type:"left",name:"pinned-left-floating-bottom",container:"ag-pinned-left-floating-bottom",pinnedType:"left",getRowCtrls:V6,getSpannedRowCtrls:CQ},bottomRight:{type:"right",name:"pinned-right-floating-bottom",container:"ag-pinned-right-floating-bottom",pinnedType:"right",getRowCtrls:V6,getSpannedRowCtrls:CQ},bottomFullWidth:{type:"fullWidth",name:"floating-bottom-full-width",fullWidth:!0,getRowCtrls:V6}};function x$(z){return`ag-${o2(z).name}-viewport`}function b$(z){let J=o2(z);return J.container??`ag-${J.name}-container`}function Uq(z){return`ag-${o2(z).name}-spanned-cells-container`}function o2(z){return Yq[z]}var _q=["topCenter","topLeft","topRight"],Hq=["bottomCenter","bottomLeft","bottomRight"],Gq=["center","left","right"],Wq=["center","left","right","fullWidth"],qq=["stickyTopCenter","stickyBottomCenter","center","topCenter","bottomCenter"],Bq=["left","bottomLeft","topLeft","stickyTopLeft","stickyBottomLeft"],Eq=["right","bottomRight","topRight","stickyTopRight","stickyBottomRight"],g$=["stickyTopCenter","stickyTopLeft","stickyTopRight"],h$=["stickyBottomCenter","stickyBottomLeft","stickyBottomRight"],Kq=[...g$,"stickyTopFullWidth",...h$,"stickyBottomFullWidth"],Fq=[..._q,...Hq,...Gq,...g$,...h$],Lq=class extends j{constructor(z){super();this.name=z,this.visible=!0,this.EMPTY_CTRLS=[],this.options=o2(z)}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.forContainers(["center"],()=>{this.viewportSizeFeature=this.createManagedBean(new Qq(this)),this.addManagedEventListeners({stickyTopOffsetChanged:this.onStickyTopOffsetChanged.bind(this)})})}onStickyTopOffsetChanged(z){this.comp.setOffsetTop(`${z.offset}px`)}registerWithCtrlsService(){if(this.options.fullWidth)return;this.beans.ctrlsSvc.register(this.name,this)}forContainers(z,J){if(z.indexOf(this.name)>=0)J()}setComp(z,J,Q,Z){this.comp=z,this.eContainer=J,this.eSpannedContainer=Q,this.eViewport=Z,this.createManagedBean(new Xq(this.eViewport??this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder();let{pinnedCols:$,rangeSvc:X}=this.beans,Y=()=>this.onPinnedWidthChanged();if(this.forContainers(Bq,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean($?.createPinnedWidthFeature(!0,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({leftPinnedWidthChanged:Y})}),this.forContainers(Eq,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean($?.createPinnedWidthFeature(!1,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({rightPinnedWidthChanged:Y})}),this.forContainers(Wq,()=>this.createManagedBean(new C$(this.eContainer,this.name==="center"?Z:void 0))),X)this.forContainers(Fq,()=>this.createManagedBean(X.createDragListenerFeature(this.eContainer)));this.forContainers(qq,()=>this.createManagedBean(new W5((U)=>this.comp.setContainerWidth(`${U}px`)))),this.visible=this.isContainerVisible(),this.addListeners(),this.registerWithCtrlsService()}onScrollCallback(z){this.addManagedElementListeners(this.eViewport,{scroll:z})}addListeners(){let{spannedRowRenderer:z,gos:J}=this.beans,Q=this.onDisplayedColumnsChanged.bind(this);if(this.addManagedEventListeners({displayedColumnsChanged:Q,displayedColumnsWidthChanged:Q,displayedRowsChanged:(Z)=>this.onDisplayedRowsChanged(Z.afterScroll)}),Q(),this.onDisplayedRowsChanged(),z&&this.options.getSpannedRowCtrls&&J.get("enableCellSpan"))this.addManagedListeners(z,{spannedRowsUpdated:()=>{let Z=this.options.getSpannedRowCtrls(z);if(!Z)return;this.comp.setSpannedRowCtrls(Z,!1)}})}listenOnDomOrder(){if(Kq.indexOf(this.name)>=0){this.comp.setDomOrder(!0);return}let J=()=>{let Q=this.gos.get("ensureDomOrder"),Z=T0(this.gos,"print");this.comp.setDomOrder(Q||Z)};this.addManagedPropertyListener("domLayout",J),J()}onDisplayedColumnsChanged(){this.forContainers(["center"],()=>this.onHorizontalViewportChanged())}addPreventScrollWhileDragging(){let{dragSvc:z}=this.beans;if(!z)return;let J=(Q)=>{if(z.dragging){if(Q.cancelable)Q.preventDefault()}};this.eContainer.addEventListener("touchmove",J,{passive:!1}),this.addDestroyFunc(()=>this.eContainer.removeEventListener("touchmove",J))}onHorizontalViewportChanged(z=!1){let J=this.getCenterWidth(),Q=this.getCenterViewportScrollLeft();this.beans.colViewport.setScrollPosition(J,Q,z)}hasHorizontalScrollGap(){return this.eContainer.clientWidth-this.eViewport.clientWidth<0}hasVerticalScrollGap(){return this.eContainer.clientHeight-this.eViewport.clientHeight<0}getCenterWidth(){return z1(this.eViewport)}getCenterViewportScrollLeft(){return m6(this.eViewport,this.enableRtl)}registerViewportResizeListener(z){let J=S4(this.beans,this.eViewport,z);this.addDestroyFunc(()=>J())}isViewportInTheDOMTree(){return F9(this.eViewport)}getViewportScrollLeft(){return m6(this.eViewport,this.enableRtl)}isHorizontalScrollShowing(){let{beans:z,gos:J,eViewport:Q}=this,Z=J.get("alwaysShowHorizontalScroll"),{ctrlsSvc:$}=z,X=$.getGridBodyCtrl()?.eBodyViewport,Y=$.get("fakeHScrollComp")?.getGui(),U=$.get("fakeVScrollComp")?.getGui();return Z||eW(Q,X,void 0,Y,U)}setHorizontalScroll(z){this.comp.setHorizontalScroll(z)}getHScrollPosition(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}}setCenterViewportScrollLeft(z){c6(this.eViewport,z,this.enableRtl)}isContainerVisible(){return this.options.pinnedType==null||!!this.pinnedWidthFeature&&this.pinnedWidthFeature.getWidth()>0}onPinnedWidthChanged(){let z=this.isContainerVisible();if(this.visible!=z)this.visible=z,this.onDisplayedRowsChanged()}onDisplayedRowsChanged(z=!1){let J=this.options.getRowCtrls(this.beans.rowRenderer);if(!this.visible||J.length===0){this.comp.setRowCtrls({rowCtrls:this.EMPTY_CTRLS});return}let Q=T0(this.gos,"print"),$=this.gos.get("embedFullWidthRows")||Q,X=J.filter((Y)=>{let U=Y.isFullWidth();return this.options.fullWidth?!$&&U:$||!U});this.comp.setRowCtrls({rowCtrls:X,useFlushSync:z})}},u$="ag-force-vertical-scroll",Mq="ag-selectable",Dq="ag-column-moving",Rq=class extends j{constructor(){super(...arguments);this.stickyTopHeight=0,this.stickyBottomHeight=0}wireBeans(z){this.ctrlsSvc=z.ctrlsSvc,this.colModel=z.colModel,this.scrollVisibleSvc=z.scrollVisibleSvc,this.pinnedRowModel=z.pinnedRowModel,this.filterManager=z.filterManager,this.rowGroupColsSvc=z.rowGroupColsSvc}setComp(z,J,Q,Z,$,X,Y){this.comp=z,this.eGridBody=J,this.eBodyViewport=Q,this.eTop=Z,this.eBottom=$,this.eStickyTop=X,this.eStickyBottom=Y,this.eCenterColsViewport=Q.querySelector(`.${x$("center")}`),this.eFullWidthContainer=Q.querySelector(`.${b$("fullWidth")}`),this.setCellTextSelection(this.gos.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",(U)=>this.setCellTextSelection(U.currentValue)),this.createManagedBean(new E5(this.comp)),this.scrollFeature=this.createManagedBean(new oW(Q)),this.beans.rowDragSvc?.setupRowDrag(Q,this),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([Z,Q,$,X,Y]),this.setGridRootRole(),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.updateScrollingClasses(),this.filterManager?.setupAdvFilterHeaderComp(Z),this.ctrlsSvc.register("gridBodyCtrl",this)}addEventListeners(){let z=this.setFloatingHeights.bind(this),J=this.setGridRootRole.bind(this),Q=this.toggleRowResizeStyles.bind(this);this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this),scrollGapChanged:this.updateScrollingClasses.bind(this),pinnedRowDataChanged:z,pinnedHeightChanged:z,pinnedRowsChanged:z,headerHeightChanged:this.setStickyTopOffsetTop.bind(this),columnRowGroupChanged:J,columnPivotChanged:J,rowResizeStarted:Q,rowResizeEnded:Q}),this.addManagedPropertyListener("treeData",J)}toggleRowResizeStyles(z){let J=z.type==="rowResizeStarted";this.eBodyViewport.classList.toggle("ag-prevent-animation",J)}onGridColumnsChanged(){let z=this.beans.colModel.getCols();this.comp.setColumnCount(z.length)}onScrollVisibilityChanged(){let{scrollVisibleSvc:z}=this,J=z.verticalScrollShowing;this.setVerticalScrollPaddingVisible(J),this.setStickyWidth(J),this.setStickyBottomOffsetBottom();let Q=J?z.getScrollbarWidth()||0:0,Z=E$()?16:0,$=`calc(100% + ${Q+Z}px)`;I4(this.beans,()=>this.comp.setBodyViewportWidth($)),this.updateScrollingClasses()}setGridRootRole(){let{rowGroupColsSvc:z,colModel:J,gos:Q}=this,Z=Q.get("treeData");if(!Z){let $=J.pivotMode;Z=(!z?0:z.columns.length)>=($?2:1)}this.comp.setGridRootRole(Z?"treegrid":"grid")}addFocusListeners(z){for(let J of z)this.addManagedElementListeners(J,{focusin:(Q)=>{let{target:Z}=Q,$=sz(Z,"ag-root",J);J.classList.toggle("ag-has-focus",!$)},focusout:(Q)=>{let{target:Z,relatedTarget:$}=Q,X=J.contains($),Y=sz($,"ag-root",J);if(sz(Z,"ag-root",J))return;if(!X||Y)J.classList.remove("ag-has-focus")}})}setColumnMovingCss(z){this.comp.setColumnMovingCss(Dq,z)}setCellTextSelection(z=!1){this.comp.setCellSelectableCss(Mq,z)}updateScrollingClasses(){let{eGridBody:{classList:z},scrollVisibleSvc:J}=this;z.toggle("ag-body-vertical-content-no-gap",!J.verticalScrollGap),z.toggle("ag-body-horizontal-content-no-gap",!J.horizontalScrollGap)}disableBrowserDragging(){this.addManagedElementListeners(this.eGridBody,{dragstart:(z)=>{if(z.target instanceof HTMLImageElement)return z.preventDefault(),!1}})}addStopEditingWhenGridLosesFocus(){this.beans.editSvc?.addStopEditingWhenGridLosesFocus([this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop,this.eStickyBottom])}updateRowCount(){let z=(this.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0)+(this.filterManager?.getHeaderRowCount()??0),{rowModel:J}=this.beans,Q=J.isLastRowIndexKnown()?J.getRowCount():-1,Z=Q===-1?-1:z+Q;this.comp.setRowCount(Z)}registerBodyViewportResizeListener(z){this.comp.registerBodyViewportResizeListener(z)}setVerticalScrollPaddingVisible(z){let J=z?"scroll":"hidden";this.comp.setPinnedTopBottomOverflowY(J)}isVerticalScrollShowing(){let{gos:z,comp:J,ctrlsSvc:Q}=this,Z=z.get("alwaysShowVerticalScroll"),$=Z?u$:null,X=T0(z,"normal");J.setAlwaysVerticalScrollClass($,Z);let Y=Q.get("center")?.eViewport,U=Q.get("fakeHScrollComp")?.getGui(),_=Q.get("fakeVScrollComp")?.getGui();return Z||X&&zq(this.eBodyViewport,Y,void 0,_,U)}setupRowAnimationCssClass(){let{rowContainerHeight:z,environment:J}=this.beans,Q=J.sizesMeasured,Z=()=>{let $=Q&&w1(this.gos)&&!z.stretching,X=$?"ag-row-animation":"ag-row-no-animation";this.comp.setRowAnimationCssOnBodyViewport(X,$)};Z(),this.addManagedEventListeners({heightScaleChanged:Z}),this.addManagedPropertyListener("animateRows",Z),this.addManagedEventListeners({stylesChanged:()=>{if(!Q&&J.sizesMeasured)Q=!0,Z()}})}addBodyViewportListener(){let{eBodyViewport:z,eStickyTop:J,eStickyBottom:Q,eTop:Z,eBottom:$,beans:{popupSvc:X,touchSvc:Y}}=this,U=this.onBodyViewportContextMenu.bind(this);this.addManagedElementListeners(z,{contextmenu:U}),Y?.mockBodyContextMenu(this,U),this.addManagedElementListeners(z,{wheel:this.onBodyViewportWheel.bind(this,X)});let _=this.onStickyWheel.bind(this);for(let G of[J,Q,Z,$])this.addManagedElementListeners(G,{wheel:_});let H=this.onHorizontalWheel.bind(this);for(let G of["left","right","topLeft","topRight","bottomLeft","bottomRight"])this.addManagedElementListeners(this.ctrlsSvc.get(G).eContainer,{wheel:H});this.addFullWidthContainerWheelListener()}addFullWidthContainerWheelListener(){this.addManagedElementListeners(this.eFullWidthContainer,{wheel:(z)=>this.onFullWidthContainerWheel(z)})}onFullWidthContainerWheel(z){let{deltaX:J,deltaY:Q,shiftKey:Z}=z;if((Z||Math.abs(J)>Math.abs(Q))&&S2(this.beans,z))this.scrollGridBodyToMatchEvent(z)}onStickyWheel(z){let{deltaY:J}=z;if(this.scrollVertically(J)>0)z.preventDefault()}onHorizontalWheel(z){let{deltaX:J,deltaY:Q,shiftKey:Z}=z;if(!(Z||Math.abs(J)>Math.abs(Q)))return;this.scrollGridBodyToMatchEvent(z)}scrollGridBodyToMatchEvent(z){let{deltaX:J,deltaY:Q}=z;z.preventDefault(),this.eCenterColsViewport.scrollBy({left:J||Q})}onBodyViewportContextMenu(z,J,Q){if(!z&&!Q)return;if(this.gos.get("preventDefaultOnContextMenu"))(z||Q).preventDefault();let{target:Z}=z||J;if(Z===this.eBodyViewport||Z===this.ctrlsSvc.get("center").eViewport)this.beans.contextMenuSvc?.showContextMenu({mouseEvent:z,touchEvent:Q,value:null,anchorToElement:this.eGridBody,source:"ui"})}onBodyViewportWheel(z,J){if(!this.gos.get("suppressScrollWhenPopupsAreOpen"))return;if(z?.hasAnchoredPopup())J.preventDefault()}scrollVertically(z){let J=this.eBodyViewport.scrollTop;return this.scrollFeature.setVerticalScrollPosition(J+z),this.eBodyViewport.scrollTop-J}setFloatingHeights(){let{pinnedRowModel:z,beans:{environment:J}}=this,Q=z?.getPinnedTopTotalHeight(),Z=z?.getPinnedBottomTotalHeight(),$=J.getPinnedRowBorderWidth(),X=J.getRowBorderWidth(),Y=$-X,U=!Q?0:Y+Q,_=!Z?0:Y+Z;this.comp.setTopHeight(U),this.comp.setBottomHeight(_),this.comp.setTopInvisible(U<=0),this.comp.setBottomInvisible(_<=0),this.setStickyTopOffsetTop(),this.setStickyBottomOffsetBottom()}setStickyTopHeight(z=0){this.comp.setStickyTopHeight(`${z}px`),this.stickyTopHeight=z}setStickyBottomHeight(z=0){this.comp.setStickyBottomHeight(`${z}px`),this.stickyBottomHeight=z}setStickyWidth(z){if(!z)this.comp.setStickyTopWidth("100%"),this.comp.setStickyBottomWidth("100%");else{let J=this.scrollVisibleSvc.getScrollbarWidth();this.comp.setStickyTopWidth(`calc(100% - ${J}px)`),this.comp.setStickyBottomWidth(`calc(100% - ${J}px)`)}}setStickyTopOffsetTop(){let J=this.ctrlsSvc.get("gridHeaderCtrl").headerHeight+(this.filterManager?.getHeaderHeight()??0),Q=this.pinnedRowModel?.getPinnedTopTotalHeight()??0,Z=0;if(J>0)Z+=J;if(Q>0)Z+=Q;if(Z>0)Z+=1;this.comp.setStickyTopTop(`${Z}px`)}setStickyBottomOffsetBottom(){let{pinnedRowModel:z,scrollVisibleSvc:J,comp:Q}=this,Z=z?.getPinnedBottomTotalHeight()??0,X=J.horizontalScrollShowing?J.getScrollbarWidth()||0:0,Y=Z+X;Q.setStickyBottomBottom(`${Y}px`)}};function z0(z){return W0(z)}var Aq=class extends y{constructor(z,J,Q,Z,$){super();this.cellCtrl=J,this.rowResizerElement=null,this.rendererVersion=0,this.editorVersion=0,this.beans=z,this.gos=z.gos,this.column=J.column,this.rowNode=J.rowNode,this.eRow=Z;let X=z0({tag:"div",role:J.getCellAriaRole(),attrs:{"comp-id":`${this.getCompId()}`,"col-id":J.column.colIdSanitised}});this.eCell=X;let Y;if(J.isCellSpanning())Y=z0({tag:"div",cls:"ag-spanned-cell-wrapper",role:"presentation"}),Y.appendChild(X),this.setTemplateFromElement(Y);else this.setTemplateFromElement(X);this.cellCssManager=new W$(()=>X),this.forceWrapper=J.isForceWrapper(),this.refreshWrapper(!1);let U={toggleCss:(_,H)=>this.cellCssManager.toggleCss(_,H),setUserStyles:(_)=>c2(X,_),getFocusableElement:()=>X,setIncludeSelection:(_)=>this.includeSelection=_,setIncludeRowDrag:(_)=>this.includeRowDrag=_,setIncludeDndSource:(_)=>this.includeDndSource=_,setRowResizerElement:(_)=>this.setRowResizerElement(_),setRenderDetails:(_,H,G)=>this.setRenderDetails(_,H,G),setEditDetails:(_,H,G)=>this.setEditDetails(_,H,G),getCellEditor:()=>this.cellEditor||null,getCellRenderer:()=>this.cellRenderer||null,getParentOfValue:()=>this.getParentOfValue(),refreshEditStyles:(_,H)=>this.refreshEditStyles(_,H)};J.setComp(U,X,Y,this.eCellWrapper,Q,$,void 0)}getParentOfValue(){return this.eCellValue??this.eCellWrapper??this.eCell}setRowResizerElement(z){if(this.rowResizerElement)P0(this.rowResizerElement);if(this.rowResizerElement=z,z)this.eCell.appendChild(z)}setRenderDetails(z,J,Q){if(this.cellEditor&&!this.cellEditorPopupWrapper)return;this.firstRender=this.firstRender==null;let $=this.refreshWrapper(!1);if(this.refreshEditStyles(!1),z){if(!(Q||$?!1:this.refreshCellRenderer(z)))this.destroyRenderer(),this.createCellRendererInstance(z)}else this.destroyRenderer(),this.insertValueWithoutCellRenderer(J);if(this.rowDraggingComp?.refreshVisibility(),this.rowResizerElement&&!this.rowResizerElement.parentElement)this.eCell.appendChild(this.rowResizerElement)}setEditDetails(z,J,Q){if(z)this.createCellEditorInstance(z,J,Q);else this.destroyEditor()}removeControls(){let z=this.beans.context;this.checkboxSelectionComp=z.destroyBean(this.checkboxSelectionComp),this.dndSourceComp=z.destroyBean(this.dndSourceComp),this.rowDraggingComp=z.destroyBean(this.rowDraggingComp)}refreshWrapper(z){let J=this.includeRowDrag||this.includeDndSource||this.includeSelection,Q=J||this.forceWrapper,Z=Q&&this.eCellWrapper==null;if(Z)this.eCellWrapper=z0({tag:"div",cls:"ag-cell-wrapper",role:"presentation"}),this.eCell.appendChild(this.eCellWrapper);let $=!Q&&this.eCellWrapper!=null;if($)P0(this.eCellWrapper),this.eCellWrapper=void 0;this.cellCssManager.toggleCss("ag-cell-value",!Q);let X=!z&&Q,Y=X&&this.eCellValue==null;if(Y){let H=this.cellCtrl.getCellValueClass();this.eCellValue=z0({tag:"span",cls:H,role:"presentation"}),this.eCellWrapper.appendChild(this.eCellValue)}let U=!X&&this.eCellValue!=null;if(U)P0(this.eCellValue),this.eCellValue=void 0;let _=Z||$||Y||U;if(_)this.removeControls();if(!z&&J)this.addControls();return _}addControls(){let{cellCtrl:z,eCellWrapper:J,eCellValue:Q,includeRowDrag:Z,includeDndSource:$,includeSelection:X}=this,Y=(U)=>{if(U)J.insertBefore(U.getGui(),Q)};if(Z&&this.rowDraggingComp==null)this.rowDraggingComp=z.createRowDragComp(),Y(this.rowDraggingComp);if($&&this.dndSourceComp==null)this.dndSourceComp=z.createDndSource(),Y(this.dndSourceComp);if(X&&this.checkboxSelectionComp==null)this.checkboxSelectionComp=z.createSelectionCheckbox(),Y(this.checkboxSelectionComp)}createCellEditorInstance(z,J,Q){let Z=this.editorVersion,$=z.newAgStackInstance(),{params:X}=z;if($.then((U)=>this.afterCellEditorCreated(Z,U,X,J,Q)),n(this.cellEditor)&&X.cellStartedEdit)this.cellCtrl.focusCell(!0)}insertValueWithoutCellRenderer(z){let J=this.getParentOfValue();J0(J);let Q=g2(z);if(Q!=null)J.textContent=Q}destroyRenderer(){let{context:z}=this.beans;this.cellRenderer=z.destroyBean(this.cellRenderer),P0(this.cellRendererGui),this.cellRendererGui=null,this.rendererVersion++}destroyEditor(){let{context:z}=this.beans;if(this.cellEditorPopupWrapper?.getGui().contains(d(this.beans))||this.cellCtrl.hasBrowserFocus())this.eCell.focus({preventScroll:!0});this.hideEditorPopup?.(),this.hideEditorPopup=void 0,this.cellEditor=z.destroyBean(this.cellEditor),this.cellEditorPopupWrapper=z.destroyBean(this.cellEditorPopupWrapper),P0(this.cellEditorGui),this.cellCtrl.disableEditorTooltipFeature(),this.cellEditorGui=null,this.editorVersion++}refreshCellRenderer(z){if(this.cellRenderer?.refresh==null)return!1;if(this.cellRendererClass!==z.componentClass)return!1;let J=this.cellRenderer.refresh(z.params);return J===!0||J===void 0}createCellRendererInstance(z){let J=this.rendererVersion,Q=(X)=>(Y)=>{if(this.rendererVersion!==J||!this.isAlive())return;let _=X.newAgStackInstance(),H=this.afterCellRendererCreated.bind(this,J,X.componentClass);_?.then(H)},{animationFrameSvc:Z}=this.beans,$;if(Z?.active&&this.firstRender)$=(X,Y=!1)=>{Z.createTask(Q(X),this.rowNode.rowIndex,"p2",X.componentFromFramework,Y)};else $=(X)=>Q(X)();if(z.params?.deferRender&&!this.cellCtrl.rowNode.group){let{loadingComp:X,onReady:Y}=this.cellCtrl.getDeferLoadingCellRenderer();if(X)$(X),Y.then(()=>$(z,!0))}else $(z)}afterCellRendererCreated(z,J,Q){if(!this.isAlive()||z!==this.rendererVersion){this.beans.context.destroyBean(Q);return}this.cellRenderer=Q,this.cellRendererClass=J;let $=Q.getGui();if(this.cellRendererGui=$,$!=null){let X=this.getParentOfValue();J0(X),X.appendChild($)}}afterCellEditorCreated(z,J,Q,Z,$){let X=z!==this.editorVersion,{context:Y}=this.beans;if(X){Y.destroyBean(J);return}if(J.isCancelBeforeStart?.()){Y.destroyBean(J),this.cellCtrl.stopEditing(!0);return}if(!J.getGui){V(97,{colId:this.column.getId()}),Y.destroyBean(J);return}this.cellEditor=J,this.cellEditorGui=J.getGui();let _=Z||J.isPopup?.();if(_)this.addPopupCellEditor(Q,$);else this.addInCellEditor();this.refreshEditStyles(!0,_),J.afterGuiAttached?.(),this.cellCtrl.enableEditorTooltipFeature(J),this.cellCtrl.cellEditorAttached()}refreshEditStyles(z,J){let{cellCssManager:Q}=this;Q.toggleCss("ag-cell-inline-editing",z&&!J),Q.toggleCss("ag-cell-popup-editing",z&&!!J),Q.toggleCss("ag-cell-not-inline-editing",!z||!!J)}addInCellEditor(){let{eCell:z}=this;if(z.contains(d(this.beans)))z.focus();if(this.destroyRenderer(),this.refreshWrapper(!0),J0(this.getParentOfValue()),this.cellEditorGui)this.getParentOfValue().appendChild(this.cellEditorGui)}addPopupCellEditor(z,J){let{gos:Q,context:Z,popupSvc:$,editSvc:X}=this.beans;if(Q.get("editType")==="fullRow")V(98);let Y=this.cellEditorPopupWrapper=Z.createBean(X.createPopupEditorWrapper(z)),{cellEditor:U,cellEditorGui:_,eCell:H,rowNode:G,column:W,cellCtrl:q}=this,B=Y.getGui();if(_)B.appendChild(_);let E=Q.get("stopEditingWhenCellsLoseFocus"),K=J!=null?J:U.getPopupPosition?.()??"over",F=Q.get("enableRtl"),L={ePopup:B,additionalParams:{column:W,rowNode:G},type:"popupCellEditor",eventSource:H,position:K,alignSide:F?"right":"left",keepWithinBounds:!0},M=$.positionPopupByComponent.bind($,L),D=$.addPopup({modal:E,eChild:B,closeOnEsc:!0,closedCallback:(A)=>{q.onPopupEditorClosed(A)},anchorToElement:H,positionCallback:M,ariaOwns:H});if(D)this.hideEditorPopup=D.hideFunc}detach(){this.getGui().remove()}destroy(){this.destroyRenderer(),this.destroyEditor(),this.removeControls(),super.destroy()}},jq=class extends y{constructor(z,J,Q){super();this.cellComps=new Map,this.beans=J,this.rowCtrl=z;let Z=z0({tag:"div",role:"row",attrs:{"comp-id":`${this.getCompId()}`}});this.setInitialStyle(Z,Q),this.setTemplateFromElement(Z);let $=Z.style;this.domOrder=this.rowCtrl.getDomOrder();let X={setDomOrder:(Y)=>this.domOrder=Y,setCellCtrls:(Y)=>this.setCellCtrls(Y),showFullWidth:(Y)=>this.showFullWidth(Y),getFullWidthCellRenderer:()=>this.fullWidthCellRenderer,getFullWidthCellRendererParams:()=>this.fullWidthCellRendererParams,toggleCss:(Y,U)=>this.toggleCss(Y,U),setUserStyles:(Y)=>c2(Z,Y),setTop:(Y)=>$.top=Y,setTransform:(Y)=>$.transform=Y,setRowIndex:(Y)=>Z.setAttribute("row-index",Y),setRowId:(Y)=>Z.setAttribute("row-id",Y),setRowBusinessKey:(Y)=>Z.setAttribute("row-business-key",Y),refreshFullWidth:(Y)=>{let U=Y();return this.fullWidthCellRendererParams=U,this.fullWidthCellRenderer?.refresh?.(U)??!1}};z.setComp(X,this.getGui(),Q,void 0),this.addDestroyFunc(()=>{z.unsetComp(Q)})}setInitialStyle(z,J){let Q=this.rowCtrl.getInitialTransform(J);if(Q)z.style.setProperty("transform",Q);else{let Z=this.rowCtrl.getInitialRowTop(J);if(Z)z.style.setProperty("top",Z)}}showFullWidth(z){let J=(Z)=>{if(this.isAlive()){let $=Z.getGui();this.getGui().appendChild($),this.rowCtrl.setupDetailRowAutoHeight($),this.setFullWidthRowComp(Z,z.params)}else this.beans.context.destroyBean(Z)};z.newAgStackInstance().then(J)}setCellCtrls(z){let J=new Map(this.cellComps);for(let Q of z){let Z=Q.instanceId;if(!this.cellComps.has(Z))this.newCellComp(Q);else J.delete(Z)}this.destroyCells(J),this.ensureDomOrder(z)}ensureDomOrder(z){if(!this.domOrder)return;let J=[];for(let Q of z){let Z=this.cellComps.get(Q.instanceId);if(Z)J.push(Z.getGui())}M9(this.getGui(),J)}newCellComp(z){let J=this.beans.editSvc?.isEditing(z,{withOpenEditor:!0})??!1,Q=new Aq(this.beans,z,this.rowCtrl.printLayout,this.getGui(),J);this.cellComps.set(z.instanceId,Q),this.getGui().appendChild(Q.getGui())}destroy(){super.destroy(),this.destroyCells(this.cellComps)}setFullWidthRowComp(z,J){this.fullWidthCellRenderer=z,this.fullWidthCellRendererParams=J,this.addDestroyFunc(()=>{this.fullWidthCellRenderer=this.beans.context.destroyBean(this.fullWidthCellRenderer),this.fullWidthCellRendererParams=void 0})}destroyCells(z){for(let J of z.values()){if(!J)continue;let Q=J.cellCtrl.instanceId;if(this.cellComps.get(Q)!==J)continue;J.detach(),J.destroy(),this.cellComps.delete(Q)}}};function Vq(z,J,Q){let Z=!!Q.gos.get("enableCellSpan")&&!!J.getSpannedRowCtrls,$={tag:"div",ref:"eContainer",cls:b$(z),role:"rowgroup"};if(J.type==="center"||Z){let X={tag:"div",ref:"eSpannedContainer",cls:`ag-spanning-container ${Uq(z)}`,role:"presentation"};return $.role="presentation",{tag:"div",ref:"eViewport",cls:`ag-viewport ${x$(z)}`,role:"rowgroup",children:[$,Z?X:null]}}return $}var Oq=class extends y{constructor(z){super();this.eViewport=P,this.eContainer=P,this.eSpannedContainer=P,this.rowCompsNoSpan={},this.rowCompsWithSpan={},this.name=z?.name,this.options=o2(this.name)}postConstruct(){this.setTemplate(Vq(this.name,this.options,this.beans));let z={setHorizontalScroll:(Q)=>this.eViewport.scrollLeft=Q,setViewportHeight:(Q)=>this.eViewport.style.height=Q,setRowCtrls:({rowCtrls:Q})=>this.setRowCtrls(Q),setSpannedRowCtrls:(Q)=>this.setRowCtrls(Q,!0),setDomOrder:(Q)=>{this.domOrder=Q},setContainerWidth:(Q)=>{if(this.eContainer.style.width=Q,this.eSpannedContainer)this.eSpannedContainer.style.width=Q},setOffsetTop:(Q)=>{let Z=`translateY(${Q})`;if(this.eContainer.style.transform=Z,this.eSpannedContainer)this.eSpannedContainer.style.transform=Z}};this.createManagedBean(new Lq(this.name)).setComp(z,this.eContainer,this.eSpannedContainer,this.eViewport)}destroy(){this.setRowCtrls([]),this.setRowCtrls([],!0),super.destroy(),this.lastPlacedElement=null}setRowCtrls(z,J){let{beans:Q,options:Z}=this,$=J?this.eSpannedContainer:this.eContainer,X=J?{...this.rowCompsWithSpan}:{...this.rowCompsNoSpan},Y={};if(J)this.rowCompsWithSpan=Y;else this.rowCompsNoSpan=Y;this.lastPlacedElement=null;let U=[];for(let _ of z){let H=_.instanceId,G=X[H],W;if(G)W=G,delete X[H];else{if(!_.rowNode.displayed)continue;W=new jq(_,Q,Z.type)}Y[H]=W,U.push([W,!G])}this.removeOldRows(Object.values(X)),this.addRowNodes(U,$)}addRowNodes(z,J){let{domOrder:Q}=this;for(let[Z,$]of z){let X=Z.getGui();if(!Q){if($)J.appendChild(X)}else this.ensureDomOrder(X,J)}}removeOldRows(z){for(let J of z)J.getGui().remove(),J.destroy()}ensureDomOrder(z,J){L9(J,z,this.lastPlacedElement),this.lastPlacedElement=z}},Pq={selector:"AG-ROW-CONTAINER",component:Oq};function E2(z,J){return J.map((Q)=>{let Z=`e${Q[0].toUpperCase()+Q.substring(1)}RowContainer`;return z[Z]={name:Q},{tag:"ag-row-container",ref:Z,attrs:{name:Q}}})}function Tq(z){let J={},Q={tag:"div",ref:"eGridRoot",cls:"ag-root ag-unselectable",children:[{tag:"ag-header-root"},{tag:"div",ref:"eTop",cls:"ag-floating-top",role:"presentation",children:E2(J,["topLeft","topCenter","topRight","topFullWidth"])},{tag:"div",ref:"eBody",cls:"ag-body",role:"presentation",children:[{tag:"div",ref:"eBodyViewport",cls:"ag-body-viewport",role:"presentation",children:E2(J,["left","center","right","fullWidth"])},{tag:"ag-fake-vertical-scroll"}]},{tag:"div",ref:"eStickyTop",cls:"ag-sticky-top",role:"presentation",children:E2(J,["stickyTopLeft","stickyTopCenter","stickyTopRight","stickyTopFullWidth"])},{tag:"div",ref:"eStickyBottom",cls:"ag-sticky-bottom",role:"presentation",children:E2(J,["stickyBottomLeft","stickyBottomCenter","stickyBottomRight","stickyBottomFullWidth"])},{tag:"div",ref:"eBottom",cls:"ag-floating-bottom",role:"presentation",children:E2(J,["bottomLeft","bottomCenter","bottomRight","bottomFullWidth"])},{tag:"ag-fake-horizontal-scroll"},z?{tag:"ag-overlay-wrapper"}:null]};return{paramsMap:J,elementParams:Q}}var Sq=class extends y{constructor(){super(...arguments);this.eGridRoot=P,this.eBodyViewport=P,this.eStickyTop=P,this.eStickyBottom=P,this.eTop=P,this.eBottom=P,this.eBody=P}postConstruct(){let{overlays:z,rangeSvc:J}=this.beans,Q=z?.getOverlayWrapperSelector(),{paramsMap:Z,elementParams:$}=Tq(!!Q);this.setTemplate($,[...Q?[Q]:[],tW,aW,dW,Pq],Z);let X=(U,_)=>{let H=`${U}px`;_.style.minHeight=H,_.style.height=H},Y={setRowAnimationCssOnBodyViewport:(U,_)=>this.setRowAnimationCssOnBodyViewport(U,_),setColumnCount:(U)=>QH(this.getGui(),U),setRowCount:(U)=>JH(this.getGui(),U),setTopHeight:(U)=>X(U,this.eTop),setBottomHeight:(U)=>X(U,this.eBottom),setTopInvisible:(U)=>this.eTop.classList.toggle("ag-invisible",U),setBottomInvisible:(U)=>this.eBottom.classList.toggle("ag-invisible",U),setStickyTopHeight:(U)=>this.eStickyTop.style.height=U,setStickyTopTop:(U)=>this.eStickyTop.style.top=U,setStickyTopWidth:(U)=>this.eStickyTop.style.width=U,setStickyBottomHeight:(U)=>{this.eStickyBottom.style.height=U,this.eStickyBottom.classList.toggle("ag-invisible",U==="0px")},setStickyBottomBottom:(U)=>this.eStickyBottom.style.bottom=U,setStickyBottomWidth:(U)=>this.eStickyBottom.style.width=U,setColumnMovingCss:(U,_)=>this.toggleCss(U,_),updateLayoutClasses:(U,_)=>{let H=[this.eBodyViewport.classList,this.eBody.classList];for(let G of H)G.toggle(R4.AUTO_HEIGHT,_.autoHeight),G.toggle(R4.NORMAL,_.normal),G.toggle(R4.PRINT,_.print);this.toggleCss(R4.AUTO_HEIGHT,_.autoHeight),this.toggleCss(R4.NORMAL,_.normal),this.toggleCss(R4.PRINT,_.print)},setAlwaysVerticalScrollClass:(U,_)=>this.eBodyViewport.classList.toggle(u$,_),registerBodyViewportResizeListener:(U)=>{let _=S4(this.beans,this.eBodyViewport,U);this.addDestroyFunc(()=>_())},setPinnedTopBottomOverflowY:(U)=>this.eTop.style.overflowY=this.eBottom.style.overflowY=U,setCellSelectableCss:(U,_)=>{for(let H of[this.eTop,this.eBodyViewport,this.eBottom])H.classList.toggle(U,_)},setBodyViewportWidth:(U)=>this.eBodyViewport.style.width=U,setGridRootRole:(U)=>H0(this.eGridRoot,U)};if(this.ctrl=this.createManagedBean(new Rq),this.ctrl.setComp(Y,this.getGui(),this.eBodyViewport,this.eTop,this.eBottom,this.eStickyTop,this.eStickyBottom),J&&n0(this.gos)||C2(this.gos))zH(this.getGui(),!0)}setRowAnimationCssOnBodyViewport(z,J){let Q=this.eBodyViewport.classList;Q.toggle("ag-row-animation",J),Q.toggle("ag-row-no-animation",!J)}getFocusableContainerName(){return"gridBody"}},Iq={selector:"AG-GRID-BODY",component:Sq},A2={TAB_GUARD:"ag-tab-guard",TAB_GUARD_TOP:"ag-tab-guard-top",TAB_GUARD_BOTTOM:"ag-tab-guard-bottom"},fq=class extends R0{constructor(z,J){super();this.stopPropagationCallbacks=J,this.skipTabGuardFocus=!1,this.forcingFocusOut=!1,this.allowFocus=!1;let{comp:Q,eTopGuard:Z,eBottomGuard:$,focusTrapActive:X,forceFocusOutWhenTabGuardsAreEmpty:Y,isFocusableContainer:U,focusInnerElement:_,onFocusIn:H,onFocusOut:G,shouldStopEventPropagation:W,onTabKeyDown:q,handleKeyDown:B,isEmpty:E,eFocusableElement:K}=z;this.comp=Q,this.eTopGuard=Z,this.eBottomGuard=$,this.providedFocusInnerElement=_,this.eFocusableElement=K,this.focusTrapActive=!!X,this.forceFocusOutWhenTabGuardsAreEmpty=!!Y,this.isFocusableContainer=!!U,this.providedFocusIn=H,this.providedFocusOut=G,this.providedShouldStopEventPropagation=W,this.providedOnTabKeyDown=q,this.providedHandleKeyDown=B,this.providedIsEmpty=E}postConstruct(){this.createManagedBean(new K$(this.eFocusableElement,this.stopPropagationCallbacks,{shouldStopEventPropagation:()=>this.shouldStopEventPropagation(),onTabKeyDown:(z)=>this.onTabKeyDown(z),handleKeyDown:(z)=>this.handleKeyDown(z),onFocusIn:(z)=>this.onFocusIn(z),onFocusOut:(z)=>this.onFocusOut(z)})),this.activateTabGuards();for(let z of[this.eTopGuard,this.eBottomGuard])this.addManagedElementListeners(z,{focus:this.onFocus.bind(this)})}handleKeyDown(z){if(this.providedHandleKeyDown)this.providedHandleKeyDown(z)}tabGuardsAreActive(){return!!this.eTopGuard&&this.eTopGuard.hasAttribute("tabIndex")}shouldStopEventPropagation(){if(this.providedShouldStopEventPropagation)return this.providedShouldStopEventPropagation();return!1}activateTabGuards(){if(this.forcingFocusOut)return;let z=this.gos.get("tabIndex");this.comp.setTabIndex(z.toString())}deactivateTabGuards(){this.comp.setTabIndex()}onFocus(z){if(this.isFocusableContainer&&!this.eFocusableElement.contains(z.relatedTarget)){if(!this.allowFocus){this.findNextElementOutsideAndFocus(z.target===this.eBottomGuard);return}}if(this.skipTabGuardFocus){this.skipTabGuardFocus=!1;return}if(this.forceFocusOutWhenTabGuardsAreEmpty){if(this.providedIsEmpty?this.providedIsEmpty():O4(this.eFocusableElement,".ag-tab-guard").length===0){this.findNextElementOutsideAndFocus(z.target===this.eBottomGuard);return}}if(this.isFocusableContainer&&this.eFocusableElement.contains(z.relatedTarget))return;let J=z.target===this.eBottomGuard;if(!(this.providedFocusInnerElement?this.providedFocusInnerElement(J):this.focusInnerElement(J))&&this.forceFocusOutWhenTabGuardsAreEmpty)this.findNextElementOutsideAndFocus(z.target===this.eBottomGuard)}findNextElementOutsideAndFocus(z){let J=Y0(this.beans),Q=O4(J.body,null,!0),Z=Q.indexOf(z?this.eTopGuard:this.eBottomGuard);if(Z===-1)return;let $,X;if(z)$=0,X=Z;else $=Z+1,X=Q.length;let Y=Q.slice($,X),U=this.gos.get("tabIndex");Y.sort((_,H)=>{let G=Number.parseInt(_.getAttribute("tabindex")||"0"),W=Number.parseInt(H.getAttribute("tabindex")||"0");if(W===U)return 1;if(G===U)return-1;if(G===0)return 1;if(W===0)return-1;return G-W}),Y[z?Y.length-1:0]?.focus()}onFocusIn(z){if(this.focusTrapActive||this.forcingFocusOut)return;if(this.providedFocusIn)this.providedFocusIn(z);if(!this.isFocusableContainer)this.deactivateTabGuards()}onFocusOut(z){if(this.focusTrapActive)return;if(this.providedFocusOut)this.providedFocusOut(z);if(!this.eFocusableElement.contains(z.relatedTarget))this.activateTabGuards()}onTabKeyDown(z){if(this.providedOnTabKeyDown){this.providedOnTabKeyDown(z);return}if(this.focusTrapActive)return;if(z.defaultPrevented)return;let J=this.tabGuardsAreActive();if(J)this.deactivateTabGuards();let Q=this.getNextFocusableElement(z.shiftKey);if(J)setTimeout(()=>this.activateTabGuards(),0);if(!Q)return;Q.focus(),z.preventDefault()}focusInnerElement(z=!1){let J=O4(this.eFocusableElement);if(this.tabGuardsAreActive())J.splice(0,1),J.splice(-1,1);if(!J.length)return!1;return J[z?J.length-1:0].focus({preventScroll:!0}),!0}getNextFocusableElement(z){return I0(this.beans,this.eFocusableElement,!1,z)}forceFocusOutOfContainer(z=!1){if(this.forcingFocusOut)return;let J=z?this.eTopGuard:this.eBottomGuard;this.activateTabGuards(),this.skipTabGuardFocus=!0,this.forcingFocusOut=!0,J.focus(),window.setTimeout(()=>{this.forcingFocusOut=!1,this.activateTabGuards()})}isTabGuard(z,J){return z===this.eTopGuard&&!J||z===this.eBottomGuard&&(J??!0)}setAllowFocus(z){this.allowFocus=z}},F5=class extends R0{constructor(z,J){super();this.comp=z,this.stopPropagationCallbacks=J}initialiseTabGuard(z){this.eTopGuard=this.createTabGuard("top"),this.eBottomGuard=this.createTabGuard("bottom"),this.eFocusableElement=this.comp.getFocusableElement();let{eTopGuard:J,eBottomGuard:Q,eFocusableElement:Z,stopPropagationCallbacks:$}=this,X=[J,Q],Y={setTabIndex:(L)=>{for(let M of X)if(L==null)M.removeAttribute("tabindex");else M.setAttribute("tabindex",L)}};this.addTabGuards(J,Q);let{focusTrapActive:U=!1,onFocusIn:_,onFocusOut:H,focusInnerElement:G,handleKeyDown:W,onTabKeyDown:q,shouldStopEventPropagation:B,isEmpty:E,forceFocusOutWhenTabGuardsAreEmpty:K,isFocusableContainer:F}=z;this.tabGuardCtrl=this.createManagedBean(new fq({comp:Y,focusTrapActive:U,eTopGuard:J,eBottomGuard:Q,eFocusableElement:Z,onFocusIn:_,onFocusOut:H,focusInnerElement:G,handleKeyDown:W,onTabKeyDown:q,shouldStopEventPropagation:B,isEmpty:E,forceFocusOutWhenTabGuardsAreEmpty:K,isFocusableContainer:F},$))}getTabGuardCtrl(){return this.tabGuardCtrl}createTabGuard(z){let J=Y0(this.beans).createElement("div"),Q=z==="top"?A2.TAB_GUARD_TOP:A2.TAB_GUARD_BOTTOM;return J.classList.add(A2.TAB_GUARD,Q),H0(J,"presentation"),J}addTabGuards(z,J){let Q=this.eFocusableElement;Q.prepend(z),Q.append(J)}removeAllChildrenExceptTabGuards(){let z=[this.eTopGuard,this.eBottomGuard];J0(this.comp.getFocusableElement()),this.addTabGuards(...z)}forceFocusOutOfContainer(z=!1){this.tabGuardCtrl.forceFocusOutOfContainer(z)}appendChild(z,J,Q){if(!p2(J))J=J.getGui();let{eBottomGuard:Z}=this;if(Z)Z.before(J);else z(J,Q)}destroy(){let{eTopGuard:z,eBottomGuard:J}=this;P0(z),P0(J),super.destroy()}},Xz=class extends v0{initialiseTabGuard(z,J){this.tabGuardFeature=this.createManagedBean(new F5(this,J)),this.tabGuardFeature.initialiseTabGuard(z)}forceFocusOutOfContainer(z=!1){this.tabGuardFeature.forceFocusOutOfContainer(z)}appendChild(z,J){this.tabGuardFeature.appendChild(super.appendChild.bind(this),z,J)}},L5=class extends Xz{initialiseTabGuard(z){super.initialiseTabGuard(z,kz)}},z8=(z,J)=>{return A$(z,()=>E0(z.getGui(),J,!1,!0))},J8=(z)=>{return z?.getFocusableContainerName()??"external"},kq=(z)=>{if(z==null)return"external";return typeof z==="string"?z:"gridBody"},Cq=class extends j{constructor(){super(...arguments);this.additionalFocusableContainers=new Set}setComp(z,J,Q){this.view=z,this.eGridHostDiv=J,this.eGui=Q,this.eGui.setAttribute("grid-id",this.beans.context.getId());let{dragAndDrop:Z,ctrlsSvc:$}=this.beans;if(Z?.registerGridDropTarget(()=>this.eGui,this),this.createManagedBean(new E5(this.view)),this.view.setRtlClass(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr"),this.gos.get("suppressContentVisibilityAuto"))this.eGui.style.setProperty("content-visibility","visible");let X=S4(this.beans,this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc(()=>X()),$.register("gridCtrl",this)}isDetailGrid(){return jJ(this.getGui())?.getAttribute("row-id")?.startsWith("detail")||!1}getOptionalSelectors(){let z=this.beans;return{paginationSelector:z.pagination?.getPaginationSelector(),gridHeaderDropZonesSelector:z.registry?.getSelector("AG-GRID-HEADER-DROP-ZONES"),sideBarSelector:z.sideBar?.getSelector(),statusBarSelector:z.registry?.getSelector("AG-STATUS-BAR"),toolbarSelector:z.registry?.getSelector("AG-TOOLBAR"),watermarkSelector:z.licenseManager?.getWatermarkSelector()}}onGridSizeChanged(){this.eventSvc.dispatchEvent({type:"gridSizeChanged",clientWidth:this.eGridHostDiv.clientWidth,clientHeight:this.eGridHostDiv.clientHeight})}destroyGridUi(){this.view.destroyGridUi()}getGui(){return this.eGui}setResizeCursor(z){let{view:J}=this;if(z===!1)J.setCursor(null);else J.setCursor(z===1?"ew-resize":"ns-resize")}disableUserSelect(z){this.view.setUserSelect(z?"none":null)}focusNextInnerContainer(z){let J=this.getFocusableContainers(),{indexWithFocus:Q,nextIndex:Z}=this.getNextFocusableIndex(J,z),$=Q===-1?z?J.length-1:0:Z,{gos:X,beans:{focusSvc:Y,navigation:U}}=this,_=X.getCallback("tabToNextGridContainer");if(_){let H=Y.getDefaultTabToNextGridContainerTarget({backwards:z,focusableContainers:J,nextIndex:$}),G=J8(J[$]),W=H==null&&G==="gridBody"?"gridBody":kq(H),q=_({backwards:z,previousContainer:J8(J[Q]),nextContainer:W,defaultTarget:H});if(q!==void 0){if(typeof q==="boolean")return q;if(typeof q==="string"){if(q==="gridBody")return this.focusGridBodyDefault(z)||void 0;let B=J.find((E)=>E.getFocusableContainerName()===q);if(!B){O9(`tabToNextGridContainer - ${q} container not found`);return}return z8(B,z)?!0:void 0}if(OW(q))return Y.focusHeaderPosition({headerPosition:q})||void 0;return U?.ensureCellVisible(q),Y.setFocusedCell({...q,forceBrowserFocus:!0}),Y.isCellFocused(q)||void 0}}return this.focusNextInnerContainerDefault({backwards:z,focusableContainers:J,indexWithFocus:Q,nextIndex:$})||void 0}focusInnerElement(z){let{gos:J,beans:Q,beans:{focusSvc:Z,visibleCols:$}}=this;if(J.getCallback("focusGridInnerElement")?.({fromBottom:!!z}))return!0;let Y=this.getFocusableContainers();if(z){if(this.focusNextInnerContainerDefault({backwards:!0,focusableContainers:Y,indexWithFocus:Y.length,nextIndex:Y.length-1}))return!0;return Z.focusGridView({column:N($.allCols),backwards:!0})}let U=$.allCols;if(J.get("headerHeight")===0||D4(Q)){if(Z.focusGridView({column:U[0],backwards:z}))return!0;for(let _=1;_<Y.length;_++)if(E0(Y[_].getGui(),z))return!0;return!1}return Z.focusFirstHeader()}forceFocusOutOfContainer(z=!1){this.view.forceFocusOutOfContainer(z)}isFocusInsideGridBody(){let z=this.getFocusableContainers(),{indexWithFocus:J}=this.getNextFocusableIndex(z);return z[J]?.getFocusableContainerName()==="gridBody"}addFocusableContainer(z){this.additionalFocusableContainers.add(z)}removeFocusableContainer(z){this.additionalFocusableContainers.delete(z)}allowFocusForNextCoreContainer(z){let J=this.view.getFocusableContainers(),{indexWithFocus:Q,nextIndex:Z}=this.getNextFocusableIndex(J,z);if(!this.focusNextInnerContainerDefault({backwards:!!z,focusableContainers:J,indexWithFocus:Q,nextIndex:Z}))this.forceFocusOutOfContainer(z)}isFocusable(){let z=this.beans;return!l6(z)||!D4(z)||!!z.sideBar?.comp?.isDisplayed()}getNextFocusableIndex(z,J){let Q=d(this.beans),Z=z.findIndex(($)=>$.getGui().contains(Q));return{indexWithFocus:Z,nextIndex:Z+(J?-1:1)}}focusGridBodyDefault(z){let{gos:J,beans:Q,beans:{focusSvc:Z,visibleCols:{allCols:$}}}=this;if(z)return Z.focusGridView({column:N($),backwards:!0});if(J.get("headerHeight")===0||D4(Q))return Z.focusGridView({column:$[0]});return Z.focusFirstHeader()}focusNextInnerContainerDefault(z){let{backwards:J,focusableContainers:Q,indexWithFocus:Z}=z,$=J?-1:1;for(let X=z.nextIndex;X>=0&&X<Q.length;X+=$){let Y=Q[X];if(Y.getFocusableContainerName()==="gridBody"){if(Z===-1||(J?Z>X:Z<X)){if(this.focusGridBodyDefault(J))return!0;continue}}if(z8(Y,J))return!0}return!1}getFocusableContainers(){return[...this.view.getFocusableContainers(),...this.additionalFocusableContainers]}destroy(){this.additionalFocusableContainers.clear(),super.destroy()}},vq=class extends L5{constructor(z){super();this.gridBody=P,this.toolbar=P,this.gridHeaderDropZones=P,this.sideBar=P,this.statusBar=P,this.pagination=P,this.rootWrapperBody=P,this.eGridDiv=z}postConstruct(){let z={destroyGridUi:()=>this.destroyBean(this),setRtlClass:(X)=>this.addCss(X),forceFocusOutOfContainer:this.forceFocusOutOfContainer.bind(this),updateLayoutClasses:this.updateLayoutClasses.bind(this),getFocusableContainers:this.getFocusableContainers.bind(this),setUserSelect:(X)=>{this.getGui().style.userSelect=X!=null?X:"",this.getGui().style.webkitUserSelect=X!=null?X:""},setCursor:(X)=>{this.getGui().style.cursor=X!=null?X:""}},J=this.createManagedBean(new Cq),Q=J.getOptionalSelectors(),Z=this.createTemplate(Q),$=[Iq,...Object.values(Q).filter((X)=>!!X)];this.setTemplate(Z,$),J.setComp(z,this.eGridDiv,this.getGui()),this.insertGridIntoDom(),this.initialiseTabGuard({onTabKeyDown:()=>{return},focusInnerElement:(X)=>J.focusInnerElement(X),forceFocusOutWhenTabGuardsAreEmpty:!0,isEmpty:()=>!J.isFocusable()})}insertGridIntoDom(){let z=this.getGui();this.eGridDiv.appendChild(z),this.addDestroyFunc(()=>{z.remove(),I2(this.gos,"Grid removed from DOM")})}updateLayoutClasses(z,J){let Q=this.rootWrapperBody.classList,{AUTO_HEIGHT:Z,NORMAL:$,PRINT:X}=R4,{autoHeight:Y,normal:U,print:_}=J;Q.toggle(Z,Y),Q.toggle($,U),Q.toggle(X,_),this.toggleCss(Z,Y),this.toggleCss($,U),this.toggleCss(X,_)}createTemplate(z){let J=z.toolbarSelector?{tag:"ag-toolbar",ref:"toolbar"}:null,Q=z.gridHeaderDropZonesSelector?{tag:"ag-grid-header-drop-zones",ref:"gridHeaderDropZones"}:null,Z=z.sideBarSelector?{tag:"ag-side-bar",ref:"sideBar"}:null,$=z.statusBarSelector?{tag:"ag-status-bar",ref:"statusBar"}:null,X=z.watermarkSelector?{tag:"ag-watermark"}:null,Y=z.paginationSelector?{tag:"ag-pagination",ref:"pagination"}:null;return{tag:"div",cls:"ag-root-wrapper",role:"presentation",children:[J,Q,{tag:"div",ref:"rootWrapperBody",cls:"ag-root-wrapper-body",role:"presentation",children:[{tag:"ag-grid-body",ref:"gridBody"},Z]},$,Y,X]}}getFocusableElement(){return this.rootWrapperBody}forceFocusOutOfContainer(z=!1){if(!z&&this.pagination?.isDisplayed()){this.pagination.forceFocusOutOfContainer(z);return}super.forceFocusOutOfContainer(z)}getFocusableContainers(){let z=[];if(this.toolbar)z.push(this.toolbar);z.push(...this.gridHeaderDropZones?.getFocusableContainers?.()??[],this.gridBody);for(let J of[this.sideBar,this.statusBar,this.pagination])if(J)z.push(J);return z.filter((J)=>B0(J.getGui()))}},c=(z,J)=>{for(let Q of Object.keys(J))J[Q]=z;return J},Q8={dispatchEvent:"CommunityCore",...c("CommunityCore",{destroy:0,getGridId:0,getGridOption:0,isDestroyed:0,setGridOption:0,updateGridOptions:0,isModuleRegistered:0}),...c("GridState",{getState:0,setState:0}),...c("SharedRowSelection",{setNodesSelected:0,selectAll:0,deselectAll:0,selectAllFiltered:0,deselectAllFiltered:0,selectAllOnCurrentPage:0,deselectAllOnCurrentPage:0,getSelectedNodes:0,getSelectedRows:0}),...c("RowApi",{redrawRows:0,setRowNodeExpanded:0,getRowNode:0,addRenderedRowListener:0,getRenderedNodes:0,forEachNode:0,getFirstDisplayedRowIndex:0,getLastDisplayedRowIndex:0,getDisplayedRowAtIndex:0,getDisplayedRowCount:0}),...c("ScrollApi",{getVerticalPixelRange:0,getHorizontalPixelRange:0,ensureColumnVisible:0,ensureIndexVisible:0,ensureNodeVisible:0}),...c("KeyboardNavigation",{getFocusedCell:0,clearFocusedCell:0,setFocusedCell:0,tabToNextCell:0,tabToPreviousCell:0,setFocusedHeader:0}),...c("EventApi",{addEventListener:0,addGlobalListener:0,removeEventListener:0,removeGlobalListener:0}),...c("ValueCache",{expireValueCache:0}),...c("CellApi",{getCellValue:0}),...c("SharedMenu",{showColumnMenu:0,hidePopupMenu:0}),...c("Sort",{onSortChanged:0}),...c("PinnedRow",{getPinnedTopRowCount:0,getPinnedBottomRowCount:0,getPinnedTopRow:0,getPinnedBottomRow:0,forEachPinnedRow:0}),...c("Overlay",{showLoadingOverlay:0,showNoRowsOverlay:0,hideOverlay:0}),...c("RenderApi",{setGridAriaProperty:0,refreshCells:0,refreshHeader:0,isAnimationFrameQueueEmpty:0,flushAllAnimationFrames:0,getSizesForCurrentTheme:0,getCellRendererInstances:0}),...c("HighlightChanges",{flashCells:0}),...c("RowDrag",{addRowDropZone:0,removeRowDropZone:0,getRowDropZoneParams:0,getRowDropPositionIndicator:0,setRowDropPositionIndicator:0}),...c("ColumnApi",{getColumnDefs:0,getColumnDef:0,getDisplayNameForColumn:0,getColumn:0,getColumns:0,applyColumnState:0,getColumnState:0,resetColumnState:0,isPinning:0,isPinningLeft:0,isPinningRight:0,getDisplayedColAfter:0,getDisplayedColBefore:0,setColumnsVisible:0,setColumnsPinned:0,getAllGridColumns:0,getDisplayedLeftColumns:0,getDisplayedCenterColumns:0,getDisplayedRightColumns:0,getAllDisplayedColumns:0,getAllDisplayedVirtualColumns:0}),...c("ColumnAutoSize",{sizeColumnsToFit:0,autoSizeColumns:0,autoSizeAllColumns:0}),...c("ColumnGroup",{setColumnGroupOpened:0,getColumnGroup:0,getProvidedColumnGroup:0,getDisplayNameForColumnGroup:0,getColumnGroupState:0,setColumnGroupState:0,resetColumnGroupState:0,getLeftDisplayedColumnGroups:0,getCenterDisplayedColumnGroups:0,getRightDisplayedColumnGroups:0,getAllDisplayedColumnGroups:0}),...c("ColumnMove",{moveColumnByIndex:0,moveColumns:0}),...c("ColumnResize",{setColumnWidths:0}),...c("ColumnHover",{isColumnHovered:0}),...c("EditCore",{getCellEditorInstances:0,getEditingCells:0,getEditRowValues:0,stopEditing:0,startEditingCell:0,isEditing:0,validateEdit:0}),...c("BatchEdit",{startBatchEdit:0,cancelBatchEdit:0,commitBatchEdit:0,isBatchEditing:0}),...c("UndoRedoEdit",{undoCellEditing:0,redoCellEditing:0,getCurrentUndoSize:0,getCurrentRedoSize:0}),...c("FilterCore",{isAnyFilterPresent:0,onFilterChanged:0}),...c("ColumnFilter",{isColumnFilterPresent:0,getColumnFilterInstance:0,destroyFilter:0,setFilterModel:0,getFilterModel:0,getColumnFilterModel:0,setColumnFilterModel:0,showColumnFilter:0,hideColumnFilter:0,getColumnFilterHandler:0,doFilterAction:0}),...c("QuickFilter",{isQuickFilterPresent:0,getQuickFilter:0,resetQuickFilter:0}),...c("Notes",{getNote:0,setNote:0,refreshNotes:0}),...c("Find",{findGetActiveMatch:0,findGetTotalMatches:0,findGoTo:0,findNext:0,findPrevious:0,findGetNumMatches:0,findGetParts:0,findClearActive:0,findRefresh:0}),...c("Pagination",{paginationIsLastPageFound:0,paginationGetPageSize:0,paginationGetCurrentPage:0,paginationGetTotalPages:0,paginationGetRowCount:0,paginationGoToNextPage:0,paginationGoToPreviousPage:0,paginationGoToFirstPage:0,paginationGoToLastPage:0,paginationGoToPage:0}),...c("CsrmSsrmSharedApi",{expandAll:0,collapseAll:0,resetRowGroupExpansion:0}),...c("SsrmInfiniteSharedApi",{setRowCount:0,getCacheBlockState:0,isLastRowIndexKnown:0}),...c("ClientSideRowModelApi",{onGroupExpandedOrCollapsed:0,refreshClientSideRowModel:0,isRowDataEmpty:0,forEachLeafNode:0,forEachNodeAfterFilter:0,forEachNodeAfterFilterAndSort:0,applyTransaction:0,applyTransactionAsync:0,flushAsyncTransactions:0,getBestCostNodeSelection:0,onRowHeightChanged:0,resetRowHeights:0}),...c("CsvExport",{getDataAsCsv:0,exportDataAsCsv:0}),...c("InfiniteRowModel",{refreshInfiniteCache:0,purgeInfiniteCache:0,getInfiniteRowCount:0}),...c("AdvancedFilter",{getAdvancedFilterModel:0,setAdvancedFilterModel:0,showAdvancedFilterBuilder:0,hideAdvancedFilterBuilder:0}),...c("IntegratedCharts",{getChartModels:0,getChartRef:0,getChartImageDataURL:0,downloadChart:0,openChartToolPanel:0,closeChartToolPanel:0,createRangeChart:0,createPivotChart:0,createCrossFilterChart:0,updateChart:0,restoreChart:0}),...c("Clipboard",{copyToClipboard:0,cutToClipboard:0,copySelectedRowsToClipboard:0,copySelectedRangeToClipboard:0,copySelectedRangeDown:0,pasteFromClipboard:0}),...c("ExcelExport",{getDataAsExcel:0,exportDataAsExcel:0,getSheetDataForExcel:0,getMultipleSheetsAsExcel:0,exportMultipleSheetsAsExcel:0}),...c("SharedMasterDetail",{addDetailGridInfo:0,removeDetailGridInfo:0,getDetailGridInfo:0,forEachDetailGridInfo:0}),...c("Formula",{refreshFormulas:0}),...c("ContextMenu",{showContextMenu:0}),...c("ColumnMenu",{showColumnChooser:0,hideColumnChooser:0}),...c("CellSelection",{getCellRanges:0,addCellRange:0,clearRangeSelection:0,clearCellSelection:0}),...c("SharedRowGrouping",{setRowGroupColumns:0,removeRowGroupColumns:0,addRowGroupColumns:0,getRowGroupColumns:0,moveRowGroupColumn:0}),...c("SharedAggregation",{addAggFuncs:0,clearAggFuncs:0,setColumnAggFunc:0}),...c("SharedPivot",{isPivotMode:0,getPivotResultColumn:0,setValueColumns:0,getValueColumns:0,removeValueColumns:0,addValueColumns:0,setPivotColumns:0,removePivotColumns:0,addPivotColumns:0,getPivotColumns:0,setPivotResultColumns:0,getPivotResultColumns:0}),...c("ServerSideRowModelApi",{getServerSideSelectionState:0,setServerSideSelectionState:0,applyServerSideTransaction:0,applyServerSideTransactionAsync:0,applyServerSideRowData:0,retryServerSideLoads:0,flushServerSideAsyncTransactions:0,refreshServerSide:0,getServerSideGroupLevelState:0,onRowHeightChanged:0,resetRowHeights:0}),...c("SideBar",{isSideBarVisible:0,setSideBarVisible:0,setSideBarPosition:0,openToolPanel:0,closeToolPanel:0,getOpenedToolPanel:0,refreshToolPanel:0,isToolPanelShowing:0,getToolPanelInstance:0,getSideBar:0}),...c("Toolbar",{getToolbarItemInstance:0}),...c("StatusBar",{getStatusPanel:0}),...c("AiToolkit",{getStructuredSchema:0})},vQ={isDestroyed:()=>!0,destroy(){},preConstruct(){},postConstruct(){},preWireBeans(){},wireBeans(){}},Nq=(z,J)=>z.eventSvc.dispatchEvent(J),m$=class{};Reflect.defineProperty(m$,"name",{value:"GridApi"});var wq=class extends j{constructor(){super();this.beanName="apiFunctionSvc",this.api=new m$,this.fns={...vQ,dispatchEvent:Nq},this.preDestroyLink="";let{api:z}=this;for(let J of Object.keys(Q8))z[J]=this.makeApi(J)[J]}postConstruct(){this.preDestroyLink=this.beans.frameworkOverrides.getDocLink("grid-lifecycle/#grid-pre-destroyed")}addFunction(z,J){let{fns:Q,beans:Z}=this;if(Q!==vQ)Q[z]=Z?.validation?.validateApiFunction(z,J)??J}makeApi(z){return{[z]:(...J)=>{let{beans:Q,fns:{[z]:Z}}=this;return Z?Z(Q,...J):this.apiNotFound(z)}}}apiNotFound(z){let{beans:J,gos:Q,preDestroyLink:Z}=this;if(!J)V(26,{fnName:z,preDestroyLink:Z});else{let $=Q8[z];if(Q.assertModuleRegistered($,`api.${z}`))V(27,{fnName:z,module:$})}}destroy(){super.destroy(),this.fns=vQ,this.beans=null}};function yq(z){return z.context.getId()}function xq(z){z.gridDestroySvc.destroy()}function bq(z){return z.gridDestroySvc.destroyCalled}function gq(z,J){return z.gos.get(J)}function hq(z,J,Q){c$(z,{[J]:Q})}function c$(z,J){z.gos.updateGridOptions({options:J})}function uq(z,J){let Q=J.replace(/Module$/,"");return z.gos.isModuleRegistered(Q)}function Nz(z,J,Q){let Z=h(z,J,Q);if(Z){let{className:X}=Z;if(typeof X==="string"&&X.includes("ag-icon")||typeof X==="object"&&X["ag-icon"])return Z}let $=z0({tag:"span"});return $.appendChild(Z),$}function h(z,J,Q){let Z=null;if(z==="smallDown")V(262);else if(z==="smallLeft")V(263);else if(z==="smallRight")V(264);let $=Q?.colDef.icons;if($)Z=$[z];if(J.gos&&!Z){let X=J.gos.get("icons");if(X)Z=X[z]}if(Z){let X;if(typeof Z==="function")X=Z();else if(typeof Z==="string")X=Z;else{V(38,{iconName:z});return}if(typeof X==="string")return NZ(X);if(p2(X))return X;V(133,{iconName:z});return}else{let X=J.registry.getIcon(z);if(!X)J.validation?.validateIcon(z);return z0({tag:"span",cls:`ag-icon ag-icon-${X??z}`,role:"presentation",attrs:{unselectable:"on"}})}}var mq=".ag-dnd-ghost{align-items:center;background-color:var(--ag-drag-and-drop-image-background-color);border:var(--ag-drag-and-drop-image-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-drag-and-drop-image-shadow);color:var(--ag-text-color);cursor:move;display:flex;font-weight:500;gap:var(--ag-cell-widget-spacing);height:var(--ag-header-height);overflow:hidden;padding-left:var(--ag-cell-horizontal-padding);padding-right:var(--ag-cell-horizontal-padding);text-overflow:ellipsis;transform:translateY(calc(var(--ag-spacing)*2));white-space:nowrap}.ag-dnd-ghost-not-allowed{border:var(--ag-drag-and-drop-image-not-allowed-border)}",cq={tag:"div",children:[{tag:"div",ref:"eGhost",cls:"ag-dnd-ghost ag-unselectable",children:[{tag:"span",ref:"eIcon",cls:"ag-dnd-ghost-icon ag-shake-left-to-right"},{tag:"div",ref:"eLabel",cls:"ag-dnd-ghost-label"}]}]},pq=class extends y{constructor(){super();this.dragSource=null,this.eIcon=P,this.eLabel=P,this.eGhost=P,this.registerCSS(mq)}postConstruct(){let z=(J)=>Nz(J,this.beans,null);this.dropIconMap={pinned:z("columnMovePin"),hide:z("columnMoveHide"),move:z("columnMoveMove"),left:z("columnMoveLeft"),right:z("columnMoveRight"),group:z("columnMoveGroup"),aggregate:z("columnMoveValue"),pivot:z("columnMovePivot"),notAllowed:z("dropNotAllowed")}}init(z){this.dragSource=z.dragSource,this.setTemplate(cq),this.beans.environment.applyThemeClasses(this.eGhost)}destroy(){this.dragSource=null,super.destroy()}setIcon(z,J){let{eGhost:Q,eIcon:Z,dragSource:$,dropIconMap:X,gos:Y}=this;if(J0(Z),!z)z=$?.getDefaultIconName?$.getDefaultIconName():"notAllowed";let U=X[z];if(Q.classList.toggle("ag-dnd-ghost-not-allowed",z==="notAllowed"),Z.classList.toggle("ag-shake-left-to-right",J),U===X.hide&&Y.get("suppressDragLeaveHidesColumns"))return;if(U)Z.appendChild(U)}setLabel(z){this.eLabel.textContent=z}};var p$=(z,J)=>{if(J!=null&&z?.setPointerCapture)try{return z.setPointerCapture(J),z.hasPointerCapture(J)}catch{}return!1},iq=(z,J)=>{if(typeof PointerEvent>"u"||!(J instanceof PointerEvent))return null;let Q=J.pointerId;if(!p$(z,Q))return null;let Z={eElement:z,pointerId:Q,onLost($){nq(Z,$)}};return z.addEventListener("lostpointercapture",Z.onLost),Z},dq=(z)=>{if(!z)return;i$(z);let{eElement:J,pointerId:Q}=z;if(!J)return;try{J.releasePointerCapture(Q)}catch{}z.eElement=null},i$=(z)=>{let{eElement:J,onLost:Q}=z;if(J&&Q)J.removeEventListener("lostpointercapture",Q),z.onLost=null},nq=(z,J)=>{i$(z);let{eElement:Q,pointerId:Z}=z;if(Q&&J.pointerId===Z)p$(Q,Z)},V1,S1,NQ={passive:!0},qz={passive:!1},C4=(z)=>{if(!S1)S1=new WeakSet;else if(S1.has(z))return!1;return S1.add(z),!0},rq=class extends R0{constructor(){super(...arguments);this.beanName="dragSvc",this.dragging=!1,this.drag=null,this.dragSources=[]}get startTarget(){return this.drag?.start.target??null}isPointer(){return!!V1?.has(c0(this.beans))}hasPointerCapture(){let z=this.drag?.pointerCapture;return!!(z&&this.beans.eRootDiv.hasPointerCapture?.(z.pointerId))}destroy(){if(this.drag)this.cancelDrag();let z=this.dragSources;for(let J of z)Z8(J);z.length=0,super.destroy()}removeDragSource(z){let J=this.dragSources;for(let Q=0,Z=J.length;Q<Z;++Q){let $=J[Q];if($.params===z){J.splice(Q,1),Z8($);break}}}addDragSource(z){if(!this.isAlive())return;let{eElement:J,includeTouch:Q}=z,Z=[],$;if(Q){let H=J.style;if(H)$=H.touchAction,H.touchAction="none"}let X={handlers:Z,params:z,oldTouchAction:$};this.dragSources.push(X),f6(Z,[J,"pointerdown",(H)=>this.onPointerDown(z,H),qz],[J,"mousedown",(H)=>this.onMouseDown(z,H)]);let _=this.gos.get("suppressTouch");if(Q&&!_)f6(Z,[J,"touchstart",(G)=>this.onTouchStart(z,G),qz])}cancelDrag(z){let J=this.drag;if(z??(z=J?.eElement),z)this.eventSvc.dispatchEvent({type:"dragCancelled",target:z});J?.params.onDragCancel?.(),this.destroyDrag()}shouldPreventMouseEvent(z){let J=z.type;return(J==="mousemove"||J==="pointermove")&&z.cancelable&&S2(this.beans,z)&&!D2(yQ(z))}initDrag(z,...J){this.drag=z;let Q=this.beans,Z=(U)=>this.onScroll(U),$=(U)=>this.onKeyDown(U),X=c0(Q),Y=Y0(Q);f6(z.handlers,[X,"contextmenu",T1],[X,"keydown",$],[Y,"scroll",Z,{capture:!0}],[Y.defaultView||window,"scroll",Z],...J)}destroyDrag(){this.dragging=!1;let z=this.drag;if(z){let J=z.rootEl;if(V1?.get(J)===z)V1.delete(J);this.drag=null,dq(z.pointerCapture),yZ(z.handlers)}}onPointerDown(z,J){if(this.isPointer())return;let Q=this.beans;if(S1?.has(J))return;let Z=J.pointerType;if(Z==="touch"){if(Q.gos.get("suppressTouch")||!z.includeTouch)return;if(z.stopPropagationForTouch)J.stopPropagation();if(D2(yQ(J)))return}if(!J.isPrimary)return;if(Z==="mouse"&&J.button!==0)return;this.destroyDrag();let $=c0(Q),X=z.eElement,Y=J.pointerId,U=new wQ($,z,J,Y);V1??(V1=new WeakMap),V1.set($,U);let _=(q)=>{if(q.pointerId===Y)this.onMouseOrPointerMove(q)},H=(q)=>{if(q.pointerId===Y)this.onMouseOrPointerUp(q)},G=(q)=>{if(q.pointerId===Y&&C4(q))this.cancelDrag()},W=(q)=>this.draggingPreventDefault(q);if(this.initDrag(U,[$,"pointerup",H],[$,"pointercancel",G],[$,"pointermove",_,qz],[$,"touchmove",W,qz],[X,"mousemove",W,qz]),z.dragStartPixels===0)this.onMouseOrPointerMove(J);else C4(J)}onTouchStart(z,J){if(this.gos.get("suppressTouch")||!z.includeTouch)return;if(!C4(J))return;if(D2(yQ(J)))return;if(z.stopPropagationForTouch)J.stopPropagation();if(this.isPointer()){if(this.dragging)T1(J);return}this.destroyDrag();let Z=this.beans,$=c0(Z),X=new wQ($,z,J.touches[0]),Y=(q)=>this.onTouchMove(q),U=(q)=>this.onTouchUp(q),_=(q)=>this.onTouchCancel(q),H=(q)=>this.draggingPreventDefault(q),G=c0(Z),W=J.target??z.eElement;if(this.initDrag(X,[W,"touchmove",Y,NQ],[W,"touchend",U,NQ],[W,"touchcancel",_,NQ],[G,"touchmove",H,qz],[G,"touchend",U,qz],[G,"touchcancel",_,qz]),z.dragStartPixels===0)this.onMove(X.start)}draggingPreventDefault(z){if(this.dragging)T1(z)}onMouseDown(z,J){if(J.button!==0)return;if(S1?.has(J))return;if(this.isPointer())return;let Q=this.beans;this.destroyDrag();let Z=new wQ(c0(Q),z,J),$=(U)=>this.onMouseOrPointerMove(U),X=(U)=>this.onMouseOrPointerUp(U),Y=c0(Q);if(this.initDrag(Z,[Y,"mousemove",$],[Y,"mouseup",X]),z.dragStartPixels===0)this.onMouseOrPointerMove(J);else C4(J)}onScroll(z){if(!C4(z))return;let J=this.drag,Q=J?.lastDrag;if(Q&&this.dragging)J.params?.onDragging?.(Q)}onMouseOrPointerMove(z){if(!C4(z))return;if(fz())Y0(this.beans).getSelection()?.removeAllRanges();if(this.shouldPreventMouseEvent(z))T1(z);this.onMove(z)}onTouchCancel(z){let J=this.drag;if(!J||!C4(z))return;if(!C1(J.start,z.changedTouches))return;this.cancelDrag()}onTouchMove(z){let J=this.drag;if(!J||!C4(z))return;let Q=C1(J.start,z.touches);if(Q)this.onMove(Q),this.draggingPreventDefault(z)}onMove(z){let J=this.drag;if(!J)return;J.lastDrag=z;let Q=J.params;if(!this.dragging){let Z=J.start,X=Q.dragStartPixels??4;if(A9(z,Z,X))return;if(this.dragging=!0,Q.capturePointer)J.pointerCapture=iq(this.beans.eRootDiv,z);if(this.eventSvc.dispatchEvent({type:"dragStarted",target:Q.eElement}),Q.onDragStart?.(Z),this.drag!==J)return;if(Q.onDragging?.(Z),this.drag!==J)return}Q.onDragging?.(z)}onTouchUp(z){let J=this.drag;if(J&&C4(z))this.onUp(C1(J.start,z.changedTouches))}onMouseOrPointerUp(z){if(C4(z))this.onUp(z)}onUp(z){let J=this.drag;if(!J)return;if(!z)z=J.lastDrag;if(z&&this.dragging)this.dragging=!1,J.params.onDragStop?.(z),this.eventSvc.dispatchEvent({type:"dragStopped",target:J.params.eElement});this.destroyDrag()}onKeyDown(z){if(z.key===R.ESCAPE)this.cancelDrag()}},Z8=(z)=>{yZ(z.handlers);let J=z.oldTouchAction;if(J!=null){let Q=z.params.eElement.style;if(Q)Q.touchAction=J}},wQ=class{constructor(z,J,Q,Z=null){this.rootEl=z,this.params=J,this.start=Q,this.pointerId=Z,this.handlers=[],this.lastDrag=null,this.pointerCapture=null,this.eElement=J.eElement}},yQ=(z)=>{let J=z.target;return J instanceof Element?J:null},tq=class extends rq{shouldPreventMouseEvent(z){return this.gos.get("enableCellTextSelection")&&super.shouldPreventMouseEvent(z)}},sq=class extends j{constructor(){super(...arguments);this.beanName="horizontalResizeSvc"}addResizeBar(z){let J={dragStartPixels:z.dragStartPixels||0,eElement:z.eResizeBar,onDragStart:this.onDragStart.bind(this,z),onDragStop:this.onDragStop.bind(this,z),onDragging:this.onDragging.bind(this,z),onDragCancel:this.onDragStop.bind(this,z),includeTouch:!0,stopPropagationForTouch:!0},{dragSvc:Q}=this.beans;return Q.addDragSource(J),()=>Q.removeDragSource(J)}onDragStart(z,J){this.dragStartX=J.clientX,this.setResizeIcons();let Q=J instanceof MouseEvent&&J.shiftKey===!0;z.onResizeStart(Q)}setResizeIcons(){let z=this.beans.ctrlsSvc.get("gridCtrl");z.setResizeCursor(1),z.disableUserSelect(!0)}onDragStop(z){z.onResizeEnd(this.resizeAmount),this.resetIcons()}resetIcons(){let z=this.beans.ctrlsSvc.get("gridCtrl");z.setResizeCursor(!1),z.disableUserSelect(!1)}onDragging(z,J){this.resizeAmount=J.clientX-this.dragStartX,z.onResizing(this.resizeAmount)}};var TJ=class{constructor(z){if(this.tickingInterval=null,this.onScrollCallback=null,this.scrollContainer=z.scrollContainer,this.scrollHorizontally=z.scrollAxis.includes("x"),this.scrollVertically=z.scrollAxis.includes("y"),this.scrollByTick=z.scrollByTick??20,z.onScrollCallback)this.onScrollCallback=z.onScrollCallback;if(this.scrollVertically)this.getVerticalPosition=z.getVerticalPosition,this.setVerticalPosition=z.setVerticalPosition;if(this.scrollHorizontally)this.getHorizontalPosition=z.getHorizontalPosition,this.setHorizontalPosition=z.setHorizontalPosition;this.shouldSkipVerticalScroll=z.shouldSkipVerticalScroll||(()=>!1),this.shouldSkipHorizontalScroll=z.shouldSkipHorizontalScroll||(()=>!1)}get scrolling(){return this.tickingInterval!==null}check(z,J=!1){let Q=!this.scrollVertically||J||this.shouldSkipVerticalScroll(),Z=!this.scrollHorizontally||this.shouldSkipHorizontalScroll();if(Q&&Z)return;let $=this.scrollContainer.getBoundingClientRect(),X=this.scrollByTick;if(this.tickLeft=!Z&&z.clientX<$.left+X,this.tickRight=!Z&&z.clientX>$.right-X,this.tickUp=!Q&&z.clientY<$.top+X,this.tickDown=!Q&&z.clientY>$.bottom-X,this.tickLeft||this.tickRight||this.tickUp||this.tickDown)this.ensureTickingStarted();else this.ensureCleared()}ensureTickingStarted(){if(this.tickingInterval===null)this.tickingInterval=window.setInterval(this.doTick.bind(this),100),this.tickCount=0}doTick(){this.tickCount++;let z=this.tickCount>20?200:this.tickCount>10?80:40;if(this.scrollVertically){let J=this.getVerticalPosition();if(this.tickUp)this.setVerticalPosition(J-z);if(this.tickDown)this.setVerticalPosition(J+z)}if(this.scrollHorizontally){let J=this.getHorizontalPosition();if(this.tickLeft)this.setHorizontalPosition(J-z);if(this.tickRight)this.setHorizontalPosition(J+z)}if(this.onScrollCallback)this.onScrollCallback()}ensureCleared(){if(this.tickingInterval)window.clearInterval(this.tickingInterval),this.tickingInterval=null}},x1=class{constructor(){this.reordered=!1,this.removals=[],this.updates=new Set,this.adds=new Set}},H1=(z)=>{let J=z.childrenAfterGroup;while(J?.length){let Q=J[0];if(Q.sourceRowIndex>=0)return Q;J=Q.childrenAfterGroup}},d$=(z,J,Q,Z)=>{if(!J.size||!z)return!1;let $=!1,X=z.length??0,Y=-1;if(Q){if(Y=Q.sourceRowIndex,Q=Y<0?H1(Q):null,Q)Y=Q.sourceRowIndex}if(Y<0||Y>=X)Y=X;else if(!Z)++Y;let U=Y,_=Math.min(Y,X-1);for(let W of J){let q=W.sourceRowIndex;if(q<U)U=q;if(q>_)_=q}let H=U;for(let W=U;W<Y;++W){let q=z[W];if(J.has(q))continue;if(q.sourceRowIndex!==H)q.sourceRowIndex=H,z[H]=q,$=!0;++H}let G=_;for(let W=_;W>=Y;--W){let q=z[W];if(J.has(q))continue;if(q.sourceRowIndex!==G)q.sourceRowIndex=G,z[G]=q,$=!0;--G}for(let W of J){if(W.sourceRowIndex!==H)W.sourceRowIndex=H,z[H]=W,$=!0;++H}return $};function M5(z,J){return a2(z,J.target)?.getFocusedCellPosition()??null}function D5(z,J){let Q=T0(z.gos,"normal"),Z=J,$,X;if(Z.clientX!=null||Z.clientY!=null)$=Z.clientX,X=Z.clientY;else $=Z.x,X=Z.y;let{pageFirstPixel:Y}=z.pageBounds.getCurrentPagePixelRange();if(X+=Y,Q){let U=z.ctrlsSvc.getScrollFeature(),_=U.getVScrollPosition(),H=U.getHScrollPosition();$+=H.left,X+=_.top}return{x:$,y:X}}var SJ={moduleName:"Drag",version:p,beans:[tq]};var e2={moduleName:"SharedDragAndDrop",version:p,beans:[tG],dependsOn:[SJ],userComponents:{agDragAndDropImage:pq},icons:{columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",rowDrag:"grip"}};var R5={moduleName:"HorizontalResize",version:p,beans:[sq],dependsOn:[SJ]},lq=":where(.ag-ltr) :where(.ag-column-moving){.ag-cell,.ag-header-cell,.ag-spanned-cell-wrapper{transition:left .2s}.ag-header-group-cell{transition:left .2s,width .2s}}:where(.ag-rtl) :where(.ag-column-moving){.ag-cell,.ag-header-cell,.ag-spanned-cell-wrapper{transition:right .2s}.ag-header-group-cell{transition:right .2s,width .2s}}",aq=class extends j{constructor(){super(...arguments);this.beanName="colAnimation",this.executeNextFuncs=[],this.executeLaterFuncs=[],this.active=!1,this.activeNext=!1,this.suppressAnimation=!1,this.animationThreadCount=0}postConstruct(){this.beans.ctrlsSvc.whenReady(this,(z)=>this.gridBodyCtrl=z.gridBodyCtrl)}isActive(){return this.active&&!this.suppressAnimation}setSuppressAnimation(z){this.suppressAnimation=z}start(){if(this.active)return;let{gos:z}=this;if(z.get("suppressColumnMoveAnimation"))return;if(z.get("enableRtl"))return;this.ensureAnimationCssClassPresent(),this.active=!0,this.activeNext=!0}finish(){if(!this.active)return;this.flush(()=>this.activeNext=!1,()=>this.active=!1)}executeNextVMTurn(z){if(this.activeNext)this.executeNextFuncs.push(z);else z()}executeLaterVMTurn(z){if(this.active)this.executeLaterFuncs.push(z);else z()}ensureAnimationCssClassPresent(){this.animationThreadCount++;let z=this.animationThreadCount,{gridBodyCtrl:J}=this;J.setColumnMovingCss(!0),this.executeLaterFuncs.push(()=>{if(this.animationThreadCount===z)J.setColumnMovingCss(!1)})}flush(z,J){let{executeNextFuncs:Q,executeLaterFuncs:Z}=this;if(Q.length===0&&Z.length===0){z(),J();return}let $=(X)=>{while(X.length){let Y=X.pop();if(Y)Y()}};this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{z(),$(Q)},0),window.setTimeout(()=>{J(),$(Z)},200)})}};function oq(z,J,Q){z.colMoves?.moveColumnByIndex(J,Q,"api")}function eq(z,J,Q){z.colMoves?.moveColumns(J,Q,"api")}var zB=class extends j{constructor(z){super();this.pinned=z,this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[]}onDragEnter(z){if(this.clearColumnsList(),this.gos.get("functionsReadOnly"))return;let J=z.dragItem.columns;if(!J)return;for(let Q of J){if(!Q.primary)continue;if(Q.isAnyFunctionActive())continue;if(Q.isAllowValue())this.columnsToAggregate.push(Q);else if(Q.isAllowRowGroup())this.columnsToGroup.push(Q);else if(Q.isAllowPivot())this.columnsToPivot.push(Q)}}getIconName(){if(this.columnsToAggregate.length+this.columnsToGroup.length+this.columnsToPivot.length>0)return this.pinned?"pinned":"move";return null}onDragLeave(z){this.clearColumnsList()}clearColumnsList(){this.columnsToAggregate.length=0,this.columnsToGroup.length=0,this.columnsToPivot.length=0}onDragging(z){}onDragStop(z){let{valueColsSvc:J,rowGroupColsSvc:Q,pivotColsSvc:Z}=this.beans;if(this.columnsToAggregate.length>0)J?.addColumns(this.columnsToAggregate,"toolPanelDragAndDrop");if(this.columnsToGroup.length>0)Q?.addColumns(this.columnsToGroup,"toolPanelDragAndDrop");if(this.columnsToPivot.length>0)Z?.addColumns(this.columnsToPivot,"toolPanelDragAndDrop")}onDragCancel(){this.clearColumnsList()}};function JB(z,J){if(!J||J.length<=1)return;if(J.filter((Z)=>z.indexOf(Z)<0).length>0)return;J.sort((Z,$)=>{let X=z.indexOf(Z),Y=z.indexOf($);return X-Y})}function QB(z){let J=[...z];for(let Q of z){let Z=null,$=Q.parent;while($?.getDisplayedLeafColumns().length===1)Z=$,$=$.parent;if(Z!=null){let Y=Z.getColGroupDef()?.marryChildren?Z.getProvidedColumnGroup().getLeafColumns():Z.getLeafColumns();for(let U of Y)if(!J.includes(U))J.push(U)}}return J}function ZB(z,J,Q,Z){let $=Z.allCols,X=null,Y=null;for(let U=0;U<z.length;U++){let _=z[U],H=Q.getProposedColumnOrder(J,_);if(!Q.doesOrderPassRules(H))continue;let G=H.filter((q)=>$.includes(q));if(Y===null)Y=G;else if(!Z0(G,Y))break;let W=XB(H);if(X===null||W<X.fragCount)X={move:_,fragCount:W}}return X}function n$(z){let{isFromHeader:J,fromLeft:Q,xPosition:Z,fromEnter:$,fakeEvent:X,pinned:Y,gos:U,colModel:_,colMoves:H,visibleCols:G}=z,{allMovingColumns:W}=z;if(J)W=QB(W);let q=W.slice();JB(_.getCols(),q);let B=UB({movingCols:q,draggingRight:Q,xPosition:Z,pinned:Y,gos:U,colModel:_,visibleCols:G}),E=$B(q,_);if(B.length===0)return;let K=B[0];if(E!==null&&(J||!$)&&!X){if(!Q&&K>=E)return;if(Q&&K<=E)return}let L=ZB(B,q,H,G);if(!L)return;let M=L.move;if(M>_.getCols().length-q.length)return;return{columns:q,toIndex:M}}function r$(z){let{columns:J,toIndex:Q}=n$(z)||{},{finished:Z,colMoves:$}=z;if(!J||Q==null)return null;return $.moveColumns(J,Q,"uiColumnMoved",Z),Z?null:{columns:J,toIndex:Q}}function $B(z,J){let Q=J.getCols(),Z=z.map((_)=>Q.indexOf(_)).sort((_,H)=>_-H),$=Z[0];return N(Z)-$!==Z.length-1?null:$}function XB(z){function J(Z){let $=[],X=Z.getOriginalParent();while(X!=null)$.push(X),X=X.getOriginalParent();return $}let Q=0;for(let Z=0;Z<z.length-1;Z++){let $=J(z[Z]),X=J(z[Z+1]);[$,X]=$.length>X.length?[$,X]:[X,$];for(let Y of $)if(X.indexOf(Y)===-1)Q++}return Q}function YB(z,J){switch(J){case"left":return z.leftCols;case"right":return z.rightCols;default:return z.centerCols}}function UB(z){let{movingCols:J,draggingRight:Q,xPosition:Z,pinned:$,gos:X,colModel:Y,visibleCols:U}=z;if(X.get("suppressMovableColumns")||J.some((D)=>D.colDef.suppressMovable))return[];let H=YB(U,$),G=Y.getCols(),W=H.filter((D)=>J.includes(D)),q=H.filter((D)=>!J.includes(D)),B=G.filter((D)=>!J.includes(D)),E=0,K=Z;if(Q){let D=0;for(let A of W)D+=A.getActualWidth();K-=D}if(K>0){for(let D=0;D<q.length;D++){let A=q[D];if(K-=A.getActualWidth(),K<0)break;E++}if(Q)E++}let F;if(E>0){let D=q[E-1];F=B.indexOf(D)+1}else if(F=B.indexOf(q[0]),F===-1)F=0;let L=[F],M=(D,A)=>D-A;if(Q){let D=F+1,A=G.length-1;while(D<=A)L.push(D),D++;L.sort(M)}else{let D=F,A=G.length-1,O=G[D];while(D<=A&&H.indexOf(O)<0)D++,L.push(D),O=G[D];D=F-1;let T=0;while(D>=T)L.push(D),D--;L.sort(M).reverse()}return L}function HZ(z){let{pinned:J,fromKeyboard:Q,gos:Z,ctrlsSvc:$,useHeaderRow:X,skipScrollPadding:Y}=z,U=$.getHeaderRowContainerCtrl(J)?.eViewport,{x:_}=z;if(!U)return 0;if(Q)_-=U.getBoundingClientRect().left;if(Z.get("enableRtl")){if(X)U=U.querySelector(".ag-header-row");_=U.clientWidth-_}if(J==null&&!Y)_+=$.get("center").getCenterViewportScrollLeft();return _}function xQ(z,J){for(let Q of z)Q.moving=J,Q.dispatchColEvent("movingChanged","uiColumnMoved")}var $8=7,GZ=100,P6=GZ/2,_B=5,HB=100,GB=class extends j{constructor(z){super();this.pinned=z,this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.isCenterContainer=!I(z)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,(z)=>{this.gridBodyCon=z.gridBodyCtrl})}getIconName(){let{pinned:z,lastDraggingEvent:J}=this,{dragItem:Q}=J||{},Z=Q?.columns??[];for(let $ of Z){let X=$.getPinned();if($.getColDef().lockPinned){if(X==z)return"move";continue}let Y=Q?.containerType;if(Y===z||!z)return"move";if(z&&(!X||Y!==z))return"pinned"}return"notAllowed"}onDragEnter(z){let J=z.dragItem,Q=J.columns;if(z.dragSource.type===0)this.setColumnsVisible(Q,!0,"uiColumnDragged");else{let $=J.visibleState,X=(Q||[]).filter((Y)=>$[Y.getId()]&&!Y.isVisible());this.setColumnsVisible(X,!0,"uiColumnDragged")}if(!this.gos.get("suppressMoveWhenColumnDragging"))this.attemptToPinColumns(Q,this.pinned);this.onDragging(z,!0,!0)}onDragging(z=this.lastDraggingEvent,J=!1,Q=!1,Z=!1){let{gos:$,ctrlsSvc:X}=this.beans,Y=$.get("suppressMoveWhenColumnDragging");if(Z&&!Y){this.finishColumnMoving();return}if(this.lastDraggingEvent=z,!z||!Z&&n(z.hDirection))return;let U=HZ({x:z.x,pinned:this.pinned,gos:$,ctrlsSvc:X});if(!J)this.checkCenterForScrolling(U);if(Y)this.handleColumnDragWhileSuppressingMovement(z,J,Q,U,Z);else this.handleColumnDragWhileAllowingMovement(z,J,Q,U,Z)}onDragLeave(){this.ensureIntervalCleared(),this.clearHighlighted(),this.updateDragItemContainerType(),this.lastMovedInfo=null}onDragStop(){this.onDragging(this.lastDraggingEvent,!1,!0,!0),this.ensureIntervalCleared(),this.lastMovedInfo=null}onDragCancel(){this.clearHighlighted(),this.ensureIntervalCleared(),this.lastMovedInfo=null}setColumnsVisible(z,J,Q){if(!z?.length)return;let Z=z.filter(($)=>!$.getColDef().lockVisible);if(!Z.length)return;this.beans.colModel.setColsVisible(Z,J,Q)}finishColumnMoving(){this.clearHighlighted();let z=this.lastMovedInfo;if(!z)return;let{columns:J,toIndex:Q}=z;this.beans.colMoves.moveColumns(J,Q,"uiColumnMoved",!0)}updateDragItemContainerType(){let{lastDraggingEvent:z}=this;if(this.gos.get("suppressMoveWhenColumnDragging")||!z)return;let J=z.dragItem;if(!J)return;J.containerType=this.pinned}handleColumnDragWhileSuppressingMovement(z,J,Q,Z,$){let X=this.getAllMovingColumns(z,!0);if($){let Y=this.isAttemptingToPin(X);if(Y)this.attemptToPinColumns(X,void 0,!0);let{fromLeft:U,xPosition:_}=this.getNormalisedXPositionInfo(X,Y)||{};if(U==null||_==null){this.finishColumnMoving();return}this.moveColumnsAfterHighlight({allMovingColumns:X,xPosition:_,fromEnter:J,fakeEvent:Q,fromLeft:U})}else{if(!this.beans.dragAndDrop.isDropZoneWithinThisGrid(z))return;this.highlightHoveredColumn(X,Z)}}handleColumnDragWhileAllowingMovement(z,J,Q,Z,$){let X=this.getAllMovingColumns(z),Y=this.normaliseDirection(z.hDirection)==="right",U=z.dragSource.type===1,_=this.getMoveColumnParams({allMovingColumns:X,isFromHeader:U,xPosition:Z,fromLeft:Y,fromEnter:J,fakeEvent:Q}),H=r$({..._,finished:$});if(H)this.lastMovedInfo=H}getAllMovingColumns(z,J=!1){let Q=z.dragSource.getDragItem(),Z;if(J){if(Z=Q.columnsInSplit,!Z)Z=Q.columns}else Z=Q.columns;let $=(X)=>X.colDef.lockPinned?X.getPinned()==this.pinned:!0;if(!Z)return[];return Z.filter($)}getMoveColumnParams(z){let{allMovingColumns:J,isFromHeader:Q,xPosition:Z,fromLeft:$,fromEnter:X,fakeEvent:Y}=z,{gos:U,colModel:_,colMoves:H,visibleCols:G}=this.beans;return{allMovingColumns:J,isFromHeader:Q,fromLeft:$,xPosition:Z,pinned:this.pinned,fromEnter:X,fakeEvent:Y,gos:U,colModel:_,colMoves:H,visibleCols:G}}highlightHoveredColumn(z,J){let{gos:Q,colModel:Z}=this.beans,$=Q.get("enableRtl"),X=Z.getCols().filter((G)=>G.isVisible()&&G.getPinned()===this.pinned),Y=null,U=null,_=null;for(let G of X){if(U=G.getActualWidth(),Y=this.getNormalisedColumnLeft(G,0,$),Y!=null){let W=Y+U;if(Y<=J&&W>=J){_=G;break}}Y=null,U=null}if(!_){for(let G=X.length-1;G>=0;G--){let W=X[G],q=X[G].parent;if(!q){_=W;break}let B=q?.getDisplayedLeafColumns();if(B.length){_=N(B);break}}if(!_)return;Y=this.getNormalisedColumnLeft(_,0,$),U=_.getActualWidth()}else if(z.indexOf(_)!==-1)_=null;if(_==null||Y==null||U==null){if(this.lastHighlightedColumn?.column!==_)this.clearHighlighted();return}let H;if(J-Y<U/2){let G=X.indexOf(_);if(G===0)H=0;else H=1,_=X[G-1]}else H=1;if(this.lastHighlightedColumn?.column!==_||this.lastHighlightedColumn?.position!==H)this.clearHighlighted();X8(_,H),this.lastHighlightedColumn={column:_,position:H}}getNormalisedXPositionInfo(z,J){let{gos:Q,visibleCols:Z}=this.beans,$=Q.get("enableRtl"),{firstMovingCol:X,column:Y,position:U}=this.getColumnMoveAndTargetInfo(z,J,$);if(!X||!Y||U==null)return;let _=Z.allCols,H=_.indexOf(X),G=_.indexOf(Y),W=U===0,q=H<G||H===G&&!W,B=0;if(W){if(q)B-=1}else if(!q)B+=1;if(G+B===H)return;let E=_[G+B];if(!E)return;let K=this.getNormalisedColumnLeft(E,20,$);return{fromLeft:q,xPosition:K}}getColumnMoveAndTargetInfo(z,J,Q){let Z=this.lastHighlightedColumn||{},{firstMovingCol:$,lastMovingCol:X}=WB(z);if(!$||!X||Z.column||!J)return{firstMovingCol:$,...Z};let U=this.getPinDirection()==="left";return{firstMovingCol:$,position:U?1:0,column:U!==Q?$:X}}normaliseDirection(z){if(this.gos.get("enableRtl"))switch(z){case"left":return"right";case"right":return"left"}return z}getNormalisedColumnLeft(z,J,Q){let{gos:Z,ctrlsSvc:$}=this.beans,X=z.getLeft();if(X==null)return null;let Y=z.getActualWidth();return HZ({x:Q?X+Y-J:X+J,pinned:z.getPinned(),useHeaderRow:Q,skipScrollPadding:!0,gos:Z,ctrlsSvc:$})}isAttemptingToPin(z){let J=this.needToMoveLeft||this.needToMoveRight,Q=this.failedMoveAttempts>$8;return J&&Q||z.some((Z)=>Z.getPinned()!==this.pinned)}moveColumnsAfterHighlight(z){let{allMovingColumns:J,xPosition:Q,fromEnter:Z,fakeEvent:$,fromLeft:X}=z,Y=this.getMoveColumnParams({allMovingColumns:J,isFromHeader:!0,xPosition:Q,fromLeft:X,fromEnter:Z,fakeEvent:$}),{columns:U,toIndex:_}=n$(Y)||{};if(U&&_!=null)this.lastMovedInfo={columns:U,toIndex:_};this.finishColumnMoving()}clearHighlighted(){let{lastHighlightedColumn:z}=this;if(!z)return;X8(z.column,null),this.lastHighlightedColumn=null}checkCenterForScrolling(z){if(!this.isCenterContainer)return;let J=this.beans.ctrlsSvc.get("center"),Q=J.getCenterViewportScrollLeft(),Z=Q+J.getCenterWidth(),$,X;if(this.gos.get("enableRtl"))$=z<Q+P6,X=z>Z-P6;else X=z<Q+P6,$=z>Z-P6;if(this.needToMoveRight=$,this.needToMoveLeft=X,X||$)this.ensureIntervalStarted();else this.ensureIntervalCleared()}ensureIntervalStarted(){if(this.movingIntervalId)return;this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),HB),this.beans.dragAndDrop.setDragImageCompIcon(this.needToMoveLeft?"left":"right",!0)}ensureIntervalCleared(){if(!this.movingIntervalId)return;window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.failedMoveAttempts=0,this.beans.dragAndDrop.setDragImageCompIcon(this.getIconName())}moveInterval(){let z;if(this.intervalCount++,z=10+this.intervalCount*_B,z>GZ)z=GZ;let J=null,Q=this.gridBodyCon.scrollFeature;if(this.needToMoveLeft)J=Q.scrollHorizontally(-z);else if(this.needToMoveRight)J=Q.scrollHorizontally(z);if(J!==0)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{this.failedMoveAttempts++;let{pinnedCols:Z,dragAndDrop:$,gos:X}=this.beans;if(this.failedMoveAttempts<=$8+1||!Z)return;if($.setDragImageCompIcon("pinned"),!X.get("suppressMoveWhenColumnDragging")){let Y=this.lastDraggingEvent?.dragItem.columns;this.attemptToPinColumns(Y,void 0,!0)}}}getPinDirection(){if(this.needToMoveLeft||this.pinned==="left")return"left";if(this.needToMoveRight||this.pinned==="right")return"right"}attemptToPinColumns(z,J,Q=!1){let Z=(z||[]).filter((Y)=>!Y.colDef.lockPinned);if(!Z.length)return 0;if(Q)J=this.getPinDirection();let{pinnedCols:$,dragAndDrop:X}=this.beans;if($?.setColsPinned(Z,J,"uiColumnDragged"),Q)X.nudge();return Z.length}destroy(){super.destroy(),this.lastDraggingEvent=null,this.clearHighlighted(),this.lastMovedInfo=null}};function X8(z,J){if(z.highlighted===J)return;z.highlighted=J,z.dispatchColEvent("headerHighlightChanged","uiColumnMoved")}function WB(z){let J=z.length,Q,Z;for(let $=0;$<J;$++){if(!Q){let X=z[$];if(X.getLeft()!=null)Q=X}if(!Z){let X=z[J-1-$];if(X.getLeft()!=null)Z=X}if(Q&&Z)break}return{firstMovingCol:Q,lastMovingCol:Z}}var qB=class extends j{constructor(z,J){super();this.pinned=z,this.eContainer=J}postConstruct(){let{ctrlsSvc:z,dragAndDrop:J}=this.beans,Q=this.pinned;z.whenReady(this,(Z)=>{let $,X=Z.gridBodyCtrl.eBodyViewport;switch(Q){case"left":$=[[X,Z.left.eContainer],[Z.bottomLeft.eContainer],[Z.topLeft.eContainer]];break;case"right":$=[[X,Z.right.eContainer],[Z.bottomRight.eContainer],[Z.topRight.eContainer]];break;default:$=[[X,Z.center.eViewport],[Z.bottomCenter.eViewport],[Z.topCenter.eViewport]];break}this.eSecondaryContainers=$}),this.moveColumnFeature=this.createManagedBean(new GB(Q)),this.bodyDropPivotTarget=this.createManagedBean(new zB(Q)),J.addDropTarget(this),this.addDestroyFunc(()=>J.removeDropTarget(this))}isInterestedIn(z){return z===1||z===0&&this.gos.get("allowDragFromColumnsToolPanel")}getSecondaryContainers(){return this.eSecondaryContainers}getContainer(){return this.eContainer}getIconName(){return this.currentDropListener.getIconName()}isDropColumnInPivotMode(z){return this.beans.colModel.pivotMode&&z.dragSource.type===0}onDragEnter(z){this.currentDropListener=this.isDropColumnInPivotMode(z)?this.bodyDropPivotTarget:this.moveColumnFeature,this.currentDropListener.onDragEnter(z)}onDragLeave(z){this.currentDropListener.onDragLeave(z)}onDragging(z){this.currentDropListener.onDragging(z)}onDragStop(z){this.currentDropListener.onDragStop(z)}onDragCancel(){this.currentDropListener.onDragCancel()}};function t$(z,J){let Q=[],Z=[],$=[];if(z.forEach((Y)=>{let U=Y.colDef.lockPosition;if(U==="right")$.push(Y);else if(U==="left"||U===!0)Q.push(Y);else Z.push(Y)}),J.get("enableRtl"))return[...$,...Z,...Q];return[...Q,...Z,...$]}function s$(z,J){let Q=!0;return u4(null,J,(Z)=>{if(!_0(Z))return;let $=Z;if(!$.getColGroupDef()?.marryChildren)return;let U=[];for(let q of $.getLeafColumns()){let B=z.indexOf(q);U.push(B)}let _=Math.max.apply(Math,U),H=Math.min.apply(Math,U),G=_-H,W=$.getLeafColumns().length-1;if(G>W)Q=!1}),Q}var BB=class extends j{constructor(){super(...arguments);this.beanName="colMoves"}moveColumnByIndex(z,J,Q){let Z=this.beans.colModel.getCols();if(!Z)return;let $=Z[z];this.moveColumns([$],J,Q)}moveColumns(z,J,Q,Z=!0){let{colModel:$,colAnimation:X,visibleCols:Y,eventSvc:U}=this.beans,_=$.getCols();if(!_)return;if(J>_.length-z.length){V(30,{toIndex:J});return}X?.start();let H=$.getColsForKeys(z);if(this.doesMovePassRules(H,J))b7($.getCols(),H,J),Y.refresh(Q),U.dispatchEvent({type:"columnMoved",columns:H,column:H.length===1?H[0]:null,toIndex:J,finished:Z,source:Q});X?.finish()}doesMovePassRules(z,J){let Q=this.getProposedColumnOrder(z,J);return this.doesOrderPassRules(Q)}doesOrderPassRules(z){let{colModel:J,gos:Q}=this.beans;if(!s$(z,J.getColTree()))return!1;if(!(($)=>{let X=(H)=>{if(!H)return 0;return H==="left"||H===!0?-1:1},Y=Q.get("enableRtl"),U=Y?1:-1,_=!0;for(let H of $){let G=X(H.colDef.lockPosition);if(Y){if(G>U)_=!1}else if(G<U)_=!1;U=G}return _})(z))return!1;return!0}getProposedColumnOrder(z,J){let Z=this.beans.colModel.getCols().slice();return b7(Z,z,J),Z}createBodyDropTarget(z,J){return new qB(z,J)}moveHeader(z,J,Q,Z,$){let{ctrlsSvc:X,gos:Y,colModel:U,visibleCols:_,focusSvc:H}=this.beans,G=J.getBoundingClientRect(),W=G.left,q=K0(Q),B=q?G.width:Q.getActualWidth(),E=z==="left"!==Y.get("enableRtl"),K=HZ({x:E?W-20:W+B+20,pinned:Z,fromKeyboard:!0,gos:Y,ctrlsSvc:X}),F=H.focusedHeader;r$({allMovingColumns:q?Q.getLeafColumns():[Q],isFromHeader:!0,fromLeft:z==="right",xPosition:K,pinned:Z,fromEnter:!1,fakeEvent:!1,gos:Y,colModel:U,colMoves:this,visibleCols:_,finished:!0});let L;if(q){let M=Q.getDisplayedLeafColumns();L=E?M[0]:N(M)}else L=Q;if(X.getScrollFeature().ensureColumnVisible(L,"auto"),(!$.isAlive()||Y.get("ensureDomOrder"))&&F){let M;if(q){let D=Q.getGroupId(),A=Q.getLeafColumns();if(!A.length)return;let O=A[0].parent;if(!O)return;M=EB(O,D)}else M=Q;if(M)H.focusHeaderPosition({headerPosition:{...F,column:M}})}}setDragSourceForHeader(z,J,Q){let{gos:Z,colModel:$,dragAndDrop:X,visibleCols:Y}=this.beans,U=!Z.get("suppressDragLeaveHidesColumns"),_=K0(J),H=_?J.getProvidedColumnGroup().getLeafColumns():[J],W={type:1,eElement:z,getDefaultIconName:()=>U?"hide":"notAllowed",getDragItem:_?()=>FB(J,Y.allCols):()=>KB(J),dragItemName:Q,onDragStarted:()=>{U=!Z.get("suppressDragLeaveHidesColumns"),xQ(H,!0)},onDragStopped:()=>xQ(H,!1),onDragCancelled:()=>xQ(H,!1),onGridEnter:(q)=>{if(U){let{columns:B=[],visibleState:E}=q??{},K=_?(L)=>!E||E[L.getColId()]:()=>!0,F=B.filter((L)=>!L.getColDef().lockVisible&&K(L));$.setColsVisible(F,!0,"uiColumnMoved")}},onGridExit:(q)=>{if(U){let B=q?.columns?.filter((E)=>!E.getColDef().lockVisible)||[];$.setColsVisible(B,!1,"uiColumnMoved")}}};return X.addDragSource(W,!0),W}};function EB(z,J){while(z){if(z.getGroupId()===J)return z;z=z.parent}return}function KB(z){let J={};return J[z.getId()]=z.isVisible(),{columns:[z],visibleState:J,containerType:z.pinned}}function FB(z,J){let Q=z.getProvidedColumnGroup().getLeafColumns(),Z={};for(let U of Q)Z[U.getId()]=U.isVisible();let $=[];for(let U of J)if(Q.indexOf(U)>=0)$.push(U),X0(Q,U);for(let U of Q)$.push(U);let X=[],Y=z.getLeafColumns();for(let U of $)if(Y.indexOf(U)!==-1)X.push(U);return{columns:$,columnsInSplit:X,visibleState:Z,containerType:X[0]?.pinned}}var z6={moduleName:"ColumnMove",version:p,beans:[BB,aq],apiFunctions:{moveColumnByIndex:oq,moveColumns:eq},dependsOn:[e2],css:[lq]},LB=class extends j{constructor(){super(...arguments);this.beanName="autoWidthCalc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,(z)=>{this.centerRowContainerCtrl=z.center})}getPreferredWidthForColumn(z,J){let Q=this.getHeaderCellForColumn(z);if(!Q)return-1;let Z=this.beans.rowRenderer.getAllCellsNotSpanningForColumn(z);if(!J)Z.push(Q);return this.getPreferredWidthForElements(Z)}getPreferredWidthForColumnGroup(z){let J=this.getHeaderCellForColumn(z);if(!J)return-1;return this.getPreferredWidthForElements([J])}getPreferredWidthForElements(z,J){let Q=document.createElement("form");Q.style.position="fixed";let Z=this.centerRowContainerCtrl.eContainer;for(let X of z)this.cloneItemIntoDummy(X,Q);Z.appendChild(Q);let $=Math.ceil(Q.getBoundingClientRect().width);return Q.remove(),J=J??this.gos.get("autoSizePadding"),$+J}getHeaderCellForColumn(z){let J=null;for(let Q of this.beans.ctrlsSvc.getHeaderRowContainerCtrls()){let Z=Q.getHtmlElementForColumnHeader(z);if(Z!=null)J=Z}return J}cloneItemIntoDummy(z,J){let Q=z.cloneNode(!0);Q.style.width="",Q.style.position="static",Q.style.left="";let Z=document.createElement("div"),$=Z.classList;if(["ag-header-cell","ag-header-group-cell"].some((U)=>Q.classList.contains(U)))$.add("ag-header","ag-header-row"),Z.style.position="static";else $.add("ag-row");let Y=z.parentElement;while(Y){if(["ag-header-row","ag-row"].some((_)=>Y.classList.contains(_))){for(let _=0;_<Y.classList.length;_++){let H=Y.classList[_];if(H!="ag-row-position-absolute")$.add(H)}break}Y=Y.parentElement}Z.appendChild(Q),J.appendChild(Z)}},l$={moduleName:"AutoWidth",version:p,beans:[LB]};function MB(z,J,Q=!0,Z="api"){z.colResize?.setColumnWidths(J,!1,Q,Z)}function a$(z,J){if(!z||z.length==0)return;let Q=J(z[0]);for(let Z=1;Z<z.length;Z++)if(Q!==J(z[Z]))return;return Q}function o$(z,J,Q){if(!J.length)return;let Z=J.length===1?J[0]:null,$=a$(J,(X)=>X.getPinned());z.dispatchEvent({type:"columnPinned",pinned:$!=null?$:null,columns:J,column:Z,source:Q})}function DB(z,J,Q){if(!J.length)return;let Z=J.length===1?J[0]:null,$=a$(J,(X)=>X.isVisible());z.dispatchEvent({type:"columnVisible",visible:$,columns:J,column:Z,source:Q})}function e$(z,J,Q,Z){z.dispatchEvent({type:J,columns:Q,column:Q?.length==1?Q[0]:null,source:Z})}function c1(z,J,Q,Z,$=null){if(J?.length)z.dispatchEvent({type:"columnResized",columns:J,column:J.length===1?J[0]:null,flexColumns:$,finished:Q,source:Z})}var RB=class extends j{constructor(z,J,Q,Z){super();this.comp=z,this.eResize=J,this.pinned=Q,this.columnGroup=Z}postConstruct(){if(!this.columnGroup.isResizable()){this.comp.setResizableDisplayed(!1);return}let{horizontalResizeSvc:z,gos:J,colAutosize:Q}=this.beans,Z=z.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});if(this.addDestroyFunc(Z),!J.get("suppressAutoSize")&&Q)this.addDestroyFunc(Q.addColumnGroupResize(this.eResize,this.columnGroup,()=>this.resizeLeafColumnsToFit("uiColumnResized")))}onResizeStart(z){let{columnsToResize:J,resizeStartWidth:Q,resizeRatios:Z,groupAfterColumns:$,groupAfterStartWidth:X,groupAfterRatios:Y}=this.getInitialValues(z);this.resizeCols=J,this.resizeStartWidth=Q,this.resizeRatios=Z,this.resizeTakeFromCols=$,this.resizeTakeFromStartWidth=X,this.resizeTakeFromRatios=Y,this.toggleColumnResizing(!0)}onResizing(z,J,Q="uiColumnResized"){let Z=this.normaliseDragChange(J),$=this.resizeStartWidth+Z;this.resizeColumnsFromLocalValues($,Q,z)}getInitialValues(z){let J=(_)=>_.reduce((H,G)=>H+G.getActualWidth(),0),Q=(_,H)=>_.map((G)=>G.getActualWidth()/H),Z=this.getColumnsToResize(),$=J(Z),X=Q(Z,$),Y={columnsToResize:Z,resizeStartWidth:$,resizeRatios:X},U=null;if(z)U=this.beans.colGroupSvc?.getGroupAtDirection(this.columnGroup,"After")??null;if(U){let _=U.getDisplayedLeafColumns(),H=Y.groupAfterColumns=_.filter((W)=>W.isResizable()),G=Y.groupAfterStartWidth=J(H);Y.groupAfterRatios=Q(H,G)}else Y.groupAfterColumns=void 0,Y.groupAfterStartWidth=void 0,Y.groupAfterRatios=void 0;return Y}resizeLeafColumnsToFit(z){let J=this.beans.autoWidthCalc.getPreferredWidthForColumnGroup(this.columnGroup),Q=this.getInitialValues();if(J>Q.resizeStartWidth)this.resizeColumns(Q,J,z,!0)}resizeColumnsFromLocalValues(z,J,Q=!0){if(!this.resizeCols||!this.resizeRatios)return;let Z={columnsToResize:this.resizeCols,resizeStartWidth:this.resizeStartWidth,resizeRatios:this.resizeRatios,groupAfterColumns:this.resizeTakeFromCols,groupAfterStartWidth:this.resizeTakeFromStartWidth,groupAfterRatios:this.resizeTakeFromRatios};this.resizeColumns(Z,z,J,Q)}resizeColumns(z,J,Q,Z=!0){let{columnsToResize:$,resizeStartWidth:X,resizeRatios:Y,groupAfterColumns:U,groupAfterStartWidth:_,groupAfterRatios:H}=z,G=[];if(G.push({columns:$,ratios:Y,width:J}),U){let W=J-X;G.push({columns:U,ratios:H,width:_-W})}if(this.beans.colResize?.resizeColumnSets({resizeSets:G,finished:Z,source:Q}),Z)this.toggleColumnResizing(!1)}toggleColumnResizing(z){this.comp.toggleCss("ag-column-resizing",z)}getColumnsToResize(){return this.columnGroup.getDisplayedLeafColumns().filter((J)=>J.isResizable())}normaliseDragChange(z){let J=z;if(this.gos.get("enableRtl")){if(this.pinned!=="left")J*=-1}else if(this.pinned==="right")J*=-1;return J}destroy(){super.destroy(),this.resizeCols=void 0,this.resizeRatios=void 0,this.resizeTakeFromCols=void 0,this.resizeTakeFromRatios=void 0}},AB=class extends j{constructor(z,J,Q,Z,$){super();this.pinned=z,this.column=J,this.eResize=Q,this.comp=Z,this.ctrl=$}postConstruct(){let z=[],J,Q,Z=()=>{if(x(this.eResize,J),!J)return;let{horizontalResizeSvc:Y,colAutosize:U}=this.beans,_=Y.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});if(z.push(_),Q&&U)z.push(U.addColumnAutosizeListeners(this.eResize,this.column))},$=()=>{for(let Y of z)Y();z.length=0},X=()=>{let Y=this.column.isResizable(),U=!this.gos.get("suppressAutoSize")&&!this.column.colDef.suppressAutoSize;if(Y!==J||U!==Q)J=Y,Q=U,$(),Z()};X(),this.addDestroyFunc($),this.ctrl.setRefreshFunction("resize",X)}onResizing(z,J){let{column:Q,lastResizeAmount:Z,resizeStartWidth:$,beans:X}=this,Y=this.normaliseResizeAmount(J),U=$+Y,_=[{key:Q,newWidth:U}],{pinnedCols:H,ctrlsSvc:G,colResize:W}=X;if(this.column.getPinned()){let q=H?.leftWidth??0,B=H?.rightWidth??0,E=z1(G.getGridBodyCtrl().eBodyViewport)-50;if(q+B+(Y-Z)>E)return}if(this.lastResizeAmount=Y,W?.setColumnWidths(_,this.resizeWithShiftKey,z,"uiColumnResized"),z)this.toggleColumnResizing(!1)}onResizeStart(z){this.resizeStartWidth=this.column.getActualWidth(),this.lastResizeAmount=0,this.resizeWithShiftKey=z,this.toggleColumnResizing(!0)}toggleColumnResizing(z){this.column.resizing=z,this.comp.toggleCss("ag-column-resizing",z)}normaliseResizeAmount(z){let J=z,Q=this.pinned!=="left",Z=this.pinned==="right";if(this.gos.get("enableRtl")){if(Q)J*=-1}else if(Z)J*=-1;return J}},jB=class extends j{constructor(){super(...arguments);this.beanName="colResize"}setColumnWidths(z,J,Q,Z){let $=[],{colModel:X,gos:Y,visibleCols:U}=this.beans;for(let _ of z){let H=X.getColDefColOrCol(_.key);if(!H)continue;if($.push({width:_.newWidth,ratios:[1],columns:[H]}),Y.get("colResizeDefault")==="shift")J=!J;if(J){let W=U.getColAfter(H);if(!W)continue;let q=H.getActualWidth()-_.newWidth,B=W.getActualWidth()+q;$.push({width:B,ratios:[1],columns:[W]})}}if($.length===0)return;this.resizeColumnSets({resizeSets:$,finished:Q,source:Z})}resizeColumnSets(z){let{resizeSets:J,finished:Q,source:Z}=z;if(!(!J||J.every((G)=>VB(G)))){if(Q){let G=J&&J.length>0?J[0].columns:null;c1(this.eventSvc,G,Q,Z)}return}let X=[],Y=[];for(let G of J){let{width:W,columns:q,ratios:B}=G,E={},K={};for(let M of q)Y.push(M);let F=!0,L=0;while(F){if(L++,L>1000){r(31);break}F=!1;let M=[],D=0,A=W;q.forEach((T,S)=>{if(K[T.getId()])A-=E[T.getId()];else{M.push(T);let C=B[S];D+=C}});let O=1/D;M.forEach((T,S)=>{let k=S===M.length-1,C;if(k)C=A;else C=Math.round(B[S]*W*O),A-=C;let w=T.getMinWidth(),m=T.getMaxWidth();if(C<w)C=w,K[T.getId()]=!0,F=!0;else if(m>0&&C>m)C=m,K[T.getId()]=!0,F=!0;E[T.getId()]=C})}for(let M of q){let D=E[M.getId()];if(M.getActualWidth()!==D)M.setActualWidth(D,Z),X.push(M)}}let U=X.length>0,_=[];if(U){let{colFlex:G,visibleCols:W,colViewport:q}=this.beans;_=G?.refreshFlexedColumns({resizingCols:Y,skipSetLeft:!0})??[],W.setLeftValues(Z),W.updateBodyWidths(),q.checkViewportColumns()}let H=Y.concat(_);if(U||Q)c1(this.eventSvc,H,Q,Z,_)}resizeHeader(z,J,Q){if(!z.isResizable())return;let Z=z.getActualWidth(),$=z.getMinWidth(),X=z.getMaxWidth(),Y=Math.min(Math.max(Z+J,$),X);this.setColumnWidths([{key:z,newWidth:Y}],Q,!0,"uiColumnResized")}createResizeFeature(z,J,Q,Z,$){return new AB(z,J,Q,Z,$)}createGroupResizeFeature(z,J,Q,Z){return new RB(z,J,Q,Z)}};function VB(z){let{columns:J,width:Q}=z,Z=0,$=0,X=!0;for(let _ of J){let H=_.getMinWidth();Z+=H||0;let G=_.getMaxWidth();if(G>0)$+=G;else X=!1}let Y=Q>=Z,U=!X||Q<=$;return Y&&U}var OB={moduleName:"ColumnResize",version:p,beans:[jB],apiFunctions:{setColumnWidths:MB},dependsOn:[R5,l$]},PB=class extends j{constructor(z,J){super();this.removeChildListenersFuncs=[],this.columnGroup=J,this.comp=z}postConstruct(){this.addListenersToChildrenColumns(),this.addManagedListeners(this.columnGroup,{displayedChildrenChanged:this.onDisplayedChildrenChanged.bind(this)}),this.onWidthChanged(),this.addDestroyFunc(this.removeListenersOnChildrenColumns.bind(this))}addListenersToChildrenColumns(){this.removeListenersOnChildrenColumns();let z=this.onWidthChanged.bind(this);for(let J of this.columnGroup.getLeafColumns())J.__addEventListener("widthChanged",z),J.__addEventListener("visibleChanged",z),this.removeChildListenersFuncs.push(()=>{J.__removeEventListener("widthChanged",z),J.__removeEventListener("visibleChanged",z)})}removeListenersOnChildrenColumns(){for(let z of this.removeChildListenersFuncs)z();this.removeChildListenersFuncs=[]}onDisplayedChildrenChanged(){this.addListenersToChildrenColumns(),this.onWidthChanged()}onWidthChanged(){let z=this.columnGroup.getActualWidth();this.comp.setWidth(`${z}px`),this.comp.toggleCss("ag-hidden",z===0)}},TB=class extends B5{constructor(){super(...arguments);this.onSuppressColMoveChange=()=>{if(!this.isAlive()||this.isSuppressMoving())this.removeDragSource();else if(!this.dragSource)this.setDragSource(this.eGui)}}wireComp(z,J,Q,Z,$){let{column:X,beans:Y}=this,{context:U,colNames:_,colHover:H,rangeSvc:G,colResize:W}=Y;this.comp=z,$=l2(this,U,$),this.setGui(J,$),this.displayName=_.getDisplayNameForColumnGroup(X,"header"),this.refreshHeaderStyles(),this.addClasses(),this.setupMovingCss($),this.setupExpandable($),this.setupTooltip(),this.refreshAnnouncement(),this.setupAutoHeight({wrapperElement:Z,compBean:$}),this.setupUserComp(),this.addHeaderMouseListeners($,Z),this.addManagedPropertyListener("groupHeaderHeight",this.refreshMaxHeaderHeight.bind(this)),this.refreshMaxHeaderHeight();let q=this.rowCtrl.pinned,B=X.getProvidedColumnGroup().getLeafColumns();if(H?.createHoverFeature($,B,J),G?.createRangeHighlightFeature($,X,z),$.createManagedBean(new q5(X,J,Y)),$.createManagedBean(new PB(z,X)),W)this.resizeFeature=$.createManagedBean(W.createGroupResizeFeature(z,Q,q,X));else z.setResizableDisplayed(!1);$.createManagedBean(new $z(J,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:()=>{return},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addHighlightListeners($,B),this.addManagedEventListeners({cellSelectionChanged:()=>this.refreshAnnouncement()}),$.addManagedPropertyListener("cellSelection",()=>this.refreshAnnouncement()),$.addManagedPropertyListener("suppressMovableColumns",this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners($),$.addDestroyFunc(()=>this.clearComponent())}getHeaderClassParams(){let{column:z,beans:J}=this,Q=z.getDefinition();return v(J.gos,{colDef:Q,columnGroup:z,floatingFilter:!1})}refreshMaxHeaderHeight(){let{gos:z,comp:J}=this,Q=z.get("groupHeaderHeight");if(Q!=null)if(Q===0)J.setHeaderWrapperHidden(!0);else J.setHeaderWrapperMaxHeight(Q);else J.setHeaderWrapperHidden(!1),J.setHeaderWrapperMaxHeight(null)}addHighlightListeners(z,J){if(!this.beans.gos.get("suppressMoveWhenColumnDragging"))return;for(let Q of J)z.addManagedListeners(Q,{headerHighlightChanged:this.onLeafColumnHighlightChanged.bind(this,Q)})}onLeafColumnHighlightChanged(z){let J=this.column.getDisplayedLeafColumns(),Q=J[0]===z,Z=N(J)===z;if(!Q&&!Z)return;let $=z.getHighlighted(),X=!!this.rowCtrl.getHeaderCellCtrls().find((_)=>{return _.column.isMoving()}),Y=!1,U=!1;if(X){let _=this.beans.gos.get("enableRtl"),H=$===1,G=$===0;if(Q)if(_)U=H;else Y=G;if(Z)if(_)Y=G;else U=H}this.comp.toggleCss("ag-header-highlight-before",Y),this.comp.toggleCss("ag-header-highlight-after",U)}resizeHeader(z,J){let{resizeFeature:Q}=this;if(!Q)return;let Z=Q.getInitialValues(J);Q.resizeColumns(Z,Z.resizeStartWidth+z,"uiColumnResized",!0)}resizeLeafColumnsToFit(z){this.resizeFeature?.resizeLeafColumnsToFit(z)}setupUserComp(){let{colGroupSvc:z,userCompFactory:J,gos:Q,enterpriseMenuFactory:Z}=this.beans,$=this.column,X=$.getProvidedColumnGroup(),Y=v(Q,{displayName:this.displayName,columnGroup:$,setExpanded:(_)=>{z.setColumnGroupOpened(X,_,"gridInitializing")},setTooltip:(_,H)=>{Q.assertModuleRegistered("Tooltip",3),this.setupTooltip(_,H)},showColumnMenu:(_,H)=>Z?.showMenuAfterButtonClick(X,_,"columnMenu",H),showColumnMenuAfterMouseClick:(_,H)=>Z?.showMenuAfterMouseEvent(X,_,"columnMenu",H),eGridHeader:this.eGui}),U=uG(J,Y);if(U)this.comp.setUserCompDetails(U)}addHeaderMouseListeners(z,J){let{column:Q,comp:Z,beans:{rangeSvc:$},gos:X}=this,Y=(G)=>this.handleMouseOverChange(G.type==="mouseenter"),U=()=>this.dispatchColumnMouseEvent("columnHeaderClicked",Q.getProvidedColumnGroup()),_=(G)=>this.handleContextMenuMouseEvent(G,void 0,Q.getProvidedColumnGroup());z.addManagedListeners(this.eGui,{mouseenter:Y,mouseleave:Y,click:U,contextmenu:_}),Z.toggleCss("ag-header-group-cell-selectable",e4(X));let H=$?.createHeaderGroupCellMouseListenerFeature(this.column,J);if(H)this.createManagedBean(H)}handleMouseOverChange(z){this.eventSvc.dispatchEvent({type:z?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column.getProvidedColumnGroup()})}setupTooltip(z,J){this.tooltipFeature=this.beans.tooltipSvc?.setupHeaderGroupTooltip(this.tooltipFeature,this,z,J)}setupExpandable(z){let J=this.column.getProvidedColumnGroup();this.refreshExpanded();let Q=this.refreshExpanded.bind(this);z.addManagedListeners(J,{expandedChanged:Q,expandableChanged:Q})}refreshExpanded(){let{column:z}=this;this.expandable=z.isExpandable();let J=z.isExpanded();if(this.expandable)this.comp.setAriaExpanded(J?"true":"false");else this.comp.setAriaExpanded(void 0);this.refreshHeaderStyles(),this.refreshAnnouncement()}addClasses(){let{column:z}=this,J=z.getColGroupDef(),Q=OJ(J,this.gos,null,z);if(z.isPadding()){if(Q.push("ag-header-group-cell-no-group"),z.getLeafColumns().every(($)=>$.isSpanHeaderHeight()))Q.push("ag-header-span-height")}else if(Q.push("ag-header-group-cell-with-group"),J?.wrapHeaderText)Q.push("ag-header-cell-wrap-text");for(let Z of Q)this.comp.toggleCss(Z,!0)}setupMovingCss(z){let{column:J}=this,Z=J.getProvidedColumnGroup().getLeafColumns(),$=()=>this.comp.toggleCss("ag-header-cell-moving",J.isMoving());for(let X of Z)z.addManagedListeners(X,{movingChanged:$});$()}onFocusIn(z){if(!this.eGui.contains(z.relatedTarget))this.focusThis(),this.announceAriaDescription()}handleKeyDown(z){if(super.handleKeyDown(z),!this.getWrapperHasFocus())return;let{column:Q,expandable:Z,gos:$,beans:X}=this,Y=e4($);if(z.key!=R.ENTER)return;if(Y&&!z.altKey)X.rangeSvc?.handleColumnSelection(Q,z);else if(Z){let U=!Q.isExpanded();X.colGroupSvc.setColumnGroupOpened(Q.getProvidedColumnGroup(),U,"uiColumnExpanded")}}refreshAnnouncement(){let z,{gos:J,expandable:Q}=this,Z=e4(J),$=this.getLocaleTextFunc();if(Z&&Q)z=$("ariaColumnGroupCellSelectionAndExpansion","Press Enter to toggle selection for all visible cells in this column group. Press ALT ENTER to expand or collapse this column group");else if(Z)z=$("ariaColumnGroupCellSelection","Press Enter to toggle selection for all visible cells in this column group");else if(Q)z=$("ariaColumnGroupExpansion","Press ENTER to expand or collapse this column group");this.ariaAnnouncement=z}announceAriaDescription(){let{beans:z,eGui:J,ariaAnnouncement:Q}=this;if(!Q||!J.contains(d(z)))return;z.ariaAnnounce?.announceValue(Q,"columnHeader")}setDragSource(z){if(!this.isAlive()||this.isSuppressMoving())return;if(this.removeDragSource(),!z)return;this.dragSource=this.beans.colMoves?.setDragSourceForHeader(z,this.column,this.displayName)??null}isSuppressMoving(){return this.gos.get("suppressMovableColumns")||this.column.getLeafColumns().some((z)=>z.colDef.suppressMovable||z.colDef.lockPosition)}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function SB(z,J,Q){z.colGroupSvc?.setColumnGroupOpened(J,Q,"api")}function IB(z,J,Q){return z.colGroupSvc?.getColumnGroup(J,Q)??null}function fB(z,J){return z.colGroupSvc?.getProvidedColGroup(J)??null}function kB(z,J,Q){return z.colNames.getDisplayNameForColumnGroup(J,Q)||""}function CB(z){return z.colGroupSvc?.getColumnGroupState()??[]}function vB(z,J){z.colGroupSvc?.setColumnGroupState(J,"api")}function NB(z){z.colGroupSvc?.resetColumnGroupState("api")}function wB(z){return z.visibleCols.treeLeft}function yB(z){return z.visibleCols.treeCenter}function xB(z){return z.visibleCols.treeRight}function bB(z){return z.visibleCols.getAllTrees()}var zX=class{constructor(){this.existingIds={}}getInstanceIdForKey(z){let J=this.existingIds[z],Q;if(typeof J!=="number")Q=0;else Q=J+1;return this.existingIds[z]=Q,Q}};function gB(z,J){for(let Q=0;Q<J.length;Q++){let Z=z.indexOf(J[Q]);if(Z>=0)z[Z]=z[z.length-1],z.pop()}}var hB=class extends j{constructor(){super(...arguments);this.beanName="visibleCols",this.colsAndGroupsMap={},this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.headerGroupRowCount=0,this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.isBodyWidthDirty=!0}refresh(z,J=!1){let{colFlex:Q,colModel:Z,colGroupSvc:$,colViewport:X,selectionColSvc:Y}=this.beans;if(!J)this.buildTrees(Z,$);$?.updateOpenClosedVisibility(),this.leftCols=bQ(this.treeLeft),this.centerCols=bQ(this.treeCenter),this.rightCols=bQ(this.treeRight),Y?.refreshVisibility(this.leftCols,this.centerCols,this.rightCols),this.joinColsAriaOrder(Z),this.joinCols(),this.headerGroupRowCount=this.getHeaderRowCount(),this.setLeftValues(z),this.autoHeightCols=this.allCols.filter((U)=>U.isAutoHeight()),Q?.refreshFlexedColumns(),this.updateBodyWidths(),this.setFirstRightAndLastLeftPinned(Z,this.leftCols,this.rightCols,z),X.checkViewportColumns(!1),this.eventSvc.dispatchEvent({type:"displayedColumnsChanged",source:z})}getHeaderRowCount(){if(!this.gos.get("hidePaddedHeaderRows"))return this.beans.colModel.cols.treeDepth;let z=0;for(let J of this.allCols){let Q=J.parent;while(Q){if(!Q.isPadding()){let Z=Q.getProvidedColumnGroup().getLevel()+1;if(Z>z)z=Z;break}Q=Q.parent}}return z}updateBodyWidths(){let z=a4(this.centerCols),J=a4(this.leftCols),Q=a4(this.rightCols);if(this.isBodyWidthDirty=this.bodyWidth!==z,this.bodyWidth!==z||this.leftWidth!==J||this.rightWidth!==Q)this.bodyWidth=z,this.leftWidth=J,this.rightWidth=Q,this.eventSvc.dispatchEvent({type:"columnContainerWidthChanged"}),this.eventSvc.dispatchEvent({type:"displayedColumnsWidthChanged"})}setLeftValues(z){this.setLeftValuesOfCols(z),this.setLeftValuesOfGroups()}setFirstRightAndLastLeftPinned(z,J,Q,Z){let $,X;if(this.gos.get("enableRtl"))$=J?J[0]:null,X=Q?N(Q):null;else $=J?N(J):null,X=Q?Q[0]:null;for(let Y of z.getCols())Y.setLastLeftPinned(Y===$,Z),Y.setFirstRightPinned(Y===X,Z)}buildTrees(z,J){let Q=z.getColsToShow(),Z=Q.filter((_)=>_.getPinned()=="left"),$=Q.filter((_)=>_.getPinned()=="right"),X=Q.filter((_)=>_.getPinned()!="left"&&_.getPinned()!="right"),Y=new zX,U=(_)=>{return J?J.createColumnGroups(_):_.columns};this.treeLeft=U({columns:Z,idCreator:Y,pinned:"left",oldDisplayedGroups:this.treeLeft}),this.treeRight=U({columns:$,idCreator:Y,pinned:"right",oldDisplayedGroups:this.treeRight}),this.treeCenter=U({columns:X,idCreator:Y,pinned:null,oldDisplayedGroups:this.treeCenter}),this.updateColsAndGroupsMap()}clear(){this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.ariaOrderColumns=[]}joinColsAriaOrder(z){let J=z.getCols(),Q=[],Z=[],$=[];for(let X of J){let Y=X.getPinned();if(!Y)Z.push(X);else if(Y===!0||Y==="left")Q.push(X);else $.push(X)}this.ariaOrderColumns=Q.concat(Z).concat($)}getAriaColIndex(z){let J;if(K0(z))J=z.getLeafColumns()[0];else J=z;return this.ariaOrderColumns.indexOf(J)+1}setLeftValuesOfGroups(){for(let z of[this.treeLeft,this.treeRight,this.treeCenter])for(let J of z)if(K0(J))J.checkLeft()}setLeftValuesOfCols(z){let{colModel:J}=this.beans;if(!J.getColDefCols())return;let Z=J.getCols().slice(0),$=this.gos.get("enableRtl");for(let X of[this.leftCols,this.rightCols,this.centerCols]){if($){let Y=a4(X);for(let U of X)Y-=U.getActualWidth(),U.setLeft(Y,z)}else{let Y=0;for(let U of X)U.setLeft(Y,z),Y+=U.getActualWidth()}gB(Z,X)}for(let X of Z)X.setLeft(null,z)}joinCols(){if(this.gos.get("enableRtl"))this.allCols=this.rightCols.concat(this.centerCols).concat(this.leftCols);else this.allCols=this.leftCols.concat(this.centerCols).concat(this.rightCols)}getAllTrees(){if(this.treeLeft&&this.treeRight&&this.treeCenter)return this.treeLeft.concat(this.treeCenter).concat(this.treeRight);return null}isColDisplayed(z){return this.allCols.indexOf(z)>=0}getLeftColsForRow(z){let{leftCols:J,beans:{colModel:Q}}=this;if(!Q.colSpanActive)return J;return this.getColsForRow(z,J)}getRightColsForRow(z){let{rightCols:J,beans:{colModel:Q}}=this;if(!Q.colSpanActive)return J;return this.getColsForRow(z,J)}getColsForRow(z,J,Q,Z){let $=[],X=null;for(let Y=0;Y<J.length;Y++){let U=J[Y],_=J.length-Y,H=Math.min(U.getColSpan(z),_),G=[U];if(H>1){let q=H-1;for(let B=1;B<=q;B++)G.push(J[Y+B]);Y+=q}let W;if(Q){W=!1;for(let q of G)if(Q(q))W=!0}else W=!0;if(W){if($.length===0&&X){if(Z?Z(U):!1)$.push(X)}$.push(U)}X=U}return $}getContainerWidth(z){switch(z){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}}getColBefore(z){let J=this.allCols,Q=J.indexOf(z);if(Q>0)return J[Q-1];return null}isPinningLeft(){return this.leftCols.length>0}isPinningRight(){return this.rightCols.length>0}updateColsAndGroupsMap(){this.colsAndGroupsMap={};let z=(J)=>{this.colsAndGroupsMap[J.getUniqueId()]=J};oz(this.treeCenter,!1,z),oz(this.treeLeft,!1,z),oz(this.treeRight,!1,z)}isVisible(z){return this.colsAndGroupsMap[z.getUniqueId()]===z}getFirstColumn(){let z=this.gos.get("enableRtl"),J=["leftCols","centerCols","rightCols"];if(z)J.reverse();for(let Q=0;Q<J.length;Q++){let Z=this[J[Q]];if(Z.length)return z?N(Z):Z[0]}return null}getColAfter(z){let J=this.allCols,Q=J.indexOf(z);if(Q<J.length-1)return J[Q+1];return null}getColsLeftWidth(){return a4(this.leftCols)}getDisplayedColumnsRightWidth(){return a4(this.rightCols)}isColAtEdge(z,J){let Q=this.allCols;if(!Q.length)return!1;let Z=J==="first",$;if(K0(z)){let X=z.getDisplayedLeafColumns();if(!X.length)return!1;$=Z?X[0]:N(X)}else $=z;return(Z?Q[0]:N(Q))===$}};function oz(z,J,Q){if(!z)return;for(let Z=0;Z<z.length;Z++){let $=z[Z];if(K0($)){let X=J?$.getDisplayedChildren():$.getChildren();oz(X,J,Q)}Q($)}}function bQ(z){let J=[];return oz(z,!0,(Q)=>{if(H4(Q))J.push(Q)}),J}var uB=class extends j{constructor(){super(...arguments);this.beanName="colGroupSvc"}getColumnGroupState(){let z=[],J=this.beans.colModel.getColTree();return u4(null,J,(Q)=>{if(_0(Q))z.push({groupId:Q.getGroupId(),open:Q.isExpanded()})}),z}resetColumnGroupState(z){let J=this.beans.colModel.getColDefColTree();if(!J)return;let Q=[];u4(null,J,(Z)=>{if(_0(Z)){let $=Z.getColGroupDef(),X={groupId:Z.getGroupId(),open:!$?void 0:$.openByDefault};Q.push(X)}}),this.setColumnGroupState(Q,z)}setColumnGroupState(z,J){let{colModel:Q,colAnimation:Z,visibleCols:$,eventSvc:X}=this.beans;if(!Q.getColTree().length)return;Z?.start();let U=[];for(let _ of z){let{groupId:H,open:G}=_,W=this.getProvidedColGroup(H);if(!W)continue;if(W.isExpanded()===G)continue;W.setExpanded(G),U.push(W)}if($.refresh(J,!0),U.length)X.dispatchEvent({type:"columnGroupOpened",columnGroup:U.length===1?U[0]:void 0,columnGroups:U});Z?.finish()}setColumnGroupOpened(z,J,Q){let Z;if(_0(z))Z=z.getId();else Z=z||"";this.setColumnGroupState([{groupId:Z,open:J}],Q)}getProvidedColGroup(z){let J=null;return u4(null,this.beans.colModel.getColTree(),(Q)=>{if(_0(Q)){if(Q.getId()===z)J=Q}}),J}getGroupAtDirection(z,J){let Q=z.getProvidedColumnGroup().getLevel()+z.getPaddingLevel(),Z=z.getDisplayedLeafColumns(),$=J==="After"?N(Z):Z[0],X=`getCol${J}`;while(!0){let Y=this.beans.visibleCols[X]($);if(!Y)return null;let U=this.getColGroupAtLevel(Y,Q);if(U!==z)return U}}getColGroupAtLevel(z,J){let Q=z.parent,Z,$;while(!0){if(Z=Q.getProvidedColumnGroup().getLevel(),$=Q.getPaddingLevel(),Z+$<=J)break;Q=Q.parent}return Q}updateOpenClosedVisibility(){let z=this.beans.visibleCols.getAllTrees();oz(z,!1,(J)=>{if(K0(J))J.calculateDisplayedColumns()})}getColumnGroup(z,J){if(!z)return null;if(K0(z))return z;let Q=this.beans.visibleCols.getAllTrees(),Z=typeof J==="number",$=null;return oz(Q,!1,(X)=>{if(K0(X)){let Y=X,U;if(Z)U=z===Y.getGroupId()&&J===Y.getPartId();else U=z===Y.getGroupId();if(U)$=Y}}),$}createColumnGroups(z){let{columns:J,idCreator:Q,pinned:Z,oldDisplayedGroups:$,isStandaloneStructure:X}=z,Y=this.mapOldGroupsById($),U=[],_=J;while(_.length){let H=_;_=[];let G=0,W=(q)=>{let B=G;G=q;let E=H[B],F=(K0(E)?E.getProvidedColumnGroup():E).getOriginalParent();if(F==null){for(let M=B;M<q;M++)U.push(H[M]);return}let L=this.createColumnGroup(F,Q,Y,Z,X);for(let M=B;M<q;M++)L.addChild(H[M]);_.push(L)};for(let q=1;q<H.length;q++){let B=H[q],K=(K0(B)?B.getProvidedColumnGroup():B).getOriginalParent(),F=H[G],M=(K0(F)?F.getProvidedColumnGroup():F).getOriginalParent();if(K!==M)W(q)}if(G<H.length)W(H.length)}if(!X)this.setupParentsIntoCols(U,null);return U}createProvidedColumnGroup(z,J,Q,Z,$,X,Y){let U=$.getUniqueKey(J.groupId||null,null),_=QZ(this.beans,J,U),H=new az(_,U,!1,Q);this.createBean(H);let G=this.findExistingGroup(J,X);if(G)X.splice(G.idx,1);let W=G?.group;if(W)H.setExpanded(W.isExpanded());let q=t9(this.beans,_.children,Q+1,z,Z,$,X,Y);return H.setChildren(q),H}balanceColumnTree(z,J,Q,Z){let $=[];for(let X=0;X<z.length;X++){let Y=z[X];if(_0(Y)){let U=Y,_=this.balanceColumnTree(U.getChildren(),J+1,Q,Z);U.setChildren(_),$.push(U)}else{let U,_;for(let H=J;H<Q;H++){let G=Z.getUniqueKey(null,null),W=QZ(this.beans,null,G),q=new az(W,G,!0,H);if(this.createBean(q),_)_.setChildren([q]);if(_=q,!U)U=_}if(U&&_)if($.push(U),z.some((G)=>_0(G))){_.setChildren([Y]);continue}else{_.setChildren(z);break}$.push(Y)}}return $}findDepth(z){let J=0,Q=z;while(Q?.[0]&&_0(Q[0]))J++,Q=Q[0].getChildren();return J}findMaxDepth(z,J){let Q=J;for(let Z=0;Z<z.length;Z++){let $=z[Z];if(_0($)){let X=$,Y=this.findMaxDepth(X.getChildren(),J+1);if(Q<Y)Q=Y}}return Q}balanceTreeForAutoCols(z,J){let Q=[];for(let Z of z){let $=Z;for(let X=J-1;X>=0;X--){let Y=new az(null,`FAKE_PATH_${Z.getId()}_${X}`,!0,X);this.createBean(Y),Y.setChildren([$]),$.originalParent=Y,$=Y}if(J===0)Z.originalParent=null;Q.push($)}return Q}findExistingGroup(z,J){if(z.groupId==null)return;for(let Z=0;Z<J.length;Z++){let $=J[Z];if(!$.getColGroupDef())continue;if($.getId()===z.groupId)return{idx:Z,group:$}}return}createColumnGroup(z,J,Q,Z,$){let X=z.getGroupId(),Y=J.getInstanceIdForKey(X),U=Q$(X,Y),_=Q[U];if(_&&_.getProvidedColumnGroup()!==z)_=null;if(I(_))_.reset();else if(_=new N2(z,X,Y,Z),!$)this.createBean(_);return _}mapOldGroupsById(z){let J={},Q=(Z)=>{for(let $ of Z)if(K0($)){let X=$;J[$.getUniqueId()]=X,Q(X.getChildren())}};if(z)Q(z);return J}setupParentsIntoCols(z,J){for(let Q of z??[]){if(Q.parent!==J)this.beans.colViewport.colsWithinViewportHash="";if(Q.parent=J,K0(Q)){let Z=Q;this.setupParentsIntoCols(Z.getChildren(),Z)}}}},A5={moduleName:"ColumnGroup",version:p,dynamicBeans:{headerGroupCellCtrl:TB},beans:[uB],apiFunctions:{getAllDisplayedColumnGroups:bB,getCenterDisplayedColumnGroups:yB,getColumnGroup:IB,getColumnGroupState:CB,getDisplayNameForColumnGroup:kB,getLeftDisplayedColumnGroups:wB,getProvidedColumnGroup:fB,getRightDisplayedColumnGroups:xB,resetColumnGroupState:NB,setColumnGroupOpened:SB,setColumnGroupState:vB}};function o0(z,J,Q){let{colModel:Z,rowGroupColsSvc:$,pivotColsSvc:X,autoColSvc:Y,selectionColSvc:U,colAnimation:_,visibleCols:H,pivotResultCols:G,environment:W,valueColsSvc:q,eventSvc:B,gos:E}=z,K=Z.getColDefCols()??[],F=U?.getColumns();if(!K.length&&!F?.length)return!1;if(J?.state&&!J.state.forEach)return V(32),!1;let L=(O,T,S,k,C)=>{if(!O)return;let w=HG(T,J.defaultState),m=w("flex").value1,g=w("sort").value1,e=w("sortType").value1,t=Rz(g)||dZ(e),u=T4(e),Q0=RJ(g),s=t?{type:u,direction:Q0}:void 0;if(s9(z,O,w("hide").value1,s,w("sortIndex").value1,w("pinned").value1,m,Q),m==null){let f0=w("width").value1;if(f0!=null){let k0=O.getColDef().minWidth??W.getDefaultColumnMinWidth();if(k0!=null&&f0>=k0)O.setActualWidth(f0,Q)}}if(C||!O.primary)return;q?.syncColumnWithState(O,Q,w),$?.syncColumnWithState(O,Q,w,S),X?.syncColumnWithState(O,Q,w,k)},M=(O,T,S)=>{let k=QX(z,Q),C=T.slice(),w={},m={},g=[],e=[],t=[],u=0,Q0=$?.columns.slice()??[],s=X?.columns.slice()??[];for(let V0 of O){let pz=V0.colId;if(pz.startsWith(Y1)){g.push(V0),t.push(V0);continue}if(d4(pz)){e.push(V0),t.push(V0);continue}let A1=S(pz);if(!A1)t.push(V0),u+=1;else L(A1,V0,w,m,!1),X0(C,A1)}let f0=(V0)=>L(V0,null,w,m,!1);C.forEach(f0),$?.sortColumns(U8.bind($,w,Q0)),X?.sortColumns(U8.bind(X,m,s)),Z.refreshCols(!1,Q);let k0=(V0,pz,HQ=[])=>{for(let A1 of pz){let k7=V0(A1.colId);X0(HQ,k7),L(k7,A1,null,null,!0)}HQ.forEach(f0)};return k0((V0)=>Y?.getColumn(V0)??null,g,Y?.getColumns()?.slice()),k0((V0)=>U?.getColumn(V0)??null,e,U?.getColumns()?.slice()),mB(J,Z,E),H.refresh(Q),B.dispatchEvent({type:"columnEverythingChanged",source:Q}),k(),{unmatchedAndAutoStates:t,unmatchedCount:u}};_?.start();let{unmatchedAndAutoStates:D,unmatchedCount:A}=M(J.state||[],K,(O)=>Z.getColDefCol(O));if(D.length>0||I(J.defaultState)){let O=G?.getPivotResultCols()?.list??[];A=M(D,O,(T)=>G?.getPivotResultCol(T)??null).unmatchedCount}return _?.finish(),A===0}function JX(z,J){let{colModel:Q,autoColSvc:Z,selectionColSvc:$,eventSvc:X,gos:Y}=z;if(!Q.getColDefCols()?.length)return;let _=Q.getColDefColTree(),H=AJ(_),G=[],W=1000,q=1000,B=(M)=>{let D=ZX(M);if(n(D.rowGroupIndex)&&D.rowGroup)D.rowGroupIndex=W++;if(n(D.pivotIndex)&&D.pivot)D.pivotIndex=q++;G.push(D)};Z?.getColumns()?.forEach(B),$?.getColumns()?.forEach(B),H?.forEach(B),o0(z,{state:G},J);let E=Z?.getColumns()??[],L=[...$?.getColumns()??[],...E,...H].map((M)=>({colId:M.colId}));o0(z,{state:L,applyOrder:!0},J),X.dispatchEvent(v(Y,{type:"columnsReset",source:J}))}function QX(z,J){let{rowGroupColsSvc:Q,pivotColsSvc:Z,valueColsSvc:$,colModel:X,sortSvc:Y,eventSvc:U}=z,_={rowGroupColumns:Q?.columns.slice()??[],pivotColumns:Z?.columns.slice()??[],valueColumns:$?.columns.slice()??[]},H=Y8(z),G={};for(let W of H)G[W.colId]=W;return()=>{let W=(T,S,k,C)=>{let w=S.map(C),m=k.map(C);if(Z0(w,m))return;let e=new Set(S);for(let u of k)if(!e.delete(u))e.add(u);let t=[...e];U.dispatchEvent({type:T,columns:t,column:t.length===1?t[0]:null,source:J})},q=(T)=>{let S=[];return X.forAllCols((k)=>{let C=G[k.colId];if(C&&T(C,k))S.push(k)}),S},B=(T)=>T.colId;W("columnRowGroupChanged",_.rowGroupColumns,Q?.columns??[],B),W("columnPivotChanged",_.pivotColumns,Z?.columns??[],B);let K=q((T,S)=>{let k=T.aggFunc!=null,C=k!=S.isValueActive(),w=k&&T.aggFunc!=S.getAggFunc();return C||w});if(K.length>0)e$(U,"columnValueChanged",K,J);c1(U,q((T,S)=>T.width!=S.getActualWidth()),!0,J),o$(U,q((T,S)=>T.pinned!=S.getPinned()),J),DB(U,q((T,S)=>T.hide==S.isVisible()),J);let A=q((T,S)=>!N6(S.getSortDef(),{type:T4(T.sortType),direction:RJ(T.sort)})||T.sortIndex!=S.getSortIndex());if(A.length>0)Y?.dispatchSortChangedEvents(J,A);let O=Y8(z);pB(H,O,J,X,U)}}function Y8(z){let{colModel:J,rowGroupColsSvc:Q,pivotColsSvc:Z}=z,$=J.getColDefCols();if(n($)||!J.isAlive())return[];let X=Q?.columns,Y=Z?.columns,U=[],_=(G)=>{let W=G.isRowGroupActive()&&X?X.indexOf(G):null,q=G.isPivotActive()&&Y?Y.indexOf(G):null,B=G.isValueActive()?G.getAggFunc():null,E=G.getSortIndex()!=null?G.getSortIndex():null;U.push({colId:G.colId,width:G.getActualWidth(),hide:!G.isVisible(),pinned:G.getPinned(),sort:G.getSort(),sortType:G.getSortDef()?.type,sortIndex:E,aggFunc:B,rowGroup:G.isRowGroupActive(),rowGroupIndex:W,pivot:G.isPivotActive(),pivotIndex:q,flex:G.getFlex()??null})};J.forAllCols((G)=>_(G));let H=new Map(J.getCols().map((G,W)=>[G.colId,W]));return U.sort((G,W)=>{let q=H.has(G.colId)?H.get(G.colId):-1,B=H.has(W.colId)?H.get(W.colId):-1;return q-B}),U}function ZX(z){let J=(F,L)=>F!=null?F:L!=null?L:null,Q=z.colDef,Z=$4(J(Q.sort,Q.initialSort)),$=Z.direction,X=Z.type,Y=J(Q.sortIndex,Q.initialSortIndex),U=J(Q.hide,Q.initialHide),_=J(Q.pinned,Q.initialPinned),H=J(Q.width,Q.initialWidth),G=J(Q.flex,Q.initialFlex),W=J(Q.rowGroupIndex,Q.initialRowGroupIndex),q=J(Q.rowGroup,Q.initialRowGroup);if(W==null&&!q)W=null,q=null;let B=J(Q.pivotIndex,Q.initialPivotIndex),E=J(Q.pivot,Q.initialPivot);if(B==null&&!E)B=null,E=null;let K=J(Q.aggFunc,Q.initialAggFunc);return{colId:z.colId,sort:$,sortType:X,sortIndex:Y,hide:U,pinned:_,width:H,flex:G,rowGroup:q,rowGroupIndex:W,pivot:E,pivotIndex:B,aggFunc:K}}function mB(z,J,Q){if(!z.applyOrder||!z.state)return;let Z=[];for(let $ of z.state)if($.colId!=null)Z.push($.colId);cB(J.cols,Z,J,Q)}function cB(z,J,Q,Z){if(z==null)return;let $=[],X={};for(let U of J){if(X[U])continue;let _=z.map[U];if(_)$.push(_),X[U]=!0}let Y=0;for(let U of z.list){let _=U.colId;if(X[_]!=null)continue;if(_.startsWith(Y1))$.splice(Y++,0,U);else $.push(U)}if($=t$($,Z),!s$($,Q.getColTree())){V(39);return}z.list=$}function pB(z,J,Q,Z,$){let X={};for(let G of J)X[G.colId]=G;let Y={};for(let G of z)if(X[G.colId])Y[G.colId]=!0;let U=z.filter((G)=>Y[G.colId]),_=J.filter((G)=>Y[G.colId]),H=[];if(_.forEach((G,W)=>{let q=U?.[W];if(q&&q.colId!==G.colId){let B=Z.getCol(q.colId);if(B)H.push(B)}}),!H.length)return;$.dispatchEvent({type:"columnMoved",columns:H,column:H.length===1?H[0]:null,finished:!0,source:Q})}var U8=(z,J,Q,Z)=>{let $=z[Q.getId()],X=z[Z.getId()],Y=$!=null,U=X!=null;if(Y&&U)return $-X;if(Y)return-1;if(U)return 1;let _=J.indexOf(Q),H=J.indexOf(Z),G=_>=0,W=H>=0;if(G&&W)return _-H;if(G)return-1;return 1},iB=class extends j{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","groupHideColumnsUntilExpanded","rowNumbers","hidePaddedHeaderRows"],(z)=>this.refreshAll(Az(z.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener("pivotMode",(z)=>this.setPivotMode(this.gos.get("pivotMode"),Az(z.source)))}createColsFromColDefs(z){let{beans:J}=this,{valueCache:Q,colAutosize:Z,rowGroupColsSvc:$,pivotColsSvc:X,valueColsSvc:Y,visibleCols:U,eventSvc:_,groupHierarchyColSvc:H}=J,G=this.colDefs?QX(J,z):void 0;Q?.expire();let W=this.colDefCols?.list,q=this.colDefCols?.tree,B=rZ(J,this.colDefs,!0,q,z);G4(J,this.colDefCols?.tree,B.columnTree);let{columnTree:E,treeDepth:K}=B,F=AJ(E),L={};for(let M of F)L[M.getId()]=M;if(this.colDefCols={tree:E,treeDepth:K,list:F,map:L},this.createColumnsForService([H],this.colDefCols,z),$?.extractCols(z,W),X?.extractCols(z,W),Y?.extractCols(z,W),this.ready=!0,this.changeEventsDispatching=!0,this.refreshCols(!0,z),this.changeEventsDispatching=!1,U.refresh(z),_.dispatchEvent({type:"columnEverythingChanged",source:z}),G)this.changeEventsDispatching=!0,G(),this.changeEventsDispatching=!1;if(_.dispatchEvent({type:"newColumnsLoaded",source:z}),z==="gridInitializing")Z?.applyAutosizeStrategy()}refreshCols(z,J){if(!this.colDefCols)return;let Q=this.cols?.tree;this.saveColOrder();let{autoColSvc:Z,selectionColSvc:$,rowNumbersSvc:X,quickFilter:Y,pivotResultCols:U,showRowGroupCols:_,rowAutoHeight:H,visibleCols:G,colViewport:W,eventSvc:q,formula:B}=this.beans,E=this.selectCols(U,this.colDefCols);B?.setFormulasActive(E),this.createColumnsForService([Z,$,X],E,J);let K=cH(this.gos,this.showingPivotResult);if(!z||K)this.restoreColOrder(E);if(this.positionLockedCols(E),_?.refresh(),Y?.refreshCols(),this.setColSpanActive(),H?.setAutoHeightActive(E),G.clear(),W.clear(),!Z0(Q,this.cols.tree))q.dispatchEvent({type:"gridColumnsChanged"})}createColumnsForService(z,J,Q){for(let Z of z){if(!Z)continue;Z.createColumns(J,($)=>{this.lastOrder=$(this.lastOrder),this.lastPivotOrder=$(this.lastPivotOrder)},Q),Z.addColumns(J)}}selectCols(z,J){let Q=z?.getPivotResultCols()??null;this.showingPivotResult=Q!=null;let{map:Z,list:$,tree:X,treeDepth:Y}=Q??J;if(this.cols={list:$.slice(),map:{...Z},tree:X.slice(),treeDepth:Y},Q){if(!Q.list.some((_)=>this.cols?.map[_.colId]!==void 0))this.lastPivotOrder=null}return this.cols}getColsToShow(){if(!this.cols)return[];let{beans:z,showingPivotResult:J,cols:Q}=this,{valueColsSvc:Z,selectionColSvc:$,gos:X}=z,Y=this.pivotMode&&!J,U=$?.isSelectionColumnEnabled(),_=pH(z),H=Z?.columns,G=cZ(X);return Q.list.filter((q)=>{let B=U1(q);if(Y)return H?.includes(q)||B&&(!G||q.isVisible())||U&&d4(q)||_&&w0(q);else return B&&!G||q.isVisible()})}refreshAll(z){if(!this.ready)return;this.refreshCols(!1,z),this.beans.visibleCols.refresh(z)}setColsVisible(z,J=!1,Q){o0(this.beans,{state:z.map((Z)=>({colId:typeof Z==="string"?Z:Z.colId,hide:!J}))},Q)}restoreColOrder(z){let J=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!J)return;let Q=J.filter((W)=>z.map[W.getId()]!=null);if(Q.length===0)return;if(Q.length===z.list.length){z.list=Q;return}let Z=(W)=>{let q=W.getOriginalParent();if(!q)return!1;if(q.getChildren().length>1)return!0;return Z(q)};if(!Q.some((W)=>Z(W))){let W=new Set(Q);for(let q of z.list)if(!W.has(q))Q.push(q);z.list=Q;return}let $=new Map;for(let W=0;W<Q.length;W++){let q=Q[W];$.set(q,W)}let X=z.list.filter((W)=>!$.has(W));if(X.length===0){z.list=Q;return}let Y=(W,q)=>{let B=q?q.getOriginalParent():W.getOriginalParent();if(!B)return null;let E=null,K=null;for(let F of B.getChildren()){if(F===q||F===W)continue;if(F instanceof E4){let L=$.get(F);if(L==null)continue;if(E==null||E<L)E=L,K=F;continue}F.forEachLeafColumn((L)=>{let M=$.get(L);if(M==null)return;if(E==null||E<M)E=M,K=L})}if(K==null)return Y(W,B);return K},U=[],_=new Map;for(let W of X){let q=Y(W,null);if(q==null){U.push(W);continue}let B=_.get(q);if(B===void 0)_.set(q,W);else if(Array.isArray(B))B.push(W);else _.set(q,[B,W])}let H=Array(z.list.length),G=H.length-1;for(let W=U.length-1;W>=0;W--)H[G--]=U[W];for(let W=Q.length-1;W>=0;W--){let q=Q[W],B=_.get(q);if(B)if(Array.isArray(B))for(let E=B.length-1;E>=0;E--){let K=B[E];H[G--]=K}else H[G--]=B;H[G--]=q}z.list=H}positionLockedCols(z){z.list=t$(z.list,this.gos)}saveColOrder(){if(this.showingPivotResult)this.lastPivotOrder=this.cols?.list??null;else this.lastOrder=this.cols?.list??null}getColumnDefs(z){return this.colDefCols&&this.beans.colDefFactory?.getColumnDefs(this.colDefCols.list,this.showingPivotResult,this.lastOrder,this.cols?.list??[],z)}setColSpanActive(){this.colSpanActive=!!this.cols?.list.some((z)=>z.getColDef().colSpan!=null)}isPivotMode(){return this.pivotMode}setPivotMode(z,J){if(z===this.pivotMode)return;if(this.pivotMode=z,!this.ready)return;this.refreshCols(!1,J);let{visibleCols:Q,eventSvc:Z}=this.beans;Q.refresh(J),Z.dispatchEvent({type:"columnPivotModeChanged"})}isPivotActive(){let z=this.beans.pivotColsSvc?.columns;return this.pivotMode&&!!z?.length}recreateColumnDefs(z){if(!this.cols)return;this.beans.autoColSvc?.updateColumns(z);let J=Az(z.source);this.createColsFromColDefs(J)}setColumnDefs(z,J){this.colDefs=z,this.createColsFromColDefs(J)}destroy(){G4(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(z){let{pivotResultCols:J,autoColSvc:Q,selectionColSvc:Z,groupHierarchyColSvc:$}=this.beans;if(B2(this.colDefCols?.list,z))return;if(B2(Q?.columns?.list,z))return;if(B2(Z?.columns?.list,z))return;if(B2($?.columns?.list,z))return;if(B2(J?.getPivotResultCols()?.list,z))return}getColsForKeys(z){if(!z)return[];return z.map((J)=>this.getCol(J)).filter((J)=>J!=null)}getColDefCol(z){return this.getColFromCollection(z,this.colDefCols)??this.getColFromServiceCols(z)}getColDefColOrCol(z){if(z==null)return null;return this.getColFromCollection(z,this.colDefCols)??this.getColFromCollection(z,this.cols)??this.getColFromServiceCols(z)}getColOrColDefCol(z){if(z==null)return null;return this.getColFromCollection(z,this.cols)??this.getColFromCollection(z,this.colDefCols)??this.getColFromServiceCols(z)}getCol(z){if(z==null)return null;return this.getColFromCollection(z,this.cols)??this.getColFromServiceCols(z)}getColById(z){return this.cols?.map[z]??null}getColFromCollection(z,J){if(J==null)return null;let Q=J.map;if(typeof z=="string"&&Q[z])return Q[z];let Z=J.list;for(let $=0,X=Z.length;$<X;++$)if(m4(Z[$],z))return Z[$];return null}getColFromServiceCols(z){let J=this.beans;return J.autoColSvc?.getColumn(z)??J.selectionColSvc?.getColumn(z)??J.groupHierarchyColSvc?.getColumn(z)??null}},dB=".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)}:where(.ag-label-align-right){.ag-label,.ag-wrapper{flex:none}}.ag-label-align-top{align-items:flex-start;flex-direction:column}:where(.ag-label-align-top){.ag-label,.ag-wrapper{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)}",nB=class extends v0{constructor(z,J,Q){super(J,Q);this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=z||{},this.registerCSS(dB)}postConstruct(){this.addCss("ag-labeled"),this.eLabel.classList.add("ag-label");let{labelSeparator:z,label:J,labelWidth:Q,labelAlignment:Z,disabled:$,labelEllipsis:X}=this.config;if($!=null)this.setDisabled($);if(z!=null)this.setLabelSeparator(z);if(J!=null)this.setLabel(J);if(Q!=null)this.setLabelWidth(Q);if(X!=null)this.setLabelEllipsis(X);this.setLabelAlignment(Z||this.labelAlignment),this.refreshLabel()}refreshLabel(){let{label:z,eLabel:J}=this;if(J0(J),typeof z==="string")J.innerText=z+this.labelSeparator;else if(z)J.appendChild(z);if(z==="")x(J,!1),H0(J,"presentation");else x(J,!0),H0(J,null)}setLabelSeparator(z){if(this.labelSeparator===z)return this;if(this.labelSeparator=z,this.label!=null)this.refreshLabel();return this}getLabelId(){let z=this.eLabel;return z.id=z.id||`ag-${this.getCompId()}-label`,z.id}getLabel(){return this.label}setLabel(z){if(this.label===z)return this;return this.label=z,this.refreshLabel(),this}setLabelAlignment(z){let Q=this.getGui().classList;return Q.toggle("ag-label-align-left",z==="left"),Q.toggle("ag-label-align-right",z==="right"),Q.toggle("ag-label-align-top",z==="top"),this}setLabelEllipsis(z){return this.eLabel.classList.toggle("ag-label-ellipsis",z),this}setLabelWidth(z){if(this.label==null)return this;return p6(this.eLabel,z),this}setDisabled(z){z=!!z;let J=this.getGui();return T2(J,z),J.classList.toggle("ag-disabled",z),this.disabled=z,this}isDisabled(){return!!this.disabled}},$X=class extends nB{constructor(z,J,Q,Z){super(z,J,Q);this.className=Z}postConstruct(){super.postConstruct();let{width:z,value:J,onValueChange:Q,ariaLabel:Z}=this.config;if(z!=null)this.setWidth(z);if(J!=null)this.setValue(J);if(Q!=null)this.onValueChange(Q);if(Z!=null)this.setAriaLabel(Z);if(this.className)this.addCss(this.className);this.refreshAriaLabelledBy()}setLabel(z){return super.setLabel(z),this.refreshAriaLabelledBy(),this}refreshAriaLabelledBy(){let z=this.getAriaElement(),J=this.getLabelId(),Q=this.getLabel();if(Q==null||Q==""||a_(z)!==null)ez(z,"");else ez(z,J??"")}setAriaLabel(z){return G0(this.getAriaElement(),z),this.refreshAriaLabelledBy(),this}onValueChange(z){return this.addManagedListeners(this,{fieldValueChanged:()=>z(this.getValue())}),this}getWidth(){return this.getGui().clientWidth}setWidth(z){return h4(this.getGui(),z),this}getPreviousValue(){return this.previousValue}getValue(){return this.value}setValue(z,J){if(this.value===z)return this;if(this.previousValue=this.value,this.value=z,!J)this.dispatchLocalEvent({type:"fieldValueChanged"});return this}};function rB(z){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:z,ref:"eInput",cls:"ag-input-field-input"}]}]}}var I1=class extends $X{constructor(z,J,Q="text",Z="input"){super(z,z?.template??rB(Z),[],J);this.inputType=Q,this.displayFieldTag=Z,this.eLabel=P,this.eWrapper=P,this.eInput=P}postConstruct(){super.postConstruct(),this.setInputType(this.inputType);let{eLabel:z,eWrapper:J,eInput:Q,className:Z}=this;z.classList.add(`${Z}-label`),J.classList.add(`${Z}-input-wrapper`),Q.classList.add(`${Z}-input`),this.addCss("ag-input-field"),Q.id=Q.id||`ag-${this.getCompId()}-input`;let{inputName:$,inputWidth:X,inputPlaceholder:Y,autoComplete:U,tabIndex:_}=this.config;if($!=null)this.setInputName($);if(X!=null)this.setInputWidth(X);if(Y!=null)this.setInputPlaceholder(Y);if(U!=null)this.setAutoComplete(U);this.addInputListeners(),this.activateTabIndex([Q],_)}addInputListeners(){this.addManagedElementListeners(this.eInput,{input:(z)=>this.setValue(z.target.value)})}setInputType(z){if(this.displayFieldTag==="input")this.inputType=z,j4(this.eInput,"type",z)}getInputElement(){return this.eInput}getWrapperElement(){return this.eWrapper}setInputWidth(z){return p6(this.eWrapper,z),this}setInputName(z){return this.getInputElement().setAttribute("name",z),this}getFocusableElement(){return this.eInput}setMaxLength(z){let J=this.eInput;return J.maxLength=z,this}setInputPlaceholder(z){return j4(this.eInput,"placeholder",z),this}setInputAriaLabel(z){return G0(this.eInput,z),this.refreshAriaLabelledBy(),this}setDisabled(z){return T2(this.eInput,z),super.setDisabled(z)}setAutoComplete(z){if(z===!0)j4(this.eInput,"autocomplete",null);else{let J=typeof z==="string"?z:"off";j4(this.eInput,"autocomplete",J)}return this}},IJ=class extends I1{constructor(z,J="ag-checkbox",Q="checkbox"){super(z,J,Q);this.labelAlignment="right",this.selected=!1,this.readOnly=!1,this.passive=!1}postConstruct(){super.postConstruct();let{readOnly:z,passive:J,name:Q}=this.config;if(typeof z==="boolean")this.setReadOnly(z);if(typeof J==="boolean")this.setPassive(J);if(Q!=null)this.setName(Q)}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(z){this.passive=z}isReadOnly(){return this.readOnly}setReadOnly(z){this.eWrapper.classList.toggle("ag-disabled",z),this.eInput.disabled=z,this.readOnly=z}setDisabled(z){return this.eWrapper.classList.toggle("ag-disabled",z),super.setDisabled(z)}toggle(){if(this.eInput.disabled)return;let z=this.isSelected(),J=this.getNextValue();if(this.passive)this.dispatchChange(J,z);else this.setValue(J)}getValue(){return this.isSelected()}setValue(z,J){return this.refreshSelectedClass(z),this.setSelected(z,J),this}setName(z){let J=this.getInputElement();return J.name=z,this}isSelected(){return this.selected}setSelected(z,J){if(this.isSelected()===z)return;this.previousValue=this.isSelected(),z=this.selected=typeof z==="boolean"?z:void 0;let Q=this.eInput;if(Q.checked=z,Q.indeterminate=z===void 0,!J)this.dispatchChange(this.selected,this.previousValue)}dispatchChange(z,J,Q){this.dispatchLocalEvent({type:"fieldValueChanged",selected:z,previousValue:J,event:Q});let Z=this.getInputElement();this.eventSvc.dispatchEvent({type:"checkboxChanged",id:Z.id,name:Z.name,selected:z,previousValue:J})}onCheckboxClick(z){if(this.passive||this.eInput.disabled)return;let J=this.isSelected(),Q=this.selected=z.target.checked;this.refreshSelectedClass(Q),this.dispatchChange(Q,J,z)}refreshSelectedClass(z){let J=this.eWrapper.classList;J.toggle("ag-checked",z===!0),J.toggle("ag-indeterminate",z==null)}},F4={selector:"AG-CHECKBOX",component:IJ},tB=".ag-checkbox-cell{height:100%}",sB={tag:"div",cls:"ag-cell-wrapper ag-checkbox-cell",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},lB=class extends y{constructor(){super(sB,[F4]);this.eCheckbox=P,this.registerCSS(tB)}init(z){this.refresh(z);let{eCheckbox:J,beans:Q}=this,Z=J.getInputElement();Z.setAttribute("tabindex","-1"),_9(Z,"polite"),this.addManagedListeners(Z,{click:($)=>{if(a0($),J.isDisabled())return;let X=J.getValue();this.onCheckboxChanged(X)},dblclick:($)=>{a0($)}}),this.addManagedElementListeners(z.eGridCell,{keydown:($)=>{if($.key===R.SPACE&&!J.isDisabled()){if(z.eGridCell===d(Q))J.toggle();let X=J.getValue();this.onCheckboxChanged(X),$.preventDefault()}}})}refresh(z){return this.params=z,this.updateCheckbox(z),!0}updateCheckbox(z){let J,Q=!0,{value:Z,column:$,node:X}=z;if(X.group&&$)if(typeof Z==="boolean")J=Z;else{let W=$.getColId();if(W.startsWith(Y1))J=Z==null||Z===""?void 0:Z==="true";else if(X.aggData?.[W]!==void 0)J=Z??void 0;else if(X.sourceRowIndex>=0)J=Z??void 0;else Q=!1}else J=Z??void 0;let{eCheckbox:Y}=this;if(!Q){Y.setDisplayed(!1);return}Y.setValue(J);let U=z.disabled??!$?.isCellEditable(X);Y.setDisabled(U);let _=this.getLocaleTextFunc(),H=CZ(_,J),G=U?H:`${_("ariaToggleCellValue","Press SPACE to toggle cell value")} (${H})`;Y.setInputAriaLabel(G)}onCheckboxChanged(z){let{params:J}=this,{column:Q,node:Z,value:$}=J,{editSvc:X}=this.beans;if(!Q)return;let Y={rowNode:Z,column:Q};X?.dispatchCellEvent(Y,null,"cellEditingStarted",{value:$});let U=Z.setDataValue(Q,z,"ui");if(X?.dispatchCellEvent(Y,null,"cellEditingStopped",{oldValue:$,newValue:z,valueChanged:U}),!U)this.updateCheckbox(J)}},aB={tag:"div",cls:"ag-skeleton-container"},oB=class extends y{constructor(){super(aB)}init(z){let J=`ag-cell-skeleton-renderer-${this.getCompId()}`;if(this.getGui().setAttribute("id",J),this.addDestroyFunc(()=>ez(z.eParentOfValue)),ez(z.eParentOfValue,J),z.deferRender)this.setupLoading(z);else if(z.node.failedLoad)this.setupFailed();else this.setupLoading(z)}setupFailed(){let z=this.getLocaleTextFunc();this.getGui().textContent=z("loadingError","ERR");let J=z("ariaSkeletonCellLoadingFailed","Row failed to load");G0(this.getGui(),J)}setupLoading(z){let J=z0({tag:"div",cls:"ag-skeleton-effect"}),Q=z.node.rowIndex;if(Q!=null){let X=75+25*(Q%2===0?Math.sin(Q):Math.cos(Q));J.style.width=`${X}%`}this.getGui().appendChild(J);let Z=this.getLocaleTextFunc(),$=z.deferRender?Z("ariaDeferSkeletonCellLoading","Cell is loading"):Z("ariaSkeletonCellLoading","Row data is loading");G0(this.getGui(),$)}refresh(z){return!1}},eB={moduleName:"CheckboxCellRenderer",version:p,userComponents:{agCheckboxCellRenderer:lB}},zE={moduleName:"SkeletonCellRenderer",version:p,userComponents:{agSkeletonCellRenderer:oB}};var JE=class extends j{constructor(){super(...arguments);this.beanName="colFlex",this.columnsHidden=!1}refreshFlexedColumns(z={}){let J=z.source??"flex";if(z.viewportWidth!=null)this.flexViewportWidth=z.viewportWidth;let Q=this.flexViewportWidth,{visibleCols:Z,colDelayRenderSvc:$}=this.beans,X=Z.centerCols,Y=-1;if(z.resizingCols){let K=new Set(z.resizingCols);for(let F=X.length-1;F>=0;F--)if(K.has(X[F])){Y=F;break}}let U=!1,_=X.map((K,F)=>{let L=K.getFlex(),M=L!=null&&L>0&&F>Y;return U||(U=M),{col:K,isFlex:M,flex:Math.max(0,L??0),initialSize:K.getActualWidth(),min:K.getMinWidth(),max:K.getMaxWidth(),targetSize:0}});if(U)$?.hideColumns("colFlex"),this.columnsHidden=!0;else if(this.columnsHidden)this.revealColumns($);if(!Q||!U)return[];let H=_.length,G=_.reduce((K,F)=>K+F.flex,0),W=Q,q=(K,F)=>{K.frozenSize=F,K.col.setActualWidth(F,J),W-=F,G-=K.flex,H-=1},B=(K)=>K.frozenSize!=null;for(let K of _)if(!K.isFlex)q(K,K.initialSize);while(H>0){let K=Math.round(G<1?W*G:W),F,L=0,M=0;for(let O of _){if(B(O))continue;F=O,M+=K*(O.flex/G);let T=M-L,S=Math.round(T);O.targetSize=S,L+=S}if(F)F.targetSize+=K-L;let D=0;for(let O of _){if(B(O))continue;let T=O.targetSize,S=Math.min(Math.max(T,O.min),O.max);D+=S-T,O.violationType=S===T?void 0:S<T?"max":"min",O.targetSize=S}let A=D===0?"all":D>0?"min":"max";for(let O of _){if(B(O))continue;if(A==="all"||O.violationType===A)q(O,O.targetSize)}}if(!z.skipSetLeft)Z.setLeftValues(J);if(z.updateBodyWidths)Z.updateBodyWidths();let E=_.filter((K)=>K.isFlex&&!K.violationType).map((K)=>K.col);if(z.fireResizedEvent){let K=_.filter((L)=>L.initialSize!==L.frozenSize).map((L)=>L.col),F=_.filter((L)=>L.flex).map((L)=>L.col);c1(this.eventSvc,K,!0,J,F)}return this.revealColumns($),E}revealColumns(z){if(this.columnsHidden)z?.revealColumns("colFlex"),this.columnsHidden=!1}initCol(z){let{flex:J,initialFlex:Q}=z.colDef;if(J!==void 0)z.flex=J;else if(Q!==void 0)z.flex=Q}setColFlex(z,J){z.flex=J??null,z.dispatchStateUpdatedEvent("flex")}},Pz=(z)=>{if(typeof z==="bigint")return z;let J;if(typeof z==="number")J=z;else if(typeof z==="string"){if(J=z.trim(),J==="")return null;if(J.endsWith("n"))J=J.slice(0,-1);if(!/^[+-]?\d+$/.test(J))return null}if(J==null)return null;try{return BigInt(J)}catch{return null}},j5="T",QE=new RegExp(`[${j5} ]`),ZE=new RegExp(`^\\d{4}-\\d{2}-\\d{2}(${j5}\\d{2}:\\d{2}:\\d{2}\\D?)?`);function b4(z,J){return z.toString().padStart(J,"0")}function Jz(z,J=!0,Q=j5){if(!z)return null;let Z=[z.getFullYear(),z.getMonth()+1,z.getDate()].map(($)=>b4($,2)).join("-");if(J)Z+=Q+[z.getHours(),z.getMinutes(),z.getSeconds()].map(($)=>b4($,2)).join(":");return Z}function Lz(z,J=!0){if(!z)return null;if(J)return[String(z.getFullYear()),String(z.getMonth()+1),b4(z.getDate(),2),b4(z.getHours(),2),`:${b4(z.getMinutes(),2)}`,`:${b4(z.getSeconds(),2)}`];return[z.getFullYear(),z.getMonth()+1,b4(z.getDate(),2)].map(String)}var gQ=(z)=>{if(z>3&&z<21)return"th";switch(z%10){case 1:return"st";case 2:return"nd";case 3:return"rd"}return"th"},w2=["January","February","March","April","May","June","July","August","September","October","November","December"],hQ=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function $E(z,J){if(J==null)return Jz(z,!1);let Q=b4(z.getFullYear(),4),Z={YYYY:()=>Q.slice(Q.length-4,Q.length),YY:()=>Q.slice(Q.length-2,Q.length),Y:()=>`${z.getFullYear()}`,MMMM:()=>w2[z.getMonth()],MMM:()=>w2[z.getMonth()].slice(0,3),MM:()=>b4(z.getMonth()+1,2),Mo:()=>`${z.getMonth()+1}${gQ(z.getMonth()+1)}`,M:()=>`${z.getMonth()+1}`,Do:()=>`${z.getDate()}${gQ(z.getDate())}`,DD:()=>b4(z.getDate(),2),D:()=>`${z.getDate()}`,dddd:()=>hQ[z.getDay()],ddd:()=>hQ[z.getDay()].slice(0,3),dd:()=>hQ[z.getDay()].slice(0,2),do:()=>`${z.getDay()}${gQ(z.getDay())}`,d:()=>`${z.getDay()}`},$=new RegExp(Object.keys(Z).join("|"),"g");return J.replace($,(X)=>{if(X in Z)return Z[X]();return X})}function y6(z,J=!1){return!!h0(z,J)}function XE(z){return y6(z,!0)}function h0(z,J=!1,Q){if(!z)return null;if(!Q&&!ZE.test(z))return null;let[Z,$]=z.split(QE);if(!Z)return null;let X=Z.split("-").map((B)=>Number.parseInt(B,10));if(X.filter((B)=>!isNaN(B)).length!==3)return null;let[Y,U,_]=X,H=new Date(Y,U-1,_);if(H.getFullYear()!==Y||H.getMonth()!==U-1||H.getDate()!==_)return null;if(!$&&J)return null;if(!$||$==="00:00:00")return H;let[G,W,q]=$.split(":").map((B)=>Number.parseInt(B,10));if(G>=0&&G<24)H.setHours(G);else if(J)return null;if(W>=0&&W<60)H.setMinutes(W);else if(J)return null;if(q>=0&&q<60)H.setSeconds(q);else if(J)return null;return H}function j2(z,J){let Q=J.split("."),Z=z;for(let $=0;$<Q.length;$++){if(Z==null)return;Z=Z[Q[$]]}return Z}var YE=["dateTimeString","dateString","text","number","bigint","boolean","date"],UE=class extends j{constructor(){super(...arguments);this.beanName="dataTypeSvc",this.dataTypeDefinitions={},this.isPendingInference=!1,this.isColumnTypeOverrideInDataTypeDefinitions=!1,this.columnStateUpdatesPendingInference={},this.columnStateUpdateListenerDestroyFuncs=[],this.columnDefinitionPropsPerDataType={number(){return{cellEditor:"agNumberCellEditor"}},bigint({filterModuleBean:z}){if(z)return{cellEditor:"agTextCellEditor"};return{cellEditor:"agTextCellEditor",comparator:{default:WE,absolute:qE}}},boolean(){return{cellEditor:"agCheckboxCellEditor",cellRenderer:"agCheckboxCellRenderer",getFindText:()=>null,suppressKeyboardEvent:({node:z,event:J,column:Q})=>J.key===R.SPACE&&Q.isCellEditable(z)}},date({formatValue:z}){return{cellEditor:"agDateCellEditor",keyCreator:z}},dateString({formatValue:z}){return{cellEditor:"agDateStringCellEditor",keyCreator:z}},dateTime(z){return this.date(z)},dateTimeString(z){return this.dateString(z)},object({formatValue:z,colModel:J,colId:Q}){return{cellEditorParams:{useFormatter:!0},comparator:(Z,$)=>{let X=J.getColDefCol(Q),Y=X?.colDef;if(!X||!Y)return 0;let U=Z==null?"":z({column:X,node:null,value:Z}),_=$==null?"":z({column:X,node:null,value:$});if(U===_)return 0;return U>_?1:-1},keyCreator:z}},text(){return{}}}}wireBeans(z){this.colModel=z.colModel}postConstruct(){this.processDataTypeDefinitions(),this.addManagedPropertyListener("dataTypeDefinitions",(z)=>{this.processDataTypeDefinitions(),this.colModel.recreateColumnDefs(z)})}processDataTypeDefinitions(){let z=this.getDefaultDataTypes(),J={},Q={},Z=(G)=>{return(W)=>{let{column:q,node:B,value:E}=W,K=q.getColDef().valueFormatter;if(K===G.groupSafeValueFormatter)K=G.valueFormatter;return this.beans.valueSvc.formatValue(q,B,E,K)}};for(let G of Object.keys(z)){let W=z[G],q={...W,groupSafeValueFormatter:G8(W,this.gos)};J[G]=q,Q[G]=Z(q)}let $=this.gos.get("dataTypeDefinitions")??{},X={};for(let G of Object.keys($)){let W=$[G],q=this.processDataTypeDefinition(W,$,[G],z);if(q){if(J[G]=q,W.dataTypeMatcher)X[G]=W.dataTypeMatcher;Q[G]=Z(q)}}let{valueParser:Y,valueFormatter:U}=z.object,{valueParser:_,valueFormatter:H}=J.object;this.hasObjectValueParser=_!==Y,this.hasObjectValueFormatter=H!==U,this.formatValueFuncs=Q,this.dataTypeDefinitions=J,this.dataTypeMatchers=this.sortKeysInMatchers(X,z)}sortKeysInMatchers(z,J){let Q={...z};for(let Z of YE)delete Q[Z],Q[Z]=z[Z]??J[Z].dataTypeMatcher;return Q}processDataTypeDefinition(z,J,Q,Z){let $,X=z.extendsDataType;if(z.columnTypes)this.isColumnTypeOverrideInDataTypeDefinitions=!0;if(z.extendsDataType===z.baseDataType){let Y=Z[X],U=J[X];if(Y&&U)Y=U;if(!H8(z,Y,X))return;$=_8(Y,z)}else{if(Q.includes(X)){V(44);return}let Y=J[X];if(!H8(z,Y,X))return;let U=this.processDataTypeDefinition(Y,J,[...Q,X],Z);if(!U)return;$=_8(U,z)}return{...$,groupSafeValueFormatter:G8($,this.gos)}}updateColDefAndGetColumnType(z,J,Q){let{cellDataType:Z}=J;if(Z===void 0)Z=z.cellDataType;let{field:$}=J;if(Z==null||Z===!0)Z=this.canInferCellDataType(z,J)?this.inferCellDataType($,Q):!1;if(this.addFormulaCellEditorToColDef(z,J),!Z){z.cellDataType=!1;return}let X=this.dataTypeDefinitions[Z];if(!X){V(47,{cellDataType:Z});return}if(z.cellDataType=Z,X.groupSafeValueFormatter)z.valueFormatter=X.groupSafeValueFormatter;if(X.valueParser)z.valueParser=X.valueParser;if(!X.suppressDefaultProperties)this.setColDefPropertiesForBaseDataType(z,Z,X,Q);return X.columnTypes}addFormulaCellEditorToColDef(z,J){if(!(J.allowFormula??z.allowFormula)||J.cellEditor)return;z.cellEditor="agFormulaCellEditor"}addColumnListeners(z){if(!this.isPendingInference)return;let J=this.columnStateUpdatesPendingInference[z.colId];if(!J)return;let Q=(Z)=>{J.add(Z.key)};z.__addEventListener("columnStateUpdated",Q),this.columnStateUpdateListenerDestroyFuncs.push(()=>z.__removeEventListener("columnStateUpdated",Q))}canInferCellDataType(z,J){let{gos:Q}=this;if(!o(Q))return!1;let Z={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0};if(uQ(J,Z))return!1;let $=J.type===null?z.type:J.type;if($){let X=Q.get("columnTypes")??{};if(r6($).some((U)=>{let _=X[U.trim()];return _&&uQ(_,Z)}))return!1}return!uQ(z,Z)}inferCellDataType(z,J){if(!z)return;let Q,Z=this.getInitialData();if(Z)Q=z.includes(".")&&!this.gos.get("suppressFieldDotNotation")?j2(Z,z):Z[z];else this.initWaitForRowData(J);if(Q==null)return;return Object.keys(this.dataTypeMatchers).find((X)=>this.dataTypeMatchers[X](Q))??"object"}getInitialData(){let z=this.gos.get("rowData");if(z?.length)return z[0];else if(this.initialData)return this.initialData;else{let J=this.beans.rowModel.rootNode?._leafs;if(J?.length)return J[0].data}return null}initWaitForRowData(z){if(this.columnStateUpdatesPendingInference[z]=new Set,this.isPendingInference)return;this.isPendingInference=!0;let J=this.isColumnTypeOverrideInDataTypeDefinitions,{colAutosize:Q,eventSvc:Z}=this.beans;if(J&&Q)Q.shouldQueueResizeOperations=!0;let[$]=this.addManagedEventListeners({rowDataUpdateStarted:(X)=>{let{firstRowData:Y}=X;if(!Y)return;if($?.(),this.isPendingInference=!1,this.processColumnsPendingInference(Y,J),this.columnStateUpdatesPendingInference={},J)Q?.processResizeOperations();Z.dispatchEvent({type:"dataTypesInferred"})}})}processColumnsPendingInference(z,J){this.initialData=z;let Q=[];this.destroyColumnStateUpdateListeners();let Z={},$={};for(let X of Object.keys(this.columnStateUpdatesPendingInference)){let Y=this.columnStateUpdatesPendingInference[X],U=this.colModel.getCol(X);if(!U)continue;let _=U.colDef;if(!this.resetColDefIntoCol(U,"cellDataTypeInferred"))continue;let H=U.colDef;if(J&&H.type&&H.type!==_.type){let G=BE(U,Y);if(G.rowGroup&&G.rowGroupIndex==null)Z[X]=G;if(G.pivot&&G.pivotIndex==null)$[X]=G;Q.push(G)}}if(J)Q.push(...this.generateColumnStateForRowGroupAndPivotIndexes(Z,$));if(Q.length)o0(this.beans,{state:Q},"cellDataTypeInferred");this.initialData=null}generateColumnStateForRowGroupAndPivotIndexes(z,J){let Q={},{rowGroupColsSvc:Z,pivotColsSvc:$}=this.beans;return Z?.restoreColumnOrder(Q,z),$?.restoreColumnOrder(Q,J),Object.values(Q)}resetColDefIntoCol(z,J){let Q=z.getUserProvidedColDef();if(!Q)return!1;let Z=Qz(this.beans,Q,z.colId);return z.setColDef(Z,Q,J),!0}getDateStringTypeDefinition(z){let{dateString:J}=this.dataTypeDefinitions;if(!z)return J;return this.getDataTypeDefinition(z)??J}getDateParserFunction(z){return this.getDateStringTypeDefinition(z).dateParser}getDateFormatterFunction(z){return this.getDateStringTypeDefinition(z).dateFormatter}getDateIncludesTimeFlag(z){return z==="dateTime"||z==="dateTimeString"}getDataTypeDefinition(z){let J=z.colDef;if(!J.cellDataType)return;return this.dataTypeDefinitions[J.cellDataType]}getBaseDataType(z){return this.getDataTypeDefinition(z)?.baseDataType}checkType(z,J){if(J==null)return!0;let Q=this.getDataTypeDefinition(z)?.dataTypeMatcher;if(!Q)return!0;if(z.colDef.allowFormula&&this.beans.formula?.isFormula(J))return!0;return Q(J)}validateColDef(z,J,Q,Z){if(z.cellDataType==="object"){let $=(_)=>{return _?.cellDataType==null||_?.cellDataType===!0},X=$(J)&&$(Q),Y=(_)=>V(48,{property:_,inferred:X,colId:Z}),{object:U}=this.dataTypeDefinitions;if(z.valueFormatter===U.groupSafeValueFormatter&&!this.hasObjectValueFormatter)Y("Formatter");if(z.editable&&z.valueParser===U.valueParser&&!this.hasObjectValueParser)Y("Parser")}}postProcess(z){let J=z.cellDataType;if(!J||typeof J!=="string")return;let{dataTypeDefinitions:Q,beans:Z,formatValueFuncs:$}=this,X=Q[J];if(!X)return;Z.colFilter?.setColDefPropsForDataType(z,X,$[J])}getFormatValue(z){return this.formatValueFuncs[z]}isColPendingInference(z){return this.isPendingInference&&!!this.columnStateUpdatesPendingInference[z]}setColDefPropertiesForBaseDataType(z,J,Q,Z){let $=this.formatValueFuncs[J],X=this.columnDefinitionPropsPerDataType[Q.baseDataType]({colDef:z,cellDataType:J,colModel:this.colModel,dataTypeDefinition:Q,colId:Z,formatValue:$,filterModuleBean:this.beans.filterManager});if(z.cellEditor==="agFormulaCellEditor"&&X.cellEditor!==z.cellEditor)X.cellEditor=z.cellEditor;Object.assign(z,X)}getDateObjectTypeDef(z){let J=this.getLocaleTextFunc(),Q=this.getDateIncludesTimeFlag(z);return{baseDataType:z,valueParser:(Z)=>h0(Z.newValue&&String(Z.newValue)),valueFormatter:(Z)=>{if(Z.value==null)return"";if(!(Z.value instanceof Date)||isNaN(Z.value.getTime()))return J("invalidDate","Invalid Date");return Jz(Z.value,Q)??""},dataTypeMatcher:(Z)=>Z instanceof Date}}getDateStringTypeDef(z){let J=this.getDateIncludesTimeFlag(z);return{baseDataType:z,dateParser:(Q)=>h0(Q)??void 0,dateFormatter:(Q)=>Jz(Q??null,J)??void 0,valueParser:(Q)=>y6(String(Q.newValue))?Q.newValue:null,valueFormatter:(Q)=>y6(String(Q.value))?String(Q.value):"",dataTypeMatcher:(Q)=>typeof Q==="string"&&y6(Q)}}getDefaultDataTypes(){let z=this.getLocaleTextFunc();return{number:{baseDataType:"number",valueParser:(J)=>J.newValue?.trim?.()===""?null:Number(J.newValue),valueFormatter:(J)=>{if(J.value==null)return"";if(typeof J.value!=="number"||isNaN(J.value))return z("invalidNumber","Invalid Number");return String(J.value)},dataTypeMatcher:(J)=>typeof J==="number"},bigint:{baseDataType:"bigint",valueParser:(J)=>{let{newValue:Q}=J;if(Q==null)return null;if(typeof Q==="string"&&Q.trim()==="")return null;return Pz(Q)},valueFormatter:(J)=>{if(J.value==null)return"";if(typeof J.value!=="bigint")return z("invalidBigInt","Invalid BigInt");return String(J.value)},dataTypeMatcher:(J)=>typeof J==="bigint"},text:{baseDataType:"text",valueParser:(J)=>J.newValue===""?null:d0(J.newValue),dataTypeMatcher:(J)=>typeof J==="string"},boolean:{baseDataType:"boolean",valueParser:(J)=>{if(J.newValue==null)return J.newValue;return J.newValue?.trim?.()===""?null:String(J.newValue).toLowerCase()==="true"},valueFormatter:(J)=>J.value==null?"":String(J.value),dataTypeMatcher:(J)=>typeof J==="boolean"},date:this.getDateObjectTypeDef("date"),dateString:this.getDateStringTypeDef("dateString"),dateTime:this.getDateObjectTypeDef("dateTime"),dateTimeString:{...this.getDateStringTypeDef("dateTimeString"),dataTypeMatcher:(J)=>typeof J==="string"&&XE(J)},object:{baseDataType:"object",valueParser:()=>null,valueFormatter:(J)=>d0(J.value)??""}}}destroyColumnStateUpdateListeners(){for(let z of this.columnStateUpdateListenerDestroyFuncs)z();this.columnStateUpdateListenerDestroyFuncs=[]}destroy(){this.dataTypeDefinitions={},this.dataTypeMatchers={},this.formatValueFuncs={},this.columnStateUpdatesPendingInference={},this.destroyColumnStateUpdateListeners(),super.destroy()}};function _8(z,J){let Q={...z,...J};if(z.columnTypes&&J.columnTypes&&J.appendColumnTypes)Q.columnTypes=[...r6(z.columnTypes),...r6(J.columnTypes)];return Q}function H8(z,J,Q){if(!J)return V(45,{parentCellDataType:Q}),!1;if(J.baseDataType!==z.baseDataType)return V(46),!1;return!0}var _E=(z)=>typeof z==="bigint"||typeof z==="number",HE=(z)=>z==="number"||z==="bigint";function G8(z,J){if(!z.valueFormatter)return;return(Q)=>{let{node:Z,colDef:$,column:X,value:Y}=Q;if(Z?.group){let U=($.pivotValueColumn??X).getAggFunc();if(U){if(U==="first"||U==="last")return z.valueFormatter(Q);let{baseDataType:_}=z;if(HE(_)&&U!=="count"){if(_E(Y))return z.valueFormatter(Q);if(Y==null)return;if(typeof Y==="object"){if(typeof Y.toNumber==="function")return z.valueFormatter({...Q,value:Y.toNumber()});if("value"in Y)return z.valueFormatter({...Q,value:Y.value})}}return}}else if(J.get("groupHideOpenParents")&&Q.column.isRowGroupActive()){if(typeof Q.value==="string"&&!z.dataTypeMatcher?.(Q.value))return}return z.valueFormatter(Q)}}function GE(z,J,Q,Z){if(!J[Q])return!1;let $=z[Q];if($===null)return J[Q]=!1,!1;else return Z===void 0?!!$:$===Z}function WE(z,J){if(z==null)return J==null?0:-1;if(J==null)return 1;let Q=Pz(z),Z=Pz(J);if(Q!=null&&Z!=null){if(Q===Z)return 0;return Q>Z?1:-1}return 0}function qE(z,J){if(z==null)return J==null?0:-1;if(J==null)return 1;let Q=W8(z),Z=W8(J);if(Q!=null&&Z!=null){if(Q===Z)return 0;return Q>Z?1:-1}return 0}function W8(z){let J=Pz(z);if(J==null)return null;return J<0n?-J:J}function uQ(z,J){return[["cellRenderer","agSparklineCellRenderer"],["valueGetter",void 0],["valueParser",void 0],["refData",void 0]].some(([Q,Z])=>GE(z,J,Q,Z))}function BE(z,J){let Q=ZX(z);for(let Z of J)if(delete Q[Z],Z==="rowGroup")delete Q.rowGroupIndex;else if(Z==="pivot")delete Q.pivotIndex;return Q}var EE={moduleName:"DataType",version:p,beans:[UE],dependsOn:[eB]},KE={moduleName:"ColumnFlex",version:p,beans:[JE]};var FE=class extends j{constructor(){super(...arguments);this.beanName="colNames"}getDisplayNameForColumn(z,J,Q=!1){if(!z)return null;let Z=this.getHeaderName(z.getColDef(),z,null,null,J),{aggColNameSvc:$}=this.beans;if(Q&&$)return $.getHeaderName(z,Z);return Z}getDisplayNameForProvidedColumnGroup(z,J,Q){let Z=J?.getColGroupDef();if(Z)return this.getHeaderName(Z,null,z,J,Q);return null}getDisplayNameForColumnGroup(z,J){return this.getDisplayNameForProvidedColumnGroup(z,z.getProvidedColumnGroup(),J)}getHeaderName(z,J,Q,Z,$){let X=z.headerValueGetter;if(X){let Y=v(this.gos,{colDef:z,column:J,columnGroup:Q,providedColumnGroup:Z,location:$});if(typeof X==="function")return X(Y);else if(typeof X==="string")return this.beans.expressionSvc?.evaluate(X,Y)??null;return""}else if(z.headerName!=null)return z.headerName;else if(z.field)return r_(z.field);return""}},LE=class extends j{constructor(){super(...arguments);this.beanName="colViewport",this.colsWithinViewport=[],this.headerColsWithinViewport=[],this.colsWithinViewportHash="",this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},this.columnsToRenderLeft=[],this.columnsToRenderRight=[],this.columnsToRenderCenter=[]}wireBeans(z){this.visibleCols=z.visibleCols,this.colModel=z.colModel}postConstruct(){this.suppressColumnVirtualisation=this.gos.get("suppressColumnVirtualisation")}getScrollPosition(){return this.scrollPosition}setScrollPosition(z,J,Q=!1){let{visibleCols:Z}=this,$=Z.isBodyWidthDirty;if(z===this.scrollWidth&&J===this.scrollPosition&&!$)return;if(this.scrollWidth=z,this.scrollPosition=J,Z.isBodyWidthDirty=!0,this.gos.get("enableRtl")){let Y=Z.bodyWidth;this.viewportLeft=Y-J-z,this.viewportRight=Y-J}else this.viewportLeft=J,this.viewportRight=z+J;if(this.colModel.ready)this.checkViewportColumns(Q)}getColumnHeadersToRender(z){switch(z){case"left":return this.columnsToRenderLeft;case"right":return this.columnsToRenderRight;default:return this.columnsToRenderCenter}}getHeadersToRender(z,J){let Q;switch(z){case"left":Q=this.rowsOfHeadersToRenderLeft[J];break;case"right":Q=this.rowsOfHeadersToRenderRight[J];break;default:Q=this.rowsOfHeadersToRenderCenter[J];break}return Q??[]}extractViewportColumns(){let z=this.visibleCols.centerCols;if(this.isColumnVirtualisationSuppressed())this.colsWithinViewport=z,this.headerColsWithinViewport=z;else this.colsWithinViewport=z.filter(this.isColumnInRowViewport.bind(this)),this.headerColsWithinViewport=z.filter(this.isColumnInHeaderViewport.bind(this))}isColumnVirtualisationSuppressed(){return this.suppressColumnVirtualisation||this.viewportRight===0}clear(){this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},this.colsWithinViewportHash=""}isColumnInHeaderViewport(z){if(z.isAutoHeaderHeight()||ME(z))return!0;return this.isColumnInRowViewport(z)}isColumnInRowViewport(z){if(z.isAutoHeight())return!0;let J=z.getLeft()||0,Q=J+z.getActualWidth(),Z=this.viewportLeft-200,$=this.viewportRight+200,X=J<Z&&Q<Z,Y=J>$&&Q>$;return!X&&!Y}getViewportColumns(){let{leftCols:z,rightCols:J}=this.visibleCols;return this.colsWithinViewport.concat(z).concat(J)}getColsWithinViewport(z){if(!this.colModel.colSpanActive)return this.colsWithinViewport;let J=(X)=>{let Y=X.getLeft();return I(Y)&&Y>this.viewportLeft},Q=this.isColumnVirtualisationSuppressed()?void 0:this.isColumnInRowViewport.bind(this),{visibleCols:Z}=this,$=Z.centerCols;return Z.getColsForRow(z,$,Q,J)}checkViewportColumns(z=!1){if(this.extractViewport())this.eventSvc.dispatchEvent({type:"virtualColumnsChanged",afterScroll:z})}calculateHeaderRows(){let{leftCols:z,rightCols:J}=this.visibleCols;this.columnsToRenderLeft=z,this.columnsToRenderRight=J,this.columnsToRenderCenter=this.colsWithinViewport;let Q=(Z)=>{let $=new Set,X={};for(let Y of Z){let U=Y.parent,_=Y.isSpanHeaderHeight();while(U){if($.has(U))break;if(_&&U.isPadding()){U=U.parent;continue}let G=U.getProvidedColumnGroup().getLevel();X[G]??(X[G]=[]),X[G].push(U),$.add(U),U=U.parent}}return X};this.rowsOfHeadersToRenderLeft=Q(z),this.rowsOfHeadersToRenderRight=Q(J),this.rowsOfHeadersToRenderCenter=Q(this.headerColsWithinViewport)}extractViewport(){let z=(Z)=>`${Z.getId()}-${Z.getPinned()||"normal"}`;this.extractViewportColumns();let J=this.getViewportColumns().map(z).join("#"),Q=this.colsWithinViewportHash!==J;if(Q)this.colsWithinViewportHash=J,this.calculateHeaderRows();return Q}};function ME(z){while(z){if(z.isAutoHeaderHeight())return!0;z=z.parent}return!1}var DE=class extends j{constructor(){super(...arguments);this.beanName="agCompUtils"}adaptFunction(z,J){if(!z.cellRenderer)return null;class Q{refresh(){return!1}getGui(){return this.eGui}init(Z){let $=J(Z),X=typeof $;if(X==="string"||X==="number"||X==="boolean"){this.eGui=NZ("<span>"+$+"</span>");return}if($==null){this.eGui=z0({tag:"span"});return}this.eGui=$}}return Q}},RE={moduleName:"CellRendererFunction",version:p,beans:[DE]},AE=class extends R0{constructor(){super(...arguments);this.beanName="registry"}registerDynamicBeans(z){if(z){this.dynamicBeans??(this.dynamicBeans={});for(let J of Object.keys(z))this.dynamicBeans[J]=z[J]}}createDynamicBean(z,J,...Q){if(!this.dynamicBeans)throw Error(this.getDynamicError(z,!0));let Z=this.dynamicBeans[z];if(Z==null){if(J)throw Error(this.getDynamicError(z,!1));return}return new Z(...Q)}};function jE(z){return typeof z==="object"&&!!z.getComp}var VE=class extends AE{constructor(){super(...arguments);this.agGridDefaults={},this.agGridDefaultOverrides={},this.jsComps={},this.selectors={},this.icons={}}postConstruct(){let z=this.gos.get("components");if(z!=null)for(let J of Object.keys(z))this.jsComps[J]=z[J]}registerModule(z){let{icons:J,userComponents:Q,dynamicBeans:Z,selectors:$}=z;if(Q){let X=(Y,U,_,H)=>{if(this.agGridDefaults[Y]=U,_||H)this.agGridDefaultOverrides[Y]={params:_,processParams:H}};for(let Y of Object.keys(Q)){let U=Q[Y];if(jE(U))U=U.getComp(this.beans);if(typeof U==="object"){let{classImp:_,params:H,processParams:G}=U;X(Y,_,H,G)}else X(Y,U)}}this.registerDynamicBeans(Z);for(let X of $??[])this.selectors[X.selector]=X;if(J)for(let X of Object.keys(J))this.icons[X]=J[X]}getUserComponent(z,J){let Q=(U,_,H,G)=>({componentFromFramework:_,component:U,params:H,processParams:G}),{frameworkOverrides:Z}=this.beans,$=Z.frameworkComponent(J,this.gos.get("components"));if($!=null)return Q($,!0);let X=this.jsComps[J];if(X){let U=Z.isFrameworkComponent(X);return Q(X,U)}let Y=this.agGridDefaults[J];if(Y){let U=this.agGridDefaultOverrides[J];return Q(Y,!1,U?.params,U?.processParams)}return this.beans.validation?.missingUserComponent(z,J,this.agGridDefaults,this.jsComps),null}getSelector(z){return this.selectors[z]}getIcon(z){return this.icons[z]}getDynamicError(z,J){if(J)return U4(279,{name:z});return this.beans.validation?.missingDynamicBean(z)??U4(256)}},OE=23,PE=class extends j{constructor(){super(...arguments);this.beanName="ctrlsSvc",this.params={},this.ready=!1,this.readyCallbacks=[]}postConstruct(){this.addEventListener("ready",()=>{if(this.updateReady(),this.ready){for(let z of this.readyCallbacks)z(this.params);this.readyCallbacks.length=0}},this.beans.frameworkOverrides.runWhenReadyAsync?.()??!1)}updateReady(){let z=Object.values(this.params);this.ready=z.length===OE&&z.every((J)=>{return J?.isAlive()??!1})}whenReady(z,J){if(this.ready)J(this.params);else this.readyCallbacks.push(J);z.addDestroyFunc(()=>{let Q=this.readyCallbacks.indexOf(J);if(Q>=0)this.readyCallbacks.splice(Q,1)})}register(z,J){if(this.params[z]=J,this.updateReady(),this.ready)this.dispatchLocalEvent({type:"ready"});J.addDestroyFunc(()=>{this.updateReady()})}get(z){return this.params[z]}getGridBodyCtrl(){return this.params.gridBodyCtrl}getHeaderRowContainerCtrls(){let{leftHeader:z,centerHeader:J,rightHeader:Q}=this.params;return[z,Q,J]}getHeaderRowContainerCtrl(z){let J=this.params;switch(z){case"left":return J.leftHeader;case"right":return J.rightHeader;default:return J.centerHeader}}getScrollFeature(){return this.getGridBodyCtrl().scrollFeature}},TE=':where([class^=ag-]),:where([class^=ag-]):after,:where([class^=ag-]):before{box-sizing:border-box}:where([class^=ag-]):where(button){color:inherit}:where([class^=ag-]):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([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}.ag-measurement-element-border:before{border-left:var(--ag-internal-measurement-border);content:"";display:block}.ag-popup-child{top:0;z-index:5}.ag-popup-child: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-wrapper-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);font-weight:var(--ag-font-weight);--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 .ag-icon,[disabled] .ag-icon{opacity:.5}.ag-icon-grip.ag-disabled,.ag-icon-grip[disabled]{opacity:.35}.ag-icon-loading{animation-duration:1s;animation-iteration-count:infinite;animation-name:spin;animation-timing-function:linear}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.ag-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}}.ag-menu{background-color:var(--ag-menu-background-color);border:var(--ag-menu-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-menu-shadow);color:var(--ag-menu-text-color);max-height:100%;overflow-y:auto;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}',V5=typeof window!=="object"||!window?.document?.fonts?.forEach,e6=!1,Z1=(z,J,Q,Z,$,X,Y=!1)=>{if(V5||e6)return;let U=z;if(Z)U=`@layer ${CSS.escape(Z).replaceAll("\\.",".")} { ${z} }`;let _=g4.map.get(J);if(!_)_=[],g4.map.set(J,_);if(_.some((q)=>q.injectedCss===U))return;let H=document.createElement("style");if(X)H.setAttribute("nonce",X);H.dataset.agCss=Q,H.dataset.agCssVersion=p,H.textContent=U;let G={rawCss:z,injectedCss:U,el:H,priority:$,isParams:Y},W;for(let q of _){if(q.priority>$)break;W=q}if(W){W.el.after(H);let q=_.indexOf(W);_.splice(q+1,0,G)}else{if(J.nodeName==="STYLE")J.after(H);else J.insertBefore(H,J.querySelector(":not(title, meta)"));_.push(G)}},XX=(z,J,Q,Z)=>{Z1(TE,z,"shared",J,0,Q),Z?.forEach(($,X)=>$.forEach((Y)=>Z1(Y,z,X,J,0,Q)))},SE=(z,J,Q,Z,$,X)=>{if(V5||e6)return;let Y=g4.grids.get(z);if(!Y)g4.grids.set(z,{styleContainer:Z,paramsCss:J});else Y.paramsCss=J;if(WZ(Z),J&&Q)Z1(J,Z,Q,$,2,X,!0)},IE=(z)=>{let J=g4.grids.get(z)?.styleContainer;if(!J)return;if(g4.grids.delete(z),Array.from(g4.grids.values()).some((Z)=>Z.styleContainer===J))WZ(J);else WZ(J,!0),g4.map.delete(J)},WZ=(z,J=!1)=>{let Q=new Set;for(let $ of g4.grids.values())if($.styleContainer===z)Q.add($.paramsCss);let Z=g4.map.get(z)??[];for(let $=Z.length-1;$>=0;$--)if(J||Z[$].isParams&&!Q.has(Z[$].rawCss))Z[$].el.remove(),Z.splice($,1)},YX=()=>{let z=globalThis.agStyleInjectionVersions??(globalThis.agStyleInjectionVersions=new Map),J=z.get(p);if(!J)J={map:new WeakMap,grids:new Map,paramsId:0},z.set(p,J);return J},g4=YX(),q4=(z)=>{return new UX(z)},Kz="$default",fE=0,UX=class{constructor({feature:z,params:J,modeParams:Q={},css:Z,cssImports:$}){this.feature=z,this.css=Z,this.cssImports=$,this.modeParams={[Kz]:{...Q[Kz]??{},...J??{}},...Q}}use(z,J,Q){let Z=this._inject;if(Z==null){let{css:$}=this;if($){let X=`ag-theme-${this.feature??"part"}-${++fE}`;if(typeof $==="function")$=$();$=`:where(.${X}) {
4
+ ${$}
5
+ }
6
+ `;for(let Y of this.cssImports??[])$=`@import url(${JSON.stringify(Y)});
7
+ ${$}`;Z={css:$,class:X}}else Z=!1;this._inject=Z}if(Z&&z)Z1(Z.css,z,Z.class,J,1,Q);return Z?Z.class:!1}},kE=(z)=>z.replace(/[A-Z]|\d+/g,(J)=>`-${J}`).toLowerCase(),O5=(z)=>`--ag-${kE(z)}`,p4=(z)=>`var(${O5(z)})`,CE=(z,J,Q)=>Math.max(J,Math.min(Q,z)),vE=(z)=>{let J=new Map;return(Q)=>{let Z=Q;if(!J.has(Z))J.set(Z,z(Q));return J.get(Z)}},N4=(z)=>({ref:"accentColor",mix:z}),Q4=(z)=>({ref:"foregroundColor",mix:z}),X4=(z)=>({ref:"foregroundColor",mix:z,onto:"backgroundColor"}),NE=(z)=>({ref:"foregroundColor",mix:z,onto:"headerBackgroundColor"}),x0={ref:"backgroundColor"},tz={ref:"foregroundColor"},w4={ref:"accentColor"},zJ={backgroundColor:"#fff",foregroundColor:"#181d1f",borderColor:Q4(0.15),chromeBackgroundColor:X4(0.02),browserColorScheme:"light"},_X=()=>["-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue","sans-serif"],wE={...zJ,textColor:tz,accentColor:"#2196f3",invalidColor:"#e02525",fontFamily:_X(),subtleTextColor:{ref:"textColor",mix:0.5},borderWidth:1,borderRadius:4,spacing:8,fontSize:14,fontWeight:"inherit",focusShadow:{spread:3,color:N4(0.5)},focusErrorShadow:{spread:3,color:{ref:"invalidColor",onto:"backgroundColor",mix:0.5}},popupShadow:"0 0 16px #00000026",cardShadow:"0 1px 4px 1px #00000018",dropdownShadow:{ref:"cardShadow"},listItemHeight:{calc:"max(iconSize, dataFontSize) + widgetVerticalSpacing"},dragAndDropImageBackgroundColor:x0,dragAndDropImageBorder:!0,dragAndDropImageNotAllowedBorder:{color:{ref:"invalidColor",onto:"dragAndDropImageBackgroundColor",mix:0.5}},dragAndDropImageShadow:{ref:"popupShadow"},iconSize:16,iconColor:"inherit",toggleButtonWidth:28,toggleButtonHeight:18,toggleButtonOnBackgroundColor:w4,toggleButtonOffBackgroundColor:X4(0.3),toggleButtonSwitchBackgroundColor:x0,toggleButtonSwitchInset:2,tooltipBackgroundColor:{ref:"chromeBackgroundColor"},tooltipErrorBackgroundColor:{ref:"invalidColor",onto:"backgroundColor",mix:0.1},tooltipTextColor:{ref:"textColor"},tooltipErrorTextColor:{ref:"invalidColor"},tooltipBorder:!0,tooltipErrorBorder:{color:{ref:"invalidColor",onto:"backgroundColor",mix:0.25}},panelBackgroundColor:x0,panelTitleBarHeight:{ref:"headerHeight"},panelTitleBarBackgroundColor:{ref:"headerBackgroundColor"},panelTitleBarIconColor:{ref:"headerTextColor"},panelTitleBarTextColor:{ref:"headerTextColor"},panelTitleBarFontFamily:{ref:"headerFontFamily"},panelTitleBarFontSize:{ref:"headerFontSize"},panelTitleBarFontWeight:{ref:"headerFontWeight"},panelTitleBarBorder:!0,dialogShadow:{ref:"popupShadow"},dialogBorder:{color:Q4(0.2)},widgetContainerHorizontalPadding:{calc:"spacing * 1.5"},widgetContainerVerticalPadding:{calc:"spacing * 1.5"},widgetHorizontalSpacing:{calc:"spacing * 1.5"},widgetVerticalSpacing:{ref:"spacing"},dataFontSize:{ref:"fontSize"},headerBackgroundColor:{ref:"chromeBackgroundColor"},headerFontFamily:{ref:"fontFamily"},headerFontSize:{ref:"fontSize"},headerFontWeight:500,headerTextColor:{ref:"textColor"},headerHeight:{calc:"max(iconSize, dataFontSize) + spacing * 4 * headerVerticalPaddingScale"},headerVerticalPaddingScale:1,menuBorder:{color:Q4(0.2)},menuBackgroundColor:X4(0.03),menuTextColor:X4(0.95),menuShadow:{ref:"popupShadow"},menuSeparatorColor:{ref:"borderColor"}},yE=["colorScheme","color","length","scale","borderStyle","border","shadow","image","fontFamily","fontWeight","duration"],xE=vE((z)=>{return z=z.toLowerCase(),yE.find((J)=>z.endsWith(J.toLowerCase()))??"length"}),fJ=(z)=>{if(typeof z==="object"&&z?.ref)return p4(z.ref);if(typeof z==="string")return z;if(typeof z==="number")return String(z);return!1},P5=(z)=>{if(typeof z==="string")return z;if(typeof z==="object"&&z&&"ref"in z){let J=p4(z.ref);if(z.mix==null)return J;return`color-mix(in srgb, ${z.onto?p4(z.onto):"transparent"}, ${J} ${CE(z.mix*100,0,100)}%)`}return!1},bE=fJ,f1=(z)=>{if(typeof z==="string")return z;if(typeof z==="number")return`${z}px`;if(typeof z==="object"&&z&&"calc"in z)return`calc(${z.calc.replace(/ ?[*/+] ?/g," $& ").replace(/-?\b[a-z][a-z0-9]*\b(?![-(])/gi,(Q)=>Q[0]==="-"?Q:" "+p4(Q)+" ")})`;if(typeof z==="object"&&z&&"ref"in z)return p4(z.ref);return!1},gE=fJ,qZ=(z,J)=>{if(typeof z==="string")return z;if(z===!0)return qZ({},J);if(z===!1)return J==="columnBorder"?qZ({color:"transparent"},J):"none";if(typeof z==="object"&&z&&"ref"in z)return p4(z.ref);return HX(z.style??"solid")+" "+f1(z.width??{ref:"borderWidth"})+" "+P5(z.color??{ref:"borderColor"})},q8=(z)=>{return[f1(z.offsetX??0),f1(z.offsetY??0),f1(z.radius??0),f1(z.spread??0),P5(z.color??{ref:"foregroundColor"}),...z.inset?["inset"]:[]].join(" ")},hE=(z)=>{if(typeof z==="string")return z;if(z===!1)return"none";if(typeof z==="object"&&z&&"ref"in z)return p4(z.ref);if(Array.isArray(z))return z.map(q8).join(", ");return q8(z)},HX=fJ,GX=(z)=>{if(typeof z==="string")return z.includes(",")?z:B8(z);if(typeof z==="object"&&z&&"googleFont"in z)return GX(z.googleFont);if(typeof z==="object"&&z&&"ref"in z)return p4(z.ref);if(Array.isArray(z))return z.map((J)=>{if(typeof J==="object"&&"googleFont"in J)J=J.googleFont;return B8(J)}).join(", ");return!1},B8=(z)=>/^[\w-]+$|\w\(/.test(z)?z:JSON.stringify(z),uE=fJ,WX=(z)=>{if(typeof z==="string")return z;if(typeof z==="object"&&z&&"url"in z)return`url(${JSON.stringify(z.url)})`;if(typeof z==="object"&&z&&"svg"in z)return WX({url:`data:image/svg+xml,${encodeURIComponent(z.svg)}`});if(typeof z==="object"&&z&&"ref"in z)return p4(z.ref);return!1},mE=(z,J,Q)=>{if(typeof z==="string")return z;if(typeof z==="number"){if(z>=10)Q?.warn(104,{value:z,param:J});return`${z}s`}if(typeof z==="object"&&z&&"ref"in z)return p4(z.ref);return!1},cE={color:P5,colorScheme:bE,length:f1,scale:gE,border:qZ,borderStyle:HX,shadow:hE,image:WX,fontFamily:GX,fontWeight:uE,duration:mE},pE=(z,J,Q)=>{let Z=xE(z);return cE[Z](J,z,Q)};var iE=(z,J)=>new qX({themeLogger:z,overridePrefix:J}),qX=class z{constructor(J,Q=[]){this.params=J,this.parts=Q}withPart(J){if(typeof J==="function")J=J();if(!(J instanceof UX))return this.params.themeLogger.preInitErr(259,"Invalid part",{part:J}),this;return new z(this.params,[...this.parts,J])}withoutPart(J){return this.withPart(q4({feature:J}))}withParams(J,Q=Kz){return this.withPart(q4({modeParams:{[Q]:J}}))}_startUse({styleContainer:J,cssLayer:Q,nonce:Z,loadThemeGoogleFonts:$,moduleCss:X}){if(V5)return;if(e6)return;nE(),XX(J,Q,Z,X);let Y=dE(this);if(Y.length>0){for(let U of Y)if($)rE(U,Z)}for(let U of this.parts)U.use(J,Q,Z)}_getCssClass(){if(e6)return"ag-theme-quartz";return this._cssClassCache??(this._cssClassCache=E8(this.parts).map((J)=>J.use(void 0,void 0,void 0)).filter(Boolean).concat(this._getParamsClassName()).join(" "))}_getParamsClassName(){return this._paramsClassName??(this._paramsClassName=`ag-theme-params-${++YX().paramsId}`)}_getModeParams(){let J=this._paramsCache;if(!J){let Q={[Kz]:{...wE}};for(let Z of E8(this.parts))for(let $ of Object.keys(Z.modeParams)){let X=Z.modeParams[$];if(X){let Y=Q[$]??(Q[$]={}),U=new Set;for(let _ of Object.keys(X)){let H=X[_];if(H!==void 0)Y[_]=H,U.add(_)}if($===Kz)for(let _ of Object.keys(Q)){let H=Q[_];if(_!==Kz)for(let G of U)delete H[G]}}}this._paramsCache=J=Q}return J}_getParamsCss(){if(!this._paramsCssCache){let J="",Q="",Z=this._getModeParams(),{overridePrefix:$,themeLogger:X}=this.params,Y=$?`--ag-${$}-`:void 0;for(let H of Object.keys(Z)){let G=Z[H];if(H!==Kz){let q=`:where([data-ag-theme-mode="${typeof CSS==="object"?CSS.escape(H):H}"]) & {
8
+ `;J+=q,Q+=q}for(let W of Object.keys(G).sort()){let q=G[W],B=pE(W,q,X);if(B===!1)X.error(107,{key:W,value:q});else{let E=O5(W),K=Y?E.replace("--ag-",Y):E,F=E.replace("--ag-","--ag-inherited-");J+=` ${E}: var(${F}, ${B});
9
+ `,Q+=` ${F}: var(${K});
10
+ `}}if(H!==Kz)J+=`}
11
+ `,Q+=`}
12
+ `}let U=`:where(.${this._getParamsClassName()})`,_=`${U} {
13
+ ${J}}
14
+ `;_+=`:has(> ${U}):not(${U}) {
15
+ ${Q}}
16
+ `,this._paramsCssCache=_}return this._paramsCssCache}},E8=(z)=>{let J=new Map;for(let Z of z)J.set(Z.feature,Z);let Q=[];for(let Z of z)if(!Z.feature||J.get(Z.feature)===Z)Q.push(Z);return Q},dE=(z)=>{let J=new Set,Q=(X)=>{if(Array.isArray(X))X.forEach(Q);else{let Y=X?.googleFont;if(typeof Y==="string")J.add(Y)}};return Object.values(z._getModeParams()).flatMap((X)=>Object.values(X)).forEach(Q),Array.from(J).sort()},K8=!1,nE=()=>{if(K8)return;K8=!0;for(let z of Array.from(document.head.querySelectorAll('style[data-ag-scope="legacy"]')))z.remove()},rE=async(z,J)=>{let Q=`@import url('https://${tE}/css2?family=${encodeURIComponent(z)}:wght@100;200;300;400;500;600;700;800;900&display=swap');
17
+ `;Z1(Q,document.head,`googleFont:${z}`,void 0,0,J)},tE="fonts.googleapis.com",F8={changeKey:"listItemHeight",type:"length",defaultValue:24},sE=class extends R0{constructor(){super(...arguments);this.beanName="environment",this.sizeEls=new Map,this.lastKnownValues=new Map,this.sizesMeasured=!1,this.globalCSS=[]}wireBeans(z){this.eRootDiv=z.eRootDiv}postConstruct(){let{gos:z,eRootDiv:J}=this;z.setInstanceDomData(J);let Q=z.get("themeStyleContainer"),Z=typeof ShadowRoot<"u",$=Z&&J.getRootNode()instanceof ShadowRoot;if(this.eStyleContainer=(typeof Q==="function"?Q():Q)??($?J:document.head),!Q&&!$&&Z)lE(J,this.shadowRootError.bind(this),this.addDestroyFunc.bind(this));this.cssLayer=z.get("themeCssLayer"),this.styleNonce=z.get("styleNonce"),this.addManagedPropertyListener("theme",()=>this.handleThemeChange()),this.handleThemeChange(),this.getSizeEl(F8),this.initVariables(),this.addDestroyFunc(()=>IE(this)),this.mutationObserver=new MutationObserver(()=>{this.fireStylesChangedEvent("theme")}),this.addDestroyFunc(()=>this.mutationObserver.disconnect())}applyThemeClasses(z,J=[]){let{theme:Q}=this,Z=Q?Q._getCssClass():this.applyLegacyThemeClasses();for(let $ of Array.from(z.classList))if($.startsWith("ag-theme-"))z.classList.remove($);if(Z){let $=z.className;z.className=`${$}${$?" ":""}${Z}${J?.length?" "+J.join(" "):""}`}}applyLegacyThemeClasses(){let z="";this.mutationObserver.disconnect();let J=this.eRootDiv;while(J){let Q=!1;for(let Z of Array.from(J.classList))if(Z.startsWith("ag-theme-"))Q=!0,z=z?`${z} ${Z}`:Z;if(Q)this.mutationObserver.observe(J,{attributes:!0,attributeFilter:["class"]});J=J.parentElement}return z}addGlobalCSS(z,J){if(this.theme)Z1(z,this.eStyleContainer,J,this.cssLayer,0,this.styleNonce);else this.globalCSS.push([z,J])}getDefaultListItemHeight(){return this.getCSSVariablePixelValue(F8)}getCSSVariablePixelValue(z){let J=this.lastKnownValues.get(z);if(J!=null)return J;let Q=this.measureSizeEl(z);if(Q==="detached"||Q==="no-styles"){if(z.cacheDefault)this.lastKnownValues.set(z,z.defaultValue);return z.defaultValue}return this.lastKnownValues.set(z,Q),Q}measureSizeEl(z){let J=this.getSizeEl(z);if(J.offsetParent==null)return"detached";let Q=J.offsetWidth;if(Q===mQ)return"no-styles";return this.sizesMeasured=!0,Q}getMeasurementContainer(){let z=this.eMeasurementContainer;if(!z)z=this.eMeasurementContainer=W0({tag:"div",cls:"ag-measurement-container"}),this.eRootDiv.appendChild(z);return z}getSizeEl(z){let J=this.sizeEls.get(z);if(J)return J;let Q=this.getMeasurementContainer();J=W0({tag:"div"});let Z=this.setSizeElStyles(J,z);Q.appendChild(J),this.sizeEls.set(z,J);let{type:$,noWarn:X}=z;if($!=="length"&&$!=="border")return J;let Y=this.measureSizeEl(z);if(Y==="no-styles"&&!X)this.varError(Z,z.defaultValue);let U=S4(this.beans,J,()=>{let _=this.measureSizeEl(z);if(_==="detached"||_==="no-styles")return;if(this.lastKnownValues.set(z,_),_!==Y)Y=_,this.fireStylesChangedEvent(z.changeKey)});return this.addDestroyFunc(()=>U()),J}setSizeElStyles(z,J){let{changeKey:Q,type:Z}=J,$=O5(Q);if(Z==="border"){if($.endsWith("-width"))$=$.slice(0,-6);z.className="ag-measurement-element-border",z.style.setProperty("--ag-internal-measurement-border",`var(${$}, solid ${mQ}px)`)}else z.style.width=`var(${$}, ${mQ}px)`;return $}handleThemeChange(){let{gos:z,theme:J}=this,Q=z.get("theme"),Z;if(Q==="legacy")Z=void 0;else{let $=Q??this.getDefaultTheme();if($ instanceof qX)Z=$;else this.themeError($)}if(Z!==J)this.handleNewTheme(Z);this.postProcessThemeChange(Z,Q)}handleNewTheme(z){let{gos:J,eRootDiv:Q,globalCSS:Z}=this,$=this.getAdditionalCss();if(z){XX(this.eStyleContainer,this.cssLayer,this.styleNonce,$);for(let[X,Y]of Z)Z1(X,this.eStyleContainer,Y,this.cssLayer,0,this.styleNonce);Z.length=0}this.theme=z,z?._startUse({loadThemeGoogleFonts:J.get("loadThemeGoogleFonts"),styleContainer:this.eStyleContainer,cssLayer:this.cssLayer,nonce:this.styleNonce,moduleCss:$}),SE(this,z?._getParamsCss()??null,z?._getParamsClassName()??null,this.eStyleContainer,this.cssLayer,this.styleNonce),this.applyThemeClasses(Q),this.fireStylesChangedEvent("theme")}fireStylesChangedEvent(z){this.eventSvc.dispatchEvent({type:"stylesChanged",[`${z}Changed`]:!0})}},mQ=15538,lE=(z,J,Q)=>{let Z=60,$=setInterval(()=>{if(typeof ShadowRoot<"u"&&z.getRootNode()instanceof ShadowRoot)J(),clearInterval($);if(z.isConnected||--Z<0)clearInterval($)},1000);Q(()=>clearInterval($))},aE=".ag-aria-description-container{border:0;clip-path:inset(50%);height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px;z-index:9999}.ag-unselectable{-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-selectable{-webkit-user-select:text;-moz-user-select:text;user-select:text}.ag-shake-left-to-right{animation-direction:alternate;animation-duration:.2s;animation-iteration-count:infinite;animation-name:ag-shake-left-to-right}@keyframes ag-shake-left-to-right{0%{padding-left:6px;padding-right:2px}to{padding-left:2px;padding-right:6px}}.ag-body-horizontal-scroll-viewport,.ag-body-vertical-scroll-viewport,.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport{flex:1 1 auto;height:100%;min-width:0;overflow:hidden;position:relative}.ag-viewport{position:relative}.ag-spanning-container{position:absolute;top:0;z-index:1}.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport{overflow-x:auto;-ms-overflow-style:none!important;scrollbar-width:none!important}.ag-body-viewport::-webkit-scrollbar,.ag-center-cols-viewport::-webkit-scrollbar,.ag-floating-bottom-viewport::-webkit-scrollbar,.ag-floating-top-viewport::-webkit-scrollbar,.ag-header-viewport::-webkit-scrollbar,.ag-sticky-bottom-viewport::-webkit-scrollbar,.ag-sticky-top-viewport::-webkit-scrollbar{display:none!important}.ag-body-viewport{display:flex;overflow-x:hidden;&:where(.ag-layout-normal){overflow-y:auto;-webkit-overflow-scrolling:touch}}.ag-floating-bottom-container,.ag-floating-top-container,.ag-sticky-bottom-container,.ag-sticky-top-container{min-height:1px}.ag-center-cols-viewport{min-height:100%;width:100%}.ag-body-horizontal-scroll-viewport{overflow-x:scroll}.ag-body-vertical-scroll-viewport{overflow-y:scroll}.ag-body-container,.ag-body-horizontal-scroll-container,.ag-body-vertical-scroll-container,.ag-center-cols-container,.ag-floating-bottom-container,.ag-floating-bottom-full-width-container,.ag-floating-top-container,.ag-full-width-container,.ag-header-container,.ag-pinned-left-cols-container,.ag-pinned-left-sticky-bottom,.ag-pinned-right-cols-container,.ag-pinned-right-sticky-bottom,.ag-sticky-bottom-container,.ag-sticky-top-container{position:relative}.ag-floating-bottom-container,.ag-floating-top-container,.ag-header-container,.ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top,.ag-sticky-bottom-container,.ag-sticky-top-container{height:100%;white-space:nowrap}.ag-center-cols-container,.ag-pinned-right-cols-container{display:block}.ag-body-horizontal-scroll-container{height:100%}.ag-body-vertical-scroll-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container,.ag-full-width-container,.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{pointer-events:none;position:absolute;top:0}:where(.ag-ltr) .ag-floating-bottom-full-width-container,:where(.ag-ltr) .ag-floating-top-full-width-container,:where(.ag-ltr) .ag-full-width-container,:where(.ag-ltr) .ag-sticky-bottom-full-width-container,:where(.ag-ltr) .ag-sticky-top-full-width-container{left:0}:where(.ag-rtl) .ag-floating-bottom-full-width-container,:where(.ag-rtl) .ag-floating-top-full-width-container,:where(.ag-rtl) .ag-full-width-container,:where(.ag-rtl) .ag-sticky-bottom-full-width-container,:where(.ag-rtl) .ag-sticky-top-full-width-container{right:0}.ag-full-width-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container{display:inline-block;height:100%;overflow:hidden;width:100%}.ag-body{display:flex;flex:1 1 auto;flex-direction:row!important;min-height:0;position:relative}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:flex;min-height:0;min-width:0;position:relative;&:where(.ag-scrollbar-invisible){bottom:0;position:absolute;&:where(.ag-apple-scrollbar){opacity:0;transition:opacity .4s;visibility:hidden;&:where(.ag-scrollbar-active),&:where(.ag-scrollbar-scrolling){opacity:1;visibility:visible}}}}.ag-body-horizontal-scroll{width:100%;&:where(.ag-scrollbar-invisible){left:0;right:0}}.ag-body-vertical-scroll{height:100%;&:where(.ag-scrollbar-invisible){top:0;z-index:10}}:where(.ag-ltr) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){right:0}}:where(.ag-rtl) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){left:0}}.ag-force-vertical-scroll{overflow-y:scroll!important}.ag-horizontal-left-spacer,.ag-horizontal-right-spacer{height:100%;min-width:0;overflow-x:scroll;&:where(.ag-scroller-corner){overflow-x:hidden}}:where(.ag-row-animation) .ag-row{transition:transform .4s,top .4s,opacity .2s;&:where(.ag-after-created){transition:transform .4s,top .4s,height .4s,opacity .2s}}:where(.ag-row-animation.ag-prevent-animation) .ag-row{transition:none!important;&:where(.ag-row.ag-after-created){transition:none!important}}:where(.ag-row-no-animation) .ag-row{transition:none}.ag-row-loading{align-items:center;display:flex}.ag-row-position-absolute{position:absolute}.ag-row-position-relative{position:relative}.ag-full-width-row{overflow:hidden;pointer-events:all}.ag-row-inline-editing{z-index:1}.ag-row-dragging{z-index:2}.ag-stub-cell{align-items:center;display:flex}.ag-cell{display:inline-block;height:100%;position:absolute;white-space:nowrap;&:focus-visible{box-shadow:none}}.ag-cell-value{flex:1 1 auto}.ag-cell-value:not(.ag-allow-overflow),.ag-group-value{overflow:hidden;text-overflow:ellipsis}.ag-cell-wrap-text{overflow-wrap:break-word;white-space:normal}:where(.ag-cell) .ag-icon{display:inline-block;vertical-align:middle}.ag-floating-top{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}:where(.ag-floating-top:not(.ag-invisible)){border-bottom:var(--ag-pinned-row-border)}.ag-floating-bottom{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}:where(.ag-floating-bottom:not(.ag-invisible)){border-top:var(--ag-pinned-row-border)}.ag-sticky-bottom,.ag-sticky-top{background-color:var(--ag-data-background-color);display:flex;height:0;overflow:hidden;position:absolute;width:100%;z-index:1}.ag-sticky-bottom{box-sizing:content-box!important;:where(.ag-pinned-left-sticky-bottom),:where(.ag-pinned-right-sticky-bottom),:where(.ag-sticky-bottom-container){border-top:var(--ag-row-border);box-sizing:border-box}}.ag-opacity-zero{opacity:0!important}.ag-cell-label-container{align-items:center;display:flex;flex-direction:row-reverse;height:100%;justify-content:space-between;width:100%}:where(.ag-right-aligned-header){.ag-cell-label-container{flex-direction:row}.ag-header-cell-text{text-align:end}}.ag-column-group-icons{display:block;:where(.ag-column-group-closed-icon),:where(.ag-column-group-opened-icon){cursor:pointer}}:where(.ag-ltr){direction:ltr;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row}}:where(.ag-rtl){direction:rtl;text-align:right;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row-reverse}.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{display:block}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(180deg)}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(-180deg)}}:where(.ag-ltr) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-left:var(--ag-row-group-indent-size)}:where(.ag-rtl) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-right:var(--ag-row-group-indent-size)}:where(.ag-ltr) .ag-row-group-leaf-indent{margin-left:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}:where(.ag-rtl) .ag-row-group-leaf-indent{margin-right:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}.ag-value-change-delta{padding:0 2px}.ag-value-change-delta-up{color:var(--ag-value-change-delta-up-color)}.ag-value-change-delta-down{color:var(--ag-value-change-delta-down-color)}.ag-value-change-value{background-color:transparent;border-radius:1px;padding-left:1px;padding-right:1px;transition:background-color 1s}.ag-value-change-value-highlight{background-color:var(--ag-value-change-value-highlight-background-color);transition:background-color .1s}.ag-cell-data-changed{background-color:var(--ag-value-change-value-highlight-background-color)!important}.ag-cell-data-changed-animation{background-color:transparent}.ag-cell-highlight{background-color:var(--ag-range-selection-highlight-color)!important}.ag-row,.ag-spanned-row{color:var(--ag-cell-text-color);font-family:var(--ag-cell-font-family);font-size:var(--ag-cell-font-size);font-weight:var(--ag-cell-font-weight);white-space:nowrap;--ag-internal-content-line-height:calc(min(var(--ag-row-height), var(--ag-line-height, 1000px)) - var(--ag-internal-row-border-width, 1px) - 2px)}.ag-row{background-color:var(--ag-data-background-color);border-bottom:var(--ag-row-border);height:var(--ag-row-height);width:100%;&.ag-row-editing-invalid{background-color:var(--ag-full-row-edit-invalid-background-color)}}:where(.ag-body-vertical-content-no-gap>div>div>div,.ag-body-vertical-content-no-gap>div>div>div>div)>.ag-row-last{border-bottom-color:transparent}.ag-group-contracted,.ag-group-expanded{cursor:pointer}.ag-cell,.ag-full-width-row .ag-cell-wrapper.ag-row-group{border:1px solid transparent;line-height:var(--ag-internal-content-line-height);-webkit-font-smoothing:subpixel-antialiased}:where(.ag-ltr) .ag-cell{border-right:var(--ag-column-border)}:where(.ag-rtl) .ag-cell{border-left:var(--ag-column-border)}.ag-spanned-cell-wrapper{background-color:var(--ag-data-background-color);position:absolute}.ag-spanned-cell-wrapper>.ag-spanned-cell{display:block;position:relative}:where(.ag-ltr) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-right-color:transparent}:where(.ag-rtl) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-left-color:transparent}.ag-cell-wrapper{align-items:center;display:flex;>:where(:not(.ag-cell-value,.ag-group-value)){align-items:center;display:flex;height:var(--ag-internal-content-line-height)}&:where(.ag-row-group){align-items:flex-start}:where(.ag-full-width-row) &:where(.ag-row-group){align-items:center;height:100%}}:where(.ag-ltr) .ag-cell-wrapper{padding-left:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-rtl) .ag-cell-wrapper{padding-right:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-cell-wrap-text:not(.ag-cell-auto-height)) .ag-cell-wrapper{align-items:normal;height:100%;:where(.ag-cell-value){height:100%}}:where(.ag-ltr) .ag-row>.ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}:where(.ag-rtl) .ag-row>.ag-cell-wrapper.ag-row-group{padding-right:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-cell-focus:not(.ag-cell-range-selected):focus-within,.ag-cell-range-single-cell,.ag-cell-range-single-cell.ag-cell-range-handle,.ag-context-menu-open .ag-cell-focus:not(.ag-cell-range-selected),.ag-context-menu-open .ag-full-width-row.ag-row-focus .ag-cell-wrapper.ag-row-group,.ag-full-width-row.ag-row-focus:focus .ag-cell-wrapper.ag-row-group{border:1px solid;border-color:var(--ag-range-selection-border-color);border-style:var(--ag-range-selection-border-style);outline:initial}.ag-full-width-row.ag-row-focus:focus{box-shadow:none}:where(.ag-ltr) .ag-group-contracted,:where(.ag-ltr) .ag-group-expanded,:where(.ag-ltr) .ag-row-drag,:where(.ag-ltr) .ag-selection-checkbox{margin-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-group-contracted,:where(.ag-rtl) .ag-group-expanded,:where(.ag-rtl) .ag-row-drag,:where(.ag-rtl) .ag-selection-checkbox{margin-left:var(--ag-cell-widget-spacing)}.ag-drag-handle-disabled{opacity:.35;pointer-events:none}:where(.ag-ltr) .ag-group-child-count{margin-left:3px}:where(.ag-rtl) .ag-group-child-count{margin-right:3px}.ag-row-highlight-above:after,.ag-row-highlight-below:after,.ag-row-highlight-inside:after{background-color:var(--ag-row-drag-indicator-color);border-radius:calc(var(--ag-row-drag-indicator-width)/2);content:\"\";height:var(--ag-row-drag-indicator-width);pointer-events:none;position:absolute;width:calc(100% - 1px)}:where(.ag-ltr) .ag-row-highlight-above:after,:where(.ag-ltr) .ag-row-highlight-below:after,:where(.ag-ltr) .ag-row-highlight-inside:after{left:1px}:where(.ag-rtl) .ag-row-highlight-above:after,:where(.ag-rtl) .ag-row-highlight-below:after,:where(.ag-rtl) .ag-row-highlight-inside:after{right:1px}.ag-row-highlight-above:after{top:0}.ag-row-highlight-below:after{bottom:0}.ag-row-highlight-indent:after{display:block;width:auto}:where(.ag-ltr) .ag-row-highlight-indent:after{left:calc((var(--ag-cell-widget-spacing) + var(--ag-icon-size))*2 + var(--ag-cell-horizontal-padding) + var(--ag-row-highlight-level)*var(--ag-row-group-indent-size));right:1px}:where(.ag-rtl) .ag-row-highlight-indent:after{left:1px;right:calc((var(--ag-cell-widget-spacing) + var(--ag-icon-size))*2 + var(--ag-cell-horizontal-padding) + var(--ag-row-highlight-level)*var(--ag-row-group-indent-size))}.ag-row-highlight-inside:after{background-color:var(--ag-selected-row-background-color);border:1px solid var(--ag-range-selection-border-color);display:block;height:auto;inset:0;width:auto}.ag-body,.ag-floating-bottom,.ag-floating-top{background-color:var(--ag-data-background-color)}.ag-row-odd{background-color:var(--ag-odd-row-background-color)}.ag-row-selected:before{background-color:var(--ag-selected-row-background-color);content:\"\";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-full-width-row.ag-row-group:before,.ag-row-hover:not(.ag-full-width-row):before{background-color:var(--ag-row-hover-color);content:\"\";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-row-selected:before{background-color:var(--ag-row-hover-color);background-image:linear-gradient(var(--ag-selected-row-background-color),var(--ag-selected-row-background-color))}.ag-row.ag-full-width-row.ag-row-group>*{position:relative}.ag-column-hover{background-color:var(--ag-column-hover-color)}.ag-header-range-highlight{background-color:var(--ag-range-header-highlight-color)}.ag-right-aligned-cell{font-variant-numeric:tabular-nums}:where(.ag-ltr) .ag-right-aligned-cell{text-align:right}:where(.ag-rtl) .ag-right-aligned-cell{text-align:left}.ag-right-aligned-cell .ag-cell-value,.ag-right-aligned-cell .ag-group-value{margin-left:auto}:where(.ag-ltr) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-ltr) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level));padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}:where(.ag-rtl) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-rtl) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-row>.ag-cell-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}.ag-row-dragging{cursor:move;opacity:.5}.ag-details-row{background-color:var(--ag-data-background-color);padding:calc(var(--ag-spacing)*3.75)}.ag-layout-auto-height,.ag-layout-print{.ag-center-cols-viewport{min-height:150px}}.ag-overlay-exporting-wrapper,.ag-overlay-loading-wrapper,.ag-overlay-modal-wrapper{background-color:var(--ag-modal-overlay-background-color)}.ag-skeleton-container{align-content:center;height:100%;width:100%}.ag-skeleton-effect{animation:ag-skeleton-loading 1.5s ease-in-out .5s infinite;background-color:var(--ag-row-loading-skeleton-effect-color);border-radius:.25rem;height:1em;width:100%}:where(.ag-ltr) .ag-right-aligned-cell .ag-skeleton-effect{margin-left:auto}:where(.ag-rtl) .ag-right-aligned-cell .ag-skeleton-effect{margin-right:auto}@keyframes ag-skeleton-loading{0%{background-color:var(--ag-row-loading-skeleton-effect-color)}50%{background-color:color-mix(in srgb,transparent,var(--ag-row-loading-skeleton-effect-color) 40%)}to{background-color:var(--ag-row-loading-skeleton-effect-color)}}.ag-loading{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-loading{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-loading{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-ltr) .ag-loading-icon{padding-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-loading-icon{padding-left:var(--ag-cell-widget-spacing)}.ag-header{background-color:var(--ag-header-background-color);border-bottom:var(--ag-header-row-border);color:var(--ag-header-text-color);display:flex;font-family:var(--ag-header-font-family);font-size:var(--ag-header-font-size);font-weight:var(--ag-header-font-weight);overflow:hidden;white-space:nowrap;width:100%}.ag-header-row{height:var(--ag-header-height);position:absolute}.ag-floating-filter-button-button,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,:where(.ag-header-cell-sortable) .ag-header-cell-label,:where(.ag-header-group-cell-selectable) .ag-header-cell-comp-wrapper{cursor:pointer}:where(.ag-ltr) .ag-header-expand-icon{margin-left:4px}:where(.ag-rtl) .ag-header-expand-icon{margin-right:4px}.ag-header-row:where(:not(:first-child)){:where(.ag-header-cell:not(.ag-header-span-height.ag-header-span-total,.ag-header-parent-hidden)),:where(.ag-header-group-cell.ag-header-group-cell-with-group){border-top:var(--ag-header-row-border)}}.ag-header-row:where(:not(.ag-header-row-column-group)){overflow:hidden}:where(.ag-header.ag-header-allow-overflow) .ag-header-row{overflow:visible}.ag-header-cell{display:inline-flex;overflow:hidden}.ag-header-group-cell{contain:paint;display:flex}.ag-header-cell,.ag-header-group-cell{align-items:center;gap:var(--ag-cell-widget-spacing);height:100%;padding:0 var(--ag-cell-horizontal-padding);position:absolute}@property --ag-internal-moving-color{syntax:\"<color>\";inherits:false;initial-value:transparent}@property --ag-internal-hover-color{syntax:\"<color>\";inherits:false;initial-value:transparent}.ag-header-cell:where(:not(.ag-floating-filter)):before,.ag-header-group-cell:before{background-image:linear-gradient(var(--ag-internal-hover-color),var(--ag-internal-hover-color)),linear-gradient(var(--ag-internal-moving-color),var(--ag-internal-moving-color));content:\"\";inset:0;position:absolute;--ag-internal-moving-color:transparent;--ag-internal-hover-color:transparent;transition:--ag-internal-moving-color var(--ag-header-cell-background-transition-duration),--ag-internal-hover-color var(--ag-header-cell-background-transition-duration)}.ag-header-cell:where(:not(.ag-floating-filter)):where(:hover):before,.ag-header-group-cell:where(:hover):before{--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}.ag-header-cell:where(:not(.ag-floating-filter)):where(.ag-header-cell-moving):before,.ag-header-group-cell:where(.ag-header-cell-moving):before{--ag-internal-moving-color:var(--ag-header-cell-moving-background-color);--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}:where(.ag-header-cell:not(.ag-floating-filter)>*,.ag-header-group-cell>*){position:relative;z-index:1}.ag-header-cell-menu-button:where(:not(.ag-header-menu-always-show)){opacity:0;transition:opacity .2s}.ag-header-cell-filter-button,:where(.ag-header-cell.ag-header-active) .ag-header-cell-menu-button{opacity:1}.ag-header-cell-label,.ag-header-group-cell-label{align-items:center;align-self:stretch;display:flex;flex:1 1 auto;overflow:hidden;padding:5px 0}:where(.ag-ltr) .ag-sort-indicator-icon{padding-left:var(--ag-spacing)}:where(.ag-rtl) .ag-sort-indicator-icon{padding-right:var(--ag-spacing)}.ag-header-cell-label{text-overflow:ellipsis}.ag-header-group-cell-label.ag-sticky-label{flex:none;max-width:100%;overflow:visible;position:sticky}:where(.ag-ltr) .ag-header-group-cell-label.ag-sticky-label{left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-header-group-cell-label.ag-sticky-label{right:var(--ag-cell-horizontal-padding)}.ag-header-cell-text,.ag-header-group-text{overflow:hidden;text-overflow:ellipsis}.ag-header-cell-text{overflow-wrap:break-word}.ag-header-cell-comp-wrapper{width:100%}:where(.ag-header-group-cell) .ag-header-cell-comp-wrapper{display:flex}:where(.ag-header-cell:not(.ag-header-cell-auto-height)) .ag-header-cell-comp-wrapper{align-items:center;display:flex;height:100%}.ag-header-cell-wrap-text .ag-header-cell-comp-wrapper{white-space:normal}.ag-header-cell-comp-wrapper-limited-height>*{overflow:hidden}:where(.ag-right-aligned-header) .ag-header-cell-label{flex-direction:row-reverse}:where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-col-ref{color:var(--ag-subtle-text-color)}}:where(.ag-ltr) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-col-ref{margin-right:var(--ag-spacing)}.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-col-ref{margin-left:var(--ag-spacing)}.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-header-cell.ag-right-aligned-header){.ag-header-col-ref{color:var(--ag-subtle-text-color)}}:where(.ag-ltr) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-col-ref{margin-left:var(--ag-spacing)}.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-col-ref{margin-right:var(--ag-spacing)}.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}.ag-header-cell:after,.ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{content:\"\";height:var(--ag-header-column-border-height);position:absolute;top:calc(50% - var(--ag-header-column-border-height)*.5);z-index:1}:where(.ag-ltr) .ag-header-cell:after,:where(.ag-ltr) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-right:var(--ag-header-column-border);right:0}:where(.ag-rtl) .ag-header-cell:after,:where(.ag-rtl) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-left:var(--ag-header-column-border);left:0}.ag-header-highlight-after:after,.ag-header-highlight-before:after{background-color:var(--ag-column-drag-indicator-color);border-radius:calc(var(--ag-column-drag-indicator-width)/2);content:\"\";height:100%;position:absolute;top:0;width:var(--ag-column-drag-indicator-width)}:where(.ag-ltr) .ag-header-highlight-before:after{left:0}:where(.ag-rtl) .ag-header-highlight-before:after{right:0}:where(.ag-ltr) .ag-header-highlight-after:after{right:0;:where(.ag-pinned-left-header) &{right:1px}}:where(.ag-rtl) .ag-header-highlight-after:after{left:0;:where(.ag-pinned-left-header) &{left:1px}}.ag-header-cell-resize{align-items:center;cursor:ew-resize;display:flex;height:100%;position:absolute;top:0;width:8px;z-index:2}:where(.ag-ltr) .ag-header-cell-resize{right:-3px}:where(.ag-rtl) .ag-header-cell-resize{left:-3px}.ag-header-cell-resize:after{background-color:var(--ag-header-column-resize-handle-color);content:\"\";height:var(--ag-header-column-resize-handle-height);position:absolute;top:calc(50% - var(--ag-header-column-resize-handle-height)*.5);width:var(--ag-header-column-resize-handle-width);z-index:1}:where(.ag-ltr) .ag-header-cell-resize:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}:where(.ag-rtl) .ag-header-cell-resize:after{right:calc(50% - var(--ag-header-column-resize-handle-width))}:where(.ag-header-cell.ag-header-span-height) .ag-header-cell-resize:after{height:calc(100% - var(--ag-spacing)*4);top:calc(var(--ag-spacing)*2)}.ag-header-group-cell-no-group:where(.ag-header-span-height){display:none}.ag-sort-indicator-container{display:flex;gap:var(--ag-spacing)}.ag-layout-print{&.ag-body{display:block;height:unset}&.ag-root-wrapper{container-type:normal;display:inline-block}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:none}&.ag-force-vertical-scroll{overflow-y:visible!important}}@media print{.ag-root-wrapper.ag-layout-print{container-type:normal;display:table;.ag-body-horizontal-scroll-viewport,.ag-body-viewport,.ag-center-cols-container,.ag-center-cols-viewport,.ag-root,.ag-root-wrapper-body,.ag-virtual-list-viewport{display:block!important;height:auto!important;overflow:hidden!important}.ag-cell,.ag-row{-moz-column-break-inside:avoid;break-inside:avoid}}}ag-grid,ag-grid-angular{display:block}.ag-root-wrapper{border:var(--ag-wrapper-border);border-radius:var(--ag-wrapper-border-radius);container-type:inline-size;display:flex;flex-direction:column;overflow:hidden;position:relative;&.ag-layout-normal{content-visibility:auto;height:100%}}.ag-root-wrapper-body{display:flex;flex-direction:row;&.ag-layout-normal{flex:1 1 auto;height:0;min-height:0}}.ag-root{display:flex;flex-direction:column;position:relative;&.ag-layout-auto-height,&.ag-layout-normal{flex:1 1 auto;overflow:hidden;width:0}&.ag-layout-normal{height:100%}}.ag-drag-handle{color:var(--ag-drag-handle-color);cursor:grab;:where(.ag-icon){color:var(--ag-drag-handle-color)}}.ag-chart-menu-icon,.ag-chart-settings-next,.ag-chart-settings-prev,.ag-column-group-icons,.ag-column-select-header-icon,.ag-filter-toolpanel-expand,.ag-floating-filter-button-button,.ag-group-title-bar-icon,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,.ag-panel-title-bar-button-icon,.ag-set-filter-group-icons,:where(.ag-group-contracted) .ag-icon,:where(.ag-group-expanded) .ag-icon{background-color:var(--ag-icon-button-background-color);border-radius:var(--ag-icon-button-border-radius);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-background-color);color:var(--ag-icon-button-color)}.ag-chart-menu-icon:hover,.ag-chart-settings-next:hover,.ag-chart-settings-prev:hover,.ag-column-group-icons:hover,.ag-column-select-header-icon:hover,.ag-filter-toolpanel-expand:hover,.ag-floating-filter-button-button:hover,.ag-group-title-bar-icon:hover,.ag-header-cell-filter-button:hover,.ag-header-cell-menu-button:hover,.ag-header-expand-icon:hover,.ag-panel-title-bar-button-icon:hover,.ag-panel-title-bar-button:hover,.ag-set-filter-group-icons:hover,:where(.ag-group-contracted) .ag-icon:hover,:where(.ag-group-expanded) .ag-icon:hover{background-color:var(--ag-icon-button-hover-background-color);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-hover-background-color);color:var(--ag-icon-button-hover-color)}:where(.ag-filter-active),:where(.ag-filter-toolpanel-group-instance-header-icon),:where(.ag-filter-toolpanel-instance-header-icon){position:relative}:where(.ag-filter-active):after,:where(.ag-filter-toolpanel-group-instance-header-icon):after,:where(.ag-filter-toolpanel-instance-header-icon):after{background-color:var(--ag-icon-button-active-indicator-color);border-radius:50%;content:\"\";height:6px;position:absolute;top:-1px;width:6px}:where(.ag-ltr) :where(.ag-filter-active):after,:where(.ag-ltr) :where(.ag-filter-toolpanel-group-instance-header-icon):after,:where(.ag-ltr) :where(.ag-filter-toolpanel-instance-header-icon):after{right:-1px}:where(.ag-rtl) :where(.ag-filter-active):after,:where(.ag-rtl) :where(.ag-filter-toolpanel-group-instance-header-icon):after,:where(.ag-rtl) :where(.ag-filter-toolpanel-instance-header-icon):after{left:-1px}.ag-filter-active{background-image:linear-gradient(var(--ag-icon-button-active-background-color),var(--ag-icon-button-active-background-color));border-radius:1px;outline:solid var(--ag-icon-button-background-spread) var(--ag-icon-button-active-background-color);:where(.ag-icon-filter){clip-path:path(\"M8,0C8,4.415 11.585,8 16,8L16,16L0,16L0,0L8,0Z\");color:var(--ag-icon-button-active-color)}}",oE={wrapperBorder:!0,rowBorder:!0,headerRowBorder:!0,footerRowBorder:{ref:"rowBorder"},columnBorder:{style:"solid",width:1,color:"transparent"},headerColumnBorder:!1,headerColumnBorderHeight:"100%",pinnedColumnBorder:!0,pinnedRowBorder:!0,sidePanelBorder:!0,sideBarPanelWidth:250,sideBarPanelAnimationDuration:0,sideBarBackgroundColor:{ref:"chromeBackgroundColor"},sideButtonBarBackgroundColor:{ref:"sideBarBackgroundColor"},sideButtonBarTopPadding:0,sideButtonSelectedUnderlineWidth:2,sideButtonSelectedUnderlineColor:"transparent",sideButtonSelectedUnderlineTransitionDuration:0,sideButtonBackgroundColor:"transparent",sideButtonTextColor:{ref:"textColor"},sideButtonHoverBackgroundColor:{ref:"sideButtonBackgroundColor"},sideButtonHoverTextColor:{ref:"sideButtonTextColor"},sideButtonSelectedBackgroundColor:x0,sideButtonSelectedTextColor:{ref:"sideButtonTextColor"},sideButtonBorder:"solid 1px transparent",sideButtonSelectedBorder:!0,sideButtonLeftPadding:{ref:"spacing"},sideButtonRightPadding:{ref:"spacing"},sideButtonVerticalPadding:{calc:"spacing * 3"},cellFontFamily:{ref:"fontFamily"},cellFontSize:{ref:"dataFontSize"},cellFontWeight:{ref:"fontWeight"},headerCellHoverBackgroundColor:"transparent",headerCellMovingBackgroundColor:{ref:"headerCellHoverBackgroundColor"},headerCellBackgroundTransitionDuration:"0.2s",cellTextColor:{ref:"textColor"},rangeSelectionBorderStyle:"solid",rangeSelectionBorderColor:w4,rangeSelectionBackgroundColor:N4(0.2),rangeSelectionChartBackgroundColor:"#0058FF1A",rangeSelectionChartCategoryBackgroundColor:"#00FF841A",rangeSelectionHighlightColor:N4(0.5),rangeHeaderHighlightColor:NE(0.08),rowNumbersSelectedColor:N4(0.5),rowHoverColor:N4(0.08),columnHoverColor:N4(0.05),selectedRowBackgroundColor:N4(0.12),modalOverlayBackgroundColor:{ref:"backgroundColor",mix:0.66},dataBackgroundColor:x0,oddRowBackgroundColor:{ref:"dataBackgroundColor"},wrapperBackgroundColor:x0,wrapperBorderRadius:8,cellHorizontalPadding:{calc:"spacing * 2 * cellHorizontalPaddingScale"},cellWidgetSpacing:{calc:"spacing * 1.5"},cellHorizontalPaddingScale:1,rowGroupIndentSize:{calc:"cellWidgetSpacing + iconSize"},valueChangeDeltaUpColor:"#43a047",valueChangeDeltaDownColor:"#e53935",valueChangeValueHighlightBackgroundColor:"#16a08580",rowHeight:{calc:"max(iconSize, cellFontSize) + spacing * 3.25 * rowVerticalPaddingScale"},rowVerticalPaddingScale:1,paginationPanelHeight:{ref:"rowHeight",calc:"max(rowHeight, 22px)"},dragHandleColor:Q4(0.7),headerColumnResizeHandleHeight:"30%",headerColumnResizeHandleWidth:2,headerColumnResizeHandleColor:{ref:"borderColor"},iconButtonColor:{ref:"iconColor"},iconButtonBackgroundColor:"transparent",iconButtonBackgroundSpread:4,iconButtonBorderRadius:1,iconButtonHoverColor:{ref:"iconButtonColor"},iconButtonHoverBackgroundColor:Q4(0.1),iconButtonActiveColor:w4,iconButtonActiveBackgroundColor:N4(0.28),iconButtonActiveIndicatorColor:w4,setFilterIndentSize:{ref:"iconSize"},chartMenuPanelWidth:260,chartMenuLabelColor:Q4(0.8),cellEditingBorder:{color:w4},cellEditingShadow:{ref:"cardShadow"},fullRowEditInvalidBackgroundColor:{ref:"invalidColor",onto:"backgroundColor",mix:0.25},columnSelectIndentSize:{ref:"iconSize"},toolbarBackgroundColor:{ref:"headerBackgroundColor"},toolbarTextColor:{ref:"headerTextColor"},toolbarSeparatorBorder:!0,toolPanelSeparatorBorder:!0,columnDropCellBackgroundColor:Q4(0.07),columnDropCellTextColor:{ref:"textColor"},columnDropCellDragHandleColor:{ref:"textColor"},columnDropCellBorder:{color:Q4(0.13)},selectCellBackgroundColor:Q4(0.07),selectCellBorder:{color:Q4(0.13)},advancedFilterBuilderButtonBarBorder:!0,advancedFilterBuilderIndentSize:{calc:"spacing * 2 + iconSize"},advancedFilterBuilderJoinPillColor:"#f08e8d",advancedFilterBuilderColumnPillColor:"#a6e194",advancedFilterBuilderOptionPillColor:"#f3c08b",advancedFilterBuilderValuePillColor:"#85c0e4",filterPanelApplyButtonColor:x0,filterPanelApplyButtonBackgroundColor:w4,columnPanelApplyButtonColor:x0,columnPanelApplyButtonBackgroundColor:w4,filterPanelCardSubtleColor:{ref:"textColor",mix:0.7},filterPanelCardSubtleHoverColor:{ref:"textColor"},findMatchColor:tz,findMatchBackgroundColor:"#ffff00",findActiveMatchColor:tz,findActiveMatchBackgroundColor:"#ffa500",filterToolPanelGroupIndent:{ref:"spacing"},rowLoadingSkeletonEffectColor:Q4(0.15),statusBarLabelColor:tz,statusBarLabelFontWeight:500,statusBarValueColor:tz,statusBarValueFontWeight:500,pinnedSourceRowTextColor:{ref:"textColor"},pinnedSourceRowBackgroundColor:{ref:"dataBackgroundColor"},pinnedSourceRowFontWeight:600,pinnedRowFontWeight:600,pinnedRowBackgroundColor:{ref:"dataBackgroundColor"},pinnedRowTextColor:{ref:"textColor"},rowDragIndicatorColor:{ref:"rangeSelectionBorderColor"},rowDragIndicatorWidth:2,columnDragIndicatorColor:{ref:"accentColor"},columnDragIndicatorWidth:2},eE=".ag-cell-batch-edit{background-color:var(--ag-cell-batch-edit-background-color);color:var(--ag-cell-batch-edit-text-color);display:inherit}.ag-row-batch-edit{background-color:var(--ag-row-batch-edit-background-color);color:var(--ag-row-batch-edit-text-color)}",BX={cellBatchEditBackgroundColor:"rgba(220 181 139 / 16%)",cellBatchEditTextColor:"#422f00",rowBatchEditBackgroundColor:{ref:"cellBatchEditBackgroundColor"},rowBatchEditTextColor:{ref:"cellBatchEditTextColor"}},z3={...BX,cellBatchEditTextColor:"#f3d0b3"},J3=()=>q4({feature:"batchEditStyle",params:BX,css:eE}),Q3=J3(),Z3=":where(.ag-button){background:none;border:none;color:inherit;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0;text-indent:inherit;text-shadow:inherit;text-transform:inherit;word-spacing:inherit;&:disabled{cursor:default}&:focus-visible{box-shadow:var(--ag-focus-shadow);outline:none}}.ag-standard-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--ag-button-background-color);border:var(--ag-button-border);border-radius:var(--ag-button-border-radius);color:var(--ag-button-text-color);cursor:pointer;font-weight:var(--ag-button-font-weight);padding:var(--ag-button-vertical-padding) var(--ag-button-horizontal-padding);&:active{background-color:var(--ag-button-active-background-color);border:var(--ag-button-active-border);color:var(--ag-button-active-text-color)}&:disabled{background-color:var(--ag-button-disabled-background-color);border:var(--ag-button-disabled-border);color:var(--ag-button-disabled-text-color)}}.ag-standard-button:hover{background-color:var(--ag-button-hover-background-color);border:var(--ag-button-hover-border);color:var(--ag-button-hover-text-color)}",$3={buttonTextColor:"inherit",buttonFontWeight:"normal",buttonBackgroundColor:"transparent",buttonBorder:!1,buttonBorderRadius:{ref:"borderRadius"},buttonHorizontalPadding:{calc:"spacing * 2"},buttonVerticalPadding:{ref:"spacing"},buttonHoverTextColor:{ref:"buttonTextColor"},buttonHoverBackgroundColor:{ref:"buttonBackgroundColor"},buttonHoverBorder:{ref:"buttonBorder"},buttonActiveTextColor:{ref:"buttonHoverTextColor"},buttonActiveBackgroundColor:{ref:"buttonHoverBackgroundColor"},buttonActiveBorder:{ref:"buttonHoverBorder"},buttonDisabledTextColor:{ref:"inputDisabledTextColor"},buttonDisabledBackgroundColor:{ref:"inputDisabledBackgroundColor"},buttonDisabledBorder:{ref:"inputDisabledBorder"}};var X3=()=>q4({feature:"buttonStyle",params:{...$3,buttonBackgroundColor:x0,buttonBorder:!0,buttonHoverBackgroundColor:{ref:"rowHoverColor"},buttonActiveBorder:{color:w4}},css:Z3}),Y3=X3();var U3=".ag-column-drop-vertical-empty-message{align-items:center;border:dashed var(--ag-border-width);border-color:var(--ag-border-color);display:flex;inset:0;justify-content:center;margin:calc(var(--ag-spacing)*1.5) calc(var(--ag-spacing)*2);overflow:hidden;padding:calc(var(--ag-spacing)*2);position:absolute}";var _3=()=>{return q4({feature:"columnDropStyle",css:U3})},EX=_3();var H3={formulaToken1Color:"#3269c6",formulaToken1BackgroundColor:{ref:"formulaToken1Color",mix:0.08},formulaToken1Border:{color:{ref:"formulaToken1Color"}},formulaToken2Color:"#c0343f",formulaToken2BackgroundColor:{ref:"formulaToken2Color",mix:0.06},formulaToken2Border:{color:{ref:"formulaToken2Color"}},formulaToken3Color:"#8156b8",formulaToken3BackgroundColor:{ref:"formulaToken3Color",mix:0.08},formulaToken3Border:{color:{ref:"formulaToken3Color"}},formulaToken4Color:"#007c1f",formulaToken4BackgroundColor:{ref:"formulaToken4Color",mix:0.06},formulaToken4Border:{color:{ref:"formulaToken4Color"}},formulaToken5Color:"#b03e85",formulaToken5BackgroundColor:{ref:"formulaToken5Color",mix:0.08},formulaToken5Border:{color:{ref:"formulaToken5Color"}},formulaToken6Color:"#b74900",formulaToken6BackgroundColor:{ref:"formulaToken6Color",mix:0.06},formulaToken6Border:{color:{ref:"formulaToken6Color"}},formulaToken7Color:"#247492",formulaToken7BackgroundColor:{ref:"formulaToken7Color",mix:0.08},formulaToken7Border:{color:{ref:"formulaToken7Color"}}},G3=()=>q4({feature:"formulaStyle",params:H3}),W3=G3(),q3={noteIndicatorColor:{ref:"accentColor"},noteIndicatorSize:"8px",notePopupBackgroundColor:{ref:"menuBackgroundColor"},notePopupTextColor:{ref:"menuTextColor",mix:0.75},notePopupInputTextColor:{ref:"inputTextColor"},notePopupInputBackgroundColor:{ref:"inputBackgroundColor"},notePopupBorder:{ref:"dialogBorder"},notePopupPadding:{calc:"spacing * 0.5"}},B3=()=>q4({feature:"noteStyle",params:q3}),E3=B3(),K3={warn:(...z)=>{V(z[0],z[1])},error:(...z)=>{r(z[0],z[1])},preInitErr:(...z)=>{L2(z[0],z[2],z[1])}},F3=()=>iE(K3).withParams(oE).withPart(Y3).withPart(EX).withPart(Q3).withPart(W3).withPart(E3),L3='.ag-checkbox-input-wrapper,.ag-radio-button-input-wrapper{background-color:var(--ag-checkbox-unchecked-background-color);border:solid var(--ag-checkbox-border-width) var(--ag-checkbox-unchecked-border-color);flex:none;height:var(--ag-icon-size);position:relative;width:var(--ag-icon-size);&:where(.ag-checked){background-color:var(--ag-checkbox-checked-background-color);border-color:var(--ag-checkbox-checked-border-color)}&:where(.ag-checked):after{background-color:var(--ag-checkbox-checked-shape-color)}&:where(.ag-disabled){filter:grayscale();opacity:.5}}.ag-checkbox-input,.ag-radio-button-input{-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;display:block;height:var(--ag-icon-size);margin:0;opacity:0;width:var(--ag-icon-size)}.ag-checkbox-input-wrapper:after,.ag-radio-button-input-wrapper:after{content:"";display:block;inset:0;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;pointer-events:none;position:absolute}.ag-checkbox-input-wrapper:where(:focus-within,:active),.ag-radio-button-input-wrapper:where(:focus-within,:active){box-shadow:var(--ag-focus-shadow)}.ag-checkbox-input-wrapper{border-radius:var(--ag-checkbox-border-radius);&:where(.ag-checked):after{-webkit-mask-image:var(--ag-checkbox-checked-shape-image);mask-image:var(--ag-checkbox-checked-shape-image)}&:where(.ag-indeterminate){background-color:var(--ag-checkbox-indeterminate-background-color);border-color:var(--ag-checkbox-indeterminate-border-color)}&:where(.ag-indeterminate):after{background-color:var(--ag-checkbox-indeterminate-shape-color);-webkit-mask-image:var(--ag-checkbox-indeterminate-shape-image);mask-image:var(--ag-checkbox-indeterminate-shape-image)}}.ag-cell-editing-error .ag-checkbox-input-wrapper:focus-within{box-shadow:var(--ag-focus-error-shadow)}.ag-radio-button-input-wrapper{border-radius:100%;&:where(.ag-checked):after{-webkit-mask-image:var(--ag-radio-checked-shape-image);mask-image:var(--ag-radio-checked-shape-image)}}',M3=()=>q4({feature:"checkboxStyle",params:{checkboxBorderWidth:1,checkboxBorderRadius:{ref:"borderRadius"},checkboxUncheckedBackgroundColor:x0,checkboxUncheckedBorderColor:X4(0.3),checkboxCheckedBackgroundColor:w4,checkboxCheckedBorderColor:{ref:"checkboxCheckedBackgroundColor"},checkboxCheckedShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="10" height="7" fill="none"><path stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.75" d="M1 3.5 3.5 6l5-5"/></svg>'},checkboxCheckedShapeColor:x0,checkboxIndeterminateBackgroundColor:X4(0.3),checkboxIndeterminateBorderColor:{ref:"checkboxIndeterminateBackgroundColor"},checkboxIndeterminateShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="10" height="2" fill="none"><rect width="10" height="2" fill="#000" rx="1"/></svg>'},checkboxIndeterminateShapeColor:x0,radioCheckedShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="6" height="6" fill="none"><circle cx="3" cy="3" r="3" fill="#000"/></svg>'}},css:L3}),D3=M3();var KX=()=>({...zJ,...z3,backgroundColor:"hsl(217, 0%, 17%)",foregroundColor:"#FFF",chromeBackgroundColor:X4(0.05),rowHoverColor:N4(0.15),selectedRowBackgroundColor:N4(0.2),menuBackgroundColor:X4(0.1),browserColorScheme:"dark",popupShadow:"0 0px 20px #000A",cardShadow:"0 1px 4px 1px #000A",advancedFilterBuilderJoinPillColor:"#7a3a37",advancedFilterBuilderColumnPillColor:"#355f2d",advancedFilterBuilderOptionPillColor:"#5a3168",advancedFilterBuilderValuePillColor:"#374c86",filterPanelApplyButtonColor:tz,columnPanelApplyButtonColor:tz,findMatchColor:x0,findActiveMatchColor:x0,checkboxUncheckedBorderColor:X4(0.4),toggleButtonOffBackgroundColor:X4(0.4),rowBatchEditBackgroundColor:X4(0.1),formulaToken1Color:"#4da3e5",formulaToken2Color:"#f55864",formulaToken3Color:"#b688f2",formulaToken4Color:"#24bb4a",formulaToken5Color:"#e772ba",formulaToken6Color:"#f69b5f",formulaToken7Color:"#a3e6ff"});var R3=()=>({...KX(),backgroundColor:"#1f2836"});var A3=()=>q4({feature:"colorScheme",params:zJ,modeParams:{light:zJ,dark:KX(),"dark-blue":R3()}}),j3=A3();var FX={aggregation:'<path d="M18 7V4H6l6 8-6 8h12v-3"/>',arrows:'<polyline points="5 9 2 12 5 15"/><polyline points="9 5 12 2 15 5"/><polyline points="15 19 12 22 9 19"/><polyline points="19 9 22 12 19 15"/><line x1="2" x2="22" y1="12" y2="12"/><line x1="12" x2="12" y1="2" y2="22"/>',asc:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>',cancel:'<path d="m18 6-12 12"/><path d="m6 6 12 12"/>',chart:'<line x1="18" x2="18" y1="20" y2="10"/><line x1="12" x2="12" y1="20" y2="4"/><line x1="6" x2="6" y1="20" y2="14"/>',"color-picker":'<path d="m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11Z"/><path d="m5 2 5 5"/><path d="M2 13h15"/><path d="M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z"/>',columns:'<path d="M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"/>',contracted:'<path d="m9 18 6-6-6-6"/>',copy:'<rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/>',cross:'<path d="M18 6 6 18"/><path d="m6 6 12 12"/>',csv:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',cut:'<circle cx="6" cy="6" r="3"/><path d="M8.12 8.12 12 12"/><path d="M20 4 8.12 15.88"/><circle cx="6" cy="18" r="3"/><path d="M14.8 14.8 20 20"/>',desc:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',down:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',excel:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',expanded:'<path d="m15 18-6-6 6-6"/>',eye:'<path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"/><circle cx="12" cy="12" r="3"/>',"eye-slash":'<path d="M9.88 9.88a3 3 0 1 0 4.24 4.24"/><path d="M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68"/><path d="M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61"/><line x1="2" x2="22" y1="2" y2="22"/>',filter:'<path d="M3 6h18"/><path d="M7 12h10"/><path d="M10 18h4"/>',first:'<path d="m17 18-6-6 6-6"/><path d="M7 6v12"/>',grip:'<circle cx="5" cy="8" r="0.5"/><circle cx="12" cy="8" r="0.5"/><circle cx="19" cy="8" r="0.5"/><circle cx="5" cy="16" r="0.5"/><circle cx="12" cy="16" r="0.5"/><circle cx="19" cy="16" r="0.5"/><g stroke="none" fill="currentColor"><circle cx="5" cy="8" r="1"/><circle cx="12" cy="8" r="1"/><circle cx="19" cy="8" r="1"/><circle cx="5" cy="16" r="1"/><circle cx="12" cy="16" r="1"/><circle cx="19" cy="16" r="1"/></g>',group:'<path d="M16 12H3"/><path d="M16 18H3"/><path d="M10 6H3"/><path d="M21 18V8a2 2 0 0 0-2-2h-5"/><path d="m16 8-2-2 2-2"/>',last:'<path d="m7 18 6-6-6-6"/><path d="M17 6v12"/>',left:'<path d="m12 19-7-7 7-7"/><path d="M19 12H5"/>',linked:'<path d="M9 17H7A5 5 0 0 1 7 7h2"/><path d="M15 7h2a5 5 0 1 1 0 10h-2"/><line x1="8" x2="16" y1="12" y2="12"/>',loading:'<line x1="12" x2="12" y1="2" y2="6"/><line x1="12" x2="12" y1="18" y2="22"/><line x1="4.93" x2="7.76" y1="4.93" y2="7.76"/><line x1="16.24" x2="19.07" y1="16.24" y2="19.07"/><line x1="2" x2="6" y1="12" y2="12"/><line x1="18" x2="22" y1="12" y2="12"/><line x1="4.93" x2="7.76" y1="19.07" y2="16.24"/><line x1="16.24" x2="19.07" y1="7.76" y2="4.93"/>',maximize:'<polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" x2="14" y1="3" y2="10"/><line x1="3" x2="10" y1="21" y2="14"/>',menu:'<line x1="4" x2="20" y1="12" y2="12"/><line x1="4" x2="20" y1="6" y2="6"/><line x1="4" x2="20" y1="18" y2="18"/>',"menu-alt":'<circle cx="12" cy="5" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="12" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="19" r="0.75" fill="#D9D9D9"/>',minimize:'<polyline points="4 14 10 14 10 20"/><polyline points="20 10 14 10 14 4"/><line x1="14" x2="21" y1="10" y2="3"/><line x1="3" x2="10" y1="21" y2="14"/>',minus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/>',next:'<path d="m9 18 6-6-6-6"/>',none:'<path d="m7 15 5 5 5-5"/><path d="m7 9 5-5 5 5"/>',"not-allowed":'<circle cx="12" cy="12" r="10"/><path d="m4.9 4.9 14.2 14.2"/>',paste:'<path d="M15 2H9a1 1 0 0 0-1 1v2c0 .6.4 1 1 1h6c.6 0 1-.4 1-1V3c0-.6-.4-1-1-1Z"/><path d="M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2M16 4h2a2 2 0 0 1 2 2v2M11 14h10"/><path d="m17 10 4 4-4 4"/>',pin:'<line x1="12" x2="12" y1="17" y2="22"/><path d="M5 17h14v-1.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V6h1a2 2 0 0 0 0-4H8a2 2 0 0 0 0 4h1v4.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24Z"/>',pivot:'<path d="M15 3v18"/><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M21 9H3"/><path d="M21 15H3"/>',plus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/><path d="M12 8v8"/>',previous:'<path d="m15 18-6-6 6-6"/>',right:'<path d="M5 12h14"/><path d="m12 5 7 7-7 7"/>',save:'<path d="M12 17V3"/><path d="m6 11 6 6 6-6"/><path d="M19 21H5"/>',search:'<circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/>',settings:'<path d="M20 7h-9"/><path d="M14 17H5"/><circle cx="17" cy="17" r="3"/><circle cx="7" cy="7" r="3"/>',"small-left":'<path d="m15 18-6-6 6-6"/>',"small-right":'<path d="m9 18 6-6-6-6"/>',tick:'<path d="M20 6 9 17l-5-5"/>',"tree-closed":'<path d="m9 18 6-6-6-6"/>',"tree-indeterminate":'<path d="M5 12h14"/>',"tree-open":'<path d="m6 9 6 6 6-6"/>',unlinked:'<path d="M9 17H7A5 5 0 0 1 7 7"/><path d="M15 7h2a5 5 0 0 1 4 8"/><line x1="8" x2="12" y1="12" y2="12"/><line x1="2" x2="22" y1="2" y2="22"/>',up:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>'},LX={aasc:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.2012 8.07928C13.6346 8.0793 14.0128 8.15365 14.3359 8.30193C14.6609 8.45018 14.9141 8.65595 15.0947 8.9201C15.2754 9.18439 15.3683 9.49109 15.374 9.83904H14.1904C14.1676 9.60898 14.0695 9.4303 13.8965 9.30291C13.7235 9.1756 13.4889 9.1115 13.1924 9.1115C12.9909 9.1115 12.8204 9.1404 12.6816 9.19744C12.543 9.25255 12.4364 9.32917 12.3623 9.42791C12.2901 9.52678 12.2539 9.63933 12.2539 9.76482C12.2501 9.8692 12.272 9.9604 12.3193 10.0383C12.3688 10.1162 12.4369 10.1843 12.5225 10.2414C12.6079 10.2964 12.7064 10.3451 12.8184 10.3869C12.9304 10.4268 13.0505 10.4609 13.1777 10.4894L13.7031 10.6144C13.9578 10.6715 14.1914 10.7479 14.4043 10.8429C14.6173 10.938 14.8021 11.0547 14.958 11.1935C15.1138 11.3323 15.2348 11.4957 15.3203 11.6838C15.4077 11.8719 15.4522 12.088 15.4541 12.3312C15.4522 12.6885 15.3611 12.9986 15.1807 13.2609C15.0019 13.5214 14.7427 13.7248 14.4043 13.8693C14.0678 14.0118 13.6617 14.0832 13.1865 14.0832C12.7153 14.0832 12.3048 14.0107 11.9551 13.8664C11.6071 13.7219 11.3345 13.5071 11.1387 13.2238C10.9449 12.9387 10.8435 12.5862 10.834 12.1662H12.0283C12.0416 12.362 12.0984 12.5252 12.1973 12.6564C12.298 12.7857 12.4323 12.8838 12.5996 12.9504C12.7688 13.0149 12.96 13.047 13.1729 13.047C13.3817 13.047 13.563 13.0169 13.7168 12.9562C13.8727 12.8954 13.9935 12.8106 14.0791 12.7023C14.1647 12.5939 14.208 12.469 14.208 12.3283C14.2079 12.1974 14.1686 12.0875 14.0908 11.9982C14.0148 11.9089 13.9022 11.8324 13.7539 11.7697C13.6076 11.707 13.4276 11.6501 13.2148 11.5988L12.5791 11.4387C12.0869 11.3189 11.6982 11.1318 11.4131 10.8771C11.128 10.6224 10.9855 10.2793 10.9873 9.84783C10.9854 9.49418 11.0804 9.18439 11.2705 8.9201C11.4625 8.65603 11.7261 8.45015 12.0605 8.30193C12.3951 8.15369 12.7754 8.07928 13.2012 8.07928Z" fill="black"/><path fill-rule="evenodd" clip-rule="evenodd" d="M5.8125 14.0002H4.48926L4.05664 12.6681H1.94824L1.51465 14.0002H0.19043L2.20703 8.15935H3.79883L5.8125 14.0002ZM2.26172 11.7043H3.74316L3.02539 9.49334H2.98047L2.26172 11.7043Z" fill="black"/><path fill-rule="evenodd" clip-rule="evenodd" d="M8.45215 8.15935C8.88165 8.15935 9.24031 8.22251 9.52734 8.34978C9.81445 8.47717 10.0303 8.65477 10.1748 8.88103C10.3192 9.10536 10.3916 9.36368 10.3916 9.65642C10.3916 9.88452 10.3461 10.085 10.2549 10.258C10.1637 10.4289 10.0384 10.5696 9.87891 10.6799C9.72117 10.7882 9.54024 10.8657 9.33691 10.9113V10.9679C9.55917 10.9775 9.76716 11.0406 9.96094 11.1564C10.1568 11.2724 10.3158 11.4356 10.4375 11.6447C10.5591 11.8519 10.6201 12.099 10.6201 12.3859C10.6201 12.6958 10.5427 12.9727 10.3887 13.216C10.2366 13.4573 10.0113 13.6486 9.71289 13.7892C9.41443 13.9299 9.04655 14.0002 8.60938 14.0002H6.11426V8.15935H8.45215ZM7.34863 12.9904H8.35547C8.69943 12.9904 8.95057 12.9252 9.1084 12.7941C9.26621 12.661 9.34473 12.4834 9.34473 12.2629C9.34468 12.1014 9.30643 11.9587 9.22852 11.8351C9.15056 11.7116 9.03903 11.6145 8.89453 11.5441C8.75195 11.4738 8.58148 11.4387 8.38379 11.4387H7.34863V12.9904ZM7.34863 10.6037H8.26465C8.43369 10.6036 8.58376 10.5737 8.71484 10.5148C8.84793 10.454 8.95227 10.3683 9.02832 10.258C9.10628 10.1477 9.14551 10.0155 9.14551 9.8615C9.14546 9.65055 9.07008 9.48001 8.91992 9.35076C8.77165 9.22169 8.56064 9.15741 8.28711 9.1574H7.34863V10.6037Z" fill="black"/><path d="M7.16602 0.377127C7.44584 0.189493 7.82551 0.20905 8.08496 0.442557L11.418 3.44256C11.7257 3.71966 11.7507 4.19428 11.4736 4.50213C11.1966 4.80961 10.7228 4.83441 10.415 4.55779L7.60938 2.03338L5.11328 4.53045C4.82042 4.82326 4.34562 4.82322 4.05273 4.53045C3.75986 4.23757 3.75989 3.7628 4.05273 3.4699L7.05273 0.4699L7.16602 0.377127Z" fill="black"/></svg>',adesc:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10.3867 11.4697C10.6796 11.1771 11.1544 11.1769 11.4473 11.4697C11.7399 11.7626 11.7399 12.2374 11.4473 12.5303L8.44727 15.5303L8.33398 15.623C8.05425 15.8106 7.67449 15.7909 7.41504 15.5576L4.08203 12.5576C3.77415 12.2805 3.74927 11.8059 4.02637 11.498C4.30342 11.1907 4.77722 11.1657 5.08496 11.4424L7.89062 13.9668L10.3867 11.4697Z" fill="black"/><path d="M13.2012 3.0791C13.6346 3.07912 14.0128 3.1535 14.3359 3.30176C14.6611 3.45006 14.9141 3.65661 15.0947 3.9209C15.2752 4.18513 15.3683 4.49104 15.374 4.83887H14.1904C14.1676 4.60882 14.0695 4.43012 13.8965 4.30273C13.7235 4.17546 13.4889 4.11133 13.1924 4.11133C12.9909 4.11133 12.8204 4.14023 12.6816 4.19727C12.5431 4.25236 12.4364 4.32902 12.3623 4.42773C12.2901 4.52659 12.2539 4.63919 12.2539 4.76465C12.2501 4.86901 12.272 4.96023 12.3193 5.03809C12.3688 5.11604 12.4369 5.18417 12.5225 5.24121C12.6079 5.29623 12.7064 5.34496 12.8184 5.38672C12.9304 5.42661 13.0505 5.46075 13.1777 5.48926L13.7031 5.61426C13.9578 5.67128 14.1914 5.74776 14.4043 5.84277C14.6172 5.93784 14.8021 6.05457 14.958 6.19336C15.1139 6.33216 15.2348 6.49633 15.3203 6.68457C15.4076 6.8727 15.4522 7.08885 15.4541 7.33203C15.4521 7.68929 15.3612 7.99944 15.1807 8.26172C15.0019 8.52216 14.7427 8.72465 14.4043 8.86914C14.0678 9.01165 13.6617 9.08301 13.1865 9.08301C12.7153 9.08299 12.3048 9.01057 11.9551 8.86621C11.6072 8.72173 11.3345 8.50786 11.1387 8.22461C10.9447 7.9394 10.8435 7.58622 10.834 7.16602H12.0283C12.0416 7.36176 12.0985 7.52509 12.1973 7.65625C12.298 7.78554 12.4323 7.88365 12.5996 7.9502C12.7688 8.01477 12.96 8.04785 13.1729 8.04785C13.3817 8.04781 13.5629 8.01678 13.7168 7.95605C13.8727 7.89522 13.9935 7.81051 14.0791 7.70215C14.1646 7.59387 14.2079 7.46965 14.208 7.3291C14.208 7.19796 14.1687 7.08739 14.0908 6.99805C14.0148 6.90868 13.9022 6.83228 13.7539 6.76953C13.6076 6.70685 13.4276 6.64993 13.2148 6.59863L12.5791 6.43848C12.0868 6.31871 11.6982 6.13163 11.4131 5.87695C11.1279 5.62221 10.9855 5.27916 10.9873 4.84766C10.9854 4.49404 11.0804 4.18517 11.2705 3.9209C11.4625 3.65661 11.7259 3.45006 12.0605 3.30176C12.3951 3.15353 12.7754 3.0791 13.2012 3.0791Z" fill="black"/><path fill-rule="evenodd" clip-rule="evenodd" d="M5.8125 9H4.48926L4.05664 7.66797H1.94824L1.51465 9H0.19043L2.20703 3.15918H3.79883L5.8125 9ZM2.26172 6.7041H3.74316L3.02539 4.49414H2.98047L2.26172 6.7041Z" fill="black"/><path fill-rule="evenodd" clip-rule="evenodd" d="M8.45215 3.15918C8.88181 3.15918 9.24025 3.22322 9.52734 3.35059C9.81445 3.47798 10.0303 3.6546 10.1748 3.88086C10.3193 4.10518 10.3916 4.36351 10.3916 4.65625C10.3916 4.88432 10.3461 5.08484 10.2549 5.25781C10.1636 5.4289 10.0386 5.57039 9.87891 5.68066C9.72118 5.78898 9.54022 5.86549 9.33691 5.91113V5.96875C9.55913 5.9783 9.76719 6.04044 9.96094 6.15625C10.1568 6.27223 10.3158 6.43538 10.4375 6.64453C10.5591 6.85173 10.6201 7.09875 10.6201 7.38574C10.6201 7.69567 10.5427 7.97245 10.3887 8.21582C10.2366 8.45719 10.0113 8.64841 9.71289 8.78906C9.41442 8.9297 9.04658 8.99999 8.60938 9H6.11426V3.15918H8.45215ZM7.34863 7.99023H8.35547C8.69948 7.99023 8.95057 7.92504 9.1084 7.79395C9.26621 7.66085 9.34473 7.48325 9.34473 7.2627C9.34466 7.10125 9.3064 6.95844 9.22852 6.83496C9.15056 6.71143 9.03899 6.61427 8.89453 6.54395C8.75196 6.47365 8.58145 6.43848 8.38379 6.43848H7.34863V7.99023ZM7.34863 5.60352H8.26465C8.43369 5.60347 8.58376 5.57354 8.71484 5.51465C8.84791 5.45381 8.95228 5.36807 9.02832 5.25781C9.10623 5.14755 9.14551 5.01529 9.14551 4.86133C9.14542 4.65046 9.07002 4.48078 8.91992 4.35156C8.77163 4.22228 8.56087 4.15724 8.28711 4.15723H7.34863V5.60352Z" fill="black"/></svg>',"chevron-down":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 6L8 10L4 6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-left":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 12L6 8L10 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-right":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6 12L10 8L6 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-up":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 10L8 6L12 10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"column-arrow":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" viewBox="0 0 32 32"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 26C0 28.2092 1.79086 30 4 30H14C16.2091 30 18 28.2092 18 26V15H25.8786L24.4394 16.4393C23.8536 17.0251 23.8536 17.9749 24.4394 18.5607C25.0252 19.1464 25.9748 19.1464 26.5606 18.5607L30.5606 14.5607C31.1464 13.9749 31.1464 13.0251 30.5606 12.4393L26.5606 8.43934C25.9748 7.85356 25.0252 7.85356 24.4394 8.43934C23.8536 9.02512 23.8536 9.97488 24.4394 10.5607L25.8786 12H18V6C18 3.79086 16.2091 2 14 2H4C1.79086 2 0 3.79086 0 6V26ZM14 5H10.5V12H15V6C15 5.44772 14.5523 5 14 5ZM4 5H7.5V12H3V6C3 5.44772 3.44772 5 4 5ZM10.5 15H15V26C15 26.5522 14.5523 27 14 27H10.5V15ZM4 27H7.5V15H3V26C3 26.5522 3.44772 27 4 27Z" fill="currentColor"/></svg>',edit:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 10.6262V12.5012H5.375L10.905 6.97122L9.03 5.09622L3.5 10.6262ZM12.355 5.52122C12.4014 5.47497 12.4381 5.42002 12.4632 5.35953C12.4883 5.29905 12.5012 5.23421 12.5012 5.16872C12.5012 5.10324 12.4883 5.0384 12.4632 4.97791C12.4381 4.91742 12.4014 4.86248 12.355 4.81622L11.185 3.64622C11.1387 3.59987 11.0838 3.5631 11.0233 3.53801C10.9628 3.51291 10.898 3.5 10.8325 3.5C10.767 3.5 10.7022 3.51291 10.6417 3.53801C10.5812 3.5631 10.5263 3.59987 10.48 3.64622L9.565 4.56122L11.44 6.43622L12.355 5.52122Z" fill="currentColor"/></svg>',"filter-add":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5.12126 7.75L10.8517 7.75" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M6.65934 11.748L9.32778 11.748" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M12.2943 1.04872V6.19184M14.9886 3.74341H9.68478" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M8.25488 3C8.04799 3.18323 7.91706 3.45099 7.91699 3.74902C7.91713 4.04868 8.04988 4.31681 8.25879 4.5H2C1.58579 4.5 1.25 4.16421 1.25 3.75C1.25 3.33579 1.58579 3 2 3H8.25488Z" fill="currentColor"/></svg>',"pinned-bottom":'<svg xmlns="http://www.w3.org/2000/svg" fill="none" class="ag-icon" viewBox="0 0 16 16"><path fill="currentColor" d="M3.47 12.28A.75.75 0 0 1 4 11h8a.75.75 0 0 1 0 1.5H4a.75.75 0 0 1-.53-.22ZM12.731 5.256a.75.75 0 0 1-.2.524l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 1 1 1.06-1.06l2.72 2.72V2a.75.75 0 0 1 1.5 0v5.44l2.72-2.72a.75.75 0 0 1 1.26.536Z"/></svg>',"pinned-top":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" viewBox="0 0 16 16"><path fill="currentColor" d="M12.53 3.72A.75.75 0 0 1 12 5H4a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 .53.22ZM3.269 10.744a.75.75 0 0 1 .2-.524l4-4a.75.75 0 0 1 1.06 0l4 4a.75.75 0 1 1-1.06 1.06L8.75 8.56V14a.75.75 0 0 1-1.5 0V8.56l-2.72 2.72a.75.75 0 0 1-1.26-.536Z"/></svg>',"small-down":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="black" stroke="none" viewBox="0 0 32 32"><path d="M7.334 10.667 16 21.334l8.667-10.667H7.334Z"/></svg>',"small-up":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="black" stroke="none" viewBox="0 0 32 32"><path d="M7.334 21.333 16 10.666l8.667 10.667H7.334Z"/></svg>',"un-pin":'<svg xmlns="http://www.w3.org/2000/svg" fill="none" class="ag-icon" viewBox="0 0 16 16"><path fill="currentColor" d="M8 11a.75.75 0 0 0-.75.75v3.333a.75.75 0 1 0 1.5 0V11.75A.75.75 0 0 0 8 11Z"/><path fill="currentColor" d="M13.11 1.436a.75.75 0 0 0-1.22-.872l-10 14a.75.75 0 1 0 1.22.872L5.207 12.5h7.376a.75.75 0 0 0 .75-.75v-1.174a2.08 2.08 0 0 0-1.153-1.863l-1.185-.599-.005-.002a.58.58 0 0 1-.323-.522V5.165a2.083 2.083 0 0 0 1.854-2.904l.589-.825Zm-3.943 5.52v.634a2.08 2.08 0 0 0 1.153 1.863l1.185.6.005.002a.58.58 0 0 1 .323.522V11H6.28l2.887-4.044ZM9.277 1H5.25a2.084 2.084 0 0 0-.083 4.165v1.676l1.5-2.132v-.292a.75.75 0 0 0-.75-.75H5.25a.584.584 0 0 1 0-1.167h2.972L9.277 1Z"/></svg>'},V3=(z={})=>{let J="";for(let Q of[...Object.keys(FX),...Object.keys(LX)]){let Z=O3(Q,z.strokeWidth);J+=`.ag-icon-${Q}::before { mask-image: url('data:image/svg+xml,${encodeURIComponent(Z)}'); }
18
+ `}return J},O3=(z,J=1.5)=>{let Q=LX[z];if(Q)return Q;let Z=FX[z];if(!Z)throw Error(`Missing icon data for ${z}`);return`<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke="black" stroke-width="${J}" viewBox="0 0 24 24"><style>* { vector-effect: non-scaling-stroke; }</style>`+Z+"</svg>"},P3=(z={})=>{return q4({feature:"iconSet",css:()=>V3(z)})};var T3=P3();var S3=":where(.ag-input-field-input[type=number]:not(.ag-number-field-input-stepper)){-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;&::-webkit-inner-spin-button,&::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}}.ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){background-color:var(--ag-input-background-color);border:var(--ag-input-border);border-radius:var(--ag-input-border-radius);color:var(--ag-input-text-color);font-family:inherit;font-size:inherit;line-height:inherit;margin:0;min-height:var(--ag-input-height);padding:0;&:where(:disabled){background-color:var(--ag-input-disabled-background-color);border:var(--ag-input-disabled-border);color:var(--ag-input-disabled-text-color)}&:where(:focus){background-color:var(--ag-input-focus-background-color);border:var(--ag-input-focus-border);box-shadow:var(--ag-input-focus-shadow);color:var(--ag-input-focus-text-color);outline:none}&:where(:invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&::-moz-placeholder{color:var(--ag-input-placeholder-text-color)}&::placeholder{color:var(--ag-input-placeholder-text-color)}}:where(.ag-ltr) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){padding-left:var(--ag-input-padding-start)}:where(.ag-rtl) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){padding-right:var(--ag-input-padding-start)}&:where(.ag-ltr,.ag-rtl) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){padding:0 var(--ag-input-padding-start)}:where(.ag-column-select-header-filter-wrapper),:where(.ag-filter-add-select),:where(.ag-filter-filter),:where(.ag-filter-toolpanel-search),:where(.ag-floating-filter-search-icon),:where(.ag-mini-filter){.ag-input-wrapper:before{background-color:currentcolor;color:var(--ag-input-icon-color);content:\"\";display:block;height:12px;-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==\");mask-image:url(\"data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==\");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;opacity:.5;position:absolute;width:12px}}:where(.ag-ltr) :where(.ag-column-select-header-filter-wrapper),:where(.ag-ltr) :where(.ag-filter-add-select),:where(.ag-ltr) :where(.ag-filter-filter),:where(.ag-ltr) :where(.ag-filter-toolpanel-search),:where(.ag-ltr) :where(.ag-floating-filter-search-icon),:where(.ag-ltr) :where(.ag-mini-filter){.ag-input-wrapper:before{margin-left:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-left:calc(var(--ag-spacing)*1.5 + 12px)}}:where(.ag-rtl) :where(.ag-column-select-header-filter-wrapper),:where(.ag-rtl) :where(.ag-filter-add-select),:where(.ag-rtl) :where(.ag-filter-filter),:where(.ag-rtl) :where(.ag-filter-toolpanel-search),:where(.ag-rtl) :where(.ag-floating-filter-search-icon),:where(.ag-rtl) :where(.ag-mini-filter){.ag-input-wrapper:before{margin-right:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-right:calc(var(--ag-spacing)*1.5 + 12px)}}",I3=".ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){&:focus{box-shadow:var(--ag-focus-shadow);&:where(.invalid),&:where(:invalid){box-shadow:var(--ag-focus-error-shadow)}}}";var f3={inputBackgroundColor:"transparent",inputBorder:!1,inputBorderRadius:0,inputTextColor:{ref:"textColor"},inputPlaceholderTextColor:{ref:"inputTextColor",mix:0.5},inputPaddingStart:0,inputHeight:{calc:"max(iconSize, fontSize) + spacing * 2"},inputFocusBackgroundColor:{ref:"inputBackgroundColor"},inputFocusBorder:{ref:"inputBorder"},inputFocusShadow:"none",inputFocusTextColor:{ref:"inputTextColor"},inputDisabledBackgroundColor:{ref:"inputBackgroundColor"},inputDisabledBorder:{ref:"inputBorder"},inputDisabledTextColor:{ref:"inputTextColor"},inputInvalidBackgroundColor:{ref:"inputBackgroundColor"},inputInvalidBorder:{ref:"inputBorder"},inputInvalidTextColor:{ref:"inputTextColor"},inputIconColor:{ref:"inputTextColor"},pickerButtonBorder:!1,pickerButtonFocusBorder:{ref:"inputFocusBorder"},pickerButtonBackgroundColor:{ref:"backgroundColor"},pickerButtonFocusBackgroundColor:{ref:"backgroundColor"},pickerListBorder:!1,pickerListBackgroundColor:{ref:"backgroundColor"},colorPickerThumbSize:18,colorPickerTrackSize:12,colorPickerThumbBorderWidth:3,colorPickerTrackBorderRadius:12,colorPickerColorBorderRadius:4};var k3=()=>q4({feature:"inputStyle",params:{...f3,inputBackgroundColor:x0,inputBorder:!0,inputBorderRadius:{ref:"borderRadius"},inputPaddingStart:{ref:"spacing"},inputFocusBorder:{color:w4},inputFocusShadow:{ref:"focusShadow"},inputDisabledBackgroundColor:X4(0.06),inputDisabledTextColor:{ref:"textColor",mix:0.5},inputInvalidBorder:{color:{ref:"invalidColor"}},pickerButtonBorder:!0,pickerListBorder:!0},css:()=>S3+I3}),C3=k3();var v3=".ag-tabs-header{background-color:var(--ag-tab-bar-background-color);border-bottom:var(--ag-tab-bar-border);display:flex;flex:1;gap:var(--ag-tab-spacing);padding:var(--ag-tab-bar-top-padding) var(--ag-tab-bar-horizontal-padding) 0}.ag-tabs-header-wrapper{display:flex}.ag-tabs-close-button-wrapper{align-items:center;border:0;display:flex;padding:var(--ag-spacing)}:where(.ag-ltr) .ag-tabs-close-button-wrapper{border-right:solid var(--ag-border-width) var(--ag-border-color)}:where(.ag-rtl) .ag-tabs-close-button-wrapper{border-left:solid var(--ag-border-width) var(--ag-border-color)}.ag-tabs-close-button{background-color:unset;border:0;cursor:pointer;padding:0}.ag-tab{align-items:center;background-color:var(--ag-tab-background-color);border-left:var(--ag-tab-selected-border-width) solid transparent;border-right:var(--ag-tab-selected-border-width) solid transparent;color:var(--ag-tab-text-color);cursor:pointer;display:flex;flex:1;justify-content:center;padding:var(--ag-tab-top-padding) var(--ag-tab-horizontal-padding) var(--ag-tab-bottom-padding);position:relative}.ag-tab:hover{background-color:var(--ag-tab-hover-background-color);color:var(--ag-tab-hover-text-color)}.ag-tab.ag-tab-selected{background-color:var(--ag-tab-selected-background-color);color:var(--ag-tab-selected-text-color)}:where(.ag-ltr) .ag-tab.ag-tab-selected:where(:not(:first-of-type)){border-left-color:var(--ag-tab-selected-border-color)}:where(.ag-rtl) .ag-tab.ag-tab-selected:where(:not(:first-of-type)){border-right-color:var(--ag-tab-selected-border-color)}:where(.ag-ltr) .ag-tab.ag-tab-selected:where(:not(:last-of-type)){border-right-color:var(--ag-tab-selected-border-color)}:where(.ag-rtl) .ag-tab.ag-tab-selected:where(:not(:last-of-type)){border-left-color:var(--ag-tab-selected-border-color)}.ag-tab:after{background-color:var(--ag-tab-selected-underline-color);bottom:0;content:\"\";display:block;height:var(--ag-tab-selected-underline-width);left:0;opacity:0;position:absolute;right:0;transition:opacity var(--ag-tab-selected-underline-transition-duration)}.ag-tab.ag-tab-selected:after{opacity:1}";var N3={tabBarBackgroundColor:"transparent",tabBarHorizontalPadding:0,tabBarTopPadding:0,tabBackgroundColor:"transparent",tabTextColor:{ref:"textColor"},tabHorizontalPadding:{ref:"spacing"},tabTopPadding:{ref:"spacing"},tabBottomPadding:{ref:"spacing"},tabSpacing:"0",tabHoverBackgroundColor:{ref:"tabBackgroundColor"},tabHoverTextColor:{ref:"tabTextColor"},tabSelectedBackgroundColor:{ref:"tabBackgroundColor"},tabSelectedTextColor:{ref:"tabTextColor"},tabSelectedBorderWidth:{ref:"borderWidth"},tabSelectedBorderColor:"transparent",tabSelectedUnderlineColor:"transparent",tabSelectedUnderlineWidth:0,tabSelectedUnderlineTransitionDuration:0,tabBarBorder:!1};var w3=()=>q4({feature:"tabStyle",params:{...N3,tabBarBorder:!0,tabBarBackgroundColor:Q4(0.05),tabTextColor:{ref:"textColor",mix:0.7},tabSelectedTextColor:{ref:"textColor"},tabHoverTextColor:{ref:"textColor"},tabSelectedBorderColor:{ref:"borderColor"},tabSelectedBackgroundColor:x0},css:v3}),y3=w3();var x3=()=>({fontFamily:[{googleFont:"IBM Plex Sans"},..._X()]}),b3=()=>F3().withPart(D3).withPart(j3).withPart(T3).withPart(y3).withPart(C3).withPart(EX).withParams(x3()),kJ=b3();var wz=(z,J,Q,Z,$)=>({changeKey:z,type:J,defaultValue:Q,noWarn:Z,cacheDefault:$}),g3=wz("cellHorizontalPadding","length",16),h3=wz("indentationLevel","length",0,!0,!0),u3=wz("rowGroupIndentSize","length",0),L8=wz("rowHeight","length",42),M8=wz("headerHeight","length",48),cQ=wz("rowBorderWidth","border",1),D8=wz("pinnedRowBorderWidth","border",1),m3=wz("headerRowBorderWidth","border",1);function c3(z,J){for(let Q of J.sort((Z,$)=>Z.moduleName.localeCompare($.moduleName))){let Z=Q.css;if(Z)z.set(`module-${Q.moduleName}`,Z)}}var p3=class extends sE{initVariables(){this.addManagedPropertyListener("rowHeight",()=>this.refreshRowHeightVariable()),this.getSizeEl(L8),this.getSizeEl(M8),this.getSizeEl(cQ),this.getSizeEl(D8),this.refreshRowBorderWidthVariable()}getPinnedRowBorderWidth(){return this.getCSSVariablePixelValue(D8)}getRowBorderWidth(){return this.getCSSVariablePixelValue(cQ)}getHeaderRowBorderWidth(){return this.getCSSVariablePixelValue(m3)}getDefaultRowHeight(){return this.getCSSVariablePixelValue(L8)}getDefaultHeaderHeight(){return this.getCSSVariablePixelValue(M8)}getDefaultCellHorizontalPadding(){return this.getCSSVariablePixelValue(g3)}getCellPaddingLeft(){let z=this.getDefaultCellHorizontalPadding(),J=this.getCSSVariablePixelValue(h3),Q=this.getCSSVariablePixelValue(u3);return z-1+Q*J}getCellPadding(){let z=this.getDefaultCellHorizontalPadding()-1;return this.getCellPaddingLeft()+z}getDefaultColumnMinWidth(){return Math.min(36,this.getDefaultRowHeight())}refreshRowHeightVariable(){let{eRootDiv:z}=this,J=z.style.getPropertyValue("--ag-line-height").trim(),Q=this.gos.get("rowHeight");if(Q==null||isNaN(Q)||!isFinite(Q)){if(J!==null)z.style.setProperty("--ag-line-height",null);return-1}let Z=`${Q}px`;if(J!=Z)return z.style.setProperty("--ag-line-height",Z),Q;return J!=""?Number.parseFloat(J):-1}fireStylesChangedEvent(z){if(z==="rowBorderWidth")this.refreshRowBorderWidthVariable();super.fireStylesChangedEvent(z)}refreshRowBorderWidthVariable(){let z=this.getCSSVariablePixelValue(cQ);this.eRootDiv.style.setProperty("--ag-internal-row-border-width",`${z}px`)}postProcessThemeChange(z,J){if(z&&getComputedStyle(this.getMeasurementContainer()).getPropertyValue("--ag-legacy-styles-loaded"))if(J)r(106);else r(239)}getAdditionalCss(){let z=new Map;return z.set("core",[aE]),c3(z,Array.from(NH())),z}getDefaultTheme(){return kJ}varError(z,J){V(9,{variable:{cssName:z,defaultValue:J}})}themeError(z){r(240,{theme:z})}shadowRootError(){r(293)}},i3=class extends R0{constructor(){super(...arguments);this.beanName="eventSvc",this.eventServiceType="global",this.globalSvc=new P4}addListener(z,J,Q){this.globalSvc.addEventListener(z,J,Q)}removeListener(z,J,Q){this.globalSvc.removeEventListener(z,J,Q)}addGlobalListener(z,J=!1){this.globalSvc.addGlobalListener(z,J)}removeGlobalListener(z,J=!1){this.globalSvc.removeGlobalListener(z,J)}dispatchEvent(z){this.globalSvc.dispatchEvent(this.gos.addCommon(z))}dispatchEventOnce(z){this.globalSvc.dispatchEventOnce(this.gos.addCommon(z))}},d3=class extends i3{postConstruct(){let{globalListener:z,globalSyncListener:J}=this.beans;if(z)this.addGlobalListener(z,!0);if(J)this.addGlobalListener(J,!1)}};function BZ(z,J,Q){let Z=z.visibleCols.headerGroupRowCount;if(Q>=Z)return{column:J,headerRowIndex:Q};let $=J.parent;while($&&$.getProvidedColumnGroup().getLevel()>Q)$=$.parent;let X=J.isSpanHeaderHeight();if(!$||X&&$.isPadding())return{column:J,headerRowIndex:Z};return{column:$,headerRowIndex:$.getProvidedColumnGroup().getLevel()}}var n3=class extends j{constructor(){super(...arguments);this.beanName="headerNavigation",this.currentHeaderRowWithoutSpan=-1}postConstruct(){let z=this.beans;z.ctrlsSvc.whenReady(this,(Q)=>{this.gridBodyCon=Q.gridBodyCtrl});let J=Y0(z);this.addManagedElementListeners(J,{mousedown:()=>{this.currentHeaderRowWithoutSpan=-1}})}getHeaderPositionForColumn(z,J){let Q,{colModel:Z,colGroupSvc:$,ctrlsSvc:X}=this.beans;if(typeof z==="string"){if(Q=Z.getCol(z),!Q)Q=$?.getColumnGroup(z)??null}else Q=z;if(!Q)return null;let U=X.getHeaderRowContainerCtrl()?.getAllCtrls(),_=N(U||[]).type==="filter",H=Z4(this.beans)-1,G=-1,W=Q;while(W)G++,W=W.parent;let q=G;if(J&&_&&q===H-1)q++;return q===-1?null:{headerRowIndex:q,column:Q}}navigateVertically(z,J){let{focusSvc:Q,visibleCols:Z}=this.beans,{focusedHeader:$}=Q;if(!$)return!1;let{headerRowIndex:X}=$,Y=$.column,U=Z4(this.beans),_=this.getHeaderRowType(X),H=Z.headerGroupRowCount,{headerRowIndex:G,column:W,headerRowIndexWithoutSpan:q}=z==="UP"?r3(_,Y,X):t3(Y,X,H),B=!1;if(G<0)G=0,W=Y,B=!0;if(G>=U)G=-1,this.currentHeaderRowWithoutSpan=-1;else if(q!==void 0)this.currentHeaderRowWithoutSpan=q;if(!B&&!W)return!1;return Q.focusHeaderPosition({headerPosition:{headerRowIndex:G,column:W},allowUserOverride:!0,event:J})}navigateHorizontally(z,J=!1,Q){let{focusSvc:Z,gos:$}=this.beans,X={...Z.focusedHeader},Y,U;if(this.currentHeaderRowWithoutSpan!==-1)X.headerRowIndex=this.currentHeaderRowWithoutSpan;else this.currentHeaderRowWithoutSpan=X.headerRowIndex;if(z==="LEFT"!==$.get("enableRtl"))U="Before",Y=this.findHeader(X,U);else U="After",Y=this.findHeader(X,U);let _=$.getCallback("tabToNextHeader");if(J&&_){let H=Z.focusHeaderPositionFromUserFunc({userFunc:_,headerPosition:Y,direction:U});if(H){let{headerRowIndex:G}=Z.focusedHeader||{};if(G!=null&&G!=X.headerRowIndex)this.currentHeaderRowWithoutSpan=G}return H}if(Y||!J)return Z.focusHeaderPosition({headerPosition:Y,direction:U,fromTab:J,allowUserOverride:!0,event:Q});return this.focusNextHeaderRow(X,U,Q)}focusNextHeaderRow(z,J,Q){let Z=this.beans,$=z.headerRowIndex,X,Y,U=Z4(Z),_=this.beans.visibleCols.allCols;if(J==="Before"){if($<=0)return!1;X=N(_),Y=$-1,this.currentHeaderRowWithoutSpan-=1}else if(X=_[0],Y=$+1,this.currentHeaderRowWithoutSpan<U)this.currentHeaderRowWithoutSpan+=1;else this.currentHeaderRowWithoutSpan=-1;let{column:H,headerRowIndex:G}=BZ(this.beans,X,Y);if(G>=U)G=-1;return Z.focusSvc.focusHeaderPosition({headerPosition:{column:H,headerRowIndex:G},direction:J,fromTab:!0,allowUserOverride:!0,event:Q})}scrollToColumn(z,J="After"){if(z.getPinned())return;let Q;if(K0(z)){let Z=z.getDisplayedLeafColumns();Q=J==="Before"?N(Z):Z[0]}else Q=z;this.gridBodyCon.scrollFeature.ensureColumnVisible(Q)}findHeader(z,J){let{colGroupSvc:Q,visibleCols:Z}=this.beans,$=z.column;if($ instanceof N2){let _=$.getDisplayedLeafColumns();$=J==="Before"?_[0]:_[_.length-1]}let X=J==="Before"?Z.getColBefore($):Z.getColAfter($);if(!X)return;let Y=Z.headerGroupRowCount;if(z.headerRowIndex>=Y)return{headerRowIndex:z.headerRowIndex,column:X};let U=Q?.getColGroupAtLevel(X,z.headerRowIndex);if(!U)return{headerRowIndex:X instanceof E4&&X.isSpanHeaderHeight()?Z.headerGroupRowCount:z.headerRowIndex,column:X};if(U.isPadding()&&X.isSpanHeaderHeight())return{headerRowIndex:Z.headerGroupRowCount,column:X};return{headerRowIndex:z.headerRowIndex,column:U??X}}getHeaderRowType(z){let J=this.beans.ctrlsSvc.getHeaderRowContainerCtrl();if(J)return J.getRowType(z)}};function r3(z,J,Q){let Z=Q-1;if(z!=="filter"){let $=J instanceof E4&&J.isSpanHeaderHeight(),X=J.parent;while(X&&(X.getProvidedColumnGroup().getLevel()>Z||$&&X.isPadding()))X=X.parent;if(X)if($)return{column:X,headerRowIndex:X.getProvidedColumnGroup().getLevel(),headerRowIndexWithoutSpan:Z};else return{column:X,headerRowIndex:Z,headerRowIndexWithoutSpan:Z}}return{column:J,headerRowIndex:Z,headerRowIndexWithoutSpan:Z}}function t3(z,J,Q){let Z=J+1,$={column:z,headerRowIndex:Z,headerRowIndexWithoutSpan:Z};if(z instanceof N2){if(Z>=Q)return{column:z.getDisplayedLeafColumns()[0],headerRowIndex:Q,headerRowIndexWithoutSpan:Z};let Y=z.getDisplayedChildren()[0];if(Y instanceof N2&&Y.isPadding()){let _=Y.getDisplayedLeafColumns()[0];if(_.isSpanHeaderHeight())Y=_}if($.column=Y,Y instanceof E4&&Y.isSpanHeaderHeight())$.headerRowIndex=Q,$.headerRowIndexWithoutSpan=Z}return $}var s3=class extends j{constructor(){super(...arguments);this.beanName="focusSvc",this.focusFallbackTimeout=null,this.needsFocusRestored=!1}wireBeans(z){this.colModel=z.colModel,this.visibleCols=z.visibleCols,this.rowRenderer=z.rowRenderer,this.navigation=z.navigation,this.filterManager=z.filterManager,this.overlays=z.overlays}postConstruct(){let z=this.clearFocusedCell.bind(this);this.addManagedEventListeners({columnPivotModeChanged:z,newColumnsLoaded:this.onColumnEverythingChanged.bind(this),columnGroupOpened:z,columnRowGroupChanged:z}),this.addDestroyFunc(zW(this.beans))}attemptToRecoverFocus(){if(this.needsFocusRestored=!0,this.focusFallbackTimeout!=null)clearTimeout(this.focusFallbackTimeout);this.focusFallbackTimeout=window.setTimeout(this.setFocusRecovered.bind(this),100)}setFocusRecovered(){if(this.needsFocusRestored=!1,this.focusFallbackTimeout!=null)clearTimeout(this.focusFallbackTimeout),this.focusFallbackTimeout=null}shouldTakeFocus(){if(this.gos.get("suppressFocusAfterRefresh"))return this.setFocusRecovered(),!1;if(this.needsFocusRestored)return this.setFocusRecovered(),!0;return this.doesRowOrCellHaveBrowserFocus()}onColumnEverythingChanged(){if(!this.focusedCell)return;let z=this.focusedCell.column,J=this.colModel.getCol(z.getId());if(z!==J)this.clearFocusedCell()}getFocusCellToUseAfterRefresh(){let{gos:z,focusedCell:J}=this;if(z.get("suppressFocusAfterRefresh")||z.get("suppressCellFocus")||!J)return null;if(!this.doesRowOrCellHaveBrowserFocus())return null;return J}getFocusHeaderToUseAfterRefresh(){if(this.gos.get("suppressFocusAfterRefresh")||!this.focusedHeader)return null;if(!this.isDomDataPresentInHierarchy(d(this.beans),f$))return null;return this.focusedHeader}doesRowOrCellHaveBrowserFocus(){let z=d(this.beans);if(this.isDomDataPresentInHierarchy(z,a6,!0))return!0;return this.isDomDataPresentInHierarchy(z,o6,!0)}isDomDataPresentInHierarchy(z,J,Q){let Z=z;while(Z){let $=g9(this.gos,Z,J);if($){if($.destroyed&&Q)return this.attemptToRecoverFocus(),!1;return!0}Z=Z.parentNode}return!1}getFocusedCell(){return this.focusedCell}getFocusEventParams(z){let{rowIndex:J,rowPinned:Q,column:Z}=z,$={rowIndex:J,rowPinned:Q,column:Z,isFullWidthCell:!1},X=this.rowRenderer.getRowByPosition({rowIndex:J,rowPinned:Q});if(X)$.isFullWidthCell=X.isFullWidth();return $}clearFocusedCell(){if(this.focusedCell==null)return;let z=this.getFocusEventParams(this.focusedCell);this.focusedCell=null,this.eventSvc.dispatchEvent({type:"cellFocusCleared",...z})}setFocusedCell(z){this.setFocusRecovered();let{column:J,rowIndex:Q,rowPinned:Z,forceBrowserFocus:$=!1,preventScrollOnBrowserFocus:X=!1,sourceEvent:Y}=z,U=this.colModel.getCol(J);if(!U){this.focusedCell=null;return}this.focusedCell={rowIndex:Q,rowPinned:U0(Z),column:U};let _=this.getFocusEventParams(this.focusedCell);this.eventSvc.dispatchEvent({type:"cellFocused",..._,...this.previousCellFocusParams&&{previousParams:this.previousCellFocusParams},forceBrowserFocus:$,preventScrollOnBrowserFocus:X,sourceEvent:Y}),this.previousCellFocusParams=_}isCellFocused(z){if(this.focusedCell==null)return!1;return o1(z,this.focusedCell)}isHeaderWrapperFocused(z){if(this.focusedHeader==null)return!1;let{column:J,rowCtrl:{rowIndex:Q,pinned:Z}}=z,{column:$,headerRowIndex:X}=this.focusedHeader;return J===$&&Q===X&&Z==$.getPinned()}focusHeaderPosition(z){if(this.setFocusRecovered(),D4(this.beans))return!1;let{direction:J,fromTab:Q,allowUserOverride:Z,event:$,fromCell:X,rowWithoutSpanValue:Y,scroll:U=!0}=z,{headerPosition:_}=z;if(X&&this.filterManager?.isAdvFilterHeaderActive())return this.focusAdvancedFilter(_);if(Z){let H=this.focusedHeader,G=Z4(this.beans);if(Q){let W=this.gos.getCallback("tabToNextHeader");if(W)_=this.getHeaderPositionFromUserFunc({userFunc:W,direction:J,currentPosition:H,headerPosition:_,headerRowCount:G})}else{let W=this.gos.getCallback("navigateToNextHeader");if(W&&$){let q={key:$.key,previousHeaderPosition:H,nextHeaderPosition:_,headerRowCount:G,event:$},B=W(q);_=B===null?H:B}}}if(!_)return!1;return this.focusProvidedHeaderPosition({headerPosition:_,direction:J,event:$,fromCell:X,rowWithoutSpanValue:Y,scroll:U})}focusHeaderPositionFromUserFunc(z){if(D4(this.beans))return!1;let{userFunc:J,headerPosition:Q,direction:Z,event:$}=z,X=this.focusedHeader,Y=Z4(this.beans),U=this.getHeaderPositionFromUserFunc({userFunc:J,direction:Z,currentPosition:X,headerPosition:Q,headerRowCount:Y});return!!U&&this.focusProvidedHeaderPosition({headerPosition:U,direction:Z,event:$})}getHeaderPositionFromUserFunc(z){let{userFunc:J,direction:Q,currentPosition:Z,headerPosition:$,headerRowCount:X}=z,U=J({backwards:Q==="Before",previousHeaderPosition:Z,nextHeaderPosition:$,headerRowCount:X});if(U===!0)return Z;if(U===!1)return null;return U}focusProvidedHeaderPosition(z){let{headerPosition:J,direction:Q,fromCell:Z,rowWithoutSpanValue:$,event:X,scroll:Y=!0}=z,{column:U,headerRowIndex:_}=J,{filterManager:H,ctrlsSvc:G,headerNavigation:W}=this.beans;if(this.focusedHeader&&VW(z.headerPosition,this.focusedHeader))return!1;if(_===-1){if(H?.isAdvFilterHeaderActive())return this.focusAdvancedFilter(J);return this.focusGridView({column:U,event:X})}if(Y)W?.scrollToColumn(U,Q);let B=G.getHeaderRowContainerCtrl(U.getPinned())?.focusHeader(J.headerRowIndex,U,X)||!1;if(W&&B&&($!=null||Z))W.currentHeaderRowWithoutSpan=$??-1;return B}focusFirstHeader(){if(this.overlays?.exclusive&&this.focusOverlay())return!0;let z=this.visibleCols.allCols[0];if(!z)return!1;let J=BZ(this.beans,z,0);return this.focusHeaderPosition({headerPosition:J,rowWithoutSpanValue:0})}focusLastHeader(z){if(this.overlays?.exclusive&&this.focusOverlay(!0))return!0;let J=Z4(this.beans)-1,Q=N(this.visibleCols.allCols);return this.focusHeaderPosition({headerPosition:{headerRowIndex:J,column:Q},rowWithoutSpanValue:-1,event:z})}focusPreviousFromFirstCell(z){if(this.filterManager?.isAdvFilterHeaderActive())return this.focusAdvancedFilter(null);return this.focusLastHeader(z)}isAnyCellFocused(){return!!this.focusedCell}isRowFocused(z,J){if(this.focusedCell==null)return!1;return this.focusedCell.rowIndex===z&&this.focusedCell.rowPinned===U0(J)}focusOverlay(z){let J=this.overlays?.isVisible()&&this.overlays.eWrapper?.getGui();return!!J&&E0(J,z)}getDefaultTabToNextGridContainerTarget(z){let{backwards:J,focusableContainers:Q}=z,Z=J?-1:1,$,X=()=>{if($===void 0)$=this.getGridBodyTabTarget(J);return $};for(let Y=z.nextIndex;Y>=0&&Y<Q.length;Y+=Z){let U=MW(Q[Y],X);if(U)return U}return null}getGridBodyTabTarget(z){if(z)return this.getGridViewTabTarget({column:N(this.visibleCols.allCols),backwards:!0});let J=this.visibleCols.allCols[0];if(this.gos.get("headerHeight")===0||D4(this.beans))return this.getGridViewTabTarget({column:J});if(!J)return null;return BZ(this.beans,J,0)}getGridViewTabTarget(z){let{backwards:J=!1}=z,Q=z.column??this.focusedHeader?.column;if(!Q)return null;if(this.overlays?.exclusive)return null;if(l6(this.beans))return J&&!D4(this.beans)?{headerRowIndex:Z4(this.beans)-1,column:Q}:null;let Z=J?Oz(this.beans):m1(this.beans);if(Z?.rowIndex==null){if(this.overlays?.isVisible())return null;if(J&&!D4(this.beans)){let X=N(this.visibleCols.allCols);if(X)return{headerRowIndex:Z4(this.beans)-1,column:X}}return null}let $=j0(this.beans,Z);if(!$||Q.isSuppressNavigable($))return null;if(J){if(this.rowRenderer.getRowByPosition(Z)?.isFullWidth())return null}return{rowIndex:Z.rowIndex,rowPinned:Z.rowPinned,column:Q}}focusGridView(z){let{backwards:J=!1,canFocusOverlay:Q=!0,event:Z}=z;if(this.overlays?.exclusive)return Q&&this.focusOverlay(J);if(l6(this.beans)){if(J){if(!D4(this.beans))return this.focusLastHeader()}if(Q&&this.focusOverlay(J))return!0;if(J)return!1;return W4(this.beans,J)}let $=J?Oz(this.beans):m1(this.beans);if($){let X=z.column??this.focusedHeader?.column,{rowIndex:Y,rowPinned:U}=$,_=j0(this.beans,$);if(!X||!_||Y==null)return!1;if(X.isSuppressNavigable(_)){let H=this.gos.get("enableRtl"),G;if(!Z||Z.key===R.TAB)G=H?R.LEFT:R.RIGHT;else G=Z.key;return this.beans.navigation?.navigateToNextCell(null,G,{rowIndex:Y,column:X,rowPinned:U||null},!0),!0}if(this.navigation?.ensureCellVisible({rowIndex:Y,column:X,rowPinned:U}),J){if(this.rowRenderer.getRowByPosition($)?.isFullWidth()&&this.navigation?.tryToFocusFullWidthRow($,J))return!0}if(this.setFocusedCell({rowIndex:Y,column:X,rowPinned:U0(U),forceBrowserFocus:!0}),!w0(X))this.beans.rangeSvc?.setRangeToCell({rowIndex:Y,rowPinned:U,column:X});return!0}if(Q&&this.focusOverlay(J))return!0;if(J&&this.focusLastHeader())return!0;return!1}focusAdvancedFilter(z){return this.advFilterFocusColumn=z?.column,this.beans.advancedFilter?.getCtrl().focusHeaderComp()??!1}focusNextFromAdvancedFilter(z,J){let Q=(J?void 0:this.advFilterFocusColumn)??this.visibleCols.allCols?.[0];if(z)return this.focusHeaderPosition({headerPosition:{column:Q,headerRowIndex:Z4(this.beans)-1}});return this.focusGridView({column:Q})}clearAdvancedFilterColumn(){this.advFilterFocusColumn=void 0}},l3=class extends j{constructor(){super(...arguments);this.beanName="scrollVisibleSvc"}wireBeans(z){this.ctrlsSvc=z.ctrlsSvc,this.colAnimation=z.colAnimation}postConstruct(){let{gos:z}=this;this.horizontalScrollShowing=z.get("alwaysShowHorizontalScroll")===!0,this.verticalScrollShowing=z.get("alwaysShowVerticalScroll")===!0,this.getScrollbarWidth();let J=this.updateScrollVisible.bind(this);this.addManagedEventListeners({displayedColumnsChanged:J,displayedColumnsWidthChanged:J,newColumnsLoaded:J})}updateScrollVisible(){let{colAnimation:z}=this;if(z?.isActive())z.executeLaterVMTurn(()=>{z.executeLaterVMTurn(()=>this.updateScrollVisibleImpl())});else this.updateScrollVisibleImpl()}updateScrollVisibleImpl(){let z=this.ctrlsSvc.get("center");if(!z||this.colAnimation?.isActive())return;let J={horizontalScrollShowing:z.isHorizontalScrollShowing(),verticalScrollShowing:this.verticalScrollShowing};this.setScrollsVisible(J),this.updateScrollGap()}updateScrollGap(){let z=this.ctrlsSvc.get("center"),J=z.hasHorizontalScrollGap(),Q=z.hasVerticalScrollGap();if(this.horizontalScrollGap!==J||this.verticalScrollGap!==Q)this.horizontalScrollGap=J,this.verticalScrollGap=Q,this.eventSvc.dispatchEvent({type:"scrollGapChanged"})}setScrollsVisible(z){if(this.horizontalScrollShowing!==z.horizontalScrollShowing||this.verticalScrollShowing!==z.verticalScrollShowing)this.horizontalScrollShowing=z.horizontalScrollShowing,this.verticalScrollShowing=z.verticalScrollShowing,this.eventSvc.dispatchEvent({type:"scrollVisibilityChanged"})}getScrollbarWidth(){if(this.scrollbarWidth==null){let z=this.gos.get("scrollbarWidth"),Q=typeof z==="number"&&z>=0?z:z5();if(Q!=null)this.scrollbarWidth=Q,this.eventSvc.dispatchEvent({type:"scrollbarWidthChanged"})}return this.scrollbarWidth}},a3=class extends j{constructor(){super(...arguments);this.beanName="gridDestroySvc",this.destroyCalled=!1}destroy(){if(this.destroyCalled)return;let{stateSvc:z,ctrlsSvc:J,context:Q}=this.beans;this.eventSvc.dispatchEvent({type:"gridPreDestroyed",state:z?.getState()??{}}),this.destroyCalled=!0,J.get("gridCtrl")?.destroyGridUi(),Q.destroy(),super.destroy()}},o3=["columnEverythingChanged","newColumnsLoaded","columnPivotModeChanged","pivotMaxColumnsExceeded","columnRowGroupChanged","expandOrCollapseAll","columnPivotChanged","gridColumnsChanged","columnValueChanged","columnMoved","columnVisible","columnPinned","columnGroupOpened","columnResized","displayedColumnsChanged","virtualColumnsChanged","columnHeaderMouseOver","columnHeaderMouseLeave","columnHeaderClicked","columnHeaderContextMenu","asyncTransactionsFlushed","rowGroupOpened","rowDataUpdated","pinnedRowDataChanged","pinnedRowsChanged","rangeSelectionChanged","cellSelectionChanged","chartCreated","chartRangeSelectionChanged","chartOptionsChanged","chartDestroyed","toolPanelVisibleChanged","toolPanelSizeChanged","modelUpdated","cutStart","cutEnd","pasteStart","pasteEnd","fillStart","fillEnd","cellSelectionDeleteStart","cellSelectionDeleteEnd","rangeDeleteStart","rangeDeleteEnd","undoStarted","undoEnded","redoStarted","redoEnded","cellClicked","cellDoubleClicked","cellMouseDown","cellContextMenu","cellValueChanged","cellEditRequest","rowValueChanged","headerFocused","cellFocused","rowSelected","selectionChanged","tooltipShow","tooltipHide","cellKeyDown","cellMouseOver","cellMouseOut","filterChanged","filterModified","filterUiChanged","filterOpened","floatingFilterUiChanged","advancedFilterBuilderVisibleChanged","sortChanged","virtualRowRemoved","rowClicked","rowDoubleClicked","gridReady","gridPreDestroyed","gridSizeChanged","viewportChanged","firstDataRendered","dragStarted","dragStopped","dragCancelled","rowEditingStarted","rowEditingStopped","cellEditingStarted","cellEditingStopped","bodyScroll","bodyScrollEnd","paginationChanged","componentStateChanged","storeRefreshed","stateUpdated","columnMenuVisibleChanged","contextMenuVisibleChanged","rowDragEnter","rowDragMove","rowDragLeave","rowDragEnd","rowDragCancel","findChanged","rowResizeStarted","rowResizeEnded","columnsReset","bulkEditingStarted","bulkEditingStopped","batchEditingStarted","batchEditingStopped"];var x6=new Set(["gridPreDestroyed","fillStart","pasteStart"]),T5=o3.reduce((z,J)=>{return z[J]=oH(J),z},{}),e3=["__ob__","__v_skip","__metadata__"];function MX(z,J,Q){return new Set([...e3,...Q??[],...Object.keys(J),...z])}var b1={agSetColumnFilter:"SetFilter",agSetColumnFloatingFilter:"SetFilter",agMultiColumnFilter:"MultiFilter",agMultiColumnFloatingFilter:"MultiFilter",agGroupColumnFilter:"GroupFilter",agGroupColumnFloatingFilter:"GroupFilter",agGroupCellRenderer:"GroupCellRenderer",agGroupRowRenderer:"GroupCellRenderer",agRichSelect:"RichSelect",agRichSelectCellEditor:"RichSelect",agDetailCellRenderer:"SharedMasterDetail",agSparklineCellRenderer:"Sparklines",agDragAndDropImage:"SharedDragAndDrop",agColumnHeader:"ColumnHeaderComp",agColumnGroupHeader:"ColumnGroupHeaderComp",agSortIndicator:"Sort",agAnimateShowChangeCellRenderer:"HighlightChanges",agAnimateSlideCellRenderer:"HighlightChanges",agLoadingCellRenderer:"LoadingCellRenderer",agSkeletonCellRenderer:"SkeletonCellRenderer",agCheckboxCellRenderer:"CheckboxCellRenderer",agLoadingOverlay:"Overlay",agExportingOverlay:"Overlay",agNoRowsOverlay:"Overlay",agNoMatchingRowsOverlay:"Overlay",agTooltipComponent:"Tooltip",agReadOnlyFloatingFilter:"CustomFilter",agTextColumnFilter:"TextFilter",agNumberColumnFilter:"NumberFilter",agBigIntColumnFilter:"BigIntFilter",agDateColumnFilter:"DateFilter",agDateInput:"DateFilter",agTextColumnFloatingFilter:"TextFilter",agNumberColumnFloatingFilter:"NumberFilter",agBigIntColumnFloatingFilter:"BigIntFilter",agDateColumnFloatingFilter:"DateFilter",agFormulaCellEditor:"Formula",agCellEditor:"TextEditor",agSelectCellEditor:"SelectEditor",agTextCellEditor:"TextEditor",agNumberCellEditor:"NumberEditor",agDateCellEditor:"DateEditor",agDateStringCellEditor:"DateEditor",agCheckboxCellEditor:"CheckboxEditor",agLargeTextCellEditor:"LargeTextEditor",agMenuItem:"MenuItem",agColumnsToolPanel:"ColumnsToolPanel",agFiltersToolPanel:"FiltersToolPanel",agNewFiltersToolPanel:"NewFiltersToolPanel",agAggregationComponent:"StatusBar",agSelectedRowCountComponent:"StatusBar",agTotalRowCountComponent:"StatusBar",agFilteredRowCountComponent:"StatusBar",agTotalAndFilteredRowCountComponent:"StatusBar",agFindCellRenderer:"Find",agButtonToolbarItem:"Toolbar",agFindToolbarItem:"Toolbar",agMenuToolbarItem:"Toolbar",agPivotPanelToolbarItem:"Toolbar",agQuickFilterToolbarItem:"Toolbar",agRowGroupPanelToolbarItem:"Toolbar"};function R8(z){return`"${z}"`}var zK=()=>({checkboxSelection:{version:"32.2",message:"Use `rowSelection.checkboxes` in `GridOptions` instead."},headerCheckboxSelection:{version:"32.2",message:"Use `rowSelection.headerCheckbox = true` in `GridOptions` instead."},headerCheckboxSelectionFilteredOnly:{version:"32.2",message:'Use `rowSelection.selectAll = "filtered"` in `GridOptions` instead.'},headerCheckboxSelectionCurrentPageOnly:{version:"32.2",message:'Use `rowSelection.selectAll = "currentPage"` in `GridOptions` instead.'},showDisabledCheckboxes:{version:"32.2",message:"Use `rowSelection.hideDisabledCheckboxes = true` in `GridOptions` instead."},rowGroupingHierarchy:{version:"34.3",message:"Use `colDef.groupHierarchy` instead."}}),JK={allowFormula:"Formula",aggFunc:"SharedAggregation",autoHeight:"RowAutoHeight",cellClass:"CellStyle",cellClassRules:"CellStyle",cellEditor:({cellEditor:z,editable:J,groupRowEditable:Q})=>{if(!(!!J||!!Q))return null;if(typeof z==="string")return b1[z]??"CustomEditor";return"CustomEditor"},cellRenderer:({cellRenderer:z})=>{if(typeof z!=="string")return null;return b1[z]},cellStyle:"CellStyle",columnChooserParams:"ColumnMenu",contextMenuItems:"ContextMenu",dndSource:"DragAndDrop",dndSourceOnRowDrag:"DragAndDrop",editable:({editable:z,cellEditor:J})=>{if(z&&!J)return"TextEditor";return null},groupRowEditable:({groupRowEditable:z,cellEditor:J})=>{if(!z)return null;return J?"RowGroupingEdit":["RowGroupingEdit","TextEditor"]},groupRowValueSetter:({groupRowValueSetter:z})=>z?"RowGroupingEdit":null,enableCellChangeFlash:"HighlightChanges",enablePivot:"SharedPivot",enableRowGroup:"SharedRowGrouping",enableValue:"SharedAggregation",filter:({filter:z})=>{if(z&&typeof z!=="string"&&typeof z!=="boolean")return"CustomFilter";if(typeof z==="string")return b1[z]??"ColumnFilter";return"ColumnFilter"},floatingFilter:"ColumnFilter",getQuickFilterText:"QuickFilter",headerTooltip:"Tooltip",headerTooltipValueGetter:"Tooltip",mainMenuItems:"ColumnMenu",menuTabs:(z)=>{let J=["columnsMenuTab","generalMenuTab"];if(z.menuTabs?.some((Q)=>J.includes(Q)))return"ColumnMenu";return null},pivot:"SharedPivot",pivotIndex:"SharedPivot",rowDrag:"RowDrag",rowGroup:"SharedRowGrouping",rowGroupIndex:"SharedRowGrouping",tooltipField:"Tooltip",tooltipValueGetter:"Tooltip",tooltipComponentSelector:"Tooltip",spanRows:"CellSpan",groupHierarchy:"SharedRowGrouping"},QK=()=>{return{autoHeight:{supportedRowModels:["clientSide","serverSide"],validate:(J,{paginationAutoPageSize:Q})=>{if(Q)return"colDef.autoHeight is not supported with paginationAutoPageSize.";return null}},allowFormula:{supportedRowModels:["clientSide"]},cellRendererParams:{validate:(J)=>{if((J.rowGroup!=null||J.rowGroupIndex!=null||J.cellRenderer==="agGroupCellRenderer")&&"checkbox"in J.cellRendererParams)return'Since v33.0, `cellRendererParams.checkbox` has been deprecated. Use `rowSelection.checkboxLocation = "autoGroupColumn"` instead.';return null}},flex:{validate:(J,Q)=>{if(Q.autoSizeStrategy)return"colDef.flex is not supported with gridOptions.autoSizeStrategy";return null}},headerCheckboxSelection:{supportedRowModels:["clientSide","serverSide"],validate:(J,{rowSelection:Q})=>Q==="multiple"?null:"headerCheckboxSelection is only supported with rowSelection=multiple"},headerCheckboxSelectionCurrentPageOnly:{supportedRowModels:["clientSide"],validate:(J,{rowSelection:Q})=>Q==="multiple"?null:"headerCheckboxSelectionCurrentPageOnly is only supported with rowSelection=multiple"},headerCheckboxSelectionFilteredOnly:{supportedRowModels:["clientSide"],validate:(J,{rowSelection:Q})=>Q==="multiple"?null:"headerCheckboxSelectionFilteredOnly is only supported with rowSelection=multiple"},headerValueGetter:{validate:(J)=>{let Q=J.headerValueGetter;if(typeof Q==="function"||typeof Q==="string")return null;return"headerValueGetter must be a function or a valid string expression"}},icons:{validate:({icons:J})=>{if(J){if(J.smallDown)return U4(262);if(J.smallLeft)return U4(263);if(J.smallRight)return U4(264)}return null}},sort:{validate:(J)=>{if(y1(J.sort)||Rz(J.sort))return null;return`sort must be of type (SortDirection | SortDef), currently it is ${typeof J.sort==="object"?JSON.stringify(J.sort):C6(J.sort)}`}},initialSort:{validate:(J)=>{if(y1(J.initialSort)||Rz(J.initialSort))return null;return`initialSort must be of non-null type (SortDirection | SortDef), currently it is ${typeof J.initialSort==="object"?JSON.stringify(J.initialSort):C6(J.initialSort)}`}},sortingOrder:{validate:(J)=>{let Q=J.sortingOrder;if(Array.isArray(Q)&&Q.length>0){let Z=Q.filter(($)=>{return!(y1($)||Rz($))});if(Z.length>0)return`sortingOrder must be an array of type non-null (SortDirection | SortDef)[], incorrect items are: [${Z.map(($)=>typeof $==="string"||$==null?C6($):JSON.stringify($)).join(", ")}]`}else if(!Array.isArray(Q)||!Q.length)return`sortingOrder must be an array with at least one element, currently it is [${Q}]`;return null}},type:{validate:(J)=>{let Q=J.type;if(Q instanceof Array){if(Q.some(($)=>typeof $!=="string"))return"if colDef.type is supplied an array it should be of type 'string[]'";return null}if(typeof Q==="string")return null;return"colDef.type should be of type 'string' | 'string[]'"}},rowSpan:{validate:(J,{suppressRowTransform:Q})=>{if(!Q)return"colDef.rowSpan requires suppressRowTransform to be enabled.";return null}},spanRows:{dependencies:{editable:{required:[!1,void 0]},groupRowEditable:{required:[!1,void 0]},rowDrag:{required:[!1,void 0]},colSpan:{required:[void 0]},rowSpan:{required:[void 0]}},validate:(J,{rowSelection:Q,cellSelection:Z,suppressRowTransform:$,enableCellSpan:X,rowDragEntireRow:Y,enableCellTextSelection:U})=>{if(typeof Q==="object"){if(Q?.mode==="singleRow"&&Q?.enableClickSelection)return"colDef.spanRows is not supported with rowSelection.clickSelection"}if(Z)return"colDef.spanRows is not supported with cellSelection.";if($)return"colDef.spanRows is not supported with suppressRowTransform.";if(!X)return"colDef.spanRows requires enableCellSpan to be enabled.";if(Y)return"colDef.spanRows is not supported with rowDragEntireRow.";if(U)return"colDef.spanRows is not supported with enableCellTextSelection.";return null}},groupHierarchy:{validate(J,{groupHierarchyConfig:Q={}},Z){let $=new Set(["year","quarter","month","formattedMonth","day","hour","minute","second"]),X=[];for(let Y of J.groupHierarchy??[]){if(typeof Y==="object"){Z.validation?.validateColDef(Y);continue}if(!$.has(Y)&&!(Y in Q))X.push(R8(Y))}if(X.length>0){let Y=`The following parts of colDef.groupHierarchy are not recognised: ${X.join(", ")}.`,U=`Choose one of ${[...$].map(R8).join(", ")}, or define your own parts in gridOptions.groupHierarchyConfig.`;return`${Y}
19
+ ${U}`}return null}}}},ZK={headerName:void 0,columnGroupShow:void 0,headerStyle:void 0,headerClass:void 0,toolPanelClass:void 0,headerValueGetter:void 0,pivotKeys:void 0,groupId:void 0,colId:void 0,sort:void 0,initialSort:void 0,field:void 0,type:void 0,cellDataType:void 0,tooltipComponent:void 0,tooltipField:void 0,headerTooltip:void 0,headerTooltipValueGetter:void 0,cellClass:void 0,showRowGroup:void 0,filter:void 0,initialAggFunc:void 0,defaultAggFunc:void 0,aggFunc:void 0,groupRowEditable:void 0,groupRowValueSetter:void 0,pinned:void 0,initialPinned:void 0,chartDataType:void 0,cellAriaRole:void 0,cellEditorPopupPosition:void 0,headerGroupComponent:void 0,headerGroupComponentParams:void 0,cellStyle:void 0,cellRenderer:void 0,cellRendererParams:void 0,cellEditor:void 0,cellEditorParams:void 0,filterParams:void 0,pivotValueColumn:void 0,headerComponent:void 0,headerComponentParams:void 0,floatingFilterComponent:void 0,floatingFilterComponentParams:void 0,tooltipComponentParams:void 0,refData:void 0,columnChooserParams:void 0,children:void 0,sortingOrder:void 0,allowedAggFuncs:void 0,menuTabs:void 0,pivotTotalColumnIds:void 0,cellClassRules:void 0,icons:void 0,sortIndex:void 0,initialSortIndex:void 0,flex:void 0,initialFlex:void 0,width:void 0,initialWidth:void 0,minWidth:void 0,maxWidth:void 0,rowGroupIndex:void 0,initialRowGroupIndex:void 0,pivotIndex:void 0,initialPivotIndex:void 0,suppressColumnsToolPanel:void 0,suppressFiltersToolPanel:void 0,openByDefault:void 0,marryChildren:void 0,suppressStickyLabel:void 0,hide:void 0,initialHide:void 0,rowGroup:void 0,initialRowGroup:void 0,pivot:void 0,initialPivot:void 0,checkboxSelection:void 0,showDisabledCheckboxes:void 0,headerCheckboxSelection:void 0,headerCheckboxSelectionFilteredOnly:void 0,headerCheckboxSelectionCurrentPageOnly:void 0,suppressHeaderMenuButton:void 0,suppressMovable:void 0,lockPosition:void 0,lockVisible:void 0,lockPinned:void 0,unSortIcon:void 0,suppressSizeToFit:void 0,suppressAutoSize:void 0,enableRowGroup:void 0,enablePivot:void 0,enableValue:void 0,editable:void 0,suppressPaste:void 0,suppressNavigable:void 0,enableCellChangeFlash:void 0,rowDrag:void 0,dndSource:void 0,autoHeight:void 0,wrapText:void 0,sortable:void 0,resizable:void 0,singleClickEdit:void 0,floatingFilter:void 0,cellEditorPopup:void 0,suppressFillHandle:void 0,wrapHeaderText:void 0,autoHeaderHeight:void 0,dndSourceOnRowDrag:void 0,valueGetter:void 0,valueSetter:void 0,filterValueGetter:void 0,keyCreator:void 0,valueFormatter:void 0,valueParser:void 0,comparator:void 0,equals:void 0,pivotComparator:void 0,suppressKeyboardEvent:void 0,suppressHeaderKeyboardEvent:void 0,colSpan:void 0,rowSpan:void 0,spanRows:void 0,getQuickFilterText:void 0,onCellValueChanged:void 0,onCellClicked:void 0,onCellDoubleClicked:void 0,onCellContextMenu:void 0,rowDragText:void 0,tooltipValueGetter:void 0,tooltipComponentSelector:void 0,cellRendererSelector:void 0,cellEditorSelector:void 0,suppressSpanHeaderHeight:void 0,useValueFormatterForExport:void 0,useValueParserForImport:void 0,mainMenuItems:void 0,contextMenuItems:void 0,suppressFloatingFilterButton:void 0,suppressHeaderFilterButton:void 0,suppressHeaderContextMenu:void 0,loadingCellRenderer:void 0,loadingCellRendererParams:void 0,loadingCellRendererSelector:void 0,context:void 0,dateComponent:void 0,dateComponentParams:void 0,getFindText:void 0,rowGroupingHierarchy:void 0,groupHierarchy:void 0,allowFormula:void 0,suppressNoteActions:void 0},$K=()=>Object.keys(ZK),A8,XK=()=>A8??(A8=(()=>{let z=$K(),J=zK();return{objectName:"colDef",allProperties:z,allValidNames:MX(z,J),docsUrl:"column-properties/",deprecations:J,validations:QK()}})()),YK=["overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","treeDataChildrenField","treeDataParentIdField","colResizeDefault","tooltipTrigger","noteTrigger","serverSidePivotResultFieldSeparator","columnMenu","tooltipShowMode","invalidEditValueMode","grandTotalRow","themeCssLayer","findSearchValue","styleNonce","renderingMode"],UK=["components","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","dragAndDropImageComponentParams","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultCsvExportParams","defaultExcelExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","overlayComponentParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","activeOverlayParams","popupParent","themeStyleContainer","toolbar","statusBar","chartThemeOverrides","customChartThemes","chartToolPanelsDef","dataTypeDefinitions","advancedFilterParent","advancedFilterBuilderParams","advancedFilterParams","formulaDataSource","formulaFuncs","notesDataSource","initialState","autoSizeStrategy","selectionColumnDef","findOptions","filterHandlers","groupHierarchyConfig"],_K=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector","paginationPanels","suppressOverlays"],DX=["rowHeight","detailRowHeight","rowBuffer","headerHeight","groupHeaderHeight","groupLockGroupColumns","floatingFiltersHeight","pivotHeaderHeight","pivotGroupHeaderHeight","groupDefaultExpanded","pivotDefaultExpanded","viewportRowModelPageSize","viewportRowModelBufferSize","autoSizePadding","maxBlocksInCache","maxConcurrentDatasourceRequests","tooltipShowDelay","tooltipSwitchShowDelay","tooltipHideDelay","noteShowDelay","noteHideDelay","cacheOverflowSize","paginationPageSize","cacheBlockSize","infiniteInitialRowCount","serverSideInitialRowCount","scrollbarWidth","asyncTransactionWaitMillis","blockLoadDebounceMillis","keepDetailRowsCount","undoRedoCellEditingLimit","cellFlashDuration","cellFadeDuration","tabIndex","pivotMaxGeneratedColumns","rowDragInsertDelay"],HK=["theme","rowSelection"],GK=["cellSelection","sideBar","rowNumbers","suppressGroupChangesColumnVisibility","groupAggFiltering","suppressStickyTotalRow","groupHideParentOfSingleChild","enableRowPinning"],RX=["loadThemeGoogleFonts","suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellFocus","suppressHeaderFocus","suppressHorizontalScroll","groupSelectsChildren","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debug","enableBrowserTooltips","enableCellExpressions","groupSuppressBlankHeader","suppressMenuHide","suppressRowDeselection","unSortIcon","suppressMultiSort","alwaysMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","skipHeaderOnAutoSize","suppressColumnMoveAnimation","suppressMoveWhenColumnDragging","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","allowContextMenuWithControlKey","suppressContextMenu","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","alwaysAggregateAtRootLevel","suppressFocusAfterRefresh","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","enableCellSpan","suppressClickEdit","rowDragEntireRow","rowDragManaged","refreshAfterGroupEdit","suppressRowDrag","suppressMoveWhenRowDragging","rowDragMultiRow","enableGroupEdit","embedFullWidthRows","suppressPaginationPanel","groupHideOpenParents","groupHideColumnsUntilExpanded","groupAllowUnbalanced","pagination","paginationAutoPageSize","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","purgeClosedRowNodes","cacheQuickFilter","includeHiddenColumnsInQuickFilter","ensureDomOrder","accentedSort","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","includeHiddenColumnsInAdvancedFilter","suppressMultiRangeSelection","enterNavigatesVerticallyAfterEdit","enterNavigatesVertically","suppressPropertyNamesCheck","rowMultiSelectWithClick","suppressRowHoverHighlight","suppressRowTransform","suppressContentVisibilityAuto","suppressClipboardPaste","suppressLastEmptyLineOnPaste","enableCharts","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering","tooltipMouseTrack","tooltipInteraction","keepDetailRows","paginateChildRows","preventDefaultOnContextMenu","undoRedoCellEditing","allowDragFromColumnsToolPanel","pivotSuppressAutoColumn","suppressExpandablePivotGroups","debounceVerticalScrollbar","detailRowAutoHeight","serverSideSortAllLevels","serverSideEnableClientSideSort","serverSideOnlyRefreshFilteredGroups","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","groupMaintainOrder","columnHoverHighlight","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","suppressGroupRowsSticky","suppressCutToClipboard","rowGroupPanelSuppressSort","allowShowChangeAfterFilter","enableAdvancedFilter","masterDetail","treeData","reactiveCustomComponents","applyQuickFilterBeforePivotOrAgg","suppressServerSideFullWidthLoadingRow","suppressAdvancedFilterEval","loading","maintainColumnOrder","enableStrictPivotColumnOrder","suppressSetFilterByDefault","enableFilterHandlers","suppressStartEditOnTab","hidePaddedHeaderRows","ssrmExpandAllAffectsAllRows","animateColumnResizing"],WK=["doesExternalFilterPass","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","dragAndDropImageComponent","fullWidthCellRenderer","loadingCellRenderer","overlayComponent","loadingOverlayComponent","noRowsOverlayComponent","overlayComponentSelector","activeOverlay","detailCellRenderer","quickFilterParser","quickFilterMatcher","getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getFullRowEditValidationErrors","getContextMenuItems","getMainMenuItems","processRowPostCreate","processCellForClipboard","getGroupRowAgg","isFullWidthRow","sendToClipboard","focusGridInnerElement","navigateToNextHeader","tabToNextHeader","navigateToNextCell","tabToNextCell","tabToNextGridContainer","processCellFromClipboard","getDocument","postProcessPopup","getChildCount","getDataPath","isRowMaster","postSortRows","processHeaderForClipboard","processUnpinnedColumns","processGroupHeaderForClipboard","paginationNumberFormatter","processDataFromClipboard","getServerSideGroupKey","isServerSideGroup","createChartContainer","getChartToolbarItems","fillOperation","isApplyServerSideTransaction","getServerSideGroupLevelParams","isServerSideGroupOpenByDefault","isGroupOpenByDefault","initialGroupOrderComparator","loadingCellRendererSelector","getRowId","chartMenuItems","groupTotalRow","alwaysPassFilter","isRowPinnable","isRowPinned","isRowValidDropPosition"],qK=()=>[..._K,...UK,...YK,...DX,...WK,...RX,...GK,...HK];var BK=()=>({suppressLoadingOverlay:{version:"32",message:"Use `loading`=false instead."},enableFillHandle:{version:"32.2",message:"Use `cellSelection.handle` instead."},enableRangeHandle:{version:"32.2",message:"Use `cellSelection.handle` instead."},enableRangeSelection:{version:"32.2",message:"Use `cellSelection = true` instead."},suppressMultiRangeSelection:{version:"32.2",message:"Use `cellSelection.suppressMultiRanges` instead."},suppressClearOnFillReduction:{version:"32.2",message:"Use `cellSelection.handle.suppressClearOnFillReduction` instead."},fillHandleDirection:{version:"32.2",message:"Use `cellSelection.handle.direction` instead."},fillOperation:{version:"32.2",message:"Use `cellSelection.handle.setFillValue` instead."},suppressRowClickSelection:{version:"32.2",message:"Use `rowSelection.enableClickSelection` instead."},suppressRowDeselection:{version:"32.2",message:"Use `rowSelection.enableClickSelection` instead."},rowMultiSelectWithClick:{version:"32.2",message:"Use `rowSelection.enableSelectionWithoutKeys` instead."},groupSelectsChildren:{version:"32.2",message:'Use `rowSelection.groupSelects = "descendants"` instead.'},groupSelectsFiltered:{version:"32.2",message:'Use `rowSelection.groupSelects = "filteredDescendants"` instead.'},isRowSelectable:{version:"32.2",message:"Use `selectionOptions.isRowSelectable` instead."},suppressCopySingleCellRanges:{version:"32.2",message:"Use `rowSelection.copySelectedRows` instead."},suppressCopyRowsToClipboard:{version:"32.2",message:"Use `rowSelection.copySelectedRows` instead."},onRangeSelectionChanged:{version:"32.2",message:"Use `onCellSelectionChanged` instead."},onRangeDeleteStart:{version:"32.2",message:"Use `onCellSelectionDeleteStart` instead."},onRangeDeleteEnd:{version:"32.2",message:"Use `onCellSelectionDeleteEnd` instead."},suppressBrowserResizeObserver:{version:"32.2",message:"The grid always uses the browser's ResizeObserver, this grid option has no effect."},onColumnEverythingChanged:{version:"32.2",message:"Either use `onDisplayedColumnsChanged` which is fired at the same time, or use one of the more specific column events."},groupRemoveSingleChildren:{version:"33",message:"Use `groupHideParentOfSingleChild` instead."},groupRemoveLowestSingleChildren:{version:"33",message:'Use `groupHideParentOfSingleChild: "leafGroupsOnly"` instead.'},suppressRowGroupHidesColumns:{version:"33",message:'Use `suppressGroupChangesColumnVisibility: "suppressHideOnGroup"` instead.'},suppressMakeColumnVisibleAfterUnGroup:{version:"33",message:'Use `suppressGroupChangesColumnVisibility: "suppressShowOnUngroup"` instead.'},unSortIcon:{version:"33",message:"Use `defaultColDef.unSortIcon` instead."},sortingOrder:{version:"33",message:"Use `defaultColDef.sortingOrder` instead."},suppressPropertyNamesCheck:{version:"33",message:"`gridOptions` and `columnDefs` both have a `context` property that should be used for arbitrary user data. This means that column definitions and gridOptions should only contain valid properties making this property redundant."},suppressAdvancedFilterEval:{version:"34",message:"Advanced filter no longer uses function evaluation, so this option has no effect."}});function v4(z,J,Q){if(typeof J==="number"||J==null){if(J==null)return null;return J>=Q?null:`${z}: value should be greater than or equal to ${Q}`}return`${z}: value should be a number`}var EK={alignedGrids:"AlignedGrids",allowContextMenuWithControlKey:"ContextMenu",autoSizeStrategy:"ColumnAutoSize",cellSelection:"CellSelection",columnHoverHighlight:"ColumnHover",datasource:"InfiniteRowModel",doesExternalFilterPass:"ExternalFilter",editType:"EditCore",invalidEditValueMode:"EditCore",enableAdvancedFilter:"AdvancedFilter",enableCellSpan:"CellSpan",enableCharts:"IntegratedCharts",enableRangeSelection:"CellSelection",enableRowPinning:"PinnedRow",findSearchValue:"Find",getFullRowEditValidationErrors:"EditCore",getContextMenuItems:"ContextMenu",getLocaleText:"Locale",getMainMenuItems:"ColumnMenu",getRowClass:"RowStyle",getRowStyle:"RowStyle",groupTotalRow:(z,J)=>J.rowModelType==="serverSide"?"ServerSideRowModel":"RowGrouping",grandTotalRow:["CsrmHierarchy","ServerSideRowModel"],initialState:"GridState",isExternalFilterPresent:"ExternalFilter",isRowPinnable:"PinnedRow",isRowPinned:"PinnedRow",localeText:"Locale",masterDetail:(z,J)=>J.rowModelType==="serverSide"?"ServerSideRowModel":"MasterDetail",notesDataSource:"Notes",pagination:"Pagination",pinnedBottomRowData:"PinnedRow",pinnedTopRowData:"PinnedRow",pivotMode:(z,J)=>J.rowModelType==="serverSide"?"ServerSideRowModel":"Pivot",pivotPanelShow:"RowGroupingPanel",quickFilterText:"QuickFilter",rowClass:"RowStyle",rowClassRules:"RowStyle",rowData:"ClientSideRowModel",rowDragManaged:"RowDrag",refreshAfterGroupEdit:["RowGrouping","TreeData"],rowGroupPanelShow:"RowGroupingPanel",rowNumbers:"RowNumbers",rowSelection:(z,J)=>J.rowModelType==="serverSide"?"ServerSideRowModel":"RowSelection",rowStyle:"RowStyle",serverSideDatasource:"ServerSideRowModel",sideBar:"SideBar",statusBar:"StatusBar",treeData:(z,J)=>J.rowModelType==="serverSide"?"ServerSideRowModel":"TreeData",toolbar:"Toolbar",undoRedoCellEditing:"UndoRedoEdit",valueCache:"ValueCache",viewportDatasource:"ViewportRowModel"},KK=()=>{let z={autoSizePadding:{validate({autoSizePadding:Q}){return v4("autoSizePadding",Q,0)}},cacheBlockSize:{supportedRowModels:["serverSide","infinite"],validate({cacheBlockSize:Q}){return v4("cacheBlockSize",Q,1)}},cacheOverflowSize:{validate({cacheOverflowSize:Q}){return v4("cacheOverflowSize",Q,1)}},datasource:{supportedRowModels:["infinite"]},domLayout:{validate:(Q)=>{let Z=Q.domLayout,$=["autoHeight","normal","print"];if(Z&&!$.includes(Z))return`domLayout must be one of [${$.join()}], currently it's ${Z}`;return null}},enableFillHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableRangeHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableCellSpan:{supportedRowModels:["clientSide","serverSide"]},enableRangeSelection:{dependencies:{rowDragEntireRow:{required:[!1,void 0]}}},enableRowPinning:{supportedRowModels:["clientSide"],validate({enableRowPinning:Q,pinnedTopRowData:Z,pinnedBottomRowData:$}){if(Q&&(Z||$))return"Manual row pinning cannot be used together with pinned row data. Either set `enableRowPinning` to `false`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.";return null}},isRowPinnable:{supportedRowModels:["clientSide"],validate({enableRowPinning:Q,isRowPinnable:Z,pinnedTopRowData:$,pinnedBottomRowData:X}){if(Z&&($||X))return"Manual row pinning cannot be used together with pinned row data. Either remove `isRowPinnable`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.";if(!Q&&Z)return"`isRowPinnable` requires `enableRowPinning` to be set.";return null}},isRowPinned:{supportedRowModels:["clientSide"],validate({enableRowPinning:Q,isRowPinned:Z,pinnedTopRowData:$,pinnedBottomRowData:X}){if(Z&&($||X))return"Manual row pinning cannot be used together with pinned row data. Either remove `isRowPinned`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.";if(!Q&&Z)return"`isRowPinned` requires `enableRowPinning` to be set.";return null}},groupDefaultExpanded:{supportedRowModels:["clientSide"]},groupHideColumnsUntilExpanded:{supportedRowModels:["clientSide"],validate({groupHideColumnsUntilExpanded:Q,groupHideOpenParents:Z,groupDisplayType:$}){if(Q&&!Z&&$!=="multipleColumns")return"`groupHideColumnsUntilExpanded = true` requires either `groupDisplayType = 'multipleColumns'` or `groupHideOpenParents = true`";return null}},groupHideOpenParents:{supportedRowModels:["clientSide","serverSide"],dependencies:{groupTotalRow:{required:[void 0,"bottom"]},groupDisplayType:{required:[void 0,"multipleColumns"]},treeData:{required:[void 0,!1],reason:"Tree Data has values at the group level so it doesn't make sense to hide them."}}},groupHideParentOfSingleChild:{dependencies:{groupHideOpenParents:{required:[void 0,!1]}}},groupRemoveLowestSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveSingleChildren:{required:[void 0,!1]}}},groupRemoveSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveLowestSingleChildren:{required:[void 0,!1]}}},groupSelectsChildren:{dependencies:{rowSelection:{required:["multiple"]}}},groupHierarchyConfig:{validate({groupHierarchyConfig:Q={}},Z,$){for(let X of Object.keys(Q))$.validation?.validateColDef(Q[X]);return null}},icons:{validate:({icons:Q})=>{if(Q){if(Q.smallDown)return U4(262);if(Q.smallLeft)return U4(263);if(Q.smallRight)return U4(264)}return null}},infiniteInitialRowCount:{validate({infiniteInitialRowCount:Q}){return v4("infiniteInitialRowCount",Q,1)}},initialGroupOrderComparator:{supportedRowModels:["clientSide"]},ssrmExpandAllAffectsAllRows:{validate:(Q)=>{if(typeof Q.ssrmExpandAllAffectsAllRows==="boolean"){if(Q.rowModelType!=="serverSide")return"'ssrmExpandAllAffectsAllRows' is only supported with the Server Side Row Model.";if(Q.ssrmExpandAllAffectsAllRows&&typeof Q.getRowId!=="function")return"'getRowId' callback must be provided for Server Side Row Model grouping to work correctly."}return null}},keepDetailRowsCount:{validate({keepDetailRowsCount:Q}){return v4("keepDetailRowsCount",Q,1)}},paginationPageSize:{validate({paginationPageSize:Q}){return v4("paginationPageSize",Q,1)}},paginationPageSizeSelector:{validate:(Q)=>{let Z=Q.paginationPageSizeSelector;if(typeof Z==="boolean"||Z==null)return null;if(!Z.length)return`'paginationPageSizeSelector' cannot be an empty array.
20
+ If you want to hide the page size selector, set paginationPageSizeSelector to false.`;return null}},paginationPanels:{validate:({paginationPanels:Q})=>{let Z=new Set(["pageSize","rowSummary","pageSummary"]);if(Q!=null&&(!Array.isArray(Q)||Q.some(($)=>!Z.has($))))return"'paginationPanels' expects an array of panel names: ['pageSize', 'rowSummary', 'pageSummary']";return null}},pivotMode:{dependencies:{treeData:{required:[!1,void 0],reason:"Pivot Mode is not supported with Tree Data."}}},quickFilterText:{supportedRowModels:["clientSide"]},rowBuffer:{validate({rowBuffer:Q}){return v4("rowBuffer",Q,0)}},rowClass:{validate:(Q)=>{if(typeof Q.rowClass==="function")return"rowClass should not be a function, please use getRowClass instead";return null}},rowData:{supportedRowModels:["clientSide"]},rowDragManaged:{supportedRowModels:["clientSide"],dependencies:{pagination:{required:[!1,void 0]}}},rowSelection:{validate({rowSelection:Q}){if(Q&&typeof Q==="string")return'As of version 32.2.1, using `rowSelection` with the values "single" or "multiple" has been deprecated. Use the object value instead.';if(Q&&typeof Q!=="object")return"Expected `RowSelectionOptions` object for the `rowSelection` property.";if(Q&&Q.mode!=="multiRow"&&Q.mode!=="singleRow")return`Selection mode "${Q.mode}" is invalid. Use one of 'singleRow' or 'multiRow'.`;return null}},rowStyle:{validate:(Q)=>{let Z=Q.rowStyle;if(Z&&typeof Z==="function")return"rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead";return null}},notesDataSource:{validate:({getRowId:Q})=>{if(!Q)return"'getRowId' callback must be provided for Notes to work correctly.";return null}},noteHideDelay:{validate:(Q)=>{if(Q.noteHideDelay!=null&&Q.noteHideDelay<0)return"noteHideDelay should not be lower than 0";return null}},noteShowDelay:{validate:(Q)=>{if(Q.noteShowDelay!=null&&Q.noteShowDelay<0)return"noteShowDelay should not be lower than 0";return null}},serverSideDatasource:{supportedRowModels:["serverSide"]},serverSideInitialRowCount:{supportedRowModels:["serverSide"],validate({serverSideInitialRowCount:Q}){return v4("serverSideInitialRowCount",Q,1)}},serverSideOnlyRefreshFilteredGroups:{supportedRowModels:["serverSide"]},serverSideSortAllLevels:{supportedRowModels:["serverSide"]},sortingOrder:{validate:(Q)=>{let Z=Q.sortingOrder;if(Array.isArray(Z)&&Z.length>0){let $=Z.filter((X)=>!$4(X));if($.length>0)return`sortingOrder must be an array of type (SortDirection | SortDef)[], incorrect items are: ${$.map((X)=>typeof X==="string"||X==null?C6(X):JSON.stringify(X))}]`}else if(!Array.isArray(Z)||!Z.length)return`sortingOrder must be an array with at least one element, currently it's ${Z}`;return null}},tooltipHideDelay:{validate:(Q)=>{if(Q.tooltipHideDelay&&Q.tooltipHideDelay<0)return"tooltipHideDelay should not be lower than 0";return null}},tooltipShowDelay:{validate:(Q)=>{if(Q.tooltipShowDelay&&Q.tooltipShowDelay<0)return"tooltipShowDelay should not be lower than 0";return null}},tooltipSwitchShowDelay:{validate:(Q)=>{if(Q.tooltipSwitchShowDelay&&Q.tooltipSwitchShowDelay<0)return"tooltipSwitchShowDelay should not be lower than 0";return null}},treeData:{supportedRowModels:["clientSide","serverSide"],validate:(Q)=>{let Z=Q.rowModelType??"clientSide";switch(Z){case"clientSide":{let{treeDataChildrenField:$,treeDataParentIdField:X,getDataPath:Y,getRowId:U}=Q;if(!$&&!X&&!Y)return"treeData requires either 'treeDataChildrenField' or 'treeDataParentIdField' or 'getDataPath' in the clientSide row model.";if($){if(Y)return"Cannot use both 'treeDataChildrenField' and 'getDataPath' at the same time.";if(X)return"Cannot use both 'treeDataChildrenField' and 'treeDataParentIdField' at the same time."}if(X){if(!U)return"getRowId callback not provided, tree data with parent id cannot be built.";if(Y)return"Cannot use both 'treeDataParentIdField' and 'getDataPath' at the same time."}return null}case"serverSide":{let $=`treeData requires 'isServerSideGroup' and 'getServerSideGroupKey' in the ${Z} row model.`;return Q.isServerSideGroup&&Q.getServerSideGroupKey?null:$}}return null}},viewportDatasource:{supportedRowModels:["viewport"]},viewportRowModelBufferSize:{validate({viewportRowModelBufferSize:Q}){return v4("viewportRowModelBufferSize",Q,0)}},viewportRowModelPageSize:{validate({viewportRowModelPageSize:Q}){return v4("viewportRowModelPageSize",Q,1)}},rowDragEntireRow:{dependencies:{cellSelection:{required:[void 0]}}},autoGroupColumnDef:{validate({autoGroupColumnDef:Q,showOpenedGroup:Z}){if(Q?.field&&Z)return"autoGroupColumnDef.field and showOpenedGroup are not supported when used together.";if(Q?.valueGetter&&Z)return"autoGroupColumnDef.valueGetter and showOpenedGroup are not supported when used together.";return null}},renderingMode:{validate:(Q)=>{let Z=Q.renderingMode,$=["default","legacy"];if(Z&&!$.includes(Z))return`renderingMode must be one of [${$.join()}], currently it's ${Z}`;return null}},autoSizeStrategy:{validate:({autoSizeStrategy:Q})=>{if(!Q)return null;let Z=["fitCellContents","fitGridWidth","fitProvidedWidth"],$=Q.type;if($!=="fitCellContents"&&$!=="fitGridWidth"&&$!=="fitProvidedWidth")return`Invalid Auto-size strategy. \`autoSizeStrategy\` must be one of ${Z.map((X)=>'"'+X+'"').join(", ")}, currently it's ${$}`;if($==="fitProvidedWidth"&&typeof Q.width!="number")return`When using the 'fitProvidedWidth' auto-size strategy, must provide a numeric \`width\`. You provided ${Q.width}`;return null}}},J={};for(let Q of RX)J[Q]={expectedType:"boolean"};for(let Q of DX)J[Q]={expectedType:"number"};return M0(J,z),J},j8,FK=()=>j8??(j8=(()=>{let z=[...qK(),...Object.values(T5)],J=BK(),Q=["api"];return{objectName:"gridOptions",allProperties:z,allValidNames:MX(z,J,Q),propertyExceptions:Q,docsUrl:"grid-options/",deprecations:J,validations:KK()}})()),LK=0,MK=0,V8="__ag_grid_instance",DK=class extends j{constructor(){super(...arguments);this.beanName="gos",this.domDataKey="__AG_"+Math.random().toString(),this.instanceId=MK++,this.gridReadyFired=!1,this.queueEvents=[],this.propEventSvc=new P4,this.globalEventHandlerFactory=(z)=>{return(J,Q)=>{if(!this.isAlive())return;let Z=x6.has(J);if(Z&&!z||!Z&&z)return;if(!RK(J))return;let $=(X,Y)=>{let U=T5[X],_=this.gridOptions[U];if(typeof _==="function")this.beans.frameworkOverrides.wrapOutgoing(()=>_(Y))};if(this.gridReadyFired)$(J,Q);else if(J==="gridReady"){$(J,Q),this.gridReadyFired=!0;for(let X of this.queueEvents)$(X.eventName,X.event);this.queueEvents=[]}else this.queueEvents.push({eventName:J,event:Q})}}}wireBeans(z){this.gridOptions=z.gridOptions,this.validation=z.validation,this.api=z.gridApi,this.gridId=z.context.getId()}get gridOptionsContext(){return this.gridOptions.context}postConstruct(){this.validateGridOptions(this.gridOptions),this.eventSvc.addGlobalListener(this.globalEventHandlerFactory().bind(this),!0),this.eventSvc.addGlobalListener(this.globalEventHandlerFactory(!0).bind(this),!1),this.propEventSvc.setFrameworkOverrides(this.beans.frameworkOverrides),this.addManagedEventListeners({gridOptionsChanged:({options:z})=>{this.updateGridOptions({options:z,force:!0,source:"optionsUpdated"})}})}destroy(){super.destroy(),this.queueEvents=[]}get(z){return this.gridOptions[z]??TH[z]}getCallback(z){return this.mergeGridCommonParams(this.gridOptions[z])}exists(z){return I(this.gridOptions[z])}mergeGridCommonParams(z){if(z)return(Q)=>{return z(this.addCommon(Q))};return z}updateGridOptions({options:z,force:J,source:Q="api"}){let Z={id:LK++,properties:[]},$=[],{gridOptions:X,validation:Y}=this;for(let U of Object.keys(z)){let _=hZ.applyGlobalGridOption(U,z[U]);Y?.warnOnInitialPropertyUpdate(Q,U);let H=J||typeof _==="object"&&Q==="api",G=X[U];if(H||G!==_){X[U]=_;let W={type:U,currentValue:_,previousValue:G,changeSet:Z,source:Q};$.push(W)}}this.validateGridOptions(this.gridOptions),Z.properties=$.map((U)=>U.type);for(let U of $)I2(this,`Updated property ${U.type} from`,U.previousValue," to ",U.currentValue),this.propEventSvc.dispatchEvent(U)}addPropertyEventListener(z,J){this.propEventSvc.addEventListener(z,J)}removePropertyEventListener(z,J){this.propEventSvc.removeEventListener(z,J)}getDomDataKey(){return this.domDataKey}addCommon(z){return z.api=this.api,z.context=this.gridOptionsContext,z}validateOptions(z,J){for(let Q of Object.keys(z)){let Z=z[Q];if(Z==null||Z===!1)continue;let $=J[Q];if(typeof $==="function")$=$(z,this.gridOptions,this.beans);if($)this.assertModuleRegistered($,Q)}}validateGridOptions(z){this.validateOptions(z,EK),this.validation?.processGridOptions(z)}validateColDef(z,J,Q){if(Q||!this.beans.dataTypeSvc?.isColPendingInference(J))this.validateOptions(z,JK),this.validation?.validateColDef(z)}assertModuleRegistered(z,J){let Q=Array.isArray(z)?z.some((Z)=>this.isModuleRegistered(Z)):this.isModuleRegistered(z);if(!Q)r(200,{...this.getModuleErrorParams(),moduleName:z,reasonOrId:J});return Q}getModuleErrorParams(){return{gridId:this.gridId,gridScoped:uZ(),rowModelType:this.get("rowModelType"),isUmd:mZ(),usesAgGridProvider:this.beans.frameworkOverrides.usesAgGridProvider??!1}}isModuleRegistered(z){return aQ(z,this.gridId,this.get("rowModelType"))}setInstanceDomData(z){z[V8]=this.instanceId}isElementInThisInstance(z){let J=z;while(J){let Q=J[V8];if(I(Q))return Q===this.instanceId;J=J.parentElement}return!1}};function RK(z){return!!T5[z]}var AK=class extends j{constructor(z,J){super();this.column=z,this.eGui=J,this.lastMovingChanged=0}postConstruct(){this.addManagedElementListeners(this.eGui,{click:(z)=>z&&this.onClick(z)}),this.addManagedListeners(this.column,{movingChanged:()=>{this.lastMovingChanged=Date.now()}})}onClick(z){let{sortSvc:J,rangeSvc:Q,gos:Z}=this.beans;if(!(e4(Z)?z.altKey:!0))Q?.handleColumnSelection(this.column,z);else if(this.column.isSortable()){let X=this.column.isMoving(),U=Date.now()-this.lastMovingChanged<50;if(!(X||U))J?.progressSortFromEvent(this.column,z)}}};function jK(z,J){let Q={"aria-hidden":"true"};return{tag:"div",cls:"ag-cell-label-container",role:"presentation",children:[{tag:"span",ref:"eMenu",cls:"ag-header-icon ag-header-cell-menu-button",attrs:Q},{tag:"span",ref:"eFilterButton",cls:"ag-header-icon ag-header-cell-filter-button",attrs:Q},{tag:"div",ref:"eLabel",cls:"ag-header-cell-label",role:"presentation",children:[z?{tag:"span",ref:"eColRef",cls:"ag-header-col-ref"}:null,{tag:"span",ref:"eText",cls:"ag-header-cell-text"},{tag:"span",ref:"eFilter",cls:"ag-header-icon ag-header-label-icon ag-filter-icon",attrs:Q},J?{tag:"ag-sort-indicator",ref:"eSortIndicator"}:null]}]}}var VK=class extends y{constructor(){super(...arguments);this.eFilter=P,this.eFilterButton=P,this.eSortIndicator=P,this.eMenu=P,this.eLabel=P,this.eText=P,this.eColRef=P,this.eSortOrder=P,this.eSortAsc=P,this.eSortDesc=P,this.eSortMixed=P,this.eSortNone=P,this.eSortAbsoluteAsc=P,this.eSortAbsoluteDesc=P,this.isLoadingInnerComponent=!1}refresh(z){let J=this.params;if(this.params=z,this.workOutTemplate(z,!!this.beans?.sortSvc)!=this.currentTemplate||this.workOutShowMenu()!=this.currentShowMenu||z.enableSorting!=this.currentSort||z.column.formulaRef!=this.currentRef||this.currentSuppressMenuHide!=null&&this.shouldSuppressMenuHide()!=this.currentSuppressMenuHide||J.enableFilterButton!=z.enableFilterButton||J.enableFilterIcon!=z.enableFilterIcon)return!1;if(this.innerHeaderComponent){let Q={...z};M0(Q,z.innerHeaderComponentParams),this.innerHeaderComponent.refresh?.(Q)}else this.setDisplayName(z);return!0}workOutTemplate(z,J){let{formula:Q}=this.beans,Z=z.template;if(Z)return Z?.trim?Z.trim():Z;return jK(!!Q?.active,J)}init(z){this.params=z;let{sortSvc:J,touchSvc:Q,rowNumbersSvc:Z,userCompFactory:$}=this.beans,X=J?.getSortIndicatorSelector();if(this.currentTemplate=this.workOutTemplate(z,!!X),this.setTemplate(this.currentTemplate,X?[X]:void 0),this.eLabel)this.mouseListener??(this.mouseListener=this.createManagedBean(new AK(z.column,this.eLabel)));Q?.setupForHeader(this),this.setMenu(),this.setupSort(),this.setupColumnRefIndicator(),Z?.setupForHeader(this),this.setupFilterIcon(),this.setupFilterButton(),this.workOutInnerHeaderComponent($,z),this.setDisplayName(z)}workOutInnerHeaderComponent(z,J){let Q=hG(z,J,J);if(!Q)return;this.isLoadingInnerComponent=!0,Q.newAgStackInstance().then((Z)=>{if(this.isLoadingInnerComponent=!1,!Z)return;if(this.isAlive()){if(this.innerHeaderComponent=Z,this.eText)this.eText.appendChild(Z.getGui())}else this.destroyBean(Z)})}setDisplayName(z){let{displayName:J}=z,Q=this.currentDisplayName;if(this.currentDisplayName=J,!this.eText||Q===J||this.innerHeaderComponent||this.isLoadingInnerComponent)return;this.eText.textContent=g2(J)}addInIcon(z,J,Q){let Z=h(z,this.beans,Q);if(Z)J.appendChild(Z)}workOutShowMenu(){return this.params.enableMenu&&!!this.beans.menuSvc?.isHeaderMenuButtonEnabled()}shouldSuppressMenuHide(){return!!this.beans.menuSvc?.isHeaderMenuButtonAlwaysShowEnabled()}setMenu(){if(!this.eMenu)return;if(this.currentShowMenu=this.workOutShowMenu(),!this.currentShowMenu){P0(this.eMenu),this.eMenu=void 0;return}let{gos:z,eMenu:J,params:Q}=this,Z=F0(z);this.addInIcon(Z?"menu":"menuAlt",J,Q.column),J.classList.toggle("ag-header-menu-icon",!Z);let $=this.shouldSuppressMenuHide();this.currentSuppressMenuHide=$,this.addManagedElementListeners(J,{click:()=>this.showColumnMenu(this.eMenu)}),this.toggleMenuAlwaysShow($)}toggleMenuAlwaysShow(z){this.eMenu?.classList.toggle("ag-header-menu-always-show",z)}showColumnMenu(z){let{currentSuppressMenuHide:J,params:Q}=this;if(!J)this.toggleMenuAlwaysShow(!0);Q.showColumnMenu(z,()=>{if(!J)this.toggleMenuAlwaysShow(!1)})}onMenuKeyboardShortcut(z){let{params:J,gos:Q,beans:Z,eMenu:$,eFilterButton:X}=this,Y=J.column,U=F0(Q);if(z&&!U){if(Z.menuSvc?.isFilterMenuInHeaderEnabled(Y))return J.showFilter(X??$??this.getGui()),!0}else if(J.enableMenu)return this.showColumnMenu($??X??this.getGui()),!0;return!1}setupSort(){let{sortSvc:z}=this.beans;if(!z)return;let{enableSorting:J,column:Q}=this.params;if(this.currentSort=J,!this.eSortIndicator){this.eSortIndicator=this.createBean(z.createSortIndicator(!0));let{eSortIndicator:Z,eSortOrder:$,eSortAsc:X,eSortDesc:Y,eSortMixed:U,eSortNone:_,eSortAbsoluteAsc:H,eSortAbsoluteDesc:G}=this;Z.attachCustomElements($,X,Y,U,_,H,G)}if(this.eSortIndicator.setupSort(Q),!this.currentSort)return;z.setupHeader(this,Q)}setupColumnRefIndicator(){let{eColRef:z,beans:{editModelSvc:J},params:Q}=this;if(!z)return;this.currentRef=Q.column.formulaRef,z.textContent=this.currentRef,x(z,!1),this.addManagedEventListeners({cellEditingStarted:()=>{let Z=J?.getEditPositions(),$=!!this.currentRef&&!!Z?.some((X)=>X.column.isAllowFormula());x(z,$)},cellEditingStopped:()=>{x(z,!1)}})}setupFilterIcon(){let{eFilter:z,params:J}=this;if(!z)return;let Q=()=>{let Z=J.column.isFilterActive();x(z,Z,{skipAriaHidden:!0})};this.configureFilter(J.enableFilterIcon,z,Q,"filterActive")}setupFilterButton(){let{eFilterButton:z,params:J}=this;if(!z)return;if(this.configureFilter(J.enableFilterButton,z,this.onFilterChangedButton.bind(this),"filter"))this.addManagedElementListeners(z,{click:()=>J.showFilter(z)});else this.eFilterButton=void 0}configureFilter(z,J,Q,Z){if(!z)return P0(J),!1;let $=this.params.column;return this.addInIcon(Z,J,$),this.addManagedListeners($,{filterChanged:Q}),Q(),!0}onFilterChangedButton(){let z=this.params.column.isFilterActive();this.eFilterButton.classList.toggle("ag-filter-active",z)}getAnchorElementForMenu(z){let{eFilterButton:J,eMenu:Q}=this;if(z)return J??Q??this.getGui();return Q??J??this.getGui()}destroy(){super.destroy(),this.innerHeaderComponent=this.destroyBean(this.innerHeaderComponent),this.mouseListener=this.destroyBean(this.mouseListener)}},OK=class extends j{constructor(z,J){super();this.eLabel=z,this.columnGroup=J,this.isSticky=!1,this.left=null,this.right=null}postConstruct(){let{columnGroup:z,beans:J}=this,{ctrlsSvc:Q}=J;Q.whenReady(this,()=>{let Z=this.refreshPosition.bind(this);if(z.getPinned()==null)this.addManagedEventListeners({bodyScroll:($)=>{if($.direction==="horizontal")this.updateSticky($.left)}});this.addManagedListeners(z,{leftChanged:Z,displayedChildrenChanged:Z}),this.addManagedEventListeners({columnResized:Z}),this.refreshPosition()})}refreshPosition(){let{columnGroup:z,beans:J}=this,Q=z.getLeft(),Z=z.getActualWidth();if(Q==null||Z===0){this.left=null,this.right=null,this.setSticky(!1);return}this.left=Q,this.right=Q+Z;let $=J.colViewport.getScrollPosition();if($!=null)this.updateSticky($)}updateSticky(z){let{beans:J,left:Q,right:Z}=this;if(Q==null||Z==null){this.setSticky(!1);return}let{gos:$,visibleCols:X}=J,U=$.get("enableRtl")?X.bodyWidth-z:z;this.setSticky(Q<U&&Z>U)}setSticky(z){let{isSticky:J,eLabel:Q}=this;if(J===z)return;this.isSticky=z,Q.classList.toggle("ag-sticky-label",z)}},PK={tag:"div",cls:"ag-header-group-cell-label",role:"presentation",children:[{tag:"span",ref:"agLabel",cls:"ag-header-group-text",role:"presentation"},{tag:"span",ref:"agOpened",cls:"ag-header-icon ag-header-expand-icon ag-header-expand-icon-expanded"},{tag:"span",ref:"agClosed",cls:"ag-header-icon ag-header-expand-icon ag-header-expand-icon-collapsed"}]},TK=class extends y{constructor(){super(PK);this.agOpened=P,this.agClosed=P,this.agLabel=P,this.isLoadingInnerComponent=!1}init(z){let{userCompFactory:J,touchSvc:Q}=this.beans;this.params=z,this.checkWarnings(),this.workOutInnerHeaderGroupComponent(J,z),this.setupLabel(z),this.addGroupExpandIcon(z),this.setupExpandIcons(),Q?.setupForHeaderGroup(this)}checkWarnings(){if(this.params.template)V(89)}workOutInnerHeaderGroupComponent(z,J){let Q=mG(z,J,J);if(!Q)return;this.isLoadingInnerComponent=!0,Q.newAgStackInstance().then((Z)=>{if(this.isLoadingInnerComponent=!1,!Z)return;if(this.isAlive())this.innerHeaderGroupComponent=Z,this.agLabel.appendChild(Z.getGui());else this.destroyBean(Z)})}setupExpandIcons(){let{agOpened:z,agClosed:J,params:{columnGroup:Q},beans:{colGroupSvc:Z}}=this;this.addInIcon("columnGroupOpened",z),this.addInIcon("columnGroupClosed",J);let $=(_)=>{if(_4(_))return;let H=!Q.isExpanded();Z.setColumnGroupOpened(Q.getProvidedColumnGroup(),H,"uiColumnExpanded")};this.addTouchAndClickListeners(J,$),this.addTouchAndClickListeners(z,$);let X=(_)=>{a0(_)};this.addManagedElementListeners(J,{dblclick:X}),this.addManagedElementListeners(z,{dblclick:X}),this.addManagedElementListeners(this.getGui(),{dblclick:$}),this.updateIconVisibility();let Y=Q.getProvidedColumnGroup(),U=this.updateIconVisibility.bind(this);this.addManagedListeners(Y,{expandedChanged:U,expandableChanged:U})}addTouchAndClickListeners(z,J){this.beans.touchSvc?.setupForHeaderGroupElement(this,z,J),this.addManagedElementListeners(z,{click:J})}updateIconVisibility(){let{agOpened:z,agClosed:J,params:{columnGroup:Q}}=this;if(Q.isExpandable()){let Z=Q.isExpanded();x(z,Z),x(J,!Z)}else x(z,!1),x(J,!1)}addInIcon(z,J){let Q=h(z,this.beans,null);if(Q)J.appendChild(Q)}addGroupExpandIcon(z){if(!z.columnGroup.isExpandable()){let{agOpened:J,agClosed:Q}=this;x(J,!1),x(Q,!1)}}setupLabel(z){let{displayName:J,columnGroup:Q}=z,{innerHeaderGroupComponent:Z,isLoadingInnerComponent:$}=this,X=Z||$;if(I(J)&&!X)this.agLabel.textContent=g2(J);if(!Q.getColGroupDef()?.suppressStickyLabel)this.createManagedBean(new OK(this.getGui(),Q))}destroy(){if(super.destroy(),this.innerHeaderGroupComponent)this.destroyBean(this.innerHeaderGroupComponent),this.innerHeaderGroupComponent=void 0}},SK={moduleName:"ColumnHeaderComp",version:p,userComponents:{agColumnHeader:VK},icons:{menu:"menu",menuAlt:"menu-alt"}},IK={moduleName:"ColumnGroupHeaderComp",version:p,userComponents:{agColumnGroupHeader:TK},icons:{columnGroupOpened:"expanded",columnGroupClosed:"contracted"}},fK=class extends j{constructor(){super(...arguments);this.beanName="animationFrameSvc",this.p1={list:[],sorted:!1},this.p2={list:[],sorted:!1},this.f1={list:[],sorted:!1},this.destroyTasks=[],this.ticking=!1,this.scrollGoingDown=!0,this.lastScrollTop=0,this.taskCount=0}setScrollTop(z){if(this.scrollGoingDown=z>=this.lastScrollTop,z===0)this.scrollGoingDown=!0;this.lastScrollTop=z}postConstruct(){this.active=!this.gos.get("suppressAnimationFrame"),this.batchFrameworkComps=this.beans.frameworkOverrides.batchFrameworkComps}verify(){if(this.active===!1)V(92)}createTask(z,J,Q,Z,$=!1){this.verify();let X=Q;if(Z&&this.batchFrameworkComps)X="f1";let Y={task:z,index:J,createOrder:++this.taskCount,deferred:$};this.addTaskToList(this[X],Y),this.schedule()}addTaskToList(z,J){z.list.push(J),z.sorted=!1}sortTaskList(z){if(z.sorted)return;let J=this.scrollGoingDown?1:-1;z.list.sort((Q,Z)=>{if(Q.deferred!==Z.deferred)return Q.deferred?-1:1;if(Q.index!==Z.index)return J*(Z.index-Q.index);return Z.createOrder-Q.createOrder}),z.sorted=!0}addDestroyTask(z){this.verify(),this.destroyTasks.push(z),this.schedule()}executeFrame(z){let{p1:J,p2:Q,f1:Z,destroyTasks:$,beans:X}=this,{ctrlsSvc:Y,frameworkOverrides:U}=X,_=J.list,H=Q.list,G=Z.list,W=Date.now(),q=0,B=z<=0,E=Y.getScrollFeature();while(B||q<z){if(!E.scrollGridIfNeeded()){let F;if(_.length)this.sortTaskList(J),F=_.pop().task;else if(H.length)this.sortTaskList(Q),F=H.pop().task;else if(G.length)U.wrapOutgoing(()=>{while(B||q<z){if(!E.scrollGridIfNeeded())if(G.length)this.sortTaskList(Z),F=G.pop().task,F();else break;else break;q=Date.now()-W}}),F=()=>{};else if($.length)F=$.pop();else break;F()}q=Date.now()-W}if(_.length||H.length||G.length||$.length)this.requestFrame();else this.ticking=!1}flushAllFrames(){if(!this.active)return;this.executeFrame(-1)}schedule(){if(!this.active)return;if(!this.ticking)this.ticking=!0,this.requestFrame()}requestFrame(){let z=this.executeFrame.bind(this,60);I4(this.beans,z)}isQueueEmpty(){return!this.ticking}},kK={moduleName:"AnimationFrame",version:p,beans:[fK]},CK=class extends j{constructor(){super(...arguments);this.beanName="iconSvc"}createIconNoSpan(z,J){return h(z,this.beans,J?.column)}},vK=(z,J,Q)=>J||z&&Q,NK=class extends j{constructor(){super(...arguments);this.beanName="touchSvc"}mockBodyContextMenu(z,J){this.mockContextMenu(z,z.eBodyViewport,J)}mockHeaderContextMenu(z,J){this.mockContextMenu(z,z.eGui,J)}mockRowContextMenu(z){if(!zz())return;let J=(Q,Z,$)=>{let{rowCtrl:X,cellCtrl:Y}=z.getControlsForEventTarget($?.target??null);if(Y?.column)Y.dispatchCellContextMenuEvent($??null);this.beans.contextMenuSvc?.handleContextMenuMouseEvent(void 0,$,X,Y)};this.mockContextMenu(z,z.element,J)}handleCellDoubleClick(z,J){if((()=>{if(!zz()||tQ("dblclick"))return!1;let Z=Date.now(),$=Z-z.lastIPadMouseClickEvent<200;return z.lastIPadMouseClickEvent=Z,$})())return z.onCellDoubleClicked(J),J.preventDefault(),!0;return!1}setupForHeader(z){let{gos:J,sortSvc:Q,menuSvc:Z}=this.beans;if(J.get("suppressTouch"))return;let{params:$,eMenu:X,eFilterButton:Y}=z,U=new p0(z.getGui(),!0);z.addDestroyFunc(()=>U.destroy());let _=z.shouldSuppressMenuHide(),H=_&&I(X)&&$.enableMenu,G=!!Z?.isHeaderContextMenuEnabled($.column),W=vK($.enableMenu,G,F0(J)),q=U;if(H)q=new p0(X,!0),z.addDestroyFunc(()=>q.destroy());let B=(E)=>$.showColumnMenuAfterMouseClick(E.touchStart);if(H&&$.enableMenu)z.addManagedListeners(q,{tap:B});if(W)z.addManagedListeners(U,{longTap:B});if($.enableSorting){let E=(K)=>{let F=K.touchStart.target;if(_&&(X?.contains(F)||Y?.contains(F)))return;Q?.progressSort($.column,!1,"uiColumnSorted")};z.addManagedListeners(U,{tap:E})}if($.enableFilterButton&&Y){let E=new p0(Y,!0);z.addManagedListeners(E,{tap:()=>$.showFilter(Y)}),z.addDestroyFunc(()=>E.destroy())}}setupForHeaderGroup(z){let J=z.params;if(this.beans.menuSvc?.isHeaderContextMenuEnabled(J.columnGroup.getProvidedColumnGroup())){let Q=new p0(J.eGridHeader,!0),Z=($)=>J.showColumnMenuAfterMouseClick($.touchStart);z.addManagedListeners(Q,{longTap:Z}),z.addDestroyFunc(()=>Q.destroy())}}setupForHeaderGroupElement(z,J,Q){let Z=new p0(J,!0);z.addManagedListeners(Z,{tap:Q}),z.addDestroyFunc(()=>Z.destroy())}mockContextMenu(z,J,Q){if(!zz())return;let Z=new p0(J),$=(X)=>{if(!S2(this.beans,X.touchEvent))return;Q(void 0,X.touchStart,X.touchEvent)};z.addManagedListeners(Z,{longTap:$}),z.addDestroyFunc(()=>Z.destroy())}},wK={moduleName:"Touch",version:p,beans:[NK]},yK=class extends j{constructor(){super(...arguments);this.beanName="cellNavigation"}getNextCellToFocus(z,J,Q=!1){if(Q)return this.getNextCellToFocusWithCtrlPressed(z,J);return this.getNextCellToFocusWithoutCtrlPressed(z,J)}getNextCellToFocusWithCtrlPressed(z,J){let Q=z===R.UP,Z=z===R.DOWN,$=z===R.LEFT,X,Y,{pageBounds:U,gos:_,visibleCols:H,pinnedRowModel:G}=this.beans,{rowPinned:W}=J;if(Q||Z){if(W&&G)if(Q)Y=0;else Y=W==="top"?G.getPinnedTopRowCount()-1:G.getPinnedBottomRowCount()-1;else Y=Q?U.getFirstRow():U.getLastRow();X=J.column}else{let q=_.get("enableRtl");Y=J.rowIndex,X=($!==q?H.allCols:[...H.allCols].reverse()).find((E)=>!w0(E)&&this.isCellGoodToFocusOn({rowIndex:Y,rowPinned:null,column:E}))}return X?{rowIndex:Y,rowPinned:W,column:X}:null}getNextCellToFocusWithoutCtrlPressed(z,J){let Q=J,Z=!1;while(!Z){switch(z){case R.UP:Q=this.getCellAbove(Q);break;case R.DOWN:Q=this.getCellBelow(Q);break;case R.RIGHT:Q=this.gos.get("enableRtl")?this.getCellToLeft(Q):this.getCellToRight(Q);break;case R.LEFT:Q=this.gos.get("enableRtl")?this.getCellToRight(Q):this.getCellToLeft(Q);break;default:Q=null,V(8,{key:z});break}if(Q)Z=this.isCellGoodToFocusOn(Q);else Z=!0}return Q}isCellGoodToFocusOn(z){let J=z.column,Q,{pinnedRowModel:Z,rowModel:$}=this.beans;switch(z.rowPinned){case"top":Q=Z?.getPinnedTopRow(z.rowIndex);break;case"bottom":Q=Z?.getPinnedBottomRow(z.rowIndex);break;default:Q=$.getRow(z.rowIndex);break}if(!Q)return!1;return!this.isSuppressNavigable(J,Q)}getCellToLeft(z){if(!z)return null;let J=this.beans.visibleCols.getColBefore(z.column);if(!J)return null;return{rowIndex:z.rowIndex,column:J,rowPinned:z.rowPinned}}getCellToRight(z){if(!z)return null;let J=this.beans.visibleCols.getColAfter(z.column);if(!J)return null;return{rowIndex:z.rowIndex,column:J,rowPinned:z.rowPinned}}getCellBelow(z){if(!z)return null;let{beans:J}=this,Q=J.rowSpanSvc?.getCellEnd(z)??z,Z=D0(J,Q,!0);if(Z)return{rowIndex:Z.rowIndex,column:z.column,rowPinned:Z.rowPinned};return null}getCellAbove(z){if(!z)return null;let{beans:J}=this,Q=J.rowSpanSvc?.getCellStart(z)??z,Z=r0(J,{rowIndex:Q.rowIndex,rowPinned:Q.rowPinned},!0);if(Z)return{rowIndex:Z.rowIndex,column:z.column,rowPinned:Z.rowPinned};return null}getNextTabbedCell(z,J){if(J)return this.getNextTabbedCellBackwards(z);return this.getNextTabbedCellForwards(z)}getNextTabbedCellForwards(z){let{visibleCols:J,pagination:Q}=this.beans,Z=J.allCols,$=z.rowIndex,X=z.rowPinned,Y=J.getColAfter(z.column);if(!Y){Y=Z[0];let U=D0(this.beans,z,!0);if(n(U))return null;if(!U.rowPinned&&!(Q?.isRowInPage(U.rowIndex)??!0))return null;$=U?U.rowIndex:null,X=U?U.rowPinned:null}return{rowIndex:$,column:Y,rowPinned:X}}getNextTabbedCellBackwards(z){let{beans:J}=this,{visibleCols:Q,pagination:Z}=J,$=Q.allCols,X=z.rowIndex,Y=z.rowPinned,U=Q.getColBefore(z.column);if(!U){U=N($);let _=r0(J,{rowIndex:z.rowIndex,rowPinned:z.rowPinned},!0);if(n(_))return null;if(!_.rowPinned&&!(Z?.isRowInPage(_.rowIndex)??!0))return null;X=_?_.rowIndex:null,Y=_?_.rowPinned:null}return{rowIndex:X,column:U,rowPinned:Y}}isSuppressNavigable(z,J){let{suppressNavigable:Q}=z.colDef;if(typeof Q==="boolean")return Q;if(typeof Q==="function"){let Z=z.createColumnFunctionCallbackParams(J);return Q(Z)}return!1}};function xK(z){return z.focusSvc.getFocusedCell()}function bK(z){return z.focusSvc.clearFocusedCell()}function gK(z,J,Q,Z){z.focusSvc.setFocusedCell({rowIndex:J,column:Q,rowPinned:Z,forceBrowserFocus:!0})}function hK(z,J){return z.navigation?.tabToNextCell(!1,J)??!1}function uK(z,J){return z.navigation?.tabToNextCell(!0,J)??!1}function mK(z,J,Q=!1){let Z=z.headerNavigation?.getHeaderPositionForColumn(J,Q);if(!Z)return;z.focusSvc.focusHeaderPosition({headerPosition:Z})}function Zz(z){let J=z;return J?.getFrameworkComponentInstance!=null?J.getFrameworkComponentInstance():z}var cK=class extends j{constructor(){super(...arguments);this.beanName="editModelSvc",this.edits=new Map,this.cellValidations=new AX,this.rowValidations=new jX,this.suspendEdits=!1}suspend(z){this.suspendEdits=z}removeEdits({rowNode:z,column:J}){if(!this.hasEdits({rowNode:z})||!z)return;let Q=this.getEditRow(z);if(J)Q.delete(J);else Q.clear();if(Q.size===0)this.edits.delete(z)}getEditRow(z,J={}){if(this.suspendEdits)return;if(this.edits.size===0)return;let Q=z&&this.edits.get(z);if(Q)return Q;if(J.checkSiblings){let Z=z.pinnedSibling;if(Z)return this.getEditRow(Z)}return}getEditRowDataValue(z,{checkSiblings:J}={}){if(!z||this.edits.size===0)return;let Q=this.getEditRow(z),Z=z.pinnedSibling,$=J&&Z&&this.getEditRow(Z);if(!Q&&!$)return;let X={...z.data},Y=(U,_)=>U.forEach(({editorValue:H,pendingValue:G},W)=>{let q=H===void 0?G:H;if(q!==C0)_[W.getColId()]=q});if(Q)Y(Q,X);if($)Y($,X);return X}getEdit(z={},J){let{rowNode:Q,column:Z}=z,$=this.edits;if(this.suspendEdits||$.size===0||!Q||!Z)return;let X=$.get(Q)?.get(Z);if(X)return X;if(J?.checkSiblings){let Y=Q.pinnedSibling;if(Y)return $.get(Y)?.get(Z)}return}getEditMap(z=!0){if(this.suspendEdits||this.edits.size===0)return new Map;if(!z)return this.edits;let J=new Map;return this.edits.forEach((Q,Z)=>{let $=new Map;Q.forEach(({editorState:X,...Y},U)=>$.set(U,{...Y})),J.set(Z,$)}),J}setEditMap(z){this.edits.clear(),z.forEach((J,Q)=>{let Z=new Map;J.forEach(($,X)=>Z.set(X,{...$})),this.edits.set(Q,Z)})}setEdit(z,J){let Q=this.edits;if(Q.size===0||!Q.has(z.rowNode))Q.set(z.rowNode,new Map);let Z=this.getEdit(z),$={editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0},...Z,...J};return this.getEditRow(z.rowNode).set(z.column,$),$}clearEditValue(z){let{rowNode:J,column:Q}=z;if(!J)return;let Z=(X)=>{X.editorValue=void 0,X.pendingValue=X.sourceValue,X.state="changed"};if(!Q){this.getEditRow(J)?.forEach(Z);return}let $=this.getEdit(z);if($)Z($)}getState(z){if(this.suspendEdits)return;return this.getEdit(z)?.state}getEditPositions(z){if(this.suspendEdits||(z??this.edits).size===0)return[];let J=[];return(z??this.edits).forEach((Q,Z)=>{for(let $ of Q.keys()){let{editorState:X,...Y}=Q.get($);J.push({rowNode:Z,column:$,...Y})}}),J}hasRowEdits(z,J){if(this.suspendEdits)return!1;if(this.edits.size===0)return!1;return!!this.getEditRow(z,J)}hasEdits(z={},J={}){if(this.suspendEdits)return!1;if(this.edits.size===0)return!1;let{rowNode:Q,column:Z}=z,{withOpenEditor:$}=J;if(Q){let X=this.getEditRow(Q,J);if(!X)return!1;if(Z){if($)return this.getEdit(z)?.state==="editing";return X.has(Z)}if(X.size!==0){if($)return Array.from(X.values()).some(({state:Y})=>Y==="editing");return!0}return!1}if($)return this.getEditPositions().some(({state:X})=>X==="editing");return this.edits.size>0}start(z){let J=this.getEditRow(z.rowNode)??new Map,{rowNode:Q,column:Z}=z;if(Z&&!J.has(Z))J.set(Z,{editorValue:void 0,pendingValue:C0,sourceValue:this.beans.valueSvc.getValue(Z,Q,"data"),state:"editing",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}});this.edits.set(Q,J)}stop(z,J,Q){if(!this.hasEdits(z))return;if(J){let Z=this.getEditRow(z.rowNode)?.get(z.column);if(Z&&(Z.pendingValue===C0||Z.pendingValue===Z.sourceValue))this.removeEdits(z);else if(Z&&Q)Z.editorValue=void 0}else this.removeEdits(z)}clear(){for(let z of this.edits.values())z.clear();this.edits.clear()}getCellValidationModel(){return this.cellValidations}getRowValidationModel(){return this.rowValidations}setCellValidationModel(z){this.cellValidations=z}setRowValidationModel(z){this.rowValidations=z}destroy(){super.destroy(),this.clear()}},AX=class{constructor(){this.cellValidations=new Map}getCellValidation(z){let{rowNode:J,column:Q}=z||{};return this.cellValidations?.get(J)?.get(Q)}hasCellValidation(z){if(!z?.rowNode||!z.column)return this.cellValidations.size>0;return!!this.getCellValidation(z)}setCellValidation(z,J){let{rowNode:Q,column:Z}=z;if(!this.cellValidations.has(Q))this.cellValidations.set(Q,new Map);this.cellValidations.get(Q).set(Z,J)}clearCellValidation(z){let{rowNode:J,column:Q}=z;this.cellValidations.get(J)?.delete(Q)}setCellValidationMap(z){this.cellValidations=z}getCellValidationMap(){return this.cellValidations}clearCellValidationMap(){this.cellValidations.clear()}},jX=class{constructor(){this.rowValidations=new Map}getRowValidation(z){let{rowNode:J}=z||{};return this.rowValidations.get(J)}hasRowValidation(z){if(!z?.rowNode)return this.rowValidations.size>0;return!!this.getRowValidation(z)}setRowValidation({rowNode:z},J){this.rowValidations.set(z,J)}clearRowValidation({rowNode:z}){this.rowValidations.delete(z)}setRowValidationMap(z){this.rowValidations=z}getRowValidationMap(){return this.rowValidations}clearRowValidationMap(){this.rowValidations.clear()}};function JJ(z,J={}){let{rowIndex:Q,rowId:Z,rowCtrl:$,rowPinned:X}=J;if($)return $;let{rowModel:Y,rowRenderer:U}=z,{rowNode:_}=J;if(!_){if(Z)_=FW(z,Z,X);else if(Q!=null)_=Y.getRow(Q)}return _?U.getRowCtrlByNode(_):void 0}function l(z,J={}){let{cellCtrl:Q,colId:Z,columnId:$,column:X}=J;if(Q)return Q;let Y=z.colModel.getCol(Z??$??EZ(X)),U=J.rowCtrl??JJ(z,J),_=U?.getCellCtrl(Y)??void 0;if(_)return _;let H=J.rowNode??U?.rowNode;if(H)return z.rowRenderer.getCellCtrls([H],[Y])?.[0];return}function O8(z){let{editSvc:J}=z;if(J?.isBatchEditing())Mz(z,{persist:!0}),Fz(z);else J?.stopEditing(void 0,{source:"api"})}function pK(z,J,Q){let{gos:Z,popupSvc:$}=J;if(!Z.get("stopEditingWhenCellsLoseFocus"))return;let X=(Y)=>{let U=Y.relatedTarget;if(YZ(U)===null){O8(J);return}let _=Q.some((H)=>H.contains(U))&&Z.isElementInThisInstance(U);if(!_)_=!!$&&($.getActivePopups().some((H)=>H.contains(U))||$.isElementWithinCustomPopup(U));if(!_)O8(J)};for(let Y of Q)z.addManagedElementListeners(Y,{focusout:X})}function EZ(z){if(!z)return;if(typeof z==="string")return z;return z.getColId()}var C0=Symbol("unedited"),iK=(z,J={})=>{let Q=z.rowRenderer.getCellCtrls(J.rowNodes,J.columns),Z=Array(Q.length),$=0;for(let X=0,Y=Q.length;X<Y;++X){let _=Q[X].comp?.getCellEditor();if(_)Z[$++]=Zz(_)}return Z.length=$,Z};function dK(z,J,Q,Z,$,X){if(J.length===0&&Q?.rowNode&&Q?.column)$1(z,Q,{key:Z,event:$,cellStartedEdit:X});let{valueSvc:Y,editSvc:U,editModelSvc:_}=z,{rowNode:H,column:G}=Q??{};for(let W of J){let{rowNode:q,column:B}=W,E=l(z,W);if(!E){if(q&&B){let F=Y.getValue(B,q,"data"),D=(Q?.rowNode===q&&Q?.column===B&&Z||void 0)??U?.getCellDataValue(W)??Y.getValueForDisplay({column:B,node:q,from:"edit"})?.value??F??C0;_?.setEdit(W,{pendingValue:p1(z,D,!1,B),sourceValue:F,state:"editing"})}continue}let K=X&&H===E.rowNode&&E.column===G;$1(z,{rowNode:H,column:E.column},{key:K?Z:null,event:K?$:null,cellStartedEdit:K&&X})}}function V4({pendingValue:z,sourceValue:J}){if(z===C0)z=J;return z!==J}function nK(z){let J=new Map;for(let[Q,Z]of z){let $=new Map;for(let[X,Y]of Z)if(V4(Y))$.set(X,Y);if($.size>0)J.set(Q,$)}return J}function $1(z,J,Q){let{key:Z,event:$,cellStartedEdit:X,silent:Y}=Q??{},{editModelSvc:U,gos:_,userCompFactory:H}=z,G=l(z,J),W=G?.comp?.getCellEditor(),q=OX(z,J,Z,X&&!Y),B=U?.getEdit(J),E=q.value??B?.sourceValue;if(W){U?.setEdit(J,{editorValue:p1(z,E,!0,J.column),state:"editing"}),W.refresh?.(q);return}let K=J.column.getColDef(),F=U$(H,K,q);if(!F)return;let{popupFromSelector:L,popupPositionFromSelector:M}=F,D=L??!!K.cellEditorPopup,A=M??K.cellEditorPopupPosition;if(PX(F.params,$),!G)return;let{rangeFeature:O,rowCtrl:T,comp:S,onEditorAttachedFuncs:k}=G;U?.setEdit(J,{editorValue:p1(z,E,!0,J.column),state:"editing",editorState:{cellStartedEditing:void 0,cellStoppedEditing:void 0}}),G.editCompDetails=F,k.push(()=>O?.unsetComp()),S?.setEditDetails(F,D,A,_.get("reactiveCustomComponents")),T?.refreshRow({suppressFlash:!0}),G.refreshNoteState(),rK(z,J,$,E,Y)}function rK(z,J,Q,Z,$){let{editSvc:X,editModelSvc:Y}=z,U=Y?.getEdit(J);if(!$&&U?.state==="editing"&&!U?.editorState?.cellStartedEditing)X?.dispatchCellEvent(J,Q,"cellEditingStarted",{value:Z}),Y?.setEdit(J,{editorState:{cellStartedEditing:!0}})}function VX(z,J,Q){let Z={editorValueExists:!1};if(S5(z)){if((J.getValidationErrors?.()?.length??0)>0)return Z}if(Q?.isCancelling)return Z;if(Q?.isStopping){let X=J?.isCancelAfterEnd?.();if(X)return{...Z,isCancelAfterEnd:X}}return{editorValue:J.getValue(),editorValueExists:!0}}function OX(z,J,Q,Z){let{valueSvc:$,gos:X,editSvc:Y}=z,U=z.gos.get("enableGroupEdit"),_=l(z,J),H=J.rowNode?.rowIndex??void 0,G=Y?.isBatchEditing(),W=z.colModel.getCol(J.column.getId()),{rowNode:q,column:B}=J,E=_.comp?.getCellEditor(),K=Y?.getCellDataValue(J),F=K===void 0?E?VX(z,E)?.editorValue:void 0:K,L=F===C0?$.getValueForDisplay({column:W,node:q,from:"edit"})?.value:F,M=U?F:L;if(B.isAllowFormula()&&z.formula?.isFormula(M))M=z.formula?.normaliseFormula(M,!0)??M;return v(X,{value:M,eventKey:Q??null,column:B,colDef:B.getColDef(),rowIndex:H,node:q,data:q.data,cellStartedEdit:!!Z,onKeyDown:_?.onKeyDown.bind(_),stopEditing:(D)=>{Y.stopEditing(J,{source:G?"ui":"api",suppressNavigateAfterEdit:D}),y2(z,J,{})},eGridCell:_?.eGui,parseValue:(D)=>$.parseValue(W,q,D,_?.value),formatValue:_?.formatValue.bind(_),validate:()=>{Y?.validateEdit()}})}function M2(z,J){let{editModelSvc:Q}=z;Q?.getEditMap().forEach((Z,$)=>{Z.forEach((X,Y)=>{if(!J&&(X.state==="editing"||X.pendingValue===C0))return;if(!V4(X)&&(X.state!=="editing"||J))Q?.removeEdits({rowNode:$,column:Y})})})}function tK(z,J){let Q=J.comp?.getCellEditor();if(!Q?.refresh)return;let{eventKey:Z,cellStartedEdit:$}=J.editCompDetails.params,{column:X}=J,Y=OX(z,J,Z,$),U=X.getColDef(),_=U$(z.userCompFactory,U,Y);Q.refresh(PX(_.params,Z))}function PX(z,J){if(J instanceof KeyboardEvent&&z.column.getColDef().cellEditor==="agNumberCellEditor")z.suppressPreventDefault=["-","+",".","e"].includes(J?.key??"")||z.suppressPreventDefault;else J?.preventDefault?.();return z}function Mz(z,J){for(let Q of z.editModelSvc?.getEditPositions()??[]){let Z=l(z,Q);if(!Z)continue;let $=Z.comp?.getCellEditor();if(!$)continue;let{editorValue:X,editorValueExists:Y,isCancelAfterEnd:U}=VX(z,$,J);if(U){let{cellStartedEditing:_,cellStoppedEditing:H}=z.editModelSvc?.getEdit(Q)?.editorState||{};z.editModelSvc?.setEdit(Q,{editorState:{isCancelAfterEnd:U,cellStartedEditing:_,cellStoppedEditing:H}})}P1(z,Q,X,void 0,!Y,J)}}function P1(z,J,Q,Z,$,X){let{editModelSvc:Y,valueSvc:U}=z;if(!Y)return;let{rowNode:_,column:H}=J;if(!(_&&H))return;let G=Y.getEdit(J);if(G?.sourceValue===void 0){let W=G?p1(z,G.editorValue,!1,H):C0,q={sourceValue:U.getValue(H,_,"data"),pendingValue:W};if(X?.persist)q.state="changed";G=Y.setEdit(J,q)}if(Y.setEdit(J,{editorValue:$?p1(z,G.sourceValue,!0,H):Q}),X?.persist)sK(z,J)}function p1(z,J,Q,Z){let{formula:$}=z;if(Z.isAllowFormula()&&$?.isFormula(J))return $?.normaliseFormula(J,Q)??J;return J}function sK(z,J){let{editModelSvc:Q}=z,Z=Q?.getEdit(J),X={pendingValue:p1(z,Z?.editorValue,!1,J.column)};if(!Z?.editorState?.cellStoppedEditing&&Z?.state!=="editing")X.state="changed";Q?.setEdit(J,X)}function Fz(z,J,Q={}){if(!J)J=z.editModelSvc?.getEditPositions();if(J)for(let Z of J)y2(z,Z,Q)}function y2(z,J,Q,Z=l(z,J)){let $=z.editModelSvc,X=$?.getEdit(J),Y;if(X&&X.state!=="editing"&&X.editorState?.cellStoppedEditing)Y=X.state;else Y="changed";if(!Z){if(X)$?.setEdit(J,{state:Y});return}let U=Z.comp,_=U?.getCellEditor();if(U&&!_){if(Z?.refreshCell(),X){$?.setEdit(J,{state:Y});let G=z.gos.get("enableGroupEdit")?P8(X,Q?.cancel):{valueChanged:!1,newValue:void 0,oldValue:X.sourceValue};T8(z,J,G,Q)}return}if(S5(z)){let G=X&&_?.getValidationErrors?.(),W=$?.getCellValidationModel();if(G?.length)W?.setCellValidation(J,{errorMessages:G});else W?.clearCellValidation(J)}if(X)$?.setEdit(J,{state:Y});U?.setEditDetails(),U?.refreshEditStyles(!1,!1),Z?.refreshCell({force:!0,suppressFlash:!0});let H=$?.getEdit(J);if(H&&H.state!=="editing"){let G=Q?.cancel,W=z.gos.get("enableGroupEdit")?P8(H,G):lK(H,X,G);T8(z,J,W,Q)}}function P8(z,J){let{sourceValue:Q,pendingValue:Z}=z,$;if(!J&&Z!==C0)$=Z;return{valueChanged:!J&&V4(z),newValue:$,oldValue:Q,value:Q}}function lK(z,J,Q){if(Q||z.editorState.isCancelAfterEnd)return{valueChanged:!1,newValue:void 0,oldValue:z.sourceValue};let Z=z.editorValue;if(Z==null||Z===C0)Z=J?.pendingValue;if(Z===C0)Z=void 0;return{valueChanged:V4(z),newValue:Z,oldValue:z.sourceValue}}function T8(z,J,Q,{silent:Z,event:$}={}){let{editSvc:X,editModelSvc:Y}=z,U=Y?.getEdit(J),{editorState:_}=U||{},{isCancelBeforeStart:H,cellStartedEditing:G,cellStoppedEditing:W}=_||{};if(!Z&&!H&&G&&!W)X?.dispatchCellEvent(J,$,"cellEditingStopped",Q),Y?.setEdit(J,{editorState:{cellStoppedEditing:!0}})}function aK(z){if(!z)return!1;for(let J=0,Q=z.length;J<Q;++J){let Z=z[J],$=Z.cellEditorParams;if(!$||!Z.editable&&!Z.groupRowEditable)continue;if($.minLength!==void 0||$.maxLength!==void 0||$.getValidationErrors!==void 0||$.min!==void 0||$.max!==void 0)return!0}return!1}function oK(z){let J=z.rowRenderer.getCellCtrls();for(let Q=0,Z=J.length;Q<Z;++Q){let X=J[Q].comp?.getCellEditor();if(X){let Y=Zz(X);if(Y.getValidationElement||Y.getValidationErrors)return!0}}return!1}function S5(z){return!!z.gos.get("getFullRowEditValidationErrors")||aK(z.colModel.getColumnDefs())||oK(z)}function jz(z,J){if(!(J||S5(z)))return;let Q=new AX,{ariaAnnounce:Z,localeSvc:$,editModelSvc:X,gos:Y}=z,U=Y.get("editType")==="fullRow",H=j9($)("ariaValidationErrorPrefix","Cell Editor Validation"),G=new Set;for(let W of z.rowRenderer.getCellCtrls()){let q=W.comp?.getCellEditor();if(!q)continue;let B=Zz(q),{rowNode:E,column:K}=W,F=B.getValidationErrors?.()??[],L=B.getValidationElement?.(!1)||!B.isPopup?.()&&W.eGui;if(L){let M=F!=null&&F.length>0,D=M?F.join(". "):"";if(fZ(L,M),M)Z.announceValue(`${H} ${F}`,"editorValidation");if(L instanceof HTMLInputElement)L.setCustomValidity(D);else L.classList.toggle("invalid",M)}if(F?.length>0)Q.setCellValidation({rowNode:E,column:K},{errorMessages:F});G.add(W.rowCtrl)}if(Mz(z,{persist:!1}),X?.setCellValidationModel(Q),U){let W=eK(z);X?.setRowValidationModel(W)}for(let W of G.values()){W.rowEditStyleFeature?.applyRowStyles();for(let q of W.getAllCellCtrls())q.tooltipFeature?.refreshTooltip(!0),q.editorTooltipFeature?.refreshTooltip(!0),q.editStyleFeature?.applyCellStyles?.()}}var eK=(z)=>{let J=new jX,Q=z.gos.get("getFullRowEditValidationErrors"),Z=z.editModelSvc?.getEditMap();if(!Z)return J;for(let $ of Z.keys()){let X=Z.get($);if(!X)continue;let Y=[],{rowIndex:U,rowPinned:_}=$;for(let G of X.keys()){let W=X.get(G);if(!W)continue;let{editorValue:q,pendingValue:B,sourceValue:E}=W,K=q??(B===C0?void 0:B)??E;Y.push({column:G,colId:G.getColId(),rowIndex:U,rowPinned:_,oldValue:E,newValue:K})}let H=Q?.({editorsState:Y})??[];if(H.length>0)J.setRowValidation({rowNode:$},{errorMessages:H})}return J};function zF(z){jz(z,!0);let J=z.editModelSvc?.getCellValidationModel().getCellValidationMap();if(!J)return null;let Q=[];return J.forEach((Z,$)=>{Z.forEach(({errorMessages:X},Y)=>{Q.push({column:Y,rowIndex:$.rowIndex,rowPinned:$.rowPinned,messages:X??null})})}),Q}function CJ(z){return!!(z.rowPinned&&z.pinnedSibling)}function J4(z,J,Q,Z){let $=J==="top";if(!Q)return J4(z,J,$?z.getPinnedTopRow(0):z.getPinnedBottomRow(0),Z);if(!Z){let _=$?z.getPinnedTopRowCount():z.getPinnedBottomRowCount();return J4(z,J,Q,$?z.getPinnedTopRow(_-1):z.getPinnedBottomRow(_-1))}let X=!1,Y=!1,U=[];return z.forEachPinnedRow(J,(_)=>{if(_===Q&&!X){X=!0,U.push(_);return}if(X&&_===Z){Y=!0,U.push(_);return}if(X&&!Y)U.push(_)}),U}function JF(z,J,Q,{rowNode:Z,column:$},X){return v(z.gos,{type:Q,node:Z,data:Z.data,value:X,column:$,colDef:$.getColDef(),rowPinned:Z.rowPinned,event:J,rowIndex:Z.rowIndex})}function QF(z,J=!1){if(z===R.DELETE)return!0;if(!J&&z===R.BACKSPACE)return q$();return!1}var ZF=class extends j{constructor(z,J,Q,Z){super();this.cellCtrl=z,this.rowNode=Q,this.rowCtrl=Z,this.beans=J}init(){this.eGui=this.cellCtrl.eGui}onKeyDown(z){let J=z.key;if(J===R.ENTER&&w0(this.cellCtrl.column)&&this.beans.rowNumbersSvc?.handleKeyDownOnCell(this.cellCtrl.cellPosition,z))return;switch(J){case R.ENTER:this.onEnterKeyDown(z);break;case R.F2:this.onF2KeyDown(z);break;case R.ESCAPE:this.onEscapeKeyDown(z);break;case R.TAB:this.onTabKeyDown(z);break;case R.BACKSPACE:case R.DELETE:this.onBackspaceOrDeleteKeyDown(J,z);break;case R.DOWN:case R.UP:case R.RIGHT:case R.LEFT:this.onNavigationKeyDown(z,J);break}}onNavigationKeyDown(z,J){let{cellCtrl:Q,beans:Z}=this;if(Z.editSvc?.isEditing(Q,{withOpenEditor:!0}))return;if(z.shiftKey&&Q.isRangeSelectionEnabled())this.onShiftRangeSelect(z);else{let $=Q.getFocusedCellPosition();Z.navigation?.navigateToNextCell(z,J,$,!0)}z.preventDefault()}onShiftRangeSelect(z){let{rangeSvc:J,navigation:Q}=this.beans;if(!J)return;let Z=J.extendLatestRangeInDirection(z);if(!Z)return;if(z.key===R.LEFT||z.key===R.RIGHT)Q?.ensureColumnVisible(Z.column);else Q?.ensureRowVisible(Z.rowIndex)}onTabKeyDown(z){this.beans.navigation?.onTabKeyDown(this.cellCtrl,z)}onBackspaceOrDeleteKeyDown(z,J){let{cellCtrl:Q,beans:Z,rowNode:$}=this,{gos:X,rangeSvc:Y,eventSvc:U,editSvc:_}=Z;if(U.dispatchEvent({type:"keyShortcutChangedCellStart"}),QF(z,X.get("enableCellEditingOnBackspace"))&&!_?.isEditing(Q,{withOpenEditor:!0})){if(Y&&n0(X))Y.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"});else if(Q.isCellEditable()){let H=Z.valueSvc.getDeleteValue(Q.column,$);$.setDataValue(Q.column,H,"cellClear")}}else if(!_?.isEditing(Q,{withOpenEditor:!0}))Z.editSvc?.startEditing(Q,{startedEdit:!0,event:J});U.dispatchEvent({type:"keyShortcutChangedCellEnd"})}onEnterKeyDown(z){let{cellCtrl:J,beans:Q}=this,{editSvc:Z,navigation:$}=Q,X=Z?.isEditing(J,{withOpenEditor:!0}),Y=J.rowNode,U=Z?.isRowEditing(Y,{withOpenEditor:!0}),_=(H)=>{if(Z?.startEditing(H,{startedEdit:!0,event:z,source:"edit"}))z.preventDefault()};if(X||U){if(this.isCtrlEnter(z)){Z?.applyBulkEdit(J,Q?.rangeSvc?.getCellRanges()||[]);return}if(jz(Q),Z?.checkNavWithValidation(void 0,z)==="block-stop")return;if(Z?.isEditing(J,{withOpenEditor:!0}))Z?.stopEditing(J,{event:z,source:"edit"});else if(U&&!J.isCellEditable())Z?.stopEditing({rowNode:Y},{event:z,source:"edit"});else _(J)}else if(Q.gos.get("enterNavigatesVertically")){let H=z.shiftKey?R.UP:R.DOWN;$?.navigateToNextCell(null,H,J.cellPosition,!1)}else{if(Z?.hasValidationErrors())return;if(Z?.hasValidationErrors(J))Z.revertSingleCellEdit(J,!0);_(J)}}isCtrlEnter(z){return(z.ctrlKey||z.metaKey)&&z.key===R.ENTER}onF2KeyDown(z){let{cellCtrl:J,beans:{editSvc:Q,notesSvc:Z}}=this,$=Q?.isEditing();if(z.shiftKey&&Z?.hasDataSource()&&!$){let X=Z.getNoteAccess({rowNode:this.rowNode,column:J.column});if(X){if(!X.isSuppressed||X.canView){Z.showNote(X.params,!0),z.preventDefault();return}}}if($){if(jz(this.beans),Q?.checkNavWithValidation(void 0,z)==="block-stop")return}Q?.startEditing(J,{startedEdit:!0,event:z})}onEscapeKeyDown(z){let{cellCtrl:J,beans:{editSvc:Q}}=this;if(Q?.checkNavWithValidation(J,z)==="block-stop")Q.revertSingleCellEdit(J);setTimeout(()=>{Q?.stopEditing(J,{event:z,cancel:!0})})}processCharacter(z){let Q=z.target!==this.eGui,{beans:{editSvc:Z},cellCtrl:$}=this;if(Q)return;if(Z?.isEditing($,{withOpenEditor:!0}))return;if(z.key===R.SPACE)this.onSpaceKeyDown(z);else if(Z?.isCellEditable($,"ui")){if(Z?.hasValidationErrors()&&!Z?.hasValidationErrors($))return;if(Z?.startEditing($,{startedEdit:!0,event:z,source:"api",editable:!0}),!$.editCompDetails?.params?.suppressPreventDefault)z.preventDefault()}}onSpaceKeyDown(z){let{gos:J,editSvc:Q}=this.beans,{rowNode:Z}=this.cellCtrl;if(!Q?.isEditing(this.cellCtrl,{withOpenEditor:!0})&&o4(J))this.beans.selectionSvc?.handleSelectionEvent(z,Z,"spaceKey");z.preventDefault()}},$F=class extends j{constructor(z,J,Q){super();this.cellCtrl=z,this.column=Q,this.beans=J}onMouseEvent(z,J){if(_4(J))return;switch(z){case"click":this.onCellClicked(J);break;case"pointerdown":case"mousedown":case"touchstart":this.onMouseDown(J);break;case"dblclick":this.onCellDoubleClicked(J);break;case"mouseout":this.onMouseOut(J);break;case"mouseover":this.onMouseOver(J);break}}onCellClicked(z){if(this.beans.touchSvc?.handleCellDoubleClick(this,z))return;let{eventSvc:J,rangeSvc:Q,editSvc:Z,editModelSvc:$,frameworkOverrides:X,gos:Y}=this.beans,U=z.ctrlKey||z.metaKey,{cellCtrl:_}=this,{column:H,cellPosition:G,rowNode:W}=_,q=w6(Y,H,W,z);if(Q&&U&&!q){if(Q.getCellRangeCount(G)>1)Q.intersectLastRange(!0)}let B=_.createEvent(z,"cellClicked");B.isEventHandlingSuppressed=q,J.dispatchEvent(B);let E=H.colDef;if(E.onCellClicked)window.setTimeout(()=>{X.wrapOutgoing(()=>{E.onCellClicked(B)})},0);if(q)return;if($?.getState(_)!=="editing"){let K=Z?.isEditing(),F=Z?.isRangeSelectionEnabledWhileEditing(),L=$?.getCellValidationModel().getCellValidationMap().size??0,M=$?.getRowValidationModel().getRowValidationMap().size??0;if(K&&(F||L>0||M>0))return;if(Z?.shouldStartEditing(_,z))Z?.startEditing(_,{event:z});else if(Z?.shouldStopEditing(_,z))if(this.beans.gos.get("editType")==="fullRow")Z?.stopEditing(_,{event:z,source:"edit"});else Z?.stopEditing(void 0,{event:z,source:"edit"})}}onCellDoubleClicked(z){let{column:J,beans:Q,cellCtrl:Z}=this,{eventSvc:$,frameworkOverrides:X,editSvc:Y,editModelSvc:U,gos:_}=Q,H=w6(_,Z.column,Z.rowNode,z),G=J.colDef,W=Z.createEvent(z,"cellDoubleClicked");if(W.isEventHandlingSuppressed=H,$.dispatchEvent(W),typeof G.onCellDoubleClicked==="function")window.setTimeout(()=>{X.wrapOutgoing(()=>{G.onCellDoubleClicked(W)})},0);if(H)return;if(Y?.shouldStartEditing(Z,z)&&U?.getState(Z)!=="editing"){let q=Y?.isEditing(),B=Y?.isRangeSelectionEnabledWhileEditing(),E=U?.getCellValidationModel().getCellValidationMap().size??0,K=U?.getRowValidationModel().getRowValidationMap().size??0;if(q&&(B||E>0||K>0))return;Y?.startEditing(Z,{event:z})}}onMouseDown(z){let{shiftKey:J}=z,Q=z.target,{cellCtrl:Z,beans:$}=this,{eventSvc:X,rangeSvc:Y,rowNumbersSvc:U,focusSvc:_,gos:H,editSvc:G}=$,{column:W,rowNode:q,cellPosition:B}=Z,E=w6(H,W,q,z),K=()=>{let D=Z.createEvent(z,"cellMouseDown");D.isEventHandlingSuppressed=E,X.dispatchEvent(D)};if(E){K();return}if(this.isRightClickInExistingRange(z))return;let F=Y&&!Y.isEmpty(),L=this.containsWidget(Q),M=w0(W);if(U&&M&&!U.handleMouseDownOnCell(B,z))return;if(!J||!F){let D=G?.isEditing(Z),O=H.get("enableCellTextSelection")&&z.defaultPrevented,T=(fz()||O)&&!D&&!D2(Q)&&!L;Z.focusCell(T,z)}if(J&&F&&!_.isCellFocused(B)){z.preventDefault();let D=_.getFocusedCell();if(D){let{column:A,rowIndex:O,rowPinned:T}=D,S=!!G?.isRangeSelectionEnabledWhileEditing?.();if(G?.isEditing(D)&&!S)G?.stopEditing(D);if(!S)_.setFocusedCell({column:A,rowIndex:O,rowPinned:T,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,sourceEvent:z})}}if(L)return;Y?.handleCellMouseDown(z,B),K()}isRightClickInExistingRange(z){let{rangeSvc:J}=this.beans;if(J){let Q=J.isCellInAnyRange(this.cellCtrl.cellPosition),Z=iZ(this.beans,z);if(Q&&Z)return!0}return!1}containsWidget(z){return sz(z,"ag-selection-checkbox",3)||sz(z,"ag-drag-handle",3)}onMouseOut(z){if(this.mouseStayingInsideCell(z))return;let{eventSvc:J,colHover:Q}=this.beans;J.dispatchEvent(this.cellCtrl.createEvent(z,"cellMouseOut")),Q?.clearMouseOver()}onMouseOver(z){if(this.mouseStayingInsideCell(z))return;let{eventSvc:J,colHover:Q}=this.beans;J.dispatchEvent(this.cellCtrl.createEvent(z,"cellMouseOver")),Q?.setMouseOver([this.column])}mouseStayingInsideCell(z){if(!z.target||!z.relatedTarget)return!1;let J=this.cellCtrl.eGui,Q=J.contains(z.target),Z=J.contains(z.relatedTarget);return Q&&Z}},XF=class extends j{constructor(z,J){super();this.cellCtrl=z,this.beans=J,this.column=z.column,this.rowNode=z.rowNode;let Q=z.getCellSpan();if(Q){let Z=this.refreshSpanHeight.bind(this,Q);this.addManagedListeners(this.beans.eventSvc,{paginationChanged:Z,recalculateRowBounds:Z,pinnedHeightChanged:Z})}else this.setupColSpan(),this.setupRowSpan()}setupRowSpan(){this.rowSpan=this.column.getRowSpan(this.rowNode),this.addManagedListeners(this.beans.eventSvc,{newColumnsLoaded:()=>this.onNewColumnsLoaded()})}init(){this.onLeftChanged(),this.onWidthChanged();let z=this.cellCtrl.getCellSpan();if(z)this.refreshSpanHeight(z);else this._legacyApplyRowSpan()}refreshSpanHeight(z){let J=z.getCellHeight(),Q=this.cellCtrl.eGui;if(J!=null&&Q)Q.style.height=`${J}px`}onNewColumnsLoaded(){let z=this.column.getRowSpan(this.rowNode);if(this.rowSpan===z)return;this.rowSpan=z,this._legacyApplyRowSpan(!0)}onDisplayColumnsChanged(){let z=this.getColSpanningList();if(!Z0(this.colsSpanning,z))this.colsSpanning=z,this.onWidthChanged(),this.onLeftChanged()}setupColSpan(){if(this.column.colDef.colSpan==null)return;this.colsSpanning=this.getColSpanningList(),this.addManagedListeners(this.beans.eventSvc,{displayedColumnsChanged:this.onDisplayColumnsChanged.bind(this),displayedColumnsWidthChanged:this.onWidthChanged.bind(this)})}onWidthChanged(){let z=this.cellCtrl.eGui;if(!z)return;z.style.width=`${this.getCellWidth()}px`}getCellWidth(){if(!this.colsSpanning)return this.column.getActualWidth();return this.colsSpanning.reduce((z,J)=>z+J.getActualWidth(),0)}getColSpanningList(){let{column:z,rowNode:J}=this,Q=z.getColSpan(J),Z=[];if(Q===1)Z.push(z);else{let $=z,X=z.getPinned();for(let Y=0;$&&Y<Q;Y++){if(Z.push($),$=this.beans.visibleCols.getColAfter($),!$||n($))break;if(X!==$.getPinned())break}}return Z}onLeftChanged(){let z=this.cellCtrl.getRootElement();if(!z)return;z.style.left=this.modifyLeftForPrintLayout(this.getCellLeft())+"px"}getCellLeft(){let z;if(this.beans.gos.get("enableRtl")&&this.colsSpanning)z=N(this.colsSpanning);else z=this.column;return z.getLeft()}modifyLeftForPrintLayout(z){if(!this.cellCtrl.printLayout||this.column.getPinned()==="left")return z;let{visibleCols:J}=this.beans,Q=J.getColsLeftWidth();if(this.column.getPinned()==="right"){let Z=J.bodyWidth;return Q+Z+(z||0)}return Q+(z||0)}_legacyApplyRowSpan(z){if(this.rowSpan===1&&!z)return;let J=this.cellCtrl.eGui;if(!J)return;let Q=b9(this.beans);J.style.height=`${Q*this.rowSpan}px`,J.style.zIndex="1"}destroy(){super.destroy()}},YF="ag-cell",UF="ag-cell-auto-height",_F="ag-cell-normal-height",HF="ag-cell-focus",GF="ag-cell-first-right-pinned",WF="ag-cell-last-left-pinned",qF="ag-cell-not-inline-editing",BF="ag-cell-wrap-text",EF=0,V2=class extends j{constructor(z,J,Q,Z){super();this.column=z,this.rowNode=J,this.rowCtrl=Z,this.rangeFeature=void 0,this.rowResizeFeature=void 0,this.notesFeature=void 0,this.positionFeature=void 0,this.customStyleFeature=void 0,this.editStyleFeature=void 0,this.mouseListener=void 0,this.keyboardListener=void 0,this.suppressRefreshCell=!1,this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.focusEventWhileNotReady=null,this.hasBeenFocused=!1,this.hasEdit=!1,this.tooltipFeature=void 0,this.editorTooltipFeature=void 0,this.beans=Q,this.gos=Q.gos,this.editSvc=Q.editSvc,this.hasEdit=!!Q.editSvc;let{colId:$}=z;this.instanceId=$+"-"+EF++,this.createCellPosition(),this.updateAndFormatValue(!1),this.positionFeature=new XF(this,Q)}addFeatures(){let{beans:z}=this;this.customStyleFeature=z.cellStyles?.createCellCustomStyleFeature(this),this.editStyleFeature=z.editSvc?.createCellStyleFeature(this),this.mouseListener=new $F(this,z,this.column),this.keyboardListener=new ZF(this,z,this.rowNode,this.rowCtrl),this.enableTooltipFeature();let{rangeSvc:J}=z;if(J&&n0(z.gos))this.rangeFeature=J.createCellRangeFeature(this);if(w0(this.column))this.rowResizeFeature=this.beans.rowNumbersSvc.createRowNumbersRowResizerFeature(this);this.notesFeature=this.beans.notesSvc?.createNotesFeature(this)}isCellSpanning(){return!1}getCellSpan(){return}removeFeatures(){let z=this.beans.context;this.editorTooltipFeature=z.destroyBean(this.editorTooltipFeature),this.customStyleFeature=z.destroyBean(this.customStyleFeature),this.editStyleFeature=z.destroyBean(this.editStyleFeature),this.mouseListener=z.destroyBean(this.mouseListener),this.keyboardListener=z.destroyBean(this.keyboardListener),this.rangeFeature=z.destroyBean(this.rangeFeature),this.rowResizeFeature=z.destroyBean(this.rowResizeFeature),this.notesFeature=z.destroyBean(this.notesFeature),this.disableTooltipFeature()}enableTooltipFeature(z,J){this.tooltipFeature=this.beans.tooltipSvc?.enableCellTooltipFeature(this,z,J)}disableTooltipFeature(){this.tooltipFeature=this.beans.context.destroyBean(this.tooltipFeature)}enableEditorTooltipFeature(z){if(this.editorTooltipFeature)this.disableEditorTooltipFeature();this.editorTooltipFeature=this.beans.tooltipSvc?.setupCellEditorTooltip(this,z),jz(this.beans)}disableEditorTooltipFeature(){this.editorTooltipFeature=this.beans.context.destroyBean(this.editorTooltipFeature)}setComp(z,J,Q,Z,$,X,Y){this.comp=z,this.eGui=J,this.printLayout=$,Y??(Y=this),this.addDomData(Y),this.addFeatures(),Y.addDestroyFunc(()=>this.removeFeatures()),this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.setupFocus(),this.applyStaticCssClasses(),this.setWrapText(),this.onFirstRightPinnedChanged(),this.onLastLeftPinnedChanged(),this.onColumnHover(),this.setupControlComps(),this.setupAutoHeight(Z,Y),this.refreshFirstAndLastStyles(),this.checkFormulaError(),this.refreshAriaRowIndex(),this.refreshAriaColIndex(),this.positionFeature?.init(),this.customStyleFeature?.setComp(z),this.editStyleFeature?.setComp(z),this.tooltipFeature?.refreshTooltip(),this.keyboardListener?.init(),this.rangeFeature?.setComp(z),this.rowResizeFeature?.refreshRowResizer();let U=X?this.isCellEditable():void 0,_=!U&&this.hasEdit&&this.editSvc?.isEditing(this,{withOpenEditor:!0});if(U||_)this.editSvc?.startEditing(this,{startedEdit:!1,source:"api",silent:!0,continueEditing:!0,editable:U});else this.showValue(!1,!0);if(this.onCompAttachedFuncs.length){for(let H of this.onCompAttachedFuncs)H();this.onCompAttachedFuncs=[]}}checkFormulaError(){if(!this.beans.formula)return;this.eGui.classList.toggle("formula-error",this.hasFormulaError())}hasFormulaError(){let{formula:z}=this.beans;if(!z)return!1;return!!z.getFormulaError(this.column,this.rowNode)}hasCellValidationError(){let{editModelSvc:z}=this.beans;if(!z)return!1;return z.getCellValidationModel().hasCellValidation(this)}setupAutoHeight(z,J){this.isAutoHeight=this.beans.rowAutoHeight?.setupCellAutoHeight(this,z,J)??!1}getCellAriaRole(){return this.column.colDef.cellAriaRole??"gridcell"}isCellRenderer(){let z=this.column.colDef;return z.cellRenderer!=null||z.cellRendererSelector!=null}getValueToDisplay(){return this.valueFormatted??this.value}getDeferLoadingCellRenderer(){let{beans:z,column:J}=this,{userCompFactory:Q,ctrlsSvc:Z,eventSvc:$}=z,X=J.colDef,Y=this.createCellRendererParams();Y.deferRender=!0;let U=n7(Q,X,Y);if(Z.getGridBodyCtrl()?.scrollFeature?.isScrolling()){let _,H=new b((W)=>{_=W}),[G]=this.addManagedListeners($,{bodyScrollEnd:()=>{_(),G()}});return{loadingComp:U,onReady:H}}return{loadingComp:U,onReady:b.resolve()}}showValue(z,J){let{beans:Q,column:Z,rowNode:$,rangeFeature:X}=this,{userCompFactory:Y}=Q,U=this.getValueToDisplay(),_,H=$.stub&&$.groupData?.[Z.getId()]==null,G=Z.colDef;if(H||this.isCellRenderer()){let W=this.createCellRendererParams();if(!H||w0(Z))_=Vz(Y,G,W);else _=n7(Y,G,W)}if(!_&&!H&&Q.findSvc?.isMatch($,Z)){let W=this.createCellRendererParams();_=Vz(Y,{...Z.colDef,cellRenderer:"agFindCellRenderer"},W)}if(this.hasEdit&&this.editSvc.isBatchEditing()&&this.editSvc.isRowEditing($,{checkSiblings:!0})){let W=this.editSvc.prepDetailsDuringBatch(this,{compDetails:_,valueToDisplay:U});if(W){if(W.compDetails)_=W.compDetails;else if(W.valueToDisplay)U=W.valueToDisplay}}if(this.comp.setRenderDetails(_,U,z),this.customRowDragComp?.refreshVisibility(),!J&&X)X.scheduleRefreshRangeStyleAndHandle();this.rowResizeFeature?.refreshRowResizer()}setupControlComps(){let z=this.column.colDef;this.includeSelection=this.isIncludeControl(this.isCheckboxSelection(z),!0),this.includeRowDrag=this.isIncludeControl(z.rowDrag),this.includeDndSource=this.isIncludeControl(z.dndSource),this.comp.setIncludeSelection(this.includeSelection),this.comp.setIncludeDndSource(this.includeDndSource),this.comp.setIncludeRowDrag(this.includeRowDrag)}isForceWrapper(){return this.beans.gos.get("enableCellTextSelection")||this.column.isAutoHeight()}getCellValueClass(){let J=this.column.colDef.cellRenderer==="agCheckboxCellRenderer",Q="";if(J)Q=" ag-allow-overflow";return`ag-cell-value${Q}`}isIncludeControl(z,J=!1){return(this.rowNode.rowPinned==null||J&&CJ(this.rowNode))&&!!z}isCheckboxSelection(z){let{rowSelection:J,groupDisplayType:Q}=this.beans.gridOptions,Z=h1(J),$=d4(this.column);if(Q==="custom"&&Z!=="selectionColumn"&&$)return!1;return z.checkboxSelection||$&&typeof J==="object"&&Dz(J)}refreshShouldDestroy(){let z=this.column.colDef,J=this.includeSelection!=this.isIncludeControl(this.isCheckboxSelection(z),!0),Q=this.includeRowDrag!=this.isIncludeControl(z.rowDrag),Z=this.includeDndSource!=this.isIncludeControl(z.dndSource),$=this.isAutoHeight!=this.column.isAutoHeight();return J||Q||Z||$}onPopupEditorClosed(z){let{editSvc:J}=this.beans;if(!J?.isEditing(this,{withOpenEditor:!0}))return;let Q=z instanceof KeyboardEvent,Z=z instanceof MouseEvent,$=Q&&z.key===R.ESCAPE;if(J.stopEditing(this,{source:J.isBatchEditing()?"ui":"api",cancel:$,event:Q||Z?z:void 0}),$)this.focusCell(!0,z)}stopEditing(z=!1){let{editSvc:J}=this.beans;return J?.stopEditing(this,{cancel:z,source:J?.isBatchEditing()?"ui":"api"})??!1}createCellRendererParams(){let{value:z,valueFormatted:J,column:Q,rowNode:Z,comp:$,eGui:X,beans:{valueSvc:Y,gos:U,editSvc:_}}=this;return v(U,{value:z,valueFormatted:J,getValue:()=>Y.getValueForDisplay({column:Q,node:Z,from:"edit"}).value,setValue:(G)=>_?.setDataValue({rowNode:Z,column:Q},G)||Z.setDataValue(Q,G),formatValue:this.formatValue.bind(this),data:Z.data,node:Z,pinned:Q.getPinned(),colDef:Q.colDef,column:Q,refreshCell:this.refreshCell.bind(this),eGridCell:X,eParentOfValue:$.getParentOfValue(),registerRowDragger:(G,W,q,B)=>this.registerRowDragger(G,W,B),setTooltip:(G,W)=>{if(U.assertModuleRegistered("Tooltip",3),this.tooltipFeature)this.disableTooltipFeature();this.enableTooltipFeature(G,W),this.tooltipFeature?.refreshTooltip()}})}onCellChanged(z){if(z.column===this.column)this.refreshCell()}refreshOrDestroyCell(z){if(this.refreshShouldDestroy())this.rowCtrl?.recreateCell(this);else this.refreshCell(z);if(this.hasEdit&&this.editCompDetails){let{editSvc:J,comp:Q}=this;if(!Q?.getCellEditor()&&J.isEditing(this,{withOpenEditor:!0}))J.startEditing(this,{startedEdit:!1,source:"api",silent:!0})}}refreshCell(z){let{editStyleFeature:J,customStyleFeature:Q,rowCtrl:{rowEditStyleFeature:Z},beans:{cellFlashSvc:$,filterManager:X},column:Y,comp:U,suppressRefreshCell:_,tooltipFeature:H}=this;if(_)return;let{field:G,valueGetter:W,showRowGroup:q,enableCellChangeFlash:B}=Y.colDef,E=G==null&&W==null&&q==null,K=z?.newData??!1,F=E||z&&(z.force||K),L=!!U,M=this.updateAndFormatValue(L),D=F||M;if(!L)return;if(D){this.showValue(!!K,!1);let A=X?.isSuppressFlashingCellsBecauseFiltering();if(!z?.suppressFlash&&!A&&B)$?.flashCell(this);J?.applyCellStyles?.(),Q?.applyUserStyles(),Q?.applyClassesFromColDef(),Z?.applyRowStyles(),this.checkFormulaError()}H?.refreshTooltip(),this.refreshNoteState(),Q?.applyCellClassRules()}showNote(z=!1){this.notesFeature?.show({focusEditor:z})}refreshNoteState(){this.notesFeature?.refresh()}isNoteHoverSuppressed(){return!!this.editSvc?.isEditing(this)||this.hasFormulaError()||this.hasCellValidationError()}isCellEditable(){return this.column.isCellEditable(this.rowNode)}formatValue(z){return this.callValueFormatter(z)??z}callValueFormatter(z){return this.beans.valueSvc.formatValue(this.column,this.rowNode,z)}updateAndFormatValue(z){let J=this.value,Q=this.valueFormatted,{value:Z,valueFormatted:$}=this.beans.valueSvc.getValueForDisplay({column:this.column,node:this.rowNode,includeValueFormatted:!0,from:"edit"});if(this.value=Z,this.valueFormatted=$,z)return!this.valuesAreEqual(J,this.value)||this.valueFormatted!=Q;return!0}valuesAreEqual(z,J){let Q=this.column.colDef;return Q.equals?Q.equals(z,J):z===J}addDomData(z){let J=this.eGui;J1(this.beans.gos,J,a6,this),z.addDestroyFunc(()=>J1(this.beans.gos,J,a6,null))}createEvent(z,J){let{rowNode:Q,column:Z,value:$,beans:X}=this;return JF(X,z,J,{rowNode:Q,column:Z},$)}processCharacter(z){this.keyboardListener?.processCharacter(z)}onKeyDown(z){this.keyboardListener?.onKeyDown(z)}onMouseEvent(z,J){this.mouseListener?.onMouseEvent(z,J)}getColSpanningList(){return this.positionFeature?.getColSpanningList()??[]}onLeftChanged(){if(!this.comp)return;this.positionFeature?.onLeftChanged()}onDisplayedColumnsChanged(){if(!this.eGui)return;this.refreshAriaColIndex(),this.refreshFirstAndLastStyles()}refreshFirstAndLastStyles(){let{comp:z,column:J,beans:Q}=this;S$(z,J,Q.visibleCols)}refreshAriaColIndex(){let z=this.beans.visibleCols.getAriaColIndex(this.column);W9(this.eGui,z)}onWidthChanged(){return this.positionFeature?.onWidthChanged()}getRowPosition(){let{rowIndex:z,rowPinned:J}=this.cellPosition;return{rowIndex:z,rowPinned:J}}updateRangeBordersIfRangeCount(){if(!this.comp)return;this.rangeFeature?.updateRangeBordersIfRangeCount()}onCellSelectionChanged(){if(!this.comp)return;this.rangeFeature?.onCellSelectionChanged()}isRangeSelectionEnabled(){return this.rangeFeature!=null}focusCell(z=!1,J){let Q=this.editSvc?.allowedFocusTargetOnValidation(this);if(Q&&Q!==this)return;this.beans.focusSvc.setFocusedCell({...this.getFocusedCellPosition(),forceBrowserFocus:z,sourceEvent:J})}restoreFocus(z=!1){let{beans:{editSvc:J,focusSvc:Q},comp:Z}=this;if(!Z||J?.isEditing(this)||!this.isCellFocused()||!Q.shouldTakeFocus())return;let $=()=>{if(!this.isAlive())return;let X=Z.getFocusableElement();if(this.isCellFocused())X.focus({preventScroll:!0})};if(z){setTimeout($,0);return}$()}onRowIndexChanged(){this.createCellPosition(),this.refreshAriaRowIndex(),this.onCellFocused(),this.restoreFocus(),this.rangeFeature?.onCellSelectionChanged(),this.rowResizeFeature?.refreshRowResizer()}onSuppressCellFocusChanged(z){let J=this.eGui;if(!J)return;j4(J,"tabindex",z?void 0:-1)}onFirstRightPinnedChanged(){if(!this.comp)return;let z=this.column.isFirstRightPinned();this.comp.toggleCss(GF,z)}onLastLeftPinnedChanged(){if(!this.comp)return;let z=this.column.isLastLeftPinned();this.comp.toggleCss(WF,z)}checkCellFocused(){return this.beans.focusSvc.isCellFocused(this.cellPosition)}isCellFocused(){let z=this.checkCellFocused();return this.hasBeenFocused||(this.hasBeenFocused=z),z}setupFocus(){this.restoreFocus(!0),this.onCellFocused(this.focusEventWhileNotReady??void 0)}onCellFocused(z){let{beans:J}=this;if(l6(J))return;if(!this.comp){if(z)this.focusEventWhileNotReady=z;return}let Q=this.isCellFocused(),Z=J.editSvc?.isEditing(this)??!1;if(this.comp.toggleCss(HF,Q),Q&&(z?.forceBrowserFocus||!this.hasBrowserFocus()&&this.beans.focusSvc.shouldTakeFocus())){let $=this.comp.getFocusableElement();if(Z){let Y=O4($,null,!0);if(Y.length)$=Y[0]}let X=z?z.preventScrollOnBrowserFocus:!0;$.focus({preventScroll:X}),WH(J,$)}if(Q&&this.focusEventWhileNotReady)this.focusEventWhileNotReady=null;if(Q&&z)this.rowCtrl.announceDescription(this)}createCellPosition(){let{rowIndex:z,rowPinned:J}=this.rowNode;this.cellPosition={rowIndex:z,rowPinned:U0(J),column:this.column}}applyStaticCssClasses(){let{comp:z}=this;z.toggleCss(YF,!0),z.toggleCss(qF,!0);let J=this.column.isAutoHeight()==!0;z.toggleCss(UF,J),z.toggleCss(_F,!J)}onColumnHover(){this.beans.colHover?.onCellColumnHover(this.column,this.comp)}onColDefChanged(){if(!this.comp)return;if(this.column.isTooltipEnabled())this.disableTooltipFeature(),this.enableTooltipFeature();else this.disableTooltipFeature();if(this.setWrapText(),this.editSvc?.isEditing(this))this.editSvc?.handleColDefChanged(this);else this.refreshOrDestroyCell({force:!0,suppressFlash:!0})}setWrapText(){let z=this.column.colDef.wrapText==!0;this.comp.toggleCss(BF,z)}dispatchCellContextMenuEvent(z){let J=this.column.colDef,Q=this.createEvent(z,"cellContextMenu"),{beans:Z}=this;if(Z.eventSvc.dispatchEvent(Q),J.onCellContextMenu)window.setTimeout(()=>{Z.frameworkOverrides.wrapOutgoing(()=>{J.onCellContextMenu(Q)})},0)}getCellRenderer(){return this.comp?.getCellRenderer()??null}destroy(){this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[];let{focusSvc:z,context:J}=this.beans;if(this.isCellFocused()&&this.hasBrowserFocus())z.attemptToRecoverFocus();super.destroy(),this.positionFeature=J.destroyBean(this.positionFeature)}hasBrowserFocus(){return this.eGui?.contains(d(this.beans))??!1}createSelectionCheckbox(){let z=this.beans.selectionSvc?.createCheckboxSelectionComponent();if(!z)return;return this.beans.context.createBean(z),z.init({rowNode:this.rowNode,column:this.column}),z}createDndSource(){let z=this.beans.registry.createDynamicBean("dndSourceComp",!1,this.rowNode,this.column,this.eGui);if(z)this.beans.context.createBean(z);return z}registerRowDragger(z,J,Q){if(this.customRowDragComp){this.customRowDragComp.setDragElement(z,J);return}let Z=this.createRowDragComp(z,J,Q);if(Z)this.customRowDragComp=Z,this.addDestroyFunc(()=>{this.beans.context.destroyBean(Z),this.customRowDragComp=null}),Z.refreshVisibility()}createRowDragComp(z,J,Q){let Z=this.beans.rowDragSvc?.createRowDragCompForCell(this.rowNode,this.column,()=>this.value,z,J,Q);if(!Z)return;return this.beans.context.createBean(Z),Z}cellEditorAttached(){for(let z of this.onEditorAttachedFuncs)z();this.onEditorAttachedFuncs=[]}setFocusedCellPosition(z){}getFocusedCellPosition(){return this.cellPosition}refreshAriaRowIndex(){if(!w0(this.column)||!this.eGui)return;let{ariaRowIndex:z}=this.rowCtrl;if(z!=null)h6(this.eGui,z)}getRootElement(){return this.eGui}};function TX(z,J,Q,Z,$,X){if(Q==null&&J==null)return;let Y={},U={},_=(H,G)=>{for(let W of H.split(" ")){if(W.trim()=="")continue;G(W)}};if(Q){let H=Object.keys(Q);for(let G=0;G<H.length;G++){let W=H[G],q=Q[W],B;if(typeof q==="string")B=z?z.evaluate(q,Z):!0;else if(typeof q==="function")B=q(Z);_(W,(E)=>{if(B)Y[E]=!0;else U[E]=!0})}}if(J&&X)for(let H of Object.keys(J))_(H,(G)=>{if(!Y[G])U[G]=!0});if(X)Object.keys(U).forEach(X);Object.keys(Y).forEach($)}function S8(z){if(z.group)return z.level;let J=z.parent;return J?J.level+1:0}var KF=0,KZ=class extends j{constructor(z,J,Q,Z,$){super();if(this.rowNode=z,this.useAnimationFrameForCreate=Z,this.printLayout=$,this.guiListenerOwners=new WeakMap,this.focusEventWhileNotReady=null,this.allRowGuis=[],this.active=!0,this.centerCellCtrls={list:[],map:{}},this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}},this.slideInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.fadeInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.rowDragComps=[],this.lastMouseDownOnDragger=!1,this.emptyStyle={},this.updateColumnListsPending=!1,this.rowId=null,this.ariaRowIndex=null,this.businessKey=null,this.beans=J,this.gos=J.gos,this.paginationPage=J.pagination?.getCurrentPage()??0,this.suppressRowTransform=this.gos.get("suppressRowTransform"),this.instanceId=z.id+"-"+KF++,this.rowId=L0(z.id),this.initRowBusinessKey(),this.rowFocused=J.focusSvc.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.rowLevel=S8(this.rowNode),this.setRowType(),this.setAnimateFlags(Q),this.rowStyles=this.processStylesFromGridOptions(),this.rowEditStyleFeature=J.editSvc?.createRowStyleFeature(this),this.fullWidthNotesFeature=this.isFullWidth()?J.notesSvc?.createFullWidthNotesFeature(this):void 0,this.addListeners(),!Z&&!this.isFullWidth())this.createAllCellCtrls()}initRowBusinessKey(){this.businessKeyForNodeFunc=this.gos.get("getBusinessKeyForNode"),this.updateRowBusinessKey()}updateRowBusinessKey(){if(typeof this.businessKeyForNodeFunc!=="function")return;let z=this.businessKeyForNodeFunc(this.rowNode);this.businessKey=L0(z)}updateGui(z,J){if(z==="left")this.leftGui=J;else if(z==="right")this.rightGui=J;else if(z==="fullWidth")this.fullWidthGui=J;else this.centerGui=J}setComp(z,J,Q,Z){let{context:$,rowRenderer:X}=this.beans;Z=l2(this,$,Z);let Y={rowComp:z,element:J,containerType:Q,compBean:Z};this.allRowGuis.push(Y),this.updateGui(Q,Y),this.initialiseRowComp(Y),this.fullWidthNotesFeature?.refresh();let U=this.rowNode,_=this.rowType==="FullWidthLoading"||U.stub,H=!U.data&&this.beans.rowModel.getType()==="infinite";if(!_&&!H&&!U.rowPinned)X.dispatchFirstDataRenderedEvent();this.setupFocus()}unsetComp(z){this.allRowGuis=this.allRowGuis.filter((J)=>J.containerType!==z),this.updateGui(z,void 0)}isCacheable(){return this.rowType==="FullWidthDetail"&&this.gos.get("keepDetailRows")}setCached(z){let J=z?"none":"";for(let Q of this.allRowGuis)Q.element.style.display=J}initialiseRowComp(z){let J=this.gos;if(this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.listenOnDomOrder(z),this.onRowHeightChanged(z),this.updateRowIndexes(z),this.setFocusedClasses(z),this.setStylesFromGridOptions(!1,z),o4(J)&&this.rowNode.selectable)this.onRowSelected(z);this.updateColumnLists(!this.useAnimationFrameForCreate);let Q=z.rowComp,Z=this.getInitialRowClasses(z.containerType);for(let $ of Z)Q.toggleCss($,!0);if(this.executeSlideAndFadeAnimations(z),this.rowNode.group)S0(z.element,!!this.rowNode.expanded);if(this.setRowCompRowId(Q),this.setRowCompRowBusinessKey(Q),J1(J,z.element,o6,this),z.compBean.addDestroyFunc(()=>J1(J,z.element,o6,null)),this.useAnimationFrameForCreate)this.beans.animationFrameSvc.createTask(this.addHoverFunctionality.bind(this,z),this.rowNode.rowIndex,"p2",!1);else this.addHoverFunctionality(z);if(this.isFullWidth())this.setupFullWidth(z);if(J.get("rowDragEntireRow"))this.addRowDraggerToRow(z);if(this.useAnimationFrameForCreate)this.beans.animationFrameSvc.addDestroyTask(()=>{if(!this.isAlive())return;z.rowComp.toggleCss("ag-after-created",!0)});this.executeProcessRowPostCreateFunc()}setRowCompRowBusinessKey(z){if(this.businessKey==null)return;z.setRowBusinessKey(this.businessKey)}setRowCompRowId(z){let J=L0(this.rowNode.id);if(this.rowId=J,J==null)return;z.setRowId(J)}executeSlideAndFadeAnimations(z){let{containerType:J}=z;if(this.slideInAnimation[J])lQ(()=>{this.onTopChanged()}),this.slideInAnimation[J]=!1;if(this.fadeInAnimation[J])lQ(()=>{z.rowComp.toggleCss("ag-opacity-zero",!1)}),this.fadeInAnimation[J]=!1}addRowDraggerToRow(z){let J=this.beans.rowDragSvc?.createRowDragCompForRow(this.rowNode,z.element);if(!J)return;let Q=this.createBean(J,this.beans.context);this.rowDragComps.push(Q),z.compBean.addDestroyFunc(()=>{this.rowDragComps=this.rowDragComps.filter((Z)=>Z!==Q),this.rowEditStyleFeature=this.destroyBean(this.rowEditStyleFeature,this.beans.context),this.destroyBean(Q,this.beans.context)})}setupFullWidth(z){let J=this.getPinnedForContainer(z.containerType),Q=this.createFullWidthCompDetails(z.element,J);z.rowComp.showFullWidth(Q)}getFullWidthCellRenderers(){if(this.gos.get("embedFullWidthRows"))return this.allRowGuis.map((z)=>z?.rowComp?.getFullWidthCellRenderer());return[this.fullWidthGui?.rowComp?.getFullWidthCellRenderer()]}executeProcessRowPostCreateFunc(){let z=this.gos.getCallback("processRowPostCreate");if(!z||!this.areAllContainersReady())return;let J={eRow:this.centerGui.element,ePinnedLeftRow:this.leftGui?this.leftGui.element:void 0,ePinnedRightRow:this.rightGui?this.rightGui.element:void 0,node:this.rowNode,rowIndex:this.rowNode.rowIndex,addRenderedRowListener:this.addEventListener.bind(this)};z(J)}areAllContainersReady(){let{leftGui:z,centerGui:J,rightGui:Q,beans:{visibleCols:Z}}=this,$=!!z||!Z.isPinningLeft(),X=!!J,Y=!!Q||!Z.isPinningRight();return $&&X&&Y}isNodeFullWidthCell(){if(this.rowNode.detail)return!0;let z=this.beans.gos.getCallback("isFullWidthRow");return z?z({rowNode:this.rowNode}):!1}setRowType(){let{rowNode:z,gos:J,beans:{colModel:Q}}=this,Z=J.get("suppressServerSideFullWidthLoadingRow"),$=J.get("groupHideOpenParents"),X=z.stub&&!Z&&!$,Y=this.isNodeFullWidthCell(),U=J.get("masterDetail")&&z.detail,_=Q.pivotMode,H=h9(J,z,_),G=Z&&z.stub&&H&&!$;if(X)this.rowType="FullWidthLoading";else if(U)this.rowType="FullWidthDetail";else if(Y)this.rowType="FullWidth";else if(H&&!G)this.rowType="FullWidthGroup";else this.rowType="Normal"}updateColumnLists(z=!1,J=!1){if(this.isFullWidth())return;let{animationFrameSvc:Q}=this.beans;if(!Q?.active||z||this.printLayout){this.updateColumnListsImpl(J);return}if(this.updateColumnListsPending)return;Q.createTask(()=>{if(!this.active)return;this.updateColumnListsImpl(!0)},this.rowNode.rowIndex,"p1",!1),this.updateColumnListsPending=!0}getNewCellCtrl(z){if(this.beans.rowSpanSvc?.isCellSpanning(z,this.rowNode))return;return new V2(z,this.rowNode,this.beans,this)}isCorrectCtrlForSpan(z){return!this.beans.rowSpanSvc?.isCellSpanning(z.column,this.rowNode)}createCellCtrls(z,J,Q=null){let Z={list:[],map:{}},$=(H,G,W)=>{if(W!=null)Z.list.splice(W,0,G);else Z.list.push(G);Z.map[H]=G},X=[];for(let H of J){let G=H.getInstanceId(),W=z.map[G];if(W&&!this.isCorrectCtrlForSpan(W))W.destroy(),W=void 0;if(!W)W=this.getNewCellCtrl(H);if(!W)continue;$(G,W)}for(let H of z.list){let G=H.column.getInstanceId();if(Z.map[G]!=null)continue;if(!this.isCellEligibleToBeRemoved(H,Q))X.push([G,H]);else H.destroy()}if(X.length)for(let[H,G]of X){let W=Z.list.findIndex((B)=>B.column.getLeft()>G.column.getLeft()),q=W===-1?void 0:Math.max(W-1,0);$(H,G,q)}let{focusSvc:Y,visibleCols:U}=this.beans,_=Y.getFocusedCell();if(_&&_.column.getPinned()==Q){let H=_.column.getInstanceId();if(!Z.map[H]&&U.allCols.includes(_.column)){let W=this.createFocusedCellCtrl();if(W){let q=Z.list.findIndex((E)=>E.column.getLeft()>W.column.getLeft()),B=q===-1?void 0:Math.max(q-1,0);$(H,W,B)}}}return Z}createFocusedCellCtrl(){let{focusSvc:z,rowSpanSvc:J}=this.beans,Q=z.getFocusedCell();if(!Q)return;let Z=J?.getCellSpan(Q.column,this.rowNode);if(Z){if(Z.firstNode!==this.rowNode||!Z.doesSpanContain(Q))return}else if(!z.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned))return;return this.getNewCellCtrl(Q.column)}updateColumnListsImpl(z){this.updateColumnListsPending=!1,this.createAllCellCtrls(),this.setCellCtrls(z)}setCellCtrls(z){for(let J of this.allRowGuis){let Q=this.getCellCtrlsForContainer(J.containerType);J.rowComp.setCellCtrls(Q,z)}}getCellCtrlsForContainer(z){switch(z){case"left":return this.leftCellCtrls.list;case"right":return this.rightCellCtrls.list;case"fullWidth":return[];case"center":return this.centerCellCtrls.list}}createAllCellCtrls(){let z=this.beans.colViewport,J=this.beans.visibleCols;if(this.printLayout)this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,J.allCols),this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}};else{let Q=z.getColsWithinViewport(this.rowNode);this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,Q);let Z=J.getLeftColsForRow(this.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,Z,"left");let $=J.getRightColsForRow(this.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,$,"right")}}getInitialCellCtrls(z){if(this.useAnimationFrameForCreate||this.isFullWidth())return null;return this.getCellCtrlsForContainer(z)}isCellEligibleToBeRemoved(z,J){let{column:$}=z;if($.getPinned()!=J)return!0;if(!this.isCorrectCtrlForSpan(z))return!0;let{visibleCols:X,editSvc:Y}=this.beans,U=Y?.isEditing(z),_=z.isCellFocused();if(U||_)return X.allCols.indexOf($)>=0?!1:!0;return!0}getDomOrder(){return this.gos.get("ensureDomOrder")||T0(this.gos,"print")}listenOnDomOrder(z){let J=()=>{z.rowComp.setDomOrder(this.getDomOrder())};z.compBean.addManagedPropertyListeners(["domLayout","ensureDomOrder"],J)}setAnimateFlags(z){if(this.rowNode.sticky||!z)return;let J=I(this.rowNode.oldRowTop),{visibleCols:Q}=this.beans,Z=Q.isPinningLeft(),$=Q.isPinningRight();if(J){let{slideInAnimation:X}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){X.fullWidth=!0;return}X.center=!0,X.left=Z,X.right=$}else{let{fadeInAnimation:X}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){X.fullWidth=!0;return}X.center=!0,X.left=Z,X.right=$}}isFullWidth(){return this.rowType!=="Normal"}refreshFullWidth(){let z=(Y,U)=>{if(!Y)return!0;return Y.rowComp.refreshFullWidth(()=>{return this.createFullWidthCompDetails(Y.element,U).params})},J=z(this.fullWidthGui,null),Q=z(this.centerGui,null),Z=z(this.leftGui,"left"),$=z(this.rightGui,"right"),X=J&&Q&&Z&&$;return this.fullWidthNotesFeature?.refresh(),X}getNotesFeature(){return this.fullWidthNotesFeature}addListeners(){let{beans:z,gos:J,rowNode:Q}=this,{expansionSvc:Z,eventSvc:$,context:X,rowSpanSvc:Y}=z;if(this.addManagedListeners(this.rowNode,{heightChanged:()=>this.onRowHeightChanged(),rowSelected:()=>this.onRowSelected(),rowIndexChanged:this.onRowIndexChanged.bind(this),topChanged:this.onTopChanged.bind(this),...Z?.getRowExpandedListeners(this)??{}}),Q.detail)this.addManagedListeners(Q.parent,{dataChanged:this.onRowNodeDataChanged.bind(this)});if(this.addManagedListeners(Q,{dataChanged:this.onRowNodeDataChanged.bind(this),cellChanged:this.postProcessCss.bind(this),rowHighlightChanged:this.onRowNodeHighlightChanged.bind(this),draggingChanged:this.postProcessRowDragging.bind(this),uiLevelChanged:this.onUiLevelChanged.bind(this),rowPinned:this.onRowPinned.bind(this)}),this.addManagedListeners($,{paginationPixelOffsetChanged:this.onPaginationPixelOffsetChanged.bind(this),heightScaleChanged:this.onTopChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),virtualColumnsChanged:this.onVirtualColumnsChanged.bind(this),cellFocused:this.onCellFocusChanged.bind(this),cellFocusCleared:this.onCellFocusChanged.bind(this),paginationChanged:this.onPaginationChanged.bind(this),modelUpdated:this.refreshFirstAndLastRowStyles.bind(this),columnMoved:()=>this.updateColumnLists()}),Y?.active)this.addManagedListeners(Y,{spannedCellsUpdated:({pinned:U})=>{if(U&&!Q.rowPinned)return;this.updateColumnLists()}});this.addDestroyFunc(()=>{this.rowDragComps=this.destroyBeans(this.rowDragComps,X),this.tooltipFeature=this.destroyBean(this.tooltipFeature,X),this.rowEditStyleFeature=this.destroyBean(this.rowEditStyleFeature,X),this.fullWidthNotesFeature?.destroy()}),this.addManagedPropertyListeners(["rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules"],this.postProcessCss.bind(this)),this.addManagedPropertyListener("rowDragEntireRow",()=>{if(J.get("rowDragEntireRow")){for(let _ of this.allRowGuis)this.addRowDraggerToRow(_);return}this.rowDragComps=this.destroyBeans(this.rowDragComps,X)}),this.addListenersForCellComps()}addListenersForCellComps(){this.addManagedListeners(this.rowNode,{rowIndexChanged:()=>{for(let z of this.getAllCellCtrls())z.onRowIndexChanged()},cellChanged:(z)=>{for(let J of this.getAllCellCtrls())J.onCellChanged(z)}})}onRowPinned(){for(let z of this.allRowGuis)z.rowComp.toggleCss("ag-row-pinned-source",!!this.rowNode.pinnedSibling)}onRowNodeDataChanged(z){this.refreshRow({suppressFlash:!z.update,newData:!z.update})}refreshRow(z){if(this.isFullWidth()!==!!this.isNodeFullWidthCell()){this.beans.rowRenderer.redrawRow(this.rowNode);return}if(this.isFullWidth()){if(!this.refreshFullWidth())this.beans.rowRenderer.redrawRow(this.rowNode);return}for(let Q of this.getAllCellCtrls())Q.refreshCell(z);for(let Q of this.allRowGuis)this.setRowCompRowId(Q.rowComp),this.updateRowBusinessKey(),this.setRowCompRowBusinessKey(Q.rowComp);this.onRowSelected(),this.postProcessCss()}postProcessCss(){this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.rowEditStyleFeature?.applyRowStyles(),this.postProcessRowDragging()}onRowNodeHighlightChanged(){let z=this.beans.rowDropHighlightSvc,J=z?.row===this.rowNode?z.position:"none",Q=J==="above",Z=J==="inside",$=J==="below",X=J!=="none",Y=Q||$,U=this.rowNode.uiLevel,_=Y&&U>0,H=_?U.toString():"0";for(let G of this.allRowGuis){let W=G.rowComp;if(W.toggleCss("ag-row-highlight-above",Q),W.toggleCss("ag-row-highlight-inside",Z),W.toggleCss("ag-row-highlight-below",$),W.toggleCss("ag-row-highlight-indent",_),X)G.element.style.setProperty("--ag-row-highlight-level",H);else G.element.style.removeProperty("--ag-row-highlight-level")}}postProcessRowDragging(){let z=this.rowNode.dragging;for(let J of this.allRowGuis)J.rowComp.toggleCss("ag-row-dragging",z)}onDisplayedColumnsChanged(){this.updateColumnLists(!0),this.beans.rowAutoHeight?.requestCheckAutoHeight()}onVirtualColumnsChanged(){this.updateColumnLists(!1,!0)}getRowPosition(){return{rowPinned:U0(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}}onKeyboardNavigate(z){let J=this.findFullWidthInfoForEvent(z);if(!J)return;let{rowGui:Q,column:Z}=J;if(Q.element!==z.target)return;let Y=this.rowNode,{focusSvc:U,navigation:_}=this.beans,H=U.getFocusedCell(),G={rowIndex:Y.rowIndex,rowPinned:Y.rowPinned,column:H?.column??Z};_?.navigateToNextCell(z,z.key,G,!0),z.preventDefault()}onTabKeyDown(z){if(z.defaultPrevented||_4(z))return;let J=this.allRowGuis.find((U)=>U.element.contains(z.target)),Q=J?J.element:null,Z=Q===z.target,$=d(this.beans),X=!1;if(Q&&$)X=Q.contains($)&&$.classList.contains("ag-cell");let Y=null;if(!Z&&!X)Y=I0(this.beans,Q,!1,z.shiftKey);if(this.isFullWidth()&&Z||!Y)this.beans.navigation?.onTabKeyDown(this,z)}getFullWidthElement(){if(this.fullWidthGui)return this.fullWidthGui.element;return null}getRowYPosition(){let z=this.allRowGuis.find((J)=>B0(J.element))?.element;if(z)return z.getBoundingClientRect().top;return 0}onSuppressCellFocusChanged(z){let J=this.isFullWidth()&&z?void 0:this.gos.get("tabIndex");for(let Q of this.allRowGuis)j4(Q.element,"tabindex",J)}setupFocus(){if(!this.isFullWidth())return;this.restoreFullWidthFocus(!0),this.onFullWidthRowFocused(this.focusEventWhileNotReady??void 0)}restoreFullWidthFocus(z=!1){let{focusSvc:J,editSvc:Q}=this.beans;if(Q?.isEditing(this))return;if(!J.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned)||!J.shouldTakeFocus())return;let Z=this.getFullWidthRowGuiForFocus();if(!Z)return;let $=()=>{if(!this.isAlive())return;if(J.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned))Z.element.focus({preventScroll:!0})};if(z){setTimeout($,0);return}$()}getFullWidthRowGuiForFocus(z){if(this.fullWidthGui)return this.fullWidthGui;let J=this.beans.focusSvc.getFocusedCell(),Q=this.beans.colModel.getCol(z?.column??J?.column);if(!Q)return;let Z=Q?.pinned;if(Z==="right")return this.rightGui;if(Z==="left")return this.leftGui;return this.centerGui}setFullWidthRowFocusedClass(z,J){this.forEachGui(void 0,(Q)=>{Q.element.classList.toggle("ag-full-width-focus",J&&Q===z)})}onFullWidthRowFocused(z){let{focusSvc:J}=this.beans;if(!(this.isFullWidth()&&J.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned))){this.setFullWidthRowFocusedClass(void 0,!1);return}let Z=this.getFullWidthRowGuiForFocus(z);if(!Z){if(z)this.focusEventWhileNotReady=z;this.setFullWidthRowFocusedClass(void 0,!1);return}if(this.setFullWidthRowFocusedClass(Z,!0),this.focusEventWhileNotReady=null,z?.forceBrowserFocus)Z.element.focus({preventScroll:!0})}recreateCell(z){this.centerCellCtrls=this.removeCellCtrl(this.centerCellCtrls,z),this.leftCellCtrls=this.removeCellCtrl(this.leftCellCtrls,z),this.rightCellCtrls=this.removeCellCtrl(this.rightCellCtrls,z),z.destroy(),this.updateColumnLists()}removeCellCtrl(z,J){let Q={list:[],map:{}};for(let Z of z.list){if(Z===J)continue;Q.list.push(Z),Q.map[Z.column.getInstanceId()]=Z}return Q}onMouseEvent(z,J){switch(z){case"dblclick":this.onRowDblClick(J);break;case"click":this.onRowClick(J);break;case"pointerdown":case"touchstart":case"mousedown":this.onRowMouseDown(J);break}}createRowEvent(z,J){let{rowNode:Q}=this;return v(this.gos,{type:z,node:Q,data:Q.data,rowIndex:Q.rowIndex,rowPinned:Q.rowPinned,event:J})}createRowEventWithSource(z,J){let Q=this.createRowEvent(z,J);return Q.source=this,Q}onRowDblClick(z){if(_4(z))return;let J=this.createRowEventWithSource("rowDoubleClicked",z);J.isEventHandlingSuppressed=this.isSuppressMouseEvent(z),this.beans.eventSvc.dispatchEvent(J)}findFullWidthInfoForEvent(z){if(!z)return;let J=this.findFullWidthRowGui(z.target),Q=this.getColumnForFullWidth(J),Z=this.getPinnedForFullWidth(J);if(!J||!Q)return;return{rowGui:J,column:Q,pinned:Z}}findFullWidthRowGui(z){return this.allRowGuis.find((J)=>J.element.contains(z))}getColumnForFullWidth(z){let{visibleCols:J}=this.beans;switch(z?.containerType){case"center":return J.centerCols[0];case"left":return J.leftCols[0];case"right":return J.rightCols[0];default:return J.allCols[0]}}getPinnedForFullWidth(z){let J=z?.containerType;return J==="left"||J==="right"?J:void 0}addManagedGuiElementListeners(z,J){let{compBean:Q,element:Z}=z;if(this.guiListenerOwners.get(Z)===Q)return;this.guiListenerOwners.set(Z,Q),Q.addManagedElementListeners(Z,J)}onRowMouseDown(z){if(this.lastMouseDownOnDragger=sz(z.target,"ag-row-drag",3),!this.isFullWidth()||this.isSuppressMouseEvent(z))return;let{rangeSvc:J,focusSvc:Q}=this.beans;J?.removeAllCellRanges();let Z=this.findFullWidthInfoForEvent(z);if(!Z)return;let{rowGui:$,column:X}=Z,Y=$.element,U=z.target,_=this.rowNode,H=z.defaultPrevented||fz();if(Y&&Y.contains(U)&&D2(U))H=!1;Q.setFocusedCell({rowIndex:_.rowIndex,column:X,rowPinned:_.rowPinned,forceBrowserFocus:H})}isSuppressMouseEvent(z){let{gos:J,rowNode:Q}=this;if(this.isFullWidth()){let $=this.findFullWidthRowGui(z.target);return Zq(J,$?.rowComp.getFullWidthCellRendererParams(),Q,z)}let Z=a2(J,z.target);return Z!=null&&w6(J,Z.column,Q,z)}onRowClick(z){if(_4(z)||this.lastMouseDownOnDragger)return;let Q=this.isSuppressMouseEvent(z),{eventSvc:Z,selectionSvc:$}=this.beans,X=this.createRowEventWithSource("rowClicked",z);if(X.isEventHandlingSuppressed=Q,Z.dispatchEvent(X),Q)return;$?.handleSelectionEvent(z,this.rowNode,"rowClicked")}setupDetailRowAutoHeight(z){if(this.rowType!=="FullWidthDetail")return;this.beans.masterDetailSvc?.setupDetailRowAutoHeight(this,z)}createFullWidthCompDetails(z,J){let{gos:Q,rowNode:Z}=this,$=v(Q,{fullWidth:!0,data:Z.data,node:Z,value:Z.key,valueFormatted:Z.key,eGridCell:z,eParentOfValue:z,pinned:J,addRenderedRowListener:this.addEventListener.bind(this),registerRowDragger:(Y,U,_,H)=>this.addFullWidthRowDragging(Y,U,_,H),setTooltip:(Y,U)=>{Q.assertModuleRegistered("Tooltip",3),this.setupFullWidthRowTooltip(Y,U)}}),X=this.beans.userCompFactory;switch(this.rowType){case"FullWidthDetail":return dG(X,$);case"FullWidthGroup":{let{value:Y,valueFormatted:U}=this.beans.valueSvc.getValueForDisplay({node:this.rowNode,includeValueFormatted:!0,from:"edit"});return $.value=Y,$.valueFormatted=U,iG(X,$)}case"FullWidthLoading":return pG(X,$);default:return cG(X,$)}}setupFullWidthRowTooltip(z,J){if(!this.fullWidthGui)return;this.tooltipFeature=this.beans.tooltipSvc?.setupFullWidthRowTooltip(this.tooltipFeature,this,z,J)}addFullWidthRowDragging(z,J,Q="",Z){let{rowDragSvc:$,context:X}=this.beans;if(!$||!this.isFullWidth())return;let Y=$.createRowDragComp(()=>Q,this.rowNode,void 0,z,J,Z);this.createBean(Y,X),this.addDestroyFunc(()=>{this.destroyBean(Y,X)})}onUiLevelChanged(){let z=S8(this.rowNode);if(this.rowLevel!=z){let J="ag-row-level-"+z,Q="ag-row-level-"+this.rowLevel;for(let Z of this.allRowGuis)Z.rowComp.toggleCss(J,!0),Z.rowComp.toggleCss(Q,!1)}this.rowLevel=z}isFirstRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getFirstRow()}isLastRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getLastRow()}refreshFirstAndLastRowStyles(){let z=this.isFirstRowOnPage(),J=this.isLastRowOnPage();if(this.firstRowOnPage!==z){this.firstRowOnPage=z;for(let Q of this.allRowGuis)Q.rowComp.toggleCss("ag-row-first",z)}if(this.lastRowOnPage!==J){this.lastRowOnPage=J;for(let Q of this.allRowGuis)Q.rowComp.toggleCss("ag-row-last",J)}}getAllCellCtrls(){if(this.leftCellCtrls.list.length===0&&this.rightCellCtrls.list.length===0)return this.centerCellCtrls.list;return[...this.centerCellCtrls.list,...this.leftCellCtrls.list,...this.rightCellCtrls.list]}postProcessClassesFromGridOptions(){let z=[];if(this.beans.rowStyleSvc?.processClassesFromGridOptions(z,this.rowNode),!z.length)return;for(let J of z)for(let Q of this.allRowGuis)Q.rowComp.toggleCss(J,!0)}postProcessRowClassRules(){this.beans.rowStyleSvc?.processRowClassRules(this.rowNode,(z)=>{for(let J of this.allRowGuis)J.rowComp.toggleCss(z,!0)},(z)=>{for(let J of this.allRowGuis)J.rowComp.toggleCss(z,!1)})}setStylesFromGridOptions(z,J){if(z)this.rowStyles=this.processStylesFromGridOptions();this.forEachGui(J,(Q)=>Q.rowComp.setUserStyles(this.rowStyles))}getPinnedForContainer(z){if(z==="left"||z==="right")return z;return null}getInitialRowClasses(z){let J=this.getPinnedForContainer(z),Q=this.isFullWidth(),{rowNode:Z,beans:$}=this,X=[];if(X.push("ag-row"),X.push(this.rowFocused?"ag-row-focus":"ag-row-no-focus"),this.fadeInAnimation[z])X.push("ag-opacity-zero");if(X.push(Z.rowIndex%2===0?"ag-row-even":"ag-row-odd"),Z.isRowPinned()){if(X.push("ag-row-pinned"),$.pinnedRowModel?.isManual())X.push("ag-row-pinned-manual")}if(!Z.isRowPinned()&&Z.pinnedSibling)X.push("ag-row-pinned-source");if(Z.isSelected())X.push("ag-row-selected");if(Z.footer)X.push("ag-row-footer");if(X.push("ag-row-level-"+this.rowLevel),Z.stub)X.push("ag-row-loading");if(Q)X.push("ag-full-width-row");if($.expansionSvc?.addExpandedCss(X,Z),Z.dragging)X.push("ag-row-dragging");let{rowStyleSvc:Y}=$;if(Y)Y.processClassesFromGridOptions(X,Z),Y.preProcessRowClassRules(X,Z);if(X.push(this.printLayout?"ag-row-position-relative":"ag-row-position-absolute"),this.isFirstRowOnPage())X.push("ag-row-first");if(this.isLastRowOnPage())X.push("ag-row-last");if(Q){if(J==="left")X.push("ag-cell-last-left-pinned");if(J==="right")X.push("ag-cell-first-right-pinned")}return X}processStylesFromGridOptions(){return this.beans.rowStyleSvc?.processStylesFromGridOptions(this.rowNode)??this.emptyStyle}onRowSelected(z){this.beans.selectionSvc?.onRowCtrlSelected(this,(J)=>{if(J===this.centerGui||J===this.fullWidthGui)this.announceDescription()},z)}announceDescription(z){this.beans.selectionSvc?.announceAriaRowSelection(this.rowNode),this.announceNoteDescription(z)}announceNoteDescription(z){let{notesSvc:J,ariaAnnounce:Q}=this.beans;if(!J||!Q||!z&&!this.isFullWidth())return;let Z={rowNode:this.rowNode},$=z?{column:z.column}:{location:"fullWidthRow"},X={...Z,...$};if(J.getNoteAccess(X)?.canView){let U=this.getLocaleTextFunc();Q.announceValue(U("ariaHasNote","This cell has a note."),"note")}}addHoverFunctionality(z){if(!this.active)return;let{element:J,compBean:Q}=z,{rowNode:Z,beans:$,gos:X}=this;Q.addManagedListeners(J,{pointerenter:(Y)=>{if(Y.pointerType==="mouse")Z.dispatchRowEvent("mouseEnter")},pointerleave:(Y)=>{if(Y.pointerType==="mouse")Z.dispatchRowEvent("mouseLeave")}}),Q.addManagedListeners(Z,{mouseEnter:()=>{if(!$.dragSvc?.dragging&&!X.get("suppressRowHoverHighlight"))J.classList.add("ag-row-hover"),Z.setHovered(!0)},mouseLeave:()=>{this.resetHoveredStatus(J)}})}resetHoveredStatus(z){let J=z?[z]:this.allRowGuis.map((Q)=>Q.element);for(let Q of J)Q.classList.remove("ag-row-hover");this.rowNode.setHovered(!1)}roundRowTopToBounds(z){let J=this.beans.ctrlsSvc.getScrollFeature().getApproximateVScollPosition(),Q=this.applyPaginationOffset(J.top,!0)-100,Z=this.applyPaginationOffset(J.bottom,!0)+100;return Math.min(Math.max(Q,z),Z)}forEachGui(z,J){if(z)J(z);else for(let Q of this.allRowGuis)J(Q)}isRowRendered(){return this.allRowGuis.length>0}onRowHeightChanged(z){if(this.rowNode.rowHeight==null)return;let J=this.rowNode.rowHeight,Q=this.beans.environment.getDefaultRowHeight(),$=x9(this.gos)?k2(this.beans,this.rowNode).height:void 0,X=$?`${Math.min(Q,$)-2}px`:void 0;this.forEachGui(z,(Y)=>{if(Y.element.style.height=`${J}px`,X)Y.element.style.setProperty("--ag-line-height",X)})}destroyFirstPass(z=!1){this.active=!1;let{rowNode:J}=this;if(!z&&w1(this.gos)&&!J.sticky)if(J.rowTop!=null){let $=this.roundRowTopToBounds(J.rowTop);this.setRowTop($)}else for(let $ of this.allRowGuis)$.rowComp.toggleCss("ag-opacity-zero",!0);if(this.fullWidthGui?.element.contains(d(this.beans)))this.beans.focusSvc.attemptToRecoverFocus();J.setHovered(!1);let Q=this.createRowEvent("virtualRowRemoved");this.dispatchLocalEvent(Q),this.beans.eventSvc.dispatchEvent(Q),super.destroy()}destroySecondPass(){this.allRowGuis.length=0;let z=(J)=>{for(let Q of J.list)Q.destroy();return{list:[],map:{}}};this.centerCellCtrls=z(this.centerCellCtrls),this.leftCellCtrls=z(this.leftCellCtrls),this.rightCellCtrls=z(this.rightCellCtrls)}setFocusedClasses(z){this.forEachGui(z,(J)=>{J.rowComp.toggleCss("ag-row-focus",this.rowFocused),J.rowComp.toggleCss("ag-row-no-focus",!this.rowFocused)})}onCellFocusChanged(){let{focusSvc:z}=this.beans,J=z.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);if(J!==this.rowFocused)this.rowFocused=J,this.setFocusedClasses()}onPaginationChanged(){let z=this.beans.pagination?.getCurrentPage()??0;if(this.paginationPage!==z)this.paginationPage=z,this.onTopChanged();this.refreshFirstAndLastRowStyles()}onTopChanged(){this.setRowTop(this.rowNode.rowTop)}onPaginationPixelOffsetChanged(){this.onTopChanged()}applyPaginationOffset(z,J=!1){if(this.rowNode.isRowPinned()||this.rowNode.sticky)return z;let Q=this.beans.pageBounds.getPixelOffset();return z+Q*(J?1:-1)}setRowTop(z){if(this.printLayout)return;if(I(z)){let J=this.applyPaginationOffset(z),$=`${this.rowNode.isRowPinned()||this.rowNode.sticky?J:this.beans.rowContainerHeight.getRealPixelPosition(J)}px`;this.setRowTopStyle($)}}getInitialRowTop(z){return this.suppressRowTransform?this.getInitialRowTopShared(z):void 0}getInitialTransform(z){return this.suppressRowTransform?void 0:`translateY(${this.getInitialRowTopShared(z)})`}getInitialRowTopShared(z){if(this.printLayout)return"";let J=this.rowNode,Q;if(J.sticky)Q=J.stickyRowTop;else{let Z=this.slideInAnimation[z]?this.roundRowTopToBounds(J.oldRowTop):J.rowTop,$=this.applyPaginationOffset(Z);Q=J.isRowPinned()?$:this.beans.rowContainerHeight.getRealPixelPosition($)}return Q+"px"}setRowTopStyle(z){for(let J of this.allRowGuis)if(this.suppressRowTransform)J.rowComp.setTop(z);else J.rowComp.setTransform(`translateY(${z})`)}getCellCtrl(z,J=!1){let Q=null;for(let Z of this.getAllCellCtrls())if(Z.column==z)Q=Z;if(Q!=null||J)return Q;for(let Z of this.getAllCellCtrls())if(Z?.getColSpanningList().indexOf(z)>=0)Q=Z;return Q}onRowIndexChanged(){if(this.rowNode.rowIndex!=null)this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss()}updateRowIndexes(z){let J=this.rowNode.getRowIndexString();if(J===null)return;let Q=(this.beans.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0)+(this.beans.filterManager?.getHeaderRowCount()??0),Z=this.rowNode.rowIndex%2===0,$=this.ariaRowIndex=Q+this.rowNode.rowIndex+1;this.forEachGui(z,(X)=>{X.rowComp.setRowIndex(J),X.rowComp.toggleCss("ag-row-even",Z),X.rowComp.toggleCss("ag-row-odd",!Z),h6(X.element,$)})}},FF=class extends j{constructor(){super();this.beanName="navigation",this.onPageDown=u7(this.onPageDown,100),this.onPageUp=u7(this.onPageUp,100)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,(z)=>{this.gridBodyCon=z.gridBodyCtrl})}handlePageScrollingKey(z,J=!1){let{key:Q,altKey:Z}=z,$=z.ctrlKey||z.metaKey,X=!!this.beans.rangeSvc&&z.shiftKey,Y=M5(this.gos,z),U=!1;switch(Q){case R.PAGE_HOME:case R.PAGE_END:if(!$&&!Z)this.onHomeOrEndKey(Q),U=!0;break;case R.LEFT:case R.RIGHT:case R.UP:case R.DOWN:if(!Y)return!1;if($&&!Z&&!X)this.onCtrlUpDownLeftRight(Q,Y),U=!0;break;case R.PAGE_DOWN:case R.PAGE_UP:if(!$&&!Z)U=this.handlePageUpDown(Q,Y,J);break}if(U)z.preventDefault();return U}handlePageUpDown(z,J,Q){if(Q)J=this.beans.focusSvc.getFocusedCell();if(!J)return!1;if(z===R.PAGE_UP)this.onPageUp(J);else this.onPageDown(J);return!0}navigateTo({scrollIndex:z,scrollType:J,scrollColumn:Q,focusIndex:Z,focusColumn:$,isAsync:X,rowPinned:Y}){let{scrollFeature:U}=this.gridBodyCon;if(I(Q)&&!Q.isPinned())U.ensureColumnVisible(Q);if(I(z))U.ensureIndexVisible(z,J);if(!X)U.ensureIndexVisible(Z);let{focusSvc:_}=this.beans;_.setFocusedCell({rowIndex:Z,column:$,rowPinned:Y,forceBrowserFocus:!0}),this.setRangeToCellIfSupported({rowIndex:Z,rowPinned:Y,column:$})}onPageDown(z){let J=this.beans,Q=pQ(J),Z=this.getViewportHeight(),{pageBounds:$,rowModel:X,rowAutoHeight:Y}=J,U=$.getPixelOffset(),_=Q.top+Z,H=X.getRowIndexAtPixel(_+U);if(Y?.active)this.navigateToNextPageWithAutoHeight(z,H);else this.navigateToNextPage(z,H)}onPageUp(z){let J=this.beans,Q=pQ(J),{pageBounds:Z,rowModel:$,rowAutoHeight:X}=J,Y=Z.getPixelOffset(),U=Q.top,_=$.getRowIndexAtPixel(U+Y);if(X?.active)this.navigateToNextPageWithAutoHeight(z,_,!0);else this.navigateToNextPage(z,_,!0)}navigateToNextPage(z,J,Q=!1){let{pageBounds:Z,rowModel:$}=this.beans,X=this.getViewportHeight(),Y=Z.getFirstRow(),U=Z.getLastRow(),_=Z.getPixelOffset(),H=$.getRow(z.rowIndex),G=Q?H?.rowHeight-X-_:X-_,W=H?.rowTop+G,q=$.getRowIndexAtPixel(W+_);if(q===z.rowIndex){let M=Q?-1:1;J=q=z.rowIndex+M}let B;if(Q){if(B="bottom",q<Y)q=Y;if(J<Y)J=Y}else{if(B="top",q>U)q=U;if(J>U)J=U}if(this.isRowTallerThanView($.getRow(q)))J=q,B="top";let E={rowIndex:q,column:z.column,rowPinned:null},K=this.getNormalisedPosition(E),{rowIndex:F,column:L}=K??E;this.navigateTo({scrollIndex:J,scrollType:B,scrollColumn:null,focusIndex:F,focusColumn:L})}navigateToNextPageWithAutoHeight(z,J,Q=!1){this.navigateTo({scrollIndex:J,scrollType:Q?"bottom":"top",scrollColumn:null,focusIndex:J,focusColumn:z.column}),setTimeout(()=>{let Z=this.getNextFocusIndexForAutoHeight(z,Q);this.navigateTo({scrollIndex:J,scrollType:Q?"bottom":"top",scrollColumn:null,focusIndex:Z,focusColumn:z.column,isAsync:!0})},50)}getNextFocusIndexForAutoHeight(z,J=!1){let Q=J?-1:1,Z=this.getViewportHeight(),{pageBounds:$,rowModel:X}=this.beans,Y=$.getLastRow(),U=0,_=z.rowIndex;while(_>=0&&_<=Y){let H=X.getRow(_);if(H){let G=H.rowHeight??0;if(U+G>Z)break;U+=G}_+=Q}return Math.max(0,Math.min(_,Y))}getViewportHeight(){let z=this.beans,J=pQ(z),Q=this.beans.scrollVisibleSvc.getScrollbarWidth(),Z=J.bottom-J.top;if(z.ctrlsSvc.get("center").isHorizontalScrollShowing())Z-=Q;return Z}isRowTallerThanView(z){if(!z)return!1;let J=z.rowHeight;if(typeof J!=="number")return!1;return J>this.getViewportHeight()}onCtrlUpDownLeftRight(z,J){let Q=this.beans.cellNavigation.getNextCellToFocus(z,J,!0);if(!Q)return;let Z=this.getNormalisedPosition(Q),{rowIndex:$,rowPinned:X,column:Y}=Z??Q,U=Y;this.navigateTo({scrollIndex:$,scrollType:null,scrollColumn:U,focusIndex:$,focusColumn:U,rowPinned:X})}onHomeOrEndKey(z){let J=z===R.PAGE_HOME,{visibleCols:Q,pageBounds:Z,rowModel:$}=this.beans,X=Q.allCols,Y=J?Z.getFirstRow():Z.getLastRow(),U=$.getRow(Y);if(!U)return;let _=(J?X:[...X].reverse()).find((H)=>!H.isSuppressNavigable(U)&&!w0(H));if(!_)return;this.navigateTo({scrollIndex:Y,scrollType:null,scrollColumn:_,focusIndex:Y,focusColumn:_})}onTabKeyDown(z,J){let Q=J.shiftKey,Z=this.tabToNextCellCommon(z,Q,J),$=this.beans,{ctrlsSvc:X,pageBounds:Y,focusSvc:U,gos:_}=$;if(Z!==!1){if(Z)J.preventDefault();else if(Z===null)X.get("gridCtrl").allowFocusForNextCoreContainer(Q);return}if(Q){let{rowIndex:H,rowPinned:G}=z.getRowPosition();if(G?H===0:H===Y.getFirstRow())if(_.get("headerHeight")===0||D4($))W4($,!0,!0);else J.preventDefault(),U.focusPreviousFromFirstCell(J)}else{if(z instanceof V2)z.focusCell(!0);if(U.focusOverlay(!1)||W4($,Q))J.preventDefault()}}tabToNextCell(z,J){let Q=this.beans,{focusSvc:Z,rowRenderer:$}=Q,X=Z.getFocusedCell();if(!X)return!1;let Y=Y4(Q,X);if(!Y){if(Y=$.getRowByPosition(X),!Y?.isFullWidth())return!1}return!!this.tabToNextCellCommon(Y,z,J,"api")}tabToNextCellCommon(z,J,Q,Z="ui"){let{editSvc:$,focusSvc:X}=this.beans,Y,U=z instanceof V2?z:z.getAllCellCtrls()?.[0];if($?.isEditing())Y=$?.moveToNextCell(U,J,Q,Z);else Y=this.moveToNextCellNotEditing(z,J,Q);if(Y===null)return Y;return Y||!!X.focusedHeader}moveToNextCellNotEditing(z,J,Q){let Z=this.beans.visibleCols.allCols,$;if(z instanceof KZ){if($={...z.getRowPosition(),column:J?Z[0]:N(Z)},this.gos.get("embedFullWidthRows")&&Q){let Y=z.findFullWidthInfoForEvent(Q);if(Y)$.column=Y.column}}else $=z.getFocusedCellPosition();let X=this.findNextCellToFocusOn($,{backwards:J,startEditing:!1});if(X===!1)return null;if(X instanceof V2)X.focusCell(!0);else if(X)return this.tryToFocusFullWidthRow(X,J);return I(X)}findNextCellToFocusOn(z,{backwards:J,startEditing:Q,skipToNextEditableCell:Z}){let $=z,X=this.beans,{cellNavigation:Y,gos:U,focusSvc:_,rowRenderer:H}=X;while(!0){if(z!==$)z=$;if(!J)$=this.getLastCellOfColSpan($);$=Y.getNextTabbedCell($,J);let G=U.getCallback("tabToNextCell");if(I(G)){let E=G({backwards:J,editing:Q,previousCellPosition:z,nextCellPosition:$?$:null});if(E===!0)$=z;else if(E===!1)return!1;else $={rowIndex:E.rowIndex,column:E.column,rowPinned:E.rowPinned}}if(!$)return null;if($.rowIndex<0){let B=Z4(X);return _.focusHeaderPosition({headerPosition:{headerRowIndex:B+$.rowIndex,column:$.column},fromCell:!0}),null}let W=U.get("editType")==="fullRow";if(Q&&(!W||Z)){if(!this.isCellEditable($))continue}this.ensureCellVisible($);let q=Y4(X,$);if(!q){let B=H.getRowByPosition($);if(!B||!B.isFullWidth()||Q)continue;return{...B.getRowPosition(),column:$?.column}}if(Y.isSuppressNavigable(q.column,q.rowNode))continue;return q.setFocusedCellPosition($),this.setRangeToCellIfSupported($),q}}isCellEditable(z){let J=this.lookupRowNodeForCell(z);if(J)return z.column.isCellEditable(J);return!1}lookupRowNodeForCell({rowIndex:z,rowPinned:J}){let{pinnedRowModel:Q,rowModel:Z}=this.beans;if(J==="top")return Q?.getPinnedTopRow(z);if(J==="bottom")return Q?.getPinnedBottomRow(z);return Z.getRow(z)}navigateToNextCell(z,J,Q,Z){let $=Q,X=!1,Y=this.beans,{cellNavigation:U,focusSvc:_,gos:H}=Y;while($&&($===Q||!this.isValidNavigateCell($))){if(H.get("enableRtl")){if(J===R.LEFT)$=this.getLastCellOfColSpan($)}else if(J===R.RIGHT)$=this.getLastCellOfColSpan($);$=U.getNextCellToFocus(J,$),X=n($)}if(X&&z?.key===R.UP)$={rowIndex:-1,rowPinned:null,column:Q.column};if(Z){let W=H.getCallback("navigateToNextCell");if(I(W)){let B=W({key:J,previousCellPosition:Q,nextCellPosition:$?$:null,event:z});if(I(B))$={rowPinned:B.rowPinned,rowIndex:B.rowIndex,column:B.column};else $=null}}if(!$)return;if($.rowIndex<0){let W=Z4(Y);_.focusHeaderPosition({headerPosition:{headerRowIndex:W+$.rowIndex,column:$.column??Q.column},event:z||void 0,fromCell:!0});return}let G=this.getNormalisedPosition($);if(G)this.focusPosition(G);else this.tryToFocusFullWidthRow($)}getNormalisedPosition(z){if(!!this.beans.spannedRowRenderer?.getCellByPosition(z))return z;this.ensureCellVisible(z);let Q=Y4(this.beans,z);if(!Q)return null;return z=Q.getFocusedCellPosition(),this.ensureCellVisible(z),z}tryToFocusFullWidthRow(z,J){let{visibleCols:Q,rowRenderer:Z,focusSvc:$,eventSvc:X}=this.beans,Y=Q.allCols;if(!Z.getRowByPosition(z)?.isFullWidth())return!1;let _=$.getFocusedCell(),H={rowIndex:z.rowIndex,rowPinned:z.rowPinned,column:z.column||(J?N(Y):Y[0])};this.focusPosition(H);let G=J==null?_!=null&&q0(H,_):J;return X.dispatchEvent({type:"fullWidthRowFocused",rowIndex:H.rowIndex,rowPinned:H.rowPinned,column:H.column,isFullWidthCell:!0,fromBelow:G}),!0}focusPosition(z){let{focusSvc:J}=this.beans;J.setFocusedCell({rowIndex:z.rowIndex,column:z.column,rowPinned:z.rowPinned,forceBrowserFocus:!0}),this.setRangeToCellIfSupported(z)}setRangeToCellIfSupported(z){if(w0(z.column))return;this.beans.rangeSvc?.setRangeToCell(z)}isValidNavigateCell(z){return!!j0(this.beans,z)}getLastCellOfColSpan(z){let J=Y4(this.beans,z);if(!J)return z;let Q=J.getColSpanningList();if(Q.length===1)return z;return{rowIndex:z.rowIndex,column:N(Q),rowPinned:z.rowPinned}}ensureCellVisible(z){let J=s1(this.gos),Q=this.beans.rowModel.getRow(z.rowIndex),Z=J&&Q?.sticky,{scrollFeature:$}=this.gridBodyCon;if(!Z&&n(z.rowPinned))$.ensureIndexVisible(z.rowIndex);if(!z.column.isPinned())$.ensureColumnVisible(z.column)}ensureColumnVisible(z){let J=this.gridBodyCon.scrollFeature;if(!z.isPinned())J.ensureColumnVisible(z)}ensureRowVisible(z){this.gridBodyCon.scrollFeature.ensureIndexVisible(z)}};function pQ(z){return z.ctrlsSvc.getScrollFeature().getVScrollPosition()}var G1={moduleName:"KeyboardNavigation",version:p,beans:[FF,yK,n3],apiFunctions:{getFocusedCell:xK,clearFocusedCell:bK,setFocusedCell:gK,setFocusedHeader:mK,tabToNextCell:hK,tabToPreviousCell:uK}},LF=class extends j{constructor(){super(...arguments);this.beanName="pageBoundsListener"}postConstruct(){this.addManagedEventListeners({modelUpdated:this.onModelUpdated.bind(this),recalculateRowBounds:this.calculatePages.bind(this)}),this.onModelUpdated()}onModelUpdated(z){this.calculatePages(),this.eventSvc.dispatchEvent({type:"paginationChanged",animate:z?.animate??!1,newData:z?.newData??!1,newPage:z?.newPage??!1,newPageSize:z?.newPageSize??!1,keepRenderedRows:z?.keepRenderedRows??!1})}calculatePages(){let{pageBounds:z,pagination:J,rowModel:Q}=this.beans;if(J)J.calculatePages();else z.calculateBounds(0,Q.getRowCount()-1)}},MF=class extends j{constructor(){super(...arguments);this.beanName="pageBounds",this.pixelOffset=0}getFirstRow(){return this.topRowBounds?.rowIndex??-1}getLastRow(){return this.bottomRowBounds?.rowIndex??-1}getCurrentPageHeight(){let{topRowBounds:z,bottomRowBounds:J}=this;if(!z||!J)return 0;return Math.max(J.rowTop+J.rowHeight-z.rowTop,0)}getCurrentPagePixelRange(){let{topRowBounds:z,bottomRowBounds:J}=this,Q=z?.rowTop??0,Z=J?J.rowTop+J.rowHeight:0;return{pageFirstPixel:Q,pageLastPixel:Z}}calculateBounds(z,J){let{rowModel:Q}=this.beans,Z=Q.getRowBounds(z);if(Z)Z.rowIndex=z;this.topRowBounds=Z;let $=Q.getRowBounds(J);if($)$.rowIndex=J;this.bottomRowBounds=$,this.calculatePixelOffset()}getPixelOffset(){return this.pixelOffset}calculatePixelOffset(){let z=this.topRowBounds?.rowTop??0;if(this.pixelOffset===z)return;this.pixelOffset=z,this.eventSvc.dispatchEvent({type:"paginationPixelOffsetChanged"})}},DF=".ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top{min-width:0;overflow:hidden;position:relative}.ag-pinned-left-sticky-top,.ag-pinned-right-sticky-top{height:100%;overflow:hidden;position:relative}.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{height:100%;overflow:hidden;width:100%}.ag-pinned-left-header,.ag-pinned-right-header{display:inline-block;height:100%;overflow:hidden;position:relative}.ag-body-horizontal-scroll:not(.ag-scrollbar-invisible){.ag-horizontal-left-spacer:not(.ag-scroller-corner){border-right:var(--ag-pinned-column-border)}.ag-horizontal-right-spacer:not(.ag-scroller-corner){border-left:var(--ag-pinned-column-border)}}.ag-pinned-right-header{border-left:var(--ag-pinned-column-border)}.ag-pinned-left-header{border-right:var(--ag-pinned-column-border)}.ag-cell.ag-cell-first-right-pinned:not(.ag-cell-range-left,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-left:var(--ag-pinned-column-border)}.ag-cell.ag-cell-last-left-pinned:not(.ag-cell-range-right,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-right:var(--ag-pinned-column-border)}.ag-pinned-left-header .ag-header-cell-resize:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}.ag-pinned-right-header .ag-header-cell-resize:after{left:50%}.ag-pinned-left-header .ag-header-cell-resize{right:-3px}.ag-pinned-right-header .ag-header-cell-resize{left:-3px}",RF=class extends j{constructor(z,J){super();this.isLeft=z,this.elements=J,this.getWidth=z?()=>this.beans.pinnedCols.leftWidth:()=>this.beans.pinnedCols.rightWidth}postConstruct(){this.addManagedEventListeners({[`${this.isLeft?"left":"right"}PinnedWidthChanged`]:this.onPinnedWidthChanged.bind(this)})}onPinnedWidthChanged(){let z=this.getWidth(),J=z>0;for(let Q of this.elements)if(Q)x(Q,J),h4(Q,z)}},b6=50,AF=class extends j{constructor(){super(...arguments);this.beanName="pinnedCols"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,(J)=>{this.gridBodyCtrl=J.gridBodyCtrl});let z=this.checkContainerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:z,displayedColumnsWidthChanged:z}),this.addManagedPropertyListener("domLayout",z)}checkContainerWidths(){let{gos:z,visibleCols:J,eventSvc:Q}=this.beans,Z=T0(z,"print"),$=Z?0:J.getColsLeftWidth(),X=Z?0:J.getDisplayedColumnsRightWidth();if($!=this.leftWidth)this.leftWidth=$,Q.dispatchEvent({type:"leftPinnedWidthChanged"});if(X!=this.rightWidth)this.rightWidth=X,Q.dispatchEvent({type:"rightPinnedWidthChanged"})}keepPinnedColumnsNarrowerThanViewport(){let z=this.gridBodyCtrl.eBodyViewport,J=z1(z);if(J<=b6)return;let Q=this.getPinnedColumnsOverflowingViewport(J-b6),Z=this.gos.getCallback("processUnpinnedColumns"),{columns:$,hasLockedPinned:X}=Q,Y=$;if(!Y.length&&!X)return;if(Z)Y=Z({columns:Y,viewportWidth:J});if(!Y?.length)return;Y=Y.filter((U)=>!w0(U)),this.setColsPinned(Y,null,"viewportSizeFeature")}createPinnedWidthFeature(z,...J){return new RF(z,J)}setColsPinned(z,J,Q){let{colModel:Z,colAnimation:$,visibleCols:X,gos:Y}=this.beans;if(!Z.cols)return;if(!z?.length)return;if(T0(Y,"print")){V(37);return}$?.start();let U;if(J===!0||J==="left")U="left";else if(J==="right")U="right";else U=null;let _=[];for(let H of z){if(!H)continue;let G=Z.getCol(H);if(!G)continue;if(G.getPinned()!==U)this.setColPinned(G,U),_.push(G)}if(_.length)X.refresh(Q),o$(this.eventSvc,_,Q);$?.finish()}initCol(z){let{pinned:J,initialPinned:Q}=z.colDef;if(J!==void 0)this.setColPinned(z,J);else this.setColPinned(z,Q)}setColPinned(z,J){if(J===!0||J==="left")z.pinned="left";else if(J==="right")z.pinned="right";else z.pinned=null;z.dispatchStateUpdatedEvent("pinned")}setupHeaderPinnedWidth(z){let{scrollVisibleSvc:J}=this.beans;if(z.pinned==null)return;let Q=z.pinned==="left",Z=z.pinned==="right";z.hidden=!0;let $=()=>{let X=Q?this.leftWidth:this.rightWidth;if(X==null)return;let Y=X==0,U=z.hidden!==Y,_=this.gos.get("enableRtl"),H=J.getScrollbarWidth(),W=J.verticalScrollShowing&&(_&&Q||!_&&Z)?X+H:X;if(z.comp.setPinnedContainerWidth(`${W}px`),z.comp.setDisplayed(!Y),U)z.hidden=Y,z.refresh()};z.addManagedEventListeners({leftPinnedWidthChanged:$,rightPinnedWidthChanged:$,scrollVisibilityChanged:$,scrollbarWidthChanged:$})}getHeaderResizeDiff(z,J){if(J.getPinned()){let{leftWidth:Z,rightWidth:$}=this,X=z1(this.beans.ctrlsSvc.getGridBodyCtrl().eBodyViewport)-b6;if(Z+$+z>X)if(X>Z+$)z=X-Z-$;else return 0}return z}getPinnedColumnsOverflowingViewport(z){let J=this.rightWidth??0,Q=this.leftWidth??0,Z=J+Q,$=!1;if(Z<z)return{columns:[],hasLockedPinned:$};let{visibleCols:X}=this.beans,Y=[...X.leftCols],U=[...X.rightCols],_=0,H=0,G=0,W=[],q=Z-G-z;while((H<Y.length||_<U.length)&&q>0){if(_<U.length){let B=U[_++];if(B.colDef.lockPinned){$=!0;continue}q-=B.getActualWidth(),W.push(B)}if(H<Y.length&&q>0){let B=Y[H++];if(B.colDef.lockPinned){$=!0;continue}q-=B.getActualWidth(),W.push(B)}}return{columns:W,hasLockedPinned:$}}},jF={moduleName:"PinnedColumn",version:p,beans:[AF],css:[DF]},VF=class extends R0{constructor(){super();this.beanName="ariaAnnounce",this.descriptionContainer=null,this.pendingAnnouncements=new Map,this.lastAnnouncement="",this.updateAnnouncement=i0(this,this.updateAnnouncement.bind(this),200)}postConstruct(){let z=this.beans,J=Y0(z),Q=this.descriptionContainer=J.createElement("div");Q.classList.add("ag-aria-description-container"),_9(Q,"polite"),e_(Q,"additions text"),o_(Q,!0),z.eRootDiv.appendChild(Q)}announceValue(z,J){this.pendingAnnouncements.set(J,z),this.updateAnnouncement()}updateAnnouncement(){if(!this.descriptionContainer)return;let z=Array.from(this.pendingAnnouncements.values()).join(". ");this.pendingAnnouncements.clear(),this.descriptionContainer.textContent="",setTimeout(()=>{this.handleAnnouncementUpdate(z)},50)}handleAnnouncementUpdate(z){if(!this.isAlive()||!this.descriptionContainer)return;let J=z;if(J==null||J.replace(/[ .]/g,"")==""){this.lastAnnouncement="";return}if(this.lastAnnouncement===J)J=`${J}​`;this.lastAnnouncement=J,this.descriptionContainer.textContent=J}destroy(){super.destroy();let{descriptionContainer:z}=this;if(z)J0(z),z.remove();this.descriptionContainer=null,this.pendingAnnouncements.clear()}},OF=class extends VF{},PF={moduleName:"Aria",version:p,beans:[OF]},TF=":where(.ag-delay-render){.ag-cell,.ag-header-cell,.ag-header-group-cell,.ag-row,.ag-spanned-cell-wrapper{visibility:hidden}}",I8="ag-delay-render",SF=class extends j{constructor(){super(...arguments);this.beanName="colDelayRenderSvc",this.hideRequested=!1,this.alreadyRevealed=!1,this.timesRetried=0,this.requesters=new Set}hideColumns(z){if(this.alreadyRevealed||this.requesters.has(z))return;if(this.requesters.add(z),!this.hideRequested)this.beans.ctrlsSvc.whenReady(this,(J)=>{J.gridBodyCtrl.eGridBody.classList.add(I8)}),this.hideRequested=!0}revealColumns(z){if(this.alreadyRevealed||!this.isAlive())return;if(this.requesters.delete(z),this.requesters.size>0)return;let{renderStatus:J,ctrlsSvc:Q}=this.beans;if(J){if(!J.areHeaderCellsRendered()&&this.timesRetried<5){this.timesRetried++,setTimeout(()=>this.revealColumns(z));return}this.timesRetried=0}Q.getGridBodyCtrl().eGridBody.classList.remove(I8),this.alreadyRevealed=!0}},IF={moduleName:"ColumnDelayRender",version:p,beans:[SF],css:[TF]},vJ=class extends y{constructor(){super()}},fF={tag:"div",cls:"ag-overlay-exporting-center",children:[{tag:"span",ref:"eExportingIcon",cls:"ag-loading-icon"},{tag:"span",ref:"eExportingText",cls:"ag-exporting-text"}]},kF=class extends vJ{constructor(){super(...arguments);this.eExportingIcon=P,this.eExportingText=P}init(z){let{beans:J}=this;this.setTemplate(fF);let Q=h("overlayExporting",J,null);if(Q)this.eExportingIcon.appendChild(Q);let Z=z.exporting?.overlayText??this.getLocaleTextFunc()("exportingOoo","Exporting...");this.eExportingText.textContent=Z,J.ariaAnnounce.announceValue(Z,"overlay")}},CF={tag:"div",cls:"ag-overlay-loading-center",children:[{tag:"span",ref:"eLoadingIcon",cls:"ag-loading-icon"},{tag:"span",ref:"eLoadingText",cls:"ag-loading-text"}]},vF=class extends vJ{constructor(){super(...arguments);this.eLoadingIcon=P,this.eLoadingText=P}init(z){let{beans:J,gos:Q}=this,Z=U0(Q.get("overlayLoadingTemplate")?.trim());if(this.setTemplate(Z??CF),!Z){let $=h("overlayLoading",J,null);if($)this.eLoadingIcon.appendChild($);let X=z.loading?.overlayText??this.getLocaleTextFunc()("loadingOoo","Loading...");this.eLoadingText.textContent=X,J.ariaAnnounce.announceValue(X,"overlay")}}},NF={tag:"span",cls:"ag-overlay-no-matching-rows-center"},wF=class extends vJ{init(z){let{beans:J}=this;this.setTemplate(NF);let Q=z.noMatchingRows?.overlayText??this.getLocaleTextFunc()("noMatchingRows","No Matching Rows");this.getGui().textContent=Q,J.ariaAnnounce.announceValue(Q,"overlay")}},yF={tag:"span",cls:"ag-overlay-no-rows-center"},xF=class extends vJ{init(z){let{beans:J,gos:Q}=this,Z=U0(Q.get("overlayNoRowsTemplate")?.trim());if(this.setTemplate(Z??yF),!Z){let $=z.noRows?.overlayText??this.getLocaleTextFunc()("noRowsToShow","No Rows To Show");this.getGui().textContent=$,J.ariaAnnounce.announceValue($,"overlay")}}};function bF(z){z.overlays?.showLoadingOverlay()}function gF(z){z.overlays?.showNoRowsOverlay()}function hF(z){z.overlays?.hideOverlay()}var uF=".ag-overlay{inset:0;pointer-events:none;position:absolute;z-index:2}.ag-overlay-panel,.ag-overlay-wrapper{display:flex;height:100%;width:100%}.ag-overlay-wrapper{align-items:center;flex:none;justify-content:center;text-align:center}.ag-overlay-exporting-wrapper,.ag-overlay-loading-wrapper,.ag-overlay-modal-wrapper{pointer-events:all}.ag-overlay-exporting-center,.ag-overlay-loading-center{background:var(--ag-background-color);border:solid var(--ag-border-width) var(--ag-border-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-popup-shadow);display:flex;padding:var(--ag-spacing)}",mF={tag:"div",cls:"ag-overlay",role:"presentation",children:[{tag:"div",cls:"ag-overlay-panel",role:"presentation",children:[{tag:"div",ref:"eOverlayWrapper",cls:"ag-overlay-wrapper",role:"presentation"}]}]},SX=class extends y{constructor(){super(mF);this.eOverlayWrapper=P,this.activeOverlay=null,this.activePromise=null,this.activeCssClass=null,this.elToFocusAfter=null,this.overlayExclusive=!1,this.oldWrapperPadding=null,this.registerCSS(uF)}handleKeyDown(z){if(z.key!==R.TAB||z.defaultPrevented||_4(z))return;let{beans:J,eOverlayWrapper:Q}=this;if(Q&&I0(J,Q,!1,z.shiftKey))return;let $;if(z.shiftKey)$=J.focusSvc.focusGridView({column:N(J.visibleCols.allCols),backwards:!0,canFocusOverlay:!1});else $=W4(J,!1);if($)z.preventDefault()}updateLayoutClasses(z,J){let Q=this.eOverlayWrapper;if(!Q)return;let Z=Q.classList,{AUTO_HEIGHT:$,NORMAL:X,PRINT:Y}=R4;Z.toggle($,J.autoHeight),Z.toggle(X,J.normal),Z.toggle(Y,J.print)}postConstruct(){this.createManagedBean(new E5(this)),this.setDisplayed(!1,{skipAriaHidden:!0}),this.beans.overlays.setWrapperComp(this,!1),this.addManagedElementListeners(this.getFocusableElement(),{keydown:this.handleKeyDown.bind(this)}),this.addManagedEventListeners({gridSizeChanged:this.refreshWrapperPadding.bind(this)})}setWrapperTypeClass(z){let J=this.eOverlayWrapper?.classList;if(!J){this.activeCssClass=null;return}if(this.activeCssClass)J.toggle(this.activeCssClass,!1);this.activeCssClass=z,J.toggle(z,!0)}showOverlay(z,J,Q){if(this.destroyActiveOverlay(),this.elToFocusAfter=null,this.activePromise=z,this.overlayExclusive=Q,!z)return this.refreshWrapperPadding(),b.resolve();if(this.setWrapperTypeClass(J),this.setDisplayed(!0,{skipAriaHidden:!0}),this.refreshWrapperPadding(),Q&&this.isGridFocused()){let Z=d(this.beans);if(Z&&!Tz(this.beans))this.elToFocusAfter=Z}return z.then((Z)=>{let $=this.eOverlayWrapper;if(!$){this.destroyBean(Z);return}if(this.activePromise!==z){if(this.activeOverlay!==Z)this.destroyBean(Z);return}if(this.activePromise=null,!Z)return;if(this.activeOverlay!==Z)$.appendChild(Z.getGui()),this.activeOverlay=Z;if(Q&&this.isGridFocused())E0($)}),z}refreshWrapperPadding(){if(!this.eOverlayWrapper){this.oldWrapperPadding=null;return}let z=!!this.activeOverlay||!!this.activePromise,J=0;if(z&&!this.overlayExclusive)J=this.beans.ctrlsSvc.get("gridHeaderCtrl")?.headerHeight||0;if(J!==this.oldWrapperPadding)this.oldWrapperPadding=J,this.eOverlayWrapper.style.setProperty("padding-top",`${J}px`)}destroyActiveOverlay(){this.activePromise=null;let z=this.activeOverlay;if(!z){this.overlayExclusive=!1,this.elToFocusAfter=null,this.refreshWrapperPadding();return}let J=this.elToFocusAfter;if(this.elToFocusAfter=null,this.activeOverlay=null,this.overlayExclusive=!1,J&&!this.isGridFocused())J=null;this.destroyBean(z);let Q=this.eOverlayWrapper;if(Q)J0(Q);J?.focus?.({preventScroll:!0}),this.refreshWrapperPadding()}hideOverlay(){this.destroyActiveOverlay(),this.setDisplayed(!1,{skipAriaHidden:!0})}isGridFocused(){let z=d(this.beans);return!!z&&this.beans.eGridDiv.contains(z)}destroy(){this.elToFocusAfter=null,this.destroyActiveOverlay(),this.beans.overlays.setWrapperComp(this,!0),super.destroy(),this.eOverlayWrapper=null}},cF={selector:"AG-OVERLAY-WRAPPER",component:SX},pF=["refresh"],J6=(z)=>({name:z,optionalMethods:pF}),rz={id:"agLoadingOverlay",overlayType:"loading",comp:J6("loadingOverlayComponent"),wrapperCls:"ag-overlay-loading-wrapper",exclusive:!0,compKey:"loadingOverlayComponent",paramsKey:"loadingOverlayComponentParams",isSuppressed:(z)=>{let J=z.get("loading");return J===!1||z.get("suppressLoadingOverlay")===!0&&J!==!0}},k1={id:"agNoRowsOverlay",overlayType:"noRows",comp:J6("noRowsOverlayComponent"),wrapperCls:"ag-overlay-no-rows-wrapper",compKey:"noRowsOverlayComponent",paramsKey:"noRowsOverlayComponentParams",isSuppressed:(z)=>z.get("suppressNoRowsOverlay")},I5={id:"agNoMatchingRowsOverlay",overlayType:"noMatchingRows",comp:J6("noMatchingRowsOverlayComponent"),wrapperCls:"ag-overlay-no-matching-rows-wrapper"},QJ={id:"agExportingOverlay",overlayType:"exporting",comp:J6("exportingOverlayComponent"),wrapperCls:"ag-overlay-exporting-wrapper",exclusive:!0},g6={id:"activeOverlay",comp:J6("activeOverlay"),wrapperCls:"ag-overlay-modal-wrapper",exclusive:!0},iF=(z)=>{if(!z)return null;return{agLoadingOverlay:rz,agNoRowsOverlay:k1,agNoMatchingRowsOverlay:I5,agExportingOverlay:QJ}[z]??g6},dF=(z)=>{if(!z)return null;return{loading:rz,noRows:k1,noMatchingRows:I5,exporting:QJ}[z]},nF=class extends j{constructor(){super(...arguments);this.beanName="overlays",this.eWrapper=void 0,this.exclusive=!1,this.oldExclusive=!1,this.currentDef=null,this.showInitialOverlay=!0,this.userForcedNoRows=!1,this.exportsInProgress=0,this.newColumnsLoadedCleanup=null}postConstruct(){let z=this.gos;this.showInitialOverlay=o(z);let J=()=>{if(this.userForcedNoRows)return;this.updateOverlay(!1)},[Q,Z,$,X]=this.addManagedEventListeners({newColumnsLoaded:J,rowCountReady:()=>{this.disableInitialOverlay(),J(),Z()},rowDataUpdated:J,modelUpdated:J});this.newColumnsLoadedCleanup=Q,this.addManagedPropertyListeners(["loading","activeOverlay","activeOverlayParams","overlayComponentParams","loadingOverlayComponentParams","noRowsOverlayComponentParams"],(Y)=>this.onPropChange(new Set(Y.changeSet?.properties)))}destroy(){this.doHideOverlay(),super.destroy(),this.eWrapper=void 0}setWrapperComp(z,J){if(!this.isAlive())return;if(!J)this.eWrapper=z;else if(this.eWrapper===z)this.eWrapper=void 0;this.updateOverlay(!1)}isVisible(){return!!this.currentDef}showLoadingOverlay(){this.showInitialOverlay=!1;let z=this.gos;if(!this.eWrapper||z.get("activeOverlay"))return;if(this.isDisabled(rz))return;let J=z.get("loading");if(!J&&J!==void 0)return;this.doShowOverlay(rz)}showNoRowsOverlay(){this.showInitialOverlay=!1;let z=this.gos;if(!this.eWrapper||z.get("activeOverlay")||z.get("loading")||this.isDisabled(k1))return;this.userForcedNoRows=!0,this.doShowOverlay(k1)}async showExportOverlay(z){let{gos:J,beans:Q}=this;if(!this.eWrapper||J.get("activeOverlay")||J.get("loading")||this.isDisabled(QJ)||this.userForcedNoRows&&this.currentDef===k1){z();return}let Z=this.getDesiredDefWithOverride(QJ);if(!Z){z();return}this.exportsInProgress++,this.focusedCell=Q.focusSvc.getFocusedCell(),await this.doShowOverlay(Z),await new Promise((X)=>setTimeout(()=>X()));let $=Date.now();try{z()}finally{let X=Date.now()-$,Y=Math.max(0,300-X),U=()=>{if(this.exportsInProgress--,this.exportsInProgress===0)this.updateOverlay(!1),U5(Q,this.focusedCell),this.focusedCell=null};if(Y>0)setTimeout(()=>U(),Y);else U()}}hideOverlay(){let z=this.gos;this.showInitialOverlay=!1;let J=this.userForcedNoRows;if(this.userForcedNoRows=!1,z.get("loading")){V(99);return}if(z.get("activeOverlay")){V(296);return}if(this.currentDef===I5){V(297);return}if(this.doHideOverlay(),J){if(this.getOverlayDef()!==k1)this.updateOverlay(!1)}}getOverlayWrapperSelector(){return cF}getOverlayWrapperCompClass(){return SX}onPropChange(z){let J=z.has("activeOverlay");if(J||z.has("loading")){if(this.updateOverlay(J))return}let Q=this.currentDef,Z=this.eWrapper?.activeOverlay;if(Z&&Q){let $=z.has("activeOverlayParams");if(Q===g6){if($)Z.refresh?.(this.makeCompParams(!0))}else{let X=Q.paramsKey;if(z.has("overlayComponentParams")||X&&z.has(X))Z.refresh?.(this.makeCompParams(!1,X,Q.overlayType))}}}updateOverlay(z){let J=this.eWrapper;if(!J)return this.currentDef=null,!1;let Q=this.getDesiredDefWithOverride(),Z=this.currentDef,$=Q===g6&&z;if(Q!==Z){if(!Q)return this.disableInitialOverlay(),this.doHideOverlay();return this.doShowOverlay(Q),!0}if($&&Q)return J.hideOverlay(),this.doShowOverlay(Q),!0;if(!Q)this.disableInitialOverlay();return!1}getDesiredDefWithOverride(z){let{gos:J}=this,Q=iF(J.get("activeOverlay"));if(!Q){if(Q=z??this.getOverlayDef(),Q&&this.isDisabled(Q))Q=null}return Q}getOverlayDef(){let{gos:z,beans:J}=this,{rowModel:Q}=J,Z=z.get("loading");if(Z!==void 0){if(this.disableInitialOverlay(),Z)return rz}else if(this.showInitialOverlay){if(!this.isDisabled(rz)&&(!z.get("columnDefs")||!z.get("rowData")))return rz;this.disableInitialOverlay()}else this.disableInitialOverlay();let X=Q.getOverlayType();return dF(X)}disableInitialOverlay(){this.showInitialOverlay=!1,this.newColumnsLoadedCleanup?.(),this.newColumnsLoadedCleanup=null}doShowOverlay(z){let{gos:J,beans:Q}=this,{userCompFactory:Z}=Q;this.currentDef=z;let $=z!==g6,X=!!z.exclusive;this.exclusive=X;let Y;if(z.paramsKey&&J.get(z.paramsKey)||z.compKey&&J.get(z.compKey))Y=z.paramsKey;let U=void 0;if($){if(J.get("overlayComponent")||J.get("overlayComponentSelector"))U=Z.getCompDetailsFromGridOptions({name:"overlayComponent",optionalMethods:["refresh"]},void 0,this.makeCompParams(!1,z.paramsKey,z.overlayType))}U??(U=Z.getCompDetailsFromGridOptions(z.comp,$?z.id:void 0,this.makeCompParams(!$,Y,z.overlayType),!1));let _=U?.newAgStackInstance()??null,H=this.eWrapper?this.eWrapper.showOverlay(_,z.wrapperCls,X):b.resolve();return this.eWrapper?.refreshWrapperPadding(),this.setExclusive(X),H}makeCompParams(z,J,Q){let{gos:Z}=this,$=z?Z.get("activeOverlayParams"):{...Z.get("overlayComponentParams"),...J&&Z.get(J)||null,overlayType:Q};return v(Z,$??{})}doHideOverlay(){let z=!1;if(this.currentDef)this.currentDef=null,z=!0;this.exclusive=!1;let J=this.eWrapper;if(J)J.hideOverlay(),J.refreshWrapperPadding(),this.setExclusive(!1);return z}setExclusive(z){if(this.oldExclusive!==z)this.oldExclusive=z,this.eventSvc.dispatchEvent({type:"overlayExclusiveChanged"})}isDisabled(z){let{gos:J}=this;return z.overlayType&&J.get("suppressOverlays")?.includes(z.overlayType)||z.isSuppressed?.(J)===!0}},rF={moduleName:"Overlay",version:p,userComponents:{agLoadingOverlay:vF,agNoRowsOverlay:xF,agNoMatchingRowsOverlay:wF,agExportingOverlay:kF},apiFunctions:{showLoadingOverlay:bF,showNoRowsOverlay:gF,hideOverlay:hF},icons:{overlayLoading:"loading",overlayExporting:"loading"},beans:[nF]},tF=class extends j{constructor(){super(...arguments);this.beanName="rowContainerHeight",this.scrollY=0,this.uiBodyHeight=0}postConstruct(){this.addManagedEventListeners({bodyHeightChanged:this.updateOffset.bind(this)}),this.maxDivHeight=aG(),I2(this.gos,"RowContainerHeightService - maxDivHeight = "+this.maxDivHeight)}updateOffset(){if(!this.stretching)return;let z=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition().top,J=this.getUiBodyHeight();if(z!==this.scrollY||J!==this.uiBodyHeight)this.scrollY=z,this.uiBodyHeight=J,this.calculateOffset()}calculateOffset(){this.setUiContainerHeight(this.maxDivHeight),this.pixelsToShave=this.modelHeight-this.uiContainerHeight,this.maxScrollY=this.uiContainerHeight-this.uiBodyHeight;let z=this.scrollY/this.maxScrollY,J=z*this.pixelsToShave;I2(this.gos,`RowContainerHeightService - Div Stretch Offset = ${J} (${this.pixelsToShave} * ${z})`),this.setDivStretchOffset(J)}setUiContainerHeight(z){if(z!==this.uiContainerHeight)this.uiContainerHeight=z,this.eventSvc.dispatchEvent({type:"rowContainerHeightChanged"})}clearOffset(){this.setUiContainerHeight(this.modelHeight),this.pixelsToShave=0,this.setDivStretchOffset(0)}setDivStretchOffset(z){let J=typeof z==="number"?Math.floor(z):null;if(this.divStretchOffset===J)return;this.divStretchOffset=J,this.eventSvc.dispatchEvent({type:"heightScaleChanged"})}setModelHeight(z){if(this.modelHeight=z,this.stretching=z!=null&&this.maxDivHeight>0&&z>this.maxDivHeight,this.stretching)this.calculateOffset();else this.clearOffset()}getRealPixelPosition(z){return z-this.divStretchOffset}getUiBodyHeight(){let z=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition();return z.bottom-z.top}getScrollPositionForPixel(z){if(this.pixelsToShave<=0)return z;let J=this.modelHeight-this.getUiBodyHeight(),Q=z/J;return this.maxScrollY*Q}},sF=400,lF=class extends j{constructor(){super(...arguments);this.beanName="rowRenderer",this.destroyFuncsForColumnListeners=[],this.rowCtrlsByRowIndex={},this.zombieRowCtrls={},this.allRowCtrls=[],this.topRowCtrls=[],this.bottomRowCtrls=[],this.refreshInProgress=!1,this.dataFirstRenderedFired=!1,this.setupRangeSelectionListeners=()=>{let z=()=>{for(let X of this.getAllCellCtrls())X.onCellSelectionChanged()},J=()=>{for(let X of this.getAllCellCtrls())X.updateRangeBordersIfRangeCount()},Q=()=>{this.eventSvc.addListener("cellSelectionChanged",z),this.eventSvc.addListener("columnMoved",J),this.eventSvc.addListener("columnPinned",J),this.eventSvc.addListener("columnVisible",J)},Z=()=>{this.eventSvc.removeListener("cellSelectionChanged",z),this.eventSvc.removeListener("columnMoved",J),this.eventSvc.removeListener("columnPinned",J),this.eventSvc.removeListener("columnVisible",J)};if(this.addDestroyFunc(()=>Z()),this.addManagedPropertyListeners(["enableRangeSelection","cellSelection"],()=>{if(n0(this.gos))Q();else Z()}),n0(this.gos))Q()}}wireBeans(z){this.pageBounds=z.pageBounds,this.colModel=z.colModel,this.pinnedRowModel=z.pinnedRowModel,this.rowModel=z.rowModel,this.focusSvc=z.focusSvc,this.rowContainerHeight=z.rowContainerHeight,this.ctrlsSvc=z.ctrlsSvc,this.editSvc=z.editSvc}postConstruct(){this.ctrlsSvc.whenReady(this,(z)=>{this.gridBodyCtrl=z.gridBodyCtrl,this.initialise()})}initialise(){this.addManagedEventListeners({paginationChanged:this.onPageLoaded.bind(this),pinnedRowDataChanged:this.onPinnedRowDataChanged.bind(this),pinnedRowsChanged:this.onPinnedRowsChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),bodyScroll:this.onBodyScroll.bind(this),bodyHeightChanged:this.redraw.bind(this,{})}),this.addManagedPropertyListeners(["domLayout","embedFullWidthRows"],()=>this.onDomLayoutChanged()),this.addManagedPropertyListeners(["suppressMaxRenderedRowRestriction","rowBuffer"],()=>this.redraw()),this.addManagedPropertyListener("suppressCellFocus",(Z)=>this.onSuppressCellFocusChanged(Z.currentValue)),this.addManagedPropertyListeners(["groupSuppressBlankHeader","getBusinessKeyForNode","fullWidthCellRenderer","fullWidthCellRendererParams","suppressStickyTotalRow","groupRowRenderer","groupRowRendererParams","loadingCellRenderer","loadingCellRendererParams","detailCellRenderer","detailCellRendererParams","enableRangeSelection","enableCellTextSelection"],()=>this.redrawRows()),this.addManagedPropertyListener("cellSelection",({currentValue:Z,previousValue:$})=>{if(!$&&Z||$&&!Z)this.redrawRows()});let{stickyRowSvc:z,gos:J,showRowGroupCols:Q}=this.beans;if(Q)this.addManagedPropertyListener("showOpenedGroup",()=>{let Z=Q.columns;if(Z.length)this.refreshCells({columns:Z,force:!0})});if(z)this.stickyRowFeature=z.createStickyRowFeature(this,this.createRowCon.bind(this),this.destroyRowCtrls.bind(this));else{let Z=this.gridBodyCtrl;Z.setStickyTopHeight(0),Z.setStickyBottomHeight(0)}this.registerCellEventListeners(),this.initialiseCache(),this.printLayout=T0(J,"print"),this.embedFullWidthRows=this.printLayout||J.get("embedFullWidthRows"),this.redrawAfterModelUpdate()}initialiseCache(){if(this.gos.get("keepDetailRows")){let z=this.getKeepDetailRowsCount(),J=z!=null?z:3;this.cachedRowCtrls=new aF(J)}}getKeepDetailRowsCount(){return this.gos.get("keepDetailRowsCount")}getStickyTopRowCtrls(){return this.stickyRowFeature?.stickyTopRowCtrls??[]}getStickyBottomRowCtrls(){return this.stickyRowFeature?.stickyBottomRowCtrls??[]}updateAllRowCtrls(){let z=Object.values(this.rowCtrlsByRowIndex),J=Object.values(this.zombieRowCtrls),Q=this.cachedRowCtrls?.getEntries()??[];if(J.length>0||Q.length>0)this.allRowCtrls=[...z,...J,...Q];else this.allRowCtrls=z}isCellBeingRendered(z,J){let Q=this.rowCtrlsByRowIndex[z];if(!J||!Q)return!!Q;if(Q.isFullWidth())return!0;return!!this.beans.spannedRowRenderer?.getCellByPosition({rowIndex:z,column:J,rowPinned:null})||!!Q.getCellCtrl(J)||!Q.isRowRendered()}updateCellFocus(z){for(let J of this.getAllCellCtrls())J.onCellFocused(z);for(let J of this.getFullWidthRowCtrls())J.onFullWidthRowFocused(z)}onCellFocusChanged(z){if(z?.rowIndex!=null&&!z.rowPinned){let J=this.beans.colModel.getCol(z.column)??void 0;if(!this.isCellBeingRendered(z.rowIndex,J))this.redraw()}this.updateCellFocus(z)}onSuppressCellFocusChanged(z){for(let J of this.getAllCellCtrls())J.onSuppressCellFocusChanged(z);for(let J of this.getFullWidthRowCtrls())J.onSuppressCellFocusChanged(z)}registerCellEventListeners(){this.addManagedEventListeners({cellFocused:(z)=>this.onCellFocusChanged(z),cellFocusCleared:()=>this.updateCellFocus(),flashCells:(z)=>{let{cellFlashSvc:J}=this.beans;if(J)for(let Q of this.getAllCellCtrls())J.onFlashCells(Q,z)},columnHoverChanged:()=>{for(let z of this.getAllCellCtrls())z.onColumnHover()},displayedColumnsChanged:()=>{for(let z of this.getAllCellCtrls())z.onDisplayedColumnsChanged()},displayedColumnsWidthChanged:()=>{if(this.printLayout)for(let z of this.getAllCellCtrls())z.onLeftChanged()}}),this.setupRangeSelectionListeners(),this.refreshListenersToColumnsForCellComps(),this.addManagedEventListeners({gridColumnsChanged:this.refreshListenersToColumnsForCellComps.bind(this)}),this.addDestroyFunc(this.removeGridColumnListeners.bind(this))}removeGridColumnListeners(){for(let z of this.destroyFuncsForColumnListeners)z();this.destroyFuncsForColumnListeners.length=0}refreshListenersToColumnsForCellComps(){this.removeGridColumnListeners();let z=this.colModel.getCols();for(let J of z){let Q=(_)=>{for(let H of this.getAllCellCtrls())if(H.column===J)_(H)},Z=()=>{Q((_)=>_.onLeftChanged())},$=()=>{Q((_)=>_.onWidthChanged())},X=()=>{Q((_)=>_.onFirstRightPinnedChanged())},Y=()=>{Q((_)=>_.onLastLeftPinnedChanged())},U=()=>{Q((_)=>_.onColDefChanged())};J.__addEventListener("leftChanged",Z),J.__addEventListener("widthChanged",$),J.__addEventListener("firstRightPinnedChanged",X),J.__addEventListener("lastLeftPinnedChanged",Y),J.__addEventListener("colDefChanged",U),this.destroyFuncsForColumnListeners.push(()=>{J.__removeEventListener("leftChanged",Z),J.__removeEventListener("widthChanged",$),J.__removeEventListener("firstRightPinnedChanged",X),J.__removeEventListener("lastLeftPinnedChanged",Y),J.__removeEventListener("colDefChanged",U)})}}onDomLayoutChanged(){let z=T0(this.gos,"print"),J=z||this.gos.get("embedFullWidthRows"),Q=J!==this.embedFullWidthRows||this.printLayout!==z;if(this.printLayout=z,this.embedFullWidthRows=J,Q)this.redrawAfterModelUpdate({domLayoutChanged:!0})}datasourceChanged(){this.firstRenderedRow=0,this.lastRenderedRow=-1;let z=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(z)}onPageLoaded(z){let J={recycleRows:z.keepRenderedRows,animate:z.animate,newData:z.newData,newPage:z.newPage,onlyBody:!0};this.redrawAfterModelUpdate(J)}getAllCellsNotSpanningForColumn(z){let J=[];for(let Q of this.getAllRowCtrls()){let Z=Q.getCellCtrl(z,!0)?.eGui;if(Z)J.push(Z)}return J}refreshFloatingRowComps(z=!0){this.refreshFloatingRows(this.topRowCtrls,"top",z),this.refreshFloatingRows(this.bottomRowCtrls,"bottom",z)}refreshFloatingRows(z,J,Q){let{pinnedRowModel:Z,beans:$,printLayout:X}=this,Y=Object.fromEntries(z.map((_)=>[_.rowNode.id,_]));Z?.forEachPinnedRow(J,(_,H)=>{let G=z[H];if(G&&Z.getPinnedRowById(G.rowNode.id,J)===void 0)G.destroyFirstPass(),G.destroySecondPass();if(_.id in Y&&Q)z[H]=Y[_.id],delete Y[_.id];else z[H]=new KZ(_,$,!1,!1,X)});let U=(J==="top"?Z?.getPinnedTopRowCount():Z?.getPinnedBottomRowCount())??0;z.length=U}onPinnedRowDataChanged(){let z={recycleRows:!0};this.redrawAfterModelUpdate(z)}onPinnedRowsChanged(){this.redrawAfterModelUpdate({recycleRows:!0})}redrawRow(z,J=!1){if(z.sticky)this.stickyRowFeature?.refreshStickyNode(z);else if(this.cachedRowCtrls?.has(z)){this.cachedRowCtrls.removeRow(z);return}else{let Q=(Z)=>{let $=Z[z.rowIndex];if(!$)return;if($.rowNode!==z)return;$.destroyFirstPass(),$.destroySecondPass(),Z[z.rowIndex]=this.createRowCon(z,!1,!1)};switch(z.rowPinned){case"top":Q(this.topRowCtrls);break;case"bottom":Q(this.bottomRowCtrls);break;default:Q(this.rowCtrlsByRowIndex),this.updateAllRowCtrls()}}if(!J)this.dispatchDisplayedRowsChanged(!1)}redrawRows(z){let{editSvc:J}=this.beans;if(J?.isEditing())if(J.isBatchEditing())J.cleanupEditors();else J.stopEditing(void 0,{source:"api"});if(z!=null){for(let Z of z??[])this.redrawRow(Z,!0);this.dispatchDisplayedRowsChanged(!1);return}this.redrawAfterModelUpdate()}redrawAfterModelUpdate(z={}){this.getLockOnRefresh();let J=this.beans.focusSvc?.getFocusCellToUseAfterRefresh();this.updateContainerHeights(),this.scrollToTopIfNewData(z);let Q=!z.domLayoutChanged&&!!z.recycleRows,Z=z.animate&&w1(this.gos),$=Q?this.getRowsToRecycle():null;if(!Q)this.removeAllRowComps(!Z);this.workOutFirstAndLastRowsToRender();let{stickyRowFeature:X,gos:Y}=this;if(X){X.checkStickyRows();let U=X.extraTopHeight+X.extraBottomHeight;if(U)this.updateContainerHeights(U)}if(this.recycleRows($,Z),this.gridBodyCtrl.updateRowCount(),!z.onlyBody)this.refreshFloatingRowComps(Y.get("enableRowPinning")?Q:void 0);if(this.dispatchDisplayedRowsChanged(),J!=null)this.restoreFocusedCell(J);this.releaseLockOnRefresh()}scrollToTopIfNewData(z){let J=z.newData||z.newPage,Q=this.gos.get("suppressScrollOnNewData");if(J&&!Q)this.gridBodyCtrl.scrollFeature.scrollToTop(),this.stickyRowFeature?.resetOffsets()}updateContainerHeights(z=0){let{rowContainerHeight:J}=this;if(this.printLayout){J.setModelHeight(null);return}let Q=this.pageBounds.getCurrentPageHeight();if(Q===0)Q=1;J.setModelHeight(Q+z)}getLockOnRefresh(){if(this.refreshInProgress)throw Error(U4(252));this.refreshInProgress=!0,this.beans.frameworkOverrides.getLockOnRefresh?.()}releaseLockOnRefresh(){this.refreshInProgress=!1,this.beans.frameworkOverrides.releaseLockOnRefresh?.()}isRefreshInProgress(){return this.refreshInProgress}restoreFocusedCell(z){if(!z)return;let J=this.beans.focusSvc,Q=this.findPositionToFocus(z);if(!Q){J.focusHeaderPosition({headerPosition:{headerRowIndex:Z4(this.beans)-1,column:z.column}});return}if(z.rowIndex!==Q.rowIndex||z.rowPinned!=Q.rowPinned){J.setFocusedCell({...Q,preventScrollOnBrowserFocus:!0,forceBrowserFocus:!0});return}if(!J.doesRowOrCellHaveBrowserFocus())this.updateCellFocus(v(this.gos,{...Q,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,type:"cellFocused"}))}findPositionToFocus(z){let{pagination:J,pageBounds:Q}=this.beans,Z=z;if(Z.rowPinned==null&&J&&Q&&!J.isRowInPage(Z.rowIndex))Z={rowPinned:null,rowIndex:Q.getFirstRow()};while(Z){if(Z.rowPinned==null&&Q){if(Z.rowIndex<Q.getFirstRow()){if(Z=r0(this.beans,{rowPinned:null,rowIndex:0}),!Z)return null}else if(Z.rowIndex>Q.getLastRow())Z={rowPinned:null,rowIndex:Q.getLastRow()}}let $=this.getRowByPosition(Z);if($?.isAlive())return{...$.getRowPosition(),column:z.column};Z=r0(this.beans,Z)}return null}getAllCellCtrls(){let z=[],J=this.getAllRowCtrls(),Q=J.length;for(let Z=0;Z<Q;Z++){let $=J[Z].getAllCellCtrls(),X=$.length;for(let Y=0;Y<X;Y++)z.push($[Y])}return z}getAllRowCtrls(){let{spannedRowRenderer:z}=this.beans,J=this.getStickyTopRowCtrls(),Q=this.getStickyBottomRowCtrls();return[...this.topRowCtrls,...this.bottomRowCtrls,...J,...Q,...z?.getCtrls("top")??[],...z?.getCtrls("bottom")??[],...z?.getCtrls("center")??[],...Object.values(this.rowCtrlsByRowIndex)]}addRenderedRowListener(z,J,Q){let Z=this.rowCtrlsByRowIndex[J];if(Z)Z.addEventListener(z,Q)}refreshCells({rowNodes:z,columns:J,force:Q,suppressFlash:Z}={}){let $={force:Q,newData:!1,suppressFlash:Z};for(let X of this.getCellCtrls(z,J))X.refreshOrDestroyCell($);this.refreshFullWidth(z)}refreshRows(z={}){for(let J of this.getRowCtrls(z.rowNodes))J.refreshRow(z);this.refreshFullWidth(z.rowNodes)}getRowCtrlByNode(z){let J=z.rowIndex;if(J==null)return;let Q=z.rowPinned;if(Q==="top"){let $=this.topRowCtrls[J];return $?.rowNode===z?$:void 0}if(Q==="bottom"){let $=this.bottomRowCtrls[J];return $?.rowNode===z?$:void 0}let Z=this.rowCtrlsByRowIndex[J];if(Z?.rowNode===z)return Z;return this.getStickyRowCtrlByNode(z)}getStickyRowCtrlByNode(z){let J=this.stickyRowFeature;if(!J)return;for(let Q of J.stickyTopRowCtrls)if(Q.rowNode===z)return Q;for(let Q of J.stickyBottomRowCtrls)if(Q.rowNode===z)return Q;return}refreshRowByNode(z){if(z)this.getRowCtrlByNode(z)?.refreshRow()}refreshFullWidth(z){if(!z)return;let J=!1;for(let Q of this.getRowCtrls(z)){if(!Q.isFullWidth())continue;if(!Q.refreshFullWidth())J=!0,this.redrawRow(Q.rowNode,!0)}if(J)this.dispatchDisplayedRowsChanged(!1)}getRowCtrls(z){let J=f8(z),Q=this.getAllRowCtrls();if(!z||!J)return Q;return Q.filter((Z)=>{let $=Z.rowNode;return k8($,J)})}getCellCtrls(z,J){let Q;if(I(J))Q={},J.forEach(($)=>{let X=this.colModel.getCol($);if(I(X))Q[X.getId()]=!0});let Z=[];for(let $ of this.getRowCtrls(z))for(let X of $.getAllCellCtrls()){let Y=X.column.getId();if(Q&&!Q[Y])continue;Z.push(X)}return Z}destroy(){this.removeAllRowComps(!0),super.destroy()}removeAllRowComps(z){let J=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(J,z),this.stickyRowFeature?.destroyStickyCtrls()}getRowsToRecycle(){let z=[];for(let Q of Object.keys(this.rowCtrlsByRowIndex))if(this.rowCtrlsByRowIndex[Q].rowNode.id==null)z.push(Q);this.removeRowCtrls(z);let J={};for(let Q of Object.values(this.rowCtrlsByRowIndex)){let Z=Q.rowNode;J[Z.id]=Q}return this.rowCtrlsByRowIndex={},J}removeRowCtrls(z,J=!1){for(let Q of z){let Z=this.rowCtrlsByRowIndex[Q];if(Z)Z.destroyFirstPass(J),Z.destroySecondPass();delete this.rowCtrlsByRowIndex[Q]}}onBodyScroll(z){if(z.direction!=="vertical")return;this.redraw({afterScroll:!0})}redraw(z={}){let{focusSvc:J,animationFrameSvc:Q}=this.beans,{afterScroll:Z}=z,$,X=this.stickyRowFeature;if(X)$=J?.getFocusCellToUseAfterRefresh()||void 0;let Y=this.firstRenderedRow,U=this.lastRenderedRow;this.workOutFirstAndLastRowsToRender();let _=!1;if(X){_=X.checkStickyRows();let G=X.extraTopHeight+X.extraBottomHeight;if(G)this.updateContainerHeights(G)}let H=this.firstRenderedRow!==Y||this.lastRenderedRow!==U;if(Z&&!_&&!H)return;if(this.getLockOnRefresh(),this.recycleRows(null,!1,Z),this.releaseLockOnRefresh(),this.dispatchDisplayedRowsChanged(Z&&!_),$!=null){let G=J?.getFocusCellToUseAfterRefresh();if($!=null&&G==null)Q?.flushAllFrames(),this.restoreFocusedCell($)}}removeRowCompsNotToDraw(z,J){let Q={};for(let X of z)Q[X]=!0;let $=Object.keys(this.rowCtrlsByRowIndex).filter((X)=>!Q[X]);this.removeRowCtrls($,J)}calculateIndexesToDraw(z){let J=[];for(let Y=this.firstRenderedRow;Y<=this.lastRenderedRow;Y++)J.push(Y);let Q=this.beans.pagination,Z=this.beans.focusSvc?.getFocusedCell()?.rowIndex;if(Z!=null&&(Z<this.firstRenderedRow||Z>this.lastRenderedRow)&&(!Q||Q.isRowInPage(Z))&&Z<this.rowModel.getRowCount())J.push(Z);let $=(Y)=>{let U=Y.rowNode.rowIndex;if(U==null||U===Z)return;if(U<this.firstRenderedRow||U>this.lastRenderedRow){if(this.doNotUnVirtualiseRow(Y))J.push(U)}};for(let Y of Object.values(this.rowCtrlsByRowIndex))$(Y);if(z)for(let Y of Object.values(z))$(Y);J.sort((Y,U)=>Y-U);let X=[];for(let Y=0;Y<J.length;Y++){let U=J[Y],_=this.rowModel.getRow(U);if(_&&!_.sticky)X.push(U)}return X}recycleRows(z,J=!1,Q=!1){let Z=this.calculateIndexesToDraw(z);if(this.printLayout||Q)J=!1;this.removeRowCompsNotToDraw(Z,!J);for(let $ of Z)this.createOrUpdateRowCtrl($,z,J,Q);if(z){let{animationFrameSvc:$}=this.beans;if($?.active&&Q&&!this.printLayout)$.addDestroyTask(()=>{this.destroyRowCtrls(z,J),this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()});else this.destroyRowCtrls(z,J)}this.updateAllRowCtrls()}dispatchDisplayedRowsChanged(z=!1){this.eventSvc.dispatchEvent({type:"displayedRowsChanged",afterScroll:z})}onDisplayedColumnsChanged(){let{visibleCols:z}=this.beans,J=z.isPinningLeft(),Q=z.isPinningRight();if(this.pinningLeft!==J||Q!==this.pinningRight){if(this.pinningLeft=J,this.pinningRight=Q,this.embedFullWidthRows)this.redrawFullWidthEmbeddedRows()}}redrawFullWidthEmbeddedRows(){let z=[];for(let J of this.getFullWidthRowCtrls()){let Q=J.rowNode.rowIndex;z.push(Q.toString())}this.refreshFloatingRowComps(),this.removeRowCtrls(z),this.redraw({afterScroll:!0})}getFullWidthRowCtrls(z){let J=f8(z);return this.getAllRowCtrls().filter((Q)=>{if(!Q.isFullWidth())return!1;let Z=Q.rowNode;if(J!=null&&!k8(Z,J))return!1;return!0})}createOrUpdateRowCtrl(z,J,Q,Z){let $,X=this.rowCtrlsByRowIndex[z];if(!X){if($=this.rowModel.getRow(z),I($)&&I(J)&&J[$.id]&&$.alreadyRendered)X=J[$.id],J[$.id]=null}if(!X){if(!$)$=this.rowModel.getRow(z);if(I($))X=this.createRowCon($,Q,Z);else return}if($)$.alreadyRendered=!0;this.rowCtrlsByRowIndex[z]=X}destroyRowCtrls(z,J){let Q=[];if(z)for(let Z of Object.values(z)){if(!Z)continue;if(this.cachedRowCtrls&&Z.isCacheable()){this.cachedRowCtrls.addRow(Z);continue}if(Z.destroyFirstPass(!J),J){let $=Z.instanceId;this.zombieRowCtrls[$]=Z,Q.push(()=>{Z.destroySecondPass(),delete this.zombieRowCtrls[$]})}else Z.destroySecondPass()}if(J)Q.push(()=>{if(this.isAlive())this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()}),window.setTimeout(()=>{for(let Z of Q)Z()},sF)}getRowBuffer(){return this.gos.get("rowBuffer")}getRowBufferInPixels(){let z=this.getRowBuffer(),J=b9(this.beans);return z*J}workOutFirstAndLastRowsToRender(){let{rowContainerHeight:z,pageBounds:J,rowModel:Q}=this;z.updateOffset();let Z,$;if(!Q.isRowsToRender())Z=0,$=-1;else if(this.printLayout)this.beans.environment.refreshRowHeightVariable(),Z=J.getFirstRow(),$=J.getLastRow();else{let G=this.getRowBufferInPixels(),W=this.ctrlsSvc.getScrollFeature(),q=this.gos.get("suppressRowVirtualisation"),B,E,K;do{let A=J.getPixelOffset(),{pageFirstPixel:O,pageLastPixel:T}=J.getCurrentPagePixelRange(),S=z.divStretchOffset,k=W.getVScrollPosition(),C=k.top,w=k.bottom;if(q)E=O+S,K=T+S;else E=Math.max(C+A-G,O)+S,K=Math.min(w+A+G,T)+S;this.firstVisibleVPixel=Math.max(C+A,O)+S,this.lastVisibleVPixel=Math.min(w+A,T)+S,B=this.ensureAllRowsInRangeHaveHeightsCalculated(E,K)}while(B);let F=Q.getRowIndexAtPixel(E),L=Q.getRowIndexAtPixel(K),M=J.getFirstRow(),D=J.getLastRow();if(F<M)F=M;if(L>D)L=D;Z=F,$=L}let X=T0(this.gos,"normal"),Y=this.gos.get("suppressMaxRenderedRowRestriction"),U=Math.max(this.getRowBuffer(),500);if(X&&!Y){if($-Z>U)$=Z+U}let _=Z!==this.firstRenderedRow,H=$!==this.lastRenderedRow;if(_||H)this.firstRenderedRow=Z,this.lastRenderedRow=$,this.eventSvc.dispatchEvent({type:"viewportChanged",firstRow:Z,lastRow:$})}dispatchFirstDataRenderedEvent(){if(this.dataFirstRenderedFired)return;this.dataFirstRenderedFired=!0,I4(this.beans,()=>{this.beans.eventSvc.dispatchEvent({type:"firstDataRendered",firstRow:this.firstRenderedRow,lastRow:this.lastRenderedRow})})}ensureAllRowsInRangeHaveHeightsCalculated(z,J){let Q=this.pinnedRowModel?.ensureRowHeightsValid(),Z=this.stickyRowFeature?.ensureRowHeightsValid(),{pageBounds:$,rowModel:X}=this,Y=X.ensureRowHeightsValid(z,J,$.getFirstRow(),$.getLastRow());if(Y||Z)this.eventSvc.dispatchEvent({type:"recalculateRowBounds"});if(Z||Y||Q)return this.updateContainerHeights(),!0;return!1}doNotUnVirtualiseRow(z){let Z=z.rowNode,$=this.focusSvc.isRowFocused(Z.rowIndex,Z.rowPinned),X=this.editSvc?.isEditing(z),Y=Z.detail;if(!($||X||Y))return!1;return this.isRowPresent(Z)?!0:!1}isRowPresent(z){if(!this.rowModel.isRowPresent(z))return!1;return this.beans.pagination?.isRowInPage(z.rowIndex)??!0}createRowCon(z,J,Q){let Z=this.cachedRowCtrls?.getRow(z)??null;if(Z)return Z;let $=Q&&!this.printLayout&&!!this.beans.animationFrameSvc?.active;return new KZ(z,this.beans,J,$,this.printLayout)}getRenderedNodes(){let z=Object.values(this.rowCtrlsByRowIndex).map((Z)=>Z.rowNode),J=this.getStickyTopRowCtrls().map((Z)=>Z.rowNode),Q=this.getStickyBottomRowCtrls().map((Z)=>Z.rowNode);return[...J,...z,...Q]}getRowByPosition(z){let J,{rowIndex:Q}=z;switch(z.rowPinned){case"top":J=this.topRowCtrls[Q];break;case"bottom":J=this.bottomRowCtrls[Q];break;default:if(J=this.rowCtrlsByRowIndex[Q],!J){if(J=this.getStickyTopRowCtrls().find((Z)=>Z.rowNode.rowIndex===Q)||null,!J)J=this.getStickyBottomRowCtrls().find((Z)=>Z.rowNode.rowIndex===Q)||null}break}return J}isRangeInRenderedViewport(z,J){if(z==null||J==null)return!1;let Z=z>this.lastRenderedRow;return!(J<this.firstRenderedRow)&&!Z}},aF=class{constructor(z){this.entriesMap={},this.entriesList=[],this.maxCount=z}addRow(z){if(this.entriesMap[z.rowNode.id]=z,this.entriesList.push(z),z.setCached(!0),this.entriesList.length>this.maxCount){let J=this.entriesList[0];J.destroyFirstPass(),J.destroySecondPass(),this.removeFromCache(J)}}getRow(z){if(z?.id==null)return null;let J=this.entriesMap[z.id];if(!J)return null;return this.removeFromCache(J),J.setCached(!1),J.rowNode!=z?null:J}has(z){return this.entriesMap[z.id]!=null}removeRow(z){let J=z.id,Q=this.entriesMap[J];delete this.entriesMap[J],X0(this.entriesList,Q)}removeFromCache(z){let J=z.rowNode.id;delete this.entriesMap[J],X0(this.entriesList,z)}getEntries(){return this.entriesList}};function f8(z){if(!z)return;let J={top:{},bottom:{},normal:{}};for(let Q of z){let Z=Q.id;switch(Q.rowPinned){case"top":J.top[Z]=Q;break;case"bottom":J.bottom[Z]=Q;break;default:J.normal[Z]=Q;break}}return J}function k8(z,J){let Q=z.id;switch(z.rowPinned){case"top":return J.top[Q]!=null;case"bottom":return J.bottom[Q]!=null;default:return J.normal[Q]!=null}}var oF=class extends j{constructor(){super(...arguments);this.beanName="rowNodeSorter",this.accentedSort=!1,this.primaryColumnsSortGroups=!1,this.pivotActive=!1}postConstruct(){this.firstLeaf=o(this.gos)?H1:eF,this.addManagedPropertyListeners(["accentedSort","autoGroupColumnDef","treeData"],this.updateOptions.bind(this));let z=this.updatePivotModeState.bind(this);this.addManagedEventListeners({columnPivotModeChanged:z,columnPivotChanged:z}),this.updateOptions(),z()}updateOptions(){this.accentedSort=!!this.gos.get("accentedSort"),this.primaryColumnsSortGroups=x4(this.gos)}updatePivotModeState(){this.pivotActive=this.beans.colModel.isPivotActive()}doFullSortInPlace(z,J){return z.sort((Q,Z)=>this.compareRowNodes(J,Q,Z))}compareRowNodes(z,J,Q){if(J===Q)return 0;let Z=this.accentedSort;for(let $=0,X=z.length;$<X;++$){let Y=z[$],U=Y.sort==="desc",_=Y.column,H=this.getValue(J,_),G=this.getValue(Q,_),W,q=this.getComparator(Y,J);if(q)W=q(H,G,J,Q,U);else{if(Y.type==="absolute")H=C8(H),G=C8(G);W=n1(H,G,Z)}if(W)return Y.sort==="asc"?W:-W}return 0}getComparator(z,J){let Q=z.column.colDef,Z=this.getComparatorFromColDef(Q,z);if(Z)return Z;if(!Q.showRowGroup)return;let $=!J.group&&Q.field;if(!$)return;let X=this.beans.colModel.getColDefCol($);if(!X)return;return this.getComparatorFromColDef(X.colDef,z)}getComparatorFromColDef(z,J){let Q=z.comparator;if(Q==null)return;if(typeof Q==="object")return Q[T4(J.type)];return Q}getValue(z,J){let Q=this.beans;if(this.primaryColumnsSortGroups){if(z.rowGroupColumn===J)return this.getGroupDataValue(z,J);if(z.group&&J.colDef.showRowGroup)return}let Z=Q.valueSvc.getValue(J,z,"data");if(J.colDef.allowFormula){let $=Q.formula;if($?.isFormula(Z))return $.resolveValue(J,z)}return Z}getGroupDataValue(z,J){if(LJ(this.gos,this.pivotActive)){let Z=this.firstLeaf(z);return Z&&this.beans.valueSvc.getValue(J,Z,"data")}let Q=this.beans.showRowGroupCols?.getShowRowGroupCol(J.getId());return Q?z.groupData?.[Q.getId()]:void 0}},eF=(z)=>{if(z.data)return z;let J=z.childrenAfterGroup;while(J?.length){let Q=J[0];if(Q.data)return Q;J=Q.childrenAfterGroup}},C8=(z)=>{if(!z)return z;if(typeof z==="bigint")return z<0n?-z:z;let J=Number(z);return isNaN(J)?z:Math.abs(J)};function zL(z){z.sortSvc?.onSortChanged("api")}var dz=(z,J)=>({tag:"span",ref:`eSort${z}`,cls:`ag-sort-indicator-icon ag-sort-${J} ag-hidden`,attrs:{"aria-hidden":"true"}}),JL={tag:"span",cls:"ag-sort-indicator-container",children:[dz("Order","order"),dz("Asc","ascending-icon"),dz("Desc","descending-icon"),dz("Mixed","mixed-icon"),dz("AbsoluteAsc","absolute-ascending-icon"),dz("AbsoluteDesc","absolute-descending-icon"),dz("None","none-icon")]},f5=class extends y{constructor(z){super();if(this.eSortOrder=P,this.eSortAsc=P,this.eSortDesc=P,this.eSortMixed=P,this.eSortNone=P,this.eSortAbsoluteAsc=P,this.eSortAbsoluteDesc=P,!z)this.setTemplate(JL)}attachCustomElements(z,J,Q,Z,$,X,Y){this.eSortOrder=z,this.eSortAsc=J,this.eSortDesc=Q,this.eSortMixed=Z,this.eSortNone=$,this.eSortAbsoluteAsc=X,this.eSortAbsoluteDesc=Y}setupSort(z,J=!1,Q){if(this.column=z,this.suppressOrder=J,this.getSortDefOverride=Q,this.setupMultiSortIndicator(),!z.isSortable()&&!z.colDef.showRowGroup)return;this.addInIcon("sortAscending",this.eSortAsc,z),this.addInIcon("sortDescending",this.eSortDesc,z),this.addInIcon("sortUnSort",this.eSortNone,z),this.addInIcon("sortAbsoluteAscending",this.eSortAbsoluteAsc,z),this.addInIcon("sortAbsoluteDescending",this.eSortAbsoluteDesc,z);let Z=this.updateIcons.bind(this),$=this.onSortChanged.bind(this);this.addManagedPropertyListener("unSortIcon",Z),this.addManagedEventListeners({newColumnsLoaded:Z,sortChanged:$,columnRowGroupChanged:$}),this.onSortChanged()}addInIcon(z,J,Q){if(J==null)return;let Z=h(z,this.beans,Q);if(Z)J.appendChild(Z)}onSortChanged(){if(this.updateIcons(),!this.suppressOrder)this.updateSortOrder()}updateIcons(){let{eSortAsc:z,eSortDesc:J,eSortAbsoluteAsc:Q,eSortAbsoluteDesc:Z,eSortNone:$,column:X,gos:Y,beans:U}=this,_=nZ(X,U,this.getSortDefOverride),H=_.isDefaultSortAllowed,G=_.isAbsoluteSortAllowed,{isAbsoluteSort:W,isDefaultSort:q,isAscending:B,isDescending:E,direction:K}=_;if(z)x(z,B&&q&&H,{skipAriaHidden:!0});if(J)x(J,E&&q&&H,{skipAriaHidden:!0});if($){let F=!X.colDef.unSortIcon&&!Y.get("unSortIcon");x($,!F&&!K,{skipAriaHidden:!0})}if(Q)x(Q,B&&W&&G,{skipAriaHidden:!0});if(Z)x(Z,E&&W&&G,{skipAriaHidden:!0})}setupMultiSortIndicator(){let{eSortMixed:z,column:J,gos:Q}=this;this.addInIcon("sortUnSort",z,J);let Z=J.colDef.showRowGroup;if(x4(Q)&&Z)this.addManagedEventListeners({sortChanged:this.updateMultiSortIndicator.bind(this),columnRowGroupChanged:this.updateMultiSortIndicator.bind(this)}),this.updateMultiSortIndicator()}updateMultiSortIndicator(){let{eSortMixed:z,beans:J,column:Q}=this;if(z){let Z=J.sortSvc.getDisplaySortForColumn(Q)?.direction==="mixed";x(z,Z,{skipAriaHidden:!0})}}updateSortOrder(){let{eSortOrder:z,column:J,beans:{sortSvc:Q}}=this;if(!z)return;let Z=Q.getColumnsWithSortingOrdered(),$=Q.getDisplaySortIndexForColumn(J)??-1,X=Z.some((U)=>Q.getDisplaySortIndexForColumn(U)??!1),Y=$>=0&&X;if(x(z,Y,{skipAriaHidden:!0}),$>=0)z.textContent=($+1).toString();else J0(z)}refresh(){this.onSortChanged()}},QL={selector:"AG-SORT-INDICATOR",component:f5},ZL=class extends j{constructor(){super(...arguments);this.beanName="sortSvc"}progressSort(z,J,Q){let Z=this.getNextSortDirection(z);this.setSortForColumn(z,Z,J,Q)}progressSortFromEvent(z,J){let Z=this.gos.get("multiSortKey")==="ctrl"?J.ctrlKey||J.metaKey:J.shiftKey;this.progressSort(z,Z,"uiColumnSorted")}setSortForColumn(z,J,Q,Z){let{gos:$,showRowGroupCols:X}=this.beans,Y=x4($),U=[z];if(Y){if(z.colDef.showRowGroup){let W=X?.getSourceColumnsForGroupColumn?.(z)?.filter((q)=>q.isSortable());if(W)U=[z,...W]}}for(let G of U)this.setColSort(G,J,Z);let _=(Q||$.get("alwaysMultiSort"))&&!$.get("suppressMultiSort"),H=[];if(!_){let G=this.clearSortBarTheseColumns(U,Z);H.push(...G)}this.updateSortIndex(z),H.push(...U),this.dispatchSortChangedEvents(Z,H)}updateSortIndex(z){let{gos:J,colModel:Q,showRowGroupCols:Z}=this.beans,$=x4(J),X=Z?.getShowRowGroupCol(z.getId()),Y=$?X||z:z,U=this.getColumnsWithSortingOrdered();Q.forAllCols((G)=>this.setColSortIndex(G,null));let _=U.filter((G)=>{if($&&G.colDef.showRowGroup)return!1;return G!==Y});(Y.getSortDef()?[..._,Y]:_).forEach((G,W)=>this.setColSortIndex(G,W))}onSortChanged(z,J){this.dispatchSortChangedEvents(z,J)}isSortActive(){let z=!1;return this.beans.colModel.forAllCols((J)=>{if(J.getSortDef())return z=!0,!0}),z}dispatchSortChangedEvents(z,J){let Q={type:"sortChanged",source:z};if(J)Q.columns=J;this.eventSvc.dispatchEvent(Q)}clearSortBarTheseColumns(z,J){let Q=[];return this.beans.colModel.forAllCols((Z)=>{if(!z.includes(Z)){if(Z.getSortDef())Q.push(Z);let $=$4();this.setColSort(Z,$,J)}}),Q}getNextSortDirection(z,J){let Q=z.getSortingOrder(),Z=J===void 0?z.getSortDef():$4(J),X=Q.findIndex((Y)=>N6(Y,Z))+1;if(X>=Q.length)X=0;return $4(Q[X])}getIndexedSortMap(){let{gos:z,colModel:J,showRowGroupCols:Q,rowGroupColsSvc:Z}=this.beans,$=[];if(J.forAllCols((H)=>{if(H.getSortDef())$.push(H)}),J.pivotMode){let H=x4(z);$=$.filter((G)=>{let W=!!G.aggFunc,q=!G.primary,B=H?Q?.getShowRowGroupCol(G.getId()):G.colDef.showRowGroup;return W||q||B})}let X=Z?.columns.filter((H)=>!!H.getSortDef())??[],Y={};$.forEach((H,G)=>Y[H.getId()]=G),$.sort((H,G)=>{let W=H.getSortIndex(),q=G.getSortIndex();if(W!=null&&q!=null)return W-q;else if(W==null&&q==null){let B=Y[H.getId()],E=Y[G.getId()];return B>E?1:-1}else if(q==null)return-1;else return 1});let U=x4(z)&&!!X.length;if(U)$=[...new Set($.map((H)=>Q?.getShowRowGroupCol(H.getId())??H))];let _=new Map;if($.forEach((H,G)=>_.set(H,G)),U)for(let H of X){let G=Q.getShowRowGroupCol(H.getId());_.set(H,_.get(G))}return _}getColumnsWithSortingOrdered(){return[...this.getIndexedSortMap().entries()].sort(([,z],[,J])=>z-J).map(([z])=>z)}collectSortItems(z=!1){let J=[],Q=this.getColumnsWithSortingOrdered();for(let Z of Q){let $=Z.getSortDef()?.direction;if(!$)continue;let X=T4(Z.getSortDef()?.type),Y={sort:$,type:X};if(z)Y.colId=Z.getId();else Y.column=Z;J.push(Y)}return J}getSortModel(){return this.collectSortItems(!0)}getSortOptions(){return this.collectSortItems()}canColumnDisplayMixedSort(z){let J=x4(this.gos),Q=!!z.colDef.showRowGroup;return J&&Q}getDisplaySortForColumn(z){let J=this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(z);if(!this.canColumnDisplayMixedSort(z)||!J?.length)return z.getSortDef();let Z=z.colDef.field!=null||!!z.colDef.valueGetter?[z,...J]:J,$=Z[0].getSortDef();if(!Z.every((Y)=>N6(Y.getSortDef(),$)))return{type:T4(z.getSortDef()?.type),direction:"mixed"};return $}getDisplaySortIndexForColumn(z){return this.getIndexedSortMap().get(z)}setupHeader(z,J){let Q=()=>{let{type:Z,direction:$}=$4(J.getSortDef());if(z.toggleCss("ag-header-cell-sorted-asc",$==="asc"),z.toggleCss("ag-header-cell-sorted-desc",$==="desc"),z.toggleCss("ag-header-cell-sorted-abs-asc",Z==="absolute"&&$==="asc"),z.toggleCss("ag-header-cell-sorted-abs-desc",Z==="absolute"&&$==="desc"),z.toggleCss("ag-header-cell-sorted-none",!$),J.colDef.showRowGroup){let U=!this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(J)?.every((_)=>$==_.getSortDef()?.direction);z.toggleCss("ag-header-cell-sorted-mixed",U)}};z.addManagedEventListeners({sortChanged:Q,columnPinned:Q,columnRowGroupChanged:Q,displayedColumnsChanged:Q})}initCol(z){let{sortIndex:J,initialSortIndex:Q}=z.colDef,Z=J$(z.colDef);if(Z)z.setSortDef(Z);if(J!==void 0){if(J!==null)z.sortIndex=J}else if(Q!==null)z.sortIndex=Q}updateColSort(z,J,Q){if(J===void 0)return;this.setColSort(z,$4(J),Q)}setColSort(z,J,Q){if(!N6(z.getSortDef(),J))z.setSortDef(J),z.dispatchColEvent("sortChanged",Q);z.dispatchStateUpdatedEvent("sort")}setColSortIndex(z,J){z.sortIndex=J,z.dispatchStateUpdatedEvent("sortIndex")}createSortIndicator(z){return new f5(z)}getSortIndicatorSelector(){return QL}},IX={moduleName:"Sort",version:p,beans:[ZL,oF],apiFunctions:{onSortChanged:zL},userComponents:{agSortIndicator:f5},icons:{sortAscending:"asc",sortDescending:"desc",sortUnSort:"none",sortAbsoluteAscending:"aasc",sortAbsoluteDescending:"adesc"}},$L=class extends j{constructor(){super(...arguments);this.beanName="syncSvc",this.waitingForColumns=!1}postConstruct(){this.addManagedPropertyListener("columnDefs",(z)=>this.setColumnDefs(z))}start(){this.beans.ctrlsSvc.whenReady(this,()=>{let z=this.gos.get("columnDefs");if(z)this.setColumnsAndData(z);else this.waitingForColumns=!0;this.gridReady()})}setColumnsAndData(z){let{colModel:J,rowModel:Q}=this.beans;J.setColumnDefs(z??[],"gridInitializing"),Q.start()}gridReady(){let{eventSvc:z,gos:J}=this;z.dispatchEvent({type:"gridReady"}),I2(J,`initialised successfully, enterprise = ${J.isModuleRegistered("EnterpriseCore")}`)}setColumnDefs(z){let J=this.gos.get("columnDefs");if(!J)return;if(this.waitingForColumns){this.waitingForColumns=!1,this.setColumnsAndData(J);return}this.beans.colModel.setColumnDefs(J,Az(z.source))}};var XL="paste",YL=class extends j{constructor(){super(...arguments);this.beanName="changeDetectionSvc",this.deferredDepth=0,this.batchedPath=null,this.batchedNodes=null}destroy(){super.destroy(),this.batchedPath=null,this.batchedNodes=null}postConstruct(){this.csrm=$5(this.beans),this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this)})}beginDeferred(){this.deferredDepth++}endDeferred(){if(this.deferredDepth===0)return;if(--this.deferredDepth>0)return;let z=this.batchedPath,J=this.batchedNodes;if(this.batchedPath=null,this.batchedNodes=null,z)this.csrm?.doAggregate(z);let{rowRenderer:Q}=this.beans;if(J)for(let Z of J)v8(Q,Z);if(z){let Z=z.getSortedRows();for(let $=0,X=Z.length;$<X;++$)v8(Q,Z[$])}if(this.batchedPath||this.batchedNodes)this.deferredDepth=1,this.endDeferred()}onCellValueChanged(z){let{gos:J,rowModel:Q,changedPathFactory:Z}=this.beans;if(z.source===XL||J.get("suppressChangeDetection"))return;if(!Q.rootNode)return;let $=z.node.primaryRow;if(this.csrm){let X=this.batchedPath;if(!X)X=Z?.newPath(J.get("aggregateOnlyChangedColumns"))??null,this.batchedPath=X;let Y=$;if(!$.group)(this.batchedNodes??(this.batchedNodes=new Set)).add($),Y=$.parent;X?.addCell(Y,z.column.getColId())}else(this.batchedNodes??(this.batchedNodes=new Set)).add($);if(this.deferredDepth===0)this.deferredDepth=1,this.endDeferred()}},v8=(z,J)=>{let{sibling:Q,pinnedSibling:Z}=J;z.refreshRowByNode(J),z.refreshRowByNode(Q),z.refreshRowByNode(Z),z.refreshRowByNode(Q?.pinnedSibling),z.refreshRowByNode(Z?.sibling)},UL=class extends j{constructor(){super(...arguments);this.beanName="expressionSvc",this.cache={}}evaluate(z,J){if(typeof z==="string")return this.evaluateExpression(z,J);else r(15,{expression:z})}evaluateExpression(z,J){try{return this.createExpressionFunction(z)(J.value,J.context,J.oldValue,J.newValue,J.value,J.node,J.data,J.colDef,J.rowIndex,J.api,J.getValue,J.column,J.columnGroup)}catch(Q){return r(16,{expression:z,params:J,e:Q}),null}}createExpressionFunction(z){let J=this.cache;if(J[z])return J[z];let Q=this.createFunctionBody(z),Z=Function("x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, getValue, column, columnGroup",Q);return J[z]=Z,Z}createFunctionBody(z){if(z.includes("return"))return z;else return"return "+z+";"}};var _L={moduleName:"Expression",version:p,beans:[UL]},HL={moduleName:"ChangeDetection",version:p,beans:[YL]};var GL=class extends j{constructor(){super(...arguments);this.beanName="valueSvc",this.executeValueGetter=this.executeValueGetterWithoutValueCache,this.isTreeData=!1,this.isSsrm=!1,this.cellExpressions=!1,this.groupSuppressBlankHeader=!1,this.editSvc=void 0,this.valueCache=void 0,this.rowGroupColsSvc=void 0,this.expressionSvc=void 0,this.dataTypeSvc=void 0,this.formulaDataSvc=void 0}wireBeans(z){this.expressionSvc=z.expressionSvc,this.colModel=z.colModel,this.valueCache=z.valueCache,this.dataTypeSvc=z.dataTypeSvc,this.editSvc=z.editSvc,this.formulaDataSvc=z.formulaDataSvc,this.rowGroupColsSvc=z.rowGroupColsSvc,this.init()}init(){let z=this.gos;this.isSsrm=Iz(z),this.cellExpressions=z.get("enableCellExpressions"),this.isTreeData=z.get("treeData"),this.groupSuppressBlankHeader=z.get("groupSuppressBlankHeader"),this.executeValueGetter=this.valueCache&&z.get("valueCache")?this.executeValueGetterWithValueCache:this.executeValueGetterWithoutValueCache}postConstruct(){this.init();let z=(J)=>this.callColumnCellValueChangedHandler(J);this.eventSvc.addListener("cellValueChanged",z,!0),this.addDestroyFunc(()=>this.eventSvc.removeListener("cellValueChanged",z,!0)),this.addManagedPropertyListener("treeData",(J)=>this.isTreeData=J.currentValue),this.addManagedPropertyListener("groupSuppressBlankHeader",(J)=>this.groupSuppressBlankHeader=J.currentValue)}getValueForDisplay(z){let J=this.beans,Q=z.column,Z=z.node,$=J.showRowGroupColValueSvc,X=!Q&&Z.group,Y=!this.isTreeData||Z.footer;if($&&Y&&(X||Q?.colDef.showRowGroup)){let q=$.getGroupValue(Z,Q,this.displayIgnoresAggData(Z));if(q==null)return{value:null,valueFormatted:null};return{value:q.value,valueFormatted:z.includeValueFormatted?$.formatAndPrefixGroupColValue(q,Q,z.exporting):null}}if(!Q)return{value:Z.key,valueFormatted:null};let U=this.getValue(Q,Z,z.from,this.displayIgnoresAggData(Z)),_=U,H=J.formula,G=Q.colDef;if(G.allowFormula&&H?.isFormula(U))if(z.useRawFormula)U=H.normaliseFormula(U,!0),_=H.resolveValue(Q,Z);else U=H.resolveValue(Q,Z),_=U;let W=z.includeValueFormatted&&!(z.exporting&&G.useValueFormatterForExport===!1);return{value:U,valueFormatted:W?this.formatValue(Q,Z,_):null}}getValue(z,J,Q,Z=!1){if(!J)return;let $=z.colDef,X=J.group;if(!X&&!J.rowPinned){let _=$.pivotValueColumn;if(_)z=_}let Y=this.editSvc;if(Y&&Q!=="data"){let _=Y.getPendingEditValue(J,z,Q);if(_!==void 0)return _}let U=this.resolveValue(z,J,Z,X);if(U===void 0){if(X){let _=$.showRowGroup;if(typeof _==="string"){let H=this.rowGroupColsSvc?.getColumnIndex(_);if(H!=null&&H>J.level)return null}}return}if(this.cellExpressions&&TZ(U)){let _=U.substring(1);U=this.executeValueGetter(_,J.data,z,J)}return U}displayIgnoresAggData(z){if(!z.group||z.footer||z.level===-1)return!1;if(!z.sibling||this.groupSuppressBlankHeader)return!1;if(z.leafGroup&&this.colModel.pivotMode)return!1;return!!z.expanded}resolveValue(z,J,Q,Z){let{colDef:$,colId:X}=z;if(!Z&&$.allowFormula){let L=this.beans.formula?.getDataSourceFormula(J,z);if(L!==void 0)return L}let Y=Z&&!Q?J.aggData:void 0,U=this.isTreeData;if(U&&Y?.[X]!==void 0)return Y[X];let _=J.data,H=$.field,G=$.valueGetter;if(U){if(G)return this.executeValueGetter(G,_,z,J);if(H&&_)return z.fieldContainsDots?j2(_,H):_[H]}let W=J.groupData;if(W&&X in W)return W[X];if(Y?.[X]!==void 0)return Y[X];let q=$.showRowGroup,B=typeof q!=="string"||!Z,E=this.isSsrm,K=E&&Q&&!!$.aggFunc;if(G&&!K)return B?this.executeValueGetter(G,_,z,J):void 0;if(E&&J.footer&&J.field&&(q===!0||q===J.field)){if(!_)return;let L=J.field;return z.fieldContainsDots?j2(_,L):_[L]}if(H&&_&&!K){if(!B)return;return z.fieldContainsDots?j2(_,H):_[H]}return}parseValue(z,J,Q,Z){let $=z.colDef;if($.allowFormula&&this.beans.formula?.isFormula(Q))return Q;let X=$.valueParser;if(I(X)){let Y=v(this.gos,{node:J,data:J?.data,oldValue:Z,newValue:Q,colDef:$,column:z});if(typeof X==="function")return X(Y);return this.expressionSvc?.evaluate(X,Y)}return Q}getDeleteValue(z,J){if(I(z.colDef.valueParser))return this.parseValue(z,J,"",this.getValueForDisplay({column:z,node:J,from:"edit"}).value)??null;return null}formatValue(z,J,Q,Z,$=!0){let{expressionSvc:X}=this.beans,Y=null,U,_=z.colDef;if(Z)U=Z;else if($)U=_.valueFormatter;if(U){let H=J?J.data:null,G=v(this.gos,{value:Q,node:J,data:H,colDef:_,column:z});if(typeof U==="function")Y=U(G);else Y=X?X.evaluate(U,G):null}else if(_.refData)return _.refData[Q]||"";if(Y==null&&Array.isArray(Q))Y=Q.join(", ");return Y}setValue(z,J,Q,Z){let $=J.colDef;if(!z.data&&this.canCreateRowNodeData(z,$))z.data={};if(!this.isSetValueSupported(J,z,Q,$))return!1;let X=this.getValue(J,z,"data"),Y=v(this.gos,{node:z,data:z.data,oldValue:X,newValue:Q,colDef:$,column:J}),U=!1;if(z.data){let H=this.handleExternalFormulaChange({column:J,eventSource:Z,newValue:Q,setterParams:Y,rowNode:z});if(H!==null)return H;U=this.computeValueChange({column:J,rowNode:z,newValue:Q,params:Y,rowData:z.data,valueSetter:$.valueSetter,field:$.field})??!0}let _=this.beans.changeDetectionSvc;_?.beginDeferred();try{if(z.group){let H=this.beans.rowGroupingEditValueSvc?.setGroupDataValue(z,J,Q,X,Z,U||Q!==X);if(H!==void 0){if(!U&&!H)return!1;return this.finishValueChange(z,J,Y,Z,Q)}}if(!U)return!1;return this.finishValueChange(z,J,Y,Z)}finally{_?.endDeferred()}}canCreateRowNodeData(z,J){if(!z.group)return!0;if(J.groupRowValueSetter!=null||J.groupRowEditable!=null)return!1;if(J.pivotValueColumn)return!1;return!0}finishValueChange(z,J,Q,Z,$){z.resetQuickFilterAggregateText(),this.valueCache?.onDataChanged();let X=$===void 0?this.getValue(J,z,"data"):$;if(this.dispatchCellValueChangedEvent(z,Q,X,Z),z.pinnedSibling)this.dispatchCellValueChangedEvent(z.pinnedSibling,Q,X,Z);return!0}isSetValueSupported(z,J,Q,Z){let{field:$,valueSetter:X}=Z,Y=this.beans.formula,U=z.colDef.allowFormula&&Y?.isFormula(Q),_=!!this.formulaDataSvc?.hasDataSource();if(n($)&&n(X)&&!(_&&U)){if(J.group&&(Z.groupRowValueSetter||Z.groupRowEditable))return!0;return V(17),!1}if(this.dataTypeSvc&&!this.dataTypeSvc.checkType(z,Q))return V(135),!1;return!0}handleExternalFormulaChange(z){let{column:J,rowNode:Q,newValue:Z,eventSource:$,setterParams:X}=z,Y=this.beans.formula,U=this.formulaDataSvc;if(!J.colDef.allowFormula||!U?.hasDataSource())return null;let _=Y?.isFormula(Z),H=U.getFormula({column:J,rowNode:Q});if(_){if(H===Z)return!1;U.setFormula({column:J,rowNode:Q,formula:Z});let W=Y?.resolveValue(J,Q),q=J.colDef;if(I(q.valueSetter)||!n(q.field)){let B={...X,newValue:W};this.computeValueChange({column:J,rowNode:Q,newValue:W,params:B,rowData:Q.data,valueSetter:q.valueSetter,field:q.field})}return this.finishValueChange(Q,J,X,$)}if(H!==void 0)U.setFormula({column:J,rowNode:Q,formula:void 0});return null}computeValueChange(z){let{valueSetter:J,params:Q,rowData:Z,field:$,column:X,newValue:Y}=z;if(I(J)){if(typeof J==="function")return J(Q);return this.expressionSvc?.evaluate(J,Q)}return!!Z&&this.setValueUsingField(Z,$,Y,X.fieldContainsDots)}dispatchCellValueChangedEvent(z,J,Q,Z){this.eventSvc.dispatchEvent({type:"cellValueChanged",event:null,rowIndex:z.rowIndex,rowPinned:z.rowPinned,column:J.column,colDef:J.colDef,data:z.data,node:z,oldValue:J.oldValue,newValue:Q,newRawValue:J.newValue,value:Q,source:Z})}callColumnCellValueChangedHandler(z){let J=z.colDef.onCellValueChanged;if(typeof J==="function")this.beans.frameworkOverrides.wrapOutgoing(()=>{J(z)})}setValueUsingField(z,J,Q,Z){if(!J)return!1;let $=!1;if(!Z){if($=z[J]===Q,!$)z[J]=Q}else{let X=J.split("."),Y=z;while(X.length>0&&Y){let U=X.shift();if(X.length===0){if($=Y[U]===Q,!$)Y[U]=Q}else Y=Y[U]}}return!$}executeValueGetterWithValueCache(z,J,Q,Z){let $=Q.colId,X=this.valueCache.getValue(Z,$);if(X!==void 0)return X;let Y=this.executeValueGetterWithoutValueCache(z,J,Q,Z);return this.valueCache.setValue(Z,$,Y),Y}executeValueGetterWithoutValueCache(z,J,Q,Z){let $=v(this.gos,{data:J,node:Z,column:Q,colDef:Q.colDef,getValue:(Y)=>this.getValueCallback(Z,Y)}),X;if(typeof z==="function")X=z($);else X=this.expressionSvc?.evaluate(z,$);return X}getValueCallback(z,J){let Q=this.colModel.getColDefColOrCol(J);return Q?this.getValue(Q,z,"data"):null}getKeyForNode(z,J){let Q=this.getValue(z,J,"data"),Z=z.colDef.keyCreator,$=Q;if(Z){let X=v(this.gos,{value:Q,colDef:z.colDef,column:z,node:J,data:J.data});$=Z(X)}if(typeof $==="string"||$==null)return $;if($=String($),$==="[object Object]")V(121);return $}},WL={moduleName:"CommunityCore",version:p,beans:[a3,wq,VE,RG,tF,hB,d3,DK,iB,MF,LF,lF,GL,s3,p3,l3,PE,$L,FE,LE,CK],icons:{selectOpen:"small-down",smallDown:"small-down",colorPicker:"color-picker",smallUp:"small-up",checkboxChecked:"small-up",checkboxIndeterminate:"checkbox-indeterminate",checkboxUnchecked:"checkbox-unchecked",radioButtonOn:"radio-button-on",radioButtonOff:"radio-button-off",smallLeft:"small-left",smallRight:"small-right"},apiFunctions:{getGridId:yq,destroy:xq,isDestroyed:bq,getGridOption:gq,setGridOption:hq,updateGridOptions:c$,isModuleRegistered:uq},dependsOn:[EE,z6,OB,IX,SK,A5,IK,rF,HL,kK,G1,jF,PF,wK,RE,KE,_L,zE,IF]};function FZ(z){let{inputValue:J,allSuggestions:Q,hideIrrelevant:Z,maxSuggestions:$}=z,X=(Q??[]).map((_,H)=>({value:_,relevance:qL(J,_),idx:H}));if(X.sort((_,H)=>_.relevance-H.relevance),Z)X=X.filter((_)=>_.relevance<Math.max(_.value.length,J.length));if($!=null&&$>0)X=X.slice(0,$);let Y=[],U=[];for(let _ of X)Y.push(_.value),U.push(_.idx);return{values:Y,indices:U}}function qL(z,J){let Q=z.length,Z=J.length;if(Z===0)return Q?Q:0;let $=z.toLocaleLowerCase(),X=J.toLocaleLowerCase(),Y;if(Q>0){let W=X.indexOf($);if(W>=0)return W*0.01}if(z.length<J.length)Y=X,X=$,$=Y,Y=J,J=z,z=Y;let U=new Uint16Array(Z+1),_=new Uint16Array(Z+1);for(let W=0;W<=Z;W++)U[W]=W;let H=0,G=Q/2-10;for(let W=1;W<=Q;W++){let q=z[W-1],B=$[W-1];_[0]=W;for(let E=1;E<=Z;E++){let K=J[E-1],F=X[E-1];if(B!==F){let L=_[E-1],M=U[E],D=U[E-1],A=L<M?L:M;if(D<A)A=D;_[E]=A+1|0;continue}if(H++,q===K)H++;if(W>1&&E>1){let L=z[W-2],M=$[W-2],D=J[E-2],A=X[E-2];if(M===A){if(H++,L===D)H++}}if(W<G)H++;_[E]=U[E-1]}Y=U,U=_,_=Y}return U[Z]/(H+1)}var fX={AdvancedFilter:1,AiToolkit:1,AllEnterprise:1,BatchEdit:1,CellSelection:1,Clipboard:1,ColumnMenu:1,ColumnsToolPanel:1,ContextMenu:1,ExcelExport:1,FiltersToolPanel:1,Find:1,GridCharts:1,IntegratedCharts:1,GroupFilter:1,MasterDetail:1,Menu:1,MultiFilter:1,NewFiltersToolPanel:1,Pivot:1,RangeSelection:1,RichSelect:1,RowNumbers:1,RowGrouping:1,RowGroupingEdit:1,RowGroupingPanel:1,ServerSideRowModelApi:1,ServerSideRowModel:1,SetFilter:1,SideBar:1,Sparklines:1,StatusBar:1,Toolbar:1,TreeData:1,ViewportRowModel:1,Formula:1,Notes:1},iQ=["TextFilter","NumberFilter","BigIntFilter","DateFilter","SetFilter","MultiFilter","GroupFilter","CustomFilter"],BL={EditCore:["TextEditor","NumberEditor","DateEditor","CheckboxEditor","LargeTextEditor","SelectEditor","RichSelect","CustomEditor"],CheckboxCellRenderer:["AllCommunity"],CsrmHierarchy:["RowGrouping","Pivot","TreeData"],CsrmGroupStages:["RowGrouping","Pivot","TreeData"],ColumnFilter:iQ,ColumnGroupHeaderComp:["AllCommunity"],ColumnGroup:["AllCommunity"],ColumnHeaderComp:["AllCommunity"],ColumnMove:["AllCommunity"],ColumnResize:["AllCommunity"],CommunityCore:["AllCommunity"],CsrmSsrmSharedApi:["ClientSideRowModelApi","ServerSideRowModelApi"],RowModelSharedApi:["ClientSideRowModelApi","ServerSideRowModelApi"],EnterpriseCore:["AllEnterprise"],FilterCore:[...iQ,"QuickFilter","ExternalFilter","AdvancedFilter"],GroupCellRenderer:["RowGrouping","Pivot","TreeData","MasterDetail","ServerSideRowModel"],KeyboardNavigation:["AllCommunity"],LoadingCellRenderer:["ServerSideRowModel"],MenuCore:["ColumnMenu","ContextMenu"],MenuItem:["ColumnMenu","ContextMenu","MultiFilter","IntegratedCharts","ColumnsToolPanel"],Overlay:["AllCommunity"],PinnedColumn:["AllCommunity"],SharedAggregation:["RowGrouping","Pivot","TreeData","ServerSideRowModel"],SharedDragAndDrop:["AllCommunity"],SharedMasterDetail:["MasterDetail","ServerSideRowModel"],SharedMenu:[...iQ,"ColumnMenu","ContextMenu"],SharedPivot:["Pivot","ServerSideRowModel"],SharedRowGrouping:["RowGrouping","ServerSideRowModel"],SharedRowSelection:["RowSelection","ServerSideRowModel"],SkeletonCellRenderer:["ServerSideRowModel"],Sort:["AllCommunity"],SsrmInfiniteSharedApi:["InfiniteRowModel","ServerSideRowModelApi"],SharedTreeData:["TreeData","ServerSideRowModel"]},EL={InfiniteRowModel:"infinite",ClientSideRowModelApi:"clientSide",ClientSideRowModel:"clientSide",ServerSideRowModelApi:"serverSide",ServerSideRowModel:"serverSide",ViewportRowModel:"viewport"};function KL(z,J){let Q=[];for(let Z of Array.isArray(z)?z:[z]){let $=BL[Z];if($)for(let X of $){let Y=EL[X];if(!Y||Y===J)Q.push(X)}else Q.push(Z)}return Q}var kX=(z,J,Q)=>{if(Q)return`${["import { AgGridProvider, AgGridReact } from 'ag-grid-react';",...z].join(`
21
+ `)}
22
+
23
+ const modules = [ ${J} ];
24
+
25
+ function App() {
26
+ return (
27
+ <AgGridProvider modules={modules}>
28
+ <AgGridReact /* ... props */ />
29
+ </AgGridProvider>
30
+ );
31
+ }`;return`${z.join(`
32
+ `)}
33
+
34
+ ModuleRegistry.registerModules([ ${J} ]);`},CX=(z)=>{let J=z!==void 0;return`No AG Grid modules are registered! It is recommended to start with all Community features via the AllCommunityModule:
35
+
36
+ ${kX([`import { ${J?"":"ModuleRegistry, "}AllCommunityModule } from 'ag-grid-community';`],"AllCommunityModule",J)}
37
+ `},FL=(z,J)=>{let Q=z.map((X)=>`import { ${O2(X)} } from '${fX[X]?"ag-grid-enterprise":"ag-grid-community"}';`);if(z.some((X)=>X==="IntegratedCharts"||X==="Sparklines"))Q.push("import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';");let $=z.map((X)=>O2(X,!0)).join(", ");if(!J)Q.unshift("import { ModuleRegistry } from 'ag-grid-community';");return`${kX(Q,$,J)}
38
+
39
+ For more info see: ${N1}/modules/`};function O2(z,J=!1){if(J&&(z==="IntegratedCharts"||z==="Sparklines"))return`${z}Module.with(AgChartsEnterpriseModule)`;return`${z}Module`}function LL(z,J){let Q=J.filter((X)=>X==="IntegratedCharts"||X==="Sparklines"),Z="";if(!globalThis?.agCharts&&Q.length>0)Z=`Unable to use ${z} as either the ag-charts-community or ag-charts-enterprise script needs to be included alongside ag-grid-enterprise.
40
+ `;else if(J.some((X)=>fX[X]))Z=Z+`Unable to use ${z} as that requires the ag-grid-enterprise script to be included.
41
+ `;return Z}function vX({moduleName:z,rowModelType:J}){return`To use the ${z}Module you must set the gridOption "rowModelType='${J}'"`}var dQ=({reasonOrId:z,moduleName:J,gridScoped:Q,gridId:Z,rowModelType:$,additionalText:X,isUmd:Y,usesAgGridProvider:U})=>{let _=KL(J,$),H=typeof z==="string"?z:AL[z];if(Y)return LL(H,_);let G=_.filter((B)=>B==="IntegratedCharts"||B==="Sparklines"),W=G.length>0?`${G.map((B)=>O2(B)).join()} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.`:"";return`${`Unable to use ${H} as ${_.length>1?"one of "+_.map((B)=>O2(B)).join(", "):O2(_[0])} is not registered${Q?" for gridId: "+Z:""}. ${W} Check if you have registered the module:
42
+ `}
43
+ ${FL(_,U)}`+(X?`
44
+
45
+ ${X}`:"")},N8=(z)=>{return`${z} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.
46
+
47
+ import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';
48
+ import { ModuleRegistry } from 'ag-grid-community';
49
+ import { ${z} } from 'ag-grid-enterprise';
50
+
51
+ ModuleRegistry.registerModules([${z}.with(AgChartsEnterpriseModule)]);
52
+ `},ML=(z)=>`AG Grid: Unable to use the Clipboard API (navigator.clipboard.${z}()). The reason why it could not be used has been logged in the previous line. For this reason the grid has defaulted to using a workaround which doesn't perform as well. Either fix why Clipboard API is blocked, OR stop this message from appearing by setting grid property suppressClipboardApi=true (which will default the grid to using the workaround rather than the API.`,DL={1:()=>"`rowData` must be an array",2:({nodeId:z})=>`Duplicate node id '${z}' detected from getRowId callback, this could cause issues in your grid.`,3:()=>"Calling gridApi.resetRowHeights() makes no sense when using Auto Row Height.",4:({id:z})=>`Could not find row id=${z}, data item was not found for this id`,5:({data:z})=>["Could not find data item as object was not found.",z," Consider using getRowId to help the Grid find matching row data"],6:()=>"'groupHideOpenParents' only works when specifying specific columns for 'colDef.showRowGroup'",7:()=>"Pivoting is not supported with aligned grids as it may produce different columns in each grid.",8:({key:z})=>`Unknown key for navigation ${z}`,9:({variable:z})=>`No value for ${z?.cssName}. This usually means that the grid has been initialised before styles have been loaded. The default value of ${z?.defaultValue} will be used and updated when styles load.`,10:({eventType:z})=>`As of v33, the '${z}' event is deprecated. Use the global 'modelUpdated' event to determine when row children have changed.`,11:()=>"No gridOptions provided to createGrid",12:({colKey:z})=>["column ",z," not found"],13:()=>"Could not find rowIndex, this means tasks are being executed on a rowNode that has been removed from the grid.",14:({groupPrefix:z})=>`Row IDs cannot start with ${z}, this is a reserved prefix for AG Grid's row grouping feature.`,15:({expression:z})=>["value should be either a string or a function",z],16:({expression:z,params:J,e:Q})=>["Processing of the expression failed","Expression = ",z,"Params = ",J,"Exception = ",Q],17:()=>"you need either field or valueSetter set on colDef for editing to work",18:()=>"alignedGrids contains an undefined option.",19:()=>"alignedGrids - No api found on the linked grid.",20:()=>`You may want to configure via a callback to avoid setup race conditions:
53
+ "alignedGrids: () => [linkedGrid]"`,21:()=>"pivoting is not supported with aligned grids. You can only use one of these features at a time in a grid.",22:({key:z})=>`${z} is an initial property and cannot be updated.`,23:()=>"The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead.",24:()=>"row height must be a number if not using standard row model",25:({id:z})=>["The getRowId callback must return a string. The ID ",z," is being cast to a string."],26:({fnName:z,preDestroyLink:J})=>{return`Grid API function ${z}() cannot be called as the grid has been destroyed.
54
+ Either clear local references to the grid api, when it is destroyed, or check gridApi.isDestroyed() to avoid calling methods against a destroyed grid.
55
+ To run logic when the grid is about to be destroyed use the gridPreDestroy event. See: ${J}`},27:({fnName:z,module:J})=>`API function '${z}' not registered to module '${J}'`,28:()=>"setRowCount cannot be used while using row grouping.",29:()=>"tried to call sizeColumnsToFit() but the grid is coming back with zero width, maybe the grid is not visible yet on the screen?",30:({toIndex:z})=>["tried to insert columns in invalid location, toIndex = ",z,"remember that you should not count the moving columns when calculating the new index"],31:()=>"infinite loop in resizeColumnSets",32:()=>"applyColumnState() - the state attribute should be an array, however an array was not found. Please provide an array of items (one for each col you want to change) for state.",33:()=>"stateItem.aggFunc must be a string. if using your own aggregation functions, register the functions first before using them in get/set state. This is because it is intended for the column state to be stored and retrieved as simple JSON.",34:({key:z})=>`the column type '${z}' is a default column type and cannot be overridden.`,35:()=>"Column type definitions 'columnTypes' with a 'type' attribute are not supported because a column type cannot refer to another column type. Only column definitions 'columnDefs' can use the 'type' attribute to refer to a column type.",36:({t:z})=>"colDef.type '"+z+"' does not correspond to defined gridOptions.columnTypes",37:()=>"Changing the column pinning status is not allowed with domLayout='print'",38:({iconName:z})=>`provided icon '${z}' needs to be a string or a function`,39:()=>"Applying column order broke a group where columns should be married together. Applying new order has been discarded.",40:({e:z,method:J})=>`${z}
56
+ ${ML(J)}`,41:()=>"Browser did not allow document.execCommand('copy'). Ensure 'api.copySelectedRowsToClipboard() is invoked via a user event, i.e. button click, otherwise the browser will prevent it for security reasons.",42:()=>"Browser does not support document.execCommand('copy') for clipboard operations",43:({iconName:z})=>`As of v33, icon '${z}' is deprecated. Use the icon CSS name instead.`,44:()=>'Data type definition hierarchies (via the "extendsDataType" property) cannot contain circular references.',45:({parentCellDataType:z})=>`The data type definition ${z} does not exist.`,46:()=>'The "baseDataType" property of a data type definition must match that of its parent.',47:({cellDataType:z})=>`Missing data type definition - "${z}"`,48:({property:z,inferred:J,colId:Q})=>{let Z=J?" (inferred)":"",$=Q?` for column "${Q}"`:"";return`Cell data type is "object"${Z} but no Value ${z} has been provided${$}. Please either provide an object data type definition with a Value ${z}, or set:
57
+ - "colDef.value${z}"${J&&z==="Parser"?`
58
+ - "colDef.cellDataType = 'object'"`:""}`},49:({methodName:z})=>`Framework component is missing the method ${z}()`,50:({compName:z})=>`Could not find component ${z}, did you forget to configure this component?`,51:()=>"Export cancelled. Export is not allowed as per your configuration.",52:()=>"There is no `window` associated with the current `document`",53:()=>"unknown value type during csv conversion",54:()=>"Could not find document body, it is needed for drag and drop and context menu.",55:()=>"addRowDropZone - A container target needs to be provided",56:()=>"addRowDropZone - target already exists in the list of DropZones. Use `removeRowDropZone` before adding it again.",57:()=>"unable to show popup filter, filter instantiation failed",58:()=>"no values found for select cellEditor",59:()=>"cannot select pinned rows",60:()=>"cannot select node until it has finished loading",61:()=>"since version v32.2.0, rowNode.isFullWidthCell() has been deprecated. Instead check `rowNode.detail` followed by the user provided `isFullWidthRow` grid option.",62:({colId:z})=>`setFilterModel() - no column found for colId: ${z}`,63:({colId:z})=>`setFilterModel() - unable to fully apply model, filtering disabled for colId: ${z}`,64:({colId:z})=>`setFilterModel() - unable to fully apply model, unable to create filter for colId: ${z}`,65:()=>"filter missing setModel method, which is needed for setFilterModel",66:()=>"filter API missing getModel method, which is needed for getFilterModel",67:()=>"Filter is missing isFilterActive() method",68:()=>"Column Filter API methods have been disabled as Advanced Filters are enabled.",69:({guiFromFilter:z})=>`getGui method from filter returned ${z}; it should be a DOM element.`,70:({newFilter:z})=>`Grid option quickFilterText only supports string inputs, received: ${typeof z}`,71:()=>"debounceMs is ignored when apply button is present",72:({keys:z})=>["ignoring FilterOptionDef as it doesn't contain one of ",z],73:()=>"invalid FilterOptionDef supplied as it doesn't contain a 'displayKey'",74:()=>"no filter options for filter",75:()=>"Unknown button type specified",76:({filterModelType:z})=>['Unexpected type of filter "',z,'", it looks like the filter was configured with incorrect Filter Options'],77:()=>"Filter model is missing 'conditions'",78:()=>'Filter Model contains more conditions than "filterParams.maxNumConditions". Additional conditions have been ignored.',79:()=>'"filterParams.maxNumConditions" must be greater than or equal to zero.',80:()=>'"filterParams.numAlwaysVisibleConditions" must be greater than or equal to zero.',81:()=>'"filterParams.numAlwaysVisibleConditions" cannot be greater than "filterParams.maxNumConditions".',82:({param:z})=>`DateFilter ${z} is not a number`,83:()=>"DateFilter minValidYear should be <= maxValidYear",84:()=>"DateFilter minValidDate should be <= maxValidDate",85:()=>"DateFilter should not have both minValidDate and minValidYear parameters set at the same time! minValidYear will be ignored.",86:()=>"DateFilter should not have both maxValidDate and maxValidYear parameters set at the same time! maxValidYear will be ignored.",87:()=>"DateFilter parameter minValidDate should always be lower than or equal to parameter maxValidDate.",88:({index:z})=>`Invalid row index for ensureIndexVisible: ${z}`,89:()=>"A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)",90:()=>"datasource is missing getRows method",91:()=>"Filter is missing method doesFilterPass",92:()=>"AnimationFrameService called but animation frames are off",93:()=>"cannot add multiple ranges when `cellSelection.suppressMultiRanges = true`",94:({paginationPageSizeOption:z,pageSizeSet:J,pageSizesSet:Q,pageSizeOptions:Z})=>`'paginationPageSize=${z}'${J?"":" (default value)"}, but ${z} is not included in${Q?"":" the default"} paginationPageSizeSelector=[${Z?.join(", ")}].`,95:({paginationPageSizeOption:z,paginationPageSizeSelector:J})=>`Either set '${J}' to an array that includes ${z} or to 'false' to disable the page size selector.`,96:({id:z,data:J})=>["Duplicate ID",z,"found for pinned row with data",J,"When `getRowId` is defined, it must return unique IDs for all pinned rows. Use the `rowPinned` parameter."],97:({colId:z})=>`cellEditor for column ${z} is missing getGui() method`,98:()=>"popup cellEditor does not work with fullRowEdit - you cannot use them both - either turn off fullRowEdit, or stop using popup editors.",99:()=>"Since v32, `api.hideOverlay()` does not hide the loading overlay when `loading=true`. Set `loading=false` instead.",101:({propertyName:z,componentName:J,agGridDefaults:Q,jsComps:Z})=>{let $=[],X=[...Object.keys(Q??[]).filter((U)=>!["agCellEditor","agGroupRowRenderer","agSortIndicator"].includes(U)),...Object.keys(Z??[]).filter((U)=>!!Z[U])],Y=FZ({inputValue:J,allSuggestions:X,hideIrrelevant:!0,maxSuggestions:4}).values;if($.push(`Could not find '${J}' component. It was configured as "${z}: '${J}'" but it wasn't found in the list of registered components.
59
+ `),Y.length>0)$.push(` Did you mean: [${Y.slice(0,3)}]?
60
+ `);return $.push("If using a custom component check it has been registered correctly."),$},102:()=>"selectAll: 'filtered' only works when gridOptions.rowModelType='clientSide'",103:()=>"Invalid selection state. When using client-side row model, the state must conform to `string[]`.",104:({value:z,param:J})=>`Numeric value ${z} passed to ${J} param will be interpreted as ${z} seconds. If this is intentional use "${z}s" to silence this warning.`,105:({e:z})=>["chart rendering failed",z],106:()=>`Theming API and Legacy Themes are both used in the same page. A Theming API theme has been provided to the 'theme' grid option, but the file (ag-grid.css) is also included and will cause styling issues. Remove ag-grid.css from the page. See the migration guide: ${N1}/theming-migration/`,107:({key:z,value:J})=>`Invalid value for theme param ${z} - ${J}`,108:({e:z})=>["chart update failed",z],109:({inputValue:z,allSuggestions:J})=>{let Q=FZ({inputValue:z,allSuggestions:J,hideIrrelevant:!0,maxSuggestions:4}).values;return[`Could not find '${z}' aggregate function. It was configured as "aggFunc: '${z}'" but it wasn't found in the list of registered aggregations.`,Q.length>0?` Did you mean: [${Q.slice(0,3)}]?`:"","If using a custom aggregation function check it has been registered correctly."].join(`
61
+ `)},110:()=>"groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup",111:()=>"Invalid selection state. When `groupSelects` is enabled, the state must conform to `IServerSideGroupSelectionState`.",113:()=>"Set Filter cannot initialise because you are using a row model that does not contain all rows in the browser. Either use a different filter type, or configure Set Filter such that you provide it with values",114:({component:z})=>`Could not find component with name of ${z}. Is it in Vue.components?`,116:()=>"Invalid selection state. The state must conform to `IServerSideSelectionState`.",117:()=>"selectAll must be of boolean type.",118:()=>"Infinite scrolling must be enabled in order to set the row count.",119:()=>"Unable to instantiate filter",120:()=>"MultiFloatingFilterComp expects MultiFilter as its parent",121:()=>"a column you are grouping or pivoting by has objects as values. If you want to group by complex objects then either a) use a colDef.keyCreator (see AG Grid docs) or b) to toString() on the object to return a key",122:()=>"could not find the document, document is empty",123:()=>"Advanced Filter is only supported with the Client-Side Row Model or Server-Side Row Model.",124:()=>"No active charts to update.",125:({chartId:z})=>`Unable to update chart. No active chart found with ID: ${z}.`,126:()=>"unable to restore chart as no chart model is provided",127:({allRange:z})=>`unable to create chart as ${z?"there are no columns in the grid":"no range is selected"}.`,128:({feature:z})=>`${z} is only available if using 'multiRow' selection mode.`,129:({feature:z,rowModel:J})=>`${z} is only available if using 'clientSide' or 'serverSide' rowModelType, you are using ${J}.`,130:()=>'cannot multi select unless selection mode is "multiRow"',132:()=>"Row selection features are not available unless `rowSelection` is enabled.",133:({iconName:z})=>`icon '${z}' function should return back a string or a dom object`,134:({iconName:z})=>`Did not find icon '${z}'`,135:()=>"Data type of the new value does not match the cell data type of the column",136:()=>"Unable to update chart as the 'type' is missing. It must be either 'rangeChartUpdate', 'pivotChartUpdate', or 'crossFilterChartUpdate'.",137:({type:z,currentChartType:J})=>`Unable to update chart as a '${z}' update type is not permitted on a ${J}.`,138:({chartType:z})=>`invalid chart type supplied: ${z}`,139:({customThemeName:z})=>`a custom chart theme with the name ${z} has been supplied but not added to the 'chartThemes' list`,140:({name:z})=>`no stock theme exists with the name '${z}' and no custom chart theme with that name was supplied to 'customChartThemes'`,141:()=>"cross filtering with row grouping is not supported.",142:()=>"cross filtering is only supported in the client side row model.",143:({panel:z})=>`'${z}' is not a valid Chart Tool Panel name`,144:({type:z})=>`Invalid charts data panel group name supplied: '${z}'`,145:({group:z})=>`As of v32, only one charts customize panel group can be expanded at a time. '${z}' will not be expanded.`,146:({comp:z})=>`Unable to instantiate component '${z}' as its module hasn't been loaded. Add 'ValidationModule' to see which module is required.`,147:({group:z})=>`Invalid charts customize panel group name supplied: '${z}'`,148:({group:z})=>`invalid chartGroupsDef config '${z}'`,149:({group:z,chartType:J})=>`invalid chartGroupsDef config '${z}.${J}'`,150:()=>"'seriesChartTypes' are required when the 'customCombo' chart type is specified.",151:({chartType:z})=>`invalid chartType '${z}' supplied in 'seriesChartTypes', converting to 'line' instead.`,152:({colId:z})=>`no 'seriesChartType' found for colId = '${z}', defaulting to 'line'.`,153:({chartDataType:z})=>`unexpected chartDataType value '${z}' supplied, instead use 'category', 'series' or 'excluded'`,154:({colId:z})=>`cross filtering requires a 'agSetColumnFilter' or 'agMultiColumnFilter' to be defined on the column with id: ${z}`,155:({option:z})=>`'${z}' is not a valid Chart Toolbar Option`,156:({panel:z})=>`Invalid panel in chartToolPanelsDef.panels: '${z}'`,157:({unrecognisedGroupIds:z})=>["unable to find group(s) for supplied groupIds:",z],158:()=>"can not expand a column item that does not represent a column group header",159:()=>"Invalid params supplied to createExcelFileForExcel() - `ExcelExportParams.data` is empty.",160:()=>"Export cancelled. Export is not allowed as per your configuration.",161:()=>"The Excel Exporter is currently on Multi Sheet mode. End that operation by calling 'api.getMultipleSheetAsExcel()' or 'api.exportMultipleSheetsAsExcel()'",162:({id:z,dataType:J})=>`Unrecognized data type for excel export [${z}.dataType=${J}]`,163:({featureName:z})=>`Excel table export does not work with ${z}. The exported Excel file will not contain any Excel tables.
62
+ Please turn off ${z} to enable Excel table exports.`,164:()=>"Unable to add data table to Excel sheet: A table already exists.",165:()=>"Unable to add data table to Excel sheet: Missing required parameters.",166:({unrecognisedGroupIds:z})=>["unable to find groups for these supplied groupIds:",z],167:({unrecognisedColIds:z})=>["unable to find columns for these supplied colIds:",z],168:()=>"detailCellRendererParams.template should be function or string",169:()=>'Reference to eDetailGrid was missing from the details template. Please add data-ref="eDetailGrid" to the template.',170:({providedStrategy:z})=>`invalid cellRendererParams.refreshStrategy = ${z} supplied, defaulting to refreshStrategy = 'rows'.`,171:()=>"could not find detail grid options for master detail, please set gridOptions.detailCellRendererParams.detailGridOptions",172:()=>"could not find getDetailRowData for master / detail, please set gridOptions.detailCellRendererParams.getDetailRowData",173:({group:z})=>`invalid chartGroupsDef config '${z}'`,174:({group:z,chartType:J})=>`invalid chartGroupsDef config '${z}.${J}'`,175:({menuTabName:z,itemsToConsider:J})=>[`Trying to render an invalid menu item '${z}'. Check that your 'menuTabs' contains one of `,J],176:({key:z})=>`unknown menu item type ${z}`,177:()=>"valid values for cellSelection.handle.direction are 'x', 'y' and 'xy'. Default to 'xy'.",178:({colId:z})=>`column ${z} is not visible`,179:()=>"totalValueGetter should be either a function or a string (expression)",180:()=>"agRichSelectCellEditor requires cellEditorParams.values to be set",181:()=>"agRichSelectCellEditor cannot have `multiSelect` and `allowTyping` set to `true`. AllowTyping has been turned off.",182:()=>'you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data',183:()=>"Group Column Filter only works on group columns. Please use a different filter.",184:({parentGroupData:z,childNodeData:J})=>["duplicate group keys for row data, keys should be unique",[z,J]],185:({data:z})=>["getDataPath() should not return an empty path",[z]],186:({rowId:z,rowData:J,duplicateRowsData:Q})=>["duplicate group keys for row data, keys should be unique",z,J,...Q??[]],187:({rowId:z,firstData:J,secondData:Q})=>[`Duplicate node id ${z}. Row IDs are provided via the getRowId() callback. Please modify the getRowId() callback code to provide unique row id values.`,"first instance",J,"second instance",Q],188:(z)=>`getRowId callback must be provided for Server Side Row Model ${z?.feature||"selection"} to work correctly.`,189:({startRow:z})=>`invalid value ${z} for startRow, the value should be >= 0`,190:({rowGroupId:z,data:J})=>["null and undefined values are not allowed for server side row model keys",z?`column = ${z}`:"","data is ",J],194:({method:z})=>`calling gridApi.${z}() is only possible when using rowModelType=\`clientSide\`.`,195:({justCurrentPage:z})=>`selecting just ${z?"current page":"filtered"} only works when gridOptions.rowModelType='clientSide'`,196:({key:z})=>`Provided ids must be of string type. Invalid id provided: ${z}`,197:()=>"`toggledNodes` must be an array of string ids.",199:()=>"getSelectedNodes and getSelectedRows functions cannot be used with select all functionality with the server-side row model. Use `api.getServerSideSelectionState()` instead.",200:dQ,201:({rowModelType:z})=>`Could not find row model for rowModelType = ${z}`,202:()=>"`getSelectedNodes` and `getSelectedRows` functions cannot be used with `groupSelectsChildren` and the server-side row model. Use `api.getServerSideSelectionState()` instead.",203:()=>"Server Side Row Model does not support Dynamic Row Height and Cache Purging. Either a) remove getRowHeight() callback or b) remove maxBlocksInCache property. Purging has been disabled.",204:()=>"Server Side Row Model does not support Auto Row Height and Cache Purging. Either a) remove colDef.autoHeight or b) remove maxBlocksInCache property. Purging has been disabled.",205:({duplicateIdText:z})=>`Unable to display rows as duplicate row ids (${z}) were returned by the getRowId callback. Please modify the getRowId callback to provide unique ids.`,206:()=>"getRowId callback must be implemented for transactions to work. Transaction was ignored.",207:()=>'The Set Filter Parameter "defaultToNothingSelected" value was ignored because it does not work when "excelMode" is used.',208:()=>"Set Filter Value Formatter must return string values. Please ensure the Set Filter Value Formatter returns string values for complex objects.",209:()=>`Set Filter Key Creator is returning null for provided values and provided values are primitives. Please provide complex objects. See ${N1}/filter-set-filter-list/#filter-value-types`,210:()=>"Set Filter has a Key Creator, but provided values are primitives. Did you mean to provide complex objects?",211:()=>"property treeList=true for Set Filter params, but you did not provide a treeListPathGetter or values of type Date.",212:()=>"please review all your toolPanel components, it seems like at least one of them doesn't have an id",213:()=>"Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled.",214:({key:z})=>`unable to lookup Tool Panel as invalid key supplied: ${z}`,215:({key:z,defaultByKey:J})=>`the key ${z} is not a valid key for specifying a tool panel, valid keys are: ${Object.keys(J??{}).join(",")}`,216:({name:z})=>`Missing component for '${z}'`,217:({invalidColIds:z})=>["unable to find grid columns for the supplied colDef(s):",z],218:({property:z,defaultOffset:J})=>`${z} must be a number, the value you provided is not a valid number. Using the default of ${J}px.`,219:({property:z})=>`Property ${z} does not exist on the target object.`,220:({lineDash:z})=>`'${z}' is not a valid 'lineDash' option.`,221:()=>"agAggregationComponent should only be used with the client and server side row model.",222:()=>"agFilteredRowCountComponent should only be used with the client side row model.",223:()=>"agSelectedRowCountComponent should only be used with the client and server side row model.",224:()=>"agTotalAndFilteredRowCountComponent should only be used with the client side row model.",225:()=>"agTotalRowCountComponent should only be used with the client side row model.",226:()=>"viewport is missing init method.",227:()=>"menu item icon must be DOM node or string",228:({menuItemOrString:z})=>`unrecognised menu item ${z}`,230:()=>"detailCellRendererParams.template is not supported by AG Grid React. To change the template, provide a Custom Detail Cell Renderer. See https://www.ag-grid.com/react-data-grid/master-detail-custom-detail/",231:()=>"As of v32, using custom components with `reactiveCustomComponents = false` is deprecated.",232:()=>"Using both rowData and v-model. rowData will be ignored.",233:({methodName:z})=>`Framework component is missing the method ${z}()`,234:()=>'Group Column Filter does not work with the colDef property "field". This property will be ignored.',235:()=>'Group Column Filter does not work with the colDef property "filterValueGetter". This property will be ignored.',236:()=>'Group Column Filter does not work with the colDef property "filterParams". This property will be ignored.',237:()=>"Group Column Filter does not work with Tree Data enabled. Please disable Tree Data, or use a different filter.",238:()=>"setRowCount can only accept a positive row count.",239:()=>'Theming API and CSS File Themes are both used in the same page. In v33 we released the Theming API as the new default method of styling the grid. See the migration docs https://www.ag-grid.com/react-data-grid/theming-migration/. Because no value was provided to the `theme` grid option it defaulted to themeQuartz. But the file (ag-grid.css) is also included and will cause styling issues. Either pass the string "legacy" to the theme grid option to use v32 style themes, or remove ag-grid.css from the page to use Theming API.',240:({theme:z})=>`theme grid option must be a Theming API theme object or the string "legacy", received: ${z}`,243:()=>"Failed to deserialize state - each provided state object must be an object.",244:()=>"Failed to deserialize state - `selectAllChildren` must be a boolean value or undefined.",245:()=>"Failed to deserialize state - `toggledNodes` must be an array.",246:()=>"Failed to deserialize state - Every `toggledNode` requires an associated string id.",247:()=>`Row selection state could not be parsed due to invalid data. Ensure all child state has toggledNodes or does not conform with the parent rule.
63
+ Please rebuild the selection state and reapply it.`,248:()=>"SetFloatingFilter expects SetFilter as its parent",249:()=>"Must supply a Value Formatter in Set Filter params when using a Key Creator",250:()=>"Must supply a Key Creator in Set Filter params when `treeList = true` on a group column, and Tree Data or Row Grouping is enabled.",251:({chartType:z})=>`AG Grid: Unable to create chart as an invalid chartType = '${z}' was supplied.`,252:()=>`cannot get grid to draw rows when it is in the middle of drawing rows.
64
+ Your code probably called a grid API method while the grid was in the render stage.
65
+ To overcome this, put the API call into a timeout, e.g. instead of api.redrawRows(), call setTimeout(function() { api.redrawRows(); }, 0).
66
+ To see what part of your code that caused the refresh check this stacktrace.`,253:({version:z})=>["Illegal version string: ",z],254:()=>"Cannot create chart: no chart themes available.",255:({point:z})=>`Lone surrogate U+${z?.toString(16).toUpperCase()} is not a scalar value`,256:()=>"Unable to initialise. See validation error, or load ValidationModule if missing.",257:()=>N8("IntegratedChartsModule"),258:()=>N8("SparklinesModule"),259:({part:z})=>`the argument to theme.withPart must be a Theming API part object, received: ${z}`,260:({propName:z,compName:J,gridScoped:Q,gridId:Z,rowModelType:$,usesAgGridProvider:X})=>dQ({reasonOrId:`AG Grid '${z}' component: ${J}`,moduleName:b1[J],gridId:Z,gridScoped:Q,rowModelType:$,usesAgGridProvider:X}),261:()=>"As of v33, `column.isHovered()` is deprecated. Use `api.isColumnHovered(column)` instead.",262:()=>'As of v33, icon key "smallDown" is deprecated. Use "advancedFilterBuilderSelect" for Advanced Filter Builder dropdown, "selectOpen" for Select cell editor and dropdowns (e.g. Integrated Charts menu), "richSelectOpen" for Rich Select cell editor.',263:()=>'As of v33, icon key "smallLeft" is deprecated. Use "panelDelimiterRtl" for Row Group Panel / Pivot Panel, "subMenuOpenRtl" for sub-menus.',264:()=>'As of v33, icon key "smallRight" is deprecated. Use "panelDelimiter" for Row Group Panel / Pivot Panel, "subMenuOpen" for sub-menus.',265:({colId:z})=>`Unable to infer chart data type for column '${z}' if first data entry is null. Please specify "chartDataType", or a "cellDataType" in the column definition. For more information, see ${N1}/integrated-charts-range-chart#coldefchartdatatype .`,266:()=>'As of v33.1, using "keyCreator" with the Rich Select Editor has been deprecated. It now requires the "formatValue" callback to convert complex data to strings.',267:()=>"Detail grids can not use a different theme to the master grid, the `theme` detail grid option will be ignored.",268:()=>"Transactions aren't supported with tree data when using treeDataChildrenField",269:()=>"When `masterSelects: 'detail'`, detail grids must be configured with multi-row selection",270:({id:z,parentId:J})=>`Cycle detected for row with id='${z}' and parent id='${J}'. Resetting the parent for row with id='${z}' and showing it as a root-level node.`,271:({id:z,parentId:J})=>`Parent row not found for row with id='${z}' and parent id='${J}'. Showing row with id='${z}' as a root-level node.`,272:()=>CX(),273:({providedId:z,usedId:J})=>`Provided column id '${z}' was already in use, ensure all column and group ids are unique. Using '${J}' instead.`,274:({prop:z})=>{let J=`Since v33, ${z} has been deprecated.`;switch(z){case"maxComponentCreationTimeMs":J+=" This property is no longer required and so will be removed in a future version.";break;case"setGridApi":J+=" This method is not called by AG Grid. To access the GridApi see: https://ag-grid.com/react-data-grid/grid-interface/#grid-api ";break;case"children":J+=" For multiple versions AgGridReact does not support children.";break}return J},275:vX,276:()=>"Row Numbers Row Resizer cannot be used when Grid Columns have `autoHeight` enabled.",277:({colId:z})=>`'enableFilterHandlers' is set to true, but column '${z}' does not have 'filter.doesFilterPass' or 'filter.handler' set.`,278:({colId:z})=>`Unable to create filter handler for column '${z}'`,279:(z)=>{},280:({colId:z})=>`'name' must be provided for custom filter components for column '${z}`,281:({colId:z})=>`Filter for column '${z}' does not have 'filterParams.buttons', but the new Filters Tool Panel has buttons configured. Either configure buttons for the filter, or disable buttons on the Filters Tool Panel.`,282:()=>"New filter tool panel requires `enableFilterHandlers: true`.",283:()=>"As of v34, use the same method on the filter handler (`api.getColumnFilterHandler(colKey)`) instead.",284:()=>"As of v34, filters are active when they have a model. Use `api.getColumnFilterModel()` instead.",285:()=>"As of v34, use (`api.getColumnFilterModel()`) instead.",286:()=>"As of v34, use (`api.setColumnFilterModel()`) instead.",287:()=>"`api.doFilterAction()` requires `enableFilterHandlers = true",288:()=>"`api.getColumnFilterModel(key, true)` requires `enableFilterHandlers = true",289:({rowModelType:z})=>`Row Model '${z}' is not supported with Batch Editing`,290:({rowIndex:z,rowPinned:J})=>`Row with index '${z}' and pinned state '${J}' not found`,291:()=>"License Key being set multiple times with different values. This can result in an incorrect license key being used,",292:({colId:z})=>`The Multi Filter for column '${z}' has buttons configured against the child filters. When 'enableFilterHandlers=true', buttons must instead be provided against the parent Multi Filter params. The child filter buttons will be ignored.`,293:()=>"The grid was initialised detached from the DOM and was then inserted into a Shadow Root. Theme styles are probably broken. Pass the themeStyleContainer grid option to let the grid know where in the document to insert theme CSS.",294:()=>"When using the `agRichSelectCellEditor` setting `filterListAsync = true` requires `allowTyping = true` and the `values()` callback must return a Promise of filtered values.",295:({blockedService:z})=>`colDef.allowFormula is not supported with ${z}. Formulas has been turned off.`,296:()=>"Since v35, `api.hideOverlay()` does not hide the overlay when `activeOverlay` is set. Set `activeOverlay=null` instead.",297:()=>'`api.hideOverlay()` does not hide the no matching rows overlay as it is only controlled by grid state. Set `suppressOverlays=["noMatchingRows"] to not show it.',298:()=>"Columns Tool Panel 'buttons' requires 'apply' to enable Deferred Updates.",301:({key:z})=>`Toolbar item '${z}' is missing the 'toolbarItem' property and will not be rendered.`,302:({itemName:z,moduleName:J,gridScoped:Q,gridId:Z,rowModelType:$})=>dQ({reasonOrId:`Toolbar item '${z}'`,moduleName:J,gridId:Z,gridScoped:Q,rowModelType:$,additionalText:"The item will not be rendered."}),303:({key:z})=>`Multiple toolbar items share the explicit key '${z}'. Only the first item is rendered.`};function RL(z,J){let Q=DL[z];if(!Q)return[`Missing error text for error id ${z}!`];let Z=Q(J),X=`
67
+ See ${N9(z,J)}`;return Array.isArray(Z)?Z.concat(X):[Z,X]}var AL={1:"Charting Aggregation",2:"pivotResultFields",3:"setTooltip"},jL=class{constructor(z="javascript"){this.frameworkName=z,this.renderingEngine="vanilla",this.batchFrameworkComps=!1,this.usesAgGridProvider=void 0,this.wrapIncoming=(J)=>J(),this.wrapOutgoing=(J)=>J(),this.baseDocLink=`${V9}/${this.frameworkName}-data-grid`,xH(this.baseDocLink)}frameworkComponent(z){return null}isFrameworkComponent(z){return!1}getDocLink(z){return this.baseDocLink+(z?"/"+z:"")}},w8=new WeakMap,y8=new WeakMap;function NJ(z,J,Q){if(!J)return r(11),{};let Z=Q,$;if(!Z?.setThemeOnGridDiv){let Y=z0({tag:"div"});Y.style.height="100%",z.appendChild(Y),z=Y,$=()=>z.remove()}return new OL().create(z,J,(Y)=>{let U=new vq(z);Y.createBean(U)},void 0,Q,$)}var VL=1,OL=class{create(z,J,Q,Z,$,X){let Y=hZ.applyGlobalGridOptions(J),U=Y.gridId??String(VL++),_=this.getRegisteredModules($,U,Y.rowModelType),H=this.createBeansList(Y.rowModelType,_,U,$?.frameworkOverrides?.usesAgGridProvider),G=this.createProvidedBeans(z,Y,$);if(!H)return;let B=new WW({providedBeanInstances:G,beanClasses:H,id:U,beanInitComparator:EW,beanDestroyComparator:KW,derivedBeans:[qW],destroyCallback:()=>{y8.delete(E),w8.delete(z),CH(U),X?.()}});this.registerModuleFeatures(B,_),Q(B),B.getBean("syncSvc").start(),Z?.(B);let E=B.getBean("gridApi");return w8.set(z,E),y8.set(E,z),E}getRegisteredModules(z,J,Q){return f2(WL,void 0,!0),z?.modules?.forEach((Z)=>f2(Z,J)),vH(J,x8(Q))}registerModuleFeatures(z,J){let Q=z.getBean("registry"),Z=z.getBean("apiFunctionSvc");for(let $ of J){Q.registerModule($);let X=$.apiFunctions;if(X){let Y=Object.keys(X);for(let U of Y)Z?.addFunction(U,X[U])}}}createProvidedBeans(z,J,Q){let Z=Q?Q.frameworkOverrides:null;if(n(Z))Z=new jL;let $={gridOptions:J,eGridDiv:z,eRootDiv:z,globalListener:Q?Q.globalListener:null,globalSyncListener:Q?Q.globalSyncListener:null,frameworkOverrides:Z,withinStudio:Q?.withinStudio};if(Q?.providedBeanInstances)Object.assign($,Q.providedBeanInstances);return $}createBeansList(z,J,Q,Z){let $={clientSide:"ClientSideRowModel",infinite:"InfiniteRowModel",serverSide:"ServerSideRowModel",viewport:"ViewportRowModel"},X=x8(z),Y=$[X];if(!Y){L2(201,{rowModelType:X},`Unknown rowModelType ${X}.`);return}if(!wH()){L2(272,void 0,CX(Z));return}if(!z){let _=Object.entries($).filter(([H,G])=>aQ(G,Q,H));if(_.length==1){let[H,G]=_[0];if(H!==X){let W={moduleName:G,rowModelType:H};L2(275,W,vX(W));return}}}if(!aQ(Y,Q,X)){let _=mZ(),H=`rowModelType = '${X}'`,G=_?`Unable to use ${H} as that requires the ag-grid-enterprise script to be included.
68
+ `:`Missing module ${Y}Module for rowModelType ${X}.`;L2(200,{reasonOrId:H,moduleName:Y,gridScoped:uZ(),gridId:Q,rowModelType:X,isUmd:_},G);return}let U=new Set;for(let _ of J)for(let H of _.beans??[])U.add(H);return Array.from(U)}};function x8(z){return z??"clientSide"}function PL(z,J,Q="auto"){z.frameworkOverrides.wrapIncoming(()=>z.ctrlsSvc.getScrollFeature().ensureColumnVisible(J,Q),"ensureVisible")}function TL(z,J,Q){z.frameworkOverrides.wrapIncoming(()=>z.ctrlsSvc.getScrollFeature().ensureIndexVisible(J,Q),"ensureVisible")}var SL=class extends j{constructor(z){super();this.rootNode=z,this.nextId=0,this.allNodesMap={},b8(z)}getRowNode(z){return this.allNodesMap[z]}setNewRowData(z){this.dispatchRowDataUpdateStarted(z),this.destroyAllNodes();let J=b8(this.rootNode),Q=Array(z.length);J._leafs=Q;let Z=0,$=this.beans.groupStage?.getNestedDataGetter(),X=$?new Set:null,Y=(U,_)=>{let H=U.level+1;for(let G=0,W=_.length;G<W;++G){let q=_[G];if(!q)continue;let B=this.createRowNode(q,H,Z);if(Q[Z++]=B,X&&!X.has(q)){X.add(q),B.treeParent=U;let E=$(q);if(E)Y(B,E)}}};Y(J,z),Q.length=Z}destroyAllNodes(){let{selectionSvc:z,pinnedRowModel:J,groupStage:Q}=this.beans;if(z?.reset("rowDataChanged"),J?.isManual())J.reset();Q?.clearNonLeafs();let Z=this.rootNode._leafs;if(Z)for(let $=0,X=Z.length;$<X;++$)Z[$]._destroy(null);this.allNodesMap=Object.create(null),this.nextId=0}setImmutableRowData(z,J){let{rootNode:Q,gos:Z}=this;this.dispatchRowDataUpdateStarted(J);let $=zZ(Z),X=z.changedRowNodes,{adds:Y,updates:U}=X,_=new Set,H=[],G=this.beans.groupStage?.getNestedDataGetter(),W=Z.get("suppressMaintainUnsortedOrder")?void 0:!1,q=-1,B=!1,E=(L,M)=>{if(!W&&W!==void 0){let D=L.sourceRowIndex;W=D<=q,q=D}if(L.data!==M){if(L.updateData(M),!Y.has(L))U.add(L);if(!L.selectable&&L.isSelected())H.push(L)}},K=(L,M,D)=>{for(let A=0,O=M.length;A<O;++A){let T=M[A];if(!T)continue;let S=this.getRowNode($({data:T,level:D}));if(S)E(S,T),B||(B=!!G&&S.treeParent!==L);else S=this.createRowNode(T,D),Y.add(S);if(!G||_.has(S)){_.add(S);continue}_.add(S),S.treeParent=L;let k=G(T);if(k)K(S,k,D+1)}};K(Q,J,0);let F=this.deleteUnusedNodes(_,X,H,!!z.animate)||W||Y.size>0;if(F){let L=Q._leafs??(Q._leafs=[]);if(W===void 0)vL(L,_,X);else if(CL(L,_))X.reordered=!0}if(F||B||U.size)z.rowDataUpdated=!0,this.deselect(H)}deleteUnusedNodes(z,{removals:J},Q,Z){let $=this.rootNode._leafs;for(let X=0,Y=$.length;X<Y;X++){let U=$[X];if(!z.has(U)){if(this.destroyNode(U,Z)){if(J.push(U),U.isSelected())Q.push(U)}}}return J.length>0}updateRowData(z,J,Q){if(this.dispatchRowDataUpdateStarted(z.add),this.beans.groupStage?.getNestedDataGetter())return V(268),{remove:[],update:[],add:[]};let Z=[],$=zZ(this.gos),X=this.executeRemove($,z,J,Z,Q),Y=this.executeUpdate($,z,J,Z),U=this.executeAdd(z,J);return this.deselect(Z),{remove:X,update:Y,add:U}}executeRemove(z,{remove:J},{adds:Q,updates:Z,removals:$},X,Y){let U=this.rootNode._leafs,_=U?.length,H=J?.length;if(!H||!_)return[];let G=0,W=_,q=0,B=Array(H);for(let E=0;E<H;++E){let K=this.lookupNode(z,J[E]);if(!K)continue;let F=K.sourceRowIndex;if(F<W)W=F;if(F>q)q=F;if(B[G++]=K,!this.destroyNode(K,Y))continue;if(K.isSelected())X.push(K);if(!Q.delete(K))Z.delete(K),$.push(K)}if(B.length=G,G)kL(U,W,q);return B}executeUpdate(z,{update:J},{adds:Q,updates:Z},$){let X=J?.length;if(!X)return[];let Y=Array(X),U=0;for(let _=0;_<X;_++){let H=J[_],G=this.lookupNode(z,H);if(G){if(G.updateData(H),!G.selectable&&G.isSelected())$.push(G);if(Y[U++]=G,!Q.has(G))Z.add(G)}}return Y.length=U,Y}executeAdd(z,J){var Q;let Z=(Q=this.rootNode)._leafs??(Q._leafs=[]),$=Z.length,X=z.add,Y=X?.length;if(!Y)return[];let U=$+Y,_=this.sanitizeAddIndex(Z,z.addIndex);if(_<$){for(let W=$-1,q=U-1;W>=_;--W){let B=Z[W];B.sourceRowIndex=q,Z[q--]=B}J.reordered=!0}Z.length=U;let H=Array(Y),G=J.adds;for(let W=0;W<Y;W++){let q=this.createRowNode(X[W],0,_);G.add(q),Z[_]=q,H[W]=q,_++}return H}dispatchRowDataUpdateStarted(z){this.eventSvc.dispatchEvent({type:"rowDataUpdateStarted",firstRowData:z?.length?z[0]:null})}deselect(z){let Q=this.beans.selectionSvc;if(z.length)Q?.setNodesSelected({newValue:!1,nodes:z,suppressFinishActions:!0,source:"rowDataChanged"});if(Q?.updateGroupsFromChildrenSelections?.("rowDataChanged"),z.length)this.eventSvc.dispatchEvent({type:"selectionChanged",source:"rowDataChanged",selectedNodes:Q?.getSelectedNodes()??null,serverSideState:null})}createRowNode(z,J,Q){let Z=new Cz(this.beans);if(Z.parent=this.rootNode,Z.level=J,Z.group=!1,Q!=null)Z.sourceRowIndex=Q;Z.setDataAndId(z,String(this.nextId++));let $=Z.id,X=this.allNodesMap;if(X[$])V(2,{nodeId:$});return X[$]=Z,Z}destroyNode(z,J){if(!z._destroy(J))return!1;let Q=z.id,Z=this.allNodesMap;if(Z[Q]===z)delete Z[Q];return!0}lookupNode(z,J){if(!z)return fL(this.rootNode._leafs,J);let Q=z({data:J,level:0}),Z=this.allNodesMap[Q];if(!Z)return r(4,{id:Q}),null;return Z}sanitizeAddIndex(z,J){let Q=z.length;if(typeof J!=="number")return Q;if(J<0||J>=Q||Number.isNaN(J))return Q;J=Math.ceil(J);let Z=this.gos;if(J>0&&Z.get("treeData")&&Z.get("getDataPath"))J=IL(z,J);return J}},IL=(z,J)=>{for(let Q=0,Z=z.length;Q<Z;Q++)if(z[Q]?.rowIndex==J-1)return Q+1;return J},b8=(z)=>{if(z.group=!0,z.level=-1,z._expanded=!0,z.id=sZ,z._leafs?.length!==0)z._leafs=[];let J=[],Q=[],Z=[],$=[];z.childrenAfterGroup=J,z.childrenAfterSort=Q,z.childrenAfterAggFilter=Z,z.childrenAfterFilter=$;let X=z.sibling;if(X)X.childrenAfterGroup=J,X.childrenAfterSort=Q,X.childrenAfterAggFilter=Z,X.childrenAfterFilter=$,X.childrenMapped=z.childrenMapped;return z.updateHasChildren(),z},fL=(z,J)=>{if(z)for(let Q=0,Z=z.length;Q<Z;Q++){let $=z[Q];if($.data===J)return $}return r(5,{data:J}),null},kL=(z,J,Q)=>{J=Math.max(0,J);for(let Z=J,$=z.length;Z<$;++Z){let X=z[Z];if(Z<=Q&&X.destroyed)continue;X.sourceRowIndex=J,z[J++]=X}z.length=J},CL=(z,J)=>{let Q=J.size;z.length=Q;let Z=0,$=!1,X=!1;for(let Y of J){let U=Y.sourceRowIndex;if(U===Z)X||(X=$);else{if(U>=0)X=!0;else $=!0;Y.sourceRowIndex=Z,z[Z]=Y}++Z}return X},vL=(z,J,{adds:Q})=>{let Z=z.length,$=J.size;if($>Z)z.length=$;let X=0;for(let Y=0;Y<Z;++Y){let U=z[Y];if(!U.destroyed){if(X!==Y)U.sourceRowIndex=X,z[X]=U;++X}}for(let Y of Q)if(Y.sourceRowIndex<0)Y.sourceRowIndex=X,z[X++]=Y;z.length=X},NL=class extends j{constructor(){super(...arguments);this.beanName="rowModel",this.rootNode=null,this.rowCountReady=!1,this.hierarchical=!1,this.nodeManager=void 0,this.rowsToDisplay=[],this.formulaRows=[],this.stages=null,this.asyncTransactions=null,this.asyncTransactionsTimer=0,this.started=!1,this.refreshingData=!1,this.rowDataUpdatedPending=!1,this.refreshingModel=!1,this.pendingNewData=!1,this.noKeepRenderedRows=!1,this.noKeepUndoRedoStack=!1,this.noAnimate=!1,this.rowNodesCountReady=!1,this.stagesRefreshProps=new Map,this.onRowHeightChanged_debounced=i0(this,this.onRowHeightChanged.bind(this),100)}postConstruct(){let z=this.beans,J=new Cz(z);this.rootNode=J,this.nodeManager=this.createBean(new SL(J));let Q=()=>{this.beans.groupStage?.invalidateGroupCols(),this.refreshModel({step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame")})};this.addManagedEventListeners({newColumnsLoaded:Q,columnRowGroupChanged:Q,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:z,stagesRefreshProps:J}=this,Q=[z.groupStage,z.filterStage,z.groupFilterStage,z.pivotStage,z.aggStage,z.sortStage,z.groupSortStage,z.filterAggStage,z.flattenStage].filter((Z)=>!!Z);this.stages=Q;for(let Z=Q.length-1;Z>=0;--Z){let $=Q[Z].refreshProps;if($)for(let X of $)J.set(X,Z)}this.addManagedPropertyListeners([...J.keys(),"rowData"],(Z)=>{let $=Z.changeSet?.properties;if($)this.onPropChange($)}),this.addManagedPropertyListener("rowHeight",()=>this.resetRowHeights())}start(){if(this.started=!0,this.rowNodesCountReady)this.refreshModel({step:"group",rowDataUpdated:!0,newData:!0});else this.setInitialData()}setInitialData(){if(this.gos.get("rowData"))this.onPropChange(["rowData"])}ensureRowHeightsValid(z,J,Q,Z){let $,X=!1;do{$=!1;let Y=this.getRowIndexAtPixel(z),U=this.getRowIndexAtPixel(J),_=Math.max(Y,Q),H=Math.min(U,Z);for(let G=_;G<=H;G++){let W=this.getRow(G);if(W.rowHeightEstimated){let q=k2(this.beans,W);W.setRowHeight(q.height),$=!0,X=!0}}if($)this.setRowTopAndRowIndex()}while($);return X}onPropChange(z){let{nodeManager:J,gos:Q,beans:Z}=this,$=Z.groupStage;if(!J)return;let X=new Set(z),Y=$?.onPropChange(X),U;if(X.has("rowData"))U=Q.get("rowData");else if(Y)U=$?.extractData();if(U&&!Array.isArray(U))U=null,V(1);let _={step:"nothing",changedProps:X};if(U){let G=!Y&&!this.isEmpty()&&U.length>0&&Q.exists("getRowId")&&!Q.get("resetRowDataOnUpdate");if(this.refreshingData=!0,G)_.keepRenderedRows=!0,_.animate=!Q.get("suppressAnimationFrame"),_.changedRowNodes=new x1,J.setImmutableRowData(_,U);else _.rowDataUpdated=!0,_.newData=!0,J.setNewRowData(U),this.rowNodesCountReady=!0}let H=_.rowDataUpdated?"group":this.getRefreshedStage(z);if(H)_.step=H,this.refreshModel(_)}getRefreshedStage(z){let{stages:J,stagesRefreshProps:Q}=this;if(!J)return null;let Z=J.length,$=Z;for(let X=0,Y=z.length;X<Y&&$;++X)$=Math.min($,Q.get(z[X])??$);return $<Z?J[$].step:null}setRowTopAndRowIndex(z){let{beans:J,rowsToDisplay:Q}=this,Z=J.environment.getDefaultRowHeight(),$=0,X=T0(this.gos,"normal");for(let Y=0,U=Q.length;Y<U;++Y){let _=Q[Y],H=_.id;if(H!=null)z?.add(H);if(_.rowHeight==null){let G=k2(J,_,X,Z);_.setRowHeight(G.height,G.estimated)}_.setRowTop($),_.setRowIndex(Y),$+=_.rowHeight}if(this.beans.formula?.active){let Y=this.formulaRows;for(let U=0,_=Y.length;U<_;++U){let H=Y[U];H.formulaRowIndex=U}}}clearRowTopAndRowIndex(z,J){let Q=(X)=>{if(X?.id!=null&&!J.has(X.id))X.clearRowTopAndRowIndex()},Z=(X)=>{Q(X),Q(X.detailNode),Q(X.sibling);let Y=X.childrenAfterGroup;if(!X.hasChildren()||!Y)return;if(z&&X.level!==-1&&!X.expanded)return;for(let U=0,_=Y.length;U<_;++U)Z(Y[U])},$=this.rootNode;if($)Z($)}isLastRowIndexKnown(){return!0}getRowCount(){return this.rowsToDisplay.length}getTopLevelRowCount(){let{rootNode:z,rowsToDisplay:J}=this;if(!z||!J.length)return 0;if(J[0]===z)return 1;let Z=z.sibling?.displayed?1:0;return(z.childrenAfterSort?.length??0)+Z}getTopLevelRowDisplayedIndex(z){let{beans:J,rootNode:Q,rowsToDisplay:Z}=this;if(!Q||!Z.length||Z[0]===Q)return z;let X=Q.childrenAfterSort,Y=(_)=>{let H=X[_];if(this.gos.get("groupHideOpenParents"))while(H.expanded&&H.childrenAfterSort&&H.childrenAfterSort.length>0)H=H.childrenAfterSort[0];return H.rowIndex},U=J.footerSvc;if(U)return U?.getTopDisplayIndex(Z,z,X,Y);return Y(z)}getTopLevelIndexFromDisplayedIndex(z){let{rootNode:J,rowsToDisplay:Q}=this;if(!J||!Q.length||Q[0]===J)return z;let $=this.getRow(z);if($.footer)$=$.sibling;let X=$.parent;while(X&&X!==J)$=X,X=$.parent;let Y=J.childrenAfterSort?.indexOf($)??-1;return Y>=0?Y:z}getRowBounds(z){let J=this.rowsToDisplay[z];return J?{rowTop:J.rowTop,rowHeight:J.rowHeight}:null}onRowGroupOpened(){this.refreshModel({step:"map",keepRenderedRows:!0,animate:w1(this.gos)})}onFilterChanged({afterDataChange:z,columns:J}){if(!z){let Z=J.length===0||J.some(($)=>$.isPrimary())?"filter":"filter_aggregates";this.refreshModel({step:Z,keepRenderedRows:!0,animate:w1(this.gos)})}}onSortChanged(){this.refreshModel({step:"sort",keepRenderedRows:!0,animate:w1(this.gos)})}getType(){return"clientSide"}onValueChanged(){this.refreshModel({step:this.beans.colModel.isPivotActive()?"pivot":"aggregate"})}isSuppressModelUpdateAfterUpdateTransaction(z){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction"))return!1;let{changedRowNodes:J,newData:Q,rowDataUpdated:Z}=z;if(!J||Q||!Z)return!1;if(J.removals.length||J.adds.size)return!1;return!0}reMapRows(){if(this.refreshingModel||this.refreshingData){this.noKeepRenderedRows=!0,this.noKeepUndoRedoStack=!0,this.noAnimate=!0;return}this.refreshModel({step:"map",keepRenderedRows:!1,keepUndoRedoStack:!1,animate:!1})}refreshModel(z){let{nodeManager:J,eventSvc:Q,started:Z}=this;if(!J)return;let $=!!z.rowDataUpdated;if(Z&&$)Q.dispatchEvent({type:"rowDataUpdated"});if(this.deferRefresh(z)){this.setPendingRefreshFlags(z),this.rowDataUpdatedPending||(this.rowDataUpdatedPending=$);return}if(this.rowDataUpdatedPending)this.rowDataUpdatedPending=!1,z.step="group";this.updateRefreshParams(z);let X=!1;this.refreshingModel=!0;try{this.executeRefresh(z,$),X=!0}finally{if(this.refreshingData=!1,this.refreshingModel=!1,!X)this.setPendingRefreshFlags(z)}this.clearPendingRefreshFlags(),this.beans.formula?.onRowsChanged(z.changedRowNodes,z.newData),Q.dispatchEvent({type:"modelUpdated",animate:z.animate,keepRenderedRows:z.keepRenderedRows,newData:z.newData,newPage:!1,keepUndoRedoStack:z.keepUndoRedoStack})}executeRefresh(z,J){let{beans:Q,rootNode:Z}=this;if(Q.masterDetailSvc?.refreshModel(z),J&&z.step!=="group")Q.colFilter?.refreshModel();let $=z.changedPath;if($?.addRow(Z),z.step==="group")this.doGrouping(Z,z),$??($=z.changedPath);switch($??($=Q.changedPathFactory?.ensureRowsPath(z,Z)),z.step){case"group":case"filter":this.doFilter($);case"pivot":if(this.doPivot($,z.changedProps))$=void 0,z.changedPath=void 0;case"aggregate":this.doAggregate($);case"filter_aggregates":this.doFilterAggregates($);case"sort":this.doSort($,z.changedRowNodes);case"map":this.doRowsToDisplay()}let X=new Set;this.setRowTopAndRowIndex(X),this.clearRowTopAndRowIndex($,X),this.updateRefreshParams(z)}deferRefresh(z){if(this.refreshingModel)return!0;if(this.beans.colModel.changeEventsDispatching)return!0;if(this.isSuppressModelUpdateAfterUpdateTransaction(z)){if(this.started)this.refreshingData=!1;return!0}if(!this.started)return!0;return!1}setPendingRefreshFlags(z){this.pendingNewData||(this.pendingNewData=!!z.newData),this.noKeepRenderedRows||(this.noKeepRenderedRows=!z.keepRenderedRows),this.noKeepUndoRedoStack||(this.noKeepUndoRedoStack=!z.keepUndoRedoStack),this.noAnimate||(this.noAnimate=!z.animate)}clearPendingRefreshFlags(){this.pendingNewData=!1,this.noKeepRenderedRows=!1,this.noKeepUndoRedoStack=!1,this.noAnimate=!1}updateRefreshParams(z){z.newData=this.pendingNewData||!!z.newData,z.keepRenderedRows=!this.noKeepRenderedRows&&!!z.keepRenderedRows,z.keepUndoRedoStack=!this.noKeepUndoRedoStack&&!!z.keepUndoRedoStack,z.animate=!this.noAnimate&&!!z.animate}isEmpty(){return!this.rootNode?._leafs?.length||!this.beans.colModel?.ready}isRowsToRender(){return this.rowsToDisplay.length>0}getOverlayType(){let{beans:z,gos:J}=this;if(this.rootNode?._leafs?.length){if(z.filterManager?.isAnyFilterPresent()&&this.getRowCount()===0)return"noMatchingRows"}else if(this.rowCountReady||(J.get("rowData")?.length??0)==0)return"noRows";return null}getNodesInRangeForSelection(z,J){let Q=!1,Z=!1,$=[],X=v2(this.gos);return this.forEachNodeAfterFilterAndSort((Y)=>{if(Z)return;if(Q){if(Y===J||Y===z){if(Z=!0,X&&Y.group){NX($,Y);return}}}if(!Q){if(Y!==J&&Y!==z)return;if(Q=!0,J===z)Z=!0}if(!Y.group||!X)$.push(Y)}),$}getTopLevelNodes(){return this.rootNode?.childrenAfterGroup??null}getRow(z){return this.rowsToDisplay[z]}getFormulaRow(z){return this.formulaRows[z]}isRowPresent(z){return this.rowsToDisplay.indexOf(z)>=0}getRowIndexAtPixel(z){let J=this.rowsToDisplay,Q=J.length;if(this.isEmpty()||Q===0)return-1;let Z=0,$=Q-1;if(z<=0)return 0;if(J[$].rowTop<=z)return $;let Y=-1,U=-1;while(!0){let _=Math.floor((Z+$)/2),H=J[_];if(this.isRowInPixel(H,z))return _;if(H.rowTop<z)Z=_+1;else if(H.rowTop>z)$=_-1;if(Y===Z&&U===$)return _;Y=Z,U=$}}isRowInPixel(z,J){let Q=z.rowTop,Z=Q+z.rowHeight;return Q<=J&&Z>J}forEachLeafNode(z){let J=this.rootNode?._leafs;if(J)for(let Q=0,Z=J.length;Q<Z;++Q)z(J[Q],Q)}forEachNode(z,J=!1){this.depthFirstSearchRowNodes(z,J)}forEachDisplayedNode(z){let J=this.rowsToDisplay;for(let Q=0,Z=J.length;Q<Z;++Q)z(J[Q],Q)}forEachNodeAfterFilter(z,J=!1){this.depthFirstSearchRowNodes(z,J,(Q)=>Q.childrenAfterAggFilter)}forEachNodeAfterFilterAndSort(z,J=!1){this.depthFirstSearchRowNodes(z,J,(Q)=>Q.childrenAfterSort)}forEachPivotNode(z,J,Q){let{colModel:Z,rowGroupColsSvc:$}=this.beans;if(!Z.pivotMode)return;if(!$?.columns.length){z(this.rootNode,0);return}let X=Q?"childrenAfterSort":"childrenAfterGroup";this.depthFirstSearchRowNodes(z,J,(Y)=>!Y.leafGroup?Y[X]:null)}depthFirstSearchRowNodes(z,J=!1,Q=(X)=>X.childrenAfterGroup,Z=this.rootNode,$=0){let X=$;if(!Z)return X;let Y=Z===this.rootNode;if(!Y)z(Z,X++);if(Z.hasChildren()&&!Z.footer){let U=Y||this.hierarchical?Q(Z):null;if(U){let _=this.beans.footerSvc;X=_?.addTotalRows(X,Z,z,J,Y,"top")??X;for(let H of U)X=this.depthFirstSearchRowNodes(z,J,Q,H,X);return _?.addTotalRows(X,Z,z,J,Y,"bottom")??X}}return X}doAggregate(z){if(this.rootNode)this.beans.aggStage?.execute(z)}doFilterAggregates(z){if(this.hierarchical){let Z=this.beans.filterAggStage;if(Z){Z.execute(z);return}}let J=this.rootNode;J.childrenAfterAggFilter=J.childrenAfterFilter;let Q=J.sibling;if(Q)Q.childrenAfterAggFilter=J.childrenAfterFilter}doSort(z,J){let Q=this.beans;(this.hierarchical&&Q.groupSortStage||Q.sortStage).execute(z,J)}doGrouping(z,J){let Z=this.beans.groupStage?.execute(J);if(Z===void 0){let $=z._leafs;z.childrenAfterGroup=$,z.updateHasChildren();let X=z.sibling;if(X)X.childrenAfterGroup=$}if(Z||J.rowDataUpdated)this.beans.colFilter?.refreshModel();if(!this.rowCountReady&&this.rowNodesCountReady)this.rowCountReady=!0,this.eventSvc.dispatchEventOnce({type:"rowCountReady"})}doFilter(z){let J=this.beans;(this.hierarchical&&J.groupFilterStage||J.filterStage).execute(z);let Q=this.rootNode,Z=Q.sibling;if(Z)Z.childrenAfterFilter=Q.childrenAfterFilter}doPivot(z,J){return this.beans.pivotStage?.execute(z,J)??!1}getRowNode(z){if(typeof z!=="string")z=String(z);let J=this.nodeManager?.getRowNode(z);if(typeof J==="object")return J;let Q=this.beans.groupStage?.getNonLeaf(z);if(Q)return Q;return this.getSpecialRowNode(z)}getSpecialRowNode(z){if(z===sZ)return this.rootNode??void 0;if(z===GG){let J=this.rootNode?.sibling;return J?.footer?J:void 0}if(z.startsWith(ZZ)){let J=z.slice(ZZ.length),Q=this.getRowNode(J);return Q?.sibling?.footer?Q.sibling:void 0}if(z.startsWith(d7)){let J=z.slice(d7.length),Q=this.nodeManager?.getRowNode(J);if(typeof Q==="object"&&Q.detailNode?.id===z)return Q.detailNode}}batchUpdateRowData(z,J){if(!this.asyncTransactionsTimer){this.asyncTransactions=[];let Q=this.gos.get("asyncTransactionWaitMillis");this.asyncTransactionsTimer=setTimeout(()=>this.executeBatchUpdateRowData(),Q)}this.asyncTransactions.push({rowDataTransaction:z,callback:J})}flushAsyncTransactions(){let z=this.asyncTransactionsTimer;if(z)clearTimeout(z),this.executeBatchUpdateRowData()}executeBatchUpdateRowData(){let{nodeManager:z,beans:J,eventSvc:Q,asyncTransactions:Z}=this;if(!z)return;J.valueCache?.onDataChanged();let $=[],X=[],Y=new x1,U=!this.gos.get("suppressAnimationFrame");for(let{rowDataTransaction:_,callback:H}of Z??[]){this.rowNodesCountReady=!0,this.refreshingData=!0;let G=z.updateRowData(_,Y,U);if($.push(G),H)X.push(H.bind(null,G))}if(this.commitTransactions(Y,U),X.length>0)setTimeout(()=>{for(let _=0,H=X.length;_<H;_++)X[_]()},0);if($.length>0)Q.dispatchEvent({type:"asyncTransactionsFlushed",results:$});this.asyncTransactionsTimer=0,this.asyncTransactions=null}updateRowData(z){let J=this.nodeManager;if(!J)return null;this.beans.valueCache?.onDataChanged(),this.rowNodesCountReady=!0;let Q=new x1,Z=!this.gos.get("suppressAnimationFrame");this.refreshingData=!0;let $=J.updateRowData(z,Q,Z);return this.commitTransactions(Q,Z),$}commitTransactions(z,J){this.refreshModel({step:"group",rowDataUpdated:!0,keepRenderedRows:!0,animate:J,changedRowNodes:z})}doRowsToDisplay(){let{rootNode:z,beans:J}=this;if(J.formula?.active){let $=z?.childrenAfterSort??[];this.formulaRows=$,this.rowsToDisplay=$.filter((X)=>!X.softFiltered);for(let X of this.rowsToDisplay)X.setUiLevel(0);return}let Q=J.flattenStage;if(Q){this.rowsToDisplay=Q.execute();return}let Z=this.rootNode.childrenAfterSort??[];for(let $ of Z)$.setUiLevel(0);this.rowsToDisplay=Z}onRowHeightChanged(){this.refreshModel({step:"map",keepRenderedRows:!0,keepUndoRedoStack:!0})}resetRowHeights(){let z=this.rootNode;if(!z)return;let J=this.resetRowHeightsForAllRowNodes();z.setRowHeight(z.rowHeight,!0);let Q=z.sibling;if(Q?.setRowHeight(Q.rowHeight,!0),J)this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let z=!1;return this.forEachNode((J)=>{J.setRowHeight(J.rowHeight,!0);let Q=J.detailNode;Q?.setRowHeight(Q.rowHeight,!0);let Z=J.sibling;Z?.setRowHeight(Z.rowHeight,!0),z=!0}),z}onGridStylesChanges(z){if(z.rowHeightChanged&&!this.beans.rowAutoHeight?.active)this.resetRowHeights()}onGridReady(){if(!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()}},NX=(z,J)=>{let Q=J.childrenAfterGroup;if(Q)for(let Z=0,$=Q.length;Z<$;++Z){let X=Q[Z];if(X.data)z.push(X);if(X.group)NX(z,X)}};var wL=class extends j{constructor(){super(...arguments);this.beanName="filterStage",this.step="filter",this.refreshProps=null}wireBeans(z){this.filterManager=z.filterManager}execute(){let z=this.beans,J=z.rowModel.rootNode,Q=J.childrenAfterGroup,Z=Q.length,$=this.filterManager,X=!!$?.isChildFilterPresent();if(z.formula?.active)if(J.childrenAfterFilter=Q,X)for(let Y=0;Y<Z;++Y){let U=Q[Y];U.softFiltered=!$.doesRowPassFilter(U)}else for(let Y=0;Y<Z;++Y)Q[Y].softFiltered=!1;else if(X)J.childrenAfterFilter=yL(Q,Z,J.childrenAfterFilter??Q,$);else J.childrenAfterFilter=Q}},yL=(z,J,Q,Z)=>{let $=Q.length,X=0;for(let Y=0;Y<J;++Y){let U=z[Y];if(Z.doesRowPassFilter(U)){if(X>=$||Q[X]!==U)return g8(z,J,Y,X,Q,Z);++X}else if(X<$)return g8(z,J,Y,X,Q,Z)}return X===$?Q:z},g8=(z,J,Q,Z,$,X)=>{let Y=Z>0?$.slice(0,Z):[];while(Q<J){let U=z[Q++];if(X.doesRowPassFilter(U))Y.push(U)}return Y},xL=4,bL=(z,J,Q,Z,$)=>{let{childrenAfterSort:X,childrenAfterAggFilter:Y}=J;if(!Y)return X&&X.length>0?X:[];let U=Y.length;if(U<=1){if(X?.length===U&&(U===0||X[0]===Y[0]))return X;return Y.slice()}if(!X||U<=xL)return z.doFullSortInPlace(Y.slice(),$);let _=new Map,{updates:H,adds:G}=Q,W=[];for(let B=0;B<U;++B){let E=Y[B];if(H.has(E)||G.has(E)||Z?.hasRow(E))_.set(E,~B),W.push(E);else _.set(E,B)}let q=W.length;if(q===0)return U===X.length?X:hL(X,_,W);if(W.sort((B,E)=>z.compareRowNodes($,B,E)||~_.get(B)-~_.get(E)),q===U)return W;return gL(z,$,W,X,_,U)},gL=(z,J,Q,Z,$,X)=>{let Y=Array(X),U=0,_=Q[U],H,G=-1,W=0,q=0,B=Q.length,E=Z.length;while(!0){if(G<0){if(W>=E)break;if(H=Z[W++],G=$.get(H)??-1,G<0)continue}if((z.compareRowNodes(J,_,H)||~$.get(_)-G)<0){if(Y[q++]=_,++U>=B)break;_=Q[U]}else Y[q++]=H,G=-1}while(U<B)Y[q++]=Q[U++];if(G<0)return Y;Y[q++]=H;while(W<E){let K=Z[W++];if($.get(K)>=0)Y[q++]=K}return Y},hL=(z,J,Q)=>{let Z=0;Q.length=J.size;for(let $=0,X=z.length;$<X;++$){let Y=z[$];if(J.has(Y))Q[Z++]=Y}return Q.length=Z,Q},uL=(z)=>{let{childrenAfterSort:J,sibling:Q}=z;if(Q)Q.childrenAfterSort=J;if(!J)return;for(let Z=0,$=J.length-1;Z<=$;Z++){let X=J[Z],Y=Z===0,U=Z===$;if(X.firstChild!==Y)X.firstChild=Y,X.dispatchRowEvent("firstChildChanged");if(X.lastChild!==U)X.lastChild=U,X.dispatchRowEvent("lastChildChanged");if(X.childIndex!==Z)X.childIndex=Z,X.dispatchRowEvent("childIndexChanged")}},mL=class extends j{constructor(){super(...arguments);this.beanName="sortStage",this.step="sort",this.refreshProps=["postSortRows","accentedSort"]}execute(z,J){let{rowModel:Q,sortSvc:Z,rowNodeSorter:$}=this.beans,X=Q.rootNode,Y=Z.getSortOptions(),U=Y.length>0,_=this.gos.getCallback("postSortRows"),H=U&&!_&&this.gos.get("deltaSort")&&J,G=X.childrenAfterSort,W=X.childrenAfterAggFilter,q;if(U)if(H)q=bL($,X,H,z,Y);else q=$.doFullSortInPlace(W?.slice()??[],Y);else q=i_(G,W);X.childrenAfterSort=q,uL(X),_?.({nodes:q})}},wX={moduleName:"ClientSideRowModel",version:p,rowModels:["clientSide"],beans:[NL,wL,mL],dependsOn:[IX]};var cL=":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 pL(z,J){if(typeof J==="number")z.colAutosize?.sizeColumnsToFit(J,"api");else z.colAutosize?.sizeColumnsToFitGridBody(J)}function yX({colAutosize:z,visibleCols:J},Q,Z){if(Array.isArray(Q))z?.autoSizeCols({colKeys:Q,skipHeader:Z,source:"api"});else z?.autoSizeCols({...Q,colKeys:Q.colIds??J.allCols,source:"api"})}function iL(z,J){if(J&&typeof J==="object")yX(z,J);else z.colAutosize?.autoSizeAllColumns({source:"api",skipHeader:J})}var dL=class extends j{constructor(){super(...arguments);this.beanName="colAutosize",this.timesDelayed=0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}postConstruct(){let{gos:z}=this,J=z.get("autoSizeStrategy");if(J){let Q=!1,Z=J.type;if(Z==="fitGridWidth"||Z==="fitProvidedWidth")Q=!0;else if(Z==="fitCellContents"){this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered(J)});let $=z.get("rowData");Q=$!=null&&$.length>0&&o(z)}if(Q)this.beans.colDelayRenderSvc?.hideColumns(Z)}}autoSizeCols(z){let{eventSvc:J,visibleCols:Q,colModel:Z}=this.beans;K2(this.beans,!0),this.innerAutoSizeCols(z).then(($)=>{let X=(G)=>c1(J,Array.from(G),!0,"autosizeColumns");if(!z.scaleUpToFitGridWidth)return K2(this.beans,!1),X($);let Y=h8(this.beans),U=(G)=>Q.leftCols.some((W)=>m4(W,G)),_=(G)=>Q.rightCols.some((W)=>m4(W,G)),H=z.colKeys.filter((G)=>{return!Z.getCol(G)?.colDef.suppressAutoSize&&!w0(G)&&!U(G)&&!_(G)});this.sizeColumnsToFit(Y,z.source,!0,{defaultMaxWidth:z.defaultMaxWidth,defaultMinWidth:z.defaultMinWidth,columnLimits:z.columnLimits?.map((G)=>({...G,key:G.colId})),colKeys:H,onlyScaleUp:!0,animate:!1}),K2(this.beans,!1),X($)})}innerAutoSizeCols(z){return new Promise((J,Q)=>{if(this.shouldQueueResizeOperations)return this.pushResizeOperation(()=>this.innerAutoSizeCols(z).then(J,Q));let{colKeys:Z,skipHeader:$,skipHeaderGroups:X,stopAtGroup:Y,defaultMaxWidth:U,defaultMinWidth:_,columnLimits:H=[],source:G="api"}=z,{animationFrameSvc:W,renderStatus:q,colModel:B,autoWidthCalc:E,visibleCols:K}=this.beans;if(W?.flushAllFrames(),this.timesDelayed<5&&q&&(!q.areHeaderCellsRendered()||!q.areCellsRendered())){this.timesDelayed++,setTimeout(()=>{if(this.isAlive())this.innerAutoSizeCols(z).then(J,Q)});return}this.timesDelayed=0;let F=new Set,L=-1,M=Object.fromEntries(H.map(({colId:O,...T})=>[O,T])),D=$??this.gos.get("skipHeaderOnAutoSize"),A=X??D;while(L!==0){L=0;let O=[];for(let T of Z){if(!T||d2(T))continue;let S=B.getCol(T);if(!S||F.has(S)||S.colDef.suppressAutoSize)continue;let k=E.getPreferredWidthForColumn(S,D);if(k>0){let C=M[S.colId]??{};C.minWidth??(C.minWidth=_),C.maxWidth??(C.maxWidth=U);let w=nL(S,k,C);S.setActualWidth(w,G),F.add(S),L++}O.push(S)}if(O.length)K.refresh(G)}if(!A)this.autoSizeColumnGroupsByColumns(Z,G,Y);J(F)})}autoSizeColumn(z,J,Q){this.autoSizeCols({colKeys:[z],skipHeader:Q,skipHeaderGroups:!0,source:J})}autoSizeColumnGroupsByColumns(z,J,Q){let{colModel:Z,ctrlsSvc:$}=this.beans,X=new Set,Y=Z.getColsForKeys(z);for(let _ of Y){let H=_.parent;while(H&&H!=Q){if(!H.isPadding())X.add(H);H=H.parent}}let U;for(let _ of X){for(let H of $.getHeaderRowContainerCtrls())if(U=H.getHeaderCtrlForColumn(_),U)break;U?.resizeLeafColumnsToFit(J)}}autoSizeAllColumns(z){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.autoSizeAllColumns(z));return}this.autoSizeCols({colKeys:this.beans.visibleCols.allCols,...z})}addColumnAutosizeListeners(z,J){let Q=this.gos.get("skipHeaderOnAutoSize"),Z=()=>{this.autoSizeColumn(J,"uiColumnResized",Q)};z.addEventListener("dblclick",Z);let $=new p0(z);return $.addEventListener("doubleTap",Z),()=>{z.removeEventListener("dblclick",Z),$.destroy()}}addColumnGroupResize(z,J,Q){let Z=this.gos.get("skipHeaderOnAutoSize"),$=()=>{let X=[],Y=J.getDisplayedLeafColumns();for(let U of Y)if(!U.colDef.suppressAutoSize)X.push(U.colId);if(X.length>0)this.autoSizeCols({colKeys:X,skipHeader:Z,stopAtGroup:J,source:"uiColumnResized"});Q()};return z.addEventListener("dblclick",$),()=>z.removeEventListener("dblclick",$)}sizeColumnsToFitGridBody(z,J){if(!this.isAlive())return;let Q=h8(this.beans);if(Q>0&&this.beans.visibleCols.centerCols.length===0)Q=Math.max(Q-b6,0);if(Q>0){this.sizeColumnsToFit(Q,"sizeColumnsToFit",!1,z);return}if(J===void 0)window.setTimeout(()=>{this.sizeColumnsToFitGridBody(z,100)},0);else if(J===100)window.setTimeout(()=>{this.sizeColumnsToFitGridBody(z,500)},100);else if(J===500)window.setTimeout(()=>{this.sizeColumnsToFitGridBody(z,-1)},500);else V(29)}sizeColumnsToFit(z,J="sizeColumnsToFit",Q,Z){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.sizeColumnsToFit(z,J,Q,Z));return}let{beans:$}=this,X=Z?.animate??!0;if(X)K2($,!0);let Y={};for(let{key:L,...M}of Z?.columnLimits??[])Y[typeof L==="string"?L:L.getColId()]=M;let U=$.visibleCols.allCols;if(z<=0||!U.length)return;let _=a4(U);if(Z?.onlyScaleUp&&_>z)return;if(z===_){if(U.every((M)=>{if(M.colDef.suppressSizeToFit)return!0;let D=Y?.[M.getId()],A=D?.minWidth??Z?.defaultMinWidth,O=D?.maxWidth??Z?.defaultMaxWidth,T=M.getActualWidth();return(A==null||T>=A)&&(O==null||T<=O)}))return}let G=[],W=[];for(let L of U){let M=Z?.colKeys?.some((D)=>m4(L,D))??!0;if(L.colDef.suppressSizeToFit||!M)W.push(L);else G.push(L)}let q=G.slice(0),B=!1,E=(L)=>{X0(G,L),W.push(L)},K={};for(let L of G){if(Z?.onlyScaleUp)K[L.colId]=L.getActualWidth();L.resetActualWidth(J);let M=Y?.[L.getId()],D=M?.minWidth??Z?.defaultMinWidth??-1/0,A=M?.maxWidth??Z?.defaultMaxWidth??1/0,O=L.getActualWidth(),T=Math.max(Math.min(O,A),D);if(T!=O)L.setActualWidth(T,J,!0)}while(!B){B=!0;let L=z-a4(W);if(L<=0)for(let M of G){let D=Y?.[M.getId()]?.minWidth??Z?.defaultMinWidth??M.minWidth;M.setActualWidth(D,J,!0)}else{let M=L/a4(G),D=L;for(let A=G.length-1;A>=0;A--){let O=G[A],T=O.colId,S=K[T],k=Y?.[T],C=k?.minWidth??Z?.defaultMinWidth??S,w=k?.maxWidth??Z?.defaultMaxWidth,m=Math.max(C??-1/0,O.getMinWidth()),g=Math.min(w??1/0,O.getMaxWidth()),e=Math.round(O.getActualWidth()*M);if(e<m)e=m,E(O),B=!1;else if(e>g)e=g,E(O),B=!1;else if(A===0)e=D;O.setActualWidth(e,J,!0),D-=e}}}for(let L of q)L.fireColumnWidthChangedEvent(J);let F=$.visibleCols;if(F.setLeftValues(J),F.updateBodyWidths(),Q)return;if(c1(this.eventSvc,q,!0,J),X)K2($,!1)}applyAutosizeStrategy(){let{gos:z,colDelayRenderSvc:J}=this.beans,Q=z.get("autoSizeStrategy");if(Q?.type!=="fitGridWidth"&&Q?.type!=="fitProvidedWidth")return;setTimeout(()=>{if(!this.isAlive())return;let Z=Q.type;if(Z==="fitGridWidth"){let{columnLimits:$,defaultMinWidth:X,defaultMaxWidth:Y}=Q,U=$?.map(({colId:_,minWidth:H,maxWidth:G})=>({key:_,minWidth:H,maxWidth:G}));this.sizeColumnsToFitGridBody({defaultMinWidth:X,defaultMaxWidth:Y,columnLimits:U})}else if(Z==="fitProvidedWidth")this.sizeColumnsToFit(Q.width,"sizeColumnsToFit");J?.revealColumns(Z)})}onFirstDataRendered({colIds:z,...J}){setTimeout(()=>{if(!this.isAlive())return;let Q="autosizeColumns";if(z)this.autoSizeCols({...J,source:Q,colKeys:z});else this.autoSizeAllColumns({...J,source:Q});this.beans.colDelayRenderSvc?.revealColumns(J.type)})}processResizeOperations(){this.shouldQueueResizeOperations=!1;for(let z of this.resizeOperationQueue)z();this.resizeOperationQueue=[]}pushResizeOperation(z){this.resizeOperationQueue.push(z)}destroy(){this.resizeOperationQueue.length=0,super.destroy()}};function nL(z,J,Q={}){let Z=Q.minWidth??z.getMinWidth();if(J<Z)J=Z;let $=Q.maxWidth??z.getMaxWidth();if(J>$)J=$;return J}function h8({ctrlsSvc:z,scrollVisibleSvc:J}){let Q=z.getGridBodyCtrl(),$=Q.isVerticalScrollShowing()?J.getScrollbarWidth():0;return z1(Q.eGridBody)-$}var u8="ag-animate-autosize";function K2({ctrlsSvc:z,gos:J},Q){if(!J.get("animateColumnResizing")||J.get("enableRtl")||!z.isAlive())return;let Z=z.getGridBodyCtrl().eGridBody.classList;if(Q)Z.add(u8);else Z.remove(u8)}var xX={moduleName:"ColumnAutoSize",version:p,beans:[dL],apiFunctions:{sizeColumnsToFit:pL,autoSizeColumns:yX,autoSizeAllColumns:iL},dependsOn:[l$],css:[cL]};var rL=class extends j{constructor(){super(...arguments);this.beanName="gridSerializer"}wireBeans(z){this.visibleCols=z.visibleCols,this.colModel=z.colModel,this.rowModel=z.rowModel,this.pinnedRowModel=z.pinnedRowModel}serialize(z,J={}){let{allColumns:Q,columnKeys:Z,skipRowGroups:$,exportRowNumbers:X}=J,Y=this.getColumnsToExport({allColumns:Q,skipRowGroups:$,columnKeys:Z,exportRowNumbers:X});return[this.prepareSession(Y),this.prependContent(J),this.exportColumnGroups(J,Y),this.exportHeaders(J,Y),this.processPinnedTopRows(J,Y),this.processRows(J,Y),this.processPinnedBottomRows(J,Y),this.appendContent(J)].reduce((U,_)=>_(U),z).parse()}processRow(z,J,Q,Z){let $=J.shouldRowBeSkipped||(()=>!1),Y=J.rowPositions!=null||!!J.onlySelected,U=this.gos.get("groupHideOpenParents")&&!Y,_=this.colModel.pivotMode?Z.leafGroup:!Z.group,H=!!Z.footer,G=Z.allChildrenCount===1&&Z.childrenAfterGroup?.length===1&&dH(this.gos,Z);if(!_&&!H&&(J.skipRowGroups||G||U)||J.onlySelected&&!Z.isSelected()||J.skipPinnedTop&&Z.rowPinned==="top"||J.skipPinnedBottom&&Z.rowPinned==="bottom"||Z.stub)return;if(Z.level===-1&&!_&&!H)return;if($(v(this.gos,{node:Z})))return;let B=z.onNewBodyRow(Z);if(Q.forEach((E,K)=>{B.onColumn(E,K,Z)}),J.getCustomContentBelowRow){let E=J.getCustomContentBelowRow(v(this.gos,{node:Z}));if(E)z.addCustomContent(E)}}appendContent(z){return(J)=>{let Q=z.appendContent;if(Q)J.addCustomContent(Q);return J}}prependContent(z){return(J)=>{let Q=z.prependContent;if(Q)J.addCustomContent(Q);return J}}prepareSession(z){return(J)=>{return J.prepare(z),J}}exportColumnGroups(z,J){return(Q)=>{if(!z.skipColumnGroupHeaders){let Z=new zX,{colGroupSvc:$}=this.beans,X=$?$.createColumnGroups({columns:J,idCreator:Z,pinned:null,isStandaloneStructure:!0}):J;this.recursivelyAddHeaderGroups(X,Q,z.processGroupHeaderCallback)}return Q}}exportHeaders(z,J){return(Q)=>{if(!z.skipColumnHeaders){let Z=Q.onNewHeaderRow();J.forEach(($,X)=>{Z.onColumn($,X,void 0)})}return Q}}processPinnedTopRows(z,J){return(Q)=>{let Z=this.processRow.bind(this,Q,z,J);if(z.rowPositions)z.rowPositions.filter(($)=>$.rowPinned==="top").sort(($,X)=>$.rowIndex-X.rowIndex).map(($)=>this.pinnedRowModel?.getPinnedTopRow($.rowIndex)).forEach(Z);else if(!this.pinnedRowModel?.isManual())this.pinnedRowModel?.forEachPinnedRow("top",Z);return Q}}processRows(z,J){return(Q)=>{let Z=this.rowModel,$=o(this.gos,Z),X=Iz(this.gos,Z),Y=!$&&z.onlySelected,U=this.processRow.bind(this,Q,z,J),{exportedRows:_="filteredAndSorted"}=z;if(z.rowPositions)z.rowPositions.filter((H)=>H.rowPinned==null).sort((H,G)=>H.rowIndex-G.rowIndex).map((H)=>Z.getRow(H.rowIndex)).forEach(U);else if(this.colModel.pivotMode)if($)Z.forEachPivotNode(U,!0,_==="filteredAndSorted");else if(X)Z.forEachNodeAfterFilterAndSort(U,!0);else Z.forEachNode(U);else if(z.onlySelectedAllPages||Y){let H=this.beans.selectionSvc?.getSelectedNodes()??[];this.replicateSortedOrder(H),H.forEach(U)}else if(_==="all")Z.forEachNode(U);else if($||X)Z.forEachNodeAfterFilterAndSort(U,!0);else Z.forEachNode(U);return Q}}replicateSortedOrder(z){let{sortSvc:J,rowNodeSorter:Q}=this.beans;if(!J||!Q)return;let Z=J.getSortOptions(),$=(X,Y)=>{if(X.rowIndex!=null&&Y.rowIndex!=null)return X.rowIndex-Y.rowIndex;if(X.level===Y.level){if(X.parent?.id===Y.parent?.id)return Q.compareRowNodes(Z,X,Y)||(X.rowIndex??-1)-(Y.rowIndex??-1);return $(X.parent,Y.parent)}if(X.level>Y.level)return $(X.parent,Y);return $(X,Y.parent)};z.sort($)}processPinnedBottomRows(z,J){return(Q)=>{let Z=this.processRow.bind(this,Q,z,J);if(z.rowPositions)z.rowPositions.filter(($)=>$.rowPinned==="bottom").sort(($,X)=>$.rowIndex-X.rowIndex).map(($)=>this.pinnedRowModel?.getPinnedBottomRow($.rowIndex)).forEach(Z);else if(!this.pinnedRowModel?.isManual())this.pinnedRowModel?.forEachPinnedRow("bottom",Z);return Q}}getColumnsToExport(z){let{allColumns:J=!1,skipRowGroups:Q=!1,exportRowNumbers:Z=!1,columnKeys:$}=z,{colModel:X,gos:Y,visibleCols:U}=this,_=X.pivotMode,H=(q)=>{if(d4(q))return!1;return!w0(q)||Z};if($?.length)return X.getColsForKeys($).filter(H);let G=Y.get("treeData"),W;if(J&&!_)W=X.getCols();else W=U.allCols;return W=W.filter((q)=>H(q)&&(Q&&!G?!U1(q):!0)),W}recursivelyAddHeaderGroups(z,J,Q){let Z=[];for(let $ of z){let X=$;if(!X.getChildren)continue;for(let Y of X.getChildren()??[])Z.push(Y)}if(z.length>0&&K0(z[0]))this.doAddHeaderHeader(J,z,Q);if(Z&&Z.length>0)this.recursivelyAddHeaderGroups(Z,J,Q)}doAddHeaderHeader(z,J,Q){let Z=z.onNewHeaderGroupingRow(),$=0;for(let X of J){let Y=X,U;if(Q)U=Q(v(this.gos,{columnGroup:Y}));else U=this.beans.colNames.getDisplayNameForColumnGroup(Y,"header");let H=(Y.isExpandable()?Y.getLeafColumns():[]).reduce((G,W,q,B)=>{let E=N(G);if(W.getColumnGroupShow()!=="open"){if(E&&E[1]==null)E[1]=q-1}else if(!E||E[1]!=null)E=[q],G.push(E);if(q===B.length-1&&E&&E[1]==null)E[1]=q;return G},[]);Z.onColumn(Y,U||"",$++,Y.getLeafColumns().length-1,H)}}},k5={moduleName:"SharedExport",version:p,beans:[rL]};function wJ(z,J){let Q=document.defaultView??window;if(!Q)return;let Z=document.createElement("a"),$=Q.URL.createObjectURL(J);Z.setAttribute("href",$),Z.setAttribute("download",z),Z.style.display="none",document.body.appendChild(Z),Z.dispatchEvent(new MouseEvent("click",{bubbles:!1,cancelable:!0,view:Q})),Z.remove(),Q.setTimeout(()=>{Q.URL.revokeObjectURL($)},0)}var C5=class extends j{getFileName(z){let J=this.getDefaultFileExtension();if(!z?.length)z=this.getDefaultFileName();return z.includes(".")?z:`${z}.${J}`}getData(z){return this.beans.gridSerializer.serialize(this.createSerializingSession(z),z)}getDefaultFileName(){return`export.${this.getDefaultFileExtension()}`}},v5=class{constructor(z){this.valueFrom="data";let{colModel:J,rowGroupColsSvc:Q,colNames:Z,valueSvc:$,gos:X,processCellCallback:Y,processHeaderCallback:U,processGroupHeaderCallback:_,processRowGroupCallback:H,valueFrom:G}=z;if(this.colModel=J,this.rowGroupColsSvc=Q,this.colNames=Z,this.valueSvc=$,this.gos=X,this.processCellCallback=Y,this.processHeaderCallback=U,this.processGroupHeaderCallback=_,this.processRowGroupCallback=H,G)this.valueFrom=G}prepare(z){}extractHeaderValue(z){return this.getHeaderName(this.processHeaderCallback,z)??""}extractRowCellValue(z){let{column:J,node:Q,currentColumnIndex:Z,accumulatedRowIndex:$,type:X,useRawFormula:Y}=z,U=Z===0&&h9(this.gos,Q,this.colModel.pivotMode);if(this.processRowGroupCallback&&(this.gos.get("treeData")||Q.group)&&(J.isRowGroupDisplayed(Q.rowGroupColumn?.colId??"")||U))return{value:this.processRowGroupCallback(v(this.gos,{column:J,node:Q}))??""};if(this.processCellCallback)return{value:this.processCellCallback(v(this.gos,{accumulatedRowIndex:$,column:J,node:Q,value:this.valueSvc.getValueForDisplay({column:J,node:Q,from:this.valueFrom}).value,type:X,parseValue:(E)=>this.valueSvc.parseValue(J,Q,E,this.valueSvc.getValue(J,Q,this.valueFrom)),formatValue:(E)=>this.valueSvc.formatValue(J,Q,E)??E}))??""};let _=this.gos.get("treeData"),H=this.valueSvc,G=Q.level===-1&&Q.footer,W=J.colDef.showRowGroup===!0&&(Q.group||_);if(!G&&(U||W)){let E="",K=Q;while(K&&K.level!==-1){let{value:F,valueFormatted:L}=H.getValueForDisplay({column:U?void 0:J,node:K,includeValueFormatted:!0,exporting:!0,from:this.valueFrom});E=` -> ${L??F??""}${E}`,K=K.parent}return{value:E,valueFormatted:E}}let{value:q,valueFormatted:B}=H.getValueForDisplay({column:J,node:Q,includeValueFormatted:!0,exporting:!0,useRawFormula:Y,from:this.valueFrom});return{value:q??"",valueFormatted:B}}getHeaderName(z,J){if(z)return z(v(this.gos,{column:J}));return this.colNames.getDisplayNameForColumn(J,"csv",!0)}},m8=`\r
69
+ `,tL=class extends v5{constructor(z){super(z);this.config=z,this.isFirstLine=!0,this.result="";let{suppressQuotes:J,columnSeparator:Q}=z;this.suppressQuotes=J,this.columnSeparator=Q}addCustomContent(z){if(!z)return;if(typeof z==="string"){if(!/^\s*\n/.test(z))this.beginNewLine();z=z.replace(/\r?\n/g,m8),this.result+=z}else z.forEach((J)=>{this.beginNewLine(),J.forEach((Q,Z)=>{if(Z!==0)this.result+=this.columnSeparator;if(this.result+=this.putInQuotes(Q.data.value||""),Q.mergeAcross)this.appendEmptyCells(Q.mergeAcross)})})}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(z,J,Q,Z){if(Q!=0)this.result+=this.columnSeparator;this.result+=this.putInQuotes(J),this.appendEmptyCells(Z)}appendEmptyCells(z){for(let J=1;J<=z;J++)this.result+=this.columnSeparator+this.putInQuotes("")}onNewHeaderRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}}onNewHeaderRowColumn(z,J){if(J!=0)this.result+=this.columnSeparator;this.result+=this.putInQuotes(this.extractHeaderValue(z))}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}onNewBodyRowColumn(z,J,Q){if(J!=0)this.result+=this.columnSeparator;let Z=this.extractRowCellValue({column:z,node:Q,currentColumnIndex:J,accumulatedRowIndex:J,type:"csv",useRawFormula:!1});this.result+=this.putInQuotes(Z.valueFormatted??Z.value)}putInQuotes(z){if(this.suppressQuotes)return z;if(z===null||z===void 0)return'""';let J;if(typeof z==="string")J=z;else if(typeof z.toString==="function")J=z.toString();else V(53),J="";return'"'+J.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){if(!this.isFirstLine)this.result+=m8;this.isFirstLine=!1}},sL=class extends C5{constructor(){super(...arguments);this.beanName="csvCreator"}getMergedParams(z){let J=this.gos.get("defaultCsvExportParams");return Object.assign({},J,z)}export(z){if(this.isExportSuppressed()){V(51);return}let J=()=>{let Z=this.getMergedParams(z),$=this.getData(Z),X=new Blob(["\uFEFF",$],{type:"text/plain"}),Y=Z.fileName,U=typeof Y==="function"?Y(v(this.gos,{})):Y;wJ(this.getFileName(U),X)},{overlays:Q}=this.beans;if(Q)Q.showExportOverlay(J);else J()}exportDataAsCsv(z){this.export(z)}getDataAsCsv(z,J=!1){let Q=J?Object.assign({},z):this.getMergedParams(z);return this.getData(Q)}getDefaultFileExtension(){return"csv"}createSerializingSession(z){let{colModel:J,colNames:Q,rowGroupColsSvc:Z,valueSvc:$,gos:X}=this.beans,{processCellCallback:Y,processHeaderCallback:U,processGroupHeaderCallback:_,processRowGroupCallback:H,suppressQuotes:G,columnSeparator:W,valueFrom:q}=z;return new tL({colModel:J,colNames:Q,valueSvc:$,gos:X,processCellCallback:Y||void 0,processHeaderCallback:U||void 0,processGroupHeaderCallback:_||void 0,processRowGroupCallback:H||void 0,suppressQuotes:G||!1,columnSeparator:W||",",rowGroupColsSvc:Z,valueFrom:q})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}};function lL(z,J){return z.csvCreator?.getDataAsCsv(J)}function aL(z,J){z.csvCreator?.exportDataAsCsv(J)}var bX={moduleName:"CsvExport",version:p,beans:[sL],apiFunctions:{getDataAsCsv:lL,exportDataAsCsv:aL},dependsOn:[k5]},gX=class extends R0{constructor(z,J){super();if(this.ctrl=z,J)this.beans=J}postConstruct(){this.refreshTooltip()}setBrowserTooltip(z,J){let Z=this.ctrl.getGui();if(!Z)return;if(z!=null&&(z!=""||J))Z.setAttribute("title",z);else Z.removeAttribute("title")}updateTooltipText(){let{getTooltipValue:z}=this.ctrl;if(z)this.tooltip=z()}createTooltipFeatureIfNeeded(){if(this.tooltipManager==null){let z=this.beans.registry.createDynamicBean("tooltipStateManager",!0,this.ctrl,()=>this.tooltip);if(z)this.tooltipManager=this.createBean(z,this.beans.context)}}attemptToShowTooltip(){this.tooltipManager?.prepareToShowTooltip()}attemptToHideTooltip(){this.tooltipManager?.hideTooltip()}setTooltipAndRefresh(z){this.tooltip=z,this.refreshTooltip()}refreshTooltip(z){if(this.browserTooltips=this.beans.gos.get("enableBrowserTooltips"),this.updateTooltipText(),this.browserTooltips)this.setBrowserTooltip(this.tooltip),this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context);else this.setBrowserTooltip(z?"":null,z),this.createTooltipFeatureIfNeeded()}destroy(){this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context),super.destroy()}},oL=1000,eL=1000,c8=100,p8,T6=!1,zM=class extends R0{constructor(z,J){super();this.tooltipCtrl=z,this.getTooltipValue=J,this.interactionEnabled=!1,this.isInteractingWithTooltip=!1,this.state=0,this.tooltipInstanceCount=0,this.tooltipMouseTrack=!1}wireBeans(z){this.popupSvc=z.popupSvc}postConstruct(){if(this.gos.get("tooltipInteraction"))this.interactionEnabled=!0;this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gos.get("tooltipMouseTrack");let z=this.tooltipCtrl.getGui();if(this.tooltipTrigger===0)this.addManagedListeners(z,{mouseenter:this.onMouseEnter.bind(this),mouseleave:this.onMouseLeave.bind(this)});if(this.tooltipTrigger===1)this.addManagedListeners(z,{focusin:this.onFocusIn.bind(this),focusout:this.onFocusOut.bind(this)});if(this.addManagedListeners(z,{mousemove:this.onMouseMove.bind(this)}),!this.interactionEnabled)this.addManagedListeners(z,{mousedown:this.onMouseDown.bind(this),keydown:this.onKeyDown.bind(this)})}getGridOptionsTooltipDelay(z){let J=this.gos.get(z);return Math.max(200,J)}getTooltipDelay(z){return this.tooltipCtrl[`getTooltip${z}DelayOverride`]?.()??this.getGridOptionsTooltipDelay(`tooltip${z}Delay`)}destroy(){this.setToDoNothing(),super.destroy()}getTooltipTrigger(){let z=this.gos.get("tooltipTrigger");if(!z||z==="hover")return 0;return 1}onMouseEnter(z){if(this.interactionEnabled&&this.interactiveTooltipTimeoutId)this.unlockService(),this.startHideTimeout();if(zz())return;if(T6)this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(z)},c8);else this.prepareToShowTooltip(z)}onMouseMove(z){if(this.lastMouseEvent)this.lastMouseEvent=z;if(this.tooltipMouseTrack&&this.state===2&&this.tooltipComp)this.positionTooltip()}onMouseDown(){this.setToDoNothing()}onMouseLeave(){if(this.interactionEnabled)this.lockService();else this.setToDoNothing()}onFocusIn(){this.prepareToShowTooltip()}onFocusOut(z){let J=z.relatedTarget,Q=this.tooltipCtrl.getGui(),Z=this.tooltipComp?.getGui();if(this.isInteractingWithTooltip||Q.contains(J)||this.interactionEnabled&&Z?.contains(J))return;this.setToDoNothing()}onKeyDown(){if(this.isInteractingWithTooltip)this.isInteractingWithTooltip=!1;this.setToDoNothing()}prepareToShowTooltip(z){if(this.state!=0||T6)return;let J=0;if(z)J=this.isLastTooltipHiddenRecently()?this.getTooltipDelay("SwitchShow"):this.getTooltipDelay("Show");this.lastMouseEvent=z||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),J),this.state=1}isLastTooltipHiddenRecently(){return Date.now()-p8<oL}setToDoNothing(z){if(!z&&this.state===2)this.hideTooltip();if(this.onBodyScrollEventCallback)this.onBodyScrollEventCallback(),this.onBodyScrollEventCallback=void 0;if(this.clearEventHandlers(),this.onDocumentKeyDownCallback)this.onDocumentKeyDownCallback(),this.onDocumentKeyDownCallback=void 0;this.clearTimeouts(),this.state=0,this.lastMouseEvent=null}showTooltip(){let z=this.getTooltipValue(),J=this.tooltipCtrl;if(!I(z)||J.shouldDisplayTooltip&&!J.shouldDisplayTooltip()){this.setToDoNothing();return}let Q=this.gos.addCommon({location:J.getLocation?.()??"UNKNOWN",value:z,hideTooltipCallback:()=>this.hideTooltip(!0),...J.getAdditionalParams?.()});this.state=2,this.tooltipInstanceCount++;let Z=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);this.createTooltipComp(Q,Z)}hideTooltip(z){if(!z&&this.isInteractingWithTooltip)return;if(this.tooltipComp)this.destroyTooltipComp(),p8=Date.now();if(this.eventSvc.dispatchEvent({type:"tooltipHide",parentGui:this.tooltipCtrl.getGui()}),z)this.isInteractingWithTooltip=!1;this.setToDoNothing(!0)}newTooltipComponentCallback(z,J){if(this.state!==2||this.tooltipInstanceCount!==z){this.destroyBean(J);return}let Z=J.getGui();if(this.tooltipComp=J,!Z.classList.contains("ag-tooltip"))Z.classList.add("ag-tooltip-custom");if(this.tooltipTrigger===0)Z.classList.add("ag-tooltip-animate");if(this.interactionEnabled)Z.classList.add("ag-tooltip-interactive");let $=this.getLocaleTextFunc(),X=this.popupSvc?.addPopup({eChild:Z,ariaLabel:$("ariaLabelTooltip","Tooltip")});if(X)this.tooltipPopupDestroyFunc=X.hideFunc;if(this.positionTooltip(),this.tooltipTrigger===1){let Y=()=>this.setToDoNothing();[this.onBodyScrollEventCallback]=this.addManagedEventListeners({bodyScroll:Y}),this.setEventHandlers(Y)}if(this.interactionEnabled){if([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(Z,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),[this.onDocumentKeyDownCallback]=this.addManagedElementListeners(Y0(this.beans),{keydown:(Y)=>{if(!Z.contains(Y?.target))this.onKeyDown()}}),this.tooltipTrigger===1)[this.tooltipFocusInListener,this.tooltipFocusOutListener]=this.addManagedElementListeners(Z,{focusin:this.onTooltipFocusIn.bind(this),focusout:this.onTooltipFocusOut.bind(this)})}this.eventSvc.dispatchEvent({type:"tooltipShow",tooltipGui:Z,parentGui:this.tooltipCtrl.getGui()}),this.startHideTimeout()}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService()}onTooltipMouseLeave(){if(this.isTooltipFocused())return;this.isInteractingWithTooltip=!1,this.lockService()}onTooltipFocusIn(){this.isInteractingWithTooltip=!0}isTooltipFocused(){let z=this.tooltipComp?.getGui(),J=d(this.beans);return!!z&&z.contains(J)}onTooltipFocusOut(z){let J=this.tooltipCtrl.getGui();if(this.isTooltipFocused())return;if(this.isInteractingWithTooltip=!1,J.contains(z.relatedTarget))this.startHideTimeout();else this.hideTooltip()}positionTooltip(){let z={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};if(this.lastMouseEvent)this.popupSvc?.positionPopupUnderMouseEvent({...z,mouseEvent:this.lastMouseEvent});else this.popupSvc?.positionPopupByComponent({...z,eventSource:this.tooltipCtrl.getGui(),position:"under",keepWithinBounds:!0,nudgeY:5})}destroyTooltipComp(){this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");let z=this.tooltipPopupDestroyFunc,J=this.tooltipComp,Q=this.tooltipTrigger===0?eL:0;window.setTimeout(()=>{z(),this.destroyBean(J)},Q),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}clearTooltipListeners(){for(let z of[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener])if(z)z();this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}lockService(){T6=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},c8)}unlockService(){T6=!1,this.clearInteractiveTimeout()}startHideTimeout(){this.clearHideTimeout(),this.hideTooltipTimeoutId=window.setTimeout(this.hideTooltip.bind(this),this.getTooltipDelay("Hide"))}clearShowTimeout(){if(!this.showTooltipTimeoutId)return;window.clearTimeout(this.showTooltipTimeoutId),this.showTooltipTimeoutId=void 0}clearHideTimeout(){if(!this.hideTooltipTimeoutId)return;window.clearTimeout(this.hideTooltipTimeoutId),this.hideTooltipTimeoutId=void 0}clearInteractiveTimeout(){if(!this.interactiveTooltipTimeoutId)return;window.clearTimeout(this.interactiveTooltipTimeoutId),this.interactiveTooltipTimeoutId=void 0}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout(),this.clearInteractiveTimeout()}},JM=class extends gX{constructor(z,J,Q){super(z,Q);this.highlightTracker=J,this.onHighlight=this.onHighlight.bind(this)}postConstruct(){super.postConstruct(),this.wireHighlightListeners()}wireHighlightListeners(){this.addManagedPropertyListener("tooltipTrigger",({currentValue:z})=>{this.setTooltipMode(z)}),this.setTooltipMode(this.gos.get("tooltipTrigger")),this.highlightTracker.addEventListener("itemHighlighted",this.onHighlight)}onHighlight(z){if(this.tooltipMode!==1)return;if(z.highlighted)this.attemptToShowTooltip();else this.attemptToHideTooltip()}setTooltipMode(z="focus"){this.tooltipMode=z==="focus"?1:0}destroy(){this.highlightTracker.removeEventListener("itemHighlighted",this.onHighlight),super.destroy()}},QM=class extends Z5{constructor(){super({tag:"div",cls:"ag-tooltip"})}init(z){let{value:J}=z,Q=this.getGui();Q.textContent=g2(J);let Z=z.location.replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase();Q.classList.add(`ag-${Z}-tooltip`)}},ZM=".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}}";function i8(z,J){return{top:z.top-J.top,left:z.left-J.left,right:z.right-J.left,bottom:z.bottom-J.top}}function F2(z,J,Q,Z=0){let[$,X]=Q.split("-"),Y=hX(z,X),U=$M(J,$),_=XM($,X);return{x:Y.x-U.x+_.dx*Z,y:Y.y-U.y+_.dy*Z}}function hX(z,J){let Q=(z.left+z.right)/2,Z=(z.top+z.bottom)/2;switch(J){case"tl":return{x:z.left,y:z.top};case"tc":return{x:Q,y:z.top};case"tr":return{x:z.right,y:z.top};case"l":return{x:z.left,y:Z};case"c":return{x:Q,y:Z};case"r":return{x:z.right,y:Z};case"bl":return{x:z.left,y:z.bottom};case"bc":return{x:Q,y:z.bottom};case"br":return{x:z.right,y:z.bottom}}}function $M(z,J){return hX({top:0,left:0,right:z.width,bottom:z.height},J)}function XM(z,J){let Q=d8(z),Z=d8(J),$=n8(z),X=n8(J);return{dx:Math.sign(Z-Q),dy:Math.sign(X-$)}}function d8(z){let J=z.length===2?z[1]:z;if(J==="l")return-1;if(J==="r")return 1;return 0}function n8(z){if(z.length===1)return 0;if(z.startsWith("t"))return-1;if(z.startsWith("b"))return 1;return 0}var S6=0,YM=200,UM=class extends R0{constructor(){super(...arguments);this.beanName="popupSvc",this.popupList=[]}postConstruct(){this.addManagedEventListeners({stylesChanged:this.handleThemeChange.bind(this)})}getPopupParent(){let z=this.gos.get("popupParent");if(z)return z;return this.getDefaultPopupParent()}positionPopupUnderMouseEvent(z){let{ePopup:J,nudgeX:Q,nudgeY:Z,skipObserver:$}=z;this.positionPopup({ePopup:J,nudgeX:Q,nudgeY:Z,keepWithinBounds:!0,skipObserver:$,updatePosition:()=>this.calculatePointerAlign(z.mouseEvent),postProcessCallback:()=>this.callPostProcessPopup(z.additionalParams,z.type,z.ePopup,null,z.mouseEvent)})}calculatePointerAlign(z){let J=this.getParentRect();return{x:z.clientX-J.left,y:z.clientY-J.top}}positionPopupByComponent(z){let{ePopup:J,nudgeX:Q,nudgeY:Z,keepWithinBounds:$,eventSource:X,alignSide:Y="left",position:U="over",type:_}=z,H=X.getBoundingClientRect(),G=this.getParentRect();this.setAlignedTo(X,J);let W=()=>{let q=i8(H,G),B={width:J.offsetWidth,height:J.offsetHeight},E=Y==="right";if(U==="over")return this.setAlignedStyles(J,"over"),F2(q,B,E?"tr-tr":"tl-tl");if(this.setAlignedStyles(J,"under"),this.shouldRenderUnderOrAbove(J,H,G,z.nudgeY||0)==="under")return F2(q,B,E?"tr-br":"tl-bl");let F=F2(q,B,E?"br-tr":"bl-tl");return F.y-=(Z||0)*2,F};this.positionPopup({ePopup:J,nudgeX:Q,nudgeY:Z,keepWithinBounds:$,updatePosition:W,postProcessCallback:()=>this.callPostProcessPopup(z.additionalParams,_,J,X,null)})}positionPopupForMenu(z){let{eventSource:J,ePopup:Q,event:Z}=z,$=J.getBoundingClientRect(),X=this.getParentRect();this.setAlignedTo(J,Q);let Y=!1,U=()=>{let _=i8($,X),H=this.keepXYWithinBounds(Q,_.top,0),G=Q.clientWidth>0?Q.clientWidth:200;if(!Y)Q.style.minWidth=`${G}px`,Y=!0;let q=X.right-X.left-G,B={width:G,height:Q.offsetHeight},E=F2(_,B,"tl-tr").x-2,K=F2(_,B,"tr-tl").x,F;if(this.gos.get("enableRtl")){if(F=K,F<0)F=E,this.setAlignedStyles(Q,"left");if(F>q)F=0,this.setAlignedStyles(Q,"right")}else{if(F=E,F>q)F=K,this.setAlignedStyles(Q,"right");if(F<0)F=0,this.setAlignedStyles(Q,"left")}return{x:F,y:H}};this.positionPopup({ePopup:Q,keepWithinBounds:!0,updatePosition:U,postProcessCallback:()=>this.callPostProcessPopup(z.additionalParams,"subMenu",Q,J,Z instanceof MouseEvent?Z:void 0)})}shouldRenderUnderOrAbove(z,J,Q,Z){let $=Q.bottom-J.bottom,X=J.top-Q.top,Y=z.offsetHeight+Z;if($>Y)return"under";if(X>Y||X>$)return"above";return"under"}setAlignedStyles(z,J){let Q=this.getPopupIndex(z);if(Q===-1)return;let Z=this.popupList[Q],{alignedToElement:$}=Z;if(!$)return;let X=["right","left","over","above","under"];for(let Y of X)$.classList.remove(`ag-has-popup-positioned-${Y}`),z.classList.remove(`ag-popup-positioned-${Y}`);if(!J)return;$.classList.add(`ag-has-popup-positioned-${J}`),z.classList.add(`ag-popup-positioned-${J}`)}setAlignedTo(z,J){let Q=this.getPopupIndex(J);if(Q!==-1){let Z=this.popupList[Q];Z.alignedToElement=z}}positionPopup(z){let{ePopup:J,keepWithinBounds:Q,nudgeX:Z,nudgeY:$,skipObserver:X,updatePosition:Y}=z,U={width:0,height:0},_=(H=!1)=>{let{x:G,y:W}=Y();if(H&&J.clientWidth===U.width&&J.clientHeight===U.height)return;if(U.width=J.clientWidth,U.height=J.clientHeight,Z)G+=Z;if($)W+=$;if(Q)G=this.keepXYWithinBounds(J,G,1),W=this.keepXYWithinBounds(J,W,0);if(J.style.left=`${G}px`,J.style.top=`${W}px`,z.postProcessCallback)z.postProcessCallback()};if(_(),!X){let H=S4(this.beans,J,()=>_(!0));setTimeout(()=>H(),YM)}}getParentRect(){let z=Y0(this.beans),J=this.getPopupParent();if(J===z.body)J=z.documentElement;else if(getComputedStyle(J).position==="static")J=J.offsetParent;return K9(J)}keepXYWithinBounds(z,J,Q){let Z=Q===0,$=Z?"clientHeight":"clientWidth",X=Z?"top":"left",Y=Z?"height":"width",U=Z?"scrollTop":"scrollLeft",_=Y0(this.beans),H=_.documentElement,G=this.getPopupParent(),W=z.getBoundingClientRect(),q=G.getBoundingClientRect(),B=_.documentElement.getBoundingClientRect(),E=G===_.body,K=Math.ceil(W[Y]),L=E?(Z?E9:u6)(H)+H[U]:G[$];if(E)L-=Math.abs(B[X]-q[X]);let M=L-K;return Math.min(Math.max(J,0),Math.max(M,0))}addPopup(z){let{eChild:J,ariaLabel:Q,ariaOwns:Z,alwaysOnTop:$,positionCallback:X,anchorToElement:Y}=z,U=this.getPopupIndex(J);if(U!==-1)return{hideFunc:this.popupList[U].hideFunc};this.initialisePopupPosition(J);let _=this.createPopupWrapper(J,!!$,Q,Z),H=this.addEventListenersToPopup({...z,wrapperEl:_});if(X)X();return this.addPopupToPopupList(J,_,H,Y),{hideFunc:H}}initialisePopupPosition(z){let Q=this.getPopupParent().getBoundingClientRect();if(!I(z.style.top))z.style.top=`${Q.top*-1}px`;if(!I(z.style.left))z.style.left=`${Q.left*-1}px`}createPopupWrapper(z,J,Q,Z){let $=this.getPopupParent(),{environment:X,gos:Y}=this.beans,U=W0({tag:"div"});if(X.applyThemeClasses(U),U.classList.add("ag-popup"),z.classList.add(Y.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),!z.hasAttribute("role"))H0(z,"dialog");if(Q)G0(z,Q);else if(Z)z.id||(z.id=`popup-component-${S6}`),g7(Z,z.id);if(U.appendChild(z),$.appendChild(U),J)this.setAlwaysOnTop(z,!0);else this.bringPopupToFront(z);return U}addEventListenersToPopup(z){let J=this.beans,Q=Y0(J),{wrapperEl:Z,eChild:$,closedCallback:X,afterGuiAttached:Y,closeOnEsc:U,modal:_,ariaOwns:H}=z,G=!1,W=(K)=>{if(!Z.contains(d(J)))return;if(K.key===R.ESCAPE&&!this.isStopPropagation(K))E({keyboardEvent:K})},q=(K)=>E({mouseEvent:K}),B=(K)=>E({touchEvent:K}),E=(K={})=>{let{mouseEvent:F,touchEvent:L,keyboardEvent:M,forceHide:D}=K;if(!D&&(this.isEventFromCurrentPopup({mouseEvent:F,touchEvent:L},$)||G))return;if(G=!0,Z.remove(),Q.removeEventListener("keydown",W),Q.removeEventListener("mousedown",q),Q.removeEventListener("touchstart",B),Q.removeEventListener("contextmenu",q),this.eventSvc.removeListener("dragStarted",q),X)X(F||L||M);this.removePopupFromPopupList($,H)};if(Y)Y({hidePopup:E});return window.setTimeout(()=>{if(U)Q.addEventListener("keydown",W);if(_)Q.addEventListener("mousedown",q),this.eventSvc.addListener("dragStarted",q),Q.addEventListener("touchstart",B),Q.addEventListener("contextmenu",q)},0),E}addPopupToPopupList(z,J,Q,Z){if(this.popupList.push({element:z,wrapper:J,hideFunc:Q,instanceId:S6,isAnchored:!!Z}),Z)this.setPopupPositionRelatedToElement(z,Z);S6=S6+1}getPopupIndex(z){return this.popupList.findIndex((J)=>J.element===z)}setPopupPositionRelatedToElement(z,J){let Q=this.getPopupIndex(z);if(Q===-1)return;let Z=this.popupList[Q];if(Z.stopAnchoringPromise)Z.stopAnchoringPromise.then((X)=>X?.());if(Z.stopAnchoringPromise=void 0,Z.isAnchored=!1,!J)return;let $=this.keepPopupPositionedRelativeTo({element:J,ePopup:z,hidePopup:Z.hideFunc});return Z.stopAnchoringPromise=$,Z.isAnchored=!0,$}removePopupFromPopupList(z,J){if(this.setAlignedStyles(z,null),this.setPopupPositionRelatedToElement(z,null),J)g7(J,null);this.popupList=this.popupList.filter((Q)=>Q.element!==z)}keepPopupPositionedRelativeTo(z){let J=this.getPopupParent(),Q=J.getBoundingClientRect(),{element:Z,ePopup:$}=z,X=Z.getBoundingClientRect(),Y=(W)=>Number.parseInt(W.substring(0,W.length-1),10),U=(W,q)=>{let B=Q[W]-X[W],E=Y($.style[W]);return{initialDiff:B,lastDiff:B,initial:E,last:E,direction:q}},_=U("top",0),H=U("left",1),G=this.beans.frameworkOverrides;return new b((W)=>{G.wrapIncoming(()=>{LG(()=>{let q=J.getBoundingClientRect(),B=Z.getBoundingClientRect();if(B.top==0&&B.left==0&&B.height==0&&B.width==0){z.hidePopup();return}let K=(F,L)=>{let M=Y($.style[L]);if(F.last!==M)F.initial=M,F.last=M;let D=q[L]-B[L];if(D!=F.lastDiff){let A=this.keepXYWithinBounds($,F.initial+F.initialDiff-D,F.direction);$.style[L]=`${A}px`,F.last=A}F.lastDiff=D};K(_,"top"),K(H,"left")},200).then((q)=>{W(()=>{if(q!=null)window.clearInterval(q)})})},"popupPositioning")})}isEventFromCurrentPopup(z,J){let{mouseEvent:Q,touchEvent:Z}=z,$=Q?Q:Z;if(!$)return!1;let X=this.getPopupIndex(J);if(X===-1)return!1;for(let Y=X;Y<this.popupList.length;Y++){let U=this.popupList[Y];if(qJ(U.element,$))return!0}return this.isElementWithinCustomPopup($.target)}isElementWithinCustomPopup(z){let J=Y0(this.beans);while(z&&z!==J.body){if(z.classList.contains("ag-custom-component-popup")||z.parentElement===null)return!0;z=z.parentElement}return!1}getWrapper(z){while(!z.classList.contains("ag-popup")&&z.parentElement)z=z.parentElement;return z.classList.contains("ag-popup")?z:null}setAlwaysOnTop(z,J){let Q=this.getWrapper(z);if(!Q)return;if(Q.classList.toggle("ag-always-on-top",!!J),J)this.bringPopupToFront(Q)}bringPopupToFront(z){let J=this.getPopupParent(),Q=Array.prototype.slice.call(J.querySelectorAll(".ag-popup")),Z=Q.length,$=this.getWrapper(z);if(!$||Z<=1||!J.contains(z))return;let X=[],Y=[];for(let q of Q){if(q===$)continue;if(q.classList.contains("ag-always-on-top"))Y.push(q);else X.push(q)}let U=[],_=Y.length,W=$.classList.contains("ag-always-on-top")||!_?[...X,...Y,$]:[...X,$,...Y];for(let q=0;q<=Z;q++){let B=W[q];if(Q[q]===W[q]||B===$)continue;let E=B.querySelectorAll("div");for(let K of E)if(K.scrollTop!==0)U.push([K,K.scrollTop]);if(q===0)J.prepend(B);else W[q-1].after(B)}while(U.length){let q=U.pop();q[0].scrollTop=q[1]}}handleThemeChange(z){if(z.themeChanged){let J=this.beans.environment;for(let Q of this.popupList)J.applyThemeClasses(Q.wrapper)}}},_M=class extends UM{getDefaultPopupParent(){return this.beans.ctrlsSvc.get("gridCtrl").getGui()}callPostProcessPopup(z,J,Q,Z,$){let X=this.gos.getCallback("postProcessPopup");if(X){let{column:Y,rowNode:U}=z??{};X({column:Y,rowNode:U,ePopup:Q,type:J,eventSource:Z,mouseEvent:$})}}getActivePopups(){return this.popupList.map((z)=>z.element)}hasAnchoredPopup(){return this.popupList.some((z)=>z.isAnchored)}isStopPropagation(z){return _4(z)}},W1={moduleName:"Popup",version:p,beans:[_M]};function i1(z){return z.get("tooltipShowMode")==="whenTruncated"}function e1(z,J){return i1(z)?g1(J):void 0}var HM=(z,J)=>{let Q=z;if(typeof Q.getTranslatedMessage==="function")return Q.getTranslatedMessage(J);return z.message},LZ=(z,J,Q)=>{let{editModelSvc:Z}=z,$=Z?.getCellValidationModel()?.getCellValidation(J)?.errorMessages,X=Z?.getRowValidationModel().getRowValidation(J)?.errorMessages,Y=$||X;return Y?.length?Y.join(Q("tooltipValidationErrorSeparator",". ")):void 0},GM=(z,J)=>{if(!i1(z.gos))return;if(J.isCellRenderer()){let Z=J.column.colDef;if(!(!!Z.showRowGroup||Z.cellRenderer==="agGroupCellRenderer"))return;return g1(()=>{let X=J.eGui;return X.querySelector(".ag-group-value")||X.querySelector(".ag-cell-value")||X})}return g1(()=>{let Z=J.eGui;return Z.children.length===0?Z:Z.querySelector(".ag-cell-value")})},WM=(z,J,Q)=>{let{editSvc:Z}=z,{column:$}=J,X=GM(z,J),Y=()=>{if(Z?.isEditing(J))return!1;if(!X)return!0;if(!$.isTooltipEnabled())return!1;return X()};return{shouldDisplayDefault:Y,shouldDisplayColumnTooltip:Y,shouldDisplayCustomTooltip:Q??Y}},qM=({beans:z,ctrl:J,value:Q,displayFunctions:Z,translate:$})=>{let{editSvc:X,formula:Y,gos:U}=z,{column:_,rowNode:H}=J,G=_.colDef;if(G.allowFormula&&Y?.active){let F=Y.getFormulaError(_,H);if(F)return{value:HM(F,$),location:"cellFormula",shouldDisplay:()=>!!Y?.getFormulaError(_,H)}}if(!X?.isEditing(J)){let F=LZ(z,J,$);if(F)return{value:F,location:"cellEditor",shouldDisplay:()=>!X?.isEditing(J)&&!!LZ(z,J,$)}}let{shouldDisplayCustomTooltip:q,shouldDisplayColumnTooltip:B}=Z;if(Q!=null)return{value:Q,location:"cell",shouldDisplay:q};let E=H.data;if(G.tooltipField&&I(E)){let F=G.tooltipField;return{value:_.isTooltipFieldContainsDots()?j2(E,F):E[F],location:"cell",shouldDisplay:B}}let K=G.tooltipValueGetter;if(K)return{value:K(v(U,{location:"cell",colDef:_.colDef,column:_,rowIndex:J.cellPosition.rowIndex,node:H,data:H.data,value:J.value,valueFormatted:J.valueFormatted})),location:"cell",shouldDisplay:B};return null},BM=class extends j{constructor(){super(...arguments);this.beanName="tooltipSvc"}setupHeaderTooltip(z,J,Q,Z){if(z)J.destroyBean(z);if(!J.isAlive())return;let $=this.gos,X=i1($),{column:Y,eGui:U}=J,_=Y.colDef;if(!Z&&X&&!_.headerComponent)Z=g1(()=>U.querySelector(".ag-header-cell-text"));let H="header",G="header",W=this.beans.colNames.getDisplayNameForColumn(Y,G,!0),q=Q??W,B={getGui:()=>U,getLocation:()=>H,getTooltipValue:()=>Q??_?.headerTooltipValueGetter?.(v($,{location:H,colDef:_,column:Y,value:q,valueFormatted:W}))??_?.headerTooltip,shouldDisplayTooltip:Z,getAdditionalParams:()=>({column:Y,colDef:Y.colDef})},E=this.createTooltipFeature(B);if(E)E=J.createBean(E),J.setRefreshFunction("tooltip",()=>E.refreshTooltip());return E}setupHeaderGroupTooltip(z,J,Q,Z){if(z)J.destroyBean(z);if(!J.isAlive())return;let $=this.gos,X=i1($),{column:Y,eGui:U}=J,_=Y.getColGroupDef();if(!Z&&X&&!_?.headerGroupComponent)Z=g1(()=>U.querySelector(".ag-header-group-text"));let H="headerGroup",G="header",W=this.beans.colNames.getDisplayNameForColumnGroup(Y,G),q=Q??W,B={getGui:()=>U,getLocation:()=>H,getTooltipValue:()=>Q??_?.headerTooltipValueGetter?.(v($,{location:H,colDef:_,column:Y,value:q,valueFormatted:W}))??_?.headerTooltip,shouldDisplayTooltip:Z,getAdditionalParams:()=>{let K={column:Y};if(_)K.colDef=_;return K}},E=this.createTooltipFeature(B);return E?J.createBean(E):E}enableCellTooltipFeature(z,J,Q){let{beans:Z}=this,{column:$,rowNode:X}=z,Y=WM(Z,z,Q),U=this.getLocaleTextFunc(),_=null,H=()=>{return _=qM({beans:Z,ctrl:z,value:J,displayFunctions:Y,translate:U}),_},W={getGui:()=>z.eGui,getLocation:()=>_?.location??"cell",getTooltipValue:()=>H()?.value,shouldDisplayTooltip:()=>{let q=_??H();if(!q)return!1;return q.shouldDisplay?q.shouldDisplay():!0},getAdditionalParams:()=>({column:$,colDef:$.colDef,rowIndex:z.cellPosition.rowIndex,node:X,data:X.data,valueFormatted:z.valueFormatted})};return this.createTooltipFeature(W,Z)}setupFullWidthRowTooltip(z,J,Q,Z){let $={getGui:()=>J.getFullWidthElement(),getTooltipValue:()=>Q,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:Z},X=this.beans,Y=X.context;if(z)J.destroyBean(z,Y);let U=this.createTooltipFeature($,X);if(!U)return;return J.createBean(U,Y)}setupCellEditorTooltip(z,J){let{beans:Q}=this,{context:Z}=Q,$=J.getValidationElement?.(!0)||!J.isPopup?.()&&z.eGui;if(!$)return;let X={getGui:()=>$,getTooltipValue:()=>LZ(Q,z,this.getLocaleTextFunc()),getLocation:()=>"cellEditor",shouldDisplayTooltip:()=>{let{editModelSvc:U}=Q,_=U?.getRowValidationModel()?.getRowValidationMap(),H=U?.getCellValidationModel()?.getCellValidationMap(),G=!!_&&_.size>0,W=!!H&&H.size>0;return G||W}},Y=this.createTooltipFeature(X,Q);if(!Y)return;return z.createBean(Y,Z)}initCol(z){let{colDef:J}=z;z.tooltipEnabled=I(J.tooltipField)||I(J.tooltipValueGetter)||I(J.tooltipComponent)}createTooltipFeature(z,J){return this.beans.registry.createDynamicBean("tooltipFeature",!1,z,J)}},EM=class extends zM{createTooltipComp(z,J){rG(this.beans.userCompFactory,z)?.newAgStackInstance().then(J)}setEventHandlers(z){[this.onColumnMovedEventCallback]=this.addManagedEventListeners({columnMoved:z})}clearEventHandlers(){this.onColumnMovedEventCallback?.(),this.onColumnMovedEventCallback=void 0}},KM={moduleName:"Tooltip",version:p,beans:[BM],dynamicBeans:{tooltipFeature:gX,highlightTooltipFeature:JM,tooltipStateManager:EM},userComponents:{agTooltipComponent:QM},dependsOn:[W1],css:[ZM]};var FM=".ag-cell-inline-editing{border:var(--ag-cell-editing-border)!important;border-radius:var(--ag-border-radius);box-shadow:var(--ag-cell-editing-shadow);padding:0;z-index:1;.ag-cell-edit-wrapper,.ag-cell-editor,.ag-cell-wrapper,:where(.ag-cell-editor) .ag-input-field-input,:where(.ag-cell-editor) .ag-wrapper{height:100%;line-height:normal;min-height:100%;width:100%}&.ag-cell-editing-error{border-color:var(--ag-invalid-color)!important}}:where(.ag-popup-editor) .ag-large-text{background-color:var(--ag-background-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);padding:0}.ag-large-text-input{display:block;height:auto;padding:var(--ag-cell-horizontal-padding)}:where(.ag-rtl .ag-large-text-input) .ag-text-area-input{resize:none}:where(.ag-ltr) .ag-checkbox-edit{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-checkbox-edit{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-row.ag-row-editing-invalid .ag-cell-inline-editing){opacity:.8}.ag-popup-editor{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}";var z2=class extends I1{constructor(z,J="ag-text-field",Q="text"){super(z,J,Q)}postConstruct(){if(super.postConstruct(),this.config.allowedCharPattern)this.preventDisallowedCharacters()}setValue(z,J){let Q=this.eInput;if(Q.value!==z)Q.value=I(z)?z:"";return super.setValue(z,J)}setStartValue(z){this.setValue(z,!0)}setCustomValidity(z){let J=this.eInput,Q=z.length>0;if(J.setCustomValidity(z),Q)J.reportValidity();fZ(J,Q)}preventDisallowedCharacters(){let z=new RegExp(`[${this.config.allowedCharPattern}]`),J=(Q)=>{if(!N$(Q))return;if(Q.key&&!z.test(Q.key))Q.preventDefault()};this.addManagedListeners(this.eInput,{keydown:J,paste:(Q)=>{if(Q.clipboardData?.getData("text")?.split("").some(($)=>!z.test($)))Q.preventDefault()}})}},Yz={selector:"AG-INPUT-TEXT-FIELD",component:z2};var LM=class extends QW{constructor(z){super();this.cellEditorInput=z,this.eEditor=P}initialiseEditor(z){let{cellEditorInput:J}=this;this.setTemplate({tag:"div",cls:"ag-cell-edit-wrapper",children:[J.getTemplate()]},J.getAgComponents());let{eEditor:Q}=this,{cellStartedEdit:Z,eventKey:$,suppressPreventDefault:X}=z;Q.getInputElement().setAttribute("title",""),J.init(Q,z);let Y,U=!0;if(Z){if(this.focusAfterAttached=!0,$===R.BACKSPACE||$===R.DELETE)Y="";else if($?.length===1)if(X)U=!1;else Y=$;else if(Y=J.getStartValue(),$!==R.F2)this.highlightAllOnFocus=!0}else this.focusAfterAttached=!1,Y=J.getStartValue();if(U&&Y!=null)Q.setStartValue(Y);this.addGuiEventListener("keydown",(_)=>{let{key:H}=_;if(H===R.PAGE_UP||H===R.PAGE_DOWN)_.preventDefault()})}afterGuiAttached(){let z=this.getLocaleTextFunc(),J=this.eEditor;if(J.setInputAriaLabel(z("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;if(!fz())J.getFocusableElement().focus();let Q=J.getInputElement();if(this.highlightAllOnFocus)Q.select();else this.cellEditorInput.setCaret?.()}focusIn(){let{eEditor:z}=this,J=z.getFocusableElement(),Q=z.getInputElement();J.focus(),Q.select()}getValue(){return this.cellEditorInput.getValue()}agSetEditValue(z){this.params.value=z;let J=this.cellEditorInput.getStartValue();this.eEditor.setStartValue(J??null)}isPopup(){return!1}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){return this.cellEditorInput.getValidationErrors()}};var uX=class extends z2{constructor(z){super(z,"ag-number-field","number")}postConstruct(){super.postConstruct();let z=this.eInput;this.addManagedListeners(z,{blur:()=>{let X=Number.parseFloat(z.value),Y=isNaN(X)?"":this.normalizeValue(X.toString());if(this.value!==Y)this.setValue(Y)},wheel:this.onWheel.bind(this)}),z.step="any";let{precision:J,min:Q,max:Z,step:$}=this.config;if(typeof J==="number")this.setPrecision(J);if(typeof Q==="number")this.setMin(Q);if(typeof Z==="number")this.setMax(Z);if(typeof $==="number")this.setStep($)}onWheel(z){if(d(this.beans)===this.eInput)z.preventDefault()}normalizeValue(z){if(z==="")return"";if(this.precision!=null)z=this.adjustPrecision(z);return z}adjustPrecision(z,J){let Q=this.precision;if(Q==null)return z;if(J){let $=Number.parseFloat(z).toFixed(Q);return Number.parseFloat($).toString()}let Z=String(z).split(".");if(Z.length>1){if(Z[1].length<=Q)return z;else if(Q>0)return`${Z[0]}.${Z[1].slice(0,Q)}`}return Z[0]}setMin(z){if(this.min===z)return this;return this.min=z,j4(this.eInput,"min",z),this}setMax(z){if(this.max===z)return this;return this.max=z,j4(this.eInput,"max",z),this}setPrecision(z){return this.precision=z,this}setStep(z){if(this.step===z)return this;return this.step=z,j4(this.eInput,"step",z),this}setValue(z,J){return this.setValueOrInputValue((Q)=>super.setValue(Q,J),()=>this,z)}setStartValue(z){return this.setValueOrInputValue((J)=>super.setValue(J,!0),(J)=>{this.eInput.value=J},z)}setValueOrInputValue(z,J,Q){if(I(Q)){let Z=this.isScientificNotation(Q);if(Z&&this.eInput.validity.valid)return z(Q);if(!Z){Q=this.adjustPrecision(Q);let $=this.normalizeValue(Q);Z=Q!=$}if(Z)return J(Q)}return z(Q)}getValue(z=!1){let J=this.eInput;if(!J.validity.valid&&!z)return;let Q=J.value;if(this.isScientificNotation(Q))return this.adjustPrecision(Q,!0);return super.getValue()}isScientificNotation(z){return typeof z==="string"&&z.includes("e")}};var MM=".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)}}",DM="ag-active-item",RM=(z,J)=>({tag:"div",cls:`ag-list-item ag-${z}-list-item`,attrs:{role:"option"},children:[{tag:"span",cls:`ag-list-item-text ag-${z}-list-item-text`,ref:"eText",children:J}]}),AM=class extends v0{constructor(z,J,Q){super(RM(z,J));this.label=J,this.value=Q,this.eText=P}postConstruct(){this.createTooltip(),this.addEventListeners()}setHighlighted(z){let J=this.getGui();J.classList.toggle(DM,z),GJ(J,z),this.dispatchLocalEvent({type:"itemHighlighted",highlighted:z})}getHeight(){return this.getGui().clientHeight}setIndex(z,J){let Q=this.getGui();u2(Q,z),h2(Q,J)}createTooltip(){let z={getTooltipValue:()=>this.label,getGui:()=>this.getGui(),getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>D9(this.eText)},J=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("highlightTooltipFeature",!1,z,this));if(J)this.tooltipFeature=J}addEventListeners(){let z=this.getParentComponent();if(!z)return;this.addGuiEventListener("mouseover",()=>{z.highlightItem(this)}),this.addGuiEventListener("mousedown",(J)=>{J.preventDefault(),J.stopPropagation(),z.setValue(this.value)})}},jM=class extends v0{constructor(z="default"){super({tag:"div",cls:`ag-list ag-${z}-list`});this.cssIdentifier=z,this.options=[],this.listItems=[],this.highlightedItem=null,this.registerCSS(MM)}postConstruct(){let z=this.getGui();this.addManagedElementListeners(z,{mouseleave:()=>this.clearHighlighted()})}handleKeyDown(z){let J=z.key;switch(J){case R.ENTER:if(!this.highlightedItem)this.setValue(this.getValue());else{let Q=this.listItems.indexOf(this.highlightedItem);this.setValueByIndex(Q)}break;case R.DOWN:case R.UP:z.preventDefault(),this.navigate(J);break;case R.PAGE_DOWN:case R.PAGE_UP:case R.PAGE_HOME:case R.PAGE_END:z.preventDefault(),this.navigateToPage(J);break}}addOptions(z){for(let J of z)this.addOption(J);return this}addOption(z){let{value:J,text:Q}=z,Z=Q??J;return this.options.push({value:J,text:Z}),this.renderOption(J,Z),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0);for(let z of this.listItems)z.destroy();J0(this.getGui()),this.listItems=[],this.refreshAriaRole()}updateOptions(z){let J=this.options!==z;if(J)this.clearOptions(),this.addOptions(z);return J}setValue(z,J){if(this.value===z)return this.fireItemSelected(),this;if(z==null)return this.reset(J),this;let Q=this.options.findIndex((Z)=>Z.value===z);if(Q!==-1){let Z=this.options[Q];if(this.value=Z.value,this.displayValue=Z.text,this.highlightItem(this.listItems[Q]),!J)this.fireChangeEvent()}return this}setValueByIndex(z){return this.setValue(this.options[z].value)}getValue(){return this.value}getDisplayValue(){return this.displayValue}refreshHighlighted(){this.clearHighlighted();let z=this.options.findIndex((J)=>J.value===this.value);if(z!==-1)this.highlightItem(this.listItems[z])}highlightItem(z){let J=z.getGui();if(!B0(J))return;this.clearHighlighted(),z.setHighlighted(!0),this.highlightedItem=z;let Q=this.getGui(),{scrollTop:Z,clientHeight:$}=Q,{offsetTop:X,offsetHeight:Y}=J;if(X+Y>Z+$||X<Z)J.scrollIntoView({block:"nearest"})}hideItemTooltip(){this.highlightedItem?.tooltipFeature?.attemptToHideTooltip()}destroy(){this.hideItemTooltip(),super.destroy()}reset(z){if(this.value=null,this.displayValue=null,this.clearHighlighted(),!z)this.fireChangeEvent()}clearHighlighted(){this.highlightedItem?.setHighlighted(!1),this.highlightedItem=null}renderOption(z,J){let Q=new AM(this.cssIdentifier,J,z);Q.setParentComponent(this);let Z=this.createManagedBean(Q);this.listItems.push(Z),this.getGui().appendChild(Z.getGui())}navigate(z){let J=z===R.DOWN,Q,{listItems:Z,highlightedItem:$}=this;if(!$)Q=J?Z[0]:N(Z);else{let Y=Z.indexOf($)+(J?1:-1);Y=Math.min(Math.max(Y,0),Z.length-1),Q=Z[Y]}this.highlightItem(Q)}navigateToPage(z){let{listItems:J,highlightedItem:Q}=this;if(!Q||J.length===0)return;let Z=J.indexOf(Q),$=this.options.length-1,X=J[0].getHeight(),Y=Math.floor(this.getGui().clientHeight/X),U=-1;if(z===R.PAGE_HOME)U=0;else if(z===R.PAGE_END)U=$;else if(z===R.PAGE_DOWN)U=Math.min(Z+Y,$);else if(z===R.PAGE_UP)U=Math.max(Z-Y,0);if(U===-1)return;this.highlightItem(J[U])}refreshAriaRole(){H0(this.getGui(),this.options.length===0?"presentation":"listbox")}updateIndices(){this.refreshAriaRole();let z=this.listItems,J=z.length;z.forEach((Q,Z)=>{Q.setIndex(Z+1,J)})}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}},VM=".ag-picker-field-display{flex:1 1 auto}.ag-picker-field{align-items:center;display:flex}.ag-picker-field-icon{border:0;cursor:pointer;display:flex;margin:0;padding:0}.ag-picker-field-wrapper{background-color:var(--ag-picker-button-background-color);border:var(--ag-picker-button-border);border-radius:5px;min-height:max(var(--ag-list-item-height),calc(var(--ag-spacing)*4));overflow:hidden;&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}}.ag-picker-field-wrapper:where(.ag-picker-has-focus),.ag-picker-field-wrapper:where(:focus-within){background-color:var(--ag-picker-button-focus-background-color);border:var(--ag-picker-button-focus-border);box-shadow:var(--ag-focus-shadow);&:where(.invalid){box-shadow:var(--ag-focus-error-shadow)}}.ag-picker-field-wrapper:disabled{opacity:.5}",OM={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"}}]}]},PM=class extends $X{constructor(z){super(z,z?.template||OM,z?.agComponents||[],z?.className);if(this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=P,this.eWrapper=P,this.eDisplayField=P,this.eIcon=P,this.registerCSS(VM),this.ariaRole=z?.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!z)return;let{pickerGap:J,maxPickerHeight:Q,variableWidth:Z,minPickerWidth:$,maxPickerWidth:X}=z;if(J!=null)this.pickerGap=J;if(this.variableWidth=!!Z,Q!=null)this.setPickerMaxHeight(Q);if($!=null)this.setPickerMinWidth($);if(X!=null)this.setPickerMaxWidth(X)}postConstruct(){super.postConstruct(),this.setupAria();let z=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute("id",z);let J=this.getAriaElement();this.addManagedElementListeners(J,{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:Q,inputWidth:Z}=this.config;if(Q){let $=this.beans.iconSvc.createIconNoSpan(Q);if($)this.eIcon.appendChild($)}if(Z!=null)this.setInputWidth(Z)}setupAria(){let z=this.getAriaElement();if(z.setAttribute("tabindex",this.gos.get("tabIndex").toString()),S0(z,!1),this.ariaRole)H0(z,this.ariaRole)}onLabelOrWrapperMouseDown(z){if(z){let J=this.getFocusableElement();if(J!==this.eWrapper&&z?.target===J)return;z.preventDefault(),this.getFocusableElement().focus()}if(this.skipClick){this.skipClick=!1;return}if(this.isDisabled())return;if(this.isPickerDisplayed)this.hidePicker();else this.showPicker()}onKeyDown(z){switch(z.key){case R.UP:case R.DOWN:case R.ENTER:case R.SPACE:z.preventDefault(),this.onLabelOrWrapperMouseDown();break;case R.ESCAPE:if(this.isPickerDisplayed){if(z.preventDefault(),z.stopPropagation(),this.hideCurrentPicker)this.hideCurrentPicker()}break}}showPicker(){if(this.isPickerDisplayed=!0,!this.pickerComponent)this.pickerComponent=this.createPickerComponent();let z=this.pickerComponent.getGui();z.addEventListener("focusin",this.onPickerFocusIn),z.addEventListener("focusout",this.onPickerFocusOut),this.hideCurrentPicker=this.renderAndPositionPicker(),this.toggleExpandedStyles(!0)}renderAndPositionPicker(){let z=this.pickerComponent.getGui();if(!this.gos.get("suppressScrollWhenPopupsAreOpen"))[this.destroyMouseWheelFunc]=this.addManagedEventListeners({bodyScroll:()=>{this.hidePicker()}});let J=this.getLocaleTextFunc(),{config:{pickerAriaLabelKey:Q,pickerAriaLabelValue:Z,modalPicker:$=!0},maxPickerHeight:X,minPickerWidth:Y,maxPickerWidth:U,variableWidth:_,beans:H,eWrapper:G}=this,W={modal:$,eChild:z,closeOnEsc:!0,closedCallback:()=>{let K=Tz(H);if(this.beforeHidePicker(),K&&this.isAlive())this.getFocusableElement().focus()},ariaLabel:J(Q,Z),anchorToElement:G};z.style.position="absolute";let q=H.popupSvc,B=q.addPopup(W);if(_){if(Y)z.style.minWidth=Y;if(z.style.width=wZ(u6(G)),U)z.style.maxWidth=U}else p6(z,U??u6(G));let E=X??`${m2(q.getPopupParent())}px`;return z.style.setProperty("max-height",E),this.alignPickerToComponent(),B.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;let{pickerGap:z,config:{pickerType:J},beans:{popupSvc:Q,gos:Z},eWrapper:$,pickerComponent:X}=this,Y=Z.get("enableRtl")?"right":"left";Q.positionPopupByComponent({type:J,eventSource:$,ePopup:X.getGui(),position:"under",alignSide:Y,keepWithinBounds:!0,nudgeY:z})}beforeHidePicker(){if(this.destroyMouseWheelFunc)this.destroyMouseWheelFunc(),this.destroyMouseWheelFunc=void 0;this.toggleExpandedStyles(!1);let z=this.pickerComponent.getGui();z.removeEventListener("focusin",this.onPickerFocusIn),z.removeEventListener("focusout",this.onPickerFocusOut),this.isPickerDisplayed=!1,this.pickerComponent=void 0,this.hideCurrentPicker=null}toggleExpandedStyles(z){if(!this.isAlive())return;let J=this.getAriaElement();S0(J,z);let Q=this.eWrapper.classList;Q.toggle("ag-picker-expanded",z),Q.toggle("ag-picker-collapsed",!z)}onPickerFocusIn(){this.togglePickerHasFocus(!0)}onPickerFocusOut(z){if(!this.pickerComponent?.getGui().contains(z.relatedTarget))this.togglePickerHasFocus(!1)}togglePickerHasFocus(z){if(!this.pickerComponent)return;this.eWrapper.classList.toggle("ag-picker-has-focus",z)}hidePicker(){if(this.hideCurrentPicker)this.hideCurrentPicker(),this.dispatchLocalEvent({type:"pickerHidden"})}setInputWidth(z){return p6(this.eWrapper,z),this}getFocusableElement(){return this.eWrapper}setPickerGap(z){return this.pickerGap=z,this}setPickerMinWidth(z){if(typeof z==="number")z=`${z}px`;return this.minPickerWidth=z==null?void 0:z,this}setPickerMaxWidth(z){if(typeof z==="number")z=`${z}px`;return this.maxPickerWidth=z==null?void 0:z,this}setPickerMaxHeight(z){if(typeof z==="number")z=`${z}px`;return this.maxPickerHeight=z==null?void 0:z,this}destroy(){this.hidePicker(),super.destroy()}},TM=".ag-select{align-items:center;display:flex;&.ag-disabled{opacity:.5}}.ag-select:where(:not(.ag-cell-editor,.ag-label-align-top)){min-height:var(--ag-list-item-height)}:where(.ag-select){.ag-picker-field-wrapper{cursor:default;padding-left:var(--ag-spacing);padding-right:var(--ag-spacing)}&.ag-disabled .ag-picker-field-wrapper:focus{box-shadow:none}.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-picker-field-icon{align-items:center;display:flex}}.ag-select-list{background-color:var(--ag-picker-list-background-color);border:var(--ag-picker-list-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);overflow:hidden auto}.ag-select-list-item{cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none}:where(.ag-ltr) .ag-select-list-item{padding-left:var(--ag-spacing)}:where(.ag-rtl) .ag-select-list-item{padding-right:var(--ag-spacing)}.ag-select-list-item-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}",SM=class extends PM{constructor(z){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...z});this.registerCSS(TM)}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:g1(()=>this.eDisplayField),getGui:()=>this.getGui()})),super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");let{options:z,value:J,placeholder:Q}=this.config;if(z!=null)this.addOptions(z);if(J!=null)this.setValue(J,!0);if(Q&&J==null)this.eDisplayField.textContent=Q;this.addManagedElementListeners(this.eWrapper,{focusout:this.onWrapperFocusOut.bind(this)})}onWrapperFocusOut(z){if(!this.eWrapper.contains(z.relatedTarget))this.hidePicker()}createListComponent(){let z=this.createBean(new jM("select"));this.listComponent=z,z.setParentComponent(this);let J=z.getAriaElement(),Q=`ag-select-list-${z.getCompId()}`;J.setAttribute("id",Q),kZ(this.getAriaElement(),J),z.addManagedElementListeners(z.getGui(),{mousedown:(Z)=>{Z?.preventDefault()}}),z.addManagedListeners(z,{selectedItem:()=>{this.hidePicker(),this.dispatchLocalEvent({type:"selectedItem"})},fieldValueChanged:()=>{if(!this.listComponent)return;this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker()}})}createPickerComponent(){return this.listComponent}beforeHidePicker(){this.listComponent?.hideItemTooltip(),super.beforeHidePicker()}onKeyDown(z){let{key:J}=z;if(J===R.TAB)this.hidePicker();switch(J){case R.ENTER:case R.UP:case R.DOWN:case R.PAGE_UP:case R.PAGE_DOWN:case R.PAGE_HOME:case R.PAGE_END:if(z.preventDefault(),this.isPickerDisplayed)this.listComponent?.handleKeyDown(z);else super.onKeyDown(z);break;case R.ESCAPE:super.onKeyDown(z);break;case R.SPACE:if(this.isPickerDisplayed)z.preventDefault();else super.onKeyDown(z);break}}showPicker(){let z=this.listComponent;if(!z)return;super.showPicker(),z.refreshHighlighted()}addOptions(z){for(let J of z)this.addOption(J);return this}addOption(z){return this.listComponent.addOption(z),this}clearOptions(){return this.listComponent?.clearOptions(),this.setValue(void 0,!0),this}updateOptions(z){if(this.listComponent?.updateOptions(z))this.setValue(void 0,!0);return this}setValue(z,J,Q){let{listComponent:Z,config:{placeholder:$},eDisplayField:X,tooltipFeature:Y}=this;if(this.value===z||!Z)return this;if(!Q)Z.setValue(z,!0);if(Z.getValue()===this.getValue())return this;let _=Z.getDisplayValue();if(_==null&&$)_=$;return X.textContent=_,Y?.setTooltipAndRefresh(_??null),super.setValue(z,J)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}};var IM={tag:"ag-input-text-field",ref:"eEditor",cls:"ag-cell-editor"},fM=class{constructor(z){this.getLocaleTextFunc=z,this.cachedRaw=this}getTemplate(){return IM}getAgComponents(){return[Yz]}init(z,J){this.eEditor=z,this.params=J;let Q=J.maxLength;if(Q!=null)z.setMaxLength(Q)}getValidationErrors(){let{params:z}=this,{maxLength:J,getValidationErrors:Q}=z,Z=this.getValue(),$=this.getLocaleTextFunc(),X=[];if(J!=null&&typeof Z==="string"&&Z.length>J)X.push($("maxLengthValidation",`Must be ${J} characters or fewer.`,[String(J)]));if(!X.length)X=null;if(Q)return Q({value:Z,cellEditorParams:z,internalErrors:X});return X}getValue(){let{eEditor:z,params:J}=this,Q=z.getValue();if(!I(Q)&&!I(J.value))return J.value;if(Object.is(this.cachedRaw,Q))return this.cachedParsed;let Z=J.parseValue(Q);return this.cachedRaw=Q,this.cachedParsed=Z,Z}getStartValue(){let z=this.params;return z.useFormatter||z.column.getColDef().refData?z.formatValue(z.value):z.value}setCaret(){if(fz())this.eEditor.getInputElement().focus({preventScroll:!0});let z=this.eEditor,J=z.getValue(),Q=I(J)&&J.length||0;if(Q)z.getInputElement().setSelectionRange(Q,Q)}},r8=class extends LM{constructor(){super(new fM(()=>this.getLocaleTextFunc()))}};function kM(z,J){return z.editModelSvc?.getEditRowDataValue(J,{checkSiblings:!0})}function CM(z){let J=z.editModelSvc?.getEditMap(),Q=[];return J?.forEach((Z,$)=>{let{rowIndex:X,rowPinned:Y}=$;Z.forEach((U,_)=>{let{editorValue:H,pendingValue:G,sourceValue:W,state:q}=U,B=V4(U),E=H??G;if(E===C0)E=void 0;let K={newValue:E,oldValue:W,state:q,column:_,colId:_.getColId(),colKey:_.getColId(),rowIndex:X,rowPinned:Y},F=q==="editing";if(F||!F&&B)Q.push(K)})}),Q}function vM(z,J=!1){let{editSvc:Q}=z;if(Q?.isBatchEditing()){if(J){for(let Z of z.editModelSvc?.getEditPositions()??[])if(Z.state==="editing")Q.revertSingleCellEdit(Z)}else Mz(z,{persist:!0});Fz(z,void 0,{cancel:J})}else Q?.stopEditing(void 0,{cancel:J,source:"edit",forceStop:!J,forceCancel:J})}function NM(z,J){let Q=l(z,J);return!!z.editSvc?.isEditing(Q)}function wM(z,J){let{key:Q,colKey:Z,rowIndex:$,rowPinned:X}=J,{editSvc:Y,colModel:U}=z,_=U.getCol(Z);if(!_){V(12,{colKey:Z});return}let G=j0(z,{rowIndex:$,rowPinned:X||null,column:_});if(!G){V(290,{rowIndex:$,rowPinned:X});return}if(!Y?.isCellEditable({rowNode:G,column:_},"api"))return;if(X==null)TL(z,$);PL(z,Z),Y?.startEditing({rowNode:G,column:_},{event:Q?new KeyboardEvent("keydown",{key:Q}):void 0,source:"api",editable:!0})}function yM(z){return z.editSvc?.validateEdit()||null}var xM={tag:"div",cls:"ag-popup-editor",attrs:{tabindex:"-1"}},bM=class extends Z5{constructor(z){super(xM);this.params=z}postConstruct(){J1(this.gos,this.getGui(),"popupEditorWrapper",!0),this.addKeyDownListener()}addKeyDownListener(){let z=this.getGui(),J=this.params,Q=(Z)=>{if(!_Z(this.gos,Z,J.node,J.column,!0))J.onKeyDown(Z)};this.addManagedElementListeners(z,{keydown:Q})}};function gM(z,{column:J},Q,Z,$="ui"){if(Q instanceof KeyboardEvent&&(Q.key===R.TAB||Q.key===R.ENTER||Q.key===R.F2||Q.key===R.BACKSPACE&&Z))return!0;if(Q?.shiftKey&&z.rangeSvc?.getCellRanges().length!=0)return!1;let Y=J?.getColDef(),U=hM(z.gos,Y),_=Q?.type;if(_==="click"&&Q?.detail===1&&U===1)return!0;if(_==="dblclick"&&Q?.detail===2&&U===2)return!0;if($==="api")return!!Z;return!1}function hM(z,J){if(z.get("suppressClickEdit")===!0)return 0;if(z.get("singleClickEdit")===!0)return 1;if(J?.singleClickEdit)return 1;return 2}function nQ(z,J){return z.editModelSvc?.hasEdits(J,{withOpenEditor:!0})??!1}function MZ(z,J){let{column:Q,rowNode:Z}=J,$=Q.getColDef();if(!Z)return nQ(z,J);let X=$.editable;if(Z.group&&$.groupRowEditable!=null){if(z.rowGroupingEditValueSvc?.isGroupCellEditable(Z,Q))return!0;return nQ(z,J)}if(Q.isColumnFunc(Z,X))return!0;return nQ(z,J)}function uM(z,J,Q="ui"){let Z=MZ(z,J);if(Z||Q==="ui")return Z;let{rowNode:$,column:X}=J;for(let Y of z.colModel.getCols())if(Y!==X&&MZ(z,{rowNode:$,column:Y}))return!0;return!1}var ZJ=(z,J=!1)=>{if(z!==void 0)return V4(z)||J&&z.state==="editing"};function mX(z,J,Q=!1){return ZJ(z.editModelSvc?.getEdit(J),Q)}var cX=(z,J,Q)=>{if(!z)return;for(let Z=0,$=z.length;Z<$;++Z){let X=z[Z];if(X.data){if(ZJ(J?.getEdit({rowNode:X,column:Q}))||ZJ(J?.getEdit({rowNode:X.pinnedSibling,column:Q})))return!0}if(cX(X.childrenAfterGroup,J,Q))return!0}};function pX(z,J){let{column:Q,rowNode:Z}=J;if(z.gos.get("groupTotalRow")&&!Z?.footer)return!1;return cX(Z?.childrenAfterGroup,z.editModelSvc,Q)}function iX(z,{rowNode:J,column:Q}){if(J=J.pinnedSibling,!J)return;return ZJ(z.editModelSvc?.getEdit({rowNode:J,column:Q}))}var mM=class extends j{constructor(z,J){super();this.cellCtrl=z,this.beans=J,this.editSvc=J.editSvc,this.editModelSvc=J.editModelSvc}setComp(z){this.cellComp=z,this.applyCellStyles()}applyCellStyles(){let{cellCtrl:z,editSvc:J,beans:Q}=this;if(J?.isBatchEditing()&&J.isEditing()){let $=mX(Q,z)||pX(Q,z)||iX(Q,z);this.applyBatchingStyle($)}else this.applyBatchingStyle(!1);let Z=!!this.editModelSvc?.getCellValidationModel().hasCellValidation(this.cellCtrl);this.cellComp.toggleCss("ag-cell-editing-error",Z)}applyBatchingStyle(z){this.cellComp.toggleCss("ag-cell-editing",z??!1),this.cellComp.toggleCss("ag-cell-batch-edit",(z&&this.editSvc?.isBatchEditing())??!1)}},cM=class extends j{constructor(z,J){super();this.rowCtrl=z,this.beans=J,this.gos=J.gos,this.editSvc=J.editSvc,this.editModelSvc=J.editModelSvc}applyRowStyles(){let{rowCtrl:z,editModelSvc:J,beans:Q}=this,Z=z.rowNode,$=J?.getEditRow(Z),X=this.editModelSvc?.getRowValidationModel().hasRowValidation({rowNode:Z});if(!$&&Z.pinnedSibling)Z=Z.pinnedSibling,$=J?.getEditRow(Z);if($){let Y=Array.from($.keys()).some((U)=>{let _={rowNode:Z,column:U};return mX(Q,_,!0)||pX(Q,_)||iX(Q,_)});this.applyStyle(X,Y);return}this.applyStyle(X)}applyStyle(z=!1,J=!1){let Q=!!this.editSvc?.isBatchEditing(),Z=this.gos.get("editType")==="fullRow";this.rowCtrl?.forEachGui(void 0,({rowComp:$})=>{$.toggleCss("ag-row-editing",Z&&J),$.toggleCss("ag-row-batch-edit",Z&&J&&Q),$.toggleCss("ag-row-inline-editing",J),$.toggleCss("ag-row-not-inline-editing",!J),$.toggleCss("ag-row-editing-invalid",Z&&J&&z)})}},pM=({rowModel:z,pinnedRowModel:J,editModelSvc:Q},Z)=>{let $=new Set;z.forEachNode((X)=>Z.has(X)&&$.add(X)),J?.forEachPinnedRow("top",(X)=>Z.has(X)&&$.add(X)),J?.forEachPinnedRow("bottom",(X)=>Z.has(X)&&$.add(X));for(let X of Z)if(!$.has(X))Q.removeEdits({rowNode:X});return $},iM=({editModelSvc:z},J,Q)=>{for(let Z of J)z?.getEditRow(Z)?.forEach(($,X)=>!Q.has(X)&&z.removeEdits({rowNode:Z,column:X}))},dM=(z)=>()=>{let J=new Set(z.colModel.getCols()),Q=z.editModelSvc.getEditMap(!0),Z=new Set(Q.keys());iM(z,pM(z,Z),J)},nM=new Set(["undo","redo","paste","bulk","rangeSvc"]),rM=new Set(["ui","api"]),dX={paste:"api",rangeSvc:"api",fillHandle:"api",cellClear:"api",bulk:"api"},tM=new Set(Object.keys(dX)),sM=new Set(["paste","rangeSvc","cellClear","redo","undo"]),rQ={cancel:!0,source:"api"},lM={cancel:!1,source:"api"},nz={checkSiblings:!0},Bz={force:!0,suppressFlash:!0},aM={force:!0},oM=class extends j{constructor(){super(...arguments);this.beanName="editSvc",this.committing=!1,this.batch=!1,this.batchStartDispatched=!1,this.stopping=!1,this.rangeSelectionWhileEditing=0}postConstruct(){let{beans:z}=this;this.model=z.editModelSvc,this.valueSvc=z.valueSvc,this.rangeSvc=z.rangeSvc,this.addManagedPropertyListener("editType",({currentValue:Z})=>{this.stopEditing(void 0,rQ),this.createStrategy(Z)});let J=dM(z),Q=()=>{let Z=this.model.getCellValidationModel().getCellValidationMap().size>0,$=this.model.getRowValidationModel().getRowValidationMap().size>0;if(Z||$)this.stopEditing(void 0,rQ);else if(this.isEditing())if(this.batch)Fz(z,this.model.getEditPositions());else this.stopEditing(void 0,lM);return!1};this.addManagedEventListeners({columnPinned:J,columnVisible:J,columnRowGroupChanged:J,rowExpansionStateChanged:J,pinnedRowsChanged:J,displayedRowsChanged:J,sortChanged:Q,filterChanged:Q,cellFocused:this.onCellFocused.bind(this)})}isBatchEditing(){return this.batch}startBatchEditing(){if(this.batch)return;this.batch=!0,this.batchStartDispatched=!1,this.stopEditing(void 0,rQ)}stopBatchEditing(z){if(!this.batch)return;if(z)this.stopEditing(void 0,z);if(this.batchStartDispatched)this.dispatchBatchStopped(new Map,!1);this.batch=!1,this.batchStartDispatched=!1}ensureBatchStarted(){if(!this.batch||this.batchStartDispatched)return;this.batchStartDispatched=!0,this.dispatchBatchEvent("batchEditingStarted",new Map)}createStrategy(z){let{beans:J,gos:Q,strategy:Z}=this,$=t8(Q,z);if(Z){if(Z.beanName===$)return Z;this.destroyStrategy()}return this.strategy=this.createOptionalManagedBean(J.registry.createDynamicBean($,!0))}destroyStrategy(){if(!this.strategy)return;this.strategy.destroy(),this.strategy=this.destroyBean(this.strategy)}shouldStartEditing(z,J,Q,Z="ui"){let $=gM(this.beans,z,J,Q,Z);if($)this.strategy??(this.strategy=this.createStrategy());return $}shouldStopEditing(z,J,Q="ui"){return this.strategy?.shouldStop(z,J,Q)??null}shouldCancelEditing(z,J,Q="ui"){return this.strategy?.shouldCancel(z,J,Q)??null}validateEdit(){return zF(this.beans)}isEditing(z,J){return this.model.hasEdits(z??void 0,J??nz)}isRowEditing(z,J){return!!z&&this.model.hasRowEdits(z,J)}enableRangeSelectionWhileEditing(){if(this.beans.rangeSvc&&this.gos.get("cellSelection"))this.rangeSelectionWhileEditing++}disableRangeSelectionWhileEditing(){this.rangeSelectionWhileEditing=Math.max(0,this.rangeSelectionWhileEditing-1)}isRangeSelectionEnabledWhileEditing(){return this.rangeSelectionWhileEditing>0}startEditing(z,J){let{startedEdit:Q=!0,event:Z=null,source:$="ui",ignoreEventKey:X=!1,silent:Y}=J;if(this.strategy??(this.strategy=this.createStrategy()),!(J.editable??this.isCellEditable(z,"api")))return;let _=l(this.beans,z);if(_&&!_.comp){J.editable=void 0,_.onCompAttachedFuncs.push(()=>this.startEditing(z,J));return}let H=this.shouldStartEditing(z,Z,Q,$);if(H===!1&&$!=="api"){if(this.isEditing(z))this.stopEditing();return}if(!this.batch&&this.shouldStopEditing(z,void 0,$)&&!J.continueEditing)this.stopEditing(void 0,{source:$});if(H)this.ensureBatchStarted();this.strategy.start({position:z,event:Z,source:$,ignoreEventKey:X,startedEdit:Q,silent:Y})}stopEditing(z,J){let Q=this.prepareStopContext(z,J);if(!Q)return!1;this.stopping=!0;let Z=!1;try{let $=this.processStopRequest(Q);return Z||(Z=$.res),this.finishStopEditing({...Q,edits:$.edits,params:J,position:z,res:Z}),Z}finally{this.rangeSelectionWhileEditing=0,this.stopping=!1}}prepareStopContext(z,J){let{event:Q=null,cancel:Z=!1,source:$="ui",forceCancel:X=!1,forceStop:Y=!1,commit:U=!1}=J||{};if(tM.has($)&&this.batch){if(z?.rowNode&&z?.column)this.bulkRefreshCell(z);return null}let _=this.committing?dX[$]:$;if(!(this.committing||this.isEditing(z)||this.batch&&this.model.hasEdits(z,nz))||!this.strategy||this.stopping)return null;let G=l(this.beans,z);if(G)G.onEditorAttachedFuncs=[];let W=!Z&&(!!this.shouldStopEditing(z,Q,_)||(this.committing||$==="paste")&&!this.batch)||Y,q=Z&&!!this.shouldCancelEditing(z,Q,_)||X;return{cancel:Z,cellCtrl:G,edits:this.model.getEditMap(!0),event:Q??null,forceCancel:X,forceStop:Y,commit:U,position:z,source:$,treatAsSource:_,willCancel:q,willStop:W}}processStopRequest(z){let{event:J,position:Q,willCancel:Z,willStop:$}=z;if($||Z)return this.handleStopOrCancel(z);if(this.shouldHandleMidBatchKey(J,Q))return{res:!1,edits:this.handleMidBatchKey(J,Q,z)};if(Mz(this.beans,{persist:!0}),this.batch)this.strategy?.cleanupEditors(Q);return{res:!1,edits:this.model.getEditMap()}}handleStopOrCancel(z){let{beans:J,model:Q}=this,{cancel:Z,commit:$,edits:X,event:Y,source:U,willCancel:_,willStop:H}=z,G=!this.batch||!_;Mz(J,{persist:G,isCancelling:_||Z,isStopping:H});let W=Q.getEditMap(),B=!_&&(!this.batch||$)?this.processEdits(W,U):[];if(Z)this.strategy?.stopCancelled(z.forceCancel);else this.strategy?.stopCommitted(Y,$);this.clearValidationIfNoOpenEditors();for(let E of B)Q.clearEditValue(E);this.bulkRefreshMap(X);for(let E of Q.getEditPositions(W)){let K=l(J,E),F=V4(E);K?.refreshCell({force:!0,suppressFlash:!F})}return{res:H,edits:W}}shouldHandleMidBatchKey(z,J){return z instanceof KeyboardEvent&&this.batch&&!!this.strategy?.midBatchInputsAllowed(J)&&this.isEditing(J,{withOpenEditor:!0})}handleMidBatchKey(z,J,Q){let{beans:Z,model:$}=this,{cellCtrl:X,edits:Y}=Q,{key:U}=z,_=U===R.ENTER,H=U===R.ESCAPE,G=U===R.TAB;if(_||G||H){if(_||G)Mz(Z,{persist:!0});else if(H&&X){let{rowNode:W,column:q}=X;if(this.batch&&W&&q){let B={rowNode:W,column:q};Fz(Z,[B],{silent:!0}),this.model.stop(B,!0,!0),l(Z,B)?.refreshCell(Bz)}else this.revertSingleCellEdit(X)}if(this.batch)this.strategy?.cleanupEditors();else Fz(Z,$.getEditPositions(),{event:z,cancel:H});return z.preventDefault(),this.bulkRefreshMap(Y,{suppressFlash:!0}),$.getEditMap()}return Y}finishStopEditing({cellCtrl:z,edits:J,params:Q,position:Z,res:$,commit:X,forceCancel:Y,willCancel:U,willStop:_}){let H=this.beans;if($&&Z){if(!this.batch||X)this.model.removeEdits(Z)}this.navigateAfterEdit(Q,z?.cellPosition),M2(H),this.clearValidationIfNoOpenEditors();let{rowRenderer:G,formula:W}=H;if(U)G.refreshRows({rowNodes:Array.from(J.keys())});if(this.batch){if(W)W.refreshFormulas(!0);else G.refreshRows({suppressFlash:!0,force:!0});let q=_&&X;if(q||U&&Y)this.dispatchBatchStopped(J,q)}}dispatchBatchStopped(z,J){let Q;if(J){if(Q=nK(z),Q.size>0)this.ensureBatchStarted()}if(this.batchStartDispatched)this.batchStartDispatched=!1,this.dispatchBatchEvent("batchEditingStopped",Q??new Map)}clearValidationIfNoOpenEditors(){if(!this.model.hasEdits(void 0,{withOpenEditor:!0}))this.model.getCellValidationModel().clearCellValidationMap(),this.model.getRowValidationModel().clearRowValidationMap()}navigateAfterEdit(z,J){if(!z||!J)return;let{event:Q,suppressNavigateAfterEdit:Z}=z;if(!(Q instanceof KeyboardEvent)||Z)return;let{key:X,shiftKey:Y}=Q,U=this.gos.get("enterNavigatesVerticallyAfterEdit");if(X!==R.ENTER||!U)return;let _=Y?R.UP:R.DOWN;this.beans.navigation?.navigateToNextCell(null,_,J,!1)}processEdits(z,J){let Q=Array.from(z.keys()),Z=this.model.getCellValidationModel().getCellValidationMap().size>0||this.model.getRowValidationModel().getRowValidationMap().size>0,$=[],{changeDetectionSvc:X}=this.beans;X?.beginDeferred();try{for(let Y of Q){let U=z.get(Y);for(let _ of U.keys()){let H=U.get(_),G={rowNode:Y,column:_};if(V4(H)&&!Z){let W=l(this.beans,G);if(!this.setNodeDataValue(Y,_,H.pendingValue,W,J))$.push(G)}}}}finally{X?.endDeferred()}return $}setNodeDataValue(z,J,Q,Z,$="edit"){let X=rM.has($)?"edit":$;if(Z)Z.suppressRefreshCell=!0;this.committing=!0;try{return z.setDataValue(J,Q,X)}finally{if(this.committing=!1,Z)Z.suppressRefreshCell=!1}}syncEditAfterCommit(z,J){let Q=this.model.getEdit(z);if(Q&&Q.state!=="editing")if(J)this.beans.editModelSvc?.setEdit(z,{sourceValue:Q.pendingValue});else this.model.clearEditValue(z)}setEditMap(z,J){this.strategy??(this.strategy=this.createStrategy()),this.strategy?.setEditMap(z,J),this.bulkRefreshMap(z);let Q=Bz;if(J?.forceRefreshOfEditCellsOnly)Q={...eM(z),...Bz};this.beans.rowRenderer.refreshCells(Q)}dispatchEditValuesChanged({rowNode:z,column:J},Q={}){if(!z||!J||!Q)return;let{pendingValue:Z,sourceValue:$}=Q,{rowIndex:X,rowPinned:Y,data:U}=z;this.beans.eventSvc.dispatchEvent({type:"cellEditValuesChanged",node:z,rowIndex:X,rowPinned:Y,column:J,source:"api",data:U,newValue:Z,oldValue:$,value:Z,colDef:J.getColDef()})}bulkRefreshCell(z,J){if(o(this.gos,this.beans.rowModel))this.refCell(z,this.model.getEdit(z),J)}bulkRefreshMap(z,J){if(o(this.gos,this.beans.rowModel))z.forEach((Q,Z)=>{for(let $ of Q.keys())this.refCell({rowNode:Z,column:$},Q.get($),J)})}refCell({rowNode:z,column:J},Q,Z={}){let{beans:$,gos:X}=this,Y=new Set([z]),U=new Set,_=z.pinnedSibling;if(_)Y.add(_);let H=z.sibling;if(H)U.add(H);let G=z.parent;while(G){if(G.sibling?.footer&&X.get("groupTotalRow"))U.add(G.sibling);else if(!G.parent&&G.sibling&&X.get("grandTotalRow"))U.add(G.sibling);else U.add(G);G=G.parent}for(let W of Y)this.dispatchEditValuesChanged({rowNode:W,column:J},Q);for(let W of Y)l($,{rowNode:W,column:J})?.refreshCell(Z);for(let W of U){let q=l($,{rowNode:W,column:J});if(q){if(q.refreshCell(Z),!Z.force&&this.batch)q.editStyleFeature?.applyCellStyles?.()}}}stopAllEditing(z=!1,J="ui"){if(this.isEditing())this.stopEditing(void 0,{cancel:z,source:J})}isCellEditable(z,J="ui"){let{gos:Q,beans:Z}=this,$=z.rowNode;if($.group&&z.column.getColDef().groupRowEditable==null){if(Q.get("treeData")){if(!$.data&&!Q.get("enableGroupEdit"))return!1}else if(!Q.get("enableGroupEdit"))return!1}let X=t8(Q)==="fullRow"?uM(Z,z,J):MZ(Z,z);if(X)this.strategy??(this.strategy=this.createStrategy());return X}cellEditingInvalidCommitBlocks(){return this.gos.get("invalidEditValueMode")==="block"}checkNavWithValidation(z,J,Q=!0){if(this.hasValidationErrors(z)){let Z=l(this.beans,z);if(this.cellEditingInvalidCommitBlocks()){if(J?.preventDefault?.(),Q){if(Z&&!Z.hasBrowserFocus())Z.focusCell();Z?.comp?.getCellEditor()?.focusIn?.()}return"block-stop"}if(Z)this.revertSingleCellEdit(Z);return"revert-continue"}return"continue"}revertSingleCellEdit(z,J=!1){let Q=l(this.beans,z);if(!Q?.comp?.getCellEditor())return;if(Fz(this.beans,[z],{silent:!0}),this.model.clearEditValue(z),$1(this.beans,z,{silent:!0}),jz(this.beans),Q?.refreshCell(Bz),!J)return;Q?.focusCell(),Q?.comp?.getCellEditor()?.focusIn?.()}hasValidationErrors(z){jz(this.beans);let J=l(this.beans,z);if(J)J.refreshCell(Bz),J.rowCtrl.rowEditStyleFeature?.applyRowStyles();let Q=!1;if(z?.rowNode){if(Q||(Q=this.model.getRowValidationModel().hasRowValidation({rowNode:z.rowNode})),z.column)Q||(Q=this.model.getCellValidationModel().hasCellValidation({rowNode:z.rowNode,column:z.column}))}else Q||(Q=this.model.getCellValidationModel().getCellValidationMap().size>0),Q||(Q=this.model.getRowValidationModel().getRowValidationMap().size>0);return Q}moveToNextCell(z,J,Q,Z="ui"){let $,X=this.isEditing(),Y=X&&this.checkNavWithValidation(void 0,Q)==="block-stop";if(z instanceof V2&&X)$=this.strategy?.moveToNextEditingCell(z,J,Q,Z,Y);if($===null)return $;if($=$||!!this.beans.focusSvc.focusedHeader,$===!1&&!Y)this.stopEditing();return $}getPendingEditValue(z,J,Q){if(Q==="batch"&&!this.batch)return;let Z=this.model.getEdit({rowNode:z,column:J},nz);if(!Z)return;if(this.stopping&&!this.batch&&!Z.editorState?.cellStartedEditing)return;if(Q==="edit"){let X=Z.editorValue;if(X!=null&&X!==C0)return X}let $=Z.pendingValue;if($!==C0)return $;return}getCellDataValue(z){let J=this.model.getEdit(z,nz);if(J){let Q=J.pendingValue;if(Q!==C0)return Q;let Z=J.sourceValue;if(Z!=null)return Z}return this.valueSvc.getValue(z.column,z.rowNode,"data")}addStopEditingWhenGridLosesFocus(z){pK(this,this.beans,z)}createPopupEditorWrapper(z){return new bM(z)}batchResetToSourceValue(z){if(!this.batch)return!1;let J=this.model.getEdit(z);if(!J)return!1;let{pendingValue:Q,sourceValue:Z,state:$}=J;if(Q===Z)return!1;if($==="editing")return!1;return this.dispatchEditValuesChanged(z,{...J,pendingValue:Z}),this.beans.editModelSvc?.removeEdits(z),l(this.beans,z)?.refreshCell(Bz),!0}setDataValue(z,J,Q){try{let Z=this.batch,$=this.isEditing(Z?void 0:z);if((!$||this.committing)&&!Z&&!sM.has(Q))return;if(!$&&!Z&&Q==="paste")return;if(Q==="batch"&&!Z)return;if(Q==="edit"){if($&&this.applyEditorValue(z,J))return!0;if(!Z)return}if(this.strategy??(this.strategy=this.createStrategy()),Q==="batch"||Q==="edit")return this.applyDirectValue(z,J,Q);let X=this.beans,Y;if(Z)Y="ui";else if(this.committing)Y=Q??"api";else Y="api";if(!Q||nM.has(Q))return this.applyDirectValue(z,J,Q);let U=this.applyExistingEdit(z,J,Q,Y);if(U!==void 0)return U;return P1(X,z,J,Q,void 0,{persist:!0}),this.ensureBatchStarted(),this.stopEditing(z,{source:Y,suppressNavigateAfterEdit:!0}),!0}finally{this.committing=!1}}applyExistingEdit(z,J,Q,Z){let $=this.model.getEdit(z);if(!$)return;if($.pendingValue===J)return!1;if($.sourceValue!==J)return P1(this.beans,z,J,Q,void 0,{persist:!0}),this.ensureBatchStarted(),this.stopEditing(z,{source:Z,suppressNavigateAfterEdit:!0}),!0;return this.beans.editModelSvc?.removeEdits(z),this.ensureBatchStarted(),this.dispatchEditValuesChanged(z,{...$,pendingValue:J}),!0}applyEditorValue(z,J){let Q=this.beans,Z=l(Q,z),$=Z?.comp?.getCellEditor();if(!Z||!$)return!1;if(P1(Q,z,J,"edit",void 0,{persist:!0}),Z.editStyleFeature?.applyCellStyles?.(),"agSetEditValue"in $)return $.agSetEditValue(J),!0;if($.refresh&&Z.editCompDetails)return $.refresh({...Z.editCompDetails.params,value:J}),!0;if(Z.hasBrowserFocus())Z.onEditorAttachedFuncs.push(()=>{let Y=l(this.beans,z);Y?.focusCell(!0),Y?.comp?.getCellEditor()?.focusIn?.()});return Fz(Q,[z],{silent:!0,cancel:!0}),$1(Q,z,{silent:!0}),jz(Q),l(Q,z)?.refreshCell(Bz),!0}applyDirectValue(z,J,Q){let Z=this.beans;if(this.batch){if(Q==="batch"&&l(Z,z)?.comp?.getCellEditor()){let{editModelSvc:Y,valueSvc:U}=Z,{rowNode:_,column:H}=z;if(Y?.getEdit(z)?.sourceValue===void 0)Y?.setEdit(z,{sourceValue:U.getValue(H,_,"data")});Y?.setEdit(z,{pendingValue:J})}else if(P1(Z,z,J,Q,void 0,{persist:!0}),Q!=="batch")this.cleanupEditors();return M2(Z),this.ensureBatchStarted(),this.bulkRefreshCell(z),!0}P1(Z,z,J,Q,void 0,{persist:!0});let $=l(Z,z),X=this.setNodeDataValue(z.rowNode,z.column,J,$,Q);return this.syncEditAfterCommit(z,X),M2(Z),l(Z,z)?.refreshCell(X?aM:Bz),X}handleColDefChanged(z){tK(this.beans,z)}destroy(){this.model.clear(),this.destroyStrategy(),super.destroy()}prepDetailsDuringBatch(z,J){let{model:Q}=this;if(!this.batch)return;if(!Q.hasRowEdits(z.rowNode,nz))return;let{rowNode:$}=z,{compDetails:X,valueToDisplay:Y}=J;if(X){let{params:U}=X;return U.data=Q.getEditRowDataValue($,nz),{compDetails:X}}return{valueToDisplay:Y}}cleanupEditors(){this.strategy?.cleanupEditors()}dispatchCellEvent(z,J,Q,Z){this.strategy?.dispatchCellEvent(z,J,Q,Z)}dispatchBatchEvent(z,J){this.eventSvc.dispatchEvent(this.createBatchEditEvent(z,J))}createBatchEditEvent(z,J){return v(this.gos,{type:z,...z==="batchEditingStopped"?{changes:this.toEventChangeList(J)}:{}})}toEventChangeList(z){return this.model.getEditPositions(z).map((J)=>({rowIndex:J.rowNode.rowIndex,rowPinned:J.rowNode.rowPinned,columnId:J.column.getColId(),newValue:J.pendingValue,oldValue:J.sourceValue}))}applyBulkEdit({rowNode:z,column:J},Q){if(!Q||Q.length===0)return;let{beans:Z,rangeSvc:$,valueSvc:X}=this,{formula:Y}=Z;Mz(Z,{persist:!0});let U=this.model.getEditMap(!0),_=U.get(z)?.get(J)?.pendingValue,H=!1;if(!this.batch)this.eventSvc.dispatchEvent({type:"bulkEditingStarted"}),H=!0;let G=Y?.isFormula(_)??!1;Q.forEach((q)=>{let B=q.columns.some((E)=>E?.isAllowFormula());if($?.forEachRowInRange(q,(E)=>{let K=j0(Z,E);if(K===void 0)return;let F=U.get(K)??new Map,L=_;for(let M of q.columns){if(!M)continue;let D=!!G&&M.isAllowFormula();if(this.isCellEditable({rowNode:K,column:M},"api")){let A=X.getValue(M,K,"data",!0),O=X.parseValue(M,K??null,L,A);if(Number.isNaN(O))O=null;F.set(M,{editorValue:void 0,pendingValue:O,sourceValue:A,state:"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}if(D)L=Y?.updateFormulaByOffset({value:L,columnDelta:1})}if(F.size>0)U.set(K,F);if(G&&B)_=Y?.updateFormulaByOffset({value:_,rowDelta:1})}),this.setEditMap(U),this.batch){this.cleanupEditors(),M2(Z),this.ensureBatchStarted();return}this.committing=!0;try{this.stopEditing(void 0,{source:"bulk"})}finally{if(this.committing=!1,H)this.eventSvc.dispatchEvent({type:"bulkEditingStopped",changes:this.toEventChangeList(U)})}});let W=l(Z,{rowNode:z,column:J});if(W)W.focusCell(!0)}createCellStyleFeature(z){return new mM(z,this.beans)}createRowStyleFeature(z){return new cM(z,this.beans)}setEditingCells(z,J){let{beans:Q}=this,{colModel:Z,valueSvc:$}=Q,X=new Map;for(let{colId:Y,column:U,colKey:_,rowIndex:H,rowPinned:G,newValue:W,state:q}of z){let B=Y?Z.getCol(Y):_?Z.getCol(_):U;if(!B)continue;let E=j0(Q,{rowIndex:H,rowPinned:G});if(!E)continue;let K=$.getValue(B,E,"data",!0);if(!J?.forceRefreshOfEditCellsOnly&&!V4({pendingValue:W,sourceValue:K})&&q!=="editing")continue;let F=X.get(E);if(!F)F=new Map,X.set(E,F);if(W===void 0)W=C0;F.set(B,{editorValue:void 0,pendingValue:W,sourceValue:K,state:q??"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}this.setEditMap(X,J)}onCellFocused(z){let J=l(this.beans,z);if(!J||!this.isEditing(J,nz))return;let Q=this.model.getEdit(J);if(!Q||!V4(Q))return;let $=this.getLocaleTextFunc()("ariaPendingChange","Pending Change");this.beans.ariaAnnounce?.announceValue($,"pendingChange")}allowedFocusTargetOnValidation(z){return l(this.beans,z)}};function eM(z){return{rowNodes:z?Array.from(z.keys()):void 0,columns:z?[...new Set(Array.from(z.values()).flatMap((J)=>Array.from(J.keys())))]:void 0}}function t8(z,J){return J??z.get("editType")??"singleCell"}var nX=class extends j{postConstruct(){this.model=this.beans.editModelSvc,this.editSvc=this.beans.editSvc,this.addManagedEventListeners({cellFocused:this.onCellFocusChanged?.bind(this),cellFocusCleared:this.onCellFocusChanged?.bind(this)})}clearEdits(z){this.model.clearEditValue(z)}onCellFocusChanged(z){let J,Q=z.previousParams,{editSvc:Z,beans:$}=this,X=z.type==="cellFocused"?z.sourceEvent:null;if(Q)J=l($,Q);let{gos:Y,editModelSvc:U}=$,_=z.type==="cellFocusCleared";if(Z.isEditing(void 0,{withOpenEditor:!0})){let{column:H,rowIndex:G,rowPinned:W}=z,q={column:H,rowNode:j0($,{rowIndex:G,rowPinned:W})},B=Y.get("invalidEditValueMode")==="block";if(B)return;let E=!B,K=!!U?.getCellValidationModel().hasCellValidation(q),F=E&&K;if(!(Q||_?Z.stopEditing(void 0,{cancel:F,source:_&&E?"api":void 0,event:X}):!0))if(Z.isBatchEditing())Z.cleanupEditors();else Z.stopEditing(void 0,{source:"api"})}J?.refreshCell({suppressFlash:!0,force:!0})}stopCancelled(z){let J=this.editSvc.isBatchEditing()&&!z;for(let Q of this.model.getEditPositions())y2(this.beans,Q,{cancel:!0},l(this.beans,Q)),this.model.stop(Q,J,!0);return!0}stopCommitted(z,J){let Q=this.model.getEditPositions(),Z={all:[],pass:[],fail:[]};for(let Y of Q)if(Z.all.push(Y),(this.model.getCellValidationModel().getCellValidation(Y)?.errorMessages?.length??0)>0)Z.fail.push(Y);else Z.pass.push(Y);let $=this.processValidationResults(Z),X=this.editSvc.isBatchEditing()&&!J;for(let Y of $.destroy)y2(this.beans,Y,{event:z},l(this.beans,Y)),this.model.stop(Y,X,!1);for(let Y of $.keep){let U=l(this.beans,Y);if(!this.editSvc.cellEditingInvalidCommitBlocks()&&U)this.editSvc.revertSingleCellEdit(U)}return!0}cleanupEditors({rowNode:z}={},J){Mz(this.beans,{persist:!1});let Q=this.model.getEditPositions(),Z=[];if(z){for(let $ of Q)if($.rowNode!==z)Z.push($)}else for(let $ of Q)Z.push($);Fz(this.beans,Z),M2(this.beans,J)}setFocusOutOnEditor(z){z.comp?.getCellEditor()?.focusOut?.()}setFocusInOnEditor(z){let J=z.comp,Q=J?.getCellEditor();if(Q?.focusIn)Q.focusIn();else{let Z=this.beans.gos.get("editType")==="fullRow";z.focusCell(Z),z.onEditorAttachedFuncs.push(()=>J?.getCellEditor()?.focusIn?.())}}setupEditors(z){let{event:J,ignoreEventKey:Q=!1,startedEdit:Z,position:$,cells:X=this.model.getEditPositions()}=z,Y=J instanceof KeyboardEvent&&!Q&&J.key||void 0;dK(this.beans,X,$,Y,J,Z)}dispatchCellEvent(z,J,Q,Z){let $=l(this.beans,z);if($)this.eventSvc.dispatchEvent({...$.createEvent(J??null,Q),...Z})}dispatchRowEvent(z,J,Q){if(Q)return;let Z=JJ(this.beans,z);if(Z)this.eventSvc.dispatchEvent(Z.createRowEvent(J))}shouldStop(z,J,Q="ui"){let Z=this.editSvc.isBatchEditing();if(Z&&Q==="api")return!0;if(Z&&(Q==="ui"||Q==="edit"))return!1;if(Q==="api")return!0;if(J instanceof KeyboardEvent&&!Z)return J.key===R.ENTER;return null}shouldCancel(z,J,Q="ui"){let Z=this.editSvc.isBatchEditing();if(J instanceof KeyboardEvent&&!Z){if(J.key===R.ESCAPE)return!0}if(Z&&Q==="api")return!0;if(Q==="api")return!0;return!1}setEditMap(z,J){if(!J?.update)this.editSvc.stopEditing(void 0,{cancel:!0,source:"api"});let Q=[];if(z.forEach((Z,$)=>{Z.forEach((X,Y)=>{if(X.state==="editing")Q.push({...X,rowNode:$,column:Y})})}),J?.update)z=new Map([...this.model.getEditMap(),...z]);if(this.model?.setEditMap(z),Q.length>0){let Z=Q.at(-1),$=Z.pendingValue===C0?void 0:Z.pendingValue;this.start({position:Z,event:new KeyboardEvent("keydown",{key:$}),source:"api"});let X=l(this.beans,Z);if(X)this.setFocusInOnEditor(X)}}destroy(){this.cleanupEditors(),super.destroy()}},zD=class extends nX{constructor(){super(...arguments);this.beanName="fullRow",this.startedRows=new Set}shouldStop(z,J,Q="ui"){let{rowNode:Z,beans:$}=this,{rowNode:X}=z||{};if(!JJ($,{rowNode:Z}))return!0;let U=super.shouldStop({rowNode:Z},J,Q);if(U!==null)return U;if(!Z)return!1;return X!==Z}midBatchInputsAllowed({rowNode:z}){if(!z)return!1;return this.model.hasEdits({rowNode:z})}clearEdits(z){this.model.clearEditValue(z)}start(z){let{position:J,silent:Q,startedEdit:Z,event:$,ignoreEventKey:X}=z,{rowNode:Y}=J,{beans:U,model:_,startedRows:H}=this;if(this.rowNode!==Y)super.cleanupEditors(J);let G=U.visibleCols.allCols,W=[],q=[];for(let B of G)if(B.isCellEditable(Y))q.push(B);if(q.length==0)return;if(!H.has(Y))this.dispatchRowEvent({rowNode:Y},"rowEditingStarted",Q),H.add(Y);for(let B of q){let E={rowNode:Y,column:B};W.push(E),_.start(E)}this.rowNode=Y,this.setupEditors({cells:W,position:J,startedEdit:Z,event:$,ignoreEventKey:X})}processValidationResults(z){if(z.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks())return{destroy:[],keep:z.all};return{destroy:z.all,keep:[]}}stopCancelled(z){let{rowNode:J,model:Q}=this;if(J&&!Q.hasEdits())return!1;return super.stopCancelled(z),this.cleanupEditors({rowNode:J},!0),this.rowNode=void 0,!0}stopCommitted(z,J){let{rowNode:Q,beans:Z,model:$,editSvc:X}=this;if(Q&&!$.hasEdits())return!1;let Y=[];if($.getEditMap().forEach((U,_)=>{if(!U||U.size===0)return;for(let H of U.values())if(V4(H)){Y.push(_);break}}),jz(Z),X.checkNavWithValidation({rowNode:Q})==="block-stop")return!1;if(super.stopCommitted(z,J),J||!X.isBatchEditing())for(let U of Y)this.dispatchRowEvent({rowNode:U},"rowValueChanged");return this.cleanupEditors({rowNode:Q},!0),this.rowNode=void 0,!0}onCellFocusChanged(z){let{rowIndex:J}=z,Q=z.previousParams;if(Q?.rowIndex===J||z.sourceEvent instanceof KeyboardEvent)return;let{beans:Z,gos:$,model:X}=this;if(Z.editSvc?.isRangeSelectionEnabledWhileEditing())return;let Y=l(Z,Q);if($.get("invalidEditValueMode")==="block"&&Y&&(X.getCellValidationModel().getCellValidation(Y)||X.getRowValidationModel().getRowValidation(Y)))return;super.onCellFocusChanged(z)}cleanupEditors(z={},J){super.cleanupEditors(z,J);let{startedRows:Q}=this;for(let Z of Q)this.dispatchRowEvent({rowNode:Z},"rowEditingStopped"),this.destroyEditorsForRow(Z);Q.clear()}destroyEditorsForRow(z){let J=JJ(this.beans,{rowNode:z});if(!J)return;let Q={};for(let Z of J.getAllCellCtrls())if(Z.comp?.getCellEditor())y2(this.beans,Z,Q,Z)}moveToNextEditingCell(z,J,Q,Z="ui",$=!1){let{beans:X,model:Y,gos:U,editSvc:_}=this,H=z.cellPosition,G;Y.suspend(!0);try{G=X.navigation?.findNextCellToFocusOn(H,{backwards:J,startEditing:!0,skipToNextEditableCell:!1})}finally{Y.suspend(!1)}if(G===!1)return null;if(G==null)return!1;let W=G.cellPosition,q=z.isCellEditable(),B=G.isCellEditable(),E=H.rowIndex===W?.rowIndex&&H.rowPinned===W.rowPinned;if(q)this.setFocusOutOnEditor(z);this.restoreEditors();let K=U.get("suppressStartEditOnTab");if(B&&!$)if(K)G.focusCell(!0,Q);else{if(!G.comp?.getCellEditor())$1(X,G,{event:Q,cellStartedEdit:!0});this.setFocusInOnEditor(G),G.focusCell(!1,Q)}else{if(B&&$)this.setFocusInOnEditor(G);G.focusCell(!0,Q)}if(!E&&!$){if(_?.stopEditing({rowNode:z.rowNode},{event:Q,forceStop:!0}),_?.isRowEditing(z.rowNode,{withOpenEditor:!0}))this.cleanupEditors(G,!0);if(K)G.focusCell(!0,Q);else _.startEditing(G,{startedEdit:!0,event:Q,source:Z,ignoreEventKey:!0,editable:B||void 0})}return z.rowCtrl?.refreshRow({suppressFlash:!0,force:!0}),!0}restoreEditors(){let{beans:z,model:J}=this;J.getEditMap().forEach((Q,Z)=>Q.forEach(({state:$},X)=>{if($!=="editing")return;let Y=l(z,{rowNode:Z,column:X});if(Y&&!Y.comp?.getCellEditor())$1(z,Y,{silent:!0})}))}destroy(){super.destroy(),this.rowNode=void 0,this.startedRows.clear()}},JD=class extends nX{constructor(){super(...arguments);this.beanName="singleCell"}shouldStop(z,J,Q="ui"){let Z=super.shouldStop(z,J,Q);if(Z!==null)return Z;let $=z?.rowNode,X=z?.column,Y=this.rowNode,U=this.column;if((!Y||!U)&&$&&X)return null;if(Y!==$||U!==X)return!0;if(!Y&&!U)return this.model.hasEdits(void 0,{withOpenEditor:!0});return!1}midBatchInputsAllowed(z){return this.model.hasEdits(z)}start(z){let{position:J,startedEdit:Q,event:Z,ignoreEventKey:$}=z;if(this.rowNode!==J.rowNode||this.column!==J.column)super.cleanupEditors();this.rowNode=J.rowNode,this.column=J.column,this.model.start(J),this.setupEditors({cells:[J],position:J,startedEdit:Q,event:Z,ignoreEventKey:$})}dispatchRowEvent(z,J,Q){}processValidationResults(z){if(z.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks())return{destroy:[],keep:z.all};return{destroy:z.all,keep:[]}}stopCancelled(z){return super.stopCancelled(z),this.clearPosition()}stopCommitted(z,J){return super.stopCommitted(z,J),this.clearPosition()}clearPosition(){return this.rowNode=void 0,this.column=void 0,!0}onCellFocusChanged(z){let{colModel:J,editSvc:Q}=this.beans,{rowIndex:Z,column:$,rowPinned:X}=z,Y=j0(this.beans,{rowIndex:Z,rowPinned:X}),U=EZ($),_=J.getCol(U),H=z.previousParams;if(H){let G=EZ(H.column);if(H?.rowIndex===Z&&G===U&&H?.rowPinned===X)return}if(z.type=="cellFocused"&&(Q?.isRangeSelectionEnabledWhileEditing()||Q?.isEditing({rowNode:Y,column:_},{withOpenEditor:!0})))return;super.onCellFocusChanged(z)}moveToNextEditingCell(z,J,Q,Z="ui",$=!1){let X=this.beans.focusSvc.getFocusedCell();if(X)z=Y4(this.beans,X)??z;let Y=z.cellPosition,U,_=this.beans.gos.get("editType")==="fullRow";if(_)this.model.suspend(!0);if(!$)z.eGui.focus(),this.editSvc?.stopEditing(z,{source:this.editSvc?.isBatchEditing()?"ui":"api",event:Q});try{U=this.beans.navigation?.findNextCellToFocusOn(Y,{backwards:J,startEditing:!0})}finally{if(_)this.model.suspend(!1)}if(U===!1)return null;if(U==null)return!1;let H=U.cellPosition,G=z.isCellEditable(),W=U.isCellEditable(),q=Y.rowIndex===H?.rowIndex&&Y.rowPinned===H.rowPinned;if(G&&!$)this.setFocusOutOnEditor(z);let B=this.gos.get("suppressStartEditOnTab"),E=!1;if(!q&&!$)if(super.cleanupEditors(U,!0),B)U.focusCell(!0,Q);else E=!0,this.editSvc.startEditing(U,{startedEdit:!0,event:Q,source:Z,ignoreEventKey:!0,editable:W});if(W&&!$){if(U.focusCell(!1,Q),B)U.focusCell(!0,Q);else if(!U.comp?.getCellEditor()){if(!E){let K=this.editSvc?.isEditing(U,{withOpenEditor:!0});$1(this.beans,U,{event:Q,cellStartedEdit:!0,silent:K})}this.setFocusInOnEditor(U),this.cleanupEditors(U)}}else{if(W&&$)this.setFocusInOnEditor(U);U.focusCell(!0,Q)}return z.rowCtrl?.refreshRow({suppressFlash:!0,force:!0}),!0}destroy(){super.destroy(),this.rowNode=void 0,this.column=void 0}},QD={moduleName:"EditCore",version:p,beans:[cK,oM],apiFunctions:{getEditingCells:CM,getEditRowValues:kM,getCellEditorInstances:iK,startEditingCell:wM,stopEditing:vM,isEditing:NM,validateEdit:yM},dynamicBeans:{singleCell:JD,fullRow:zD},dependsOn:[W1,KM],css:[FM]};var rX={moduleName:"TextEditor",version:p,userComponents:{agCellEditor:r8,agTextCellEditor:r8},dependsOn:[QD]};var tX={agSetColumnFilter:"agSetColumnFilterHandler",agMultiColumnFilter:"agMultiColumnFilterHandler",agGroupColumnFilter:"agGroupColumnFilterHandler",agNumberColumnFilter:"agNumberColumnFilterHandler",agBigIntColumnFilter:"agBigIntColumnFilterHandler",agDateColumnFilter:"agDateColumnFilterHandler",agTextColumnFilter:"agTextColumnFilterHandler"},ZD=new Set(Object.values(tX));function Ez(z,J){let Q=z.filterUi;if(!Q)return null;if(Q.created)return Q.promise;if(J)return null;let Z=Q.create(Q.refreshed),$=Q;return $.created=!0,$.promise=Z,Z}function yJ(z,J,Q,Z,$,X,Y){return J.refresh?.({...Q,model:Z,source:X,additionalEventAttributes:Y}),z().then((U)=>{if(U){let{filter:_,filterParams:H}=U;J2(_,H,Z,$,X,Y)}})}function J2(z,J,Q,Z,$,X){z?.refresh?.({...J,model:Q,state:Z,source:$,additionalEventAttributes:X})}function sX(z,J,Q,Z){let $=z();if($?.created)$.promise.then((X)=>{let Y=J();J2(X,$.filterParams,Y,Q()??{model:Y},"ui",Z)})}function $J(z){let J,Q=!1,Z,{action:$,filterParams:X,getFilterUi:Y,getModel:U,getState:_,updateState:H,updateModel:G,processModelToApply:W}=z;switch($){case"apply":{let q=_();if(Z=q?.model??null,W)Z=W(Z);J={state:q?.state,model:Z},Q=!0;break}case"clear":{if(J={model:null},!X?.buttons?.includes("apply"))Q=!0,Z=null;break}case"reset":{J={model:null},Q=!0,Z=null;break}case"cancel":{J={model:U()};break}}if(H(J),Q)G(Z);else sX(Y,U,_,{fromAction:$})}function A0(z,J){return z[J]??null}var $D=class extends B5{constructor(){super(...arguments);this.iconCreated=!1}wireComp(z,J,Q,Z,$){this.comp=z;let X=l2(this,this.beans.context,$);this.eButtonShowMainFilter=Q,this.eFloatingFilterBody=Z,this.setGui(J,X),this.setupActive(),this.refreshHeaderStyles(),this.setupWidth(X),this.setupLeft(X),this.setupHover(X),this.setupFocus(X),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(X),this.setupUi(),X.addManagedElementListeners(this.eButtonShowMainFilter,{click:this.showParentFilter.bind(this)}),this.setupFilterChangedListener(X);let Y=()=>this.onColDefChanged(X);X.addManagedListeners(this.column,{colDefChanged:Y}),X.addManagedEventListeners({filterSwitched:({column:U})=>{if(U===this.column)Y()}}),X.addDestroyFunc(()=>{this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.clearComponent()})}resizeHeader(){}moveHeader(){}getHeaderClassParams(){let{column:z,beans:J}=this,Q=z.colDef;return v(J.gos,{colDef:Q,column:z,floatingFilter:!0})}setupActive(){let z=this.column.colDef,J=!!z.filter,Q=!!z.floatingFilter;this.active=J&&Q}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 z=h("filter",this.beans,this.column);if(z)this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(z)}setupFocus(z){z.createManagedBean(new $z(this.eGui,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))}setupAria(){let z=this.getLocaleTextFunc();G0(this.eButtonShowMainFilter,z("ariaFilterMenuOpen","Open Filter Menu"))}onTabKeyDown(z){let{beans:J}=this;if(d(J)===this.eGui)return;let $=I0(J,this.eGui,null,z.shiftKey);if($){J.headerNavigation?.scrollToColumn(this.column),z.preventDefault(),$.focus();return}let X=this.findNextColumnWithFloatingFilter(z.shiftKey);if(!X)return;if(J.focusSvc.focusHeaderPosition({headerPosition:{headerRowIndex:this.rowCtrl.rowIndex,column:X},event:z}))z.preventDefault()}findNextColumnWithFloatingFilter(z){let J=this.beans.visibleCols,Q=this.column;do if(Q=z?J.getColBefore(Q):J.getColAfter(Q),!Q)break;while(!Q.colDef.filter||!Q.colDef.floatingFilter);return Q}handleKeyDown(z){super.handleKeyDown(z);let J=this.getWrapperHasFocus();switch(z.key){case R.UP:case R.DOWN:case R.LEFT:case R.RIGHT:if(J)return;a0(z);case R.ENTER:if(J){if(E0(this.eGui))z.preventDefault()}break;case R.ESCAPE:if(!J)this.eGui.focus()}}onFocusIn(z){if(this.eGui.contains(z.relatedTarget))return;let Q=!!z.relatedTarget&&!z.relatedTarget.classList.contains("ag-floating-filter"),Z=!!z.relatedTarget&&sz(z.relatedTarget,"ag-floating-filter");if(Q&&Z&&z.target===this.eGui){let $=this.lastFocusEvent,X=$?.key===R.TAB;if($&&X){let Y=$.shiftKey;E0(this.eGui,Y)}}this.focusThis()}setupHover(z){this.beans.colHover?.addHeaderFilterColumnHoverListener(z,this.comp,this.column,this.eGui)}setupLeft(z){let J=new q5(this.column,this.eGui,this.beans);z.createManagedBean(J)}setupFilterButton(){this.suppressFilterButton=!this.beans.menuSvc?.isFloatingFilterButtonEnabled(this.column),this.highlightFilterButtonWhenActive=!F0(this.gos)}setupUserComp(){if(!this.active)return;let z=this.beans.colFilter?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter());if(z)this.setCompDetails(z)}setCompDetails(z){this.userCompDetails=z,this.comp.setCompDetails(z)}showParentFilter(){let z=this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter;this.beans.menuSvc?.showFilterMenu({column:this.column,buttonElement:z,containerType:"floatingFilter",positionBy:"button"})}setupSyncWithFilter(z){if(!this.active)return;let{beans:{colFilter:J},column:Q,gos:Z}=this,$=(X)=>{if(X?.source==="filterDestroyed"&&(!this.isAlive()||!J?.isAlive()))return;let Y=this.comp.getFloatingFilterComp();if(!Y)return;Y.then((U)=>{if(U){if(Z.get("enableFilterHandlers")){let G=X,W="filter";if(G?.afterFloatingFilter)W="ui";else if(G?.afterDataChange)W="dataChanged";else if(X?.source==="api")W="api";this.updateFloatingFilterParams(this.userCompDetails,W);return}let _=J?.getCurrentFloatingFilterParentModel(Q),H=X?{...X,columns:X.columns??[],source:X.source==="api"?"api":"columnFilter"}:null;U.onParentModelChanged(_,H)}})};if([this.destroySyncListener]=z.addManagedListeners(Q,{filterChanged:$}),J?.isFilterActive(Q))$(null)}setupWidth(z){let J=()=>{let Q=`${this.column.getActualWidth()}px`;this.comp.setWidth(Q)};z.addManagedListeners(this.column,{widthChanged:J}),J()}setupFilterChangedListener(z){if(this.active)[this.destroyFilterChangedListener]=z.addManagedListeners(this.column,{filterChanged:this.updateFilterButton.bind(this)}),this.updateFilterButton()}updateFilterButton(){if(!this.suppressFilterButton&&this.comp){let z=!!this.beans.filterManager?.isFilterAllowed(this.column);if(this.comp.setButtonWrapperDisplayed(z),this.highlightFilterButtonWhenActive&&z)this.eButtonShowMainFilter.classList.toggle("ag-filter-active",this.column.isFilterActive())}}onColDefChanged(z){let J=this.active;this.setupActive();let Q=!J&&this.active;if(J&&!this.active)this.destroySyncListener(),this.destroyFilterChangedListener();let Z=this.beans.colFilter,$=this.active?Z?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter()):null,X=this.comp.getFloatingFilterComp();if(!X||!$)this.updateCompDetails(z,$,Q);else X.then((Y)=>{if(!Y||Z?.areFilterCompsDifferent(this.userCompDetails??null,$))this.updateCompDetails(z,$,Q);else this.updateFloatingFilterParams($,"colDef")})}updateCompDetails(z,J,Q){if(!this.isAlive())return;if(this.setCompDetails(J),this.setupFilterButton(),this.setupUi(),Q)this.setupSyncWithFilter(z),this.setupFilterChangedListener(z)}updateFloatingFilterParams(z,J){if(!z)return;let Q=z.params;this.comp.getFloatingFilterComp()?.then((Z)=>{if(typeof Z?.refresh==="function"){if(this.gos.get("enableFilterHandlers"))Q={...Q,model:A0(this.beans.colFilter?.model??{},this.column.colId),source:J};Z.refresh(Q)}})}addResizeAndMoveKeyboardListeners(){}destroy(){super.destroy(),this.destroySyncListener=null,this.destroyFilterChangedListener=null}};function XD(z,J){let Q=z.colModel.getCol(J);if(!Q){r(12,{colKey:J});return}z.menuSvc?.showColumnMenu({column:Q,positionBy:"auto"})}function YD(z){z.menuSvc?.hidePopupMenu()}var UD=class extends j{constructor(){super(...arguments);this.beanName="menuSvc"}postConstruct(){let{enterpriseMenuFactory:z,filterMenuFactory:J}=this.beans;this.activeMenuFactory=z??J}showColumnMenu(z){this.showColumnMenuCommon(this.activeMenuFactory,z,"columnMenu")}showFilterMenu(z){this.showColumnMenuCommon(s8(this.beans),z,z.containerType,!0)}showHeaderContextMenu(z,J,Q){this.activeMenuFactory?.showMenuAfterContextMenuEvent(z,J,Q)}hidePopupMenu(){this.beans.contextMenuSvc?.hideActiveMenu(),this.activeMenuFactory?.hideActiveMenu()}hideFilterMenu(){s8(this.beans)?.hideActiveMenu()}isColumnMenuInHeaderEnabled(z){let{suppressHeaderMenuButton:J}=z.colDef;return!J&&!!this.activeMenuFactory?.isMenuEnabled(z)&&(F0(this.gos)||!!this.beans.enterpriseMenuFactory)}isFilterMenuInHeaderEnabled(z){return!z.colDef.suppressHeaderFilterButton&&!!this.beans.filterManager?.isFilterAllowed(z)}isHeaderContextMenuEnabled(z){return!(z&&H4(z)?z.colDef:z?.getColGroupDef())?.suppressHeaderContextMenu&&this.gos.get("columnMenu")==="new"}isHeaderMenuButtonAlwaysShowEnabled(){return this.isSuppressMenuHide()}isHeaderMenuButtonEnabled(){let z=!this.isSuppressMenuHide();return!(zz()&&z)}isHeaderFilterButtonEnabled(z){return this.isFilterMenuInHeaderEnabled(z)&&!F0(this.gos)&&!this.isFloatingFilterButtonDisplayed(z)}isFilterMenuItemEnabled(z){return!!this.beans.filterManager?.isFilterAllowed(z)&&!F0(this.gos)&&!this.isFilterMenuInHeaderEnabled(z)&&!this.isFloatingFilterButtonDisplayed(z)}isFloatingFilterButtonEnabled(z){return!z.getColDef().suppressFloatingFilterButton}isFloatingFilterButtonDisplayed(z){return!!z.getColDef().floatingFilter&&this.isFloatingFilterButtonEnabled(z)}isSuppressMenuHide(){let z=this.gos,J=z.get("suppressMenuHide");if(F0(z))return z.exists("suppressMenuHide")?J:!1;return J}showColumnMenuCommon(z,J,Q,Z){let{positionBy:$,onClosedCallback:X}=J,Y=J.column;if($==="button"){let{buttonElement:U}=J;z?.showMenuAfterButtonClick(Y,U,Q,X,Z)}else if($==="mouse"){let{mouseEvent:U}=J;z?.showMenuAfterMouseEvent(Y,U,Q,X,Z)}else if(Y){let U=this.beans,_=U.ctrlsSvc;_.getScrollFeature().ensureColumnVisible(Y,"auto"),I4(U,()=>{let H=_.getHeaderRowContainerCtrl(Y.getPinned())?.getHeaderCtrlForColumn(Y);if(H)z?.showMenuAfterButtonClick(Y,H.getAnchorElementForMenu(Z),Q,X,Z)})}}};function x2(z,J,Q){if(z.menuVisible!==J)z.menuVisible=J,z.dispatchColEvent("menuVisibleChanged",Q)}function s8(z){let{enterpriseMenuFactory:J,filterMenuFactory:Q,gos:Z}=z;return J&&F0(Z)?J:Q}var N5={moduleName:"SharedMenu",version:p,beans:[UD],apiFunctions:{showColumnMenu:XD,hidePopupMenu:YD}},_D=".ag-set-filter{--ag-indentation-level:0}.ag-set-filter-item{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-set-filter-item{padding-left:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}:where(.ag-rtl) .ag-set-filter-item{padding-right:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}.ag-set-filter-item-checkbox{display:flex;height:100%;width:100%}.ag-set-filter-group-icons{display:block;:where(.ag-set-filter-group-closed-icon),:where(.ag-set-filter-group-indeterminate-icon),:where(.ag-set-filter-group-opened-icon){cursor:pointer}}:where(.ag-ltr) .ag-set-filter-group-icons{margin-right:var(--ag-widget-container-horizontal-padding)}:where(.ag-rtl) .ag-set-filter-group-icons{margin-left:var(--ag-widget-container-horizontal-padding)}.ag-filter-body-wrapper{display:flex;flex-direction:column}:where(.ag-menu:not(.ag-tabs) .ag-filter) .ag-filter-body-wrapper{min-width:180px}.ag-filter-filter{flex:1 1 0px}.ag-filter-condition{display:flex;justify-content:center}.ag-floating-filter-body{display:flex;flex:1 1 auto;height:100%;position:relative}.ag-floating-filter-full-body{align-items:center;display:flex;flex:1 1 auto;height:100%;overflow:hidden;width:100%}.ag-floating-filter-input{align-items:center;display:flex;width:100%;>:where(.ag-date-floating-filter-wrapper),>:where(.ag-floating-filter-input),>:where(.ag-input-field){flex:1 1 auto}:where(.ag-input-field-input[type=date]),:where(.ag-input-field-input[type=datetime-local]){width:1px}}.ag-floating-filter-button{display:flex;flex:none}.ag-date-floating-filter-wrapper{display:flex}.ag-set-floating-filter-input :where(.ag-input-field-input)[disabled]{pointer-events:none}.ag-floating-filter-button-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;height:var(--ag-icon-size);width:var(--ag-icon-size)}.ag-filter-loading{align-items:unset;background-color:var(--ag-chrome-background-color);height:100%;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;width:100%;z-index:1;:where(.ag-menu) &{background-color:var(--ag-menu-background-color)}}.ag-filter-separator{border-top:solid var(--ag-border-width) var(--menu-separator-color)}:where(.ag-filter-select) .ag-picker-field-wrapper{width:0}.ag-filter-condition-operator{height:17px}:where(.ag-ltr) .ag-filter-condition-operator-or{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-condition-operator-or{margin-right:calc(var(--ag-spacing)*2)}.ag-set-filter-select-all{padding-top:var(--ag-widget-container-vertical-padding)}.ag-filter-no-matches,.ag-set-filter-list{height:calc(var(--ag-list-item-height)*6)}.ag-filter-no-matches{padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-set-filter-tree-list{height:calc(var(--ag-list-item-height)*10)}.ag-set-filter-filter{margin-left:var(--ag-widget-container-horizontal-padding);margin-right:var(--ag-widget-container-horizontal-padding);margin-top:var(--ag-widget-container-vertical-padding)}.ag-filter-to{margin-top:var(--ag-widget-vertical-spacing)}.ag-mini-filter{margin:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}:where(.ag-ltr) .ag-set-filter-add-group-indent{margin-left:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-rtl) .ag-set-filter-add-group-indent{margin-right:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-filter-menu) .ag-set-filter-list{min-width:max(200px,100%)}.ag-filter-virtual-list-item:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-filter-apply-panel{display:flex;justify-content:flex-end;overflow:hidden;padding:var(--ag-widget-vertical-spacing) var(--ag-widget-container-horizontal-padding) var(--ag-widget-container-vertical-padding)}.ag-filter-apply-panel-button{line-height:1.5}:where(.ag-ltr) .ag-filter-apply-panel-button{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-apply-panel-button{margin-right:calc(var(--ag-spacing)*2)}.ag-simple-filter-body-wrapper{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);min-height:calc(var(--ag-list-item-height) + var(--ag-widget-container-vertical-padding) + var(--ag-widget-vertical-spacing));overflow-y:auto;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);padding-bottom:var(--ag-widget-container-vertical-padding);:where(.ag-resizer-wrapper){margin:0}}.ag-multi-filter-menu-item{margin:var(--ag-spacing) 0}.ag-multi-filter-group-title-bar{background-color:transparent;color:var(--ag-header-text-color);font-weight:500;padding:calc(var(--ag-spacing)*1.5) var(--ag-spacing)}.ag-group-filter-field-select-wrapper{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}";function HD(z){let J=z.filterManager;return!!J?.isColumnFilterPresent()||!!J?.isAggregateFilterPresent()}function GD(z,J){return z.filterManager?.getColumnFilterInstance(J)??Promise.resolve(void 0)}function WD(z,J){let Q=z.colModel.getColDefColOrCol(J);if(Q)return z.colFilter?.destroyFilter(Q,"api")}function qD(z,J){z.frameworkOverrides.wrapIncoming(()=>z.filterManager?.setFilterModel(J))}function BD(z){return z.filterManager?.getFilterModel()??{}}function ED(z,J,Q){let{gos:Z,colModel:$,colFilter:X}=z;if(Q&&!Z.get("enableFilterHandlers"))V(288),Q=!1;let Y=$.getColDefColOrCol(J);return Y?X?.getModelForColumn(Y,Q)??null:null}function KD(z,J,Q){return z.filterManager?.setColumnFilterModel(J,Q)??Promise.resolve()}function FD(z,J){let Q=z.colModel.getColDefColOrCol(J);if(!Q){r(12,{colKey:J});return}z.menuSvc?.showFilterMenu({column:Q,containerType:"columnFilter",positionBy:"auto"})}function LD(z){z.menuSvc?.hideFilterMenu()}function MD(z,J){let Q=z.colModel.getColDefColOrCol(J);if(!Q){r(12,{colKey:J});return}return z.colFilter?.getHandler(Q,!0)}function DD(z,J){let{colModel:Q,colFilter:Z,gos:$}=z;if(!$.get("enableFilterHandlers")){V(287);return}let{colId:X,action:Y}=J;if(X){let U=Q.getColById(X);if(U)Z?.updateModel(U,Y)}else Z?.updateAllModels(Y)}var l8={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},a8=["january","february","march","april","may","june","july","august","september","october","november","december"];function RD(z,J){if(z==null)return-1;if(J==null)return 1;return Number.parseFloat(z)-Number.parseFloat(J)}function AD(z,J){if(z==null)return-1;if(J==null)return 1;let Q=Pz(z),Z=Pz(J);if(Q!=null&&Z!=null){if(Q===Z)return 0;return Q>Z?1:-1}return String(z).localeCompare(String(J))}function o8(z){return z instanceof Date&&!isNaN(z.getTime())}var DZ={number:()=>{return},bigint:()=>{return},boolean:()=>({maxNumConditions:1,debounceMs:0,filterOptions:["empty",{displayKey:"true",displayName:"True",predicate:(z,J)=>J,numberOfInputs:0},{displayKey:"false",displayName:"False",predicate:(z,J)=>J===!1,numberOfInputs:0}]}),date:()=>({isValidDate:o8}),dateString:({dataTypeDefinition:z})=>({comparator:(J,Q)=>{let Z=z.dateParser(Q);if(Q==null||Z<J)return-1;if(Z>J)return 1;return 0},isValidDate:(J)=>typeof J==="string"&&o8(z.dateParser(J))}),dateTime:(z)=>DZ.date(z),dateTimeString:(z)=>DZ.dateString(z),object:()=>{return},text:()=>{return}},RZ={number:()=>({comparator:RD}),bigint:()=>({comparator:AD}),boolean:({t:z})=>({valueFormatter:(J)=>I(J.value)?z(String(J.value),J.value?"True":"False"):z("blanks","(Blanks)")}),date:({formatValue:z,t:J})=>({valueFormatter:(Q)=>{let Z=z(Q);return I(Z)?Z:J("blanks","(Blanks)")},treeList:!0,treeListFormatter:(Q,Z)=>{if(Q==="NaN")return J("invalidDate","Invalid Date");if(Z===1&&Q!=null){let $=a8[Number(Q)-1];return J($,l8[$])}return Q??J("blanks","(Blanks)")},treeListPathGetter:(Q)=>Lz(Q,!1)}),dateString:({formatValue:z,dataTypeDefinition:J,t:Q})=>({valueFormatter:(Z)=>{let $=z(Z);return I($)?$:Q("blanks","(Blanks)")},treeList:!0,treeListPathGetter:(Z)=>Lz(J.dateParser(Z??void 0),!1),treeListFormatter:(Z,$)=>{if($===1&&Z!=null){let X=a8[Number(Z)-1];return Q(X,l8[X])}return Z??Q("blanks","(Blanks)")}}),dateTime:(z)=>{let J=RZ.date(z);return J.treeListPathGetter=Lz,J},dateTimeString(z){let J=z.dataTypeDefinition.dateParser,Q=RZ.dateString(z);return Q.treeListPathGetter=(Z)=>Lz(J(Z??void 0)),Q},object:({formatValue:z,t:J})=>({valueFormatter:(Q)=>{let Z=z(Q);return I(Z)?Z:J("blanks","(Blanks)")}}),text:()=>{return}};function w5(z,J,Q,Z,$,X,Y){let U=Q,_=z==="agSetColumnFilter";if(!U&&Z.baseDataType==="object"&&!_)U=({column:B,node:E})=>$({column:B,node:E,value:X.valueSvc.getValue(B,E,"data")});let G=(_?RZ:DZ)[Z.baseDataType],W=G({dataTypeDefinition:Z,formatValue:$,t:Y});return{filterParams:typeof J==="object"?{...W,...J}:W,filterValueGetter:U}}var jD={boolean:"agTextColumnFilter",date:"agDateColumnFilter",dateString:"agDateColumnFilter",dateTime:"agDateColumnFilter",dateTimeString:"agDateColumnFilter",bigint:"agBigIntColumnFilter",number:"agNumberColumnFilter",object:"agTextColumnFilter",text:"agTextColumnFilter"},VD={boolean:"agTextColumnFloatingFilter",date:"agDateColumnFloatingFilter",dateString:"agDateColumnFloatingFilter",dateTime:"agDateColumnFloatingFilter",dateTimeString:"agDateColumnFloatingFilter",bigint:"agBigIntColumnFloatingFilter",number:"agNumberColumnFloatingFilter",object:"agTextColumnFloatingFilter",text:"agTextColumnFloatingFilter"};function y5(z,J=!1){return(J?VD:jD)[z??"text"]}function x5(z,J,Q){if(J==null)return null;let Z=null,{compName:$,jsComp:X,fwComp:Y}=_$(z,J);if($)Z={agSetColumnFilter:"agSetColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",agBigIntColumnFilter:"agBigIntColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"}[$];else if(X==null&&Y==null&&J.filter===!0)Z=Q();return Z}var OD={filterHandler:()=>({doesFilterPass:()=>!0})};function e8(z,J,Q,Z){if(!z.isPrimary())return!0;let X=!Q;if(!z.isValueActive()||!X)return!1;if(J)return!0;return Z}var PD=class extends j{constructor(){super(...arguments);this.beanName="colFilter",this.allColumnFilters=new Map,this.allColumnListeners=new Map,this.activeAggregateFilters=[],this.activeColumnFilters=[],this.processingFilterChange=!1,this.modelUpdates=[],this.columnModelUpdates=[],this.state=new Map,this.handlerMap={...tX},this.isGlobalButtons=!1,this.activeFilterComps=new Set}postConstruct(){this.addManagedEventListeners({gridColumnsChanged:this.onColumnsChanged.bind(this),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.addManagedPropertyListener("pivotMode",this.onPivotModeChanged.bind(this));let z=this.gos,J={...z.get("initialState")?.filter?.filterModel??{}};if(this.initialModel=J,this.model={...J},!z.get("enableFilterHandlers"))delete this.handlerMap.agMultiColumnFilter}refreshModel(){this.onNewRowsLoaded("rowDataUpdated")}setModel(z,J="api",Q){let{colModel:Z,dataTypeSvc:$,filterManager:X}=this.beans;if($?.isPendingInference){this.modelUpdates.push({model:z,source:J});return}let Y=[],U=this.getModel(!0);if(z){let _=new Set(Object.keys(z));this.allColumnFilters.forEach((H,G)=>{let W=z[G];Y.push(this.setModelOnFilterWrapper(H,W)),_.delete(G)}),_.forEach((H)=>{let G=Z.getColDefColOrCol(H);if(!G){V(62,{colId:H});return}if(!G.isFilterAllowed()){V(63,{colId:H});return}let W=this.getOrCreateFilterWrapper(G,!0);if(!W){V(64,{colId:H});return}Y.push(this.setModelOnFilterWrapper(W,z[H],!0))})}else this.model={},this.allColumnFilters.forEach((_)=>{Y.push(this.setModelOnFilterWrapper(_,null))});b.all(Y).then(()=>{let _=this.getModel(!0),H=[];if(this.allColumnFilters.forEach((G,W)=>{let q=U?U[W]:null,B=_?_[W]:null;if(!UJ(q,B))H.push(G.column)}),H.length>0)X?.onFilterChanged({columns:H,source:J});else if(Q)this.updateActive("filterChanged")})}getModel(z){let J={},{allColumnFilters:Q,initialModel:Z,beans:{colModel:$}}=this;if(Q.forEach((X,Y)=>{let U=this.getModelFromFilterWrapper(X);if(I(U))J[Y]=U}),!z)for(let X of Object.keys(Z)){let Y=Z[X];if(I(Y)&&!Q.has(X)&&$.getCol(X)?.isFilterAllowed())J[X]=Y}return J}setState(z,J,Q="api"){if(this.state.clear(),J)for(let Z of Object.keys(J)){let $=J[Z];this.state.set(Z,{model:A0(this.model,Z),state:$})}this.setModel(z,Q,!0)}getState(){let z=this.state;if(!z.size)return;let J={},Q=!1;return z.forEach((Z,$)=>{let X=Z.state;if(X!=null)Q=!0,J[$]=X}),Q?J:void 0}getModelFromFilterWrapper(z){let Q=z.column.getColId();if(z.isHandler)return A0(this.model,Q);let Z=z.filter;if(Z){if(typeof Z.getModel!=="function")return V(66),null;return Z.getModel()}return A0(this.initialModel,Q)}isFilterPresent(){return this.activeColumnFilters.length>0}isAggFilterPresent(){return!!this.activeAggregateFilters.length}disableFilters(){this.initialModel={};let{allColumnFilters:z}=this;if(z.size)return z.forEach((J)=>this.disposeFilterWrapper(J,"advancedFilterEnabled")),!0;return!1}updateActiveFilters(){let z=(_)=>{if(!_)return!1;if(!_.isFilterActive)return V(67),!1;return _.isFilterActive()},{colModel:J,gos:Q}=this.beans,Z=!!c4(Q),$=[],X=[],Y=(_,H,G)=>{if(H)if(e8(_,J.isPivotMode(),J.isPivotActive(),Z))$.push(G);else X.push(G)},U=[];return this.allColumnFilters.forEach((_)=>{let H=_.column,G=H.getColId();if(_.isHandler)U.push(b.resolve().then(()=>{Y(H,this.isHandlerActive(H),{colId:G,isHandler:!0,handler:_.handler,handlerParams:_.handlerParams})}));else{let W=Ez(_);if(W)U.push(W.then((q)=>{Y(H,z(q),{colId:G,isHandler:!1,comp:q})}))}}),b.all(U).then(()=>{this.activeAggregateFilters=$,this.activeColumnFilters=X})}updateFilterFlagInColumns(z,J){let Q=[];return this.allColumnFilters.forEach((Z)=>{let $=Z.column;if(Z.isHandler)Q.push(b.resolve().then(()=>{this.setColFilterActive($,this.isHandlerActive($),z,J)}));else{let X=Ez(Z);if(X)Q.push(X.then((Y)=>{this.setColFilterActive($,Y.isFilterActive(),z,J)}))}}),this.beans.groupFilter?.updateFilterFlags(z,J),b.all(Q)}doFiltersPass(z,J,Q){let{data:Z,aggData:$}=z,X=Q?this.activeAggregateFilters:this.activeColumnFilters,Y=Q?$:Z,U=this.model;for(let _=0;_<X.length;_++){let H=X[_],{colId:G,isHandler:W}=H;if(G===J)continue;if(W){let{handler:q,handlerParams:B}=H;if(!q.doesFilterPass({node:z,data:Y,model:A0(U,G),handlerParams:B}))return!1}else{let q=H.comp;if(typeof q.doesFilterPass!=="function"){r(91);continue}if(!q.doesFilterPass({node:z,data:Y}))return!1}}return!0}getHandlerParams(z){let J=this.allColumnFilters.get(z.getColId());return J?.isHandler?J.handlerParams:void 0}callOnFilterChangedOutsideRenderCycle(z){let{rowRenderer:J,filterManager:Q}=this.beans,Z=()=>{if(this.isAlive())Q?.onFilterChanged(z)};if(J.isRefreshInProgress())setTimeout(Z,0);else Z()}updateBeforeFilterChanged(z={}){let{column:J,additionalEventAttributes:Q}=z,Z=J?.getColId();return this.updateActiveFilters().then(()=>this.updateFilterFlagInColumns("filterChanged",Q).then(()=>{this.allColumnFilters.forEach(($)=>{let{column:X,isHandler:Y}=$;if(Z===X.getColId())return;if(Y)$.handler.onAnyFilterChanged?.();Ez($,Y)?.then((U)=>{if(typeof U?.onAnyFilterChanged==="function")U.onAnyFilterChanged()})}),this.processingFilterChange=!0}))}updateAfterFilterChanged(){this.processingFilterChange=!1}isSuppressFlashingCellsBecauseFiltering(){return!(this.gos.get("allowShowChangeAfterFilter")??!1)&&this.processingFilterChange}onNewRowsLoaded(z){let J=[];this.allColumnFilters.forEach((Q)=>{let Z=Q.isHandler;if(Z)Q.handler.onNewRowsLoaded?.();let $=Ez(Q,Z);if($)J.push($.then((X)=>{X.onNewRowsLoaded?.()}))}),b.all(J).then(()=>this.updateActive(z,{afterDataChange:!0}))}updateActive(z,J){this.updateFilterFlagInColumns(z,J).then(()=>this.updateActiveFilters())}createGetValue(z,J){let{filterValueSvc:Q,colModel:Z}=this.beans;return($,X)=>{let Y=X?Z.getColDefColOrCol(X):z;return Y?Q.getValue(Y,$,J):void 0}}isFilterActive(z){let J=this.cachedFilter(z);if(J?.isHandler)return this.isHandlerActive(z);let Q=J?.filter;if(Q)return Q.isFilterActive();return A0(this.initialModel,z.getColId())!=null}isHandlerActive(z){let J=I(A0(this.model,z.getColId()));if(J)return J;let Q=this.beans.groupFilter;return Q?.isGroupFilter(z)?Q.isFilterActive(z):!1}getOrCreateFilterUi(z){let J=this.getOrCreateFilterWrapper(z,!0);return J?Ez(J):null}getFilterUiForDisplay(z){let J=this.getOrCreateFilterWrapper(z,!0);if(!J)return null;let Q=Ez(J);if(!Q)return null;return Q.then((Z)=>({comp:Z,params:J.filterUi.filterParams,isHandler:J.isHandler}))}getHandler(z,J){let Q=this.getOrCreateFilterWrapper(z,J);return Q?.isHandler?Q.handler:void 0}getOrCreateFilterWrapper(z,J){if(!z.isFilterAllowed())return;let Q=this.cachedFilter(z);if(!Q&&J)Q=this.createFilterWrapper(z),this.setColumnFilterWrapper(z,Q);return Q}cachedFilter(z){return this.allColumnFilters.get(z.getColId())}getDefaultFilter(z,J=!1){return this.getDefaultFilterFromDataType(()=>this.beans.dataTypeSvc?.getBaseDataType(z),J)}getDefaultFilterFromDataType(z,J=!1){if(aH(this.gos))return J?"agSetColumnFloatingFilter":"agSetColumnFilter";return y5(z(),J)}getDefaultFloatingFilter(z){return this.getDefaultFilter(z,!0)}createFilterComp(z,J,Q,Z,$,X){let Y=()=>{let H=this.createFilterCompParams(z,$,X),G=Z(H,$);return aZ(this.beans.userCompFactory,J,G,Q)},U=Y();if(!U)return null;return{compDetails:U,createFilterUi:(H)=>{return(H?Y():U).newAgStackInstance()}}}createFilterInstance(z,J,Q,Z){let $=this.beans.selectableFilter;if($?.isSelectable(J))J=$.getFilterDef(z,J);let{handler:X,handlerParams:Y,handlerGenerator:U}=this.createHandler(z,J,Q)??{},_=this.createFilterComp(z,J,Q,Z,!!X,"init");if(!_)return{compDetails:null,createFilterUi:null,handler:X,handlerGenerator:U,handlerParams:Y};let{compDetails:H,createFilterUi:G}=_;if(this.isGlobalButtons){if(!H.params?.buttons?.length)V(281,{colId:z.getColId()})}return{compDetails:H,handler:X,handlerGenerator:U,handlerParams:Y,createFilterUi:G}}createBaseFilterParams(z,J){let{filterManager:Q,rowModel:Z}=this.beans;return v(this.gos,{column:z,colDef:z.getColDef(),getValue:this.createGetValue(z),doesRowPassOtherFilter:J?()=>!0:($)=>Q?.doesRowPassFilter($,z.getColId())??!0,rowModel:Z})}createFilterCompParams(z,J,Q,Z){let $=this.filterChangedCallbackFactory(z),X=this.createBaseFilterParams(z,Z);if(X.filterChangedCallback=$,X.filterModifiedCallback=Z?()=>{}:(Y)=>this.filterModified(z,Y),J){let Y=X,U=z.getColId(),_=A0(this.model,U);Y.model=_,Y.state=this.state.get(U)??{model:_},Y.onModelChange=(H,G)=>{this.updateStoredModel(U,H),this.refreshHandlerAndUi(z,H,"ui",!1,G).then(()=>{$({...G,source:"columnFilter"})})},Y.onStateChange=(H)=>{this.updateState(z,H),this.updateOrRefreshFilterUi(z)},Y.onAction=(H,G,W)=>{this.updateModel(z,H,G),this.dispatchLocalEvent({type:"filterAction",column:z,action:H,event:W})},Y.getHandler=()=>this.getHandler(z,!0),Y.onUiChange=(H)=>this.filterUiChanged(z,H),Y.source=Q}return X}createFilterUiForHandler(z,J){return J?{created:!1,create:J,filterParams:z.params,compDetails:z}:null}createFilterUiLegacy(z,J,Q){let Z=J(),$={created:!0,create:J,filterParams:z.params,compDetails:z,promise:Z};return Z.then(Q),$}createFilterWrapper(z){let{compDetails:J,handler:Q,handlerGenerator:Z,handlerParams:$,createFilterUi:X}=this.createFilterInstance(z,z.getColDef(),this.getDefaultFilter(z),(U)=>U),Y=z.getColId();if(Q)return delete this.initialModel[Y],Q.init?.({...$,source:"init",model:A0(this.model,Y)}),{column:z,isHandler:!0,handler:Q,handlerGenerator:Z,handlerParams:$,filterUi:this.createFilterUiForHandler(J,X)};if(X){let U={column:z,filterUi:null,isHandler:!1};return U.filterUi=this.createFilterUiLegacy(J,X,(_)=>{U.filter=_??void 0}),U}return{column:z,filterUi:null,isHandler:!1}}createHandlerFunc(z,J,Q){let{gos:Z,frameworkOverrides:$,registry:X}=this.beans,Y,U=(B)=>{let E=B.filter;if(X$(E)){let K=E.handler;if(K)return K;if(Y=E.doesFilterPass,Y)return()=>({doesFilterPass:Y});return}return typeof E==="string"?E:void 0},_=Z.get("enableFilterHandlers"),H=_?U(J):void 0,G=(B)=>()=>this.createBean(X.createDynamicBean(B,!0)),W,q;if(typeof H==="string"){let B=Z.get("filterHandlers")?.[H];if(B!=null)W=B;else if(ZD.has(H))W=G(H),q=H}else W=H;if(!W){let B,{compName:E,jsComp:K,fwComp:F}=_$($,J);if(E)B=E;else if(K==null&&F==null&&J.filter===!0)B=Q;if(q=this.handlerMap[B],q)W=G(q)}if(!W){if(!_)return;if(o(Z))V(277,{colId:z.getColId()});return OD}return{filterHandler:W,handlerNameOrCallback:Y??q}}createHandler(z,J,Q){let Z=this.createHandlerFunc(z,J,Q);if(!Z)return;let $=DQ(this.beans.userCompFactory,J,this.createFilterCompParams(z,!0,"init")),{handlerNameOrCallback:X,filterHandler:Y}=Z,{handler:U,handlerParams:_}=this.createHandlerFromFunc(z,Y,$);return{handler:U,handlerParams:_,handlerGenerator:X??Y}}createHandlerFromFunc(z,J,Q){let Z=z.getColDef(),$=J(v(this.gos,{column:z,colDef:Z})),X=this.createHandlerParams(z,Q);return{handler:$,handlerParams:X}}createHandlerParams(z,J){let Q=z.getColDef(),Z=z.getColId(),$=this.filterChangedCallbackFactory(z);return v(this.gos,{colDef:Q,column:z,getValue:this.createGetValue(z),doesRowPassOtherFilter:(X)=>this.beans.filterManager?.doesRowPassFilter(X,Z)??!0,onModelChange:(X,Y)=>{this.updateStoredModel(Z,X),this.refreshHandlerAndUi(z,X,"handler",!1,Y).then(()=>{$({...Y,source:"columnFilter"})})},onModelAsStringChange:()=>{z.dispatchColEvent("filterChanged","filterChanged"),this.dispatchLocalEvent({type:"filterModelAsStringChanged",column:z})},filterParams:J})}onColumnsChanged(){let z=[],{colModel:J,filterManager:Q,groupFilter:Z}=this.beans;this.allColumnFilters.forEach((X,Y)=>{let U;if(X.column.isPrimary())U=J.getColDefCol(Y);else U=J.getCol(Y);if(U&&U===X.column)return;z.push(X.column),this.disposeFilterWrapper(X,"columnChanged"),this.disposeColumnListener(Y)});let $=Z&&z.every((X)=>Z.isGroupFilter(X));if(z.length>0&&!$)Q?.onFilterChanged({columns:z,source:"api"})}isFilterAllowed(z){if(!z.isFilterAllowed())return!1;let Q=this.beans.groupFilter;if(Q?.isGroupFilter(z))return Q.isFilterAllowed(z);return!0}getFloatingFilterCompDetails(z,J){let{userCompFactory:Q,frameworkOverrides:Z,selectableFilter:$,gos:X}=this.beans,Y=(B)=>{this.getOrCreateFilterUi(z)?.then((K)=>{B(Zz(K))})},U=z.getColDef(),_=$?.isSelectable(U)?$.getFilterDef(z,U):U,H=x5(Z,_,()=>this.getDefaultFloatingFilter(z))??"agReadOnlyFloatingFilter",G=X.get("enableFilterHandlers"),W=DQ(Q,_,this.createFilterCompParams(z,G,"init",!0)),q=v(X,{column:z,filterParams:W,currentParentModel:()=>this.getCurrentFloatingFilterParentModel(z),parentFilterInstance:Y,showParentFilter:J});if(G){let B=q,E=z.getColId(),K=this.filterChangedCallbackFactory(z);B.onUiChange=(F)=>this.floatingFilterUiChanged(z,F),B.model=A0(this.model,E),B.onModelChange=(F,L)=>{this.updateStoredModel(E,F),this.refreshHandlerAndUi(z,F,"floating",!0,L).then(()=>{K({...L,source:"columnFilter"})})},B.getHandler=()=>this.getHandler(z,!0),B.source="init"}return oZ(Q,U,q,H)}getCurrentFloatingFilterParentModel(z){return this.getModelFromFilterWrapper(this.cachedFilter(z)??{column:z})}destroyFilterUi(z,J,Q,Z){if(z.isHandler){let X=J.getColId();delete this.initialModel[X],this.state.delete(X);let Y=z.filterUi,U=this.createFilterUiForHandler(Q,Z);z.filterUi=U;let _=this.eventSvc;if(Y?.created)Y.promise.then((H)=>{this.destroyBean(H),_.dispatchEvent({type:"filterDestroyed",source:"paramsUpdated",column:J})});else _.dispatchEvent({type:"filterHandlerDestroyed",source:"paramsUpdated",column:J})}else this.destroyFilter(J,"paramsUpdated")}destroyFilter(z,J="api"){let Q=z.getColId(),Z=this.allColumnFilters.get(Q);if(this.disposeColumnListener(Q),delete this.initialModel[Q],Z)this.disposeFilterWrapper(Z,J).then(($)=>{if($&&this.isAlive())this.beans.filterManager?.onFilterChanged({columns:[z],source:"api"})})}disposeColumnListener(z){let J=this.allColumnListeners.get(z);if(J)this.allColumnListeners.delete(z),J()}disposeFilterWrapper(z,J){let Q=!1,{column:Z,isHandler:$,filterUi:X}=z,Y=Z.getColId();if($)Q=this.isHandlerActive(Z),this.destroyBean(z.handler),delete this.model[Y],this.state.delete(Y);let U=()=>{this.setColFilterActive(Z,!1,"filterDestroyed"),this.allColumnFilters.delete(Y),this.eventSvc.dispatchEvent({type:"filterDestroyed",source:J,column:Z})};if(X)if(X.created)return X.promise.then((_)=>{return Q=$?Q:!!_?.isFilterActive(),this.destroyBean(_),U(),Q});else U();return b.resolve(Q)}filterChangedCallbackFactory(z){return(J)=>{this.callOnFilterChangedOutsideRenderCycle({additionalEventAttributes:J,columns:[z],column:z,source:J?.source??"columnFilter"})}}filterParamsChanged(z,J="api"){let Q=this.allColumnFilters.get(z);if(!Q)return;let Z=this.beans,$=Q.column,X=$.getColDef(),Y=$.isFilterAllowed(),U=this.getDefaultFilter($),_=Z.selectableFilter,H=_?.isSelectable(X)?_.getFilterDef($,X):X,G=Y?this.createHandlerFunc($,H,this.getDefaultFilter($)):void 0,W=!!G,q=Q.isHandler;if(q!=W){this.destroyFilter($,"paramsUpdated");return}let{compDetails:B,createFilterUi:E}=(Y?this.createFilterComp($,H,U,(F)=>F,W,"colDef"):null)??{compDetails:null,createFilterUi:null},K=B?.params??DQ(Z.userCompFactory,H,this.createFilterCompParams($,W,"colDef"));if(q){let F=G?.handlerNameOrCallback??G?.filterHandler,L=A0(this.model,z);if(Q.handlerGenerator!=F){let M=Q.handler,{handler:D,handlerParams:A}=this.createHandlerFromFunc($,G.filterHandler,K);if(Q.handler=D,Q.handlerParams=A,Q.handlerGenerator=F,delete this.model[z],D.init?.({...A,source:"init",model:null}),this.destroyBean(M),L!=null)this.beans.filterManager?.onFilterChanged({columns:[$],source:J})}else{let M=this.createHandlerParams($,B?.params);Q.handlerParams=M,Q.handler.refresh?.({...M,source:"colDef",model:L})}}if(this.areFilterCompsDifferent(Q.filterUi?.compDetails??null,B)||!Q.filterUi||!B){this.destroyFilterUi(Q,$,B,E);return}Q.filterUi.filterParams=K,Ez(Q,q)?.then((F)=>{if((F?.refresh?F.refresh(K):!0)===!1)this.destroyFilterUi(Q,$,B,E);else this.dispatchLocalEvent({type:"filterParamsChanged",column:$,params:K})})}refreshHandlerAndUi(z,J,Q,Z,$){let X=this.cachedFilter(z);if(!X){if(Z)this.getOrCreateFilterWrapper(z,!0);return b.resolve()}if(!X.isHandler)return b.resolve();let{filterUi:Y,handler:U,handlerParams:_}=X;return yJ(()=>{if(Y){let{created:H,filterParams:G}=Y;if(H)return Y.promise.then((W)=>{return W?{filter:W,filterParams:G}:void 0});else Y.refreshed=!0}return b.resolve(void 0)},U,_,J,this.state.get(z.getColId())??{model:J},Q,$)}setColumnFilterWrapper(z,J){let Q=z.getColId();this.allColumnFilters.set(Q,J),this.allColumnListeners.set(Q,this.addManagedListeners(z,{colDefChanged:()=>this.filterParamsChanged(Q)})[0])}areFilterCompsDifferent(z,J){if(!J||!z)return!0;let{componentClass:Q}=z,{componentClass:Z}=J;return!(Q===Z||Q?.render&&Z?.render&&Q.render===Z.render)}hasFloatingFilters(){return this.beans.colModel.getCols().some((J)=>J.getColDef().floatingFilter)}getFilterInstance(z){let J=this.beans.colModel.getColDefColOrCol(z);if(!J)return Promise.resolve(void 0);let Q=this.getOrCreateFilterUi(J);if(!Q)return Promise.resolve(null);return new Promise((Z)=>{Q.then(($)=>{Z(Zz($))})})}processFilterModelUpdateQueue(){this.modelUpdates.forEach(({model:z,source:J})=>this.setModel(z,J)),this.modelUpdates=[],this.columnModelUpdates.forEach(({key:z,model:J,resolve:Q})=>{this.setModelForColumn(z,J).then(()=>Q())}),this.columnModelUpdates=[]}getModelForColumn(z,J){if(J){let{state:Z,model:$}=this,X=z.getColId(),Y=Z.get(X);if(Y)return Y.model??null;return A0($,X)}let Q=this.cachedFilter(z);return Q?this.getModelFromFilterWrapper(Q):null}setModelForColumn(z,J){if(this.beans.dataTypeSvc?.isPendingInference){let Q=()=>{},Z=new Promise(($)=>{Q=$});return this.columnModelUpdates.push({key:z,model:J,resolve:Q}),Z}return new Promise((Q)=>{this.setModelForColumnLegacy(z,J).then((Z)=>Q(Z))})}getStateForColumn(z){return this.state.get(z)??{model:A0(this.model,z)}}setModelForColumnLegacy(z,J){let Q=this.beans.colModel.getColDefCol(z),Z=Q?this.getOrCreateFilterWrapper(Q,!0):null;return Z?this.setModelOnFilterWrapper(Z,J):b.resolve()}setColDefPropsForDataType(z,J,Q){let Z=z.filter,$=Z===!0?this.getDefaultFilterFromDataType(()=>J.baseDataType):Z;if(typeof $!=="string")return;let X,Y,U=this.beans,{filterParams:_,filterValueGetter:H}=z;if($==="agMultiColumnFilter")({filterParams:X,filterValueGetter:Y}=U.multiFilter?.getParamsForDataType(_,H,J,Q)??{});else({filterParams:X,filterValueGetter:Y}=w5($,_,H,J,Q,U,this.getLocaleTextFunc()));if(z.filterParams=X,Y)z.filterValueGetter=Y}setColFilterActive(z,J,Q,Z){if(z.filterActive!==J)z.filterActive=J,z.dispatchColEvent("filterActiveChanged",Q);z.dispatchColEvent("filterChanged",Q,Z)}setModelOnFilterWrapper(z,J,Q){return new b((Z)=>{if(z.isHandler){let X=z.column,Y=X.getColId(),U=this.model[Y];if(this.updateStoredModel(Y,J),Q&&J===U){Z();return}this.refreshHandlerAndUi(X,J,"api").then(()=>Z());return}let $=Ez(z);if($){$.then((X)=>{if(typeof X?.setModel!=="function"){V(65),Z();return}(X.setModel(J)||b.resolve()).then(()=>Z())});return}Z()})}updateStoredModel(z,J){if(I(J))this.model[z]=J;else delete this.model[z];let Q=this.state.get(z),Z={model:J,state:Q?.state};this.state.set(z,Z)}filterModified(z,J){this.getOrCreateFilterUi(z)?.then((Q)=>{this.eventSvc.dispatchEvent({type:"filterModified",column:z,filterInstance:Q,...J})})}filterUiChanged(z,J){if(this.gos.get("enableFilterHandlers"))this.eventSvc.dispatchEvent({type:"filterUiChanged",column:z,...J})}floatingFilterUiChanged(z,J){if(this.gos.get("enableFilterHandlers"))this.eventSvc.dispatchEvent({type:"floatingFilterUiChanged",column:z,...J})}updateModel(z,J,Q){let Z=z.getColId(),$=this.cachedFilter(z),X=()=>$?.filterUi;$J({action:J,filterParams:$?.filterUi?.filterParams,getFilterUi:X,getModel:()=>A0(this.model,Z),getState:()=>this.state.get(Z),updateState:(Y)=>this.updateState(z,Y),updateModel:(Y)=>X()?.filterParams?.onModelChange(Y,{...Q,fromAction:J}),processModelToApply:$?.isHandler?$.handler.processModelToApply?.bind($.handler):void 0})}updateAllModels(z,J){let Q=[];if(this.allColumnFilters.forEach((Z,$)=>{let X=this.beans.colModel.getColDefCol($);if(X)$J({action:z,filterParams:Z.filterUi?.filterParams,getFilterUi:()=>Z.filterUi,getModel:()=>A0(this.model,$),getState:()=>this.state.get($),updateState:(Y)=>this.updateState(X,Y),updateModel:(Y)=>{this.updateStoredModel($,Y),this.dispatchLocalEvent({type:"filterAction",column:X,action:z}),Q.push(this.refreshHandlerAndUi(X,Y,"ui"))},processModelToApply:Z?.isHandler?Z.handler.processModelToApply?.bind(Z.handler):void 0})}),Q.length)b.all(Q).then(()=>{this.callOnFilterChangedOutsideRenderCycle({source:"columnFilter",additionalEventAttributes:J,columns:[]})})}updateOrRefreshFilterUi(z){let J=z.getColId();sX(()=>this.cachedFilter(z)?.filterUi,()=>A0(this.model,J),()=>this.state.get(J))}updateState(z,J){this.state.set(z.getColId(),J),this.dispatchLocalEvent({type:"filterStateChanged",column:z,state:J})}canApplyAll(){let{state:z,model:J,activeFilterComps:Q}=this;for(let $ of Q)if($.source==="COLUMN_MENU")return!1;let Z=!1;for(let $ of z.keys()){let X=z.get($);if(X.valid===!1)return!1;if((X.model??null)!==A0(J,$))Z=!0}return Z}hasUnappliedModel(z){let{model:J,state:Q}=this;return(Q.get(z)?.model??null)!==A0(J,z)}setGlobalButtons(z){this.isGlobalButtons=z,this.dispatchLocalEvent({type:"filterGlobalButtons",isGlobal:z})}shouldKeepStateOnDetach(z,J){if(J==="newFiltersToolPanel")return!0;let Q=this.beans.filterPanelSvc;if(Q?.isActive)return!!Q.getState(z.getColId());return!1}onPivotModeChanged(z){let{colModel:J,pivotColsSvc:Q}=this.beans,Z=!!c4(this.gos),$=z.currentValue,X=$?this.activeColumnFilters:this.activeAggregateFilters,Y=$?this.activeAggregateFilters:this.activeColumnFilters,U=[];for(let _ of X){let H=J.getColById(_.colId),G=$&&!!Q?.columns.length;if(H&&$===e8(H,$,G,Z))Y.push(_),U.push(_)}b2(X,U)}destroy(){super.destroy(),this.allColumnFilters.forEach((z)=>this.disposeFilterWrapper(z,"gridDestroyed")),this.allColumnListeners.clear(),this.state.clear(),this.activeFilterComps.clear()}};function TD(z){return!!z.filterManager?.isAnyFilterPresent()}function SD(z,J="api"){z.filterManager?.onFilterChanged({source:J})}var ID=class extends j{constructor(){super(...arguments);this.beanName="filterManager",this.advFilterModelUpdateQueue=[]}wireBeans(z){this.quickFilter=z.quickFilter,this.advancedFilter=z.advancedFilter,this.colFilter=z.colFilter}postConstruct(){let z=this.refreshFiltersForAggregations.bind(this),J=this.updateAdvFilterColumns.bind(this);if(this.addManagedEventListeners({columnValueChanged:z,columnPivotChanged:z,columnPivotModeChanged:z,newColumnsLoaded:J,columnVisible:J,advancedFilterEnabledChanged:({enabled:Z})=>this.onAdvFilterEnabledChanged(Z),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:Q}=this;this.alwaysPassFilter=Q.get("alwaysPassFilter"),this.addManagedPropertyListener("alwaysPassFilter",()=>{this.alwaysPassFilter=Q.get("alwaysPassFilter"),this.onFilterChanged({source:"api"})})}isExternalFilterPresentCallback(){let z=this.gos.getCallback("isExternalFilterPresent");return typeof z==="function"&&z({})}doesExternalFilterPass(z){let J=this.gos.get("doesExternalFilterPass");return typeof J==="function"&&J(z)}setFilterState(z,J,Q="api"){if(this.isAdvFilterEnabled())return;this.colFilter?.setState(z,J,Q)}setFilterModel(z,J="api",Q){if(this.isAdvFilterEnabled()){if(!Q)this.warnAdvFilters();return}this.colFilter?.setModel(z,J)}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(z){if(z){if(this.colFilter?.disableFilters())this.onFilterChanged({source:"advancedFilter"})}else if(this.advancedFilter?.isFilterPresent())this.advancedFilter.setModel(null),this.onFilterChanged({source:"advancedFilter"})}isAdvFilterEnabled(){return!!this.advancedFilter?.isEnabled()}isAdvFilterHeaderActive(){return this.isAdvFilterEnabled()&&this.advancedFilter.isHeaderActive()}refreshFiltersForAggregations(){if(c4(this.gos)&&this.isAnyFilterPresent())this.onFilterChanged()}onFilterChanged(z={}){let{source:J,additionalEventAttributes:Q,columns:Z=[]}=z;this.externalFilterPresent=this.isExternalFilterPresentCallback(),(this.colFilter?this.colFilter.updateBeforeFilterChanged(z):b.resolve()).then(()=>{let $={source:J,type:"filterChanged",columns:Z};if(Q)M0($,Q);this.eventSvc.dispatchEvent($),this.colFilter?.updateAfterFilterChanged()})}isSuppressFlashingCellsBecauseFiltering(){return!!this.colFilter?.isSuppressFlashingCellsBecauseFiltering()}isQuickFilterPresent(){return!!this.quickFilter?.isFilterPresent()}updateAggFiltering(){this.aggFiltering=!!c4(this.gos)}isAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&this.shouldApplyQuickFilterAfterAgg()}isNonAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&!this.shouldApplyQuickFilterAfterAgg()}shouldApplyQuickFilterAfterAgg(){return(this.aggFiltering||this.beans.colModel.pivotMode)&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")}doesRowPassAggregateFilters(z){let{rowNode:J}=z;if(this.alwaysPassFilter?.(J))return!0;if(this.isAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(J))return!1;if(this.isAggregateFilterPresent()&&!this.colFilter.doFiltersPass(J,z.colIdToSkip,!0))return!1;return!0}doesRowPassFilter(z,J){if(this.alwaysPassFilter?.(z))return!0;if(this.isNonAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(z))return!1;if(this.externalFilterPresent&&!this.doesExternalFilterPass(z))return!1;if(this.isColumnFilterPresent()&&!this.colFilter.doFiltersPass(z,J))return!1;if(this.isAdvFilterPresent()&&!this.advancedFilter.doesFilterPass(z))return!1;return!0}isFilterAllowed(z){if(this.isAdvFilterEnabled())return!1;return!!this.colFilter?.isFilterAllowed(z)}getAdvFilterModel(){return this.isAdvFilterEnabled()?this.advancedFilter.getModel():null}setAdvFilterModel(z,J="api"){if(!this.isAdvFilterEnabled())return;if(this.beans.dataTypeSvc?.isPendingInference){this.advFilterModelUpdateQueue.push(z);return}this.advancedFilter.setModel(z??null),this.onFilterChanged({source:J})}toggleAdvFilterBuilder(z,J){if(!this.isAdvFilterEnabled())return;this.advancedFilter.getCtrl().toggleFilterBuilder({source:J,force:z})}updateAdvFilterColumns(){if(!this.isAdvFilterEnabled())return;if(this.advancedFilter.updateValidity())this.onFilterChanged({source:"advancedFilter"})}hasFloatingFilters(){if(this.isAdvFilterEnabled())return!1;return!!this.colFilter?.hasFloatingFilters()}getColumnFilterInstance(z){if(this.isAdvFilterEnabled())return this.warnAdvFilters(),Promise.resolve(void 0);return this.colFilter?.getFilterInstance(z)??Promise.resolve(void 0)}warnAdvFilters(){V(68)}setupAdvFilterHeaderComp(z){this.advancedFilter?.getCtrl().setupHeaderComp(z)}getHeaderRowCount(){return this.isAdvFilterHeaderActive()?1:0}getHeaderHeight(){return this.isAdvFilterHeaderActive()?this.advancedFilter.getCtrl().getHeaderHeight():0}processFilterModelUpdateQueue(){for(let z of this.advFilterModelUpdateQueue)this.setAdvFilterModel(z);this.advFilterModelUpdateQueue=[]}setColumnFilterModel(z,J){if(this.isAdvFilterEnabled())return this.warnAdvFilters(),Promise.resolve();return this.colFilter?.setModelForColumn(z,J)??Promise.resolve()}};function fD(z){return{tag:"div",cls:z}}var b5=class extends y{constructor(z){let{className:J="ag-filter-apply-panel"}=z??{};super(fD(J));this.listeners=[],this.validationMessage=null,this.className=J}updateButtons(z,J){let Q=this.buttons;if(this.buttons=z,Q===z)return;let Z=this.getGui();J0(Z);let $;this.destroyListeners();let X=document.createDocumentFragment(),Y=this.className,U=({type:H,label:G})=>{let W=(L)=>{this.dispatchLocalEvent({type:H,event:L})};if(!["apply","clear","reset","cancel"].includes(H))V(75);let q=H==="apply",E=z0({tag:"button",attrs:{type:q&&J?"submit":"button"},ref:`${H}FilterButton`,cls:`ag-button ag-standard-button ${Y}-button${q?" "+Y+"-apply-button":""}`,children:G});if(this.activateTabIndex([E]),q)$=E;let K=(L)=>{if(L.key===R.ENTER)L.preventDefault(),W(L)},F=this.listeners;E.addEventListener("click",W),F.push(()=>E.removeEventListener("click",W)),E.addEventListener("keydown",K),F.push(()=>E.removeEventListener("keydown",K)),X.append(E)};for(let H of z)U(H);this.eApply=$;let _=this.validationTooltipFeature;if($&&!_)this.validationTooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{getGui:()=>this.eApply,getLocation:()=>"advancedFilter",getTooltipShowDelayOverride:()=>1000}));else if(!$&&_)this.validationTooltipFeature=this.destroyBean(_);Z.append(X)}getApplyButton(){return this.eApply}updateValidity(z,J=null){let Q=this.eApply;if(!Q)return;T2(Q,!z),this.validationMessage=J,this.validationTooltipFeature?.setTooltipAndRefresh(this.validationMessage)}destroyListeners(){for(let z of this.listeners)z();this.listeners=[]}destroy(){this.destroyListeners(),super.destroy()}};var g5=class extends y{constructor(z,J,Q,Z,$,X){super();this.column=z,this.wrapper=J,this.eventParent=Q,this.updateModel=Z,this.isGlobalButtons=$,this.enableGlobalButtonCheck=X,this.hidePopup=null,this.applyActive=!1}postConstruct(){let{comp:z,params:J}=this.wrapper,Q=J,Z=Q.useForm,$=Z?"form":"div";if(this.setTemplate({tag:$,cls:"ag-filter-wrapper"}),Z)this.addManagedElementListeners(this.getGui(),{submit:(X)=>{X?.preventDefault()},keydown:this.handleKeyDown.bind(this)});this.appendChild(z.getGui()),this.params=Q,this.resetButtonsPanel(Q),this.addManagedListeners(this.eventParent,{filterParamsChanged:({column:X,params:Y})=>{if(X===this.column)this.resetButtonsPanel(Y,this.params)},filterStateChanged:({column:X,state:Y})=>{if(X===this.column)this.eButtons?.updateValidity(Y.valid!==!1)},filterAction:({column:X,action:Y,event:U})=>{if(X===this.column)this.afterAction(Y,U)},...this.enableGlobalButtonCheck?{filterGlobalButtons:({isGlobal:X})=>{if(X!==this.isGlobalButtons){this.isGlobalButtons=X;let Y=this.params;this.resetButtonsPanel(Y,Y,!0)}}}:void 0})}afterGuiAttached(z){if(z)this.hidePopup=z.hidePopup}resetButtonsPanel(z,J,Q){let{buttons:Z,readOnly:$}=J??{},{buttons:X,readOnly:Y,useForm:U}=z;if(!Q&&$===Y&&UJ(Z,X))return;let _=X&&X.length>0&&!z.readOnly&&!this.isGlobalButtons,H=this.eButtons;if(_){let G=X.map((W)=>{let q=`${W}Filter`;return{type:W,label:A4(this,q)}});if(this.applyActive=a1(this.params),!H){H=this.createBean(new b5),this.appendChild(H.getGui());let W=this.column,q=(B)=>({event:E})=>{this.updateModel(W,B,{fromButtons:!0}),this.afterAction(B,E)};H?.addManagedListeners(H,{apply:q("apply"),clear:q("clear"),reset:q("reset"),cancel:q("cancel")}),this.eButtons=H}H.updateButtons(G,U)}else if(this.applyActive=!1,H)P0(H.getGui()),this.eButtons=this.destroyBean(H)}close(z){let J=this.hidePopup;if(!J)return;let Q=z,Z=Q?.key,$;if(Z===R.ENTER||Z===R.SPACE)$={keyboardEvent:Q};J($),this.hidePopup=null}afterAction(z,J){let{params:Q,applyActive:Z}=this,$=Q?.closeOnApply;switch(z){case"apply":{if(J?.preventDefault(),$&&Z)this.close(J);break}case"reset":{if($&&Z)this.close();break}case"cancel":{if($)this.close(J);break}}}handleKeyDown(z){if(!z.defaultPrevented&&z.key===R.ENTER&&this.applyActive)this.updateModel(this.column,"apply",{fromButtons:!0}),this.afterAction("apply",z)}destroy(){this.hidePopup=null,this.eButtons=this.destroyBean(this.eButtons)}},kD=":where(.ag-menu:not(.ag-tabs) .ag-filter)>:not(.ag-filter-wrapper){min-width:180px}",CD={tag:"div",cls:"ag-filter"},h5=class extends y{constructor(z,J,Q){super(CD);this.column=z,this.source=J,this.enableGlobalButtonCheck=Q,this.wrapper=null}postConstruct(){this.beans.colFilter?.activeFilterComps.add(this),this.createFilter(!0),this.addManagedEventListeners({filterDestroyed:this.onFilterDestroyed.bind(this)})}hasFilter(){return this.wrapper!=null}getFilter(){return this.wrapper?.then((z)=>z.comp)??null}afterInit(){return this.wrapper?.then(()=>{})??b.resolve()}afterGuiAttached(z){this.afterGuiAttachedParams=z,this.wrapper?.then((J)=>{this.comp?.afterGuiAttached(z),J?.comp?.afterGuiAttached?.(z)})}afterGuiDetached(){this.wrapper?.then((z)=>{z?.comp?.afterGuiDetached?.()})}createFilter(z){let{column:J,source:Q,beans:{colFilter:Z}}=this,$=Z.getFilterUiForDisplay(J)??null;this.wrapper=$,$?.then((X)=>{if(!X)return;let{isHandler:Y,comp:U}=X,_;if(Y){let H=!!this.enableGlobalButtonCheck,G=this.createBean(new g5(J,X,Z,Z.updateModel.bind(Z),H&&Z.isGlobalButtons,H));this.comp=G,_=G.getGui()}else if(this.registerCSS(kD),_=U.getGui(),!I(_))V(69,{guiFromFilter:_});if(this.appendChild(_),z)this.eventSvc.dispatchEvent({type:"filterOpened",column:J,source:Q,eGui:this.getGui()});else U.afterGuiAttached?.(this.afterGuiAttachedParams)})}onFilterDestroyed(z){let{source:J,column:Q}=z;if((J==="api"||J==="paramsUpdated")&&Q.getId()===this.column.getId()&&this.beans.colModel.getColDefCol(this.column))J0(this.getGui()),this.comp=this.destroyBean(this.comp),this.createFilter()}destroy(){this.beans.colFilter?.activeFilterComps.delete(this),this.eventSvc.dispatchEvent({type:"filterClosed",column:this.column}),this.wrapper=null,this.comp=this.destroyBean(this.comp),this.afterGuiAttachedParams=void 0,super.destroy()}},vD=class extends j{constructor(){super(...arguments);this.beanName="filterMenuFactory"}wireBeans(z){this.popupSvc=z.popupSvc}hideActiveMenu(){this.hidePopup?.()}showMenuAfterMouseEvent(z,J,Q,Z){if(z&&!z.isColumn)return;this.showPopup(z,($)=>{this.popupSvc?.positionPopupUnderMouseEvent({additionalParams:{column:z},type:Q,mouseEvent:J,ePopup:$})},Q,J.target,F0(this.gos),Z)}showMenuAfterButtonClick(z,J,Q,Z){if(z&&!z.isColumn)return;let $=-1,X="left",Y=F0(this.gos);if(!Y&&this.gos.get("enableRtl"))$=1,X="right";let U=Y?void 0:4*$,_=Y?void 0:4;this.showPopup(z,(H)=>{this.popupSvc?.positionPopupByComponent({type:Q,eventSource:J,ePopup:H,nudgeX:U,nudgeY:_,alignSide:X,keepWithinBounds:!0,position:"under",additionalParams:{column:z}})},Q,J,Y,Z)}showPopup(z,J,Q,Z,$,X){let Y=z?this.createBean(new h5(z,"COLUMN_MENU")):void 0;if(this.activeMenu=Y,!Y?.hasFilter()||!z){r(57);return}let U=z0({tag:"div",cls:`ag-menu${!$?" ag-filter-menu":""}`,role:"presentation"});[this.tabListener]=this.addManagedElementListeners(U,{keydown:(K)=>this.trapFocusWithin(K,U)}),U.appendChild(Y?.getGui());let _,H=()=>Y?.afterGuiDetached(),G=pZ(this.gos)?Z??this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody:void 0,W=(K)=>{x2(z,!1,"contextMenu");let F=K instanceof KeyboardEvent;if(this.tabListener)this.tabListener=this.tabListener();if(F&&Z&&B0(Z))jJ(Z)?.focus({preventScroll:!0});H(),this.destroyBean(this.activeMenu),this.dispatchVisibleChangedEvent(!1,Q,z),X?.()},q=this.getLocaleTextFunc(),B=$&&Q!=="columnFilter"?q("ariaLabelColumnMenu","Column Menu"):q("ariaLabelColumnFilter","Column Filter"),E=this.popupSvc?.addPopup({modal:!0,eChild:U,closeOnEsc:!0,closedCallback:W,positionCallback:()=>J(U),anchorToElement:G,ariaLabel:B});if(E)this.hidePopup=_=E.hideFunc;Y.afterInit().then(()=>{J(U),Y.afterGuiAttached({container:Q,hidePopup:_})}),x2(z,!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,Q,z)}trapFocusWithin(z,J){if(z.key!==R.TAB||z.defaultPrevented||I0(this.beans,J,!1,z.shiftKey))return;z.preventDefault(),E0(J,z.shiftKey)}dispatchVisibleChangedEvent(z,J,Q){this.eventSvc.dispatchEvent({type:"columnMenuVisibleChanged",visible:z,switchingTab:!1,key:J,column:Q??null,columnGroup:null})}isMenuEnabled(z){return z.isFilterAllowed()&&(z.colDef.menuTabs??["filterMenuTab"]).includes("filterMenuTab")}showMenuAfterContextMenuEvent(){}destroy(){this.destroyBean(this.activeMenu),super.destroy()}},ND=class extends j{constructor(){super(...arguments);this.beanName="filterValueSvc"}getValue(z,J,Q){let Z=z.colDef,$=this.beans,X=Q??$.selectableFilter?.getFilterValueGetter(z.colId)??Z.filterValueGetter,Y=$.valueSvc;if(X){let _=typeof X==="function",H=$.expressionSvc;if(!_&&!H)return;let G=$.colModel,W={api:$.gridApi,context:$.gridOptions.context,data:J.data,node:J,column:z,colDef:Z,getValue:(q)=>{let B=G.getColDefColOrCol(q);return B?Y.getValue(B,J,"data"):null}};return _?X(W):H.evaluate(X,W)}let U=Y.getValue(z,J,"data");if(z.colDef.allowFormula){let _=$.formula;if(_?.isFormula(U))return _.resolveValue(z,J)}return U}};var wD=class extends IJ{constructor(z){super(z,"ag-radio-button","radio")}isSelected(){return this.eInput.checked}toggle(){if(this.eInput.disabled)return;if(!this.isSelected())this.setValue(!0)}addInputListeners(){super.addInputListeners(),this.addManagedEventListeners({checkboxChanged:this.onChange.bind(this)})}onChange(z){let J=this.eInput;if(z.selected&&z.name&&J.name&&J.name===z.name&&z.id&&J.id!==z.id)this.setValue(!1,!0)}};var u5=class{constructor(){this.customFilterOptions={}}init(z,J){this.filterOptions=z.filterOptions??J,this.mapCustomOptions(),this.defaultOption=this.getDefaultItem(z.defaultOption)}refresh(z,J){let Q=z.filterOptions??J;if(this.filterOptions!==Q)this.filterOptions=Q,this.customFilterOptions={},this.mapCustomOptions();this.defaultOption=this.getDefaultItem(z.defaultOption)}mapCustomOptions(){let{filterOptions:z}=this;if(!z)return;for(let J of z){if(typeof J==="string")continue;let Q=[["displayKey"],["displayName"],["predicate","test"]],Z=($)=>{if(!$.some((X)=>J[X]!=null))return V(72,{keys:$}),!1;return!0};if(!Q.every(Z)){this.filterOptions=z.filter(($)=>$===J)||[];continue}this.customFilterOptions[J.displayKey]=J}}getDefaultItem(z){let{filterOptions:J}=this;if(z)return z;else if(J.length>=1){let Q=J[0];if(typeof Q==="string")return Q;else if(Q.displayKey)return Q.displayKey;else V(73)}else V(74);return}getCustomOption(z){return this.customFilterOptions[z]}};function P2(z,J,Q){return Q==null?z.splice(J):z.splice(J,Q)}function XJ(z){return z==null||typeof z==="string"&&z.trim().length===0}function yD(z){return z==="AND"||z==="OR"?z:"AND"}function xD(z,J,Q){if(z==null)return;let{predicate:Z}=z;if(Z!=null&&!J.some(($)=>$==null))return Z(J,Q)}function bD(z,J){let Q=z.length;if(Q>J)z.splice(J),V(78),Q=J;return Q}var gD=new Set(["empty","notBlank","blank","today","yesterday","tomorrow","thisWeek","lastWeek","nextWeek","thisMonth","lastMonth","nextMonth","thisQuarter","lastQuarter","nextQuarter","thisYear","lastYear","nextYear","yearToDate","last7Days","last30Days","last90Days","last6Months","last12Months","last24Months"]);function X1(z,J){let Q=J.getCustomOption(z);if(Q){let{numberOfInputs:Z}=Q;return Z!=null?Z:1}if(z&&gD.has(z))return 0;else if(z==="inRange")return 2;return 1}var m5=class extends _1{constructor(z,J,Q){super(z,"simple-filter");this.mapValuesFromModel=J,this.defaultOptions=Q,this.eTypes=[],this.eJoinPanels=[],this.eJoinAnds=[],this.eJoinOrs=[],this.eConditionBodies=[],this.listener=()=>this.onUiChanged(),this.lastUiCompletePosition=null,this.joinOperatorId=0}setParams(z){super.setParams(z);let J=new u5;this.optionsFactory=J,J.init(z,this.defaultOptions),this.commonUpdateSimpleParams(z),this.createOption(),this.createMissingConditionsAndOperators()}updateParams(z,J){this.optionsFactory.refresh(z,this.defaultOptions),super.updateParams(z,J),this.commonUpdateSimpleParams(z)}commonUpdateSimpleParams(z){this.setNumConditions(z),this.defaultJoinOperator=yD(z.defaultJoinOperator),this.filterPlaceholder=z.filterPlaceholder,this.createFilterListOptions(),j4(this.getGui(),"tabindex",this.isReadOnly()?"-1":null)}onFloatingFilterChanged(z,J){this.setTypeFromFloatingFilter(z),this.setValueFromFloatingFilter(J),this.onUiChanged("immediately",!0)}setTypeFromFloatingFilter(z){this.eTypes.forEach((J,Q)=>{let Z=Q===0?z:this.optionsFactory.defaultOption;J.setValue(Z,!0)})}getModelFromUi(){let z=this.getUiCompleteConditions();if(z.length===0)return null;if(this.maxNumConditions>1&&z.length>1)return{filterType:this.filterType,operator:this.getJoinOperator(),conditions:z};return z[0]}getConditionTypes(){return this.eTypes.map((z)=>z.getValue())}getConditionType(z){return this.eTypes[z].getValue()}getJoinOperator(){let{eJoinOrs:z,defaultJoinOperator:J}=this;return z.length===0?J:z[0].getValue()===!0?"OR":"AND"}areNonNullModelsEqual(z,J){let Q=!z.operator,Z=!J.operator;if(!Q&&Z||Q&&!Z)return!1;let X;if(Q){let Y=z,U=J;X=this.areSimpleModelsEqual(Y,U)}else{let Y=z,U=J;X=Y.operator===U.operator&&Z0(Y.conditions,U.conditions,(_,H)=>this.areSimpleModelsEqual(_,H))}return X}setModelIntoUi(z,J){if(z==null)return this.resetUiToDefaults(J),b.resolve();if(z.operator){let Z=z,$=Z.conditions;if($==null)$=[],V(77);let X=bD($,this.maxNumConditions),Y=this.getNumConditions();if(X<Y)this.removeConditionsAndOperators(X);else if(X>Y)for(let _=Y;_<X;_++)this.createJoinOperatorPanel(),this.createOption();let U=Z.operator==="OR";this.eJoinAnds.forEach((_)=>_.setValue(!U,!0)),this.eJoinOrs.forEach((_)=>_.setValue(U,!0)),$.forEach((_,H)=>{this.eTypes[H].setValue(_.type,!0),this.setConditionIntoUi(_,H)})}else{let Z=z;if(this.getNumConditions()>1)this.removeConditionsAndOperators(1);this.eTypes[0].setValue(Z.type,!0),this.setConditionIntoUi(Z,0)}if(this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.updateUiVisibility(),!J)this.params.onUiChange(this.getUiChangeEventParams());return b.resolve()}setNumConditions(z){let J=z.maxNumConditions??2;if(J<1)V(79),J=1;this.maxNumConditions=J;let Q=z.numAlwaysVisibleConditions??1;if(Q<1)V(80),Q=1;if(Q>J)V(81),Q=J;this.numAlwaysVisibleConditions=Q}createOption(){let z=this.getGui(),J=this.createManagedBean(new SM);this.eTypes.push(J),J.addCss("ag-filter-select"),z.appendChild(J.getGui());let Q=this.createEValue();this.eConditionBodies.push(Q),z.appendChild(Q),this.putOptionsIntoDropdown(J),this.resetType(J);let Z=this.getNumConditions()-1;this.forEachPositionInput(Z,($)=>this.resetInput($)),this.addChangedListeners(J,Z)}createJoinOperatorPanel(){let z=z0({tag:"div",cls:"ag-filter-condition"});this.eJoinPanels.push(z);let J=this.createJoinOperator(this.eJoinAnds,z,"and"),Q=this.createJoinOperator(this.eJoinOrs,z,"or");this.getGui().appendChild(z);let Z=this.eJoinPanels.length-1,$=this.joinOperatorId++;if(this.resetJoinOperatorAnd(J,Z,$),this.resetJoinOperatorOr(Q,Z,$),!this.isReadOnly())J.onValueChange(this.listener),Q.onValueChange(this.listener)}createJoinOperator(z,J,Q){let Z=this.createManagedBean(new wD);z.push(Z);let $="ag-filter-condition-operator";return Z.addCss($),Z.addCss(`${$}-${Q}`),J.appendChild(Z.getGui()),Z}createFilterListOptions(){this.filterListOptions=this.optionsFactory.filterOptions.map((z)=>typeof z==="string"?this.createBoilerplateListOption(z):this.createCustomListOption(z))}putOptionsIntoDropdown(z){let{filterListOptions:J}=this;for(let Q of J)z.addOption(Q);z.setDisabled(J.length<=1)}createBoilerplateListOption(z){return{value:z,text:this.translate(z)}}createCustomListOption(z){let{displayKey:J}=z,Q=this.optionsFactory.getCustomOption(z.displayKey);return{value:J,text:Q?this.getLocaleTextFunc()(Q.displayKey,Q.displayName):this.translate(J)}}createBodyTemplate(){return null}getAgComponents(){return[]}updateUiVisibility(){let z=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,z)}updateNumConditions(){let z=-1,J=!0;for(let Q=0;Q<this.getNumConditions();Q++)if(this.isConditionUiComplete(Q))z=Q;else J=!1;if(this.shouldAddNewConditionAtEnd(J))this.createJoinOperatorPanel(),this.createOption();else{let Q=this.lastUiCompletePosition??this.getNumConditions()-2;if(z<Q){this.removeConditionsAndOperators(Q+1);let Z=z+1,$=Q-Z;if($>0)this.removeConditionsAndOperators(Z,$);this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=z}updateConditionStatusesAndValues(z,J){this.eTypes.forEach((Z,$)=>{let X=this.isConditionDisabled($,z);if(Z.setDisabled(X||this.filterListOptions.length<=1),$===1)T2(this.eJoinPanels[0],X),this.eJoinAnds[0].setDisabled(X),this.eJoinOrs[0].setDisabled(X)}),this.eConditionBodies.forEach((Z,$)=>{x(Z,this.isConditionBodyVisible($))});let Q=(J??this.getJoinOperator())==="OR";for(let Z of this.eJoinAnds)Z.setValue(!Q,!0);for(let Z of this.eJoinOrs)Z.setValue(Q,!0);this.forEachInput((Z,$,X,Y)=>{this.setElementDisplayed(Z,$<Y),this.setElementDisabled(Z,this.isConditionDisabled(X,z))}),this.resetPlaceholder()}shouldAddNewConditionAtEnd(z){return z&&this.getNumConditions()<this.maxNumConditions&&!this.isReadOnly()}removeConditionsAndOperators(z,J){if(z>=this.getNumConditions())return;let{eTypes:Q,eConditionBodies:Z,eJoinPanels:$,eJoinAnds:X,eJoinOrs:Y}=this;this.removeComponents(Q,z,J),this.removeElements(Z,z,J),this.removeEValues(z,J);let U=Math.max(z-1,0);this.removeElements($,U,J),this.removeComponents(X,U,J),this.removeComponents(Y,U,J)}removeElements(z,J,Q){let Z=P2(z,J,Q);for(let $ of Z)P0($)}removeComponents(z,J,Q){let Z=P2(z,J,Q);for(let $ of Z)P0($.getGui()),this.destroyBean($)}afterGuiAttached(z){if(super.afterGuiAttached(z),this.resetPlaceholder(),!z?.suppressFocus){let J;if(!this.isReadOnly()){let Q=this.getInputs(0)[0];if(Q instanceof I1&&this.isConditionBodyVisible(0))J=Q.getInputElement();else J=this.eTypes[0]?.getFocusableElement()}(J??this.getGui()).focus({preventScroll:!0})}}shouldKeepInvalidInputState(){return!1}afterGuiDetached(){super.afterGuiDetached();let z=this.params;if(this.beans.colFilter?.shouldKeepStateOnDetach(z.column)||this.shouldKeepInvalidInputState())return;z.onStateChange({model:z.model});let J=-1,Q=-1,Z=!1,$=this.getJoinOperator();for(let Y=this.getNumConditions()-1;Y>=0;Y--)if(this.isConditionUiComplete(Y)){if(J===-1)J=Y,Q=Y}else{let U=Y>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(Y-1),_=Y<J;if(U||_){if(this.removeConditionsAndOperators(Y,1),Z=!0,_)Q--}}let X=!1;if(this.getNumConditions()<this.numAlwaysVisibleConditions)this.createMissingConditionsAndOperators(),X=!0;if(this.shouldAddNewConditionAtEnd(Q===this.getNumConditions()-1))this.createJoinOperatorPanel(),this.createOption(),X=!0;if(X)this.updateConditionStatusesAndValues(Q,$);if(Z)this.updateJoinOperatorsDisabled();this.lastUiCompletePosition=Q}getModelAsString(z){return this.params.getHandler()?.getModelAsString?.(z)??""}resetPlaceholder(){let z=this.getLocaleTextFunc(),{filterPlaceholder:J,eTypes:Q}=this;this.forEachInput((Z,$,X,Y)=>{if(!(Z instanceof I1))return;let U=$===0&&Y>1?"inRangeStart":$===0?"filterOoo":"inRangeEnd",_=$===0&&Y>1?z("ariaFilterFromValue","Filter from value"):$===0?z("ariaFilterValue","Filter Value"):z("ariaFilterToValue","Filter to Value"),H=Q[X].getValue(),G=L$(this,J,U,H);Z.setInputPlaceholder(G),Z.setInputAriaLabel(_)})}setElementValue(z,J,Q){if(z instanceof I1)z.setValue(J!=null?String(J):null,!0)}setElementDisplayed(z,J){if(u1(z))x(z.getGui(),J)}setElementDisabled(z,J){if(u1(z))T2(z.getGui(),J)}attachElementOnChange(z,J){if(z instanceof I1)z.onValueChange(J)}forEachInput(z){this.getConditionTypes().forEach((J,Q)=>{this.forEachPositionTypeInput(Q,J,z)})}forEachPositionInput(z,J){let Q=this.getConditionType(z);this.forEachPositionTypeInput(z,Q,J)}forEachPositionTypeInput(z,J,Q){let Z=X1(J,this.optionsFactory),$=this.getInputs(z);for(let X=0;X<$.length;X++){let Y=$[X];if(Y!=null)Q(Y,X,z,Z)}}isConditionDisabled(z,J){if(this.isReadOnly())return!0;if(z===0)return!1;return z>J+1}isConditionBodyVisible(z){let J=this.getConditionType(z);return X1(J,this.optionsFactory)>0}isConditionUiComplete(z){if(z>=this.getNumConditions())return!1;if(this.getConditionType(z)==="empty")return!1;if(this.getValues(z).some((Q)=>Q==null))return!1;if(this.positionHasInvalidInputs(z))return!1;return!0}getNumConditions(){return this.eTypes.length}getUiCompleteConditions(){let z=[];for(let J=0;J<this.getNumConditions();J++)if(this.isConditionUiComplete(J))z.push(this.createCondition(J));return z}createMissingConditionsAndOperators(){if(this.isReadOnly())return;for(let z=this.getNumConditions();z<this.numAlwaysVisibleConditions;z++)this.createJoinOperatorPanel(),this.createOption()}resetUiToDefaults(z){if(this.removeConditionsAndOperators(this.isReadOnly()?1:this.numAlwaysVisibleConditions),this.eTypes.forEach((J)=>this.resetType(J)),this.eJoinAnds.forEach((J,Q)=>this.resetJoinOperatorAnd(J,Q,this.joinOperatorId+Q)),this.eJoinOrs.forEach((J,Q)=>this.resetJoinOperatorOr(J,Q,this.joinOperatorId+Q)),this.joinOperatorId++,this.forEachInput((J)=>this.resetInput(J)),this.resetPlaceholder(),this.createMissingConditionsAndOperators(),this.lastUiCompletePosition=null,this.updateUiVisibility(),!z)this.params.onUiChange(this.getUiChangeEventParams())}resetType(z){let Q=this.getLocaleTextFunc()("ariaFilteringOperator","Filtering operator");z.setValue(this.optionsFactory.defaultOption,!0).setAriaLabel(Q).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1)}resetJoinOperatorAnd(z,J,Q){this.resetJoinOperator(z,J,this.defaultJoinOperator==="AND",this.translate("andCondition"),Q)}resetJoinOperatorOr(z,J,Q){this.resetJoinOperator(z,J,this.defaultJoinOperator==="OR",this.translate("orCondition"),Q)}resetJoinOperator(z,J,Q,Z,$){this.updateJoinOperatorDisabled(z.setValue(Q,!0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${$}`).setLabel(Z),J)}updateJoinOperatorsDisabled(){let z=(J,Q)=>this.updateJoinOperatorDisabled(J,Q);this.eJoinAnds.forEach(z),this.eJoinOrs.forEach(z)}updateJoinOperatorDisabled(z,J){z.setDisabled(this.isReadOnly()||J>0)}resetInput(z){this.setElementValue(z,null),this.setElementDisabled(z,this.isReadOnly())}setConditionIntoUi(z,J){let Q=this.mapValuesFromModel(z,this.optionsFactory);this.forEachInput((Z,$,X)=>{if(X!==J)return;this.setElementValue(Z,Q[$]!=null?Q[$]:null)})}setValueFromFloatingFilter(z){this.forEachInput((J,Q,Z)=>{this.setElementValue(J,Q===0&&Z===0?z:null,!0)})}addChangedListeners(z,J){if(this.isReadOnly())return;z.onValueChange(this.listener),this.forEachPositionInput(J,(Q)=>{this.attachElementOnChange(Q,this.listener)})}hasInvalidInputs(){return!1}positionHasInvalidInputs(z){return!1}isReadOnly(){return!!this.params.readOnly}};var lX=class extends j{constructor(z,J){super();this.mapValuesFromModel=z,this.defaultOptions=J}init(z){let J=z.filterParams,Q=new u5;this.optionsFactory=Q,Q.init(J,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(new this.FilterModelFormatterClass(Q,J)),this.updateParams(z),this.validateModel(z)}refresh(z){if(z.source==="colDef"){let J=z.filterParams,Q=this.optionsFactory;Q.refresh(J,this.defaultOptions),this.filterModelFormatter.updateParams({optionsFactory:Q,filterParams:J}),this.updateParams(z)}this.validateModel(z)}updateParams(z){this.params=z}doesFilterPass(z){let J=z.model;if(J==null)return!0;let{operator:Q}=J,Z=[];if(Q){let Y=J;Z.push(...Y.conditions??[])}else Z.push(J);let $=Q&&Q==="OR"?"some":"every",X=this.params.getValue(z.node);return Z[$]((Y)=>this.individualConditionPasses(z,Y,X))}getModelAsString(z,J){return this.filterModelFormatter.getModelAsString(z,J)??""}validateModel(z){let{model:J,filterParams:{filterOptions:Q,maxNumConditions:Z}}=z;if(J==null)return;let X=H$(J)?J.conditions:[J],Y=Q?.map((G)=>typeof G==="string"?G:G.displayKey)??this.defaultOptions;if(!(!X||X.every((G)=>Y.find((W)=>W===G.type)!==void 0))){this.params={...z,model:null},z.onModelChange(null);return}let _=!1,H=this.filterType;if(X&&!X.every((G)=>G.filterType===H)||J.filterType!==H)X=X.map((G)=>({...G,filterType:H})),_=!0;if(typeof Z==="number"&&X&&X.length>Z)X=X.slice(0,Z),_=!0;if(_){let G=X.length>1?{...J,filterType:H,conditions:X}:{...X[0],filterType:H};this.params={...z,model:G},z.onModelChange(G)}}individualConditionPasses(z,J,Q){let Z=this.optionsFactory,$=this.mapValuesFromModel(J,Z),X=Z.getCustomOption(J.type),Y=xD(X,$,Q);if(Y!=null)return Y;if(Q==null)return this.evaluateNullValue(J.type);return this.evaluateNonNullValue($,Q,J,z)}},aX=class extends lX{evaluateNullValue(z){let{includeBlanksInEquals:J,includeBlanksInNotEqual:Q,includeBlanksInGreaterThan:Z,includeBlanksInLessThan:$,includeBlanksInRange:X}=this.params.filterParams;switch(z){case"equals":if(J)return!0;break;case"notEqual":if(Q)return!0;break;case"greaterThan":case"greaterThanOrEqual":if(Z)return!0;break;case"lessThan":case"lessThanOrEqual":if($)return!0;break;case"inRange":if(X)return!0;break;case"blank":return!0;case"notBlank":return!1}return!1}evaluateNonNullValue(z,J,Q){let Z=Q.type;if(!this.isValid(J))return Z==="notEqual"||Z==="notBlank";let $=this.comparator(),X=z[0]!=null?$(z[0],J):0;switch(Z){case"equals":return X===0;case"notEqual":return X!==0;case"greaterThan":return X>0;case"greaterThanOrEqual":return X>=0;case"lessThan":return X<0;case"lessThanOrEqual":return X<=0;case"inRange":{let Y=$(z[1],J);return this.params.filterParams.inRangeInclusive?X>=0&&Y<=0:X>0&&Y<0}case"blank":return XJ(J);case"notBlank":return!XJ(J);default:return V(76,{filterModelType:Z}),!0}}},oX={equals:"Equals",notEqual:"NotEqual",greaterThan:"GreaterThan",greaterThanOrEqual:"GreaterThanOrEqual",lessThan:"LessThan",lessThanOrEqual:"LessThanOrEqual",inRange:"InRange"},hD={contains:"Contains",notContains:"NotContains",equals:"TextEquals",notEqual:"TextNotEqual",startsWith:"StartsWith",endsWith:"EndsWith",inRange:"InRange"},c5=class extends j{constructor(z,J,Q){super();this.optionsFactory=z,this.filterParams=J,this.valueFormatter=Q}getModelAsString(z,J){let Q=this.getLocaleTextFunc(),Z=J==="filterToolPanel";if(!z)return Z?A4(this,"filterSummaryInactive"):null;if(z.operator!=null){let X=z,U=(X.conditions??[]).map((H)=>this.getModelAsString(H,J)),_=X.operator==="AND"?"andCondition":"orCondition";return U.join(` ${A4(this,_)} `)}else if(z.type==="blank"||z.type==="notBlank")return Z?A4(this,z.type==="blank"?"filterSummaryBlank":"filterSummaryNotBlank"):Q(z.type,z.type);else{let X=z,Y=this.optionsFactory.getCustomOption(X.type),{displayKey:U,displayName:_,numberOfInputs:H}=Y||{};if(U&&_&&H===0)return Q(U,_);return this.conditionToString(X,Z,X.type==="inRange"||H===2,U,_)}}updateParams(z){let{optionsFactory:J,filterParams:Q}=z;this.optionsFactory=J,this.filterParams=Q}conditionForToolPanel(z,J,Q,Z,$,X){let Y,U=this.getTypeKey(z);if(U)Y=A4(this,U);if($&&X)Y=this.getLocaleTextFunc()($,X);if(Y!=null)if(J)return`${Y} ${A4(this,"filterSummaryInRangeValues",[Q(),Z()])}`;else return`${Y} ${Q()}`;return null}getTypeKey(z){let J=this.filterTypeKeys[z];return J?`filterSummary${J}`:null}formatValue(z){let J=this.valueFormatter;return J?J(z??null)??"":String(z)}};var eX=class extends j{constructor(z){super();this.params=z,this.eInput=P,this.onValueChanged=()=>{}}setupGui(z){this.eInput=this.createManagedBean(new z2(this.params?.config));let J=this.eInput.getGui();z.appendChild(J);let Q=(Z)=>this.onValueChanged(Z);this.addManagedListeners(J,{input:Q,keydown:Q})}setEditable(z){this.eInput.setDisabled(!z)}getValue(){return this.eInput.getValue()}setValue(z,J){this.eInput.setValue(z,J)}setValueChangedListener(z){this.onValueChanged=z}setParams({ariaLabel:z,autoComplete:J,placeholder:Q}){let{eInput:Z}=this;if(Z.setInputAriaLabel(z),J!==void 0)Z.setAutoComplete(J);Z.toggleCss("ag-floating-filter-search-icon",!!Q),Z.setInputPlaceholder(Q)}};function AZ(z){let J=z?.trim();return J===""?z:J}function zY(z,J){let{filter:Q,filterTo:Z,type:$}=z||{};return[Q||null,Z||null].slice(0,X1($,J))}var JY=class extends y{constructor(){super(...arguments);this.defaultDebounceMs=0}setLastTypeFromModel(z){if(!z){this.lastType=this.optionsFactory.defaultOption;return}let J=z.operator,Q;if(J)Q=z.conditions[0];else Q=z;this.lastType=Q.type}canWeEditAfterModelFromParentFilter(z){if(!z)return this.isTypeEditable(this.lastType);if(z.operator)return!1;let Q=z;return this.isTypeEditable(Q.type)}init(z){this.params=z;let J=this.gos.get("enableFilterHandlers");if(this.reactive=J,this.setParams(z),J){let Q=z;this.onModelUpdated(Q.model)}}setParams(z){let J=new u5;this.optionsFactory=J,J.init(z.filterParams,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(new this.FilterModelFormatterClass(J,z.filterParams)),this.setSimpleParams(z,!1)}setSimpleParams(z,J=!0){let Q=this.optionsFactory.defaultOption;if(!J)this.lastType=Q;this.readOnly=!!z.filterParams.readOnly;let Z=this.isTypeEditable(Q);this.setEditable(Z)}refresh(z){this.params=z;let J=z,Q=this.reactive;if(!Q||J.source==="colDef")this.updateParams(z);if(Q){let{source:Z,model:$}=J;if(Z==="dataChanged"||Z==="ui")return;this.onModelUpdated($)}}updateParams(z){let J=this.optionsFactory;J.refresh(z.filterParams,this.defaultOptions),this.setSimpleParams(z),this.filterModelFormatter.updateParams({optionsFactory:J,filterParams:z.filterParams})}onParentModelChanged(z,J){if(J?.afterFloatingFilter||J?.afterDataChange)return;this.onModelUpdated(z)}isTypeEditable(z){return!!z&&!this.readOnly&&X1(z,this.optionsFactory)===1}getAriaLabel(z){return`${this.beans.colNames.getDisplayNameForColumn(z,"header",!0)} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`}},uD={tag:"div",ref:"eFloatingFilterInputContainer",cls:"ag-floating-filter-input",role:"presentation"},QY=class extends JY{constructor(){super(...arguments);this.eFloatingFilterInputContainer=P,this.defaultDebounceMs=500}postConstruct(){this.setTemplate(uD)}onModelUpdated(z){this.setLastTypeFromModel(z),this.setEditable(this.canWeEditAfterModelFromParentFilter(z)),this.inputSvc.setValue(this.filterModelFormatter.getModelAsString(z))}setParams(z){this.setupFloatingFilterInputService(z),super.setParams(z),this.setTextInputParams(z)}setupFloatingFilterInputService(z){this.inputSvc=this.createFloatingFilterInputService(z),this.inputSvc.setupGui(this.eFloatingFilterInputContainer)}setTextInputParams(z){let{inputSvc:J,defaultDebounceMs:Q,readOnly:Z}=this,{filterPlaceholder:$,column:X,browserAutoComplete:Y,filterParams:U}=z,_=this.lastType??this.optionsFactory.defaultOption,H=z.filterParams.filterPlaceholder,G=$===!0?L$(this,H,"filterOoo",_):$||void 0;if(J.setParams({ariaLabel:this.getAriaLabel(X),autoComplete:Y??!1,placeholder:G}),this.applyActive=a1(U),!Z){let W=Q5(U,Q);J.setValueChangedListener(i0(this,this.syncUpWithParentFilter.bind(this),W))}}updateParams(z){super.updateParams(z),this.setTextInputParams(z)}recreateFloatingFilterInputService(z){let{inputSvc:J}=this,Q=J.getValue();J0(this.eFloatingFilterInputContainer),this.destroyBean(J),this.setupFloatingFilterInputService(z),J.setValue(Q,!0)}syncUpWithParentFilter(z){let J=z.key===R.ENTER,Q=this.reactive;if(Q)this.params.onUiChange();if(this.applyActive&&!J)return;let{inputSvc:Z,params:$,lastType:X}=this,Y=Z.getValue();if($.filterParams.trimInput)Y=AZ(Y),Z.setValue(Y,!0);if(Q){let U=$,_=U.model,H=this.convertValue(Y),G=H==null?null:{..._??{filterType:this.filterType,type:X??this.optionsFactory.defaultOption},filter:H};U.onModelChange(G,{afterFloatingFilter:!0})}else $.parentFilterInstance((U)=>{U?.onFloatingFilterChanged(X||null,Y||null)})}convertValue(z){return z||null}setEditable(z){this.inputSvc.setEditable(z)}};var z9=".ag-input-field-input",ZY=class{constructor(z,J,Q,Z,$,X){this.context=z,this.eParent=$,this.alive=!0,this.debouncedReport=i0({isAlive:()=>this.alive},J9,500),this.timeoutHandle=null,nG(J,Q,Z)?.newAgStackInstance().then((U)=>{if(!this.alive){z.destroyBean(U);return}if(this.dateComp=U,!U)return;$.appendChild(U.getGui()),U?.afterGuiAttached?.();let{tempValue:_,disabled:H}=this;if(_)U.setDate(_);if(H!=null)U.setDisabled?.(H);X?.(this)})}destroy(){this.alive=!1,this.dateComp=this.context.destroyBean(this.dateComp)}getDate(){return this.dateComp?this.dateComp.getDate():this.tempValue}setDate(z){let J=this.dateComp;if(J)J.setDate(z);else this.tempValue=z}setDisabled(z){let J=this.dateComp;if(J)J.setDisabled?.(z);else this.disabled=z}setDisplayed(z){x(this.eParent,z)}setInputPlaceholder(z){this.dateComp?.setInputPlaceholder?.(z)}setInputAriaLabel(z){this.dateComp?.setInputAriaLabel?.(z)}afterGuiAttached(z){this.dateComp?.afterGuiAttached?.(z)}updateParams(z){this.dateComp?.refresh?.(z)}setCustomValidity(z,J=!1){let Q=this.dateComp?.getGui().querySelector(z9);if(Q&&"setCustomValidity"in Q){let Z=z.length>0;if(Q.setCustomValidity(z),Z)if(J)this.timeoutHandle=this.debouncedReport(Q);else J9(Q);else if(this.timeoutHandle)window.clearTimeout(this.timeoutHandle);fZ(Q,Z)}}getValidity(){return this.dateComp?.getGui().querySelector(z9)?.validity}};function J9(z){z.reportValidity()}var p5=["equals","notEqual","lessThan","greaterThan","inRange","blank","notBlank"];function $Y(z,J){let{dateFrom:Q,dateTo:Z,type:$}=z||{};return[Q&&h0(Q,void 0,!0)||null,Z&&h0(Z,void 0,!0)||null].slice(0,X1($,J))}var Q9=1000,Z9=1/0,mD=class extends m5{constructor(){super("dateFilter",$Y,p5);this.eConditionPanelsFrom=[],this.eConditionPanelsTo=[],this.dateConditionFromComps=[],this.dateConditionToComps=[],this.minValidYear=Q9,this.maxValidYear=Z9,this.minValidDate=null,this.maxValidDate=null,this.filterType="date"}afterGuiAttached(z){super.afterGuiAttached(z),this.dateConditionFromComps[0].afterGuiAttached(z),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!Q1()&&this.hasInvalidInputs()&&this.getConditionTypes().includes("inRange")}commonUpdateSimpleParams(z){super.commonUpdateSimpleParams(z);let J=(_,H)=>{let G=z[_];if(G!=null)if(!isNaN(G))return G==null?H:Number(G);else V(82,{param:_});return H},Q=J("minValidYear",Q9),Z=J("maxValidYear",Z9);if(this.minValidYear=Q,this.maxValidYear=Z,Q>Z)V(83);let{minValidDate:$,maxValidDate:X}=z,Y=$ instanceof Date?$:h0($);this.minValidDate=Y;let U=X instanceof Date?X:h0(X);if(this.maxValidDate=U,Y&&U&&Y>U)V(84)}refreshInputValidation(){for(let z=0;z<this.dateConditionFromComps.length;z++)this.refreshInputPairValidation(z,!1,!0)}refreshInputPairValidation(z,J=!1,Q=!1){let{dateConditionFromComps:Z,dateConditionToComps:$,beans:X}=this,Y=Z[z],U=$[z],_=X1(this.getConditionType(z),this.optionsFactory),H=Y.getDate(),G=U.getDate(),W=_>=2?cD(H,G,J):null,q=W?this.translate(W,[String(J?G:H)]):"",B=!Q1()&&!Q;if((J?Y:U).setCustomValidity(q,B),(J?U:Y).setCustomValidity("",B),q.length>0)X.ariaAnnounce.announceValue(q,"dateFilter")}createDateCompWrapper(z,J,Q){let{beans:{userCompFactory:Z,context:$,gos:X},params:Y}=this,U=Q==="from",_=new ZY($,Z,Y.colDef,v(X,{onDateChanged:()=>{this.refreshInputPairValidation(J,U),this.onUiChanged()},onFocusIn:()=>this.refreshInputPairValidation(J,U),filterParams:Y,location:"filter"}),z);return this.addDestroyFunc(()=>_.destroy()),_}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(z,J){return(z?.isInvalid??!1)===(J?.isInvalid??!1)}setElementValue(z,J){if(z.setDate(J),!J)z.setCustomValidity("")}setElementDisplayed(z,J){z.setDisplayed(J)}setElementDisabled(z,J){z.setDisabled(J)}createEValue(){let z=z0({tag:"div",cls:"ag-filter-body"});return this.createFromToElement(z,this.eConditionPanelsFrom,this.dateConditionFromComps,"from"),this.createFromToElement(z,this.eConditionPanelsTo,this.dateConditionToComps,"to"),z}createFromToElement(z,J,Q,Z){let $=z0({tag:"div",cls:`ag-filter-${Z} ag-filter-date-${Z}`});J.push($),z.appendChild($),Q.push(this.createDateCompWrapper($,J.length-1,Z))}removeEValues(z,J){this.removeDateComps(this.dateConditionFromComps,z,J),this.removeDateComps(this.dateConditionToComps,z,J),P2(this.eConditionPanelsFrom,z,J),P2(this.eConditionPanelsTo,z,J)}removeDateComps(z,J,Q){let Z=P2(z,J,Q);for(let $ of Z)$.destroy()}isValidDateValue(z){if(z===null)return!1;let{minValidDate:J,maxValidDate:Q,minValidYear:Z,maxValidYear:$}=this;if(J){if(z<J)return!1}else if(z.getUTCFullYear()<Z)return!1;if(Q){if(z>Q)return!1}else if(z.getUTCFullYear()>$)return!1;return!0}hasInvalidInputs(){let z=!1;return this.forEachInput((J)=>z||(z=J.getDate()!=null&&!(J.getValidity()?.valid??!0))),z}positionHasInvalidInputs(z){let J=!1;return this.forEachPositionInput(z,(Q)=>J||(J=!(Q.getValidity()?.valid??!0))),J}canApply(z){return!this.hasInvalidInputs()}isConditionUiComplete(z){if(!super.isConditionUiComplete(z))return!1;let J=!0;return this.forEachPositionInput(z,(Q,Z,$,X)=>{if(!J||Z>=X)return;J&&(J=this.isValidDateValue(Q.getDate()))}),J}areSimpleModelsEqual(z,J){return z.dateFrom===J.dateFrom&&z.dateTo===J.dateTo&&z.type===J.type}createCondition(z){let J=this.getConditionType(z),Q={},{params:Z,filterType:$}=this,X=this.getValues(z),Y=Z.useIsoSeparator?"T":" ";if(X.length>0)Q.dateFrom=Jz(X[0],!0,Y);if(X.length>1)Q.dateTo=Jz(X[1],!0,Y);return{dateFrom:null,dateTo:null,filterType:$,type:J,...Q}}removeConditionsAndOperators(z,J){if(this.hasInvalidInputs())return;return super.removeConditionsAndOperators(z,J)}resetPlaceholder(){let z=this.getLocaleTextFunc(),J=this.translate("dateFormatOoo"),Q=z("ariaFilterValue","Filter Value");this.forEachInput((Z)=>{Z.setInputPlaceholder(J),Z.setInputAriaLabel(Q)})}getInputs(z){let{dateConditionFromComps:J,dateConditionToComps:Q}=this;if(z>=J.length)return[null,null];return[J[z],Q[z]]}getValues(z){let J=[];return this.forEachPositionInput(z,(Q,Z,$,X)=>{if(Z<X)J.push(Q.getDate())}),J}translate(z,J){let Q=z;if(z==="lessThan")Q="before";else if(z==="greaterThan")Q="after";return super.translate(Q,J)}};function cD(z,J,Q){if(!(z!=null&&J!=null&&z>=J))return null;return`${Q?"max":"min"}DateValidation`}var XY=class extends c5{constructor(z,J){super(z,J,(Q)=>{let{dataTypeSvc:Z,valueSvc:$}=this.beans,X=J.column,Y=Z?.getDateFormatterFunction(X),U=Y?Y(Q??void 0):Q;return $.formatValue(X,null,U)});this.filterTypeKeys=oX}conditionToString(z,J,Q,Z,$){let{type:X}=z,Y=h0(z.dateFrom),U=h0(z.dateTo),_=this.filterParams.inRangeFloatingFilterDateFormat,H=J?this.formatValue.bind(this):(q)=>$E(q,_),G=()=>Y!==null?H(Y):"null",W=()=>U!==null?H(U):"null";if(Y==null&&U==null)return A4(this,X);if(J){let q=this.conditionForToolPanel(X,Q,G,W,Z,$);if(q!=null)return q}if(Q)return`${G()}-${W()}`;if(Y!=null)return H(Y);return`${X}`}};function pD(z,J){let Q=J;if(Q<z)return-1;if(Q>z)return 1;return 0}var iD=class extends aX{constructor(){super($Y,p5);this.filterType="date",this.FilterModelFormatterClass=XY,this.filterTypeToRangeCache=new Map}getOrRefreshRangeCacheItem(z,J){let{filterTypeToRangeCache:Q}=this,Z=Date.now(),$=Q.get(z);if($&&$.expires<Z)$=void 0;if(!$){let[X,Y]=J(new Date(Z),new Date(Z));$={from:X,to:Y,expires:L4(new Date(Z)).getTime()-Z},Q.set(z,$)}return $}comparator(){return this.params.filterParams.comparator??pD}isValid(z){let J=this.params.filterParams.isValidDate;return!J||J(z)}evaluateNonNullValue(z,J,Q){let Z=Q.type,$=this.comparator();if(!this.isValid(J))return Z==="notEqual"||Z==="notBlank";let X=Z,Y=GR[X];if(Y){let{from:U,to:_}=this.getOrRefreshRangeCacheItem(X,Y);return $(U,J)>=0&&$(_,J)<0}return super.evaluateNonNullValue(z,J,Q)}},dD=1,I6=null,nD=()=>{if(I6!=null)return I6;let z,J=typeof navigator>"u"?void 0:navigator.languages?.[0]??navigator.language;if(J&&typeof Intl<"u"&&typeof Intl.Locale==="function")try{z=new Intl.Locale(J).getWeekInfo?.()?.firstDay}catch{z=void 0}return I6=z==null?dD:z%7,I6},e0=(z)=>{return z.setHours(0,0,0,0),z},xJ=(z)=>{let J=z.getDay(),Q=nD(),Z=(J-Q+7)%7;return z.setDate(z.getDate()-Z),e0(z)},bJ=(z,J=1)=>{return z.setDate(z.getDate()-J),z},L4=(z)=>{return z.setDate(z.getDate()+1),e0(z)},YY=(z)=>{return xJ(z),z.setDate(z.getDate()+6),L4(z)},gJ=(z)=>{return z.setDate(1),e0(z)},i5=(z)=>{return z.setDate(1),z.setMonth(z.getMonth()+1),e0(z)},d5=(z)=>{let J=Math.floor(z.getMonth()/3);return z.setMonth(J*3),gJ(z)},UY=(z)=>{let J=Math.floor(z.getMonth()/3);return z.setMonth(J*3+2),i5(z)},n5=(z)=>{return z.setMonth(0,1),e0(z)},_Y=(z)=>{return z.setMonth(12,0),L4(z)},d1=(z)=>bJ(z),jZ=(z)=>d1(xJ(z)),VZ=(z)=>d1(gJ(z)),OZ=(z)=>d1(d5(z)),r5=(z,J)=>[e0(z),L4(J)],rD=(z,J)=>r5(d1(z),d1(J)),t5=(z,J)=>[xJ(z),YY(J)],tD=(z,J)=>t5(jZ(z),jZ(J)),s5=(z,J)=>[gJ(z),i5(J)],sD=(z,J)=>s5(VZ(z),VZ(J)),l5=(z,J)=>[d5(z),UY(J)],lD=(z,J)=>l5(OZ(z),OZ(J)),a5=(z,J)=>[n5(z),_Y(J)],aD=(z,J)=>[n5(z),L4(J)],oD=(z,J)=>[e0(bJ(z,7)),L4(J)],eD=(z,J)=>[e0(bJ(z,30)),L4(J)],zR=(z,J)=>[e0(bJ(z,90)),L4(J)],JR=(z,J)=>{return z.setFullYear(z.getFullYear()-1),z.setMonth(z.getMonth()+6),[e0(z),L4(J)]},QR=(z,J)=>{return z.setFullYear(z.getFullYear()-1),[e0(z),L4(J)]},ZR=(z,J)=>{return z.setFullYear(z.getFullYear()-2),[e0(z),L4(J)]},$R=(z,J)=>{return z.setFullYear(z.getFullYear()-1),J.setFullYear(J.getFullYear()-1),a5(z,J)},XR=(z,J)=>{return z.setFullYear(z.getFullYear()+1),J.setFullYear(J.getFullYear()+1),a5(z,J)},YR=(z,J)=>{return z.setMonth(z.getMonth()+3),J.setMonth(J.getMonth()+3),l5(z,J)},UR=(z,J)=>{return z.setMonth(z.getMonth()+1),J.setMonth(J.getMonth()+1),s5(z,J)},_R=(z,J)=>{return z.setDate(z.getDate()+7),J.setDate(J.getDate()+7),t5(z,J)},HR=(z,J)=>{return z.setDate(z.getDate()+1),J.setDate(J.getDate()+1),r5(z,J)},GR={today:r5,yesterday:rD,tomorrow:HR,thisWeek:t5,lastWeek:tD,nextWeek:_R,thisMonth:s5,lastMonth:sD,nextMonth:UR,thisQuarter:l5,lastQuarter:lD,nextQuarter:YR,thisYear:a5,lastYear:$R,nextYear:XR,yearToDate:aD,last7Days:oD,last30Days:eD,last90Days:zR,last6Months:JR,last12Months:QR,last24Months:ZR,setStartOfDay:e0,setStartOfWeek:xJ,setStartOfNextDay:L4,setStartOfNextWeek:YY,setStartOfMonth:gJ,setStartOfNextMonth:i5,setStartOfQuarter:d5,setStartOfNextQuarter:UY,setStartOfYear:n5,setStartOfNextYear:_Y,setPreviousDay:d1,setPreviousWeek:jZ,setPreviousMonth:VZ,setPreviousQuarter:OZ},WR={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"}]},qR=class extends JY{constructor(){super(WR,[Yz]);this.eReadOnlyText=P,this.eDateWrapper=P,this.FilterModelFormatterClass=XY,this.filterType="date",this.defaultOptions=p5}setParams(z){super.setParams(z),this.createDateComponent();let J=this.getLocaleTextFunc();this.eReadOnlyText.setDisabled(!0).setInputAriaLabel(J("ariaDateFilterInput","Date Filter Input"))}updateParams(z){super.updateParams(z),this.dateComp.updateParams(this.getDateComponentParams()),this.updateCompOnModelChange(z.currentParentModel())}updateCompOnModelChange(z){let J=!this.readOnly&&this.canWeEditAfterModelFromParentFilter(z);if(this.setEditable(J),J){let Q=z?h0(z.dateFrom):null;this.dateComp.setDate(Q),this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(z)),this.dateComp.setDate(null)}setEditable(z){x(this.eDateWrapper,z),x(this.eReadOnlyText.getGui(),!z)}onModelUpdated(z){super.setLastTypeFromModel(z),this.updateCompOnModelChange(z)}onDateChanged(){let z=this.dateComp.getDate();if(this.reactive){let J=this.params;J.onUiChange();let Q=J.model,Z=Jz(z),$=Z==null?null:{...Q??{filterType:this.filterType,type:this.lastType??this.optionsFactory.defaultOption},dateFrom:Z};J.onModelChange($,{afterFloatingFilter:!0})}else this.params.parentFilterInstance((J)=>{J?.onFloatingFilterChanged(this.lastType||null,z)})}getDateComponentParams(){let{filterParams:z}=this.params,J=Q5(z,this.defaultDebounceMs);return v(this.gos,{onDateChanged:i0(this,this.onDateChanged.bind(this),J),filterParams:z,location:"floatingFilter"})}createDateComponent(){let{beans:{context:z,userCompFactory:J},eDateWrapper:Q,params:{column:Z}}=this;this.dateComp=new ZY(z,J,Z.getColDef(),this.getDateComponentParams(),Q,($)=>{$.setInputAriaLabel(this.getAriaLabel(Z))}),this.addDestroyFunc(()=>this.dateComp.destroy())}},BR={tag:"div",cls:"ag-filter-filter",children:[{tag:"ag-input-text-field",ref:"eDateInput",cls:"ag-date-filter"}]},ER=class extends y{constructor(){super(BR,[Yz]);this.eDateInput=P,this.isApply=!1,this.applyOnFocusOut=!1}init(z){this.params=z,this.setParams(z);let J=this.eDateInput.getInputElement();this.addManagedListeners(J,{mouseDown:()=>{if(this.eDateInput.isDisabled()||this.usingSafariDatePicker)return;J.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(z){if(this.eDateInput.isDisabled())return;if(this.isApply){if(this.applyOnFocusOut=!z,z)this.params.onDateChanged();return}if(!z)this.params.onDateChanged()}handleFocusOut(){if(this.applyOnFocusOut)this.applyOnFocusOut=!1,this.params.onDateChanged()}handleFocusIn(){this.params.onFocusIn?.()}setParams(z){let J=this.eDateInput.getInputElement(),Q=this.shouldUseBrowserDatePicker(z);this.usingSafariDatePicker=Q&&fz();let{minValidYear:Z,maxValidYear:$,minValidDate:X,maxValidDate:Y,buttons:U,includeTime:_,colDef:H}=z.filterParams||{},G=this.beans.dataTypeSvc,W=_??G?.getDateIncludesTimeFlag?.(H.cellDataType)??!1;if(Q)if(W)J.type="datetime-local",J.step="1";else J.type="date";else J.type="text";let q=$9(X,Z,!0),B=$9(Y,$,!1);if(q&&B&&q.getTime()>B.getTime())V(87);if(q)J.min=Jz(q,W);if(B)J.max=Jz(B,W);this.isApply=z.location==="floatingFilter"&&!!U?.includes("apply")}refresh(z){this.params=z,this.setParams(z)}getDate(){return h0(this.eDateInput.getValue())}setDate(z){let J=this.params.filterParams.colDef.cellDataType,Q=this.beans.dataTypeSvc?.getDateIncludesTimeFlag(J)??!1;this.eDateInput.setValue(Jz(z,Q))}setInputPlaceholder(z){this.eDateInput.setInputPlaceholder(z)}setInputAriaLabel(z){this.eDateInput.setAriaLabel(z)}setDisabled(z){this.eDateInput.setDisabled(z)}afterGuiAttached(z){if(!z?.suppressFocus)this.eDateInput.getInputElement().focus({preventScroll:!0})}shouldUseBrowserDatePicker(z){return z?.filterParams?.browserDatePicker??!0}};function $9(z,J,Q){if(z&&J)V(Q?85:86);if(z instanceof Date)return z;if(z)return h0(z);else if(J)return h0(`${J}-${Q?"01-01":"12-31"}`);return null}var o5=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"];function PZ(z){return z?.allowedCharPattern??null}function YJ(z){if(z==null)return null;return isNaN(z)?null:z}function HY(z,J){let{filter:Q,filterTo:Z,type:$}=z||{};return[YJ(Q),YJ(Z)].slice(0,X1($,J))}var KR=class extends m5{constructor(){super("numberFilter",HY,o5);this.eValuesFrom=[],this.eValuesTo=[],this.filterType="number",this.defaultDebounceMs=500}afterGuiAttached(z){super.afterGuiAttached(z),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!Q1()&&this.hasInvalidInputs()&&this.getConditionTypes().includes("inRange")}refreshInputValidation(){for(let z=0;z<this.eValuesFrom.length;z++){let J=this.eValuesFrom[z],Q=this.eValuesTo[z];this.refreshInputPairValidation(J,Q)}}refreshInputPairValidation(z,J,Q=!1){let Z=this.params.numberParser,$=X9(Z,z),X=X9(Z,J),Y=FR($,X,Q),U=Y?this.translate(Y,[String(Q?X:$)]):"";if((Q?z:J).setCustomValidity(U),(Q?J:z).setCustomValidity(""),U.length>0)this.beans.ariaAnnounce.announceValue(U,"dateFilter")}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(z,J){return(z?.isInvalid??!1)===(J?.isInvalid??!1)}refresh(z){let J=super.refresh(z),{state:Q,additionalEventAttributes:Z}=z,$=this.state,X=Z?.fromAction;if(X&&X!="apply"||Q.model!==$.model||!this.areStatesEqual(Q.state,$.state))this.refreshInputValidation();return J}setElementValue(z,J,Q){let{numberFormatter:Z}=this.params,$=!Q&&Z?Z(J??null):J;if(super.setElementValue(z,$),$===null)z.setCustomValidity("")}createEValue(){let{params:z,eValuesFrom:J,eValuesTo:Q}=this,Z=PZ(z),$=z0({tag:"div",cls:"ag-filter-body",role:"presentation"}),X=this.createFromToElement($,J,"from",Z),Y=this.createFromToElement($,Q,"to",Z),U=(G,W,q)=>()=>this.refreshInputPairValidation(G,W,q),_=U(X,Y,!0);X.onValueChange(_),X.addGuiEventListener("focusin",_);let H=U(X,Y,!1);return Y.onValueChange(H),Y.addGuiEventListener("focusin",H),$}createFromToElement(z,J,Q,Z){let $=this.createManagedBean(Z?new z2({allowedCharPattern:Z}):new uX);return $.addCss(`ag-filter-${Q}`),$.addCss("ag-filter-filter"),J.push($),z.appendChild($.getGui()),$}removeEValues(z,J){let Q=(Z)=>this.removeComponents(Z,z,J);Q(this.eValuesFrom),Q(this.eValuesTo)}getValues(z){let J=[];return this.forEachPositionInput(z,(Q,Z,$,X)=>{if(Z<X)J.push(YJ(GY(this.params.numberParser,Q.getValue())))}),J}areSimpleModelsEqual(z,J){return z.filter===J.filter&&z.filterTo===J.filterTo&&z.type===J.type}createCondition(z){let J=this.getConditionType(z),Q={filterType:this.filterType,type:J},Z=this.getValues(z);if(Z.length>0)Q.filter=Z[0];if(Z.length>1)Q.filterTo=Z[1];return Q}removeConditionsAndOperators(z,J){if(this.hasInvalidInputs())return;return super.removeConditionsAndOperators(z,J)}getInputs(z){let{eValuesFrom:J,eValuesTo:Q}=this;if(z>=J.length)return[null,null];return[J[z],Q[z]]}hasInvalidInputs(){let z=!1;return this.forEachInput((J)=>z||(z=!J.getInputElement().validity.valid)),z}positionHasInvalidInputs(z){let J=!1;return this.forEachPositionInput(z,(Q)=>J||(J=!Q.getInputElement().validity.valid)),J}canApply(z){return!this.hasInvalidInputs()}};function GY(z,J){if(typeof J==="number")return J;let Q=U0(J);if(Q?.trim()==="")Q=null;if(z)return z(Q);return Q==null||Q.trim()==="-"?null:Number.parseFloat(Q)}function X9(z,J){return YJ(GY(z,J.getValue(!0)))}function FR(z,J,Q){if(!(z!=null&&J!=null&&z>=J))return null;return`strict${Q?"Max":"Min"}ValueValidation`}var WY=class extends c5{constructor(z,J){super(z,J,J.numberFormatter);this.filterTypeKeys=oX}conditionToString(z,J,Q,Z,$){let{filter:X,filterTo:Y,type:U}=z,_=this.formatValue.bind(this);if(J){let H=this.conditionForToolPanel(U,Q,()=>_(X),()=>_(Y),Z,$);if(H!=null)return H}if(Q)return`${_(X)}-${_(Y)}`;if(X!=null)return _(X);return`${U}`}},LR=class extends aX{constructor(){super(HY,o5);this.filterType="number",this.FilterModelFormatterClass=WY}comparator(){return(z,J)=>{if(z===J)return 0;return z<J?1:-1}}isValid(z){return!isNaN(z)}},MR=class extends j{constructor(){super(...arguments);this.onValueChanged=()=>{},this.numberInputActive=!0}setupGui(z){this.eNumberInput=this.createManagedBean(new uX),this.eTextInput=this.createManagedBean(new z2),this.eTextInput.setDisabled(!0);let J=this.eNumberInput.getGui(),Q=this.eTextInput.getGui();z.appendChild(J),z.appendChild(Q),this.setupListeners(J,(Z)=>this.onValueChanged(Z)),this.setupListeners(Q,(Z)=>this.onValueChanged(Z))}setEditable(z){this.numberInputActive=z,this.eNumberInput.setDisplayed(this.numberInputActive),this.eTextInput.setDisplayed(!this.numberInputActive)}setAutoComplete(z){this.eNumberInput.setAutoComplete(z),this.eTextInput.setAutoComplete(z)}getValue(){return this.getActiveInputElement().getValue()}setValue(z,J){this.getActiveInputElement().setValue(z,J)}getActiveInputElement(){return this.numberInputActive?this.eNumberInput:this.eTextInput}setValueChangedListener(z){this.onValueChanged=z}setupListeners(z,J){this.addManagedListeners(z,{input:J,keydown:J})}setParams({ariaLabel:z,autoComplete:J,placeholder:Q}){if(this.setAriaLabel(z),J!==void 0)this.setAutoComplete(J);this.setPlaceholder(this.eNumberInput,Q),this.setPlaceholder(this.eTextInput,Q)}setPlaceholder(z,J){z.toggleCss("ag-floating-filter-search-icon",!!J),z.setInputPlaceholder(J)}setAriaLabel(z){this.eNumberInput.setInputAriaLabel(z),this.eTextInput.setInputAriaLabel(z)}},DR=class extends QY{constructor(){super(...arguments);this.FilterModelFormatterClass=WY,this.filterType="number",this.defaultOptions=o5}updateParams(z){if(PZ(z.filterParams)!==this.allowedCharPattern)this.recreateFloatingFilterInputService(z);super.updateParams(z)}createFloatingFilterInputService(z){if(this.allowedCharPattern=PZ(z.filterParams),this.allowedCharPattern)return this.createManagedBean(new eX({config:{allowedCharPattern:this.allowedCharPattern}}));return this.createManagedBean(new MR)}convertValue(z){return z?Number(z):null}},e5=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"],RR=class extends m5{constructor(){super("textFilter",zY,e5);this.filterType="text",this.eValuesFrom=[],this.eValuesTo=[],this.defaultDebounceMs=500}createCondition(z){let J=this.getConditionType(z),Q={filterType:this.filterType,type:J},Z=this.getValues(z);if(Z.length>0)Q.filter=Z[0];if(Z.length>1)Q.filterTo=Z[1];return Q}areSimpleModelsEqual(z,J){return z.filter===J.filter&&z.filterTo===J.filterTo&&z.type===J.type}getInputs(z){let{eValuesFrom:J,eValuesTo:Q}=this;if(z>=J.length)return[null,null];return[J[z],Q[z]]}getValues(z){let J=[];return this.forEachPositionInput(z,(Q,Z,$,X)=>{if(Z<X)J.push(U0(Q.getValue()))}),J}createEValue(){let z=z0({tag:"div",cls:"ag-filter-body",role:"presentation"}),{eValuesFrom:J,eValuesTo:Q}=this;return this.createFromToElement(z,J,"from"),this.createFromToElement(z,Q,"to"),z}createFromToElement(z,J,Q){let Z=this.createManagedBean(new z2);Z.addCss(`ag-filter-${Q}`),Z.addCss("ag-filter-filter"),J.push(Z),z.appendChild(Z.getGui())}removeEValues(z,J){let Q=(X)=>this.removeComponents(X,z,J),{eValuesFrom:Z,eValuesTo:$}=this;Q(Z),Q($)}},qY=class extends c5{constructor(){super(...arguments);this.filterTypeKeys=hD}conditionToString(z,J,Q,Z,$){let{filter:X,filterTo:Y,type:U}=z;if(J){let _=(G)=>()=>A4(this,"filterSummaryTextQuote",[G]),H=this.conditionForToolPanel(U,Q,_(X),_(Y),Z,$);if(H!=null)return H}if(Q)return`${X}-${Y}`;if(X!=null)return`${X}`;return`${U}`}},AR=({filterOption:z,value:J,filterText:Q})=>{if(Q==null)return!1;switch(z){case"contains":return J.includes(Q);case"notContains":return!J.includes(Q);case"equals":return J===Q;case"notEqual":return J!=Q;case"startsWith":return J.indexOf(Q)===0;case"endsWith":{let Z=J.lastIndexOf(Q);return Z>=0&&Z===J.length-Q.length}default:return!1}},jR=(z)=>z,VR=(z)=>z==null?null:z.toString().toLowerCase(),OR=class extends lX{constructor(){super(zY,e5);this.filterType="text",this.FilterModelFormatterClass=qY}updateParams(z){super.updateParams(z);let J=z.filterParams;this.matcher=J.textMatcher??AR,this.formatter=J.textFormatter??(J.caseSensitive?jR:VR)}evaluateNullValue(z){return z?["notEqual","notContains","blank"].indexOf(z)>=0:!1}evaluateNonNullValue(z,J,Q,Z){let $=z.map((q)=>this.formatter(q))||[],X=this.formatter(J),{api:Y,colDef:U,column:_,context:H,filterParams:{textFormatter:G}}=this.params;if(Q.type==="blank")return XJ(J);else if(Q.type==="notBlank")return!XJ(J);let W={api:Y,colDef:U,column:_,context:H,node:Z.node,data:Z.data,filterOption:Q.type,value:X,textFormatter:G};return $.some((q)=>this.matcher({...W,filterText:q}))}processModelToApply(z){if(z&&this.params.filterParams.trimInput){let J=(Q)=>{let Z={...Q},{filter:$,filterTo:X}=Q;if($)Z.filter=AZ($)??null;if(X)Z.filterTo=AZ(X)??null;return Z};if(H$(z))return{...z,conditions:z.conditions.map(J)};return J(z)}return z}},PR=class extends QY{constructor(){super(...arguments);this.FilterModelFormatterClass=qY,this.filterType="text",this.defaultOptions=e5}createFloatingFilterInputService(){return this.createManagedBean(new eX)}};function TR(z){return!!z.quickFilter?.isFilterPresent()}function SR(z){return z.quickFilter?.getText()}function IR(z){z.quickFilter?.resetCache()}var fR=class extends j{constructor(){super(...arguments);this.beanName="quickFilter",this.quickFilter=null,this.quickFilterParts=null}postConstruct(){let z=this.resetCache.bind(this),J=this.gos;this.addManagedEventListeners({columnPivotModeChanged:z,newColumnsLoaded:z,columnRowGroupChanged:z,columnVisible:()=>{if(!J.get("includeHiddenColumnsInQuickFilter"))this.resetCache()}}),this.addManagedPropertyListener("quickFilterText",(Q)=>this.setFilter(Q.currentValue)),this.addManagedPropertyListeners(["includeHiddenColumnsInQuickFilter","applyQuickFilterBeforePivotOrAgg"],()=>this.onColumnConfigChanged()),this.quickFilter=this.parseFilter(J.get("quickFilterText")),this.parser=J.get("quickFilterParser"),this.matcher=J.get("quickFilterMatcher"),this.setFilterParts(),this.addManagedPropertyListeners(["quickFilterMatcher","quickFilterParser"],()=>this.setParserAndMatcher())}refreshCols(){let{autoColSvc:z,colModel:J,gos:Q,pivotResultCols:Z}=this.beans,$=J.pivotMode,X=z?.getColumns(),Y=J.getColDefCols(),U=($&&!Q.get("applyQuickFilterBeforePivotOrAgg")?Z?.getPivotResultCols()?.list:Y)??[];if(X)U=U.concat(X);this.colsToUse=Q.get("includeHiddenColumnsInQuickFilter")?U:U.filter((_)=>_.isVisible()||_.isRowGroupActive())}isFilterPresent(){return this.quickFilter!==null}doesRowPass(z){let J=this.gos.get("cacheQuickFilter");if(this.matcher)return this.doesRowPassMatcher(J,z);return this.quickFilterParts.every((Q)=>J?this.doesRowPassCache(z,Q):this.doesRowPassNoCache(z,Q))}resetCache(){this.beans.rowModel.forEachNode((z)=>z.quickFilterAggregateText=null)}getText(){return this.gos.get("quickFilterText")}setFilterParts(){let{quickFilter:z,parser:J}=this;if(z)this.quickFilterParts=J?J(z):z.split(" ");else this.quickFilterParts=null}parseFilter(z){if(!I(z))return null;return z.toUpperCase()}setFilter(z){if(z!=null&&typeof z!=="string"){V(70,{newFilter:z});return}let J=this.parseFilter(z);if(this.quickFilter!==J)this.quickFilter=J,this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"})}setParserAndMatcher(){let z=this.gos.get("quickFilterParser"),J=this.gos.get("quickFilterMatcher"),Q=z!==this.parser||J!==this.matcher;if(this.parser=z,this.matcher=J,Q)this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"})}onColumnConfigChanged(){if(this.refreshCols(),this.resetCache(),this.isFilterPresent())this.dispatchLocalEvent({type:"quickFilterChanged"})}doesRowPassNoCache(z,J){return this.colsToUse.some((Q)=>{let Z=this.getTextForColumn(Q,z);return I(Z)&&Z.includes(J)})}doesRowPassCache(z,J){return this.checkGenerateAggText(z),z.quickFilterAggregateText.includes(J)}doesRowPassMatcher(z,J){let Q;if(z)this.checkGenerateAggText(J),Q=J.quickFilterAggregateText;else Q=this.getAggText(J);let{quickFilterParts:Z,matcher:$}=this;return $(Z,Q)}checkGenerateAggText(z){if(!z.quickFilterAggregateText)z.quickFilterAggregateText=this.getAggText(z)}getTextForColumn(z,J){let Q=this.beans.filterValueSvc.getValue(z,J),Z=z.colDef;if(Z.getQuickFilterText){let $=v(this.gos,{value:Q,node:J,data:J.data,column:z,colDef:Z});Q=Z.getQuickFilterText($)}return I(Q)?Q.toString().toUpperCase():null}getAggText(z){let J=[];for(let Q of this.colsToUse){let Z=this.getTextForColumn(Q,z);if(I(Z))J.push(Z)}return J.join(`
70
+ `)}},BY={moduleName:"FilterCore",version:p,beans:[ID],apiFunctions:{isAnyFilterPresent:TD,onFilterChanged:SD},css:[_D]},EY={moduleName:"FilterValue",version:p,beans:[ND]},q1={moduleName:"ColumnFilter",version:p,beans:[PD,vD],dynamicBeans:{headerFilterCellCtrl:$D},icons:{filter:"filter",filterActive:"filter"},apiFunctions:{isColumnFilterPresent:HD,getColumnFilterInstance:GD,destroyFilter:WD,setFilterModel:qD,getFilterModel:BD,getColumnFilterModel:ED,setColumnFilterModel:KD,showColumnFilter:FD,hideColumnFilter:LD,getColumnFilterHandler:MD,doFilterAction:DD},dependsOn:[BY,W1,EY,N5]};var KY={moduleName:"TextFilter",version:p,dependsOn:[q1],userComponents:{agTextColumnFilter:{classImp:RR,params:{useForm:!0}},agTextColumnFloatingFilter:PR},dynamicBeans:{agTextColumnFilterHandler:OR}},FY={moduleName:"NumberFilter",version:p,dependsOn:[q1],userComponents:{agNumberColumnFilter:{classImp:KR,params:{useForm:!0}},agNumberColumnFloatingFilter:DR},dynamicBeans:{agNumberColumnFilterHandler:LR}};var LY={moduleName:"DateFilter",version:p,dependsOn:[q1],userComponents:{agDateColumnFilter:{classImp:mD,params:{useForm:!0}},agDateInput:ER,agDateColumnFloatingFilter:qR},dynamicBeans:{agDateColumnFilterHandler:iD}},kR={moduleName:"QuickFilterCore",version:p,rowModels:["clientSide"],beans:[fR],dependsOn:[BY,EY]},MY={moduleName:"QuickFilter",version:p,apiFunctions:{isQuickFilterPresent:TR,getQuickFilter:SR,resetQuickFilter:IR},dependsOn:[kR]};var CR=class extends j{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(z,J){let Q=this.wrapSvc?.wrap(z,J)??J,Z=!x6.has(z),$=Z?this.asyncListeners:this.syncListeners;if(!$.has(z))$.set(z,new Set);$.get(z).add(Q),this.eventSvc.addListener(z,Q,Z)}removeListener(z,J){let Q=this.wrapSvc?.unwrap(z,J)??J,$=!!this.asyncListeners.get(z)?.delete(Q);if(!$)this.syncListeners.get(z)?.delete(Q);this.eventSvc.removeListener(z,Q,$)}addGlobalListener(z){let J=this.wrapSvc?.wrapGlobal(z)??z,Q=(X,Y)=>{if(x6.has(X))J(X,Y)},Z=(X,Y)=>{if(!x6.has(X))J(X,Y)};this.globalListenerPairs.set(z,{syncListener:Q,asyncListener:Z});let $=this.eventSvc;$.addGlobalListener(Q,!1),$.addGlobalListener(Z,!0)}removeGlobalListener(z){let{eventSvc:J,wrapSvc:Q,globalListenerPairs:Z}=this,$=Q?.unwrapGlobal(z)??z;if(Z.has($)){let{syncListener:Y,asyncListener:U}=Z.get($);J.removeGlobalListener(Y,!1),J.removeGlobalListener(U,!0),Z.delete(z)}else this.syncGlobalListeners.delete($),J.removeGlobalListener($,!1)}destroyEventListeners(z,J){z.forEach((Q,Z)=>{Q.forEach(($)=>this.eventSvc.removeListener(Z,$,J)),Q.clear()}),z.clear()}destroyGlobalListeners(z,J){for(let Q of z)this.eventSvc.removeGlobalListener(Q,J);z.clear()}destroy(){super.destroy(),this.destroyEventListeners(this.syncListeners,!1),this.destroyEventListeners(this.asyncListeners,!0),this.destroyGlobalListeners(this.syncGlobalListeners,!1);let{globalListenerPairs:z,eventSvc:J}=this;z.forEach(({syncListener:Q,asyncListener:Z})=>{J.removeGlobalListener(Q,!1),J.removeGlobalListener(Z,!0)}),z.clear()}};function vR(z,J,Q){z.apiEventSvc?.addListener(J,Q)}function NR(z,J,Q){z.apiEventSvc?.removeListener(J,Q)}function wR(z,J){z.apiEventSvc?.addGlobalListener(J)}function yR(z,J){z.apiEventSvc?.removeGlobalListener(J)}var DY={moduleName:"EventApi",version:p,apiFunctions:{addEventListener:vR,addGlobalListener:wR,removeEventListener:NR,removeGlobalListener:yR},beans:[CR]};function f4(z,J){if(typeof z!=="number")return"";let Q=J(),Z=Q("thousandSeparator",","),$=Q("decimalSeparator",".");return z.toString().replace(".",$).replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1${Z}`)}var xR="↑",bR="↓",gR={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},hR=class extends y{constructor(){super(gR);this.eValue=P,this.eDelta=P,this.refreshCount=0}init(z){this.refresh(z,!0)}showDelta(z,J){let Q=Math.abs(J),Z=z.formatValue(Q),$=I(Z)?Z:Q,X=J>=0,Y=this.eDelta;if(X)Y.textContent=xR+$;else Y.textContent=bR+$;Y.classList.toggle("ag-value-change-delta-up",X),Y.classList.toggle("ag-value-change-delta-down",!X)}setTimerToRemoveDelta(){this.refreshCount++;let z=this.refreshCount;this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{if(z===this.refreshCount)this.hideDeltaValue()},2000)})}hideDeltaValue(){this.eValue.classList.remove("ag-value-change-value-highlight"),J0(this.eDelta)}refresh(z,J=!1){let{value:Q,valueFormatted:Z}=z,{eValue:$,lastValue:X,beans:Y}=this;if(Q===X)return!1;if(I(Z))$.textContent=Z;else if(I(Q))$.textContent=Q;else J0($);if(Y.filterManager?.isSuppressFlashingCellsBecauseFiltering())return!1;let U=Q&&typeof Q==="object"&&"toNumber"in Q?Q.toNumber():Q,_=X&&typeof X==="object"&&"toNumber"in X?X.toNumber():X;if(U===_)return!1;if(typeof U==="number"&&typeof _==="number"){let H=U-_;this.showDelta(z,H)}if(X)$.classList.add("ag-value-change-value-highlight");if(!J)this.setTimerToRemoveDelta();return this.lastValue=Q,!0}},uR=".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}",mR={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},cR=class extends y{constructor(){super(mR);this.eCurrent=P,this.refreshCount=0,this.registerCSS(uR)}init(z){this.refresh(z,!0)}addSlideAnimation(){this.refreshCount++;let z=this.refreshCount;this.ePrevious?.remove();let{beans:J,eCurrent:Q}=this,Z=z0({tag:"span",cls:"ag-value-slide-previous ag-value-slide-out"});this.ePrevious=Z,Z.textContent=Q.textContent,this.getGui().insertBefore(Z,Q),J.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{if(z!==this.refreshCount)return;this.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(()=>{if(z!==this.refreshCount)return;this.ePrevious?.remove(),this.ePrevious=null},3000)})}refresh(z,J=!1){let Q=z.value;if(n(Q))Q="";if(Q===this.lastValue)return!1;if(this.beans.filterManager?.isSuppressFlashingCellsBecauseFiltering())return!1;if(!J)this.addSlideAnimation();this.lastValue=Q;let Z=this.eCurrent;if(I(z.valueFormatted))Z.textContent=z.valueFormatted;else if(I(z.value))Z.textContent=Q;else J0(Z);return!0}},pR=class extends j{constructor(){super(...arguments);this.beanName="cellFlashSvc",this.nextAnimationTime=null,this.nextAnimationCycle=null,this.animations={highlight:new Map,"data-changed":new Map}}animateCell(z,J,Q=this.beans.gos.get("cellFlashDuration"),Z=this.beans.gos.get("cellFadeDuration")){let $=this.animations[J];$.delete(z);let X=Date.now(),Y=X+Q,U=X+Q+Z,_={phase:"flash",flashEndTime:Y,fadeEndTime:U};$.set(z,_);let H=`ag-cell-${J}`,G=`${H}-animation`,{comp:W,eGui:{style:q}}=z;if(W.toggleCss(H,!0),W.toggleCss(G,!1),q.removeProperty("transition"),q.removeProperty("transition-delay"),this.nextAnimationTime&&Y+15<this.nextAnimationTime)clearTimeout(this.nextAnimationCycle),this.nextAnimationCycle=null,this.nextAnimationTime=null;if(!this.nextAnimationCycle)this.beans.frameworkOverrides.wrapIncoming(()=>{this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),Q)}),this.nextAnimationTime=Y}advanceAnimations(){let z=Date.now(),J=null;for(let Q of Object.keys(this.animations)){let Z=this.animations[Q],$=`ag-cell-${Q}`,X=`${$}-animation`;for(let[Y,U]of Z){if(!Y.isAlive()||!Y.comp){Z.delete(Y);continue}let{phase:_,flashEndTime:H,fadeEndTime:G}=U,W=_==="flash"?H:G;if(!(z+15>=W)){J=Math.min(W,J??1/0);continue}let{comp:B,eGui:{style:E}}=Y;switch(_){case"flash":B.toggleCss($,!1),B.toggleCss(X,!0),E.transition=`background-color ${G-H}ms`,E.transitionDelay=`${H-z}ms`,J=Math.min(G,J??1/0),U.phase="fade";break;case"fade":B.toggleCss($,!1),B.toggleCss(X,!1),E.removeProperty("transition"),E.removeProperty("transition-delay"),Z.delete(Y);break}}}if(J==null)this.nextAnimationTime=null,this.nextAnimationCycle=null;else if(J)this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),J-z),this.nextAnimationTime=J}onFlashCells(z,J){if(!z.comp)return;let Q=r4(z.cellPosition);if(J.cells[Q])this.animateCell(z,"highlight")}flashCell(z,J){this.animateCell(z,"data-changed",J?.flashDuration,J?.fadeDuration)}destroy(){for(let z of Object.keys(this.animations))this.animations[z].clear()}};function iR(z,J={}){let{cellFlashSvc:Q}=z;if(!Q)return;z.frameworkOverrides.wrapIncoming(()=>{for(let Z of z.rowRenderer.getCellCtrls(J.rowNodes,J.columns))Q.flashCell(Z,J)})}var RY={moduleName:"HighlightChanges",version:p,beans:[pR],userComponents:{agAnimateShowChangeCellRenderer:hR,agAnimateSlideCellRenderer:cR},apiFunctions:{flashCells:iR}};var dR=class extends j{constructor(){super(...arguments);this.beanName="selectionColSvc"}postConstruct(){this.addManagedPropertyListener("rowSelection",(z)=>{this.onSelectionOptionsChanged(z.currentValue,z.previousValue,Az(z.source))}),this.addManagedPropertyListener("selectionColumnDef",this.updateColumns.bind(this))}addColumns(z){let J=this.columns;if(J==null)return;z.list=J.list.concat(z.list),z.tree=J.tree.concat(z.tree),r2(z)}createColumns(z,J){let Q=()=>{G4(this.beans,this.columns?.tree),this.columns=null},Z=z.treeDepth,X=(this.columns?.treeDepth??-1)==Z,Y=this.generateSelectionCols();if(n2(Y,this.columns?.list??[])&&X)return;Q();let{colGroupSvc:_}=this.beans,H=_?.findDepth(z.tree)??0,G=_?.balanceTreeForAutoCols(Y,H)??[];this.columns={list:Y,tree:G,treeDepth:H,map:{}},J((q)=>{if(!q)return null;let B=q.filter((E)=>!d4(E));return[...Y,...B]})}updateColumns(z){let J=Az(z.source),{beans:Q}=this;for(let Z of this.columns?.list??[]){let $=this.createSelectionColDef(z.currentValue);Z.setColDef($,null,J),o0(Q,{state:[tZ($,Z.colId)]},J)}}getColumn(z){return this.columns?.list.find((J)=>m4(J,z))??null}getColumns(){return this.columns?.list??null}isSelectionColumnEnabled(){let{gos:z,beans:J}=this,Q=z.get("rowSelection");if(typeof Q!=="object"||!o4(z))return!1;let Z=(J.autoColSvc?.getColumns()?.length??0)>0;if(Q.checkboxLocation==="autoGroupColumn"&&Z)return!1;let $=!!Dz(Q),X=v6(Q);return $||X}createSelectionColDef(z){let{gos:J}=this,Q=z??J.get("selectionColumnDef"),Z=J.get("enableRtl"),{rowSpan:$,spanRows:X,...Y}=Q??{};return{width:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:Z?"right":"left",comparator(U,_,H,G){let W=H.isSelected(),q=G.isSelected();return W===q?0:W?1:-1},editable:!1,suppressFillHandle:!0,suppressAutoSize:!0,pinned:null,...Y,colId:o9,chartDataType:"excluded"}}generateSelectionCols(){if(!this.isSelectionColumnEnabled())return[];let z=this.createSelectionColDef(),J=z.colId;this.gos.validateColDef(z,J,!0);let Q=new E4(z,null,J,!1);return this.createBean(Q),[Q]}onSelectionOptionsChanged(z,J,Q){let Z=J&&typeof J!=="string"?Dz(J):void 0,$=z&&typeof z!=="string"?Dz(z):void 0,X=Z!==$,Y=J&&typeof J!=="string"?v6(J):void 0,U=z&&typeof z!=="string"?v6(z):void 0,_=Y!==U,H=h1(z),G=h1(J);if(X||_||H!==G)this.beans.colModel.refreshAll(Q)}destroy(){G4(this.beans,this.columns?.tree),super.destroy()}refreshVisibility(z,J,Q){if(!this.columns?.list.length)return;let Z=z.length+J.length+Q.length;if(Z===0)return;let $=this.columns.list[0];if(!$.isVisible())return;let X=()=>{let _;switch($.pinned){case"left":case!0:_=z;break;case"right":_=Q;break;default:_=J}if(_)X0(_,$)};if((this.beans.rowNumbersSvc?.getColumn(e9)?2:1)===Z)X()}},nR=':where(.ag-selection-checkbox) .ag-checkbox-input-wrapper:before{content:"";cursor:pointer;inset:-8px;position:absolute}';function rR(z,J){if(!J.nodes.every((Y)=>{if(Y.rowPinned&&!CJ(Y))return V(59),!1;if(Y.id===void 0)return V(60),!1;return!0}))return;let{nodes:Z,source:$,newValue:X}=J;z.selectionSvc?.setNodesSelected({nodes:Z,source:$??"api",newValue:X})}function tR(z,J,Q="apiSelectAll"){z.selectionSvc?.selectAllRowNodes({source:Q,selectAll:J})}function sR(z,J,Q="apiSelectAll"){z.selectionSvc?.deselectAllRowNodes({source:Q,selectAll:J})}function lR(z,J="apiSelectAllFiltered"){z.selectionSvc?.selectAllRowNodes({source:J,selectAll:"filtered"})}function aR(z,J="apiSelectAllFiltered"){z.selectionSvc?.deselectAllRowNodes({source:J,selectAll:"filtered"})}function oR(z,J="apiSelectAllCurrentPage"){z.selectionSvc?.selectAllRowNodes({source:J,selectAll:"currentPage"})}function eR(z,J="apiSelectAllCurrentPage"){z.selectionSvc?.deselectAllRowNodes({source:J,selectAll:"currentPage"})}function zA(z){return z.selectionSvc?.getSelectedNodes()??[]}function JA(z){return z.selectionSvc?.getSelectedRows()??[]}var AY=(z,J)=>{for(let Q=0,Z=z.length;Q<Z;++Q){let $=z[Q],X=$.childrenAfterGroup;if(X!==null)AY(X,J),J($)}},t0=(z,J,Q,Z)=>{if(Q!=null){let X=Q.getSortedRows();for(let Y=0,U=X.length;Y<U;++Y){let _=X[Y];if(_.childrenAfterGroup!==null&&!_.destroyed)Z(_)}return}if(z==null)return;let $=z.childrenAfterGroup;if($===null)return;if(J)AY($,Z);Z(z)},QA={tag:"div",cls:"ag-selection-checkbox",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},ZA=class extends y{constructor(){super(QA,[F4]);this.eCheckbox=P}postConstruct(){this.eCheckbox.setPassive(!0)}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){let z=this.getLocaleTextFunc(),{rowNode:J,eCheckbox:Q}=this,Z=J.isSelected(),$=CZ(z,Z),[X,Y]=J.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],U=z(X,Y);Q.setValue(Z,!0),Q.setInputAriaLabel(`${U} (${$})`)}init(z){if(this.rowNode=z.rowNode,this.column=z.column,this.overrides=z.overrides,this.onSelectionChanged(),this.addManagedListeners(this.eCheckbox.getWrapperElement(),{dblclick:a0,click:(Z)=>{if(a0(Z),this.eCheckbox.isDisabled())return;this.beans.selectionSvc?.handleSelectionEvent(Z,this.rowNode,"checkboxSelected")}}),this.addManagedListeners(this.rowNode,{rowSelected:this.onSelectionChanged.bind(this),dataChanged:this.onDataChanged.bind(this),selectableChanged:this.onSelectableChanged.bind(this)}),this.addManagedPropertyListener("rowSelection",({currentValue:Z,previousValue:$})=>{let X=typeof Z==="object"?MQ(Z):void 0,Y=typeof $==="object"?MQ($):void 0;if(X!==Y)this.onSelectableChanged()}),JZ(this.gos)||typeof this.getIsVisible()==="function"){let Z=this.showOrHideSelect.bind(this);this.addManagedEventListeners({displayedColumnsChanged:Z}),this.addManagedListeners(this.rowNode,{dataChanged:Z,cellChanged:Z}),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}showOrHideSelect(){let{column:z,rowNode:J,overrides:Q,gos:Z}=this,$=J.selectable,X=this.getIsVisible(),Y;if(typeof X==="function"){let W=Q?.callbackParams;if(!z)Y=X({...W,node:J,data:J.data});else{let q=z.createColumnFunctionCallbackParams(J);Y=X({...W,...q})}}else Y=X??!1;let U=$&&!Y||!$&&Y,_=$||Y,H=Z.get("rowSelection"),G=H&&typeof H!=="string"?!MQ(H):!!z?.colDef.showDisabledCheckboxes;if(this.setVisible(_&&(U?G:!0)),this.setDisplayed(_&&(U?G:!0)),_)this.eCheckbox.setDisabled(U);if(Q?.removeHidden)this.setDisplayed(_)}getIsVisible(){let z=this.overrides;if(z)return z.isVisible;let J=this.gos.get("rowSelection");if(J&&typeof J!=="string")return Dz(J);return this.column?.colDef?.checkboxSelection}},$A=class{constructor(z,J){this.rowModel=z,this.pinnedRowModel=J,this.selectAll=!1,this.rootId=null,this.endId=null,this.cachedRange=[]}reset(){this.rootId=null,this.endId=null,this.cachedRange.length=0}setRoot(z){this.rootId=z.id,this.endId=null,this.cachedRange.length=0}setEndRange(z){this.endId=z.id,this.cachedRange.length=0}getRange(){if(this.cachedRange.length===0){let z=this.getRoot(),J=this.getEnd();if(z==null||J==null)return this.cachedRange;this.cachedRange=this.getNodesInRange(z,J)??[]}return this.cachedRange}isInRange(z){if(this.rootId===null)return!1;return this.getRange().some((J)=>J.id===z.id)}getRoot(z){if(this.rootId)return this.getRowNode(this.rootId);if(z)return this.setRoot(z),z}getEnd(){if(this.endId)return this.getRowNode(this.endId)}getRowNode(z){let J,{rowModel:Q,pinnedRowModel:Z}=this;if(J??(J=Q.getRowNode(z)),Z?.isManual())J??(J=Z.getPinnedRowById(z,"top")),J??(J=Z.getPinnedRowById(z,"bottom"));return J}truncate(z){let J=this.getRange();if(J.length===0)return{keep:[],discard:[]};let Q=J[0].id===this.rootId,Z=J.findIndex(($)=>$.id===z.id);if(Z>-1){let $=J.slice(0,Z),X=J.slice(Z+1);return this.setEndRange(z),Q?{keep:$,discard:X}:{keep:X,discard:$}}else return{keep:J,discard:[]}}extend(z,J=!1){let Q=this.getRoot();if(Q==null){let $=this.getRange().slice();if(J)z.depthFirstSearch((X)=>!X.group&&$.push(X));return $.push(z),this.setRoot(z),{keep:$,discard:[]}}let Z=this.getNodesInRange(Q,z);if(!Z)return this.setRoot(z),{keep:[z],discard:[]};if(Z.find(($)=>$.id===this.endId))return this.setEndRange(z),{keep:this.getRange(),discard:[]};else{let $=this.getRange().slice();return this.setEndRange(z),{keep:this.getRange(),discard:$}}}getNodesInRange(z,J){let{pinnedRowModel:Q,rowModel:Z}=this;if(!Q?.isManual())return Z.getNodesInRangeForSelection(z,J);if(z.rowPinned==="top"&&!J.rowPinned)return J4(Q,"top",z,void 0).concat(Z.getNodesInRangeForSelection(Z.getRow(0),J)??[]);if(z.rowPinned==="bottom"&&!J.rowPinned){let $=J4(Q,"bottom",void 0,z),X=Z.getRowCount(),Y=Z.getRow(X-1);return(Z.getNodesInRangeForSelection(J,Y)??[]).concat($)}if(!z.rowPinned&&!J.rowPinned)return Z.getNodesInRangeForSelection(z,J);if(z.rowPinned==="top"&&J.rowPinned==="top")return J4(Q,"top",z,J);if(z.rowPinned==="bottom"&&J.rowPinned==="top"){let $=J4(Q,"top",J,void 0),X=J4(Q,"bottom",void 0,z),Y=Z.getRow(0),U=Z.getRow(Z.getRowCount()-1);return $.concat(Z.getNodesInRangeForSelection(Y,U)??[]).concat(X)}if(!z.rowPinned&&J.rowPinned==="top")return J4(Q,"top",J,void 0).concat(Z.getNodesInRangeForSelection(Z.getRow(0),z)??[]);if(z.rowPinned==="top"&&J.rowPinned==="bottom"){let $=J4(Q,"top",z,void 0),X=J4(Q,"bottom",void 0,J),Y=Z.getRow(0),U=Z.getRow(Z.getRowCount()-1);return $.concat(Z.getNodesInRangeForSelection(Y,U)??[]).concat(X)}if(z.rowPinned==="bottom"&&J.rowPinned==="bottom")return J4(Q,"bottom",z,J);if(!z.rowPinned&&J.rowPinned==="bottom"){let $=J4(Q,"bottom",void 0,J),X=Z.getRow(Z.getRowCount());return(Z.getNodesInRangeForSelection(z,X)??[]).concat($)}return null}},XA=class extends j{constructor(z){super();this.column=z,this.cbSelectAllVisible=!1,this.processingEventFromCheckbox=!1}onSpaceKeyDown(z){let J=this.cbSelectAll;if(J.isDisplayed()&&!J.getGui().contains(d(this.beans)))z.preventDefault(),J.setValue(!J.getValue())}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(z){this.headerCellCtrl=z;let J=this.createManagedBean(new IJ);this.cbSelectAll=J,J.addCss("ag-header-select-all"),H0(J.getGui(),"presentation"),this.showOrHideSelectAll();let Q=this.updateStateOfCheckbox.bind(this);this.addManagedEventListeners({newColumnsLoaded:()=>this.showOrHideSelectAll(),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),selectionChanged:Q,paginationChanged:Q,modelUpdated:Q}),this.addManagedPropertyListener("rowSelection",({currentValue:Z,previousValue:$})=>{let X=(Y)=>typeof Y==="string"||!Y||Y.mode==="singleRow"?void 0:Y.selectAll;if(X(Z)!==X($))this.showOrHideSelectAll();this.updateStateOfCheckbox()}),this.addManagedListeners(J,{fieldValueChanged:this.onCbSelectAll.bind(this)}),J.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()}onDisplayedColumnsChanged(z){if(!this.isAlive())return;this.showOrHideSelectAll(z.source==="uiColumnMoved")}showOrHideSelectAll(z=!1){let J=this.isCheckboxSelection();if(this.cbSelectAllVisible=J,this.cbSelectAll.setDisplayed(J),J)this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox();this.refreshSelectAllLabel(z)}updateStateOfCheckbox(){if(!this.cbSelectAllVisible||this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;let z=this.getSelectAllMode(),J=this.beans.selectionSvc,Q=this.cbSelectAll,Z=J.getSelectAllState(z);Q.setValue(Z);let $=J.hasNodesToSelect(z);Q.setDisabled(!$),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(z=!1){let J=this.getLocaleTextFunc(),{headerCellCtrl:Q,cbSelectAll:Z,cbSelectAllVisible:$}=this,X=Z.getValue(),Y=CZ(J,X),U=J("ariaRowSelectAll","Press Space to toggle all rows selection");if(Q.setAriaDescriptionProperty("selectAll",$?`${U} (${Y})`:null),Z.setInputAriaLabel(J("ariaHeaderSelection","Column with Header Selection")),!z)Q.announceAriaDescription()}checkSelectionType(z){if(!C2(this.gos))return V(128,{feature:z}),!1;return!0}checkRightRowModelType(z){let{gos:J,rowModel:Q}=this.beans;if(!(o(J)||Iz(J)))return V(129,{feature:z,rowModel:Q.getType()}),!1;return!0}onCbSelectAll(){if(this.processingEventFromCheckbox)return;if(!this.cbSelectAllVisible)return;let z=this.cbSelectAll.getValue(),J=this.getSelectAllMode(),Q="uiSelectAll";if(J==="currentPage")Q="uiSelectAllCurrentPage";else if(J==="filtered")Q="uiSelectAllFiltered";let Z={source:Q,selectAll:J},$=this.beans.selectionSvc;if(z)$.selectAllRowNodes(Z);else $.deselectAllRowNodes(Z)}isCheckboxSelection(){let{column:z,gos:J,beans:Q}=this,X=typeof J.get("rowSelection")==="object"?"headerCheckbox":"headerCheckboxSelection";return jY(Q,z)&&this.checkRightRowModelType(X)&&this.checkSelectionType(X)}getSelectAllMode(){let z=p9(this.gos,!1);if(z)return z;let{headerCheckboxSelectionCurrentPageOnly:J,headerCheckboxSelectionFilteredOnly:Q}=this.column.colDef;if(J)return"currentPage";if(Q)return"filtered";return"all"}destroy(){super.destroy(),this.cbSelectAll=void 0,this.headerCellCtrl=void 0}};function jY({gos:z,selectionColSvc:J},Q){let Z=z.get("rowSelection"),$=Q.colDef,{headerCheckboxSelection:X}=$,Y=!1;if(typeof Z==="object"){let _=d4(Q),H=U1(Q);if(h1(Z)==="autoGroupColumn"&&H||_&&J?.isSelectionColumnEnabled())Y=v6(Z)}else if(typeof X==="function")Y=X(v(z,{column:Q,colDef:$}));else Y=!!X;return Y}var YA=class extends j{postConstruct(){let{gos:z,beans:J}=this;this.selectionCtx=new $A(J.rowModel,J.pinnedRowModel),this.addManagedPropertyListeners(["isRowSelectable","rowSelection"],()=>{let Q=JZ(z);if(Q!==this.isRowSelectable)this.isRowSelectable=Q,this.updateSelectable()}),this.isRowSelectable=JZ(z),this.addManagedEventListeners({cellValueChanged:(Q)=>this.updateRowSelectable(Q.node),rowNodeDataChanged:(Q)=>this.updateRowSelectable(Q.node)})}destroy(){super.destroy(),this.selectionCtx.reset()}createCheckboxSelectionComponent(){return new ZA}createSelectAllFeature(z){if(jY(this.beans,z))return new XA(z)}isMultiSelect(){return C2(this.gos)}onRowCtrlSelected(z,J,Q){let Z=!!z.rowNode.isSelected();z.forEachGui(Q,($)=>{$.rowComp.toggleCss("ag-row-selected",Z);let X=$.element;if(GJ(X,Z),X.contains(d(this.beans)))J($)})}announceAriaRowSelection(z){if(this.isRowSelectionBlocked(z))return;let J=z.isSelected(),Q=this.beans.editSvc?.isEditing({rowNode:z});if(!z.selectable||Q)return;let $=this.getLocaleTextFunc()(J?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${J?"deselect":"select"} this row`);this.beans.ariaAnnounce?.announceValue($,"rowSelection")}isRowSelectionBlocked(z){return!z.selectable||z.rowPinned&&!CJ(z)||!o4(this.gos)}updateRowSelectable(z,J){let Q=z.rowPinned&&z.pinnedSibling?z.pinnedSibling.selectable:this.isRowSelectable?.(z)??!0;return this.setRowSelectable(z,Q,J),Q}setRowSelectable(z,J,Q){if(z.selectable!==J){if(z.selectable=J,z.dispatchRowEvent("selectableChanged"),Q)return;if(v2(this.gos)){let $=this.calculateSelectedFromChildren(z);this.setNodesSelected({nodes:[z],newValue:$??!1,source:"selectableChanged"});return}if(z.isSelected()&&!z.selectable)this.setNodesSelected({nodes:[z],newValue:!1,source:"selectableChanged"})}}calculateSelectedFromChildren(z){let J=!1,Q=!1;if(!z.childrenAfterGroup?.length)return z.selectable?z.__selected:null;for(let Z=0;Z<z.childrenAfterGroup.length;Z++){let $=z.childrenAfterGroup[Z],X=$.isSelected();if(!$.selectable){let Y=this.calculateSelectedFromChildren($);if(Y===null)continue;X=Y}switch(X){case!0:J=!0;break;case!1:Q=!0;break;default:return}}if(J&&Q)return;if(J)return!0;if(Q)return!1;if(!z.selectable)return null;return z.__selected}selectRowNode(z,J,Q,Z="api"){if(J&&z.destroyed)return!1;let $=!z.selectable&&J,X=z.__selected===J;if($||X)return!1;z.__selected=J,z.dispatchRowEvent("rowSelected");let Y=z.sibling;if(Y&&Y.footer&&Y.__localEventService)Y.dispatchRowEvent("rowSelected");let U=z.pinnedSibling;if(U?.rowPinned&&U.__localEventService)U.dispatchRowEvent("rowSelected");return this.eventSvc.dispatchEvent({...X5(z,this.gos,"rowSelected"),event:Q||null,source:Z}),!0}isCellCheckboxSelection(z,J){let Q=this.gos.get("rowSelection");if(Q&&typeof Q!=="string"){let Z=d4(z)&&Dz(Q);return z.isColumnFunc(J,Z)}else return z.isColumnFunc(J,z.colDef.checkboxSelection)}inferNodeSelections(z,J,Q,Z){let{gos:$,selectionCtx:X}=this,Y=z.isSelected(),U=v2($),_=rH($),H=tH($),G=this.isMultiSelect(),W=Z==="rowClicked";if(W&&!(_||H))return null;if(J&&Q&&G){let q=X.getRoot();if(!q)return null;else if(!q.isSelected()){let B=X.extend(z,U);return{select:[],deselect:B.keep,reset:!1}}else{let B=X.isInRange(z)?X.truncate(z):X.extend(z,U);return{deselect:B.discard,select:B.keep,reset:!1}}}else if(J&&G){let q=X.selectAll?this.beans.rowModel.getRow(0):void 0,B=X.getRoot(q),E=X.isInRange(z)?X.truncate(z):X.extend(z,U);return{select:E.keep,deselect:E.discard,reset:X.selectAll||!!(B&&!B.isSelected())}}else if(Q){if(W){let q=!Y;if(q&&!_||!q&&!H)return null;return X.setRoot(z),{node:z,newValue:q,clearSelection:!1}}return X.setRoot(z),{node:z,newValue:!Y,clearSelection:!G}}else{X.setRoot(z);let q=sH($),B=n6($)==="filteredDescendants",E=W&&(!q||!_);if(B&&Y===void 0&&o($))return{node:z,newValue:!1,checkFilteredNodes:!0,clearSelection:!G||E};if(W){let K=Y?!q:_;if(K===Y&&!E||K&&!_||!K&&!H)return null;return{node:z,newValue:K,clearSelection:!G||E,keepDescendants:z.group&&U}}return{node:z,newValue:!Y,clearSelection:!G||E}}}},UA=class extends YA{constructor(){super(...arguments);this.beanName="selectionSvc",this.selectedNodes=new Map,this.detailSelection=new Map,this.masterSelectsDetail=!1}postConstruct(){super.postConstruct();let{gos:z}=this;this.mode=d6(z),this.groupSelectsDescendants=v2(z),this.groupSelectsFiltered=n6(z)==="filteredDescendants",this.masterSelectsDetail=i7(z)==="detail",this.addManagedPropertyListeners(["groupSelectsChildren","groupSelectsFiltered","rowSelection"],()=>{let J=v2(z),Q=d6(z),Z=n6(z)==="filteredDescendants";if(this.masterSelectsDetail=i7(z)==="detail",J!==this.groupSelectsDescendants||Z!==this.groupSelectsFiltered||Q!==this.mode)this.deselectAllRowNodes({source:"api"}),this.groupSelectsDescendants=J,this.groupSelectsFiltered=Z,this.mode=Q}),this.addManagedEventListeners({rowSelected:this.onRowSelected.bind(this)})}destroy(){super.destroy(),this.resetNodes()}handleSelectionEvent(z,J,Q){if(this.isRowSelectionBlocked(J))return 0;let Z=this.inferNodeSelections(J,z.shiftKey,z.metaKey||z.ctrlKey,Q);if(Z==null)return 0;if(this.selectionCtx.selectAll=!1,"select"in Z){if(Z.reset)this.resetNodes();else this.selectRange(Z.deselect,!1,Q);return this.selectRange(Z.select,!0,Q)}else{let $=Z.checkFilteredNodes?OY(Z.node):Z.newValue;return this.setNodesSelected({nodes:[Z.node],newValue:$,clearSelection:Z.clearSelection,keepDescendants:Z.keepDescendants,event:z,source:Q})}}setNodesSelected({newValue:z,clearSelection:J,suppressFinishActions:Q,nodes:Z,event:$,source:X,keepDescendants:Y=!1}){if(Z.length===0)return 0;let{gos:U}=this;if(!o4(U)&&z)return V(132),0;if(Z.length>1&&!this.isMultiSelect())return V(130),0;let _=0;for(let H=0;H<Z.length;H++){let G=Z[H],W=G.primaryRow;if(W.rowPinned&&!CJ(W)){V(59);continue}if(W.id===void 0){V(60);continue}if(z&&G.destroyed)continue;if(!(this.groupSelectsFiltered&&W.group&&!U.get("treeData"))){if(this.selectRowNode(W,z,$,X))this.detailSelection.delete(W.id),_++}if(this.groupSelectsDescendants&&W.childrenAfterGroup?.length)_+=this.selectChildren(W,z,X)}if(!Q){if(Z.length===1&&X==="api")this.selectionCtx.setRoot(Z[0].primaryRow);if(z&&(J||!this.isMultiSelect()))_+=this.clearOtherNodes(Z[0].primaryRow,Y,X);if(_>0)this.updateGroupsFromChildrenSelections(X),this.dispatchSelectionChanged(X)}return _}selectRange(z,J,Q){let Z=0;if(z.forEach(($)=>{let X=$.primaryRow;if(X.group&&this.groupSelectsDescendants)return;if(this.selectRowNode(X,J,void 0,Q))Z++}),Z>0)this.updateGroupsFromChildrenSelections(Q),this.dispatchSelectionChanged(Q);return Z}selectChildren(z,J,Q){let Z=this.groupSelectsFiltered?z.childrenAfterAggFilter:z.childrenAfterGroup;if(!Z)return 0;return this.setNodesSelected({newValue:J,clearSelection:!1,suppressFinishActions:!0,source:Q,nodes:Z})}getSelectedNodes(){return Array.from(this.selectedNodes.values())}getSelectedRows(){let z=[];return this.selectedNodes.forEach((J)=>J.data&&z.push(J.data)),z}getSelectionCount(){return this.selectedNodes.size}filterFromSelection(z){let J=new Map;this.selectedNodes.forEach((Q,Z)=>{if(z(Q))J.set(Z,Q)}),this.selectedNodes=J}updateGroupsFromChildrenSelections(z,J){if(!this.groupSelectsDescendants)return!1;let{gos:Q,rowModel:Z}=this.beans;if(!o(Q,Z))return!1;let $=Z.rootNode;if(!$)return!1;let X=!1,Y=(U)=>{if(U!==$){let _=this.calculateSelectedFromChildren(U);X=this.selectRowNode(U,_===null?!1:_,void 0,z)||X}};return t0($,this.beans.rowModel.hierarchical,J,Y),X}clearOtherNodes(z,J,Q){let Z=new Map,$=0;return this.selectedNodes.forEach((X)=>{let Y=X.id==z.id;if((J?!HA(z,X):!0)&&!Y){let _=this.selectedNodes.get(X.id);if($+=this.setNodesSelected({nodes:[_],newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:Q}),this.groupSelectsDescendants&&X.parent)Z.set(X.parent.id,X.parent)}}),Z.forEach((X)=>{let Y=this.calculateSelectedFromChildren(X);this.selectRowNode(X,Y===null?!1:Y,void 0,Q)}),$}onRowSelected(z){let J=z.node;if(this.groupSelectsDescendants&&J.group)return;if(J.isSelected())this.selectedNodes.set(J.id,J);else this.selectedNodes.delete(J.id)}syncInRowNode(z,J){this.syncInOldRowNode(z,J),this.syncInNewRowNode(z)}createDaemonNode(z){if(!z.id)return;let J=new Cz(this.beans);return J.id=z.id,J.data=z.data,J.__selected=z.__selected,J.level=z.level,J}syncInOldRowNode(z,J){if(J&&z.id!==J.id){if(this.selectedNodes.get(J.id)==z)this.selectedNodes.set(J.id,J)}}syncInNewRowNode(z){if(this.selectedNodes.has(z.id))z.__selected=!0,this.selectedNodes.set(z.id,z);else z.__selected=!1}reset(z){let J=this.getSelectionCount();if(this.resetNodes(),J)this.dispatchSelectionChanged(z)}resetNodes(){this.selectedNodes.forEach((z)=>{this.selectRowNode(z,!1)}),this.selectedNodes.clear()}getBestCostNodeSelection(){let{gos:z,rowModel:J}=this.beans;if(!o(z,J))return;let Q=J.getTopLevelNodes();if(Q===null)return;let Z=[];function $(X){for(let Y=0,U=X.length;Y<U;Y++){let _=X[Y];if(_.isSelected())Z.push(_);else if(_.group&&_.childrenAfterGroup)$(_.childrenAfterGroup)}}return $(Q),Z}isEmpty(){return this.getSelectionCount()===0}deselectAllRowNodes({source:z,selectAll:J}){let Q=o(this.gos),Z=!1,$=(X)=>{let Y=this.selectRowNode(X.primaryRow,!1,void 0,z);Z||(Z=Y)};if(J==="currentPage"||J==="filtered"){if(!Q){r(102);return}this.getNodesToSelect(J).forEach($)}else this.selectedNodes.forEach($),this.reset(z);if(this.selectionCtx.selectAll=!1,Q&&this.groupSelectsDescendants){let X=this.updateGroupsFromChildrenSelections(z);Z||(Z=X)}if(Z)this.dispatchSelectionChanged(z)}getSelectedCounts(z){let J=0,Q=0;return this.getNodesToSelect(z).forEach((Z)=>{if(this.groupSelectsDescendants&&Z.group)return;if(Z.isSelected())J++;else if(Z.selectable)Q++}),{selectedCount:J,notSelectedCount:Q}}getSelectAllState(z){let{selectedCount:J,notSelectedCount:Q}=this.getSelectedCounts(z);return VY(J,Q)??null}hasNodesToSelect(z){return this.getNodesToSelect(z).filter((J)=>J.selectable).length>0}getNodesToSelect(z){if(!this.canSelectAll())return[];let J=[],Q=($)=>J.push($);if(z==="currentPage")return this.forEachNodeOnPage(($)=>{if(!$.group){Q($);return}if(!$.footer&&!$.expanded){let X=(Y)=>{Q(Y);let U=Y.childrenAfterFilter;if(U)for(let _=0,H=U.length;_<H;++_)X(U[_])};X($);return}if(!this.groupSelectsDescendants)Q($)}),J;let Z=this.beans.rowModel;if(z==="filtered")return Z.forEachNodeAfterFilter(Q),J;return Z.forEachNode(Q),J}forEachNodeOnPage(z){let{pageBounds:J,rowModel:Q}=this.beans,Z=J.getFirstRow(),$=J.getLastRow();for(let X=Z;X<=$;X++){let Y=Q.getRow(X);if(Y)z(Y)}}selectAllRowNodes(z){let{gos:J,selectionCtx:Q}=this;if(!o4(J)){V(132);return}if(nH(J)&&!C2(J)){V(130);return}if(!this.canSelectAll())return;let{source:Z,selectAll:$}=z,X=!1;if(this.getNodesToSelect($).forEach((Y)=>{let U=this.selectRowNode(Y.primaryRow,!0,void 0,Z);X||(X=U)}),Q.selectAll=!0,o(J)&&this.groupSelectsDescendants){let Y=this.updateGroupsFromChildrenSelections(Z);X||(X=Y)}if(X)this.dispatchSelectionChanged(Z)}getSelectionState(){return this.isEmpty()?null:Array.from(this.selectedNodes.keys())}setSelectionState(z,J,Q){if(!z)z=[];if(!Array.isArray(z)){r(103);return}let Z=new Set(z),$=[];if(this.beans.rowModel.forEachNode((X)=>{if(Z.has(X.id))$.push(X)}),Q)this.resetNodes();this.setNodesSelected({newValue:!0,nodes:$,source:J})}canSelectAll(){return o(this.beans.gos)}updateSelectable(z){let{gos:J,rowModel:Q}=this.beans;if(!o4(J))return;let Z="selectableChanged",$=o(J)&&this.groupSelectsDescendants,X=[];if($){let Y=Q.rootNode;if(Y)t0(Y,Q.hierarchical,z,(U)=>{let _=!1;for(let H of U.childrenAfterGroup)if(_||(_=H.selectable),!H.group&&!this.updateRowSelectable(H,!0)&&H.isSelected())X.push(H);this.setRowSelectable(U,_,!0)})}else Q.forEachNode((Y)=>{if(!this.updateRowSelectable(Y,!0)&&Y.isSelected())X.push(Y)});if(X.length)this.setNodesSelected({nodes:X,newValue:!1,source:Z});if(!z&&$)this.updateGroupsFromChildrenSelections?.(Z)}updateSelectableAfterGrouping(z){if(this.updateSelectable(z),this.groupSelectsDescendants){if(this.updateGroupsFromChildrenSelections?.("rowGroupChanged",z))this.dispatchSelectionChanged("rowGroupChanged")}}refreshMasterNodeState(z,J){if(!this.masterSelectsDetail)return;let Q=z.detailNode?.detailGridInfo?.api;if(!Q)return;let Z=_A(Q);if(z.isSelected()!==Z){if(this.selectRowNode(z,Z,J,"masterDetail"))this.dispatchSelectionChanged("masterDetail")}if(!Z)this.detailSelection.set(z.id,new Set(Q.getSelectedNodes().map((X)=>X.id)))}setDetailSelectionState(z,J,Q){if(!this.masterSelectsDetail)return;if(!C2(J)){V(269);return}switch(z.isSelected()){case!0:{Q.selectAll();break}case!1:{Q.deselectAll();break}case void 0:{let Z=this.detailSelection.get(z.id);if(Z){let $=[];for(let X of Z){let Y=Q.getRowNode(X);if(Y)$.push(Y)}Q.setNodesSelected({nodes:$,newValue:!0,source:"masterDetail"})}break}default:break}}dispatchSelectionChanged(z){this.eventSvc.dispatchEvent({type:"selectionChanged",source:z,selectedNodes:this.getSelectedNodes(),serverSideState:null})}};function _A(z){let J=0,Q=0;return z.forEachNode((Z)=>{if(Z.isSelected())J++;else if(Z.selectable)Q++}),VY(J,Q)}function VY(z,J){if(z===0&&J===0)return!1;if(z>0&&J>0)return;return z>0}function HA(z,J){let Q=J.parent;while(Q){if(Q===z)return!0;Q=Q.parent}return!1}function OY(z){let J=z.isSelected()===!1,Q=z.childrenAfterFilter?.some(OY)??!1;return J||Q}var GA={moduleName:"SharedRowSelection",version:p,beans:[dR],css:[nR],apiFunctions:{setNodesSelected:rR,selectAll:tR,deselectAll:sR,selectAllFiltered:lR,deselectAllFiltered:aR,selectAllOnCurrentPage:oR,deselectAllOnCurrentPage:eR,getSelectedNodes:zA,getSelectedRows:JA}},PY={moduleName:"RowSelection",version:p,rowModels:["clientSide","infinite","viewport"],beans:[UA],dependsOn:[GA]},WA=class extends j{constructor(z,J){super();this.cellCtrl=z,this.staticClasses=[],this.beans=J,this.column=z.column}setComp(z){this.cellComp=z,this.applyUserStyles(),this.applyCellClassRules(),this.applyClassesFromColDef()}applyCellClassRules(){let{column:z,cellComp:J}=this,Q=z.colDef,Z=Q.cellClassRules,$=this.getCellClassParams(z,Q);TX(this.beans.expressionSvc,Z===this.cellClassRules?void 0:this.cellClassRules,Z,$,(X)=>J.toggleCss(X,!0),(X)=>J.toggleCss(X,!1)),this.cellClassRules=Z}applyUserStyles(){let z=this.column,J=z.colDef,Q=J.cellStyle;if(!Q)return;let Z;if(typeof Q==="function"){let $=this.getCellClassParams(z,J);Z=Q($)}else Z=Q;if(Z)this.cellComp.setUserStyles(Z)}applyClassesFromColDef(){let{column:z,cellComp:J}=this,Q=z.colDef,Z=this.getCellClassParams(z,Q);for(let X of this.staticClasses)J.toggleCss(X,!1);let $=this.beans.cellStyles.getStaticCellClasses(Q,Z);this.staticClasses=$;for(let X of $)J.toggleCss(X,!0)}getCellClassParams(z,J){let{value:Q,rowNode:Z}=this.cellCtrl;return v(this.beans.gos,{value:Q,data:Z.data,node:Z,colDef:J,column:z,rowIndex:Z.rowIndex})}},qA=class extends j{constructor(){super(...arguments);this.beanName="cellStyles"}processAllCellClasses(z,J,Q,Z){TX(this.beans.expressionSvc,void 0,z.cellClassRules,J,Q,Z),this.processStaticCellClasses(z,J,Q)}getStaticCellClasses(z,J){let{cellClass:Q}=z;if(!Q)return[];let Z;if(typeof Q==="function")Z=Q(J);else Z=Q;if(typeof Z==="string")Z=[Z];return Z||[]}createCellCustomStyleFeature(z){return new WA(z,this.beans)}processStaticCellClasses(z,J,Q){this.getStaticCellClasses(z,J).forEach(($)=>{Q($)})}},TY={moduleName:"CellStyle",version:p,beans:[qA]};var BA={enableBrowserTooltips:!0,tooltipTrigger:!0,tooltipMouseTrack:!0,tooltipShowMode:!0,tooltipInteraction:!0,defaultColGroupDef:!0,suppressAutoSize:!0,skipHeaderOnAutoSize:!0,autoSizeStrategy:!0,components:!0,stopEditingWhenCellsLoseFocus:!0,undoRedoCellEditing:!0,undoRedoCellEditingLimit:!0,excelStyles:!0,cacheQuickFilter:!0,customChartThemes:!0,chartThemeOverrides:!0,chartToolPanelsDef:!0,loadingCellRendererSelector:!0,localeText:!0,keepDetailRows:!0,keepDetailRowsCount:!0,detailRowHeight:!0,detailRowAutoHeight:!0,tabIndex:!0,valueCache:!0,valueCacheNeverExpires:!0,enableCellExpressions:!0,suppressTouch:!0,suppressBrowserResizeObserver:!0,suppressPropertyNamesCheck:!0,debug:!0,dragAndDropImageComponent:!0,overlayComponent:!0,suppressOverlays:!0,loadingOverlayComponent:!0,suppressLoadingOverlay:!0,noRowsOverlayComponent:!0,paginateChildRows:!0,pivotPanelShow:!0,pivotSuppressAutoColumn:!0,suppressExpandablePivotGroups:!0,aggFuncs:!0,allowShowChangeAfterFilter:!0,ensureDomOrder:!0,enableRtl:!0,suppressColumnVirtualisation:!0,suppressMaxRenderedRowRestriction:!0,suppressRowVirtualisation:!0,rowDragText:!0,groupLockGroupColumns:!0,suppressGroupRowsSticky:!0,rowModelType:!0,cacheOverflowSize:!0,infiniteInitialRowCount:!0,serverSideInitialRowCount:!0,maxBlocksInCache:!0,maxConcurrentDatasourceRequests:!0,blockLoadDebounceMillis:!0,serverSideOnlyRefreshFilteredGroups:!0,serverSidePivotResultFieldSeparator:!0,viewportRowModelPageSize:!0,viewportRowModelBufferSize:!0,debounceVerticalScrollbar:!0,suppressAnimationFrame:!0,suppressPreventDefaultOnMouseWheel:!0,scrollbarWidth:!0,icons:!0,suppressRowTransform:!0,suppressContentVisibilityAuto:!0,gridId:!0,enableGroupEdit:!0,initialState:!0,processUnpinnedColumns:!0,createChartContainer:!0,getLocaleText:!0,getRowId:!0,reactiveCustomComponents:!0,renderingMode:!0,columnMenu:!0,suppressSetFilterByDefault:!0,getDataPath:!0,enableCellSpan:!0,enableFilterHandlers:!0,filterHandlers:!0},m0="clientSide",y0="serverSide",O1="infinite",EA={onGroupExpandedOrCollapsed:[m0],refreshClientSideRowModel:[m0],isRowDataEmpty:[m0],forEachLeafNode:[m0],forEachNodeAfterFilter:[m0],forEachNodeAfterFilterAndSort:[m0],resetRowHeights:[m0,y0],applyTransaction:[m0],applyTransactionAsync:[m0],flushAsyncTransactions:[m0],getBestCostNodeSelection:[m0],getServerSideSelectionState:[y0],setServerSideSelectionState:[y0],applyServerSideTransaction:[y0],applyServerSideTransactionAsync:[y0],applyServerSideRowData:[y0],retryServerSideLoads:[y0],flushServerSideAsyncTransactions:[y0],refreshServerSide:[y0],getServerSideGroupLevelState:[y0],refreshInfiniteCache:[O1],purgeInfiniteCache:[O1],getInfiniteRowCount:[O1],isLastRowIndexKnown:[O1,y0],expandAll:[m0,y0],collapseAll:[m0,y0],onRowHeightChanged:[m0,y0],setRowCount:[O1,y0],getCacheBlockState:[O1,y0]},KA={showLoadingOverlay:{version:"v32",message:'`showLoadingOverlay` is deprecated. Use the grid option "loading"=true instead or setGridOption("loading", true).'},clearRangeSelection:{version:"v32.2",message:"Use `clearCellSelection` instead."},getInfiniteRowCount:{version:"v32.2",old:"getInfiniteRowCount()",new:"getDisplayedRowCount()"},selectAllFiltered:{version:"v33",old:"selectAllFiltered()",new:'selectAll("filtered")'},deselectAllFiltered:{version:"v33",old:"deselectAllFiltered()",new:'deselectAll("filtered")'},selectAllOnCurrentPage:{version:"v33",old:"selectAllOnCurrentPage()",new:'selectAll("currentPage")'},deselectAllOnCurrentPage:{version:"v33",old:"deselectAllOnCurrentPage()",new:'deselectAll("currentPage")'}};function FA(z,J,Q){let Z=KA[z];if(Z){let{version:X,new:Y,old:U,message:_}=Z,H=U??z;return(...G)=>{let W=Y?`Please use ${Y} instead. `:"";return y4(`Since ${X} api.${H} is deprecated. ${W}${_??""}`),J.apply(J,G)}}let $=EA[z];if($)return(...X)=>{let Y=Q.rowModel.getType();if(!$.includes(Y)){v1(`api.${z} can only be called when gridOptions.rowModelType is ${$.join(" or ")}`);return}return J.apply(J,X)};return J}var LA={detailCellRendererCtrl:"SharedMasterDetail",dndSourceComp:"DragAndDrop",fillHandle:"CellSelection",groupCellRendererCtrl:"GroupCellRenderer",headerFilterCellCtrl:"ColumnFilter",headerGroupCellCtrl:"ColumnGroup",rangeHandle:"CellSelection",tooltipFeature:"Tooltip",highlightTooltipFeature:"Tooltip",tooltipStateManager:"Tooltip",groupStrategy:"RowGrouping",treeGroupStrategy:"TreeData",rowNumberRowResizer:"RowNumbers",singleCell:"EditCore",fullRow:"EditCore",agSetColumnFilterHandler:"SetFilter",agMultiColumnFilterHandler:"MultiFilter",agGroupColumnFilterHandler:"GroupFilter",agNumberColumnFilterHandler:"NumberFilter",agBigIntColumnFilterHandler:"BigIntFilter",agDateColumnFilterHandler:"DateFilter",agTextColumnFilterHandler:"TextFilter"},MA={expanded:1,contracted:1,"tree-closed":1,"tree-open":1,"tree-indeterminate":1,pin:1,"eye-slash":1,arrows:1,left:1,right:1,group:1,aggregation:1,pivot:1,"not-allowed":1,chart:1,cross:1,cancel:1,tick:1,first:1,previous:1,next:1,last:1,linked:1,unlinked:1,"color-picker":1,loading:1,menu:1,"menu-alt":1,filter:1,"filter-add":1,columns:1,maximize:1,minimize:1,copy:1,cut:1,paste:1,grip:1,save:1,csv:1,excel:1,"small-down":1,"small-left":1,"small-right":1,"small-up":1,asc:1,desc:1,aasc:1,adesc:1,none:1,up:1,down:1,plus:1,minus:1,settings:1,"checkbox-checked":1,"checkbox-indeterminate":1,"checkbox-unchecked":1,"radio-button-on":1,"radio-button-off":1,eye:1,"column-arrow":1,"un-pin":1,"pinned-top":1,"pinned-bottom":1,"chevron-up":1,"chevron-down":1,"chevron-left":1,"chevron-right":1,edit:1,search:1},DA={chart:"MenuCore",cancel:"EnterpriseCore",first:"Pagination",previous:"Pagination",next:"Pagination",last:"Pagination",linked:"IntegratedCharts",loadingMenuItems:"MenuCore",unlinked:"IntegratedCharts",menu:"ColumnHeaderComp",legacyMenu:"ColumnMenu",filter:"ColumnFilter",filterActive:"ColumnFilter",filterAdd:"NewFiltersToolPanel",filterCardCollapse:"NewFiltersToolPanel",filterCardExpand:"NewFiltersToolPanel",filterCardEditing:"NewFiltersToolPanel",filterTab:"ColumnMenu",filtersToolPanel:"FiltersToolPanel",columns:["MenuCore"],columnsToolPanel:["ColumnsToolPanel"],maximize:"EnterpriseCore",minimize:"EnterpriseCore",save:"MenuCore",columnGroupOpened:"ColumnGroupHeaderComp",columnGroupClosed:"ColumnGroupHeaderComp",accordionOpen:"EnterpriseCore",accordionClosed:"EnterpriseCore",accordionIndeterminate:"EnterpriseCore",columnSelectClosed:["ColumnsToolPanel","ColumnMenu"],columnSelectOpen:["ColumnsToolPanel","ColumnMenu"],columnSelectIndeterminate:["ColumnsToolPanel","ColumnMenu"],columnMovePin:"SharedDragAndDrop",columnMoveHide:"SharedDragAndDrop",columnMoveMove:"SharedDragAndDrop",columnMoveLeft:"SharedDragAndDrop",columnMoveRight:"SharedDragAndDrop",columnMoveGroup:"SharedDragAndDrop",columnMoveValue:"SharedDragAndDrop",columnMovePivot:"SharedDragAndDrop",dropNotAllowed:"SharedDragAndDrop",ensureColumnVisible:["ColumnsToolPanel","ColumnMenu"],groupContracted:"GroupCellRenderer",groupExpanded:"GroupCellRenderer",setFilterGroupClosed:"SetFilter",setFilterGroupOpen:"SetFilter",setFilterGroupIndeterminate:"SetFilter",setFilterLoading:"SetFilter",close:"EnterpriseCore",check:"MenuItem",colorPicker:"CommunityCore",groupLoading:"LoadingCellRenderer",overlayLoading:"Overlay",overlayExporting:"Overlay",menuAlt:"ColumnHeaderComp",menuPin:"MenuCore",menuValue:"MenuCore",menuAddRowGroup:["MenuCore","ColumnsToolPanel"],menuRemoveRowGroup:["MenuCore","ColumnsToolPanel"],clipboardCopy:"MenuCore",clipboardCut:"MenuCore",clipboardPaste:"MenuCore",pivotPanel:["ColumnsToolPanel","RowGroupingPanel"],rowGroupPanel:["ColumnsToolPanel","RowGroupingPanel"],valuePanel:"ColumnsToolPanel",columnDrag:"EnterpriseCore",rowDrag:["RowDrag","DragAndDrop"],csvExport:"MenuCore",excelExport:"MenuCore",smallDown:"CommunityCore",selectOpen:"CommunityCore",richSelectOpen:"RichSelect",richSelectRemove:"RichSelect",richSelectLoading:"RichSelect",smallLeft:"CommunityCore",smallRight:"CommunityCore",subMenuOpen:"MenuItem",subMenuOpenRtl:"MenuItem",panelDelimiter:"RowGroupingPanel",panelDelimiterRtl:"RowGroupingPanel",smallUp:"CommunityCore",sortAscending:["MenuCore","Sort"],sortDescending:["MenuCore","Sort"],sortAbsoluteAscending:["MenuCore","Sort"],sortAbsoluteDescending:["MenuCore","Sort"],sortUnSort:["MenuCore","Sort"],advancedFilterBuilder:"AdvancedFilter",advancedFilterBuilderDrag:"AdvancedFilter",advancedFilterBuilderInvalid:"AdvancedFilter",advancedFilterBuilderMoveUp:"AdvancedFilter",advancedFilterBuilderMoveDown:"AdvancedFilter",advancedFilterBuilderAdd:"AdvancedFilter",advancedFilterBuilderRemove:"AdvancedFilter",advancedFilterBuilderSelectOpen:"AdvancedFilter",chartsMenu:"IntegratedCharts",chartsMenuEdit:"IntegratedCharts",chartsMenuAdvancedSettings:"IntegratedCharts",chartsMenuAdd:"IntegratedCharts",chartsColorPicker:"IntegratedCharts",chartsThemePrevious:"IntegratedCharts",chartsThemeNext:"IntegratedCharts",chartsDownload:"IntegratedCharts",checkboxChecked:"CommunityCore",checkboxIndeterminate:"CommunityCore",checkboxUnchecked:"CommunityCore",radioButtonOn:"CommunityCore",radioButtonOff:"CommunityCore",rowPin:"PinnedRow",rowUnpin:"PinnedRow",rowPinBottom:"PinnedRow",rowPinTop:"PinnedRow",search:"Find"},RA=new Set(["colorPicker","smallUp","checkboxChecked","checkboxIndeterminate","checkboxUnchecked","radioButtonOn","radioButtonOff","smallDown","smallLeft","smallRight"]),AA=class extends j{constructor(){super(...arguments);this.beanName="validation",this.propertyNameCache=new Map}wireBeans(z){this.gridOptions=z.gridOptions,yH(RL)}warnOnInitialPropertyUpdate(z,J){if(z==="api"&&BA[J])V(22,{key:J})}processGridOptions(z){this.processOptions(z,FK())}validateApiFunction(z,J){return FA(z,J,this.beans)}missingUserComponent(z,J,Q,Z){let $=b1[J];if($)this.gos.assertModuleRegistered($,`AG Grid '${z}' component: ${J}`);else V(101,{propertyName:z,componentName:J,agGridDefaults:Q,jsComps:Z})}missingDynamicBean(z){let J=LA[z];return J?U4(200,{...this.gos.getModuleErrorParams(),moduleName:J,reasonOrId:z}):void 0}checkRowEvents(z){if(jA.has(z))V(10,{eventType:z})}validateIcon(z){if(RA.has(z))V(43,{iconName:z});if(MA[z])return;let J=DA[z];if(J){r(200,{reasonOrId:`icon '${z}'`,moduleName:J,gridScoped:uZ(),gridId:this.beans.context.getId(),rowModelType:this.gos.get("rowModelType"),additionalText:"Alternatively, use the CSS icon name directly."});return}V(134,{iconName:z})}isProvidedUserComp(z){return!!b1[z]}validateColDef(z){this.processOptions(z,XK())}processOptions(z,J){let{validations:Q,deprecations:Z,allProperties:$,allValidNames:X,objectName:Y,docsUrl:U}=J,_=Object.keys(z),H=this.propertyNameCache.get(Y);if(!H)H=new Map,this.propertyNameCache.set(Y,H);let G=this.gridOptions.suppressPropertyNamesCheck!==!0,W=!1;for(let B of _){if(H.has(B))continue;let E=Z[B];if(E){let{message:L,version:M}=E;y4(`As of v${M}, ${B} is deprecated. ${L??""}`)}let K=Q[B],F=this.gridOptions.rowModelType??"clientSide";if(K?.supportedRowModels&&!K.supportedRowModels.includes(F)){let L=z[B];if(L==null||L===!1)continue;y4(`${B} is not supported with the '${F}' row model. It is only valid with: ${K.supportedRowModels.join(", ")}.`),H.set(B,!1);continue}if(!X.has(B)){if(G){let L=FZ({inputValue:B,allSuggestions:$}).values,M=`invalid ${Y} property '${B}' did you mean any of these: ${L.slice(0,8).join(", ")}.`;if(X.has("context"))M+=`
71
+ If you are trying to annotate ${Y} with application data, use the '${Y}.context' property instead.`;y4(M)}W=!0,H.set(B,!1);continue}H.set(B,!0)}if(W&&U&&G){let B=this.beans.frameworkOverrides.getDocLink(U);y4(`to see all the valid ${Y} properties please check: ${B}`)}let q=new Set;if(_.forEach((B)=>{if(H.get(B)===!1)return;let E=z[B];if(E==null||E===!1)return;let K=Q[B];if(!K)return;let{dependencies:F,validate:L,expectedType:M}=K;if(M){let D=typeof E;if(D!==M){q.add(`${String(B)} should be of type '${M}' but received '${D}' (${E}).`);return}}if(F){let D=this.checkForRequiredDependencies(B,F,z);if(D){q.add(D);return}}if(L){let D=L(z,this.gridOptions,this.beans);if(D){q.add(D);return}}}),q.size>0)for(let B of q)y4(B)}checkForRequiredDependencies(z,J,Q){let $=Object.entries(J).filter(([X,Y])=>{let U=Q[X];return!Y.required.includes(U)});if($.length===0)return null;return $.map(([X,Y])=>`'${String(z)}' requires '${X}' to be one of [${Y.required.map((U)=>{if(U===null)return"null";else if(U===void 0)return"undefined";return U}).join(", ")}]. ${Y.reason??""}`).join(`
72
+ `)}},jA=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]),SY={moduleName:"Validation",version:p,beans:[AA]};var Q2=class extends j{constructor(){super(...arguments);this.dispatchColumnChangedEvent=e$,this.columns=[],this.columnIndexMap={},this.updateIndexMap=()=>{this.columnIndexMap={},this.columns.forEach((z,J)=>this.columnIndexMap[z.getId()]=J)}}wireBeans(z){this.colModel=z.colModel,this.aggFuncSvc=z.aggFuncSvc,this.visibleCols=z.visibleCols,this.groupHierarchCols=z.groupHierarchyColSvc}sortColumns(z){let{groupHierarchCols:J}=this;this.columns.sort((Q,Z)=>J?.compareVirtualColumns(Q,Z)??z(Q,Z)),this.updateIndexMap()}setColumns(z,J){this.setColList(z,this.columns,this.eventName,!0,!0,this.columnProcessors.set,J)}addColumns(z,J){this.updateColList(z,this.columns,!0,!0,this.columnProcessors.add,this.eventName,J)}removeColumns(z,J){this.updateColList(z,this.columns,!1,!0,this.columnProcessors.remove,this.eventName,J)}getColumnIndex(z){return this.columnIndexMap[z]}setColList(z=[],J,Q,Z,$,X,Y){let U=this.colModel.getCols();if(!U||U.length===0)return;let _=new Map;J.forEach((G,W)=>_.set(G,W)),J.length=0;for(let G of z){let W=this.colModel.getColDefCol(G);if(W)J.push(W)}J.forEach((G,W)=>{let q=_.get(G);if(q===void 0){_.set(G,0);return}if(Z&&q!==W)return;_.delete(G)}),this.updateIndexMap();let H=this.colModel.getColDefCols();for(let G of H??[]){let W=J.indexOf(G)>=0;X(G,W,Y)}if($)this.colModel.refreshCols(!1,Y);this.visibleCols.refresh(Y),this.dispatchColumnChangedEvent(this.eventSvc,Q,[..._.keys()],Y)}updateColList(z=[],J,Q,Z,$,X,Y){if(!z||z.length===0)return;let U=!1,_=new Set;for(let G of z){if(!G)continue;let W=this.colModel.getColDefCol(G);if(!W)continue;if(_.add(W),Q){if(J.indexOf(W)>=0)continue;J.push(W)}else{let q=J.indexOf(W);if(q<0)continue;for(let B=q+1;B<J.length;B++)_.add(J[B]);X0(J,W)}$(W,Q,Y),U=!0}if(!U)return;if(this.updateIndexMap(),Z)this.colModel.refreshCols(!1,Y);this.visibleCols.refresh(Y);let H=Array.from(_);this.eventSvc.dispatchEvent({type:X,columns:H,column:H.length===1?H[0]:null,source:Y})}extractCols(z,J=[]){let Q=this.columns,Z=[],$=[],{setFlagFunc:X,getIndexFunc:Y,getInitialIndexFunc:U,getValueFunc:_,getInitialValueFunc:H}=this.columnExtractors,G=this.colModel.getColDefCols();for(let K of G??[]){let F=!J.includes(K),L=K.colDef,M=_(L),D=H(L),A=Y(L),O=U(L),T,S=M!==void 0,k=A!==void 0,C=D!==void 0,w=O!==void 0;if(S)T=M;else if(k)if(A===null)T=!1;else T=A>=0;else if(F)if(C)T=D;else if(w)T=O!=null&&O>=0;else T=!1;else T=Q.indexOf(K)>=0;if(T)if(F?A!=null||O!=null:A!=null)Z.push(K);else $.push(K)}let W=(K)=>{let F=K.colDef;return Y(F)??U(F)};Z.sort((K,F)=>W(K)-W(F));let q=[],B=this.groupHierarchCols,E=(K)=>{if(B)B.expandColumnInto(q,K);else q.push(K)};Z.forEach(E);for(let K of Q)if($.indexOf(K)>=0)E(K);for(let K of $)if(q.indexOf(K)<0)E(K);for(let K of Q)if(q.indexOf(K)<0)X(K,!1,z);for(let K of q)if(Q.indexOf(K)<0)X(K,!0,z);return this.columns=q,this.updateIndexMap(),this.columns}restoreColumnOrder(z,J){let Q=this.columns,Z=this.colModel.getColDefCols();if(!Q.length||!Z)return z;let $=Object.keys(J),X=new Set($),Y=new Set($),U=new Set(Q.map((D)=>{let A=D.colId;return Y.delete(A),A}).concat($)),_=[],H={},G=0;for(let D=0;D<Z.length;D++){let A=Z[D].colId;if(U.has(A))_.push(A),H[A]=G++}let W=1000,q=!1,B=0,E=this.columnOrdering.enableProp,K=this.columnOrdering.initialEnableProp,F=this.columnOrdering.indexProp,L=this.columnOrdering.initialIndexProp,M=(D)=>{let A=H[D];for(let O=B;O<A;O++){let T=_[O];if(Y.has(T))J[T][F]=W++,Y.delete(T)}B=A};for(let D of Q){let A=D.colId;if(X.has(A))M(A),J[A][F]=W++;else{let O=D.colDef;if(O[F]===null||O[F]===void 0&&O[L]==null){if(!q)if(O[E]||O[E]===void 0&&O[K])M(A);else{for(let k of Y)J[k][F]=W+H[k];W+=_.length,q=!0}if(!z[A])z[A]={colId:A};z[A][F]=W++}}}return z}};var VA='.ag-toggle-button{flex:none;min-width:unset;width:unset}.ag-toggle-button-input-wrapper{background-color:var(--ag-toggle-button-off-background-color);border-radius:calc(var(--ag-toggle-button-height)*.5);flex:none;height:var(--ag-toggle-button-height);max-width:var(--ag-toggle-button-width);min-width:var(--ag-toggle-button-width);position:relative;transition:background-color .1s;:where(.ag-toggle-button-input){-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;display:block;height:var(--ag-toggle-button-height);margin:0;max-width:var(--ag-toggle-button-width);min-width:var(--ag-toggle-button-width);opacity:0}&.ag-checked{background-color:var(--ag-toggle-button-on-background-color)}&.ag-disabled{opacity:.5}}.ag-toggle-button-input-wrapper:before{background-color:var(--ag-toggle-button-switch-background-color);border-radius:100%;content:"";display:block;height:calc(var(--ag-toggle-button-height) - var(--ag-toggle-button-switch-inset)*2);left:var(--ag-toggle-button-switch-inset);pointer-events:none;position:absolute;top:var(--ag-toggle-button-switch-inset);transition:left .1s;width:calc(var(--ag-toggle-button-height) - var(--ag-toggle-button-switch-inset)*2)}.ag-toggle-button-input-wrapper.ag-checked:before{left:calc(100% - var(--ag-toggle-button-height) + var(--ag-toggle-button-switch-inset))}.ag-toggle-button-input-wrapper:focus-within{box-shadow:var(--ag-focus-shadow)}',z7=class extends IJ{constructor(z){super(z,"ag-toggle-button");this.registerCSS(VA)}setValue(z,J){return super.setValue(z,J),this.toggleCss("ag-selected",this.getValue()),this}},IY={selector:"AG-TOGGLE-BUTTON",component:z7};var OA=class{constructor(){this.ieCompatibility=!1}init(){this.ieCompatibility=this.md5("hello")!="5d41402abc4b2a76b9719d911017c592"}md5cycle(z,J){let Q=z[0],Z=z[1],$=z[2],X=z[3];Q=this.ff(Q,Z,$,X,J[0],7,-680876936),X=this.ff(X,Q,Z,$,J[1],12,-389564586),$=this.ff($,X,Q,Z,J[2],17,606105819),Z=this.ff(Z,$,X,Q,J[3],22,-1044525330),Q=this.ff(Q,Z,$,X,J[4],7,-176418897),X=this.ff(X,Q,Z,$,J[5],12,1200080426),$=this.ff($,X,Q,Z,J[6],17,-1473231341),Z=this.ff(Z,$,X,Q,J[7],22,-45705983),Q=this.ff(Q,Z,$,X,J[8],7,1770035416),X=this.ff(X,Q,Z,$,J[9],12,-1958414417),$=this.ff($,X,Q,Z,J[10],17,-42063),Z=this.ff(Z,$,X,Q,J[11],22,-1990404162),Q=this.ff(Q,Z,$,X,J[12],7,1804603682),X=this.ff(X,Q,Z,$,J[13],12,-40341101),$=this.ff($,X,Q,Z,J[14],17,-1502002290),Z=this.ff(Z,$,X,Q,J[15],22,1236535329),Q=this.gg(Q,Z,$,X,J[1],5,-165796510),X=this.gg(X,Q,Z,$,J[6],9,-1069501632),$=this.gg($,X,Q,Z,J[11],14,643717713),Z=this.gg(Z,$,X,Q,J[0],20,-373897302),Q=this.gg(Q,Z,$,X,J[5],5,-701558691),X=this.gg(X,Q,Z,$,J[10],9,38016083),$=this.gg($,X,Q,Z,J[15],14,-660478335),Z=this.gg(Z,$,X,Q,J[4],20,-405537848),Q=this.gg(Q,Z,$,X,J[9],5,568446438),X=this.gg(X,Q,Z,$,J[14],9,-1019803690),$=this.gg($,X,Q,Z,J[3],14,-187363961),Z=this.gg(Z,$,X,Q,J[8],20,1163531501),Q=this.gg(Q,Z,$,X,J[13],5,-1444681467),X=this.gg(X,Q,Z,$,J[2],9,-51403784),$=this.gg($,X,Q,Z,J[7],14,1735328473),Z=this.gg(Z,$,X,Q,J[12],20,-1926607734),Q=this.hh(Q,Z,$,X,J[5],4,-378558),X=this.hh(X,Q,Z,$,J[8],11,-2022574463),$=this.hh($,X,Q,Z,J[11],16,1839030562),Z=this.hh(Z,$,X,Q,J[14],23,-35309556),Q=this.hh(Q,Z,$,X,J[1],4,-1530992060),X=this.hh(X,Q,Z,$,J[4],11,1272893353),$=this.hh($,X,Q,Z,J[7],16,-155497632),Z=this.hh(Z,$,X,Q,J[10],23,-1094730640),Q=this.hh(Q,Z,$,X,J[13],4,681279174),X=this.hh(X,Q,Z,$,J[0],11,-358537222),$=this.hh($,X,Q,Z,J[3],16,-722521979),Z=this.hh(Z,$,X,Q,J[6],23,76029189),Q=this.hh(Q,Z,$,X,J[9],4,-640364487),X=this.hh(X,Q,Z,$,J[12],11,-421815835),$=this.hh($,X,Q,Z,J[15],16,530742520),Z=this.hh(Z,$,X,Q,J[2],23,-995338651),Q=this.ii(Q,Z,$,X,J[0],6,-198630844),X=this.ii(X,Q,Z,$,J[7],10,1126891415),$=this.ii($,X,Q,Z,J[14],15,-1416354905),Z=this.ii(Z,$,X,Q,J[5],21,-57434055),Q=this.ii(Q,Z,$,X,J[12],6,1700485571),X=this.ii(X,Q,Z,$,J[3],10,-1894986606),$=this.ii($,X,Q,Z,J[10],15,-1051523),Z=this.ii(Z,$,X,Q,J[1],21,-2054922799),Q=this.ii(Q,Z,$,X,J[8],6,1873313359),X=this.ii(X,Q,Z,$,J[15],10,-30611744),$=this.ii($,X,Q,Z,J[6],15,-1560198380),Z=this.ii(Z,$,X,Q,J[13],21,1309151649),Q=this.ii(Q,Z,$,X,J[4],6,-145523070),X=this.ii(X,Q,Z,$,J[11],10,-1120210379),$=this.ii($,X,Q,Z,J[2],15,718787259),Z=this.ii(Z,$,X,Q,J[9],21,-343485551),z[0]=this.add32(Q,z[0]),z[1]=this.add32(Z,z[1]),z[2]=this.add32($,z[2]),z[3]=this.add32(X,z[3])}cmn(z,J,Q,Z,$,X){return J=this.add32(this.add32(J,z),this.add32(Z,X)),this.add32(J<<$|J>>>32-$,Q)}ff(z,J,Q,Z,$,X,Y){return this.cmn(J&Q|~J&Z,z,J,$,X,Y)}gg(z,J,Q,Z,$,X,Y){return this.cmn(J&Z|Q&~Z,z,J,$,X,Y)}hh(z,J,Q,Z,$,X,Y){return this.cmn(J^Q^Z,z,J,$,X,Y)}ii(z,J,Q,Z,$,X,Y){return this.cmn(Q^(J|~Z),z,J,$,X,Y)}md51(z){let J=z.length,Q=[1732584193,-271733879,-1732584194,271733878],Z;for(Z=64;Z<=z.length;Z+=64)this.md5cycle(Q,this.md5blk(z.substring(Z-64,Z)));z=z.substring(Z-64);let $=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(Z=0;Z<z.length;Z++)$[Z>>2]|=z.charCodeAt(Z)<<(Z%4<<3);if($[Z>>2]|=128<<(Z%4<<3),Z>55){this.md5cycle(Q,$);for(Z=0;Z<16;Z++)$[Z]=0}return $[14]=J*8,this.md5cycle(Q,$),Q}md5blk(z){let J=[];for(let Q=0;Q<64;Q+=4)J[Q>>2]=z.charCodeAt(Q)+(z.charCodeAt(Q+1)<<8)+(z.charCodeAt(Q+2)<<16)+(z.charCodeAt(Q+3)<<24);return J}rhex(z){let J="0123456789abcdef".split(""),Q="",Z=0;for(;Z<4;Z++)Q+=J[z>>Z*8+4&15]+J[z>>Z*8&15];return Q}hex(z){for(let J=0;J<z.length;J++)z[J]=this.rhex(z[J]);return z.join("")}md5(z){return this.hex(this.md51(z))}add32(z,J){return this.ieCompatibility?this.add32Compat(z,J):this.add32Std(z,J)}add32Std(z,J){return z+J&4294967295}add32Compat(z,J){let Q=(z&65535)+(J&65535);return(z>>16)+(J>>16)+(Q>>16)<<16|Q&65535}},hJ={"01":"GRID","02":"CHARTS","0102":"BOTH"};var KU=class z{constructor(J){this.watermarkMessage=void 0,this.totalMessageLength=124,this.document=J,this.md5=new OA,this.md5.init()}validateLicense(){let J=this.getLicenseDetails(z.licenseKey),Q=`AG Grid ${J.currentLicenseType==="BOTH"?"and AG Charts ":""}Enterprise`,Z=J.suppliedLicenseType===void 0?"":`AG ${J.suppliedLicenseType==="BOTH"?"Grid and AG Charts":J.suppliedLicenseType==="GRID"?"Grid":"Charts"} Enterprise`;if(J.missing){if(!this.isWebsiteUrl()||this.isForceWatermark())this.outputMissingLicenseKey(Q)}else if(J.expired){let $=z.getGridReleaseDate(),X=z.formatDate($);this.outputExpiredKey(J.expiry,X,Q,Z)}else if(!J.valid)this.outputInvalidLicenseKey(!!J.incorrectLicenseType,Q,Z);else if(J.isTrial&&J.trialExpired)this.outputExpiredTrialKey(J.expiry,Q,Z)}static extractExpiry(J){let Q=J.substring(J.lastIndexOf("_")+1,J.length);return new Date(parseInt(z.decode(Q),10))}static extractLicenseComponents(J){let Q=J.replace(/[\u200B-\u200D\uFEFF]/g,"");if(Q=Q.replace(/\r?\n|\r/g,""),J.length<=32)return{md5:null,license:J,version:null,isTrial:null};let Z=Q.length-32,$=Q.substring(Z),X=Q.substring(0,Z),[Y,U,_]=z.extractBracketedInformation(Q);return{md5:$,license:X,version:Y,isTrial:U,type:_}}getLicenseDetails(J){let Q=z.chartsLicenseManager?"BOTH":"GRID";if(!J?.length)return{licenseKey:J,valid:!1,missing:!0,currentLicenseType:Q};let Z=z.getGridReleaseDate(),{md5:$,license:X,version:Y,isTrial:U,type:_}=z.extractLicenseComponents(J),H=$===this.md5.md5(X)&&!J.includes("For_Trialing_ag-Grid_Only"),G=void 0,W=void 0,q=null,B=!1,E=void 0;function K(){G=q<new Date,W=void 0}if(H){if(q=z.extractExpiry(X),H=!isNaN(q.getTime()),H)switch(W=Z>q,Y){case"legacy":case"2":{if(U)K();break}case"3":if(!_?.length)H=!1;else if(E=_,_!==hJ["01"]&&_!==hJ["0102"]||Q==="BOTH"&&E!=="BOTH")H=!1,B=!0;else if(U)K()}}if(!H)return{licenseKey:J,valid:H,incorrectLicenseType:B,currentLicenseType:Q,suppliedLicenseType:E};return{licenseKey:J,valid:H,expiry:z.formatDate(q),expired:W,version:Y,isTrial:U,trialExpired:G,incorrectLicenseType:B,currentLicenseType:Q,suppliedLicenseType:E}}isDisplayWatermark(){return this.isForceWatermark()||!this.isLocalhost()&&!this.isWebsiteUrl()&&!!this.watermarkMessage?.length}getWatermarkMessage(){return this.watermarkMessage||""}getHostname(){let Q=(this.document.defaultView||window).location,{hostname:Z=""}=Q;return Z}isForceWatermark(){let Q=(this.document.defaultView||window).location,{pathname:Z}=Q;return Z?Z.includes("forceWatermark"):!1}isWebsiteUrl(){return this.getHostname().match(/^(?:[\w-]+\.)?(ag-grid|bryntum)\.com$/)!==null}isLocalhost(){return this.getHostname().match(/^(?:127\.0\.0\.1|localhost)$/)!==null}static formatDate(J){let Q=["January","February","March","April","May","June","July","August","September","October","November","December"],Z=J.getDate(),$=J.getMonth(),X=J.getFullYear();return Z+" "+Q[$]+" "+X}static getGridReleaseDate(){return new Date(parseInt(z.decode(z.RELEASE_INFORMATION),10))}static decode(J){let Z="",$,X,Y,U,_,H,G,W=0,q=J.replace(/[^A-Za-z0-9+/=]/g,"");while(W<q.length){if(U="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(q.charAt(W++)),_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(q.charAt(W++)),H="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(q.charAt(W++)),G="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(q.charAt(W++)),$=U<<2|_>>4,X=(_&15)<<4|H>>2,Y=(H&3)<<6|G,Z=Z+String.fromCharCode($),H!=64)Z=Z+String.fromCharCode(X);if(G!=64)Z=Z+String.fromCharCode(Y)}return Z=z.utf8_decode(Z),Z}static utf8_decode(J){J=J.replace(/rn/g,"n");let Q="";for(let Z=0;Z<J.length;Z++){let $=J.charCodeAt(Z);if($<128)Q+=String.fromCharCode($);else if($>127&&$<2048)Q+=String.fromCharCode($>>6|192),Q+=String.fromCharCode($&63|128);else Q+=String.fromCharCode($>>12|224),Q+=String.fromCharCode($>>6&63|128),Q+=String.fromCharCode($&63|128)}return Q}static setChartsLicenseManager(J){this.chartsLicenseManager=J,this.chartsLicenseManager?.setLicenseKey(this.licenseKey,!0)}static setLicenseKey(J){if(I(this.licenseKey)&&this.licenseKey!==J)w9(291,void 0,"AG Grid: License Key being set multiple times with different values. This can result in an incorrect license key being used.");this.licenseKey=J,this.chartsLicenseManager?.setLicenseKey(J,!0)}static extractBracketedInformation(J){if(!J.includes("["))return["legacy",!1,void 0];let Q=J.match(/\[(.*?)\]/g).map((U)=>U.replace("[","").replace("]",""));if(!Q||Q.length===0)return["legacy",!1,void 0];let Z=Q.filter((U)=>U==="TRIAL").length===1,$=Q.filter((U)=>U.indexOf("v")===0)[0],X=$?$.replace("v",""):"legacy",Y=hJ[Q.filter((U)=>hJ[U])[0]];return[X,Z,Y]}centerPadAndOutput(J){let Q=this.totalMessageLength-J.length}padAndOutput(J,Q="*",Z=""){}outputInvalidLicenseKey(J,Q,Z){}outputExpiredTrialKey(J,Q,Z){}outputMissingLicenseKey(J){}outputExpiredKey(J,Q,Z,$){}};KU.RELEASE_INFORMATION="MTc3NDQyNTc0Nzc3NQ==";var fY=KU,PA='.ag-watermark{bottom:20px;color:#9b9b9b;opacity:.7;position:absolute;transition:opacity 1s ease-out 3s}:where(.ag-ltr) .ag-watermark{right:25px}:where(.ag-rtl) .ag-watermark{left:25px}.ag-watermark:before{background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMDkiIGhlaWdodD0iMzYiIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyMDkgMzYiPjxwYXRoIGZpbGw9IiM5YjliOWIiIGQ9Ik0xOTIuOTkzIDIzLjY1OHYtNy45NDZoLTEzLjU0MWwtNy45NDcgNy45NDZ6TTIwOC4yNSAzLjk1aC0xNi45NzRsLTguMDEgNy45NDdoMjQuOTg0ek0xNjMuNjIyIDMxLjYwNWw0LjA2OS00LjA2OWgxMy43MzJ2Ny45NDdoLTE3LjgwMXoiLz48cGF0aCBmaWxsPSIjOWI5YjliIiBkPSJNMTY2LjYxIDE5Ljc4aDguNzczbDguMDEtNy45NDZIMTY2LjYxek0xNTcuMDExIDMxLjYwNWg2LjYxMWw3Ljg4My03Ljk0N2gtMTQuNDk0ek0xOTEuMjc2IDMuOTVsLTQuMDY4IDQuMDdIMTYxLjI3Vi4wNzJoMzAuMDA2ek0yMC44NCAzMC4yMDZIOC4zNzhsLTIuMTYyIDUuMzRILjc1TDEyLjI1NyA4LjU5Mmg0Ljc2OEwyOC41MyAzNS41NDZoLTUuNTN6bS0xLjcxNy00LjI2TDE0LjYwOSAxNC45NWwtNC41MTQgMTAuOTk4ek0xMDQuNDM3IDE4LjUwOWMxLjU4OS0yLjM1MiA1LjU5NC0yLjYwNyA3LjI0Ny0yLjYwN3Y0LjU3OGMtMi4wMzQgMC00LjA2OS4wNjMtNS4yNzcuOTUzLTEuMjA3Ljg5LTEuODQzIDIuMDk4LTEuODQzIDMuNTZ2MTAuNTUzaC00Ljk1OVYxNS45MDJoNC43Njh6TTExOS4zNzYgMTUuOTAyaC00Ljk1OHYxOS42NDRoNC45NTh6TTExOS4zNzYgNy4xM2gtNC45NTh2NS44NDhoNC45NTh6TTE0My45NzkgNy4xM3YyOC40MTZoLTQuNzY4bC0uMTI3LTIuOTg4YTguMyA4LjMgMCAwIDEtMi42NyAyLjQ4Yy0xLjA4MS41NzItMi40MTYuODktMy45NDIuODktMS4zMzUgMC0yLjYwNi0uMjU1LTMuNjg3LS43LTEuMTQ0LS41MDgtMi4xNjItMS4xNDQtMi45ODgtMi4wMzRhOS42IDkuNiAwIDAgMS0xLjk3MS0zLjE3OWMtLjUwOC0xLjIwNy0uNjk5LTIuNjA2LS42OTktNC4xMzJzLjI1NC0yLjkyNC42OTktNC4xOTZjLjUwOS0xLjI3MSAxLjE0NS0yLjM1MiAxLjk3MS0zLjI0MnMxLjg0NC0xLjU4OSAyLjk4OC0yLjA5OCAyLjM1Mi0uNzYzIDMuNjg3LS43NjNjMS41MjYgMCAyLjc5Ny4yNTUgMy44NzguODI3czEuOTcxIDEuMzM1IDIuNjcgMi40MTZWNy4xOTNoNC45NTl6bS0xMC40MjYgMjQuNTM4YzEuNjUzIDAgMi45MjQtLjU3MiAzLjk0MS0xLjY1M3MxLjUyNi0yLjU0MyAxLjUyNi00LjMyMy0uNTA5LTMuMTc4LTEuNTI2LTQuMzIyYy0xLjAxNy0xLjA4MS0yLjI4OC0xLjY1My0zLjk0MS0xLjY1My0xLjU5IDAtMi45MjUuNTcyLTMuODc4IDEuNjUzLTEuMDE3IDEuMDgtMS41MjYgMi41NDMtMS41MjYgNC4zMjIgMCAxLjc4LjUwOSAzLjE4IDEuNTI2IDQuMjYgMS4wMTcgMS4xNDQgMi4yODggMS43MTYgMy44NzggMS43MTZNNTcuMjAyIDIwLjM1M0g0NC45MzN2NC4yNTloNi45OTNjLS4xOSAyLjE2MS0xLjAxNyAzLjgxNC0yLjQxNiA1LjE1LTEuMzk4IDEuMjctMy4xNzggMS45MDYtNS40NjcgMS45MDYtMS4yNzEgMC0yLjQ4LS4yNTQtMy40OTYtLjY5OWE3IDcgMCAwIDEtMi43MzQtMS45N2MtLjc2My0uODI3LTEuMzM1LTEuODQ0LTEuNzgtMy4wNTJzLS42MzYtMi40OC0uNjM2LTMuOTQyLjE5LTIuNzMzLjYzNi0zLjk0MWMuMzgxLTEuMjA4IDEuMDE3LTIuMTYyIDEuNzgtMy4wNTIuNzYzLS44MjYgMS42NTMtMS40NjIgMi43MzMtMS45N2E5LjEgOS4xIDAgMCAxIDMuNTYtLjdxNC4wMDUgMCA2LjEwMyAxLjkwN2wzLjMwNi0zLjMwNWMtMi40OC0xLjkwNy01LjY1OC0yLjkyNS05LjQwOS0yLjkyNS0yLjA5NyAwLTQuMDA0LjMxOC01LjcyMSAxLjAxOC0xLjcxNi42OTktMy4xNzkgMS41ODktNC4zODYgMi43OTdBMTIuMSAxMi4xIDAgMCAwIDMxLjIgMTYuMjJjLS42MzUgMS43MTctLjk1MyAzLjYyNC0uOTUzIDUuNjU4cy4zMTggMy45NDIgMS4wMTcgNS42NThjLjcgMS43MTcgMS41OSAzLjE3OSAyLjc5NyA0LjM4N2ExMi4xIDEyLjEgMCAwIDAgNC4zODcgMi43OTdjMS43MTYuNyAzLjYyMyAxLjAxNyA1LjY1NyAxLjAxNyAyLjAzNSAwIDMuODc4LS4zMTggNS41MzEtMS4wMTcgMS42NTMtLjcgMy4wNTItMS41OSA0LjE5Ni0yLjc5N3ExLjcxNi0xLjgxMiAyLjY3LTQuMzg3Yy42MzYtMS43MTYuOTU0LTMuNjIzLjk1NC01LjY1OHYtLjgyNmMtLjE5MS0uMTI3LS4yNTUtLjQ0NS0uMjU1LS43TTk1Ljk4MiAyMC4zNTNoLTEyLjI3djQuMjU5aDYuOTkzYy0uMTkgMi4xNjEtMS4wMTcgMy44MTQtMi40MTYgNS4xNS0xLjM5OCAxLjI3LTMuMTc4IDEuOTA2LTUuNDY3IDEuOTA2LTEuMjcxIDAtMi40OC0uMjU0LTMuNDk2LS42OTlhNyA3IDAgMCAxLTIuNzM0LTEuOTdjLS43NjMtLjgyNy0xLjMzNS0xLjg0NC0xLjc4LTMuMDUycy0uNjM2LTIuNDgtLjYzNi0zLjk0Mi4xOS0yLjczMy42MzYtMy45NDFjLjM4MS0xLjIwOCAxLjAxNy0yLjE2MiAxLjc4LTMuMDUyLjc2My0uODI2IDEuNjUzLTEuNDYyIDIuNzM0LTEuOTdhOS4xIDkuMSAwIDAgMSAzLjU2LS43cTQuMDA1IDAgNi4xMDMgMS45MDdsMy4zMDUtMy4zMDVjLTIuNDc5LTEuOTA3LTUuNjU4LTIuOTI1LTkuNDA4LTIuOTI1LTIuMDk4IDAtNC4wMDUuMzE4LTUuNzIyIDEuMDE4LTEuNzE2LjY5OS0zLjE3OCAxLjU4OS00LjM4NiAyLjc5N2ExMi4xIDEyLjEgMCAwIDAtMi43OTcgNC4zODZjLS42MzYgMS43MTctLjk1NCAzLjYyNC0uOTU0IDUuNjU4cy4zMTggMy45NDIgMS4wMTcgNS42NThjLjcgMS43MTcgMS41OSAzLjE3OSAyLjc5NyA0LjM4N2ExMi4xIDEyLjEgMCAwIDAgNC4zODcgMi43OTdjMS43MTYuNyAzLjYyMyAxLjAxNyA1LjY1OCAxLjAxNyAyLjAzNCAwIDMuODc4LS4zMTggNS41My0xLjAxNyAxLjY1My0uNyAzLjA1Mi0xLjU5IDQuMTk2LTIuNzk3cTEuNzE4LTEuODEyIDIuNjctNC4zODdjLjYzNi0xLjcxNi45NTQtMy42MjMuOTU0LTUuNjU4di0uODI2Yy0uMTktLjEyNy0uMjU1LS40NDUtLjI1NS0uNyIvPjwvc3ZnPg==");background-repeat:no-repeat;background-size:170px 40px;content:"";display:block;height:40px;width:170px}.ag-watermark-text{font-family:Impact,sans-serif;font-size:19px;font-weight:700;opacity:.5}:where(.ag-ltr) .ag-watermark-text{padding-left:.7rem}:where(.ag-rtl) .ag-watermark-text{padding-right:.7rem}',TA={tag:"div",cls:"ag-watermark",children:[{tag:"div",ref:"eLicenseTextRef",cls:"ag-watermark-text"}]},SA=class extends y{constructor(){super(TA);this.eLicenseTextRef=P,this.registerCSS(PA)}wireBeans(z){this.licenseManager=z.licenseManager}postConstruct(){let z=this.shouldDisplayWatermark();if(this.setDisplayed(z),z)this.eLicenseTextRef.textContent=this.licenseManager.getWatermarkMessage(),window.setTimeout(()=>this.addCss("ag-opacity-zero"),0),window.setTimeout(()=>this.setDisplayed(!1),5000)}shouldDisplayWatermark(){return this.licenseManager.isDisplayWatermark()}},IA={selector:"AG-WATERMARK",component:SA},kY=class extends j{constructor(){super(...arguments);this.beanName="licenseManager"}postConstruct(){this.validateLicense()}validateLicense(){let z=this.beans;if(z.withinStudio)this.licenseManager={isDisplayWatermark:()=>!1,getWatermarkMessage:()=>""};else{let J=new fY(Y0(z));this.licenseManager=J,J.validateLicense()}}static getLicenseDetails(z){return new fY(null).getLicenseDetails(z)}getWatermarkSelector(){return IA}isDisplayWatermark(){return this.licenseManager.isDisplayWatermark()}getWatermarkMessage(){return this.licenseManager.getWatermarkMessage()}static setLicenseKey(z){}static setChartsLicenseManager(z){}},fA=9525,CY={"0":1,"0.00":2,"#,##0":3,"#,##0.00":4,"0%":9,"0.00%":10,"0.00E+00":11,"# ?/?":12,"# ??/??":13,"mm-dd-yy":14,"d-mmm-yy":15,"d-mmm":16,"mmm-yy":17,"h:mm AM/PM":18,"h:mm:ss AM/PM":19,"h:mm":20,"h:mm:ss":21,"m/d/yy h:mm":22,"#,##0 ;(#,##0)":37,"#,##0 ;[Red](#,##0)":38,"#,##0.00;(#,##0.00)":39,"#,##0.00;[Red](#,##0.00)":40,"mm:ss":45,"[h]:mm:ss":46,"mmss.0":47,"##0.0E+0":48,"@":49},uJ=`\r
73
+ `;function vY(z,J,Q){if(!J&&J!==""&&J!==0)return"";let Z=J;if(typeof J==="boolean"){if(Q)Z=Q(J)}return` ${z}="${Z}"`}function kA(z={}){let Z=["version"];if(!z.version)z.version="1.0";if(z.encoding)Z.push("encoding");if(z.standalone)Z.push("standalone");return`<?xml ${Z.map((X)=>`${X}="${z[X]}"`).join(" ")} ?>`}function FU(z,J){let Q="";if(z.properties){if(z.properties.prefixedAttributes)z.properties.prefixedAttributes.forEach(($)=>{for(let X of Object.keys($.map))Q+=vY($.prefix+X,$.map[X],J)});if(z.properties.rawMap)for(let $ of Object.keys(z.properties.rawMap))Q+=vY($,z.properties.rawMap[$],J)}let Z="<"+z.name+Q;if(!z.children&&z.textNode==null)return Z+"/>"+uJ;if(z.textNode!=null)return Z+">"+z.textNode+"</"+z.name+">"+uJ;if(Z+=">"+uJ,z.children)for(let $ of z.children)Z+=FU($,J);return Z+"</"+z.name+">"+uJ}var CA=(z)=>{return Math.round(z*96/72)},Z2=(z)=>{return Math.ceil(z*fA)},vA=(z)=>{if(z===void 0)return;let Q=["Automatic","Roman","Swiss","Modern","Script","Decorative"].indexOf(z||"Automatic");return Math.max(Q,0)},dJ=(z,J)=>{if(!J)return;let Q;if(typeof J==="number")Q=J;else Q=J({rowIndex:z});return Q},NA=(z,J)=>{let{colSpan:Q,column:Z}=z.position;if(!z.width)return;if(Q){let $=J.slice(Z-1,Z+Q-1),X=0;for(let Y=0;Y<$.length;Y++){let U=$[Y].getActualWidth();if(z.width<X+U){z.position.colSpan=Y+1,z.totalWidth=z.width,z.width=z.totalWidth-X;break}X+=U}}else z.totalWidth=z.width},wA=(z,J)=>{let{rowSpan:Q,row:Z}=z.position;if(!z.height)return;if(Q){let $=0,X=0;for(let Y=Z;Y<Z+Q;Y++){let U=CA(dJ(Y,J)||20);if(z.height<$+U){z.position.rowSpan=X+1,z.totalHeight=z.height,z.height=z.totalHeight-$;break}$+=U,X++}}else z.totalHeight=z.height},g0=(z,J)=>{let Q=kA({encoding:"UTF-8",standalone:"yes"}),Z=FU(z);if(J)return Z;return`${Q}${Z}`},R1=(z)=>{let Z=String.fromCharCode,$=Math.floor(z/26),X=z%26;if(!$||z===26)return Z(65+z-1);if(!X)return R1($-1)+"Z";if($<26)return Z(65+$-1)+Z(65+X-1);return R1($)+Z(65+X-1)},yA=(z)=>{return z.replaceAll(`
74
+ `,"_x000a_")},lJ=(z)=>{if(z==null)return null;let J="";for(let Q=0;Q<z.length;Q++){let Z=z.charCodeAt(Q);if(Z>=0&&Z<=31&&Z!==10){let Y=`_x${Z.toString(16).toUpperCase().padStart(4,"0")}_`;J+=Y}else J+=z[Q]}return J},xA=(z)=>{let J=[];for(let Q of z.keys()){let Z=Q.toString(),$={name:"t",textNode:L0(lJ(Z))};if(Z.trim().length!==Z.length)$.properties={rawMap:{"xml:space":"preserve"}};J.push({name:"si",children:[$]})}return J},bA=class extends v5{constructor(z){super(z);this.mixedStyles={},this.mixedStyleCounter=0,this.rows=[],this.frozenRowCount=0,this.skipFrozenRows=!1,this.frozenColumnCount=0,this.skipFrozenColumns=!1,this.formulaSvc=z.formulaSvc,this.config=Object.assign({},z),this.workbook=z.workbook,this.stylesByIds={};for(let Q of this.config.baseExcelStyles)this.stylesByIds[Q.id]=Q;let J={id:"_quotePrefix",quotePrefix:1};this.stylesByIds[J.id]=J,this.excelStyles=[...this.config.baseExcelStyles,J]}addCustomContent(z){for(let J of z){let Q=this.rows.length+1,Z;if(!this.config.suppressRowOutline&&J.outlineLevel!=null)Z=J.outlineLevel;let $={height:dJ(Q,J.height||this.config.rowHeight),cells:(J.cells||[]).map((X,Y)=>{let U=this.addImage(Q,this.columnsToExport[Y],X.data?.value),_=null;if(X.styleId)_=typeof X.styleId==="string"?[X.styleId]:X.styleId;let H=this.getStyleId(_);if(U)return this.createCell(H,this.getDataTypeForValue(U.value),U.value==null?"":U.value);let G=X.data?.value??"",W=this.getDataTypeForValue(G);if(X.mergeAcross)return this.createMergedCell(H,W,G,X.mergeAcross);return this.createCell(H,W,G)}),outlineLevel:Z};if(J.collapsed!=null)$.collapsed=J.collapsed;if(J.hidden!=null)$.hidden=J.hidden;this.rows.push($)}}onNewHeaderGroupingRow(){let z=[],{freezeRows:J,headerRowHeight:Q}=this.config;if(this.rows.push({cells:z,height:dJ(this.rows.length+1,Q)}),J)this.frozenRowCount++;return{onColumn:(Z,$,X,Y,U)=>{let _=this.config.styleLinker({rowType:"HEADER_GROUPING",rowIndex:1,value:`grouping-${$}`,columnGroup:Z});z.push({...this.createMergedCell(this.getStyleId(_),this.getDataTypeForValue("string"),$,Y),collapsibleRanges:U})}}}onNewHeaderRow(){let{freezeRows:z,headerRowHeight:J}=this.config;if(z)this.frozenRowCount++;return this.onNewRow(this.onNewHeaderColumn,J)}onNewBodyRow(z){let{freezeRows:J,rowHeight:Q}=this.config;if(!this.skipFrozenRows)if(J==="headersAndPinnedRows"&&z?.rowPinned==="top")this.frozenRowCount++;else if(typeof J==="function")if(J(v(this.gos,{node:z})))this.frozenRowCount++;else this.skipFrozenRows=!0;else this.skipFrozenRows=!0;let Z=this.onNewRow(this.onNewBodyColumn,Q);if(z)this.addRowOutlineIfNecessary(z);return Z}prepare(z){super.prepare(z),this.columnsToExport=[...z],this.cols=z.map((J,Q)=>this.convertColumnToExcel(J,Q))}parse(){let z=this.rows.reduce((Q,Z)=>Math.max(Q,Z.cells.length),0);while(this.cols.length<z)this.cols.push(this.convertColumnToExcel(null,this.cols.length+1));let J=this.createWorksheet();return this.addWorksheetToWorkbook(J)}createWorksheet(){let{sheetName:z}=this.config,J;if(z!=null){let Q=typeof z==="function"?z(v(this.gos,{})):z;J=String(Q).substring(0,31)}else J="ag-grid";return{name:J,table:{columns:this.cols,rows:this.rows}}}addRowOutlineIfNecessary(z){let{gos:J,suppressRowOutline:Q,rowGroupExpandState:Z="expanded"}=this.config;if(J.get("groupHideOpenParents")||Q||z.level==null)return;let X=z.footer?1:0,Y=N(this.rows);if(z.uiLevel==null||z.level===z.uiLevel){let _=Math.min(z.level+X,7);Y.outlineLevel=_}if(Z==="expanded")return;let U=Z==="collapsed";if(z.isExpandable()){let _=!U&&z.expanded;Y.collapsed=!_}Y.hidden=!!z.parent&&z.parent.level!==-1&&(U||this.isAnyParentCollapsed(z.parent))}isAnyParentCollapsed(z){while(z&&z.level!==-1){if(!z.expanded)return!0;z=z.parent}return!1}convertColumnToExcel(z,J){let Q=this.config.columnWidth,$=(z?this.extractHeaderValue(z):void 0)??"",X=z?z.isFilterAllowed():!1;if(Q){if(typeof Q==="number")return{width:Q,displayName:$,filterAllowed:X};return{width:Q({column:z,index:J}),displayName:$,filterAllowed:X}}if(z)return{width:Math.max(z.getActualWidth(),75),displayName:$,filterAllowed:X};return{displayName:$,filterAllowed:X}}onNewHeaderColumn(z,J){return(Q)=>{let Z=this.extractHeaderValue(Q),$=this.config.styleLinker({rowType:"HEADER",rowIndex:z,value:Z,column:Q});J.push(this.createCell(this.getStyleId($),this.getDataTypeForValue("string"),Z))}}onNewBodyColumn(z,J){let Q=0,{freezeColumns:Z,rightToLeft:$}=this.config;return(X,Y,U)=>{if(Q>0){Q-=1;return}if(!this.skipFrozenColumns){let F=X.getPinned();if(Z==="pinned"&&F&&(F===!0||F==="left")!==$)this.frozenColumnCount++;else if(typeof Z==="function"&&Z(v(this.gos,{column:X})))this.frozenColumnCount++;else this.skipFrozenColumns=!0}let{value:_,valueFormatted:H}=this.extractRowCellValue({column:X,node:U,currentColumnIndex:Y,accumulatedRowIndex:z,type:"excel",useRawFormula:!0}),G=_,W=typeof G==="bigint"?G.toString():G,q=this.config.styleLinker({rowType:"BODY",rowIndex:z,value:G,column:X,node:U}),B=this.getStyleId(q),E=X.getColSpan(U),K=this.addImage(z,X,W);if(K)J.push(this.createCell(B,this.getDataTypeForValue(K.value),K.value==null?"":K.value));else if(E>1)Q=E-1,J.push(this.createMergedCell(B,this.getDataTypeForValue(G),W,E-1));else{let F=X.isAllowFormula()&&this.formulaSvc?.isFormula(W),L=this.createCell(B,F?"f":this.getDataTypeForValue(G),F?this.formulaSvc?.updateFormulaByOffset({value:W,rowDelta:z-(U.formulaRowIndex+1),useRefFormat:!1}):W,H);J.push(L)}}}onNewRow(z,J){let Q=[];return this.rows.push({cells:Q,height:dJ(this.rows.length+1,J)}),{onColumn:z.bind(this,this.rows.length,Q)()}}addWorksheetToWorkbook(z){let{excelStyles:J,config:Q}=this;if(this.mapSharedStrings(z),this.frozenColumnCount)Q.frozenColumnCount=this.frozenColumnCount;if(this.frozenRowCount)Q.frozenRowCount=this.frozenRowCount;return this.workbook.addWorksheet(J,z,Q)}mapSharedStrings(z){let J;for(let Q of z.table.rows)for(let Z of Q.cells){let $=Z.data;if(!$||$.type!=="s")continue;let X=$.value;if(X==null)continue;if(X===""){J??(J=this.workbook.getStringPosition("").toString()),$.value=J;continue}$.value=this.workbook.getStringPosition(String(X)).toString()}}getDataTypeForValue(z){if(z===void 0)return"empty";let J="s";try{if(this.isNumerical(z))J="n"}catch(Q){}return J}getTypeFromStyle(z,J){if(this.isFormula(J))return"f";if(z?.dataType)switch(z.dataType.toLocaleLowerCase()){case"formula":return"f";case"string":return"s";case"number":return"n";case"datetime":return"d";case"error":return"e";case"boolean":return"b";default:V(162,{id:z.id,dataType:z.dataType})}return null}addImage(z,J,Q){if(!this.config.addImageToCell)return;let Z=this.config.addImageToCell(z,J,Q);if(!Z)return;return this.workbook.addBodyImageToMap(Z.image,z,J,this.columnsToExport,this.config.rowHeight),Z}createCell(z,J,Q,Z){let $=this.getStyleById(z);if(!$?.dataType&&J==="s"&&Z!=null)Q=Z;let X=this.getTypeFromStyle($,Q)||J,{value:Y,escaped:U}=this.getCellValue(X,Q),_=[];if($)_.push(z);if(U)_.push("_quotePrefix");return z=this.getStyleId(_)||void 0,{styleId:z,data:{type:X,value:Y}}}createMergedCell(z,J,Q,Z){let $=Q==null?"":Q;return{styleId:this.getStyleById(z)?z:void 0,data:{type:J,value:J==="s"?String($):Q},mergeAcross:Z}}getCellValue(z,J){let Q=!1;if(J==null||z==="s"&&J==="")return{value:"",escaped:!1};if(z==="s"){if(J=String(J),J[0]==="'")Q=!0,J=J.slice(1)}else if(z==="f")J=this.addXlfnPrefix(J).slice(1);else if(z==="n"){let Z=Number(J);if(isNaN(Z))J="";else if(J!=="")J=Z.toString()}return{value:J,escaped:Q}}addXlfnPrefix(z){if(!z)return z;let J=/(^|[^A-Z0-9._])(CONCAT)(\s*\()/gi;return z.replace(J,(Q,Z,$,X)=>`${Z}_xlfn.${$}${X}`)}getStyleId(z){if(!z?.length)return null;let J=z.filter((Z)=>this.stylesByIds[Z]!=null);if(!J.length)return null;if(J.length===1)return J[0];let Q=J.join("-");if(!this.mixedStyles[Q])this.addNewMixedStyle(J);return this.mixedStyles[Q].excelID}addNewMixedStyle(z){this.mixedStyleCounter+=1;let J=`mixedStyle${this.mixedStyleCounter}`,Q={};for(let $ of z){let X=this.stylesByIds[$];if(X)M0(Q,X,!0,!0)}Q.id=J;let Z=z.join("-");this.mixedStyles[Z]={excelID:J,key:Z,result:Q},this.excelStyles.push(Q),this.stylesByIds[J]=Q}isFormula(z){if(z==null)return!1;let J=String(z);return this.config.autoConvertFormulas&&TZ(J)}isNumerical(z){if(typeof z==="bigint")return!1;return isFinite(z)&&z!==""&&!isNaN(parseFloat(z))}getStyleById(z){if(z==null)return null;return this.stylesByIds[z]||null}},gA={getTemplate(z){let{name:J,ContentType:Q,Extension:Z,PartName:$}=z;return{name:J,properties:{rawMap:{Extension:Z,PartName:$,ContentType:Q}}}}},hA=gA,$Q=(z)=>z==="jpg"?"jpeg":z,uA={getTemplate({sheetLen:z,hasCustomProperties:J}){let Q=Array(z).fill(void 0).map((W,q)=>({name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml",PartName:`/xl/worksheets/sheet${q+1}.xml`})),Z=cz.size,$=Hz.size,X={};U2.forEach((W)=>{X[$Q(W.type)]=!0});let Y=Array(Z).fill(void 0).map((W,q)=>({name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.drawing+xml",PartName:`/xl/drawings/drawing${q+1}.xml`})),U=[];s4.forEach(({name:W})=>{U.push({name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml",PartName:`/xl/tables/${W}.xml`})});let _=J?[{name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.custom-properties+xml",PartName:"/docProps/custom.xml"}]:[],H=Object.keys(X).map((W)=>({name:"Default",ContentType:`image/${W}`,Extension:W}));if($)H.push({name:"Default",Extension:"vml",ContentType:"application/vnd.openxmlformats-officedocument.vmlDrawing"});let G=[...H,{name:"Default",Extension:"rels",ContentType:"application/vnd.openxmlformats-package.relationships+xml"},{name:"Default",ContentType:"application/xml",Extension:"xml"},{name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml",PartName:"/xl/workbook.xml"},...Q,{name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.theme+xml",PartName:"/xl/theme/theme1.xml"},{name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml",PartName:"/xl/styles.xml"},{name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml",PartName:"/xl/sharedStrings.xml"},...Y,...U,{name:"Override",ContentType:"application/vnd.openxmlformats-package.core-properties+xml",PartName:"/docProps/core.xml"},..._].map((W)=>hA.getTemplate(W));return{name:"Types",properties:{rawMap:{xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"}},children:G}}},mA=uA,cA={getTemplate(z){let Q=new Date().toJSON();return{name:"cp:coreProperties",properties:{prefixedAttributes:[{prefix:"xmlns:",map:{cp:"http://schemas.openxmlformats.org/package/2006/metadata/core-properties",dc:"http://purl.org/dc/elements/1.1/",dcterms:"http://purl.org/dc/terms/",dcmitype:"http://purl.org/dc/dcmitype/",xsi:"http://www.w3.org/2001/XMLSchema-instance"}}]},children:[{name:"dc:creator",textNode:z},{name:"dc:title",textNode:"Workbook"},{name:"dcterms:created",properties:{rawMap:{"xsi:type":"dcterms:W3CDTF"}},textNode:Q},{name:"dcterms:modified",properties:{rawMap:{"xsi:type":"dcterms:W3CDTF"}},textNode:Q}]}}},pA=cA,iA="{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",dA=(z)=>{return Object.keys(z).filter((Q)=>Q&&z[Q]!=null).map((Q,Z)=>({name:"property",properties:{rawMap:{fmtid:iA,pid:(Z+2).toString(),name:L0(Q)??""}},children:[{name:"vt:lpwstr",textNode:L0(lJ(String(z[Q])))??""}]}))},nA={getTemplate(z){return{name:"Properties",properties:{rawMap:{xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/custom-properties","xmlns:vt":"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"}},children:dA(z)}}},rA=nA,NY=(z,J)=>({name:`xdr:${z}`,children:[{name:"xdr:col",textNode:J.col.toString()},{name:"xdr:colOff",textNode:J.offsetX.toString()},{name:"xdr:row",textNode:J.row.toString()},{name:"xdr:rowOff",textNode:J.offsetY.toString()}]}),tA=(z)=>{let J=[{name:"a:ext",properties:{rawMap:{uri:"{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}"}},children:[{name:"a16:creationId",properties:{rawMap:{id:"{822E6D20-D7BC-2841-A643-D49A6EF008A2}","xmlns:a16":"http://schemas.microsoft.com/office/drawing/2014/main"}}}]}];switch(z.recolor?.toLowerCase()){case"grayscale":case"sepia":case"washout":J.push({name:"a:ext",properties:{rawMap:{uri:"{C183D7F6-B498-43B3-948B-1728B52AA6E4}"}},children:[{name:"adec:decorative",properties:{rawMap:{val:"0","xmlns:adec":"http://schemas.microsoft.com/office/drawing/2017/decorative"}}}]})}return{name:"a:extLst",children:J}},sA=(z,J)=>({name:"xdr:nvPicPr",children:[{name:"xdr:cNvPr",properties:{rawMap:{id:J,name:z.id,descr:z.altText!=null?z.altText:void 0}},children:[tA(z)]},{name:"xdr:cNvPicPr",properties:{rawMap:{preferRelativeResize:"0"}},children:[{name:"a:picLocks"}]}]}),wY=(z)=>{if(!z.saturation&&!z.tint)return;let J=[];if(z.saturation)J.push({name:"a:satMod",properties:{rawMap:{val:z.saturation*1000}}});if(z.tint)J.push({name:"a:tint",properties:{rawMap:{val:z.tint*1000}}});return J},lA=(z,J)=>{return{name:"a:duotone",children:[{name:"a:prstClr",properties:{rawMap:{val:z.color}},children:wY(z)},{name:"a:srgbClr",properties:{rawMap:{val:J.color}},children:wY(J)}]}},aA=(z,J)=>{let Q;if(z.transparency){let Z=Math.min(Math.max(z.transparency,0),100);Q=[{name:"a:alphaModFix",properties:{rawMap:{amt:1e5-Math.round(Z*1000)}}}]}if(z.recolor){if(!Q)Q=[];switch(z.recolor.toLocaleLowerCase()){case"grayscale":Q.push({name:"a:grayscl"});break;case"sepia":Q.push(lA({color:"black"},{color:"D9C3A5",tint:50,saturation:180}));break;case"washout":Q.push({name:"a:lum",properties:{rawMap:{bright:"70000",contrast:"-70000"}}});break;default:}}return{name:"xdr:blipFill",children:[{name:"a:blip",properties:{rawMap:{cstate:"print","r:embed":`rId${J}`,"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships"}},children:Q},{name:"a:stretch",children:[{name:"a:fillRect"}]}]}},oA=(z,J)=>{let Q={name:"a:xfrm",children:[{name:"a:off",properties:{rawMap:{x:0,y:0}}},{name:"a:ext",properties:{rawMap:{cx:J.width,cy:J.height}}}]};if(z.rotation){let X=z.rotation;Q.properties={rawMap:{rot:Math.min(Math.max(X,0),360)*60000}}}return{name:"xdr:spPr",children:[Q,{name:"a:prstGeom",properties:{rawMap:{prst:"rect"}},children:[{name:"a:avLst"}]}]}},eA=(z)=>{z.fitCell=!!z.fitCell||!z.width||!z.height;let{position:J={},fitCell:Q,width:Z=0,height:$=0,totalHeight:X,totalWidth:Y}=z,{offsetX:U=0,offsetY:_=0,row:H=1,rowSpan:G=1,column:W=1,colSpan:q=1}=J;return{from:{row:H-1,col:W-1,offsetX:Z2(U),offsetY:Z2(_)},to:{row:H-1+(Q?1:G-1),col:W-1+(Q?1:q-1),offsetX:Z2(Z+U),offsetY:Z2($+_)},height:Z2(X||$),width:Z2(Y||Z)}},zj=(z,J,Q,Z)=>{return{name:"xdr:pic",children:[sA(z,J+1),aA(z,Q+1),oA(z,Z)]}},Jj={getTemplate(z){let{sheetIndex:J}=z,Q=cz.get(J),Z=_2.get(J),$=Q.map((X,Y)=>{let U=eA(X);return{name:"xdr:twoCellAnchor",properties:{rawMap:{editAs:"absolute"}},children:[NY("from",U.from),NY("to",U.to),zj(X,Y,Z.get(X.id).index,U),{name:"xdr:clientData"}]}});return{name:"xdr:wsDr",properties:{rawMap:{"xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main","xmlns:xdr":"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing"}},children:$}}},Qj=Jj,Zj={getTemplate(z){let{Id:J,Type:Q,Target:Z}=z;return{name:"Relationship",properties:{rawMap:{Id:J,Type:Q,Target:Z}}}}},$j=Zj,Xj={getTemplate(z){let J=z.map((Q)=>$j.getTemplate(Q));return{name:"Relationships",properties:{rawMap:{xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"}},children:J}}},B6=Xj,Yj={getTemplate(z){return{name:"sst",properties:{rawMap:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main",count:z.size,uniqueCount:z.size}},children:xA(z)}}},Uj=Yj,_j=(z)=>{switch(z){case 1:return"thin";case 2:return"medium";case 3:return"thick";default:return"hair"}},Hj={None:"None",Dot:"Dotted",Dash:"Dashed",Double:"Double",DashDot:"DashDot",DashDotDot:"DashDotDot",SlantDashDot:"SlantDashDot",Continuous:"Continuous"},Gj=["Dashed","DashDot","DashDotDot"],Wj={None:"none",Solid:"solid",Gray50:"mediumGray",Gray75:"darkGray",Gray25:"lightGray",HorzStripe:"darkHorizontal",VertStripe:"darkVertical",ReverseDiagStripe:"darkDown",DiagStripe:"darkUp",DiagCross:"darkGrid",ThickDiagCross:"darkTrellis",ThinHorzStripe:"lightHorizontal",ThinVertStripe:"lightVertical",ThinReverseDiagStripe:"lightDown",ThinDiagStripe:"lightUp",ThinHorzCross:"lightGrid",ThinDiagCross:"lightTrellis",Gray125:"gray125",Gray0625:"gray0625"},qj={Automatic:"general",Left:"left",Center:"center",Right:"right",Fill:"fill",Justify:"justify",CenterAcrossSelection:"centerContinuous",Distributed:"distributed",JustifyDistributed:"justify"},Bj={Automatic:void 0,Top:"top",Bottom:"bottom",Center:"center",Justify:"justify",Distributed:"distributed",JustifyDistributed:"justify"},Ej=(z)=>{if(!z)return"none";return Wj[z]||z},uz=(z)=>{if(z==null)return z;if(z.charAt(0)==="#")z=z.substring(1);return z.length===6?"FF"+z:z},mJ=(z,J)=>{if(!z)return"thin";let Q=_j(J);if(z==="Continuous")return Q;let Z=Hj[z];if(Q==="medium"&&Gj.some(($)=>$===Z))return`medium${Z}`;return`${Z.charAt(0).toLowerCase()}${Z.substring(1)}`},Kj=(z)=>{return qj[z]||"general"},Fj=(z)=>{return Bj[z]||void 0},Q6=(z)=>{return{name:"color",properties:{rawMap:{rgb:uz(z||"#000000")}}}},Lj={getTemplate(z){let{left:J,right:Q,top:Z,bottom:$,diagonal:X}=z,Y=J?[Q6(J.color)]:void 0,U=Q?[Q6(Q.color)]:void 0,_=Z?[Q6(Z.color)]:void 0,H=$?[Q6($.color)]:void 0,G=X?[Q6(X.color)]:void 0;return{name:"border",children:[{name:"left",properties:{rawMap:{style:J?.style}},children:Y},{name:"right",properties:{rawMap:{style:Q?.style}},children:U},{name:"top",properties:{rawMap:{style:Z?.style}},children:_},{name:"bottom",properties:{rawMap:{style:$?.style}},children:H},{name:"diagonal",properties:{rawMap:{style:X?.style}},children:G}]}}},Mj=Lj,Dj={getTemplate(z){return{name:"borders",properties:{rawMap:{count:z.length}},children:z.map((J)=>Mj.getTemplate(J))}}},Rj=Dj,Aj=(z)=>{let Q=["Context","LeftToRight","RightToLeft"].indexOf(z);return Math.max(Q,0)},jj={getTemplate(z){let{horizontal:J,indent:Q,readingOrder:Z,rotate:$,shrinkToFit:X,vertical:Y,wrapText:U}=z;return{name:"alignment",properties:{rawMap:{horizontal:J&&Kj(J),indent:Q,readingOrder:Z&&Aj(Z),textRotation:$,shrinkToFit:X,vertical:Y&&Fj(Y),wrapText:U}}}}},Vj=jj,Oj={getTemplate(z){let J=z.protected===!1?0:1;return{name:"protection",properties:{rawMap:{hidden:z.hideFormula===!0?1:0,locked:J}}}}},Pj=Oj,Tj={getTemplate(z){let{alignment:J,borderId:Q,fillId:Z,fontId:$,numFmtId:X,protection:Y,quotePrefix:U,xfId:_}=z,H=[];if(J)H.push(Vj.getTemplate(J));if(Y)H.push(Pj.getTemplate(Y));return{name:"xf",properties:{rawMap:{applyAlignment:J?1:void 0,applyProtection:Y?1:void 0,applyBorder:Q?1:void 0,applyFill:Z?1:void 0,borderId:Q,fillId:Z,applyFont:$?1:void 0,fontId:$,applyNumberFormat:X?1:void 0,numFmtId:X,quotePrefix:U?1:void 0,xfId:_}},children:H.length?H:void 0}}},LU=Tj,Sj={getTemplate(z){return{name:"cellStyleXfs",properties:{rawMap:{count:z.length}},children:z.map((J)=>LU.getTemplate(J))}}},Ij=Sj,fj={getTemplate(z){let{builtinId:J,name:Q,xfId:Z}=z;return{name:"cellStyle",properties:{rawMap:{builtinId:J,name:Q,xfId:Z}}}}},kj=fj,Cj={getTemplate(z){return{name:"cellStyles",properties:{rawMap:{count:z.length}},children:z.map((J)=>kj.getTemplate(J))}}},vj=Cj,Nj={getTemplate(z){return{name:"cellXfs",properties:{rawMap:{count:z.length}},children:z.map((J)=>LU.getTemplate(J))}}},wj=Nj,yj={getTemplate(z){let{patternType:J,fgTheme:Q,fgTint:Z,fgRgb:$,bgRgb:X,bgIndexed:Y}=z,U={name:"patternFill",properties:{rawMap:{patternType:J}}};if(Q||Z||$)U.children=[{name:"fgColor",properties:{rawMap:{theme:Q,tint:Z,rgb:$}}}];if(Y||X){if(!U.children)U.children=[];U.children.push({name:"bgColor",properties:{rawMap:{indexed:Y,rgb:X}}})}return{name:"fill",children:[U]}}},xj=yj,bj={getTemplate(z){return{name:"fills",properties:{rawMap:{count:z.length}},children:z.map((J)=>xj.getTemplate(J))}}},gj=bj,hj={getTemplate(z){let{size:J,colorTheme:Q,color:Z="FF000000",fontName:$="Calibri",family:X,scheme:Y,italic:U,bold:_,strikeThrough:H,outline:G,shadow:W,underline:q,verticalAlign:B}=z,E=[{name:"sz",properties:{rawMap:{val:J}}},{name:"color",properties:{rawMap:{theme:Q,rgb:Z}}},{name:"name",properties:{rawMap:{val:$}}}];if(X)E.push({name:"family",properties:{rawMap:{val:X}}});if(Y)E.push({name:"scheme",properties:{rawMap:{val:Y}}});if(U)E.push({name:"i"});if(_)E.push({name:"b"});if(H)E.push({name:"strike"});if(G)E.push({name:"outline"});if(W)E.push({name:"shadow"});if(q)E.push({name:"u",properties:{rawMap:{val:q}}});if(B)E.push({name:"vertAlign",properties:{rawMap:{val:B}}});return{name:"font",children:E}}},uj=hj,mj={getTemplate(z){return{name:"fonts",properties:{rawMap:{count:z.length}},children:z.map((J)=>uj.getTemplate(J))}}},cj=mj;function pj(z){let J=z.split(/(\[[^\]]*\])/);for(let Q=0;Q<J.length;Q++){let Z=J[Q];if(!Z.length)continue;if(!Z.startsWith("["))Z=Z.replace(/\$/g,'"$"');J[Q]=L0(Z)}return J.join("")}var ij={getTemplate(z){let{formatCode:J,numFmtId:Q}=z;if(J.length)J=pj(J);return{name:"numFmt",properties:{rawMap:{formatCode:J,numFmtId:Q}}}}},dj=ij,nj={getTemplate(z){return{name:"numFmts",properties:{rawMap:{count:z.length}},children:z.map((J)=>dj.getTemplate(J))}}},rj=nj,aJ,$2,X6,Y6,U6,MU,oJ,DU,E7,RU=(z,J)=>{if(z.includes("mixedStyle")&&J>1)z+=`_${J}`;return z},AU=()=>{aJ={base:0},$2=[],X6=[{fontName:"Calibri",colorTheme:"1",family:"2",scheme:"minor"}],Y6=[{patternType:"none"},{patternType:"gray125"}],U6=[{left:void 0,right:void 0,top:void 0,bottom:void 0,diagonal:void 0}],MU=[{borderId:0,fillId:0,fontId:0,numFmtId:0}],oJ=[{borderId:0,fillId:0,fontId:0,numFmtId:0,xfId:0}],DU=[{builtinId:0,name:"Normal",xfId:0}]},tj=(z)=>{let J=Ej(z.pattern),Q=uz(z.color),Z=uz(z.patternColor),$=Y6.findIndex((X)=>{let{patternType:Y,fgRgb:U,bgRgb:_}=X;return!(Y!=J||U!=Q||_!=Z)});if($===-1)$=Y6.length,Y6.push({patternType:J,fgRgb:Q,bgRgb:Z});return $},sj=(z)=>{if(CY[z])return CY[z];let J=$2.findIndex((Q)=>Q.formatCode===z);if(J===-1)J=$2.length+164,$2.push({formatCode:z,numFmtId:J});else J=$2[J].numFmtId;return J},lj=(z)=>{let{borderBottom:J,borderTop:Q,borderLeft:Z,borderRight:$}=z,X,Y,U,_,H,G,W,q;if(Z)U=mJ(Z.lineStyle,Z.weight),W=uz(Z.color);if($)_=mJ($.lineStyle,$.weight),q=uz($.color);if(J)X=mJ(J.lineStyle,J.weight),H=uz(J.color);if(Q)Y=mJ(Q.lineStyle,Q.weight),G=uz(Q.color);let B=U6.findIndex((E)=>{let{left:K,right:F,top:L,bottom:M}=E;if(!K&&(U||W))return!1;if(!F&&(_||q))return!1;if(!L&&(Y||G))return!1;if(!M&&(X||H))return!1;let{style:D,color:A}=K||{},{style:O,color:T}=F||{},{style:S,color:k}=L||{},{style:C,color:w}=M||{};if(D!=U||A!=W)return!1;if(O!=_||T!=q)return!1;if(S!=Y||k!=G)return!1;if(C!=X||w!=H)return!1;return!0});if(B===-1)B=U6.length,U6.push({left:{style:U,color:W},right:{style:_,color:q},top:{style:Y,color:G},bottom:{style:X,color:H},diagonal:{style:void 0,color:void 0}});return B},aj=(z)=>{let{fontName:J="Calibri",color:Q,size:Z,bold:$,italic:X,outline:Y,shadow:U,strikeThrough:_,underline:H,family:G,verticalAlign:W}=z,q=uz(Q),B=vA(G),E=H?H.toLocaleLowerCase():void 0,K=W?W.toLocaleLowerCase():void 0,F=X6.findIndex((L)=>{return!(L.fontName!=J||L.color!=q||L.size!=Z||L.bold!=$||L.italic!=X||L.outline!=Y||L.shadow!=U||L.strikeThrough!=_||L.underline!=E||L.verticalAlign!=K||L.family!=B)});if(F===-1)F=X6.length,X6.push({fontName:J,color:q,size:Z,bold:$,italic:X,outline:Y,shadow:U,strikeThrough:_,underline:E,verticalAlign:K,family:B!=null?B.toString():void 0});return F},oj=(z)=>{let{alignment:J,borders:Q,font:Z,interior:$,numberFormat:X,protection:Y,quotePrefix:U}=z,{id:_}=z,H=0,G=0,W=0,q=0;if(!_)return;if(_=RU(_,E7),aJ[_]!=null)return;if($)H=tj($);if(Q)G=lj(Q);if(Z)W=aj(Z);if(X)q=sj(X.format);aJ[_]=oJ.length,oJ.push({alignment:J,borderId:G||0,fillId:H||0,fontId:W||0,numFmtId:q||0,protection:Y,quotePrefix:U,xfId:0})},ej={getTemplate(z){let J=rj.getTemplate($2),Q=cj.getTemplate(X6.map((_)=>({..._,size:_.size!=null?_.size:z}))),Z=gj.getTemplate(Y6),$=Rj.getTemplate(U6),X=Ij.getTemplate(MU),Y=wj.getTemplate(oJ),U=vj.getTemplate(DU);return AU(),{name:"styleSheet",properties:{rawMap:{"mc:Ignorable":"x14ac x16r2 xr",xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","xmlns:x14ac":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac","xmlns:x16r2":"http://schemas.microsoft.com/office/spreadsheetml/2015/02/main","xmlns:xr":"http://schemas.microsoft.com/office/spreadsheetml/2014/revision"}},children:[J,Q,Z,$,X,Y,U,{name:"tableStyles",properties:{rawMap:{count:0,defaultPivotStyle:"PivotStyleLight16",defaultTableStyle:"TableStyleMedium2"}}}]}}},zV=(z,J)=>{return aJ[RU(z,J)]||0},JV=(z,J)=>{if(E7=J,E7===1)AU();z.forEach(oj)},QV=ej,ZV={getTemplate(z,J){let{name:Q,columns:Z,rowRange:$,displayName:X,showRowStripes:Y,showColumnStripes:U,showFilterButtons:_,highlightFirstColumn:H,highlightLastColumn:G}=z||{},W=!$||$[0]-$[1]===0;if(!z||!Q||!Array.isArray(Z)||!Z.length||W)return{name:"table"};let q=Z.map((M,D)=>({name:"filterColumn",properties:{rawMap:{colId:D.toString(),hiddenButton:_[D]?0:1}}})),B=`A${$[0]}`,E=`${R1(Z.length)}${$[1]}`,K=`${B}:${E}`,F=`${J+1}`,L=J?`${X}_${F}`:X;return{name:"table",properties:{rawMap:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"xr xr3","xmlns:xr":"http://schemas.microsoft.com/office/spreadsheetml/2014/revision","xmlns:xr3":"http://schemas.microsoft.com/office/spreadsheetml/2016/revision3",name:L,displayName:L,ref:K,totalsRowShown:0,id:F}},children:[{name:"autoFilter",properties:{rawMap:{ref:K}},children:q},{name:"tableColumns",properties:{rawMap:{count:Z.length}},children:Z.map((M,D)=>({name:"tableColumn",properties:{rawMap:{id:(D+1).toString(),name:L0(yA(M)),dataCellStyle:"Normal"}}}))},{name:"tableStyleInfo",properties:{rawMap:{name:"TableStyleLight1",showFirstColumn:H?1:0,showLastColumn:G?1:0,showRowStripes:Y?1:0,showColumnStripes:U?1:0}}}]}}},$V=ZV,M4=(z)=>{let[J,Q,Z,$]=z;return{name:`a:${J}`,children:[{name:`a:${Q}`,properties:{rawMap:{val:Z,lastClr:$}}}]}},XV={getTemplate(){return{name:"a:clrScheme",properties:{rawMap:{name:"Office"}},children:[M4(["dk1","sysClr","windowText","000000"]),M4(["lt1","sysClr","window","FFFFFF"]),M4(["dk2","srgbClr","44546A"]),M4(["lt2","srgbClr","E7E6E6"]),M4(["accent1","srgbClr","4472C4"]),M4(["accent2","srgbClr","ED7D31"]),M4(["accent3","srgbClr","A5A5A5"]),M4(["accent4","srgbClr","FFC000"]),M4(["accent5","srgbClr","5B9BD5"]),M4(["accent6","srgbClr","70AD47"]),M4(["hlink","srgbClr","0563C1"]),M4(["folHlink","srgbClr","954F72"])]}}},YV=XV,f=(z)=>{let[J,Q,Z,$]=z;return{name:`a:${J}`,properties:{rawMap:{script:Z,typeface:Q,panose:$}}}},UV={getTemplate(){return{name:"a:fontScheme",properties:{rawMap:{name:"Office"}},children:[{name:"a:majorFont",children:[f(["latin","Calibri Light",void 0,"020F0302020204030204"]),f(["ea",""]),f(["cs",""]),f(["font","游ゴシック Light","Jpan"]),f(["font","맑은 고딕","Hang"]),f(["font","等线 Light","Hans"]),f(["font","新細明體","Hant"]),f(["font","Times New Roman","Arab"]),f(["font","Times New Roman","Hebr"]),f(["font","Tahoma","Thai"]),f(["font","Nyala","Ethi"]),f(["font","Vrinda","Beng"]),f(["font","Shruti","Gujr"]),f(["font","MoolBoran","Khmr"]),f(["font","Tunga","Knda"]),f(["font","Raavi","Guru"]),f(["font","Euphemia","Cans"]),f(["font","Plantagenet Cherokee","Cher"]),f(["font","Microsoft Yi Baiti","Yiii"]),f(["font","Microsoft Himalaya","Tibt"]),f(["font","MV Boli","Thaa"]),f(["font","Mangal","Deva"]),f(["font","Gautami","Telu"]),f(["font","Latha","Taml"]),f(["font","Estrangelo Edessa","Syrc"]),f(["font","Kalinga","Orya"]),f(["font","Kartika","Mlym"]),f(["font","DokChampa","Laoo"]),f(["font","Iskoola Pota","Sinh"]),f(["font","Mongolian Baiti","Mong"]),f(["font","Times New Roman","Viet"]),f(["font","Microsoft Uighur","Uigh"]),f(["font","Sylfaen","Geor"]),f(["font","Arial","Armn"]),f(["font","Leelawadee UI","Bugi"]),f(["font","Microsoft JhengHei","Bopo"]),f(["font","Javanese Text","Java"]),f(["font","Segoe UI","Lisu"]),f(["font","Myanmar Text","Mymr"]),f(["font","Ebrima","Nkoo"]),f(["font","Nirmala UI","Olck"]),f(["font","Ebrima","Osma"]),f(["font","Phagspa","Phag"]),f(["font","Estrangelo Edessa","Syrn"]),f(["font","Estrangelo Edessa","Syrj"]),f(["font","Estrangelo Edessa","Syre"]),f(["font","Nirmala UI","Sora"]),f(["font","Microsoft Tai Le","Tale"]),f(["font","Microsoft New Tai Lue","Talu"]),f(["font","Ebrima","Tfng"])]},{name:"a:minorFont",children:[f(["latin","Calibri",void 0,"020F0502020204030204"]),f(["ea",""]),f(["cs",""]),f(["font","游ゴシック","Jpan"]),f(["font","맑은 고딕","Hang"]),f(["font","等线","Hans"]),f(["font","新細明體","Hant"]),f(["font","Arial","Arab"]),f(["font","Arial","Hebr"]),f(["font","Tahoma","Thai"]),f(["font","Nyala","Ethi"]),f(["font","Vrinda","Beng"]),f(["font","Shruti","Gujr"]),f(["font","DaunPenh","Khmr"]),f(["font","Tunga","Knda"]),f(["font","Raavi","Guru"]),f(["font","Euphemia","Cans"]),f(["font","Plantagenet Cherokee","Cher"]),f(["font","Microsoft Yi Baiti","Yiii"]),f(["font","Microsoft Himalaya","Tibt"]),f(["font","MV Boli","Thaa"]),f(["font","Mangal","Deva"]),f(["font","Gautami","Telu"]),f(["font","Latha","Taml"]),f(["font","Estrangelo Edessa","Syrc"]),f(["font","Kalinga","Orya"]),f(["font","Kartika","Mlym"]),f(["font","DokChampa","Laoo"]),f(["font","Iskoola Pota","Sinh"]),f(["font","Mongolian Baiti","Mong"]),f(["font","Arial","Viet"]),f(["font","Microsoft Uighur","Uigh"]),f(["font","Sylfaen","Geor"]),f(["font","Arial","Armn"]),f(["font","Leelawadee UI","Bugi"]),f(["font","Microsoft JhengHei","Bopo"]),f(["font","Javanese Text","Java"]),f(["font","Segoe UI","Lisu"]),f(["font","Myanmar Text","Mymr"]),f(["font","Ebrima","Nkoo"]),f(["font","Nirmala UI","Olck"]),f(["font","Ebrima","Osma"]),f(["font","Phagspa","Phag"]),f(["font","Estrangelo Edessa","Syrn"]),f(["font","Estrangelo Edessa","Syrj"]),f(["font","Estrangelo Edessa","Syre"]),f(["font","Nirmala UI","Sora"]),f(["font","Microsoft Tai Le","Tale"]),f(["font","Microsoft New Tai Lue","Talu"]),f(["font","Ebrima","Tfng"])]}]}}},_V=UV,t4=(z,J,Q)=>({name:`a:${z}`,properties:{rawMap:{val:J}},children:Q}),J7=(z)=>{let[J,Q,Z,$,X,Y]=z,U=[];if(U.push(t4("satMod",Z)),$)U.push(t4("lumMod",$));if(X)U.push(t4("tint",X));if(Y)U.push(t4("shade",Y));return{name:"a:gs",properties:{rawMap:{pos:J}},children:[{name:"a:schemeClr",properties:{rawMap:{val:Q}},children:U}]}},eJ=(z,J)=>({name:"a:solidFill",children:[t4("schemeClr",z,J)]}),K7=(z)=>{let[J,Q,Z,$,X]=z,[Y,U]=X;return{name:"a:gradFill",properties:{rawMap:{rotWithShape:J}},children:[{name:"a:gsLst",children:[J7(Q),J7(Z),J7($)]},{name:"a:lin",properties:{rawMap:{ang:Y,scaled:U}}}]}},Q7=(z)=>{let[J,Q,Z,$]=z;return{name:"a:ln",properties:{rawMap:{w:J,cap:Q,cmpd:Z,algn:$}},children:[eJ("phClr"),t4("prstDash","solid"),{name:"a:miter",properties:{rawMap:{lim:"800000"}}}]}},Z7=(z)=>{let J=[];if(z){let[Q,Z,$,X,Y]=z;J.push({name:"a:outerShdw",properties:{rawMap:{blurRad:Q,dist:Z,dir:$,algn:X,rotWithShape:Y}},children:[t4("srgbClr","000000",[t4("alpha","63000")])]})}return{name:"a:effectStyle",children:[Object.assign({},{name:"a:effectLst"},J.length?{children:J}:{})]}},HV=()=>({name:"a:fillStyleLst",children:[eJ("phClr"),K7(["1",["0","phClr","105000","110000","67000"],["50000","phClr","103000","105000","73000"],["100000","phClr","109000","105000","81000"],["5400000","0"]]),K7(["1",["0","phClr","103000","102000","94000"],["50000","phClr","110000","100000",void 0,"100000"],["100000","phClr","120000","99000",void 0,"78000"],["5400000","0"]])]}),GV=()=>({name:"a:lnStyleLst",children:[Q7(["6350","flat","sng","ctr"]),Q7(["12700","flat","sng","ctr"]),Q7(["19050","flat","sng","ctr"])]}),WV=()=>({name:"a:effectStyleLst",children:[Z7(),Z7(),Z7(["57150","19050","5400000","ctr","0"])]}),qV=()=>({name:"a:bgFillStyleLst",children:[eJ("phClr"),eJ("phClr",[t4("tint","95000"),t4("satMod","170000")]),K7(["1",["0","phClr","150000","102000","93000","98000"],["50000","phClr","130000","103000","98000","90000"],["100000","phClr","120000",void 0,void 0,"63000"],["5400000","0"]])]}),BV={getTemplate(){return{name:"a:fmtScheme",properties:{rawMap:{name:"Office"}},children:[HV(),GV(),WV(),qV()]}}},EV=BV,KV={getTemplate(){return{name:"a:themeElements",children:[YV.getTemplate(),_V.getTemplate(),EV.getTemplate()]}}},FV=KV,LV={getTemplate(){return{name:"a:theme",properties:{prefixedAttributes:[{prefix:"xmlns:",map:{a:"http://schemas.openxmlformats.org/drawingml/2006/main"}}],rawMap:{name:"Office Theme"}},children:[FV.getTemplate(),{name:"a:objectDefaults"},{name:"a:extraClrSchemeLst"}]}}},MV=LV,DV=()=>({name:"o:shapelayout",properties:{prefixedAttributes:[{prefix:"v:",map:{ext:"edit"}}]},children:[{name:"o:idmap",properties:{prefixedAttributes:[{prefix:"v:",map:{ext:"edit"}}],rawMap:{data:"1"}}}]}),RV=()=>({name:"v:stroke",properties:{rawMap:{joinstyle:"miter"}}}),AV=(z)=>({name:"v:formulas",children:z.map((J)=>({name:"v:f",properties:{rawMap:{eqn:J}}}))}),jV=()=>({name:"v:path",properties:{prefixedAttributes:[{prefix:"o:",map:{connecttype:"rect",extrusionok:"f"}}],rawMap:{gradientshapeok:"t"}}}),jU=(z)=>{let{aspectratio:J,rotation:Q}=z||{},Z={};if(J)Z.aspectratio="t";if(Q)Z.rotation="t";return{name:"o:lock",properties:{prefixedAttributes:[{prefix:"v:",map:{ext:"edit"}}],rawMap:Z}}};function VV(z,J,Q,Z,$){return(z-J)/(Q-J)*($-Z)+Z}var OV=(z,J)=>{let Q,{recolor:Z,brightness:$,contrast:X,id:Y}=z;if(Z){if(Q={},Z==="Washout"||Z==="Grayscale")Q.gain="19661f",Q.blacklevel="22938f";if(Z==="Black & White"||Z==="Grayscale"){if(Q.grayscale="t",Z==="Black & White")Q.bilevel="t"}}if(!Z||Z==="Grayscale"){if(!Q)Q={};if(X!=null&&X!==50){let U="1";if(X>=0){if(X<50)U=String(X/50);else if(X<100)U=String(50/(100-X));else if(X===100)U="2147483647f"}Q.gain=U}if($!=null&&$!==50)Q.blacklevel=VV($,0,100,-0.5,0.5).toString()}return{name:"v:imagedata",properties:{prefixedAttributes:[{prefix:"o:",map:{relid:`rId${J}`,title:Y}}],rawMap:Q}}},PV=()=>{let z=["if lineDrawn pixelLineWidth 0","sum @0 1 0","sum 0 0 @1","prod @2 1 2","prod @3 21600 pixelWidth","prod @3 21600 pixelHeight","sum @0 0 1","prod @6 1 2","prod @7 21600 pixelWidth","sum @8 21600 0","prod @7 21600 pixelHeight","sum @10 21600 0"];return{name:"v:shapetype",properties:{prefixedAttributes:[{prefix:"o:",map:{spt:"75",preferrelative:"t"}}],rawMap:{coordsize:"21600,21600",filled:"f",id:"_x0000_t75",path:"m@4@5l@4@11@9@11@9@5xe",stroked:"f"}},children:[RV(),AV(z),jV(),jU({aspectratio:!0})]}},yY=(z)=>Math.floor((z??0)*0.74999943307122),TV=(z,J)=>{let{width:Q=0,height:Z=0,altText:$}=z,X=yY(Q),Y=yY(Z);return{name:"v:shape",properties:{rawMap:{id:z.headerFooterPosition,"o:spid":"_x0000_s1025",style:`position: absolute; margin-left: 0; margin-top: 10in; margin-bottom: 0; margin-right: 0; width: ${X}pt; height: ${Y}pt; z-index: ${J+1}`,type:"#_x0000_t75",alt:$}},children:[OV(z,J+1),jU({rotation:!0})]}},SV={getTemplate(z){let J=Hz.get(z.sheetIndex)||[],Q=[DV(),PV(),...J.map((Z,$)=>TV(Z,$))];return{name:"xml",properties:{prefixedAttributes:[{prefix:"xmlns:",map:{v:"urn:schemas-microsoft-com:vml",o:"urn:schemas-microsoft-com:office:office",x:"urn:schemas-microsoft-com:office:excel"}}]},children:Q}}},IV=SV,fV={getTemplate(z,J){let Q=(J+1).toString();return{name:"sheet",properties:{rawMap:{name:z,sheetId:Q,"r:id":`rId${Q}`}}}}},kV=fV,CV={getTemplate(z){return{name:"sheets",children:z.map((J,Q)=>kV.getTemplate(J,Q))}}},vV=CV,NV={getTemplate(z,J){return{name:"workbook",properties:{prefixedAttributes:[{prefix:"xmlns:",map:{r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships"}}],rawMap:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main"}},children:[{name:"bookViews",children:[{name:"workbookView",properties:{rawMap:{activeTab:J}}}]},vV.getTemplate(z)]}}},wV=NV,yV=(z)=>Math.ceil((z-12)/7+1),xV={getTemplate(z){let{min:J,max:Q,outlineLevel:Z,s:$,width:X,hidden:Y,bestFit:U}=z,_=1,H="0";if(X>1)_=yV(X),H="1";return{name:"col",properties:{rawMap:{min:J,max:Q,outlineLevel:Z!=null?Z:void 0,width:_,style:$,hidden:Y?"1":"0",bestFit:U?"1":"0",customWidth:H}}}}},bV=xV,gV={getTemplate(z){return{name:"mergeCell",properties:{rawMap:{ref:z}}}}},hV=gV,uV=(z)=>{let J=z.charAt(0).toLowerCase();return J==="s"?"inlineStr":J},mV={getTemplate(z,J,Q){let{ref:Z,data:$,styleId:X}=z,{type:Y,value:U}=$||{type:"empty",value:null},_=Y;if(Y==="f")_="str";else if(Y.charAt(0)===Y.charAt(0).toUpperCase())_=uV(Y);let H={name:"c",properties:{rawMap:{r:Z,t:_==="empty"?void 0:_,s:X?zV(X,Q):void 0}}};if(_==="empty")return H;let G;if(_==="str"&&Y==="f")G=[{name:"f",textNode:L0(lJ(U))}];else if(_==="inlineStr")G=[{name:"is",children:[{name:"t",textNode:L0(lJ(U))}]}];else G=[{name:"v",textNode:U}];return Object.assign({},H,{children:G})}},cV=mV,pV=(z,J)=>{let Q=[],Z=0;for(let $=0;$<z.length;$++){let X=z[$];if(X.mergeAcross)Q.push({pos:$,excelPos:Z}),Z+=X.mergeAcross;Z++}if(Q.length)for(let $=Q.length-1;$>=0;$--){let X=[],Y=z[Q[$].pos];for(let U=1;U<=Y.mergeAcross;U++)X.push({ref:`${R1(Q[$].excelPos+1+U)}${J+1}`,styleId:Y.styleId,data:{type:"empty",value:null}});if(X.length)z.splice(Q[$].pos+1,0,...X)}},iV=(z)=>z.data?.value!==""||z.styleId!==void 0,dV={getTemplate(z,J,Q){let{collapsed:Z,hidden:$,height:X,outlineLevel:Y,cells:U=[]}=z;pV(U,J);let _=U.filter(iV).map((H,G)=>cV.getTemplate(H,G,Q));return{name:"row",properties:{rawMap:{r:J+1,collapsed:Z?"1":"0",hidden:$?"1":"0",ht:X,customHeight:X!=null?"1":"0",spans:"1:1",outlineLevel:Y||void 0}},children:_}}},nV=dV,rV=(z,J,Q)=>{let Z=[],$=[];z.forEach((U,_)=>{let H=U.cells,G=0,W;H.forEach((q,B)=>{let E=B+G+1,K=R1(E),F=_+1;if(q.mergeAcross){G+=q.mergeAcross;let M=R1(B+G+1);Z.push(`${K}${F}:${M}${F}`)}if(!J[E-1])J[E-1]={};let{collapsibleRanges:L}=q;if(L)L.forEach((M)=>{$.push([E+M[0],E+M[1]])});W=J[E-1],W.min=E,W.max=E,q.ref=`${K}${F}`})}),$.sort((U,_)=>{if(U[0]!==_[0])return U[0]-_[0];return _[1]-U[1]});let X=new Map,Y=new Map;return $.filter((U)=>{let _=U.toString();if(X.get(_))return!1;return X.set(_,!0),!0}).forEach((U)=>{let _=J.find((G)=>G.min==U[0]&&G.max==U[1]),H=Y.get(U[0]);J.push({min:U[0],max:U[1],outlineLevel:Q?void 0:H||1,width:(_||{width:100}).width}),Y.set(U[0],(H||0)+1)}),Z},tV=(z)=>{if(!z||z!=="Portrait"&&z!=="Landscape")return"portrait";return z.toLocaleLowerCase()},sV=(z)=>{if(z==null)return 1;let Q=["Letter","Letter Small","Tabloid","Ledger","Legal","Statement","Executive","A3","A4","A4 Small","A5","A6","B4","B5","Folio","Envelope","Envelope DL","Envelope C5","Envelope B5","Envelope C3","Envelope C4","Envelope C6","Envelope Monarch","Japanese Postcard","Japanese Double Postcard"].indexOf(z);return Q===-1?1:Q+1},lV=(z)=>{let J={"&[Page]":"&P","&[Pages]":"&N","&[Date]":"&D","&[Time]":"&T","&[Tab]":"&A","&[Path]":"&Z","&[File]":"&F","&[Picture]":"&G"};for(let Q of Object.keys(J))z=z.replace(Q,J[Q]);return z},aV=(z)=>{if(z==="Center")return"C";if(z==="Right")return"R";return"L"},oV=(z,J)=>{if(!J)return z;if(z+="&amp;&quot;",z+=J.fontName||"Calibri",J.bold!==J.italic)z+=J.bold?",Bold":",Italic";else if(J.bold)z+=",Bold Italic";else z+=",Regular";if(z+="&quot;",J.size)z+=`&amp;${J.size}`;if(J.strikeThrough)z+="&amp;S";if(J.underline)z+=`&amp;${J.underline==="Double"?"E":"U"}`;if(J.color)z+=`&amp;K${J.color.replace("#","").toUpperCase()}`;return z},eV=(z,J,Q)=>z.reduce((Z,$,X)=>{let Y=aV($.position),U=oV(`${Z}&amp;${Y}`,$.font),_=["Left","Center","Right"];if(!$.position)$.position=_[X];let{image:H}=$;if($.value==="&[Picture]"&&H){let G=`${Y}${J}${Q}`;VU(H,G)}return`${U}${L0(lV($.value))}`},""),zO=(z)=>{let J=["all","first","even"],Q=[];return J.forEach((Z)=>{let $=z[Z],X=Z==="all"?"odd":Z;if(!$)return;for(let Y of Object.keys($)){let U=$[Y],_=`${Y.charAt(0).toUpperCase()}${Y.slice(1)}`,H=Y[0].toUpperCase();if(U){let G=Z==="all"?"":Z.toUpperCase();Q.push({name:`${X}${_}`,properties:{rawMap:{"xml:space":"preserve"}},textNode:eV(U,H,G)})}}}),Q},JO=(z)=>{return(J)=>{if(z.length)J.children.push({name:"cols",children:z.map((Q)=>bV.getTemplate(Q))});return J}},QO=(z,J)=>{return(Q)=>{if(z.length)Q.children.push({name:"sheetData",children:z.map((Z,$)=>nV.getTemplate(Z,$,J))});return Q}},ZO=(z)=>{let J=z.length;if(!J)return"";let Q=Array(J+1);Q[0]=J;for(let $=1;$<=J;$++)Q[$]=z.charCodeAt($-1)&255;let Z=0;for(let $=Q.length-1;$>=0;$--){let X=Q[$],Y=(Z&16384)===0?0:1,U=Z<<1&32767;Z=(Y|U)^X}return(Z^52811).toString(16).toUpperCase().padStart(4,"0")},$O=(z)=>{return(J)=>{if(!z)return J;let Q=typeof z==="boolean"?{}:z,Z={sheet:1},$=Q.password?ZO(Q.password):"";if($)Z.password=$;let X={autoFilter:!1,deleteColumns:!1,deleteRows:!1,formatCells:!1,formatColumns:!1,formatRows:!1,insertColumns:!1,insertHyperlinks:!1,insertRows:!1,pivotTables:!1,selectLockedCells:!0,selectUnlockedCells:!0};return Object.keys(X).forEach((Y)=>{let U=Q[Y];if(U==null||U===X[Y])return;Z[Y]=U?0:1}),J.children.push({name:"sheetProtection",properties:{rawMap:Z}}),J}},XO=(z)=>{return(J)=>{if(z.length)J.children.push({name:"mergeCells",properties:{rawMap:{count:z.length}},children:z.map((Q)=>hV.getTemplate(Q))});return J}},YO=(z)=>{return(J)=>{let{top:Q=0.75,right:Z=0.7,bottom:$=0.75,left:X=0.7,header:Y=0.3,footer:U=0.3}=z;return J.children.push({name:"pageMargins",properties:{rawMap:{bottom:$,footer:U,header:Y,left:X,right:Z,top:Q}}}),J}},UO=(z)=>{return(J)=>{if(z)J.children.push({name:"pageSetup",properties:{rawMap:{horizontalDpi:0,verticalDpi:0,orientation:tV(z.orientation),paperSize:sV(z.pageSize)}}});return J}},_O=(z)=>{return(J)=>{if(!z)return J;let Q=z.first!=null?1:0,Z=z.even!=null?1:0;return J.children.push({name:"headerFooter",properties:{rawMap:{differentFirst:Q,differentOddEven:Z}},children:zO(z)}),J}},HO=(z)=>{return(J)=>{if(z)J.children.push({name:"tableParts",properties:{rawMap:{count:"1"}},children:[{name:"tablePart",properties:{rawMap:{"r:id":`rId${++J.rIdCounter}`}}}]});return J}},GO=(z)=>{return(J)=>{if(cz.get(z)?.length)J.children.push({name:"drawing",properties:{rawMap:{"r:id":`rId${++J.rIdCounter}`}}});return J}},WO=(z)=>{return(J)=>{if(Hz.get(z))J.children.push({name:"legacyDrawingHF",properties:{rawMap:{"r:id":`rId${++J.rIdCounter}`}}});return J}},qO=(z=0,J=0)=>{let Q=z>0||J>0;return Q?[{name:"pane",properties:{rawMap:{state:Q?"frozen":void 0,topLeftCell:Q?`${R1(z+1)}${J+1}`:void 0,xSplit:z===0?void 0:z,ySplit:J===0?void 0:J}}}]:void 0},BO=(z=!1,J,Q)=>{return(Z)=>{return Z.children.push({name:"sheetViews",children:[{name:"sheetView",properties:{rawMap:{rightToLeft:z===!0?"1":"0",workbookViewId:"0"}},children:qO(J,Q)}]}),Z}},EO=()=>{return(z)=>{return z.children.push({name:"sheetPr",children:[{name:"outlinePr",properties:{rawMap:{summaryBelow:0}}}]}),z}},KO=(z)=>{return(J)=>{let Q=z.reduce((Z,$)=>{if($.outlineLevel&&$.outlineLevel>Z)return $.outlineLevel;return Z},0);return J.children.push({name:"sheetFormatPr",properties:{rawMap:{baseColWidth:10,defaultRowHeight:16,outlineLevelRow:Q?Q:void 0}}}),J}},FO={getTemplate(z){let{worksheet:J,currentSheet:Q,config:Z}=z,{margins:$={},pageSetup:X,headerFooterConfig:Y,suppressColumnOutline:U,rightToLeft:_,frozenRowCount:H,frozenColumnCount:G,protectSheet:W}=Z,{table:q}=J,{rows:B,columns:E}=q,K=E?.length?rV(B,E,!!U):[],F=s4.get(Q),{children:L}=[EO(),BO(_,G,H),KO(B),JO(E),QO(B,Q+1),$O(W),XO(K),YO($),UO(X),_O(Y),GO(Q),WO(Q),HO(F)].reduce((M,D)=>D(M),{children:[],rIdCounter:0});return{name:"worksheet",properties:{prefixedAttributes:[{prefix:"xmlns:",map:{r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships"}}],rawMap:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main"}},children:L}}},LO=FO,K1=new Map,z4=[],M1=[],D1=new Map,mz=new Map,cz=new Map,Hz=new Map,U2=new Map,_2=new Map,s4=new Map,MO="AG-GRID-TABLE",A7="SINGLE_SHEET";function DO(){return A7}function RO(z){A7=z}function AO(z,J,Q){TO(J),JV(z,z4.length);let Z=Object.assign({},Q);if(Q.exportAsExcelTable&&Q.pivotModeActive)V(163,{featureName:"pivot mode"}),Z.exportAsExcelTable=!1;OO(J,Z);let $=iO(J,Z);return dO($),$}function jO(z){return z.replace(/^[^a-zA-Z_]+/,"_").replace(/\s/g,"_").replace(/[^a-zA-Z0-9_]/g,"_")}function VO(z,J){if(s4.has(z)){V(164);return}s4.set(z,J)}function OO(z,J){let{exportAsExcelTable:Q,prependContent:Z,appendContent:$,headerRowCount:X=0}=J;if(!Q)return;let Y=typeof Q==="boolean"?{}:Q,{name:U,showColumnStripes:_,showRowStripes:H,showFilterButton:G,highlightFirstColumn:W,highlightLastColumn:q}=Y,B=jO(U||MO),E=z4.length-1,{table:K}=z,{rows:F,columns:L}=K,M=Z?Z.length:0,D=$?$.length:0,A=F.length,O=L.length,T=[],S=[];for(let k=0;k<O;k++){let C=L[k];T.push(C.displayName||""),S.push(G==="match"||G===void 0?C.filterAllowed??!1:G)}if(!T?.length||!A||!B){V(165);return}VO(E,{name:`table${s4.size+1}`,displayName:B,columns:T,showFilterButtons:S,rowRange:[X+M,X+(A-X)-D],showRowStripes:H??!0,showColumnStripes:_??!1,highlightFirstColumn:W??!1,highlightLastColumn:q??!1})}function VU(z,J){let Q=z4.length-1,Z=z;Z.headerFooterPosition=J,OU({imageToAdd:Z,idx:Q});let $=Hz.get(Q);if(!$)$=[],Hz.set(Q,$);if(!$.find((X)=>X.id===z.id))$.push(z)}function PO(z,J,Q,Z,$){let X=z4.length,{row:Y,column:U}=z.position||{},_=z;if(Z){if(J!=null&&Q!=null&&(!Y||!U)){if(!z.position)z.position={};z.position=Object.assign({},z.position,{row:J,column:Z.indexOf(Q)+1})}NA(_,Z),wA(_,$)}OU({imageToAdd:_,idx:X});let H=_2.get(X);if(!H)H=new Map,_2.set(X,H);let G=cz.get(X);if(!G)cz.set(X,[_]);else G.push(_);if(!H.get(z.id))H.set(z.id,{index:H.size,type:z.imageType})}function OU(z){let{imageToAdd:J,idx:Q}=z,Z=mz.get(J.id);if(Z){let $=Z.find((X)=>X.sheetId===Q);if($)$.image.push(J);else Z.push({sheetId:Q,image:[J]})}else mz.set(J.id,[{sheetId:Q,image:[J]}]),U2.set(J.id,{type:J.imageType,index:U2.size})}function TO(z){let J=L0(z.name)||"",Q="";while(z4.indexOf(`${J}${Q}`)!==-1)if(Q==="")Q="_1";else Q=`_${parseInt(Q.slice(1),10)+1}`;z.name=`${J}${Q}`,z4.push(z.name)}function SO(z){if(K1.has(z))return K1.get(z);return K1.set(z,K1.size),K1.size-1}function IO(){K1.clear(),mz.clear(),cz.clear(),Hz.clear(),U2.clear(),_2.clear(),s4.clear(),z4=[],M1=[],D1=new Map,A7="SINGLE_SHEET"}function fO(z){return g0(wV.getTemplate(z4,z))}function kO(z){return g0(QV.getTemplate(z))}function CO(){return g0(Uj.getTemplate(K1))}function vO(z){return g0(pA.getTemplate(z))}function NO(z){return g0(rA.getTemplate(z))}function wO(z,J){return g0(mA.getTemplate({sheetLen:z,hasCustomProperties:J}))}function yO(z){let J=[{Id:"rId1",Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",Target:"xl/workbook.xml"},{Id:"rId2",Type:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",Target:"docProps/core.xml"}];if(z)J.push({Id:"rId3",Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties",Target:"docProps/custom.xml"});let Q=B6.getTemplate(J);return g0(Q)}function xO(){return g0(MV.getTemplate())}function bO(z,J){return g0($V.getTemplate(z,J))}function gO(z){let J=Array(z).fill(void 0).map((Z,$)=>({Id:`rId${$+1}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet",Target:`worksheets/sheet${$+1}.xml`})),Q=B6.getTemplate([...J,{Id:`rId${z+1}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",Target:"theme/theme1.xml"},{Id:`rId${z+2}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",Target:"styles.xml"},{Id:`rId${z+3}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",Target:"sharedStrings.xml"}]);return g0(Q)}function hO(z){return g0(Qj.getTemplate({sheetIndex:z}))}function uO(z){let J=_2.get(z)||[],Q=[];for(let[Z,$]of J){let{index:X,type:Y}=$;Q.push({Id:`rId${X+1}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:`../media/image${U2.get(Z).index+1}.${$Q(Y)}`})}return g0(B6.getTemplate(Q))}function mO(z){return g0(IV.getTemplate({sheetIndex:z}),!0)}function cO(z){let J=Hz.get(z)||[],Q=[];for(let Z=0;Z<J.length;Z++){let $=J[Z],X=U2.get($.id);if(!X)continue;let{index:Y,type:U}=X;Q.push({Id:`rId${Z+1}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:`../media/image${Y+1}.${$Q(U)}`})}return g0(B6.getTemplate(Q))}function pO({drawingIndex:z,vmlDrawingIndex:J,tableName:Q}={}){if(z===void 0&&J===void 0&&Q===void 0)return"";let Z=[];if(z!=null)Z.push({Id:`rId${Z.length+1}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",Target:`../drawings/drawing${z+1}.xml`});if(J!=null)Z.push({Id:`rId${Z.length+1}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",Target:`../drawings/vmlDrawing${J+1}.vml`});if(Q!=null)Z.push({Id:`rId${Z.length+1}`,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/table",Target:`../tables/${Q}.xml`});let $=B6.getTemplate(Z);return g0($)}function iO(z,J){return g0(LO.getTemplate({worksheet:z,currentSheet:z4.length-1,config:J}))}var cJ=(z,J)=>{if(!z.size)return;let Q=new Map;J.forEach((Z,$)=>{if(z.has(Z))Q.set($,z.get(Z))}),z.clear(),Q.forEach((Z,$)=>z.set($,Z))},dO=(z)=>{let J=D1.get(z)??[];J.push(z4.length-1),D1.set(z,J),M1.push(z)},nO=(z)=>{let J=new Map(D1),Q=[];for(let Z of z){let $=J.get(Z);if(!$?.length)return null;let X=$.shift();Q.push(X),J.set(Z,$)}return Q},rO=(z)=>{if(!z.length||M1.length===0)return null;let J=new Set,Q=[];for(let Z of z){let $=M1.findIndex((X,Y)=>!J.has(Y)&&X===Z);if($===-1)return null;J.add($),Q.push($)}return Q},tO=(z)=>{let J=new Map;z.forEach((Q,Z)=>J.set(Q,Z)),z4=z.map((Q)=>z4[Q]),M1=z.map((Q)=>M1[Q]),cJ(cz,z),cJ(Hz,z),cJ(s4,z),cJ(_2,z),mz.forEach((Q)=>{Q.forEach((Z)=>{let $=J.get(Z.sheetId);if($!=null)Z.sheetId=$})}),D1=new Map,M1.forEach((Q,Z)=>{let $=D1.get(Q)??[];$.push(Z),D1.set(Q,$)})},sO=(z)=>{if(z.length<=1)return;let J=nO(z)??rO(z);if(!J)return;tO(J)},j7=class{getStringPosition(z){return SO(z)}addBodyImageToMap(z,J,Q,Z,$){PO(z,J,Q,Z,$)}addHeaderFooterImageToMap(z,J){VU(z,J)}addWorksheet(z,J,Q){return AO(z,J,Q)}syncOrderWithSheetData(z){sO(z)}reset(){IO()}setFactoryMode(z){RO(z)}getFactoryMode(){return DO()}getSheetNames(){return[...z4]}},lO=async(z)=>{let J=0,Q=[],Z=new WritableStream({write:(Y)=>{Q.push(Y),J+=Y.length}}),$=new ReadableStream({start:(Y)=>{let U=new FileReader;U.onload=(_)=>{if(_.target?.result)Y.enqueue(_.target.result);Y.close()},U.readAsArrayBuffer(z)}}),X=new window.CompressionStream("deflate-raw");return await $.pipeThrough(X).pipeTo(Z),{size:J,content:new Blob(Q)}},aO=async(z)=>{let J=new Blob([z]),{size:Q,content:Z}=await lO(J),$=new Uint8Array(await Z.arrayBuffer());return{size:Q,content:$}},oO=(z)=>{let J=z.getHours();return J<<=6,J=J|z.getMinutes(),J<<=5,J=J|z.getSeconds()/2,J},eO=(z)=>{let J=z.getFullYear()-1980;return J<<=4,J=J|z.getMonth()+1,J<<=5,J=J|z.getDate(),J};function b0(z,J){let Q="";for(let Z=0;Z<J;Z++)Q+=String.fromCharCode(z&255),z>>>=8;return Q}var xY=(z)=>{if(!z.length)return 0;let J=-1,Q=0,Z=0,$=0;for(let X=0;X<z.length;X++)Q=z[X],Z=(J^Q)&255,$=zP[Z],J=J>>>8^$;return J^-1},bY=(z)=>{if(!z.length)return 0;if(typeof z==="string")return xY(new TextEncoder().encode(z));return xY(z)},zP=new Uint32Array([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918000,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]);function JP(z){let J=String.fromCharCode;function Q(W){let q=[];if(!W)return[];let B=W.length,E=0,K,F;while(E<B)if(K=W.charCodeAt(E++),K>=55296&&K<=56319&&E<B)if(F=W.charCodeAt(E++),(F&64512)==56320)q.push(((K&1023)<<10)+(F&1023)+65536);else q.push(K),E--;else q.push(K);return q}function Z(W){if(W>=55296&&W<=57343)throw Error(U4(255,{point:W}))}function $(W,q){return J(W>>q&63|128)}function X(W){if((W&4294967168)==0)return J(W);let q="";if((W&4294965248)==0)q=J(W>>6&31|192);else if((W&4294901760)==0)Z(W),q=J(W>>12&15|224),q+=$(W,6);else if((W&4292870144)==0)q=J(W>>18&7|240),q+=$(W,12),q+=$(W,6);return q+=J(W&63|128),q}let Y=Q(z),U=Y.length,_=-1,H,G="";while(++_<U)H=Y[_],G+=X(H);return G}var PU=(z,J,Q,Z,$,X)=>{let{content:Y,path:U,created:_}=z,H=oO(_),G=eO(_),W=bY($),q=X!==void 0?X:Z,B=JP(U),E=B!==U,K="";if(E){let D=b0(1,1)+b0(bY(B),4)+B;K="up"+b0(D.length,2)+D}let F="\x14\x00"+(E?"\x00\b":"\x00\x00")+b0(J?8:0,2)+b0(H,2)+b0(G,2)+b0(q?W:0,4)+b0(X??Z,4)+b0(Z,4)+b0(B.length,2)+b0(K.length,2),L="PK\x03\x04"+F+B+K,M="PK\x01\x02\x14\x00"+F+"\x00\x00\x00\x00\x00\x00"+(Y?"\x00\x00\x00\x00":"\x10\x00\x00\x00")+b0(Q,4)+B+K;return{localFileHeader:Uint8Array.from(L,(D)=>D.charCodeAt(0)),centralDirectoryHeader:Uint8Array.from(M,(D)=>D.charCodeAt(0))}},TU=(z)=>{let J;if(typeof z==="string"){let Q=atob(z.split(";base64,")[1]);J=Uint8Array.from(Q,(Z)=>Z.charCodeAt(0))}else J=z;return{size:J.length,content:J}},QP=async(z)=>{let{content:J}=z,{size:Q,content:Z}=!J?{size:0,content:Uint8Array.from([])}:TU(J),$,X,Y=!1;if(z.type==="file"&&Z&&Q>0){let _=await aO(Z);$=_.content,X=_.size,Y=!0}return{rawContent:Z,rawSize:Q,deflatedContent:$,deflatedSize:X,isCompressed:Y}},ZP=(z,J)=>{let{content:Q}=z,{content:Z}=!Q?{content:Uint8Array.from([])}:TU(Q);return{...PU(z,!1,J,Z.length,Z,void 0),content:Z,isCompressed:!1}},$P=(z,J,Q)=>{let Z="PK\x05\x06\x00\x00\x00\x00"+b0(z,2)+b0(z,2)+b0(J,4)+b0(Q,4)+"\x00\x00";return Uint8Array.from(Z,($)=>$.charCodeAt(0))},SU=class{constructor(){this.folders=[],this.files=[]}addFolders(z){z.forEach(this.addFolder.bind(this))}addFolder(z){this.folders.push({path:z,created:new Date,isBase64:!1,type:"folder"})}addFile(z,J,Q=!1){this.files.push({path:z,created:new Date,content:Q?J:new TextEncoder().encode(J),isBase64:Q,type:"file"})}async getZipFile(z="application/zip"){let J=await this.buildCompressedFileStream();return this.clearStream(),new Blob([J],{type:z})}getUncompressedZipFile(z="application/zip"){let J=this.buildFileStream();return this.clearStream(),new Blob([J],{type:z})}clearStream(){this.folders=[],this.files=[]}packageFiles(z){let J=0,Q=0;for(let H of z){let{localFileHeader:G,centralDirectoryHeader:W,content:q}=H;J+=G.length+q.length,Q+=W.length}let Z=new Uint8Array(J),$=new Uint8Array(Q),X=0,Y=0;for(let H of z){let{localFileHeader:G,centralDirectoryHeader:W,content:q}=H;Z.set(G,X),X+=G.length,Z.set(q,X),X+=q.length,$.set(W,Y),Y+=W.length}let U=$P(z.length,Q,J),_=new Uint8Array(Z.length+$.length+U.length);return _.set(Z),_.set($,Z.length),_.set(U,Z.length+$.length),_}async buildCompressedFileStream(){let z=[...this.folders,...this.files],J=await Promise.all(z.map(QP)),Q=[],Z=0;for(let $=0;$<z.length;$++){let X=z[$],{rawContent:Y,rawSize:U,deflatedContent:_,deflatedSize:H,isCompressed:G}=J[$],W=PU(X,G,Z,U,Y,H),q=_??Y;Q.push({...W,content:q,isCompressed:G}),Z+=W.localFileHeader.length+q.length}return this.packageFiles(Q)}buildFileStream(){let z=[...this.folders,...this.files],J=[],Q=0;for(let Z of z){let $=ZP(Z,Q),{localFileHeader:X,content:Y}=$;J.push($),Q+=X.length+Y.length}return this.packageFiles(J)}},XP=(z)=>{if(z.addFolders(["_rels/","docProps/","xl/","xl/theme/","xl/_rels/","xl/worksheets/"]),!mz.size)return;z.addFolders(["xl/worksheets/_rels","xl/drawings/","xl/drawings/_rels","xl/media/"]);let J=0;mz.forEach((Q)=>{let Z=Q[0].image[0],{base64:$,imageType:X}=Z;z.addFile(`xl/media/image${++J}.${$Q(X)}`,$,!0)})},YP=(z,J)=>{let Q=0,Z=0;for(let $=0;$<J.length;$++){let X=J[$];z.addFile(`xl/worksheets/sheet${$+1}.xml`,X,!1);let Y=mz.size>0&&cz.has($),U=s4.size>0&&s4.get($),_=mz.size&&Hz.has($);if(!Y&&!U&&!_)continue;let H,G,W;if(Y)UP(z,$,Q),G=Q,Q++;if(_)_P(z,$,Z),W=Z,Z++;if(U)H=U.name;let q=`xl/worksheets/_rels/sheet${$+1}.xml.rels`;z.addFile(q,pO({tableName:H,drawingIndex:G,vmlDrawingIndex:W}))}},UP=(z,J,Q)=>{let $=`xl/drawings/drawing${Q+1}.xml`,X=`xl/drawings/_rels/drawing${Q+1}.xml.rels`;z.addFile(X,uO(J)),z.addFile($,hO(J))},_P=(z,J,Q)=>{let $=`xl/drawings/vmlDrawing${Q+1}.vml`,X=`xl/drawings/_rels/vmlDrawing${Q+1}.vml.rels`;z.addFile($,mO(J)),z.addFile(X,cO(J))},HP=(z)=>{let J=s4,Q=Array.from(J.keys());for(let Z=0;Z<Q.length;Z++){let $=Q[Z],X=J.get($);if(!X)continue;z.addFile(`xl/tables/${X.name}.xml`,bO(X,Z))}},GP=(z,J,Q,Z,$,X)=>{let Y=!!X&&Object.keys(X).some((U)=>X[U]!=null);if(z.addFile("xl/workbook.xml",fO($)),z.addFile("xl/styles.xml",kO(J)),z.addFile("xl/sharedStrings.xml",CO()),z.addFile("xl/theme/theme1.xml",xO()),z.addFile("xl/_rels/workbook.xml.rels",gO(Z)),z.addFile("docProps/core.xml",vO(Q)),Y)z.addFile("docProps/custom.xml",NO(X));z.addFile("[Content_Types].xml",wO(Z,Y)),z.addFile("_rels/.rels",yO(Y))},IU=(z,J,Q={},Z)=>{if(!J||J.length===0)return V(159),Z.reset(),!1;Z.syncOrderWithSheetData(J);let{fontSize:$=11,author:X="AG Grid",activeTab:Y=0,customMetadata:U}=Q,_=J.length,H=Math.max(Math.min(Y,_-1),0);return XP(z),HP(z),YP(z,J),GP(z,$,X,_,H,U),Z.reset(),!0},gY=(z,J=new j7)=>{let{data:Q,fontSize:Z,author:$,activeSheetIndex:X,customMetadata:Y}=z,U=z.mimeType||"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",_=new SU;if(!IU(_,Q,{author:$,fontSize:Z,activeTab:X,customMetadata:Y},J))return Promise.resolve(void 0);return _.getZipFile(U)},hY=(z,J=new j7)=>{let{data:Q,fontSize:Z,author:$,activeSheetIndex:X,customMetadata:Y}=z,U=z.mimeType||"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",_=new SU;if(!IU(_,Q,{author:$,fontSize:Z,activeTab:X,customMetadata:Y},J))return;return _.getUncompressedZipFile(U)};var WP=class extends C5{constructor(){super(...arguments);this.beanName="excelCreator",this.workbook=new j7}getMergedParams(z){let J=this.gos.get("defaultExcelExportParams");return Object.assign({},J,z)}export(z){if(this.isExportSuppressed()){V(160);return}let J=()=>{let Z=this.getMergedParams(z),$=this.getData(Z),{fontSize:X,author:Y,mimeType:U,customMetadata:_}=Z,H={data:[$],fontSize:X,author:Y,mimeType:U,customMetadata:_};this.packageCompressedFile(H).then((G)=>{if(G){let{fileName:W}=Z,q=typeof W==="function"?W(v(this.gos,{})):W;wJ(this.getFileName(q),G)}})},{overlays:Q}=this.beans;if(Q)Q.showExportOverlay(J);else J()}exportDataAsExcel(z){this.export(z)}getDataAsExcel(z){let J=this.getMergedParams(z),Q=this.getData(J),{fontSize:Z,author:$,mimeType:X,customMetadata:Y}=J,U={data:[Q],fontSize:Z,author:$,mimeType:X,customMetadata:Y};return this.packageFile(U)}setFactoryMode(z){this.workbook.setFactoryMode(z)}getFactoryMode(){return this.workbook.getFactoryMode()}getSheetDataForExcel(z){let J=this.getMergedParams(z);return this.getData(J)}getMultipleSheetsAsExcel(z){return hY(z,this.workbook)}exportMultipleSheetsAsExcel(z){gY(z,this.workbook).then((J)=>{let{fileName:Q="export.xlsx"}=z;if(J){let Z=typeof Q==="function"?Q():Q;wJ(Z,J)}})}getDefaultFileExtension(){return"xlsx"}createSerializingSession(z){let{colModel:J,colNames:Q,rowGroupColsSvc:Z,valueSvc:$,formula:X,gos:Y}=this.beans,U=Y.get("excelStyles")||[],_=this.createStyleLinker(U),H={...z,colModel:J,colNames:Q,rowGroupColsSvc:Z,valueSvc:$,formulaSvc:X,gos:Y,suppressRowOutline:z.suppressRowOutline||z.skipRowGroups,headerRowHeight:z.headerRowHeight||z.rowHeight,baseExcelStyles:U,rightToLeft:z.rightToLeft??Y.get("enableRtl"),styleLinker:_,headerRowCount:O$(J),pivotModeActive:J.isPivotActive(),workbook:this.workbook};return new bA(H)}createStyleLinker(z){let J=[],Q=new Set,Z=new Map;z.forEach((Y,U)=>{J.push(Y.id),Q.add(Y.id),Z.set(Y.id,U)});let{gos:$,cellStyles:X}=this.beans;return(Y)=>{let{rowType:U,rowIndex:_,value:H,column:G,columnGroup:W,node:q}=Y,B=U==="HEADER",E=U==="HEADER_GROUPING",K=B?G:W,F=[];if(B||E){if(F.push("header"),E)F.push("headerGroup");if(K)F=F.concat(OJ(K.getDefinition(),$,G||null,W||null));return F}let L=["cell"];if(!J.length)return L;let M=G.getDefinition();return X?.processAllCellClasses(M,v($,{value:H,data:q.data,node:q,colDef:M,column:G,rowIndex:_}),(D)=>{if(Q.has(D))L.push(D)}),L.sort((D,A)=>{let O=Z.get(D)??-1,T=Z.get(A)??-1;return O===T?0:O<T?-1:1})}}isExportSuppressed(){return this.gos.get("suppressExcelExport")}packageCompressedFile(z){return gY(z,this.workbook)}packageFile(z){return hY(z,this.workbook)}},qP=":where(.ag-virtual-list-viewport) .ag-tab-guard{position:sticky}.ag-virtual-list-viewport{flex:1 1 auto;height:100%;min-width:0;overflow:auto;position:relative;width:100%}.ag-virtual-list-container{overflow:hidden;position:relative}.ag-virtual-list-item{height:var(--ag-list-item-height);position:absolute;width:100%}";function BP(z){return{tag:"div",cls:`ag-virtual-list-viewport ag-${z}-virtual-list-viewport`,role:"presentation",children:[{tag:"div",ref:"eContainer",cls:`ag-virtual-list-container ag-${z}-virtual-list-container`}]}}var EP=class extends Xz{constructor(z,J){super(BP(J?.cssIdentifier||"default"));this.stopPropagationCallbacks=z,this.renderedRows=new Map,this.rowHeight=20,this.pageSize=-1,this.isScrolling=!1,this.isHeightFromTheme=!0,this.eContainer=P,this.awaitStableCallbacks=[],this.registerCSS(qP);let{cssIdentifier:Q="default",ariaRole:Z="listbox",listName:$,moveItemCallback:X}=J||{};this.cssIdentifier=Q,this.ariaRole=Z,this.listName=$,this.moveItemCallback=X}postConstruct(){this.addScrollListener(),this.rowHeight=this.getItemHeight(),this.addResizeObserver(),this.initialiseTabGuard({onFocusIn:(z)=>this.onFocusIn(z),onFocusOut:(z)=>this.onFocusOut(z),focusInnerElement:(z)=>this.focusInnerElement(z),onTabKeyDown:(z)=>this.onTabKeyDown(z),handleKeyDown:(z)=>this.handleKeyDown(z)},this.stopPropagationCallbacks),this.refreshAriaProperties(),this.addManagedEventListeners({stylesChanged:this.onStylesChanged.bind(this)})}onStylesChanged(z){if(z.listItemHeightChanged)this.rowHeight=this.getItemHeight(),this.refresh()}refreshAriaProperties(){let J=this.getLocaleTextFunc()("ariaDefaultListName",this.listName||"List"),Q=this.eContainer;H0(Q,this.model?.getRowCount()>0?this.ariaRole:"presentation"),G0(Q,J)}addResizeObserver(){let z=()=>I4(this.beans,()=>this.drawVirtualRows()),J=S4(this.beans,this.getGui(),z);this.addDestroyFunc(J)}focusInnerElement(z){return this.focusRow(z?this.model.getRowCount()-1:0),!0}onFocusIn(z){let J=z.target;if(J.classList.contains("ag-virtual-list-item"))this.lastFocusedRowIndex=U9(J)-1}onFocusOut(z){if(!this.getFocusableElement().contains(z.relatedTarget))this.lastFocusedRowIndex=null}handleKeyDown(z){let{key:J,shiftKey:Q}=z;switch(J){case R.UP:case R.DOWN:{let Z=J===R.UP;if(z.preventDefault(),Q)this.moveItem(Z);else this.navigate(Z)}break;case R.PAGE_HOME:case R.PAGE_END:case R.PAGE_UP:case R.PAGE_DOWN:if(this.navigateToPage(J)!==null)z.preventDefault();break}}onTabKeyDown(z){this.stopPropagationCallbacks?.stopPropagation(z),this.forceFocusOutOfContainer(z.shiftKey)}getNextRow(z){if(this.lastFocusedRowIndex==null)return;let J=this.lastFocusedRowIndex+(z?-1:1);if(J<0||J>=this.model.getRowCount())return;return J}moveItem(z){if(!this.moveItemCallback)return;let J=this.getComponentAt(this.lastFocusedRowIndex);if(!J)return;this.moveItemCallback(J,z)}navigate(z){let J=this.getNextRow(z);if(J===void 0)return;this.focusRow(J)}navigateToPage(z,J="focused"){let Q=!1;if(J==="focused")J=this.getLastFocusedRow(),Q=!0;let Z=this.model.getRowCount()-1,$=-1;if(z===R.PAGE_HOME)$=0;else if(z===R.PAGE_END)$=Z;else if(z===R.PAGE_DOWN)$=Math.min(J+this.pageSize,Z);else if(z===R.PAGE_UP)$=Math.max(J-this.pageSize,0);if($===-1)return null;if(Q)this.focusRow($);else this.ensureIndexVisible($);return $}getLastFocusedRow(){return this.lastFocusedRowIndex}focusRow(z){if(this.isScrolling)return;this.isScrolling=!0,this.ensureIndexVisible(z),I4(this.beans,()=>{if(this.isScrolling=!1,!this.isAlive())return;let J=this.renderedRows.get(z);if(J)J.eDiv.focus()})}getComponentAt(z){let J=this.renderedRows.get(z);return J&&J.rowComponent}forEachRenderedRow(z){this.renderedRows.forEach((J,Q)=>z(J.rowComponent,Q))}getItemHeight(){if(!this.isHeightFromTheme)return this.rowHeight;return this.beans.environment.getDefaultListItemHeight()}ensureIndexVisible(z,J=!0){let Q=this.model.getRowCount();if(typeof z!=="number"||z<0||z>=Q)return!1;let Z=z*this.rowHeight,$=Z+this.rowHeight,X=this.getGui(),Y=X.scrollTop,U=X.offsetHeight,_=Y+U,H=J?0:this.rowHeight,G=Y>Z+H,W=_<$-H;if(G)return X.scrollTop=Z,!0;if(W){let q=$-U;return X.scrollTop=q,!0}return!1}setComponentCreator(z){this.componentCreator=z}setComponentUpdater(z){this.componentUpdater=z}getRowHeight(){return this.rowHeight}getScrollTop(){return this.getGui().scrollTop}setRowHeight(z){this.isHeightFromTheme=!1,this.rowHeight=z,this.refresh()}refresh(z){if(this.model==null||!this.isAlive())return;let J=this.model.getRowCount();this.eContainer.style.height=`${J*this.rowHeight}px`,this.refreshAriaProperties(),this.awaitStable(()=>{if(!this.isAlive())return;if(this.canSoftRefresh(z))this.drawVirtualRows(!0);else this.clearVirtualRows(),this.drawVirtualRows()})}awaitStable(z){if(this.awaitStableCallbacks.push(z),this.awaitStableCallbacks.length>1)return;let J=this.model.getRowCount();bZ(this,()=>this.eContainer.clientHeight>=J*this.rowHeight,()=>{if(!this.isAlive())return;let Q=this.awaitStableCallbacks;this.awaitStableCallbacks=[];for(let Z of Q)Z()})}canSoftRefresh(z){return!!(z&&this.renderedRows.size&&typeof this.model.areRowsEqual==="function"&&this.componentUpdater)}clearVirtualRows(){this.renderedRows.forEach((z,J)=>this.removeRow(J))}drawVirtualRows(z){if(!this.isAlive()||!this.model)return;let J=this.getGui(),Q=J.scrollTop,Z=Q+J.offsetHeight;if(Q===Z)this.clearVirtualRows();else{let $=Math.floor(Q/this.rowHeight),X=Math.floor(Z/this.rowHeight);this.pageSize=Math.floor((Z-Q)/this.rowHeight),this.ensureRowsRendered($,X,z)}}ensureRowsRendered(z,J,Q){if(this.renderedRows.forEach((Z,$)=>{if(($<z||$>J)&&$!==this.lastFocusedRowIndex)this.removeRow($)}),Q)this.refreshRows();for(let Z=z;Z<=J;Z++){if(this.renderedRows.has(Z))continue;if(Z<this.model.getRowCount())this.insertRow(Z)}}insertRow(z){let{model:J}=this;if(z<0||z>=J.getRowCount())return;let{cssIdentifier:Q,ariaRole:Z,renderedRows:$,eContainer:X}=this,Y=J.getRow(z),U=Z==="tree"?"treeitem":"option",_=W0({tag:"div",cls:`ag-virtual-list-item ag-${Q}-virtual-list-item`,role:U,attrs:{tabindex:"-1"}});h2(_,J.getRowCount()),u2(_,z+1);let H=this.rowHeight;_.style.height=`${H}px`,_.style.top=`${H*z}px`;let G=this.componentCreator(Y,_);if(G.addGuiEventListener("focusin",()=>this.lastFocusedRowIndex=z),_.appendChild(G.getGui()),$.has(z-1))$.get(z-1).eDiv.insertAdjacentElement("afterend",_);else if($.has(z+1))$.get(z+1).eDiv.insertAdjacentElement("beforebegin",_);else X.appendChild(_);$.set(z,{rowComponent:G,eDiv:_,value:Y})}removeRow(z){let J=this.renderedRows.get(z);J.eDiv.remove(),this.destroyBean(J.rowComponent),this.renderedRows.delete(z)}refreshRows(){let z=this.model.getRowCount();this.renderedRows.forEach((J,Q)=>{if(Q>=z)this.removeRow(Q);else{let Z=this.model.getRow(Q);if(this.model.areRowsEqual?.(J.value,Z))this.componentUpdater(Z,J.rowComponent);else this.removeRow(Q)}})}addScrollListener(){this.addGuiEventListener("scroll",()=>this.drawVirtualRows(),{passive:!0})}setModel(z){this.model=z}getAriaElement(){return this.eContainer}destroy(){if(!this.isAlive())return;this.clearVirtualRows(),this.awaitStableCallbacks.length=0,super.destroy()}},KP='.ag-list-item-hovered:after{background-color:var(--ag-accent-color);content:"";height:1px;left:0;position:absolute;right:0}.ag-item-highlight-top:after{top:0}.ag-item-highlight-bottom:after{bottom:0}',$7="ag-list-item-hovered",FP=class extends R0{constructor(z,J,Q){super();this.comp=z,this.virtualList=J,this.params=Q,this.currentDragValue=null,this.lastHoveredListItem=null}postConstruct(){this.beans.environment.addGlobalCSS(KP,"component-AgVirtualListDragFeature"),this.params.addListeners(this,this.listItemDragStart.bind(this),this.listItemDragEnd.bind(this)),this.createDropTarget(),this.createAutoScrollService()}listItemDragStart(z){this.currentDragValue=this.params.getCurrentDragValue(z),this.moveBlocked=this.params.isMoveBlocked(this.currentDragValue)}listItemDragEnd(){window.setTimeout(()=>{this.currentDragValue=null,this.moveBlocked=!1},10)}createDropTarget(){let z={isInterestedIn:(J)=>J===this.params.dragSourceType,getIconName:()=>this.moveBlocked?"pinned":"move",getContainer:()=>this.comp.getGui(),onDragging:(J)=>this.onDragging(J),onDragStop:()=>this.onDragStop(),onDragLeave:()=>this.onDragLeave(),onDragCancel:()=>this.onDragCancel()};this.beans.dragAndDrop?.addDropTarget(z)}createAutoScrollService(){let z=this.virtualList.getGui();this.autoScrollService=new TJ({scrollContainer:z,scrollAxis:"y",getVerticalPosition:()=>z.scrollTop,setVerticalPosition:(J)=>z.scrollTop=J})}onDragging(z){if(!this.currentDragValue||this.moveBlocked)return;let J=this.getListDragItem(z),Q=this.virtualList.getComponentAt(J.rowIndex);if(!Q)return;let Z=Q.getGui().parentElement;if(this.lastHoveredListItem&&this.lastHoveredListItem.rowIndex===J.rowIndex&&this.lastHoveredListItem.position===J.position)return;this.autoScrollService.check(z.event),this.clearHoveredItems(),this.lastHoveredListItem=J,vZ(Z,$7),vZ(Z,`ag-item-highlight-${J.position}`)}getListDragItem(z){let J=this.virtualList.getGui(),Q=Number.parseFloat(window.getComputedStyle(J).paddingTop),Z=this.virtualList.getRowHeight(),$=this.virtualList.getScrollTop(),X=Math.max(0,(z.y-Q+$)/Z),Y=this.params.getNumRows(this.comp)-1,U=Math.min(Y,X)|0;return{rowIndex:U,position:Math.round(X)>X||X>Y?"bottom":"top",component:this.virtualList.getComponentAt(U)}}onDragStop(){if(this.moveBlocked)return;this.params.moveItem(this.currentDragValue,this.lastHoveredListItem),this.clearDragProperties()}onDragCancel(){this.clearDragProperties()}onDragLeave(){this.clearDragProperties()}clearDragProperties(){this.clearHoveredItems(),this.autoScrollService.ensureCleared()}clearHoveredItems(){let z=this.virtualList.getGui();for(let J of z.querySelectorAll(`.${$7}`))for(let Q of[$7,"ag-item-highlight-top","ag-item-highlight-bottom"])J.classList.remove(Q);this.lastHoveredListItem=null}};var LP=".ag-panel{background-color:var(--ag-panel-background-color);display:flex;flex-direction:column;overflow:hidden;position:relative}.ag-dialog{border:var(--ag-dialog-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dialog-shadow);position:absolute}.ag-panel-title-bar{align-items:center;background-color:var(--ag-panel-title-bar-background-color);border-bottom:var(--ag-panel-title-bar-border);color:var(--ag-panel-title-bar-text-color);cursor:default;display:flex;flex:none;font-family:var(--ag-panel-title-bar-font-family);font-size:var(--ag-panel-title-bar-font-size);font-weight:var(--ag-panel-title-bar-font-weight);height:var(--ag-panel-title-bar-height);padding:var(--ag-spacing) var(--ag-cell-horizontal-padding)}.ag-panel-title-bar-button{cursor:pointer;:where(.ag-icon){color:var(--ag-panel-title-bar-icon-color)}}:where(.ag-ltr) .ag-panel-title-bar-button{margin-left:calc(var(--ag-spacing)*2);margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-panel-title-bar-button{margin-left:var(--ag-spacing);margin-right:calc(var(--ag-spacing)*2)}.ag-panel-title-bar-title{flex:1 1 auto}.ag-panel-title-bar-buttons{display:flex}.ag-panel-content-wrapper{display:flex;flex:1 1 auto;overflow:hidden;position:relative}:where(.ag-dragging-fill-handle) .ag-dialog,:where(.ag-dragging-range-handle) .ag-dialog{opacity:.7;pointer-events:none}";function MP(z){return z??(z=z||"default"),{tag:"div",cls:`ag-panel ag-${z}-panel`,attrs:{tabindex:"-1"},children:[{tag:"div",ref:"eTitleBar",cls:`ag-panel-title-bar ag-${z}-panel-title-bar ag-unselectable`,children:[{tag:"span",ref:"eTitle",cls:`ag-panel-title-bar-title ag-${z}-panel-title-bar-title`},{tag:"div",ref:"eTitleBarButtons",cls:`ag-panel-title-bar-buttons ag-${z}-panel-title-bar-buttons`}]},{tag:"div",ref:"eContentWrapper",cls:`ag-panel-content-wrapper ag-${z}-panel-content-wrapper`}]}}var DP=class extends v0{constructor(z){super(MP(z.cssIdentifier));this.config=z,this.closable=!0,this.eContentWrapper=P,this.eTitleBar=P,this.eTitleBarButtons=P,this.eTitle=P,this.registerCSS(LP)}postConstruct(){let{component:z,closable:J,hideTitleBar:Q,title:Z,minWidth:$=250,width:X,minHeight:Y=250,height:U,centered:_,popup:H,x:G,y:W,postProcessPopupParams:q}=this.config,B=this.beans,E=this.createManagedBean(new eZ(this.getGui(),{minWidth:$,width:X,minHeight:Y,height:U,centered:_,x:G,y:W,popup:H,calculateTopBuffer:()=>this.positionableFeature.getHeight()-this.getBodyHeight()}));this.positionableFeature=E;let K=this.getGui();if(z)this.setBodyComponent(z);if(!Q){if(Z)this.setTitle(Z);this.setClosable(J!=null?J:this.closable)}else x(this.eTitleBar,!1);if(this.addManagedElementListeners(this.eTitleBar,{mousedown:(L)=>{if(K.contains(L.relatedTarget)||K.contains(d(B))||this.eTitleBarButtons.contains(L.target)){L.preventDefault();return}let M=this.eContentWrapper.querySelector("button, [href], input, select, textarea, [tabindex]");if(M)M.focus()}}),H&&E.isPositioned())return;if(this.renderComponent)this.renderComponent();let F;if(q){let{type:L,eventSource:M,mouseEvent:D}=q;F=()=>B.popupSvc?.callPostProcessPopup(q,L,K,M,D)}E.initialisePosition(F),this.eContentWrapper.style.height="0"}renderComponent(){let z=this.getGui();z.focus(),this.close=()=>{z.remove(),this.destroy()}}getHeight(){return this.positionableFeature.getHeight()}setHeight(z){this.positionableFeature.setHeight(z)}getWidth(){return this.positionableFeature.getWidth()}setWidth(z){this.positionableFeature.setWidth(z)}setClosable(z){if(z!==this.closable)this.closable=z;if(z){let J=this.closeButtonComp=new v0({tag:"div",cls:"ag-button"});this.createBean(J);let Q=J.getGui(),Z=this.beans.iconSvc.createIconNoSpan("close",this.beans);Z.classList.add("ag-panel-title-bar-button-icon"),Q.appendChild(Z),this.addTitleBarButton(J),J.addManagedElementListeners(Q,{click:this.onBtClose.bind(this)})}else if(this.closeButtonComp)this.closeButtonComp.getGui().remove(),this.closeButtonComp=this.destroyBean(this.closeButtonComp)}setBodyComponent(z){z.setParentComponent(this),this.eContentWrapper.appendChild(z.getGui())}addTitleBarButton(z,J){let Q=this.eTitleBarButtons,Z=Q.children,$=Z.length;if(J==null)J=$;J=Math.max(0,Math.min(J,$)),z.addCss("ag-panel-title-bar-button");let X=z.getGui();if(J===0)Q.prepend(X);else if(J===$)Q.append(X);else Z[J-1].after(X);z.setParentComponent(this)}getBodyHeight(){return m2(this.eContentWrapper)}getBodyWidth(){return z1(this.eContentWrapper)}setTitle(z){this.eTitle.innerText=z}onBtClose(){this.close()}destroy(){if(this.closeButtonComp)this.closeButtonComp=this.destroyBean(this.closeButtonComp);let z=this.getGui();if(z&&B0(z))this.close();super.destroy()}},RP=class extends DP{constructor(z,J){super({...z,popup:!0});this.callbacks=J,this.isMaximizable=!1,this.isMaximized=!1,this.maximizeListeners=[],this.resizeListenerDestroy=null,this.lastPosition={x:0,y:0,width:0,height:0}}wireBeans(z){this.popupSvc=z.popupSvc}postConstruct(){let z=this.getGui(),{movable:J,resizable:Q,maximizable:Z,modal:$}=this.config;if(this.addCss("ag-dialog"),super.postConstruct(),this.tabGuardFeature=this.createManagedBean(new F5(this,this.callbacks?.stopPropagationCallbacks)),this.tabGuardFeature.initialiseTabGuard({isFocusableContainer:!0,onFocusIn:()=>{this.popupSvc?.bringPopupToFront(z)},onTabKeyDown:(X)=>{if($)return;let Y=X.shiftKey,U=I0(this.beans,z,!1,Y);if(!U||this.tabGuardFeature.getTabGuardCtrl().isTabGuard(U)){if(this.callbacks?.focusNextContainer(this.beans,Y))X.preventDefault()}}}),J)this.setMovable(J);if(Z)this.setMaximizable(Z);if(Q)this.setResizable(Q);if(!this.config.modal)this.callbacks?.configureFocusableContainer(this.beans,this)}setAllowFocus(z){this.tabGuardFeature.getTabGuardCtrl().setAllowFocus(z)}renderComponent(){let z=this.getGui(),{alwaysOnTop:J,modal:Q,title:Z,afterGuiAttached:$}=this.config,X=this.getLocaleTextFunc(),Y=this.popupSvc?.addPopup({modal:Q,eChild:z,closeOnEsc:!0,closedCallback:this.onClosed.bind(this),alwaysOnTop:J,ariaLabel:Z||X("ariaLabelDialog","Dialog"),afterGuiAttached:$});if(Y)this.close=Y.hideFunc}onClosed(z){this.destroy(),this.config.closedCallback?.(z)}setMaximized(z){if(this.isMaximizable&&z!==this.isMaximized)this.toggleMaximize()}toggleMaximize(){let z=this.positionableFeature.getPosition();if(this.isMaximized){let{x:J,y:Q,width:Z,height:$}=this.lastPosition;this.setWidth(Z),this.setHeight($),this.positionableFeature.offsetElement(J,Q)}else this.lastPosition.width=this.getWidth(),this.lastPosition.height=this.getHeight(),this.lastPosition.x=z.x,this.lastPosition.y=z.y,this.positionableFeature.offsetElement(0,0),this.setHeight("100%"),this.setWidth("100%");this.isMaximized=!this.isMaximized,this.refreshMaximizeIcon()}refreshMaximizeIcon(){x(this.maximizeIcon,!this.isMaximized),x(this.minimizeIcon,this.isMaximized)}clearMaximizebleListeners(){if(this.maximizeListeners.length){for(let z of this.maximizeListeners)z();this.maximizeListeners.length=0}if(this.resizeListenerDestroy)this.resizeListenerDestroy(),this.resizeListenerDestroy=null}destroy(){this.maximizeButtonComp=this.destroyBean(this.maximizeButtonComp),this.clearMaximizebleListeners(),super.destroy()}setResizable(z){this.positionableFeature.setResizable(z)}setMovable(z){this.positionableFeature.setMovable(z,this.eTitleBar)}setMaximizable(z){if(!z){if(this.clearMaximizebleListeners(),this.maximizeButtonComp)this.destroyBean(this.maximizeButtonComp),this.maximizeButtonComp=this.maximizeIcon=this.minimizeIcon=void 0;return}let J=this.eTitleBar;if(!J||z===this.isMaximizable)return;this.isMaximizable=z;let Q=this.buildMaximizeAndMinimizeElements();this.refreshMaximizeIcon(),Q.addManagedElementListeners(Q.getGui(),{click:this.toggleMaximize.bind(this)}),this.addTitleBarButton(Q,0),this.maximizeListeners.push(...this.addManagedElementListeners(J,{dblclick:this.toggleMaximize.bind(this)})),[this.resizeListenerDestroy]=this.addManagedListeners(this.positionableFeature,{resize:()=>{this.isMaximized=!1,this.refreshMaximizeIcon()}})}buildMaximizeAndMinimizeElements(){let z=this.maximizeButtonComp=this.createBean(new v0({tag:"div",cls:"ag-dialog-button"})),J=z.getGui(),Q=this.beans.iconSvc;return this.maximizeIcon=Q.createIconNoSpan("maximize"),J.appendChild(this.maximizeIcon),this.maximizeIcon.classList.add("ag-panel-title-bar-button-icon"),this.minimizeIcon=Q.createIconNoSpan("minimize"),J.appendChild(this.minimizeIcon),this.minimizeIcon.classList.add("ag-panel-title-bar-button-icon"),z}};var AP=class extends Xz{constructor(z){super();this.setTemplateFromElement(z.getGui(),void 0,void 0,!0)}postConstruct(){this.initialiseTabGuard({onTabKeyDown:(z)=>this.onTabKeyDown(z),handleKeyDown:(z)=>this.handleKeyDown(z)})}handleKeyDown(z){if(z.key===R.ESCAPE)this.closePanel()}onTabKeyDown(z){if(z.defaultPrevented)return;this.closePanel(),z.preventDefault()}closePanel(){let z=this.parentComponent;z.closeSubMenu(),setTimeout(()=>z.getGui().focus(),0)}},F7=class extends R0{constructor(z){super();this.callbacks=z,this.ACTIVATION_DELAY=80,this.isActive=!1,this.subMenuIsOpen=!1,this.subMenuIsOpening=!1,this.suppressRootStyles=!0,this.suppressAria=!0,this.suppressFocus=!0}init(z){let{menuItemDef:J,isAnotherSubMenuOpen:Q,level:Z,childComponent:$,contextParams:X}=z;return this.params=z.menuItemDef,this.level=Z,this.isAnotherSubMenuOpen=Q,this.childComponent=$,this.contextParams=X,this.cssClassPrefix=this.params.menuItemParams?.cssClassPrefix??"ag-menu-option",this.callbacks.getMenuItemComp(this.beans,this.params,{...J,level:Z,isAnotherSubMenuOpen:Q,openSubMenu:(Y)=>this.openSubMenu(Y),closeSubMenu:()=>this.closeSubMenu(),closeMenu:(Y)=>this.closeMenu(Y),updateTooltip:(Y,U)=>this.refreshTooltip(Y,U),onItemActivated:()=>this.onItemActivated()}).then((Y)=>{if(!Y)return;this.menuItemComp=Y;let U=Y.configureDefaults?.();if(U)this.configureDefaults(U===!0?void 0:U)})}addListeners(z,J){if(!J?.suppressClick)this.addManagedElementListeners(z,{click:(Q)=>this.onItemSelected(Q)});if(!J?.suppressKeyboardSelect)this.addManagedElementListeners(z,{keydown:(Q)=>{if(Q.key===R.ENTER||Q.key===R.SPACE)Q.preventDefault(),this.onItemSelected(Q)}});if(!J?.suppressMouseDown)this.addManagedElementListeners(z,{mousedown:(Q)=>{Q.stopPropagation(),Q.preventDefault()}});if(!J?.suppressMouseOver)this.addManagedElementListeners(z,{mouseenter:()=>this.onMouseEnter(),mouseleave:()=>this.onMouseLeave()})}isDisabled(){return!!this.params.disabled}openSubMenu(z=!1,J){if(this.closeSubMenu(),!this.params.subMenu)return;this.subMenuIsOpening=!0;let Q=z0({tag:"div",cls:"ag-menu",role:"presentation"});this.eSubMenuGui=Q;let Z,$=()=>{this.subMenuIsOpening=!1};if(this.childComponent){let H=this.createBean(new AP(this.childComponent));H.setParentComponent(this);let G=H.getGui(),W="mouseenter",q=()=>this.cancelDeactivate();if(G.addEventListener(W,q),Z=()=>{G.removeEventListener(W,q),this.destroyBean(H)},Q.appendChild(G),this.childComponent.afterGuiAttached)$=()=>{this.childComponent.afterGuiAttached(),this.subMenuIsOpening=!1}}else if(this.params.subMenu){let H=this.createBean(new V7(this.level+1,this.contextParams,this.callbacks));if(H.setParentComponent(this),H.addMenuItems(this.params.subMenu),Q.appendChild(H.getGui()),this.addManagedListeners(H,{closeMenu:(G)=>this.dispatchLocalEvent(G)}),H.addGuiEventListener("mouseenter",()=>this.cancelDeactivate()),Z=()=>this.destroyBean(H),z)$=()=>{H.activateFirstItem(),this.subMenuIsOpening=!1}}let X=this.beans.popupSvc,Y=()=>{let H=this.eGui;X?.positionPopupForMenu({eventSource:H,ePopup:Q,event:J instanceof MouseEvent?J:void 0,additionalParams:this.callbacks.getPostProcessPopupParams(this.contextParams)})},U=this.getLocaleTextFunc(),_=X?.addPopup({modal:!0,eChild:Q,positionCallback:Y,anchorToElement:this.eGui,ariaLabel:U("ariaLabelSubMenu","SubMenu"),afterGuiAttached:$});this.subMenuIsOpen=!0,this.setAriaExpanded(!0),this.hideSubMenu=()=>{if(_)_.hideFunc();this.subMenuIsOpen=!1,this.setAriaExpanded(!1),Z(),this.menuItemComp.setExpanded?.(!1),this.eSubMenuGui=void 0},this.menuItemComp.setExpanded?.(!0)}setAriaExpanded(z){if(!this.suppressAria)S0(this.eGui,z)}closeSubMenu(){if(!this.hideSubMenu)return;this.hideSubMenu(),this.hideSubMenu=null,this.setAriaExpanded(!1)}isSubMenuOpen(){return this.subMenuIsOpen}isSubMenuOpening(){return this.subMenuIsOpening}activate(z,J){if(this.cancelActivate(),this.params.disabled&&!J)return;if(this.isActive=!0,!this.suppressRootStyles)this.eGui.classList.add(`${this.cssClassPrefix}-active`);if(this.menuItemComp.setActive?.(!0),!this.suppressFocus)this.callbacks.preserveRangesWhile(this.beans,()=>this.eGui.focus({preventScroll:!J}));if(z&&this.params.subMenu)window.setTimeout(()=>{if(this.isAlive()&&this.isActive)this.openSubMenu()},300);this.onItemActivated()}deactivate(){if(this.cancelDeactivate(),!this.suppressRootStyles)this.eGui.classList.remove(`${this.cssClassPrefix}-active`);if(this.menuItemComp.setActive?.(!1),this.isActive=!1,this.subMenuIsOpen)this.closeSubMenu()}getGui(){return this.menuItemComp.getGui()}getParentComponent(){return this.parentComponent}setParentComponent(z){this.parentComponent=z}getSubMenuGui(){return this.eSubMenuGui}onItemSelected(z){if(this.menuItemComp.select?.(),this.params.action)this.beans.frameworkOverrides.wrapOutgoing(()=>this.params.action(this.gos.addCommon({...this.contextParams})));else this.openSubMenu(z&&z.type==="keydown",z);if(this.params.subMenu&&!this.params.action||this.params.suppressCloseOnSelect)return;this.closeMenu(z)}closeMenu(z){let J={type:"closeMenu"};if(z)if(z instanceof MouseEvent)J.mouseEvent=z;else J.keyboardEvent=z;this.dispatchLocalEvent(J)}onItemActivated(){let z={type:"menuItemActivated",menuItem:this};this.dispatchLocalEvent(z)}cancelActivate(){if(this.activateTimeoutId)window.clearTimeout(this.activateTimeoutId),this.activateTimeoutId=0}cancelDeactivate(){if(this.deactivateTimeoutId)window.clearTimeout(this.deactivateTimeoutId),this.deactivateTimeoutId=0}onMouseEnter(){if(this.cancelDeactivate(),this.isAnotherSubMenuOpen())this.activateTimeoutId=window.setTimeout(()=>this.activate(!0),this.ACTIVATION_DELAY);else this.activate(!0)}onMouseLeave(){if(this.cancelActivate(),this.isSubMenuOpen())this.deactivateTimeoutId=window.setTimeout(()=>this.deactivate(),this.ACTIVATION_DELAY);else this.deactivate()}refreshRootElementGui(z){let J=this.menuItemComp.getGui(),{cssClassPrefix:Q,params:{cssClasses:Z,disabled:$}}=this,X=this.menuItemComp.getRootElement?.();if(X){if(!z)J.classList.add("ag-menu-option-custom");J=X}if(this.suppressRootStyles=!!z,!this.suppressRootStyles){J.classList.add(Q);for(let Y of Z??[])J.classList.add(Y);if($)J.classList.add(`${Q}-disabled`)}return J}applyAriaProperties(z){let{params:{checked:J,subMenu:Q,subMenuRole:Z,disabled:$}}=this,X=J!=null;if(H0(z,X?"menuitemcheckbox":"menuitem"),Q)q9(z,Z??"menu");if($)H9(z,!0)}configureDefaults(z){if(!this.menuItemComp){setTimeout(()=>this.configureDefaults(z));return}let{suppressRootStyles:J,suppressTooltip:Q,suppressAria:Z,suppressTabIndex:$,suppressFocus:X}=z||{},{params:{tooltip:Y,disabled:U}}=this,_=this.eGui=this.refreshRootElementGui(!!J);if(this.suppressAria=!!Z,!Z)this.applyAriaProperties(_);if(!$)_.setAttribute("tabindex","-1");if(!Q)this.refreshTooltip(Y);if(!U)this.addListeners(_,z);this.suppressFocus=!!X}refreshTooltip(z,J){if(this.tooltip=z,this.tooltipFeature=this.destroyBean(this.tooltipFeature),!z||!this.menuItemComp)return;let Q=this.beans.registry.createDynamicBean("tooltipFeature",!1,{getGui:()=>this.getGui(),getTooltipValue:()=>this.tooltip,getLocation:()=>"menu",shouldDisplayTooltip:J});if(Q)this.tooltipFeature=this.createBean(Q)}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),this.menuItemComp?.destroy?.(),super.destroy()}},V7=class extends Xz{constructor(z=0,J,Q){super({tag:"div",cls:"ag-menu-list",role:"menu"});this.level=z,this.menuActionParams=J,this.callbacks=Q,this.menuItems=[]}postConstruct(){this.initialiseTabGuard({onTabKeyDown:(z)=>this.onTabKeyDown(z),handleKeyDown:(z)=>this.callbacks.preserveRangesWhile(this.beans,()=>this.handleKeyDown(z)),onFocusIn:(z)=>this.handleFocusIn(z),onFocusOut:(z)=>this.handleFocusOut(z)})}onTabKeyDown(z){if(!this.getParentComponent()?.getGui()?.classList.contains("ag-focus-managed"))z.preventDefault();if(z.shiftKey)this.closeIfIsChild(z)}handleKeyDown(z){switch(z.key){case R.UP:case R.RIGHT:case R.DOWN:case R.LEFT:z.preventDefault(),this.handleNavKey(z.key);break;case R.ESCAPE:if(this.closeIfIsChild())this.callbacks.stopPropagationCallbacks.stopPropagation(z);break}}handleFocusIn(z){let J=z.relatedTarget;if(!this.tabGuardFeature.getTabGuardCtrl().isTabGuard(J)&&(this.getGui().contains(J)||this.activeMenuItem?.getSubMenuGui()?.contains(J)))return;if(this.activeMenuItem)this.activeMenuItem.activate();else this.activateFirstItem()}handleFocusOut(z){let J=z.relatedTarget;if(!this.activeMenuItem||this.getGui().contains(J)||this.activeMenuItem.getSubMenuGui()?.contains(J))return;if(!this.activeMenuItem.isSubMenuOpening())this.activeMenuItem.deactivate()}clearActiveItem(){if(this.activeMenuItem)this.activeMenuItem.deactivate(),this.activeMenuItem=null}addMenuItems(z){if(z==null)return;b.all(z.map((J)=>{if(J==="separator")return b.resolve({eGui:this.createSeparator()});else if(typeof J==="string")return this.callbacks.warnNoItem?.(J),b.resolve({eGui:null});else return this.addItem(J)})).then((J)=>{for(let Q of J??[])if(Q?.eGui){if(this.appendChild(Q.eGui),Q.comp)this.menuItems.push(Q.comp)}})}addItem(z){let J=this.createManagedBean(new F7(this.callbacks));return J.init({menuItemDef:z,isAnotherSubMenuOpen:()=>this.menuItems.some((Q)=>Q.isSubMenuOpen()),level:this.level,contextParams:this.menuActionParams}).then(()=>{return J.setParentComponent(this),this.addManagedListeners(J,{closeMenu:(Q)=>{this.dispatchLocalEvent(Q)},menuItemActivated:(Q)=>{if(this.activeMenuItem&&this.activeMenuItem!==Q.menuItem)this.activeMenuItem.deactivate();this.activeMenuItem=Q.menuItem}}),{comp:J,eGui:J.getGui()}})}activateFirstItem(){let z=this.menuItems.filter((J)=>!J.isDisabled())[0];if(!z)return;z.activate()}createSeparator(){let z={tag:"div",cls:"ag-menu-separator-part"};return W0({tag:"div",cls:"ag-menu-separator",attrs:{"aria-hidden":"true"},children:[z,z,z,z]})}handleNavKey(z){switch(z){case R.UP:case R.DOWN:{let Q=this.findNextItem(z===R.UP);if(Q&&Q!==this.activeMenuItem)Q.activate(!1,!0);return}}let J=this.gos.get("enableRtl")?R.RIGHT:R.LEFT;if(z===J)this.closeIfIsChild();else this.openChild()}closeIfIsChild(z){let J=this.getParentComponent();if(J&&J instanceof F7){if(z)z.preventDefault();return J.closeSubMenu(),J.getGui().focus(),!0}return!1}openChild(){if(this.activeMenuItem)this.activeMenuItem.openSubMenu(!0)}findNextItem(z){let J=[...this.menuItems];if(!J.length)return;if(!this.activeMenuItem)return z?N(J):J[0];if(z)J.reverse();let Q,Z=!1;for(let $ of J){if(!Z){if($===this.activeMenuItem)Z=!0;continue}Q=$;break}if(Z&&!Q)return J[0];return Q||this.activeMenuItem}destroy(){this.clearActiveItem(),super.destroy()}},jP="ag-menu",VP="ag-context-menu-loading-icon",OP=class extends R0{constructor(z){super();this.params=z,this.destroyLoadingSpinner=null,this.lastPromise=0}hideActiveMenu(){this.destroyBean(this.activeMenu)}showMenu(z,J,Q){let{getMenuItems:Z,shouldBlockMenuOpen:$}=this.params,X=Z(z,J);if($$(X)){let Y=this.lastPromise+1;if(this.lastPromise=Y,!this.destroyLoadingSpinner)this.createLoadingIcon(J);return X.then((U)=>{if(this.lastPromise!==Y)return;let{target:_}=J,H=!_;if(U?.length&&(H||B0(_))&&!$?.())this.createContextMenu({menuItems:U,menuActionParams:z,mouseEvent:J,anchorToElement:Q});this.destroyLoadingSpinner?.()}),!0}if(!X?.length)return!1;return this.createContextMenu({menuItems:X,menuActionParams:z,mouseEvent:J,anchorToElement:Q}),!0}createLoadingIcon(z){let{beans:J}=this,Q=this.getLocaleTextFunc(),Z=J.iconSvc.createIconNoSpan("loadingMenuItems"),$=W0({tag:"div",cls:VP});$.appendChild(Z);let X=c0(J),Y=Sz(J);if(!Y)return;Y.appendChild($),J.ariaAnnounce?.announceValue(Q("ariaLabelLoadingContextMenu","Loading Context Menu"),"contextmenu"),J.environment.applyThemeClasses($),BJ($,z,J);let U=(_)=>{BJ($,_,J)};X.addEventListener("mousemove",U),this.destroyLoadingSpinner=()=>{X.removeEventListener("mousemove",U),$.remove(),this.destroyLoadingSpinner=null}}createContextMenu(z){let{mapMenuItems:J,menuItemCallbacks:Q,beforeMenuOpen:Z,onMenuClose:$,afterMenuDestroyed:X,onVisibleChanged:Y,onMenuOpen:U}=this.params,{menuItems:_,menuActionParams:H,mouseEvent:G,anchorToElement:W}=z,q=this.beans.popupSvc,E=new PP(J?(A)=>J(_,H,A):()=>_,H,Q);this.createBean(E);let K=E.getGui();Z?.(H);let F={additionalParams:Q.getPostProcessPopupParams(H),type:"contextMenu",mouseEvent:G,ePopup:K,nudgeY:1},L=this.getLocaleTextFunc(),M=q?.addPopup({modal:!0,eChild:K,closeOnEsc:!0,closedCallback:(A)=>{Q.preserveRangesWhile(this.beans,()=>{$?.(),this.destroyBean(E),X?.(),Y?.(!1,A===void 0?"api":"ui")})},click:G,positionCallback:()=>{let A=this.gos.get("enableRtl");q?.positionPopupUnderMouseEvent({...F,nudgeX:A?(K.offsetWidth+1)*-1:1})},anchorToElement:W,ariaLabel:L("ariaLabelContextMenu","Context Menu")});if(M)U?.(),E.afterGuiAttached({container:"contextMenu",hidePopup:M.hideFunc});if(this.activeMenu)this.hideActiveMenu();if(this.activeMenu=E,E.addEventListener("destroyed",()=>{if(this.activeMenu===E)this.activeMenu=null}),M)E.addEventListener("closeMenu",(A)=>M.hideFunc({mouseEvent:A.mouseEvent??void 0,keyboardEvent:A.keyboardEvent??void 0,forceHide:!0}));let D=G&&G instanceof MouseEvent&&G.type==="mousedown";Y?.(!0,D?"api":"ui")}destroy(){this.destroyLoadingSpinner?.(),super.destroy()}},PP=class extends v0{constructor(z,J,Q){super({tag:"div",cls:jP,role:"presentation"});this.getMenuItems=z,this.menuActionParams=J,this.callbacks=Q,this.menuList=null}postConstruct(){let z=this.createManagedBean(new V7(0,this.menuActionParams,this.callbacks)),J=this.getMenuItems(()=>this.getGui());z.addMenuItems(J),this.appendChild(z),this.menuList=z,z.addEventListener("closeMenu",(Q)=>this.dispatchLocalEvent(Q))}afterGuiAttached({hidePopup:z}){if(z)this.addDestroyFunc(z);let J=this.menuList;if(J)this.callbacks.preserveRangesWhile(this.beans,()=>E0(J.getGui()))}},TP=class extends v0{constructor(z){super({tag:"div"});this.callbacks=z}init(z){this.params=z,this.cssClassPrefix=this.params.cssClassPrefix??"ag-menu-option",this.addAriaAttributes(),this.addIcon(),this.addName(),this.addShortcut(),this.addSubMenu()}configureDefaults(){return!0}addAriaAttributes(){let{checked:z,subMenu:J}=this.params,Q=this.getGui();if(z)WJ(Q,z);if(J)S0(Q,!1)}addIcon(){if(this.params.isCompact)return;let z=W0({tag:"span",ref:"eIcon",cls:`${this.getClassName("part")} ${this.getClassName("icon")}`,role:"presentation"}),{checked:J,icon:Q}=this.params;if(J)z.appendChild(this.beans.iconSvc.createIconNoSpan("check"));else if(Q)if(p2(Q))z.appendChild(Q);else if(typeof Q==="string")z.innerHTML=Q;else this.callbacks?.warnNoIcon?.();this.getGui().appendChild(z)}addName(){let z=W0({tag:"span",ref:"eName",cls:`${this.getClassName("part")} ${this.getClassName("text")}`,children:this.params.name||""});this.getGui().appendChild(z)}addShortcut(){if(this.params.isCompact)return;let z=W0({tag:"span",ref:"eShortcut",cls:`${this.getClassName("part")} ${this.getClassName("shortcut")}`,children:this.params.shortcut||""});this.getGui().appendChild(z)}addSubMenu(){let z=W0({tag:"span",ref:"ePopupPointer",cls:`${this.getClassName("part")} ${this.getClassName("popup-pointer")}`}),J=this.getGui();if(this.params.subMenu){let Q=this.gos.get("enableRtl")?"subMenuOpenRtl":"subMenuOpen";z.appendChild(this.beans.iconSvc.createIconNoSpan(Q))}J.appendChild(z)}getClassName(z){return`${this.cssClassPrefix}-${z}`}};function L7(z,J){if(!J)return null;let Q=O4(z),Z=Q.indexOf(J);if(Z===-1)return null;let $=-1;for(let X=Z-1;X>=0;X--)if(Q[X].classList.contains(A2.TAB_GUARD_TOP)){$=X;break}if($<=0)return null;return Q[$-1]}function fU(z,J){if(!J)return!1;let Q=z.querySelectorAll(`.${J5}`);if(!Q.length)return!1;for(let Z=0;Z<Q.length;Z++)if(Q[Z].contains(J))return!0;return!1}function SP(z){return{tag:"div",cls:`ag-tabs ${z}`,children:[{tag:"div",ref:"eHeader"},{tag:"div",ref:"eBody",role:"presentation",cls:"ag-tabs-body"+z?` ${z}-body`:""}]}}var IP=class extends Xz{constructor(z){super(SP(z.cssClass));this.eHeader=P,this.eBody=P,this.items=[],this.tabbedItemScrollMap=new Map,this.params=z}postConstruct(){if(this.setupHeader(),this.params.items)for(let z of this.params.items)this.addItem(z);this.initialiseTabGuard({onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),focusInnerElement:this.focusInnerElement.bind(this),focusTrapActive:!0}),this.addDestroyFunc(()=>this.activeItem?.tabbedItem?.afterDetachedCallback?.())}setupHeader(){let{enableCloseButton:z,cssClass:J}=this.params,Q=(Z,$)=>{if(Z.classList.add(`ag-tabs-${$}`),J)Z.classList.add(`${J}-${$}`)};if(z)this.setupCloseButton(Q),this.eTabHeader=W0({tag:"div",role:"presentation"}),Q(this.eHeader,"header-wrapper"),this.eHeader.appendChild(this.eTabHeader);else this.eTabHeader=this.eHeader;H0(this.eTabHeader,"tablist"),Q(this.eTabHeader,"header")}setupCloseButton(z){let J=W0({tag:"button"});z(J,"close-button");let Q=this.beans.iconSvc.createIconNoSpan("close");G0(J,this.params.closeButtonAriaLabel),J.appendChild(Q),this.addManagedElementListeners(J,{click:()=>this.params.onCloseClicked?.()});let Z=W0({tag:"div",role:"presentation"});z(Z,"close-button-wrapper"),Z.appendChild(J),this.eHeader.appendChild(Z),this.eCloseButton=J}handleKeyDown(z){switch(z.key){case R.RIGHT:case R.LEFT:{if(!this.eTabHeader.contains(d(this.beans)))return;let J=z.key===R.RIGHT,Q=this.gos.get("enableRtl"),Z=this.items.indexOf(this.activeItem),$=J!==Q?Math.min(Z+1,this.items.length-1):Math.max(Z-1,0);if(Z===$)return;z.preventDefault();let X=this.items[$];this.showItemWrapper(X),X.eHeaderButton.focus();break}case R.UP:case R.DOWN:z.stopPropagation();break}}onTabKeyDown(z){if(z.defaultPrevented)return;let{beans:J,eHeader:Q,eBody:Z,activeItem:$,params:X}=this,{suppressTrapFocus:Y,enableCloseButton:U}=X,_=d(J),H=z.target,G=z.shiftKey;if(Q.contains(_)){if(z.preventDefault(),U&&G&&!this.eCloseButton?.contains(_))this.eCloseButton?.focus();else if(Y&&G)L7(Y0(J).body,H)?.focus();else this.focusBody(z.shiftKey);return}let W=null;if(fU(Z,H)){if(G)W=L7(Z,H);if(!W&&!Y)W=$.eHeaderButton}if(!W&&Z.contains(_)){if(W=I0(J,Z,!1,G),!W){if(Y&&!G)this.forceFocusOutOfContainer(G);else if(U&&!G)z.preventDefault(),this.eCloseButton?.focus();else z.preventDefault(),this.focusHeader();return}}if(W)z.preventDefault(),W.focus()}focusInnerElement(z){if(z)return this.focusBody(!0);else return this.focusHeader(),!0}focusHeader(z){this.activeItem.eHeaderButton.focus({preventScroll:z})}focusBody(z){return E0(this.eBody,z)}setAfterAttachedParams(z){this.afterAttachedParams=z}showFirstItem(){if(this.items.length>0)this.showItemWrapper(this.items[0])}addItem(z){let J=W0({tag:"span",cls:"ag-tab",role:"tab",attrs:{tabindex:"-1"}});J.appendChild(z.title),this.eTabHeader.appendChild(J),G0(J,z.titleLabel);let Q={tabbedItem:z,eHeaderButton:J};this.items.push(Q),J.addEventListener("click",this.showItemWrapper.bind(this,Q))}showItem(z){let J=this.items.find((Q)=>Q.tabbedItem===z);if(J)this.showItemWrapper(J)}showItemWrapper(z){let{tabbedItem:J,eHeaderButton:Q}=z;if(this.params.onItemClicked?.({item:J}),this.activeItem===z){this.params.onActiveItemClicked?.();return}if(this.lastScrollListener)this.lastScrollListener=this.lastScrollListener();if(J0(this.eBody),J.bodyPromise.then((Z)=>{this.eBody.appendChild(Z);let $=!l1();if(!this.params.suppressFocusBodyOnOpen)E0(this.eBody,!1,$);if(J.afterAttachedCallback)J.afterAttachedCallback(this.afterAttachedParams);if(this.params.keepScrollPosition){let X=J.getScrollableContainer?.()||Z;[this.lastScrollListener]=this.addManagedElementListeners(X,{scroll:()=>{this.tabbedItemScrollMap.set(J.name,X.scrollTop)}});let Y=this.tabbedItemScrollMap.get(J.name);if(Y!==void 0)setTimeout(()=>{X.scrollTop=Y},0)}}),this.activeItem)this.activeItem.eHeaderButton.classList.remove("ag-tab-selected"),this.activeItem.tabbedItem.afterDetachedCallback?.();Q.classList.add("ag-tab-selected"),this.activeItem=z}},fP=".ag-group{position:relative;width:100%}.ag-group-title-bar{align-items:center;display:flex;padding:var(--ag-spacing)}.ag-group-title{display:inline;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-group-title-bar) .ag-group-title{cursor:default}.ag-group-toolbar{align-items:center;display:flex;padding:var(--ag-spacing)}.ag-group-container{display:flex}.ag-disabled .ag-group-container{pointer-events:none}.ag-disabled-group-container,.ag-disabled-group-title-bar{opacity:.5}.ag-group-container-horizontal{flex-flow:row wrap}.ag-group-container-vertical{flex-direction:column}.ag-group-title-bar-icon{cursor:pointer;flex:none}:where(.ag-ltr) .ag-group-title-bar-icon{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-group-title-bar-icon{margin-left:var(--ag-spacing)}:where(.ag-group-item-alignment-stretch) .ag-group-item{align-items:stretch}:where(.ag-group-item-alignment-start) .ag-group-item{align-items:flex-start}:where(.ag-group-item-alignment-end) .ag-group-item{align-items:flex-end}";function kP(z){let J=z.cssIdentifier||"default",Q=z.direction||"vertical";return{tag:"div",cls:`ag-group ag-${J}-group`,role:"presentation",children:[{tag:"div",ref:"eToolbar",cls:`ag-group-toolbar ag-${J}-group-toolbar`,children:[{tag:"ag-checkbox",ref:"cbGroupEnabled"}]},{tag:"div",ref:"eContainer",cls:`ag-group-container ag-group-container-${Q} ag-${J}-group-container`}]}}var CP=class extends v0{constructor(z={}){super(kP(z),[F4]);this.params=z,this.suppressEnabledCheckbox=!0,this.suppressToggleExpandOnEnableChange=!1,this.eToolbar=P,this.cbGroupEnabled=P,this.eContainer=P,this.registerCSS(fP);let{enabled:J,items:Q,suppressEnabledCheckbox:Z,expanded:$,suppressToggleExpandOnEnableChange:X,useToggle:Y}=z;if(this.cssIdentifier=z.cssIdentifier||"default",this.enabled=J!=null?J:!0,this.items=Q||[],this.useToggle=Y??!1,this.alignItems=z.alignItems||"center",this.expanded=$==null?!0:$,Z!=null)this.suppressEnabledCheckbox=Z;if(X!=null)this.suppressToggleExpandOnEnableChange=X}postConstruct(){if(this.setupTitleBar(),this.items.length){let $=this.items;this.items=[],this.addItems($)}let z=this.getLocaleTextFunc();if(this.cbGroupEnabled.setLabel(z("enabled","Enabled")),this.enabled)this.setEnabled(this.enabled,void 0,!0);this.setAlignItems(this.alignItems);let{onEnableChange:J,onExpandedChange:Q,suppressOpenCloseIcons:Z}=this.params;if(this.hideEnabledCheckbox(this.suppressEnabledCheckbox),this.hideOpenCloseIcons(Z??!1),this.refreshChildDisplay(),x(this.eContainer,this.expanded),this.cbGroupEnabled.onValueChange(($)=>{this.setEnabled($,!0,this.suppressToggleExpandOnEnableChange),this.dispatchEnableChangeEvent($)}),J!=null)this.onEnableChange(J);if(Q!=null)this.onExpandedChange(Q)}refreshChildDisplay(){x(this.eToolbar,this.expanded&&!this.suppressEnabledCheckbox),this.eTitleBar?.refreshOnExpand(this.expanded)}isExpanded(){return this.expanded}setAlignItems(z){if(this.alignItems!==z)this.removeCss(`ag-group-item-alignment-${this.alignItems}`);this.alignItems=z;let J=`ag-group-item-alignment-${this.alignItems}`;return this.addCss(J),this}toggleGroupExpand(z,J){if(this.eTitleBar?.isSuppressCollapse()&&!this.useToggle)z=!0,J=!0;else if(z=z!=null?z:!this.expanded,this.expanded===z)return this;if(this.expanded=z,this.refreshChildDisplay(),x(this.eContainer,z),!J)this.dispatchLocalEvent({type:z?"expanded":"collapsed"});return this}addItems(z){for(let J of z)this.addItem(J)}prependItem(z){this.insertItem(z,!0)}addItem(z){this.insertItem(z,!1)}updateItems(z){let J=this.items,Q=0;for(let Z=0;Z<J.length;++Z){let $=J[Z];if($===z[Q])Q++;else{let X=u1($)?$.getGui():$;P0(X)}}while(Q<z.length)this.insertItem(z[Q++]);this.items=z}insertItem(z,J){let Q=this.eContainer,Z=u1(z)?z.getGui():z;if(Z.classList.add("ag-group-item",`ag-${this.cssIdentifier}-group-item`),J)Q.prepend(Z),this.items.unshift(Z);else Q.appendChild(Z),this.items.push(Z)}hideItem(z,J){let Q=this.items[J];x(Q,!z)}getItemIndex(z){let J=u1(z)?z.getGui():z;return this.items.indexOf(J)}setTitle(z){return this.eTitleBar?.setTitle(z),this}addTitleBarWidget(z){return this.eTitleBar?.addWidget(z),this}addCssClassToTitleBar(z){this.eTitleBar?.addCss(z)}dispatchEnableChangeEvent(z){let J={type:"enableChange",enabled:z};this.dispatchLocalEvent(J)}setEnabled(z,J,Q){if(this.enabled=z,this.refreshDisabledStyles(),!Q)this.toggleGroupExpand(z);if(!J)this.cbGroupEnabled.setValue(z),this.eToggle?.setValue(z);return this}isEnabled(){return this.enabled}onEnableChange(z){return this.addManagedListeners(this,{enableChange:(J)=>z(J.enabled)}),this}onExpandedChange(z){return this.addManagedListeners(this,{expanded:()=>z(!0),collapsed:()=>z(!1)}),this}hideEnabledCheckbox(z){return this.suppressEnabledCheckbox=z,this.refreshChildDisplay(),this.refreshDisabledStyles(),this}hideOpenCloseIcons(z){return this.eTitleBar?.hideOpenCloseIcons(z),this}refreshDisabledStyles(){let z=!this.enabled;this.eContainer.classList.toggle("ag-disabled",z),this.eTitleBar?.refreshDisabledStyles(this.suppressEnabledCheckbox&&z),this.eContainer.classList.toggle("ag-disabled-group-container",z)}setupTitleBar(){let z=this.useToggle?this.createToggleTitleBar():this.createDefaultTitleBar();this.eToolbar.insertAdjacentElement("beforebegin",z.getGui())}createDefaultTitleBar(){let z=this.createManagedBean(new NP(this.params));return this.eTitleBar=z,z.refreshOnExpand(this.expanded),this.addManagedListeners(z,{expandedChanged:(J)=>this.toggleGroupExpand(J.expanded)}),z}createToggleTitleBar(){let z=this.createManagedBean(new z7({value:this.enabled,label:this.params.title,labelAlignment:"left",labelWidth:"flex",onValueChange:(J)=>{this.setEnabled(J,!0),this.dispatchEnableChangeEvent(J)}}));return z.addCss("ag-group-title-bar"),z.addCss(`ag-${this.params.cssIdentifier??"default"}-group-title-bar ag-unselectable`),this.eToggle=z,this.toggleGroupExpand(this.enabled),z}},X7="ag-disabled-group-title-bar";function vP(z){let J=z.cssIdentifier??"default";return{tag:"div",cls:`ag-group-title-bar ag-${J}-group-title-bar ag-unselectable`,role:z.suppressKeyboardNavigation?"presentation":"group",children:[{tag:"span",ref:"eGroupOpenedIcon",cls:`ag-group-title-bar-icon ag-${J}-group-title-bar-icon`,role:"presentation"},{tag:"span",ref:"eGroupClosedIcon",cls:`ag-group-title-bar-icon ag-${J}-group-title-bar-icon`,role:"presentation"},{tag:"span",ref:"eTitle",cls:`ag-group-title ag-${J}-group-title`}]}}var NP=class extends v0{constructor(z={}){super(vP(z));this.suppressOpenCloseIcons=!1,this.suppressKeyboardNavigation=!1,this.eGroupOpenedIcon=P,this.eGroupClosedIcon=P,this.eTitle=P;let{title:J,suppressOpenCloseIcons:Q,suppressKeyboardNavigation:Z}=z;if(!!J&&J.length>0)this.title=J;if(Q!=null)this.suppressOpenCloseIcons=Q;this.suppressKeyboardNavigation=Z??!1}postConstruct(){this.setTitle(this.title),this.hideOpenCloseIcons(this.suppressOpenCloseIcons),this.setupExpandContract()}setupExpandContract(){let z=this.beans.iconSvc;this.eGroupClosedIcon.appendChild(z.createIconNoSpan("accordionClosed")),this.eGroupOpenedIcon.appendChild(z.createIconNoSpan("accordionOpen")),this.addManagedElementListeners(this.getGui(),{click:()=>this.dispatchExpandChanged(),keydown:(J)=>{switch(J.key){case R.ENTER:case R.SPACE:J.preventDefault(),this.dispatchExpandChanged();break;case R.RIGHT:case R.LEFT:J.preventDefault(),this.dispatchExpandChanged(J.key===R.RIGHT);break}}})}refreshOnExpand(z){this.refreshAriaStatus(z),this.refreshOpenCloseIcons(z)}refreshAriaStatus(z){if(!this.suppressOpenCloseIcons)S0(this.getGui(),z)}refreshOpenCloseIcons(z){let J=!this.suppressOpenCloseIcons;x(this.eGroupOpenedIcon,J&&z),x(this.eGroupClosedIcon,J&&!z)}isSuppressCollapse(){return this.suppressOpenCloseIcons}dispatchExpandChanged(z){let J={type:"expandedChanged",expanded:z};this.dispatchLocalEvent(J)}setTitle(z){let J=this.getGui(),Q=!!z&&z.length>0;if(z=Q?z:void 0,this.eTitle.textContent=z??"",x(J,Q),z!==this.title)this.title=z;let Z=J.classList.contains(X7);return this.refreshDisabledStyles(Z),this}addWidget(z){return this.getGui().appendChild(z),this}hideOpenCloseIcons(z){if(this.suppressOpenCloseIcons=z,z)this.dispatchExpandChanged(!0);return this}refreshDisabledStyles(z){let J=this.getGui();if(z)J.classList.add(X7),J.removeAttribute("tabindex"),H0(J,"presentation");else if(J.classList.remove(X7),typeof this.title==="string"&&!this.suppressKeyboardNavigation)this.activateTabIndex([J]),H0(J,"group");else J.removeAttribute("tabindex"),H0(J,"presentation")}};var $0="35.2.0",N0={moduleName:"EnterpriseCore",version:$0,beans:[kY],icons:{accordionOpen:"tree-open",accordionClosed:"tree-closed",accordionIndeterminate:"tree-indeterminate",close:"cross",cancel:"cancel",maximize:"maximize",minimize:"minimize",columnDrag:"grip"},dependsOn:[],setLicenseKey:kY.setLicenseKey};var wP={stopPropagationCallbacks:kz,focusNextContainer:(z,J)=>{return W4(z,J)},configureFocusableContainer:(z,J)=>{let Q=z.ctrlsSvc.get("gridCtrl");Q.addFocusableContainer(J),J.addDestroyFunc(()=>Q.removeFocusableContainer(J))}},yP=class extends RP{constructor(z){super(z,wP)}getFocusableContainerName(){return"dialog"}};var O7=class extends EP{constructor(z){super(kz,z)}};var xP=class extends FP{};function bP(z){return z.sideBar?.comp.isDisplayed()??!1}function gP(z,J){z.sideBar?.comp.setDisplayed(J)}function hP(z,J){z.sideBar?.comp.setSideBarPosition(J)}function uP(z,J,Q){z.sideBar?.comp.openToolPanel(J,"api",Q)}function mP(z){z.sideBar?.comp.close("api")}function cP(z){return z.sideBar?.comp.openedItem()??null}function pP(z){z.sideBar?.comp.refresh()}function iP(z){return z.sideBar?.comp.isToolPanelShowing()??!1}function dP(z,J){let Q=z.sideBar?.comp.getToolPanelInstance(J);return Zz(Q)}function nP(z){return z.sideBar?.comp.getDef()}var rP=`.ag-tool-panel-wrapper{overflow:hidden;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--ag-horizontal-size,var(--ag-side-bar-panel-width))}.ag-tool-panel-content{display:flex;height:100%;overflow:hidden auto}.ag-tool-panel-wrapper.ag-tool-panel-animating{
75
+ /* !important required to override .ag-hidden to tool panel remains visible while animating */display:block!important;transition:width var(--ag-side-bar-panel-animation-duration) ease-in-out}@media (prefers-reduced-motion:reduce){.ag-tool-panel-wrapper.ag-tool-panel-animating{transition:none}}.ag-tool-panel-external{display:flex;flex-direction:row}:where(.ag-tool-panel-external) .ag-tool-panel-wrapper{flex-grow:1}.ag-select-agg-func-item{align-items:center;display:flex;flex:1 1 auto;flex-flow:row nowrap;height:100%;overflow:hidden;position:relative;text-overflow:ellipsis;white-space:nowrap}.ag-tool-panel-horizontal-resize{cursor:ew-resize;height:100%;position:absolute;top:0;width:5px;z-index:1}.ag-side-bar{background-color:var(--ag-side-bar-background-color);display:flex;flex-direction:row-reverse;position:relative}:where(.ag-ltr) :where(.ag-side-bar-left) .ag-tool-panel-horizontal-resize{right:-3px}:where(.ag-rtl) :where(.ag-side-bar-left) .ag-tool-panel-horizontal-resize{left:-3px}:where(.ag-ltr) :where(.ag-side-bar-right) .ag-tool-panel-horizontal-resize{left:-3px}:where(.ag-rtl) :where(.ag-side-bar-right) .ag-tool-panel-horizontal-resize{right:-3px}.ag-side-bar-left{flex-direction:row;order:-1}.ag-side-buttons{background-color:var(--ag-side-button-bar-background-color);padding-top:var(--ag-side-button-bar-top-padding);position:relative}.ag-side-button{background-color:var(--ag-side-button-background-color);border-bottom:var(--ag-side-button-border);border-top:var(--ag-side-button-border);color:var(--ag-side-button-text-color);margin-top:-1px;position:relative}.ag-side-button:before{background-color:transparent;bottom:0;content:"";display:block;position:absolute;top:0;transition:background-color var(--ag-side-button-selected-underline-transition-duration);width:var(--ag-side-button-selected-underline-width)}:where(.ag-ltr) .ag-side-button:before{left:0}:where(.ag-rtl) .ag-side-button:before{right:0}.ag-side-button:hover{background-color:var(--ag-side-button-hover-background-color);color:var(--ag-side-button-hover-text-color)}.ag-side-button.ag-selected{background-color:var(--ag-side-button-selected-background-color);border-bottom:var(--ag-side-button-selected-border);border-top:var(--ag-side-button-selected-border);color:var(--ag-side-button-selected-text-color)}.ag-side-button.ag-selected:before{background-color:var(--ag-side-button-selected-underline-color)}.ag-side-button-button{align-items:center;display:flex;flex-direction:column;gap:var(--ag-spacing);position:relative;white-space:nowrap;width:100%;&:focus{box-shadow:none}}:where(.ag-ltr) .ag-side-button-button{padding:var(--ag-side-button-vertical-padding) var(--ag-side-button-right-padding) var(--ag-side-button-vertical-padding) var(--ag-side-button-left-padding)}:where(.ag-rtl) .ag-side-button-button{padding:var(--ag-side-button-vertical-padding) var(--ag-side-button-left-padding) var(--ag-side-button-vertical-padding) var(--ag-side-button-right-padding)}.ag-side-button-button:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-side-button-label{writing-mode:vertical-lr}@media (resolution <= 1.5x){.ag-side-button-label{font-family:"Segoe UI",var(--ag-font-family)}:where(.ag-ltr) .ag-side-button-label{transform:rotate(.05deg)}:where(.ag-rtl) .ag-side-button-label{transform:rotate(-.05deg)}}:where(.ag-ltr) .ag-side-bar-left,:where(.ag-rtl) .ag-side-bar-right{border-right:var(--ag-side-panel-border);:where(.ag-tool-panel-wrapper){border-left:var(--ag-side-panel-border)}}:where(.ag-ltr) .ag-side-bar-right,:where(.ag-rtl) .ag-side-bar-left{border-left:var(--ag-side-panel-border);:where(.ag-tool-panel-wrapper){border-right:var(--ag-side-panel-border)}}`,tP={tag:"div",cls:"ag-side-button",role:"presentation",children:[{tag:"button",ref:"eToggleButton",cls:"ag-button ag-side-button-button",role:"tab",attrs:{type:"button",tabindex:"-1","aria-expanded":"false"},children:[{tag:"div",ref:"eIconWrapper",cls:"ag-side-button-icon-wrapper",attrs:{"aria-hidden":"true"}},{tag:"span",ref:"eLabel",cls:"ag-side-button-label"}]}]},sP=class extends y{constructor(z){super();this.toolPanelDef=z,this.eToggleButton=P,this.eIconWrapper=P,this.eLabel=P}getToolPanelId(){return this.toolPanelDef.id}postConstruct(){this.setTemplate(tP,[]),this.setLabel(),this.setIcon(),this.addManagedElementListeners(this.eToggleButton,{click:this.onButtonPressed.bind(this)}),this.eToggleButton.setAttribute("id",`ag-${this.getCompId()}-button`)}setLabel(){let z=this.toolPanelDef,J=this.getLocaleTextFunc()(z.labelKey,z.labelDefault);this.eLabel.textContent=J}setIcon(){this.eIconWrapper.insertAdjacentElement("afterbegin",h(this.toolPanelDef.iconKey,this.beans))}onButtonPressed(){this.dispatchLocalEvent({type:"toggleButtonClicked"})}setSelected(z){this.toggleCss("ag-selected",z),S0(this.eToggleButton,z)}},lP={tag:"div",cls:"ag-side-buttons",role:"tablist"},aP=class extends y{constructor(){super(lP);this.buttonComps=[]}postConstruct(){this.addManagedElementListeners(this.getFocusableElement(),{keydown:this.handleKeyDown.bind(this)})}handleKeyDown(z){if(z.key!==R.TAB||!z.shiftKey)return;if(W4(this.beans,!0)){z.preventDefault();return}a0(z)}setActiveButton(z){for(let J of this.buttonComps)J.setSelected(z===J.getToolPanelId())}addButtonComp(z){let J=this.createBean(new sP(z));return this.buttonComps.push(J),this.appendChild(J),J.addEventListener("toggleButtonClicked",()=>{this.dispatchLocalEvent({type:"sideBarButtonClicked",toolPanelId:z.id})}),J}clearButtons(){this.buttonComps=this.destroyBeans(this.buttonComps),J0(this.getGui())}destroy(){this.clearButtons(),super.destroy()}},oP={selector:"AG-SIDE-BAR-BUTTONS",component:aP},kU={id:"columns",labelDefault:"Columns",labelKey:"columns",iconKey:"columnsToolPanel",toolPanel:"agColumnsToolPanel"},CU={id:"filters",labelDefault:"Filters",labelKey:"filters",iconKey:"filtersToolPanel",toolPanel:"agFiltersToolPanel"},eP={id:"filters-new",labelDefault:"Filters",labelKey:"filters",iconKey:"filtersToolPanel",toolPanel:"agNewFiltersToolPanel"},_6={columns:kU,filters:CU,"filters-new":eP};function M7(z){if(!z)return;if(z===!0)return{toolPanels:[kU,CU],defaultToolPanel:"columns"};if(typeof z==="string")return M7([z]);if(Array.isArray(z)){let J=[];for(let Q of z){let Z=_6[Q];if(!Z){V(215,{key:Q,defaultByKey:_6});continue}J.push(Z)}if(J.length===0)return;return{toolPanels:J,defaultToolPanel:J[0].id}}return{toolPanels:zT(z.toolPanels),defaultToolPanel:z.defaultToolPanel,hiddenByDefault:z.hiddenByDefault,position:z.position,hideButtons:z.hideButtons}}function zT(z){let J=[];if(!z)return J;return z.forEach((Q)=>{let Z=JT(Q);if(!Z)return;J.push(Z)}),J}function JT(z){if(typeof z!=="string")return z;if(_6[z])return _6[z];return V(215,{key:z,defaultByKey:_6}),null}var QT=class extends y{constructor(){super({tag:"div",cls:"ag-tool-panel-horizontal-resize"});this.minWidth=100,this.maxWidth=null}postConstruct(){let z=this.beans.horizontalResizeSvc.addResizeBar({eResizeBar:this.getGui(),dragStartPixels:1,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this),onResizeEnd:this.onResizeEnd.bind(this)});this.addDestroyFunc(z),this.inverted=this.gos.get("enableRtl")}dispatchResizeEvent(z,J,Q){this.eventSvc.dispatchEvent({type:"toolPanelSizeChanged",width:Q,started:z,ended:J})}onResizeStart(){this.startingWidth=this.elementToResize.offsetWidth,this.dispatchResizeEvent(!0,!1,this.startingWidth)}onResizeEnd(z){return this.onResizing(z,!0)}onResizing(z,J=!1){let Q=this.inverted?-1:1,Z=Math.max(this.minWidth,Math.floor(this.startingWidth-z*Q));if(this.maxWidth!=null)Z=Math.min(this.maxWidth,Z);this.elementToResize.style.setProperty("--ag-horizontal-size",`${Z}px`),this.dispatchResizeEvent(!1,J,Z)}};function ZT(z,J,Q){return z.getCompDetails(J,$T,void 0,Q,!0)}var $T={name:"toolPanel",optionalMethods:["refresh","getState"]},XT={tag:"div",cls:"ag-tool-panel-wrapper",role:"tabpanel",children:[{tag:"div",cls:"ag-tool-panel-content",ref:"eContent"}]},YT=class extends y{constructor(){super(XT);this.eContent=P,this.animationId=0,this.defParent=null}postConstruct(){let z=this.getGui(),J=this.resizeBar=this.createManagedBean(new QT);z.setAttribute("id",`ag-${this.getCompId()}`),J.elementToResize=z,this.appendChild(J)}getToolPanelId(){return this.toolPanelId}getDefParent(){return this.defParent}setDefParent(z){this.defParent=z}setToolPanelDef(z,J){let{id:Q,minWidth:Z,maxWidth:$,width:X,parent:Y}=z;if(this.toolPanelId=Q,this.defParent=Y??null,X)this.getGui().style.setProperty("--ag-side-bar-panel-width",`${X}px`);let U=ZT(this.beans.userCompFactory,z,J);if(U==null)return!1;let _=U.newAgStackInstance();this.params=U.params,_.then(this.setToolPanelComponent.bind(this));let H=this.resizeBar;if(Z!=null)H.minWidth=Z;if($!=null)H.maxWidth=$;return!0}setToolPanelComponent(z){this.toolPanelCompInstance=z;let{eContent:J}=this;J.appendChild(z.getGui()),this.addDestroyFunc(()=>{this.destroyBean(z)})}getToolPanelInstance(){return this.toolPanelCompInstance}setResizerSizerSide(z){let J=this.gos.get("enableRtl"),Q=z==="left",Z=J?Q:!Q;this.resizeBar.inverted=Z}refresh(){this.toolPanelCompInstance?.refresh(this.params)}animateDisplayed(z){if(this.isDisplayed()===z)return;let J=++this.animationId,{eContent:Q}=this,Z=()=>{if(this.animationId===J)$.classList.remove("ag-tool-panel-animating"),Q.style.width="",$.style.width=""},$=this.getGui(),X=$.offsetWidth;this.setDisplayed(z),$.classList.add("ag-tool-panel-animating");let Y=getComputedStyle($).transitionDuration;if(!parseFloat(Y)){Z();return}$.style.transition="none",$.style.width="",Q.style.width=`${Q.offsetWidth}px`,$.style.width=`${X}px`;let U=$.offsetWidth;$.style.transition="",$.style.width=z?"":"0";let _=setTimeout(Z,100);$.addEventListener("transitionstart",()=>clearTimeout(_),{once:!0}),$.addEventListener("transitionend",Z,{once:!0})}},UT={tag:"div",cls:"ag-side-bar ag-unselectable",children:[{tag:"ag-side-bar-buttons",ref:"sideBarButtons"}]},_T=class extends y{constructor(){super(UT,[oP]);this.sideBarButtons=P,this.toolPanelWrappers=[],this.registerCSS(rP)}postConstruct(){this.sideBarButtons.addEventListener("sideBarButtonClicked",this.onToolPanelButtonClicked.bind(this));let{beans:z,gos:J}=this,{sideBar:Q}=J.get("initialState")??{};this.setSideBarDef({sideBarDef:M7(J.get("sideBar")),sideBarState:Q}),this.addManagedPropertyListener("sideBar",()=>this.setState()),z.sideBar.comp=this;let Z=this.getFocusableElement();this.createManagedBean(new $z(Z,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this)})),vz(z,this,Z),this.addManagedPropertyListener("enableAdvancedFilter",this.onAdvancedFilterChanged.bind(this))}getFocusableContainerName(){return"sideBar"}onTabKeyDown(z){if(z.defaultPrevented)return;let{beans:J,sideBarButtons:Q}=this,Z=this.getGui(),$=Q.getGui(),X=d(J),Y=Z.querySelector(".ag-tool-panel-wrapper:not(.ag-hidden)"),U=z.target,_=z.shiftKey;if(!Y){if(W4(J,_,!0))return z.preventDefault(),!0;return V$(z),!1}if($.contains(X)){if(E0(Y,_))z.preventDefault();return}if(!_)return;let H=null;if(Y.contains(X))H=I0(J,Y,void 0,!0);else if(fU(Y,U))H=L7(Y,U);if(!H)H=$.querySelector(".ag-selected button"),H=B0(H)?H:null;if(H&&H!==z.target)z.preventDefault(),H.focus()}handleKeyDown(z){let J=d(this.beans),Q=this.sideBarButtons;if(!Q.getGui().contains(J))return;let Z=Q.getGui(),$=Array.prototype.slice.call(Z.querySelectorAll(".ag-side-button")),X=$.findIndex((_)=>_.contains(J)),Y=null;switch(z.key){case R.LEFT:case R.UP:Y=Math.max(0,X-1);break;case R.RIGHT:case R.DOWN:Y=Math.min(X+1,$.length-1);break}if(Y===null)return;let U=$[Y].querySelector("button");if(U)U.focus(),z.preventDefault()}onToolPanelButtonClicked(z){let J=z.toolPanelId;if(this.openedItem()===J)this.openToolPanel(void 0,"sideBarButtonClicked");else this.openToolPanel(J,"sideBarButtonClicked")}clearDownUi(){this.sideBarButtons.clearButtons(),this.destroyToolPanelWrappers()}setSideBarDef({sideBarDef:z,sideBarState:J,existingToolPanelWrappers:Q}){if(this.setDisplayed(!1),this.sideBar=z,z)this.sideBarButtons.setDisplayed(!z.hideButtons);if(z?.toolPanels){let Z=z.toolPanels;if(this.createToolPanelsAndSideButtons(Z,J,Q),!this.toolPanelWrappers.length)return;let $=J?J.visible:!z.hiddenByDefault;if(this.setDisplayed($),this.setSideBarPosition(J?J.position:z.position),$)if(J){let{openToolPanel:X}=J;if(X)this.openToolPanel(X,"sideBarInitializing")}else this.openToolPanel(z.defaultToolPanel,"sideBarInitializing")}}getDef(){return this.sideBar}setSideBarPosition(z){if(!z)z="right";this.position=z;let J=z==="left",Q=J?"right":"left";this.toggleCss("ag-side-bar-left",J),this.toggleCss("ag-side-bar-right",!J);for(let Z of this.toolPanelWrappers)Z.setResizerSizerSide(Q);return this.dispatchSideBarUpdated(),this}setDisplayed(z,J){super.setDisplayed(z,J),this.dispatchSideBarUpdated()}getState(){let z={};for(let J of this.toolPanelWrappers)z[J.getToolPanelId()]=J.getToolPanelInstance()?.getState?.();return{visible:this.isDisplayed(),position:this.position,openToolPanel:this.openedItem(),toolPanels:z}}createToolPanelsAndSideButtons(z,J,Q){for(let Z of z)this.createToolPanelAndSideButton(Z,J?.toolPanels?.[Z.id],Q?.[Z.id])}validateDef(z){let{id:J,toolPanel:Q}=z;if(J==null)return V(212),!1;if(uY(Q)){if(this.beans.filterManager?.isAdvFilterEnabled())return V(213),!1}return!0}createToolPanelAndSideButton(z,J,Q){if(!this.validateDef(z)){this.destroyBean(Q);return}let Z;if(Q)Z=Q,Z.setDefParent(z.parent??null);else if(Z=this.createBean(new YT),!Z.setToolPanelDef(z,v(this.gos,{initialState:J,onStateUpdated:()=>this.dispatchSideBarUpdated()})))return;Z.setDisplayed(!1),this.renderToolPanelUnderParent(Z,z.parent),this.toolPanelWrappers.push(Z);let $=this.sideBarButtons.addButtonComp(z);kZ($.eToggleButton,Z.getGui())}refresh(){for(let z of this.toolPanelWrappers)z.refresh()}renderToolPanelUnderParent(z,J){let Q=z.getGui();if(J)this.beans.environment.applyThemeClasses(J,["ag-external","ag-tool-panel-external"]),Q.classList.add(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr");let Z=J??z.getDefParent()??this.getGui();if(Q.parentElement!==Z)Z.appendChild(Q)}getWrapper(z){return this.toolPanelWrappers.find((J)=>J.getToolPanelId()===z)}openToolPanel(z,J="api",Q){let Z=this.openedItem(),X=!!z&&!!Z||J==="sideBarInitializing";for(let _ of this.toolPanelWrappers){let H=z===_.getToolPanelId();if(H)this.renderToolPanelUnderParent(_,Q??null);if(X)_.setDisplayed(H);else _.animateDisplayed(H)}let Y=this.openedItem();if(Z!==Y)this.sideBarButtons.setActiveButton(z),this.raiseToolPanelVisibleEvent(z,Z??void 0,J)}getToolPanelInstance(z){let J=this.getWrapper(z);if(!J){V(214,{key:z});return}return J.getToolPanelInstance()}raiseToolPanelVisibleEvent(z,J,Q){let Z=!!z&&!!J,$=this.eventSvc;if(J)$.dispatchEvent({type:"toolPanelVisibleChanged",source:Q,key:J,visible:!1,switchingToolPanel:Z});if(z)$.dispatchEvent({type:"toolPanelVisibleChanged",source:Q,key:z,visible:!0,switchingToolPanel:Z})}close(z="api"){this.openToolPanel(void 0,z)}isToolPanelShowing(){return!!this.openedItem()}openedItem(){let z=null;for(let J of this.toolPanelWrappers)if(J.isDisplayed())z=J.getToolPanelId();return z}setState(z){let J=M7(this.gos.get("sideBar")),Q={};if(J&&this.sideBar)J.toolPanels?.forEach((Z)=>{let{id:$}=Z;if(!$)return;let X=this.sideBar.toolPanels?.find((H)=>H.id===$);if(!X||Z.toolPanel!==X.toolPanel)return;let Y=this.getWrapper($);if(!Y)return;let U=v(this.gos,{...Z.toolPanelParams??{},initialState:z?.toolPanels?.[$],onStateUpdated:()=>this.dispatchSideBarUpdated()});if(Y.getToolPanelInstance()?.refresh(U)!==!0)return;this.toolPanelWrappers=this.toolPanelWrappers.filter((H)=>H!==Y),P0(Y.getGui()),Q[$]=Y});this.clearDownUi(),this.setSideBarDef({sideBarDef:J,sideBarState:z,existingToolPanelWrappers:Q})}dispatchSideBarUpdated(){this.eventSvc.dispatchEvent({type:"sideBarUpdated"})}destroyToolPanelWrappers(){for(let z of this.toolPanelWrappers)P0(z.getGui()),this.destroyBean(z);this.toolPanelWrappers.length=0}onAdvancedFilterChanged(){if(this.sideBar?.toolPanels?.some((J)=>uY(typeof J==="string"?J:J.toolPanel)))this.setState()}destroy(){this.destroyToolPanelWrappers(),super.destroy()}};function uY(z){return z==="agFiltersToolPanel"||z==="agNewFiltersToolPanel"}var HT={selector:"AG-SIDE-BAR",component:_T},GT=class extends j{constructor(){super(...arguments);this.beanName="sideBar"}getSelector(){return HT}},P7={moduleName:"SideBar",version:$0,beans:[GT],apiFunctions:{isSideBarVisible:bP,setSideBarVisible:gP,setSideBarPosition:hP,openToolPanel:uP,closeToolPanel:mP,getOpenedToolPanel:cP,refreshToolPanel:pP,isToolPanelShowing:iP,getToolPanelInstance:dP,getSideBar:nP},dependsOn:[N0,R5]},WT='.ag-menu-list{cursor:default;display:table;padding:var(--ag-spacing) 0;width:100%}.ag-menu-option,.ag-menu-separator{display:table-row}.ag-menu-option-part,.ag-menu-separator-part{display:table-cell;vertical-align:middle}.ag-menu-option{cursor:pointer;font-weight:500}:where(.ag-ltr) :where(.ag-menu-option-popup-pointer) .ag-icon{text-align:right}:where(.ag-rtl) :where(.ag-menu-option-popup-pointer) .ag-icon{text-align:left}.ag-menu-option-text{white-space:nowrap}.ag-menu-option-custom{display:contents}.ag-compact-menu-option{display:flex;flex-wrap:nowrap;width:100%}.ag-compact-menu-option-text{flex:1 1 auto;white-space:nowrap}.ag-menu-separator{height:calc(var(--ag-spacing)*2 + 1px)}.ag-menu-separator-part:after{border-top:solid var(--ag-border-width) var(--ag-menu-separator-color);content:"";display:block}.ag-compact-menu-option-active,.ag-menu-option-active{background-color:var(--ag-row-hover-color)}.ag-compact-menu-option-part,.ag-menu-option-part{line-height:var(--ag-icon-size);padding:calc(var(--ag-spacing) + 2px) 0}.ag-compact-menu-option-disabled,.ag-menu-option-disabled{cursor:not-allowed;opacity:.5}.ag-compact-menu-option-icon,.ag-menu-option-icon{width:var(--ag-icon-size)}:where(.ag-ltr) .ag-compact-menu-option-icon,:where(.ag-ltr) .ag-menu-option-icon{padding-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-compact-menu-option-icon,:where(.ag-rtl) .ag-menu-option-icon{padding-right:calc(var(--ag-spacing)*2)}.ag-compact-menu-option-text,.ag-menu-option-text{padding-left:calc(var(--ag-spacing)*2);padding-right:calc(var(--ag-spacing)*2)}:where(.ag-ltr) .ag-compact-menu-option-shortcut,:where(.ag-ltr) .ag-menu-option-shortcut{padding-right:var(--ag-spacing)}:where(.ag-rtl) .ag-compact-menu-option-shortcut,:where(.ag-rtl) .ag-menu-option-shortcut{padding-left:var(--ag-spacing)}:where(.ag-ltr) .ag-compact-menu-option-popup-pointer,:where(.ag-ltr) .ag-menu-option-popup-pointer{padding-right:var(--ag-spacing)}:where(.ag-rtl) .ag-compact-menu-option-popup-pointer,:where(.ag-rtl) .ag-menu-option-popup-pointer{padding-left:var(--ag-spacing)}.ag-menu-column-select-wrapper{height:265px;overflow:auto;:where(.ag-column-select){height:100%}}.ag-menu:where(.ag-tabs){min-width:290px}.ag-context-menu-loading-icon{pointer-events:none;position:absolute}',vU=class extends TP{constructor(){super({warnNoIcon:()=>V(227)})}},T7={moduleName:"MenuItem",version:$0,userComponents:{agMenuItem:vU},icons:{check:"tick",subMenuOpen:"small-right",subMenuOpenRtl:"small-left"},css:[WT]},qT=".ag-column-select{display:flex;flex:3 1 0px;flex-direction:column;overflow:hidden;position:relative}.ag-column-select-header{flex:none;height:var(--ag-header-height);padding-left:var(--ag-widget-container-horizontal-padding);padding-right:var(--ag-widget-container-horizontal-padding)}.ag-column-select-column,.ag-column-select-column-group,.ag-column-select-header{align-items:center;display:flex;gap:var(--ag-widget-horizontal-spacing);position:relative}.ag-column-select-column,.ag-column-select-column-group{height:100%}:where(.ag-ltr) .ag-column-select-column,:where(.ag-ltr) .ag-column-select-column-group{padding-left:calc(var(--ag-indentation-level)*var(--ag-column-select-indent-size))}:where(.ag-rtl) .ag-column-select-column,:where(.ag-rtl) .ag-column-select-column-group{padding-right:calc(var(--ag-indentation-level)*var(--ag-column-select-indent-size))}.ag-column-select-column-group:where(:not(:last-child)),.ag-column-select-column:where(:not(:last-child)){margin-bottom:var(--ag-widget-vertical-spacing)}.ag-column-select-header-icon{border-radius:var(--ag-border-radius);cursor:pointer;height:var(--ag-icon-size);position:relative;width:var(--ag-icon-size);&:focus-visible{box-shadow:var(--ag-focus-shadow)}}.ag-column-select-header-filter-wrapper{flex:1 1 auto}.ag-column-select-header-filter{width:100%}.ag-column-select-list{flex:1 1 0px;overflow:hidden}:where(.ag-ltr) .ag-column-select-add-group-indent{margin-left:calc(var(--ag-icon-size) + var(--ag-spacing)*1.5)}:where(.ag-rtl) .ag-column-select-add-group-indent{margin-right:calc(var(--ag-icon-size) + var(--ag-spacing)*1.5)}.ag-column-select-column-group-readonly,.ag-column-select-column-readonly{opacity:.5;pointer-events:none;.ag-icon{opacity:.5}&.ag-icon-grip{opacity:.35}}.ag-column-select-column-readonly{&.ag-icon-grip,.ag-icon-grip{opacity:.35}}.ag-column-select-virtual-list-viewport{padding:calc(var(--ag-widget-container-vertical-padding)*.5) 0}.ag-column-select-virtual-list-item{padding:0 var(--ag-widget-container-horizontal-padding)}.ag-column-select-column-label{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-column-select-checkbox{display:flex}",BT=300,ET={tag:"div",cls:"ag-column-select-header",role:"presentation",children:[{tag:"div",ref:"eExpand",cls:"ag-column-select-header-icon"},{tag:"ag-checkbox",ref:"eSelect",cls:"ag-column-select-header-checkbox"},{tag:"ag-input-text-field",ref:"eFilterTextField",cls:"ag-column-select-header-filter-wrapper"}]},KT=class extends y{constructor(){super(ET,[F4,Yz]);this.eExpand=P,this.eSelect=P,this.eFilterTextField=P}postConstruct(){this.createExpandIcons(),this.addManagedListeners(this.eExpand,{click:this.onExpandClicked.bind(this),keydown:(J)=>{if(J.key===R.SPACE)J.preventDefault(),this.onExpandClicked()}}),this.addManagedElementListeners(this.eSelect.getInputElement(),{click:this.onSelectClicked.bind(this)}),this.addManagedPropertyListener("functionsReadOnly",()=>this.onFunctionsReadOnlyPropChanged()),this.eFilterTextField.setAutoComplete(!1).onValueChange(()=>this.onFilterTextChanged()),this.addManagedEventListeners({newColumnsLoaded:this.showOrHideOptions.bind(this)});let z=this.getLocaleTextFunc();this.eSelect.setInputAriaLabel(z("ariaColumnSelectAll","Toggle All Columns Visibility")),this.eFilterTextField.setInputAriaLabel(z("ariaFilterColumnsInput","Filter Columns Input")),this.activateTabIndex([this.eExpand])}onFunctionsReadOnlyPropChanged(){let z=this.gos.get("functionsReadOnly");this.eSelect.setReadOnly(z),this.eSelect.toggleCss("ag-column-select-column-readonly",z)}init(z){this.params=z;let J=this.gos.get("functionsReadOnly");if(this.eSelect.setReadOnly(J),this.eSelect.toggleCss("ag-column-select-column-readonly",J),this.beans.colModel.ready)this.showOrHideOptions()}createExpandIcons(){let z=this.beans;this.eExpand.appendChild(this.eExpandChecked=h("columnSelectOpen",z)),this.eExpand.appendChild(this.eExpandUnchecked=h("columnSelectClosed",z)),this.eExpand.appendChild(this.eExpandIndeterminate=h("columnSelectIndeterminate",z)),this.setExpandState(0)}showOrHideOptions(){let z=this.params,J=!z.suppressColumnFilter,Q=!z.suppressColumnSelectAll,Z=!z.suppressColumnExpandAll,$=!!this.beans.colModel.colDefCols?.treeDepth,X=this.getLocaleTextFunc();this.eFilterTextField.setInputPlaceholder(X("searchOoo","Search...")),x(this.eFilterTextField.getGui(),J),x(this.eSelect.getGui(),Q),x(this.eExpand,Z&&$)}onFilterTextChanged(){if(!this.onFilterTextChangedDebounced)this.onFilterTextChangedDebounced=i0(this,()=>{let z=this.eFilterTextField.getValue();this.dispatchLocalEvent({type:"filterChanged",filterText:z})},BT);this.onFilterTextChangedDebounced()}onSelectClicked(){this.dispatchLocalEvent({type:this.selectState?"unselectAll":"selectAll"})}onExpandClicked(){this.dispatchLocalEvent({type:this.expandState===0?"collapseAll":"expandAll"})}setExpandState(z){this.expandState=z,x(this.eExpandChecked,z===0),x(this.eExpandUnchecked,z===1),x(this.eExpandIndeterminate,z===2)}setSelectionState(z){this.selectState=z,this.eSelect.setValue(this.selectState)}},FT={selector:"AG-PRIMARY-COLS-HEADER",component:KT};function Y2(z){return!!z&&typeof z.children<"u"}function bz(z){return Y2(z)?z.groupId:z.colId}function NU(z,J,Q){let Z=(Y,U)=>{let H=Y.children.map(bz).includes(bz(U)),G=N(Y.children),W=G&&bz(G)!==bz(U);return H&&W};if(!Y2(z))return!0;let $=z,X=Q;if(Z($,X))return $.children.push(X),!0;if($.groupId===J){if(!$.children.map(bz).includes(bz(X)))return $.children.push(X),!0}for(let Y=$.children.length-1;Y>=0;Y--)if(NU($.children[Y],J,Q))break;return!1}function wU(z){let J=($,X)=>{return Y2($)&&Y2(X)&&bz($)===bz(X)},Q=($,X)=>{if(!Y2(X))return $;let Y=$,U=X;if(U.children&&U.groupId){if(NU(Y,U.groupId,U.children[0]))return Y}for(let _ of U.children)Q(Y,_);return Y},Z=[];for(let $=1;$<=z.length;$++){let X=z[$-1],Y=z[$];if(J(X,Y))z[$]=Q(X,Y);else Z.push(X)}return Z}function LT(z,J){let Q=[],Z=(X,Y)=>{if(Y2(X)){let U=X,_=typeof U.groupId<"u"?U.groupId:U.headerName,H=new az(U,_,!1,Y),G=[];for(let W of U.children){let q=Z(W,Y+1);if(q)G.push(q)}return H.setChildren(G),H}else{let U=X,_=U.colId?U.colId:U.field,H=z.getColDefCol(_);if(!H)Q.push(U);return H}},$=[];for(let X of J){let Y=Z(X,0);if(Y)$.push(Y)}if(Q.length>0)V(217,{invalidColIds:Q});return $}function MT(z,J){let Q=yU(RT(z)),Z=wU(Q);J(Z)}function DT(z,J){let Q=yU(z),Z=wU(Q);J(Z)}function yU(z){let J=(Q,Z)=>{let $;if(_0(Q))if(Q.isPadding())$=Z;else{let Y=Object.assign({},Q.getColGroupDef());Y.groupId=Q.getGroupId(),Y.children=[Z],$=Y}else{let Y=Object.assign({},Q.getColDef());Y.colId=Q.getColId(),$=Y}let X=Q.getOriginalParent();if(X)return J(X,$);else return $};return z.map((Q)=>J(Q,Q.getColDef()))}function RT(z){return z.getCols().filter((J)=>{let Q=J.getColDef();return J.isPrimary()&&!Q.showRowGroup})}var mY=class{constructor(z,J,Q,Z=!1,$){if(this.displayName=z,this.depth=Q,this.group=Z,this.localEventService=new P4,Z)this.columnGroup=J,this._expanded=$,this.children=[];else this.column=J}get expanded(){return!!this._expanded}set expanded(z){if(z===this._expanded)return;this._expanded=z,this.localEventService.dispatchEvent({type:"expandedChanged"})}addEventListener(z,J){this.localEventService.addEventListener(z,J)}removeEventListener(z,J){this.localEventService.removeEventListener(z,J)}};function i(z){return!!z?.buttons?.includes("apply")}function u0(z,J){if(!i(J))return;let Q=z.sideBar?.comp.openedItem();if(!Q)return;z.sideBar?.comp.getToolPanelInstance(Q)?.refreshDeferredUi()}function xU(z,J,Q,Z,$){let X=AT(J);bU(z,X,Q,Z,$)}function bU(z,J,Q,Z,$){if(z.columnStateUpdateStrategy.getPivotMode(i($)))VT(z,J,Q,Z,$);else jT(z,J,Q,Z,$)}function AT(z){let J=[],Q=(Z)=>{for(let $ of Z){if(!$.passesFilter)continue;if($.group)Q($.children);else J.push($.column)}};return Q(z),J}function jT(z,J,Q,Z,$){let X=z.columnStateUpdateStrategy,Y=[];for(let U of J){if(U.getColDef().lockVisible)continue;if(X.isColumnVisibleInToolPanel(i($),U)!==Q)Y.push({colId:U.getId(),hide:!Q})}X.applyColumnState(i($),Y,Z),u0(z,$)}function VT(z,J,Q,Z,$){OT(z,J,Q,Z,$)}function OT(z,J,Q,Z,$){let X=z.columnStateUpdateStrategy,Y=[],H=Q?(G)=>{if(X.isColumnSelectedInPivotModeToolPanel(i($),G))return;if(G.isAllowValue()){let W=typeof G.getAggFunc()==="string"?G.getAggFunc():z.aggFuncSvc?.getDefaultAggFunc(G);Y.push({colId:G.getId(),aggFunc:W})}else if(G.isAllowRowGroup())Y.push({colId:G.getId(),rowGroup:!0});else if(G.isAllowPivot())Y.push({colId:G.getId(),pivot:!0})}:(G)=>{if(X.isColumnSelectedInPivotModeToolPanel(i($),G))Y.push({colId:G.getId(),pivot:!1,rowGroup:!1,aggFunc:null})};J.forEach(H),X.applyColumnState(i($),Y,Z),u0(z,$)}function gU(z,J){let{columns:Q,visibleState:Z,pivotState:$,eventType:X}=J,Y=z.columnStateUpdateStrategy,U=Y.getPivotMode(i(J)),_=Q.map((H)=>{let G=H.getColId();if(U){let W=$?.[G];return{colId:G,pivot:W?.pivot,rowGroup:W?.rowGroup,aggFunc:W?.aggFunc}}else return{colId:G,hide:!Z?.[G]}});Y.applyColumnState(i(J),_,X),u0(z,J)}function PT(z){return{pivot:z.isPivotActive(),rowGroup:z.isRowGroupActive(),aggFunc:z.isValueActive()?z.getAggFunc():void 0}}function hU(z,J,Q){if(!Q)return PT(z);let Z=J.getRowGroupColumns(Q).includes(z),$=J.getPivotColumns(Q).includes(z),X=J.getValueColumns(Q).includes(z);return{pivot:$,rowGroup:Z,aggFunc:X?J.getColumnAggFunc(Q,z):void 0}}var uU=(z,J)=>{if(!J)return[];let Q=z;for(let Z=0,$=J.length;Z<$&&Q;++Z)Q=Q[J[Z]];return Array.isArray(Q)?Q:[]},X2=(z,J,Q)=>{let Z=z.aggData;if(Z===J)return;if(z.aggData=J,z.__localEventService)TT(z,Z,J,Q)},cY=(z,J,Q)=>{X2(z,J,Q);let Z=z.pinnedSibling;if(Z)X2(Z,J,Q);let $=z.sibling;if($){X2($,J,Q);let X=$.pinnedSibling;if(X)X2(X,J,Q)}},TT=(z,J,Q,Z)=>{if(!Q){if(!J)return;let Y=Object.keys(J);for(let U=0,_=Y.length;U<_;++U){let H=Y[U],G=Z.getColById(H);if(G)z.dispatchCellChangedEvent(G,void 0,J[H])}return}let $=Object.keys(Q);for(let Y=0,U=$.length;Y<U;++Y){let _=$[Y],H=Q[_],G=J?J[_]:void 0;if(H===G)continue;let W=Z.getColById(_);if(W)z.dispatchCellChangedEvent(W,H,G)}if(!J)return;let X=Object.keys(J);for(let Y=0,U=X.length;Y<U;++Y){let _=X[Y];if(_ in Q)continue;let H=Z.getColById(_);if(H)z.dispatchCellChangedEvent(H,void 0,J[_])}};var pY=(z,J,Q)=>{if(!z)return;let Z=z.group;if(Z===Q)return;if(z.group=Q,z.updateHasChildren(),Z&&!Q)X2(z,null,J.colModel),z.setAllChildrenCount(null);J.selectionSvc?.updateRowSelectable(z),z.dispatchRowEvent("groupChanged")},mU=(z,J,Q)=>{pY(z,J,Q),pY(z.pinnedSibling,J,Q)},W6=(z,J)=>{let{gos:Q,rowGroupColsSvc:Z}=J;if(!Z||!z)return!1;let $=Q.get("groupLockGroupColumns");if(!z.isRowGroupActive()||$===0)return!1;if($===-1)return!0;let X=Z.columns.findIndex((Y)=>Y.getColId()===z.getColId());return $>X},H6=(z,J,Q)=>{let $=z(J,`${J==="groupBy"?"Group by":"Un-Group by"} ${Q}`,[Q]);if($.indexOf(Q)>=0)return $;else return`${$} ${Q}`};function ST(z){let J=c0(z),Q="getSelection"in J?J.getSelection():null,Z=[];for(let $=0;$<(Q?.rangeCount??0);$++){let X=Q?.getRangeAt($);if(X)Z.push(X)}return{selection:Q,ranges:Z}}function IT(z,J){if(!z.gos.get("enableCellTextSelection"))return J();if(!Q1()&&!fz())return J();let{selection:Z,ranges:$}=ST(z);J(),Z?.removeAllRanges();for(let X of $)Z?.addRange(X)}var fT={name:"menuItem",optionalMethods:["setActive","select","setExpanded","configureDefaults"]},S7={getMenuItemComp:(z,J,Q)=>{return z.userCompFactory.getCompDetails(J,fT,"agMenuItem",v(z.gos,Q),!0)?.newAgStackInstance()??b.resolve()},getPostProcessPopupParams:({column:z,node:J})=>({column:z,rowNode:J}),preserveRangesWhile:IT,stopPropagationCallbacks:kz,warnNoItem:(z)=>{V(228,{menuItemOrString:z})}},kT=class extends F7{constructor(){super(S7)}},cU=class extends V7{constructor(z,J={column:null,node:null,value:null}){super(z,J,S7)}},pU=class extends y{constructor(z,J,Q,Z={}){super({tag:"div",cls:"ag-menu"});this.column=z,this.mouseEventOrTouch=J,this.parentEl=Q,this.params=Z,this.displayName=null}postConstruct(){let{column:z,beans:{colNames:J}}=this;this.initializeProperties(z);let Q;if(H4(z))Q=J.getDisplayNameForColumn(z,"columnToolPanel");else Q=J.getDisplayNameForProvidedColumnGroup(null,z,"columnToolPanel");if(this.displayName=Q,this.buildMenuItemMap(),this.isActive()){let Z=this.mouseEventOrTouch;if("preventDefault"in Z)Z.preventDefault();let $=this.getMappedMenuItems();if($.length===0)return;this.displayContextMenu($)}}initializeProperties(z){let J=this.beans.columnStateUpdateStrategy,Q;if(_0(z))Q=z.getLeafColumns();else Q=[z];this.columns=Q;let Z=J.getPivotMode(i(this.params));this.allowScrollIntoView=!Z&&Q.some(this.isColumnValidForScrollIntoView),this.allowGrouping=Q.some(($)=>$.isPrimary()&&$.isAllowRowGroup()),this.allowValues=Q.some(($)=>$.isPrimary()&&$.isAllowValue()),this.allowPivoting=Z&&Q.some(($)=>$.isPrimary()&&$.isAllowPivot())}buildMenuItemMap(){let z=this.getLocaleTextFunc(),{beans:J,displayName:Q}=this,Z=this.beans.columnStateUpdateStrategy,$=new Map;this.menuItemMap=$;let X=i(this.params),Y=Z.getPivotMode(X),U=new Set(Z.getRowGroupColumns(X).map((B)=>B.getColId())),_=new Set(Z.getValueColumns(X).map((B)=>B.getColId())),H=new Set(Z.getPivotColumns(X).map((B)=>B.getColId()));$.set("scrollIntoView",{allowedFunction:(B)=>!B.isPinned()&&!Y&&this.isColumnValidForScrollIntoView(B),activeFunction:()=>!1,activateLabel:()=>z("scrollColumnIntoView",`Scroll ${Q} into View`,[Q]),activateFunction:()=>{let B=this.columns.find(this.isColumnValidForScrollIntoView);if(B)this.beans.ctrlsSvc.getScrollFeature().ensureColumnVisible(B)},deActivateFunction:()=>{},addIcon:"ensureColumnVisible"});let G=(B)=>B.isPrimary()&&B.isAllowRowGroup()&&!W6(B,J);$.set("rowGroup",{allowedFunction:G,activeFunction:(B)=>U.has(B.getColId()),activateLabel:()=>H6(z,"groupBy",Q),deactivateLabel:()=>H6(z,"ungroupBy",Q),activateFunction:()=>{let B=this.addColumnsToList(Z.getRowGroupColumns(X),G);Z.setRowGroupColumns(X,B,"toolPanelUi"),u0(this.beans,this.params)},deActivateFunction:()=>{let B=this.removeColumnsFromList(Z.getRowGroupColumns(X),G);Z.setRowGroupColumns(X,B,"toolPanelUi"),u0(this.beans,this.params)},addIcon:"menuAddRowGroup",removeIcon:"menuRemoveRowGroup"});let W=(B)=>B.isPrimary()&&B.isAllowValue();$.set("value",{allowedFunction:W,activeFunction:(B)=>_.has(B.getColId()),activateLabel:()=>z("addToValues",`Add ${Q} to values`,[Q]),deactivateLabel:()=>z("removeFromValues",`Remove ${Q} from values`,[Q]),activateFunction:()=>{let B=this.addColumnsToList(Z.getValueColumns(X),W);Z.setValueColumns(X,B,"toolPanelUi"),u0(this.beans,this.params)},deActivateFunction:()=>{let B=this.removeColumnsFromList(Z.getValueColumns(X),W);Z.setValueColumns(X,B,"toolPanelUi"),u0(this.beans,this.params)},addIcon:"valuePanel",removeIcon:"valuePanel"});let q=(B)=>Y&&B.isPrimary()&&B.isAllowPivot();$.set("pivot",{allowedFunction:q,activeFunction:(B)=>H.has(B.getColId()),activateLabel:()=>z("addToLabels",`Add ${Q} to labels`,[Q]),deactivateLabel:()=>z("removeFromLabels",`Remove ${Q} from labels`,[Q]),activateFunction:()=>{let B=this.addColumnsToList(Z.getPivotColumns(X),q);Z.setPivotColumns(X,B,"toolPanelUi"),u0(this.beans,this.params)},deActivateFunction:()=>{let B=this.removeColumnsFromList(Z.getPivotColumns(X),q);Z.setPivotColumns(X,B,"toolPanelUi"),u0(this.beans,this.params)},addIcon:"pivotPanel",removeIcon:"pivotPanel"})}isColumnValidForScrollIntoView(z){if(!z.isVisible())return!1;let Q=z.getParent();if(!Q)return!0;return Q.getDisplayedChildren()?.includes(z)??!0}addColumnsToList(z,J){return[...z].concat(this.columns.filter((Q)=>J(Q)&&!z.includes(Q)))}removeColumnsFromList(z,J){return z.filter((Q)=>!J(Q)||!this.columns.includes(Q))}displayContextMenu(z){let J=this.getGui(),Q=this.createBean(new cU),Z=this.getLocaleTextFunc(),$=()=>{};J.appendChild(Q.getGui()),Q.addMenuItems(z),Q.addManagedListeners(Q,{closeMenu:()=>{this.parentEl.focus(),$()}});let X=this.beans.popupSvc,Y=X.addPopup({modal:!0,eChild:J,closeOnEsc:!0,afterGuiAttached:()=>E0(Q.getGui()),ariaLabel:Z("ariaLabelContextMenu","Context Menu"),closedCallback:(U)=>{if(U instanceof KeyboardEvent)this.parentEl.focus();this.destroyBean(Q)}});if(Y)$=Y.hideFunc;X.positionPopupUnderMouseEvent({type:"columnContextMenu",mouseEvent:this.mouseEventOrTouch,ePopup:J})}isActive(){return this.allowScrollIntoView||this.allowGrouping||this.allowValues||this.allowPivoting}getMappedMenuItems(){let z=[],{menuItemMap:J,columns:Q,displayName:Z,beans:$}=this;for(let X of J.values()){let Y=Q.some((_)=>X.allowedFunction(_)&&!X.activeFunction(_)),U=Q.some((_)=>X.allowedFunction(_)&&X.activeFunction(_));if(Y)z.push({name:X.activateLabel(Z),icon:h(X.addIcon,$,null),action:()=>X.activateFunction()});if(U&&X.removeIcon&&X.deactivateLabel)z.push({name:X.deactivateLabel(Z),icon:h(X.removeIcon,$,null),action:()=>X.deActivateFunction?.()})}return z}},CT={tag:"div",cls:"ag-column-select-column-group",children:[{tag:"span",ref:"eColumnGroupIcons",cls:"ag-column-group-icons",children:[{tag:"span",ref:"eGroupClosedIcon",cls:"ag-column-group-closed-icon"},{tag:"span",ref:"eGroupOpenedIcon",cls:"ag-column-group-opened-icon"}]},{tag:"ag-checkbox",ref:"cbSelect",cls:"ag-column-select-checkbox"},{tag:"span",ref:"eLabel",cls:"ag-column-select-column-label"}]},iU=class extends y{constructor(z,J,Q,Z,$){super();this.modelItem=z,this.allowDragging=J,this.eventType=Q,this.focusWrapper=Z,this.params=$,this.cbSelect=P,this.eLabel=P,this.eGroupOpenedIcon=P,this.eGroupClosedIcon=P,this.eColumnGroupIcons=P,this.processingColumnStateChange=!1;let{columnGroup:X,depth:Y,displayName:U}=z;this.columnGroup=X,this.columnDepth=Y,this.displayName=U}postConstruct(){this.setTemplate(CT,[F4]);let{beans:z,cbSelect:J,eLabel:Q,displayName:Z,columnDepth:$,modelItem:X,focusWrapper:Y,columnGroup:U}=this,{registry:_,gos:H}=z,G=h("columnDrag",z);this.eDragHandle=G,G.classList.add("ag-drag-handle","ag-column-select-column-group-drag-handle");let W=J.getGui(),q=J.getInputElement();W.after(G),q.setAttribute("tabindex","-1"),Q.textContent=Z??"",this.setupExpandContract(),this.addCss("ag-column-select-indent-"+$),this.getGui().style.setProperty("--ag-indentation-level",String($)),this.tooltipFeature=this.createOptionalManagedBean(_.createDynamicBean("tooltipFeature",!1,{getGui:()=>this.focusWrapper,getLocation:()=>"columnToolPanelColumnGroup",shouldDisplayTooltip:e1(H,()=>Q)})),this.addManagedEventListeners({columnPivotModeChanged:this.onColumnStateChanged.bind(this)}),this.addManagedElementListeners(Q,{click:this.onLabelClicked.bind(this)}),this.addManagedListeners(J,{fieldValueChanged:this.onCheckboxChanged.bind(this)}),this.addManagedListeners(X,{expandedChanged:this.onExpandChanged.bind(this)});let B=new p0(this.getGui(),!1);this.addManagedListeners(B,{longTap:(K)=>this.onContextMenu(K.touchStart)}),this.addDestroyFunc(B.destroy.bind(B)),this.addManagedListeners(Y,{keydown:this.handleKeyDown.bind(this),contextmenu:this.onContextMenu.bind(this)}),this.setOpenClosedIcons(),this.setupDragging(),this.onColumnStateChanged(),this.addVisibilityListenersToAllChildren(),this.refreshAriaExpanded(),this.refreshAriaLabel(),this.setupTooltip();let E=PJ(U.getColGroupDef(),H,null,U);for(let K of E)this.toggleCss(K,!0)}getColumns(){return this.columnGroup.getLeafColumns()}setupTooltip(){let z=this.columnGroup.getColGroupDef();if(!z)return;let J=()=>this.tooltipFeature?.setTooltipAndRefresh(z.headerTooltip);J(),this.addManagedEventListeners({newColumnsLoaded:J})}handleKeyDown(z){switch(z.key){case R.LEFT:z.preventDefault(),this.modelItem.expanded=!1;break;case R.RIGHT:z.preventDefault(),this.modelItem.expanded=!0;break;case R.SPACE:if(z.preventDefault(),this.isSelectable())this.onSelectAllChanged(!this.isSelected());break}}onContextMenu(z){let{columnGroup:J,gos:Q}=this;if(Q.get("functionsReadOnly"))return;let Z=this.createBean(new pU(J,z,this.focusWrapper,this.params));this.addDestroyFunc(()=>{if(Z.isAlive())this.destroyBean(Z)})}addVisibilityListenersToAllChildren(){let z=this.onColumnStateChanged.bind(this);for(let J of this.columnGroup.getLeafColumns())this.addManagedListeners(J,{visibleChanged:z,columnValueChanged:z,columnPivotChanged:z,columnRowGroupChanged:z})}setupDragging(){if(!this.allowDragging){x(this.eDragHandle,!1);return}let z=this.beans,{gos:J,eventSvc:Q,dragAndDrop:Z}=z,$=!J.get("suppressDragLeaveHidesColumns"),X={type:K4.ToolPanel,eElement:this.eDragHandle,dragItemName:this.displayName,getDefaultIconName:()=>$?"hide":"notAllowed",getDragItem:()=>this.createDragItem(),onDragStarted:()=>{$=!J.get("suppressDragLeaveHidesColumns"),Q.dispatchEvent({type:"columnPanelItemDragStart",column:this.columnGroup})},onDragStopped:()=>{Q.dispatchEvent({type:"columnPanelItemDragEnd"})},onGridEnter:(Y)=>{if($)gU(z,{columns:this.columnGroup.getLeafColumns(),visibleState:Y?.visibleState,pivotState:Y?.pivotState,eventType:this.eventType,buttons:this.params.buttons})},onGridExit:()=>{if($)this.onChangeCommon(!1)}};Z.addDragSource(X,!0),this.addDestroyFunc(()=>Z.removeDragSource(X))}createDragItem(){let z=this.columnGroup.getLeafColumns(),J={},Q={},Z=this.beans.columnStateUpdateStrategy,$=i(this.params);for(let X of z){let Y=X.getId();J[Y]=X.isVisible(),Q[Y]=hU(X,Z,$)}return{columns:z,visibleState:J,pivotState:Q}}setupExpandContract(){let{beans:z,eGroupClosedIcon:J,eGroupOpenedIcon:Q,eColumnGroupIcons:Z}=this;J.appendChild(Nz("columnSelectClosed",z,null)),Q.appendChild(Nz("columnSelectOpen",z,null));let $=this.onExpandOrContractClicked.bind(this);this.addManagedElementListeners(J,{click:$}),this.addManagedElementListeners(Q,{click:$});let X=new p0(Z,!0);this.addManagedListeners(X,{tap:$}),this.addDestroyFunc(X.destroy.bind(X))}onLabelClicked(){let z=!this.cbSelect.getValue();this.onChangeCommon(z)}onCheckboxChanged(z){this.onChangeCommon(z.selected)}getVisibleLeafColumns(){let z=[],J=(Q)=>{for(let Z of Q)if(Z.passesFilter)if(Z.group)J(Z.children);else z.push(Z.column)};return J(this.modelItem.children),z}onChangeCommon(z){if(this.refreshAriaLabel(),this.processingColumnStateChange)return;xU(this.beans,this.modelItem.children,z,this.eventType,this.params)}refreshAriaLabel(){let{cbSelect:z,focusWrapper:J,displayName:Q}=this,Z=this.getLocaleTextFunc(),$=Z("ariaColumnGroup","Column Group"),X=z.getValue(),Y=X===void 0?Z("ariaIndeterminate","indeterminate"):X?Z("ariaVisible","visible"):Z("ariaHidden","hidden"),U=Z("ariaToggleVisibility","Press SPACE to toggle visibility");G0(J,`${Q} ${$}`),z.setInputAriaLabel(`${U} (${Y})`),r1(J,z.getInputElement().id)}onColumnStateChanged(){let z=this.workOutSelectedValue(),J=this.workOutReadOnlyValue();this.processingColumnStateChange=!0;let Q=this.cbSelect;Q.setValue(z),Q.setReadOnly(J),this.toggleCss("ag-column-select-column-group-readonly",J),this.processingColumnStateChange=!1}workOutSelectedValue(){let J=this.beans.columnStateUpdateStrategy.getPivotMode(i(this.params)),Q=this.getVisibleLeafColumns(),Z=0,$=0;for(let X of Q)if(J||!X.getColDef().lockVisible)if(this.isColumnChecked(X))Z++;else $++;if(Z>0&&$>0)return;return Z>0}workOutReadOnlyValue(){let z=this.beans.columnStateUpdateStrategy.getPivotMode(i(this.params)),J=0;for(let Q of this.columnGroup.getLeafColumns())if(z){if(Q.isAnyFunctionAllowed())J++}else if(!Q.getColDef().lockVisible)J++;return J===0}isColumnChecked(z){let J=this.beans.columnStateUpdateStrategy;if(J.getPivotMode(i(this.params)))return J.isColumnSelectedInPivotModeToolPanel(i(this.params),z);return J.isColumnVisibleInToolPanel(i(this.params),z)}onExpandOrContractClicked(){let z=this.modelItem,J=z.expanded;z.expanded=!J}onExpandChanged(){this.setOpenClosedIcons(),this.refreshAriaExpanded()}setOpenClosedIcons(){let z=this.modelItem.expanded;x(this.eGroupClosedIcon,!z),x(this.eGroupOpenedIcon,z)}refreshAriaExpanded(){S0(this.focusWrapper,this.modelItem.expanded)}getDisplayName(){return this.displayName}onSelectAllChanged(z){let J=this.cbSelect,Q=J.getValue();if(!J.isReadOnly()&&(z&&!Q||!z&&Q))J.toggle()}isSelected(){return this.cbSelect.getValue()}isSelectable(){return!this.cbSelect.isReadOnly()}setSelected(z){this.cbSelect.setValue(z,!0)}},Y7=(z)=>{if(_0(z))return z.getLeafColumns();return z?[z]:[]},vT=(z,J,Q,Z)=>{if(!J||!z)return null;let $=Z.indexOf(J),X=Q?$:$+1,Y=NT(Z,z,X);return X-Y},NT=(z,J,Q)=>{if(!J)return 0;let Z=J[0],$=J.length;if(z.indexOf(Z)<Q)return $;return 0},iY=(z,J,Q,Z)=>{let $=i(Z);if(z.get("suppressMovableColumns")||J.columnStateUpdateStrategy.getPivotMode($))return!0;return!!Q.find(({colDef:U})=>!!U.suppressMovable||!!U.lockPosition)},dY=(z,J,Q,Z)=>{if(!Q)return;let{component:$}=Q,X=null,Y=Q.position==="top";if($ instanceof iU)X=$.getColumns()[0],Y=!0;else if($)X=$.column;if(!X)return;let U=i(Z),_=U?z.columnStateUpdateStrategy.getPrimaryColumns(U):z.colModel.getCols(),H=vT(J,X,Y,_);if(H!=null)z.columnStateUpdateStrategy.moveColumns(U,J,H,"toolPanelUi"),u0(z,Z)},wT=(z)=>{return z.column},yT={tag:"div",cls:"ag-column-select-column",children:[{tag:"ag-checkbox",ref:"cbSelect",cls:"ag-column-select-checkbox"},{tag:"span",ref:"eLabel",cls:"ag-column-select-column-label"}]},xT=class extends y{constructor(z,J,Q,Z,$){super();this.modelItem=z,this.allowDragging=J,this.groupsExist=Q,this.focusWrapper=Z,this.params=$,this.eLabel=P,this.cbSelect=P,this.processingColumnStateChange=!1;let{column:X,depth:Y,displayName:U}=z;this.column=X,this.columnDepth=Y,this.displayName=U}postConstruct(){this.setTemplate(yT,[F4]);let{beans:z,cbSelect:J,displayName:Q,eLabel:Z,columnDepth:$,groupsExist:X,column:Y,gos:U,focusWrapper:_}=this,H=h("columnDrag",z);this.eDragHandle=H,H.classList.add("ag-drag-handle","ag-column-select-column-drag-handle");let G=J.getGui(),W=J.getInputElement();if(G.after(H),W.setAttribute("tabindex","-1"),Z.textContent=Q,X)this.addCss("ag-column-select-add-group-indent");this.addCss(`ag-column-select-indent-${$}`),this.getGui().style.setProperty("--ag-indentation-level",String($)),this.tooltipFeature=this.createOptionalManagedBean(z.registry.createDynamicBean("tooltipFeature",!1,{getGui:()=>this.focusWrapper,getLocation:()=>"columnToolPanelColumn",shouldDisplayTooltip:e1(U,()=>Z),getAdditionalParams:()=>({colDef:Y.getColDef()})})),this.setupDragging();let q=this.onColumnStateChanged.bind(this);this.addManagedEventListeners({columnPivotModeChanged:q}),this.addManagedListeners(Y,{columnValueChanged:q,columnPivotChanged:q,columnRowGroupChanged:q,visibleChanged:q}),this.addManagedListeners(_,{keydown:this.handleKeyDown.bind(this),contextmenu:this.onContextMenu.bind(this)});let B=new p0(_);this.addManagedListeners(B,{longTap:(K)=>this.onContextMenu(K.touchStart)}),this.addDestroyFunc(B.destroy.bind(B)),this.addManagedPropertyListener("functionsReadOnly",this.onColumnStateChanged.bind(this)),this.addManagedListeners(J,{fieldValueChanged:this.onCheckboxChanged.bind(this)}),this.addManagedElementListeners(Z,{click:this.onLabelClicked.bind(this)}),this.onColumnStateChanged(),this.refreshAriaLabel(),this.setupTooltip();let E=PJ(Y.getColDef(),U,Y,null);for(let K of E)this.toggleCss(K,!0)}getColumn(){return this.column}setupTooltip(){let z=()=>this.tooltipFeature?.setTooltipAndRefresh(this.column.getColDef().headerTooltip);z(),this.addManagedEventListeners({newColumnsLoaded:z})}onContextMenu(z){let{column:J,gos:Q}=this;if(Q.get("functionsReadOnly"))return;let Z=this.createBean(new pU(J,z,this.focusWrapper,this.params));this.addDestroyFunc(()=>{if(Z.isAlive())this.destroyBean(Z)})}handleKeyDown(z){if(z.key===R.SPACE){if(z.preventDefault(),this.isSelectable())this.onSelectAllChanged(!this.isSelected())}}onLabelClicked(){if(this.gos.get("functionsReadOnly"))return;let z=!this.cbSelect.getValue();this.onChangeCommon(z)}onCheckboxChanged(z){this.onChangeCommon(z.selected)}onChangeCommon(z){if(this.cbSelect.isReadOnly())return;if(this.refreshAriaLabel(),this.processingColumnStateChange)return;bU(this.beans,[this.column],z,"toolPanelUi",this.params)}refreshAriaLabel(){let{cbSelect:z,focusWrapper:J,displayName:Q}=this,Z=this.getLocaleTextFunc(),$=Z("ariaColumn","Column"),X=z.getValue()?Z("ariaVisible","visible"):Z("ariaHidden","hidden"),Y=Z("ariaToggleVisibility","Press SPACE to toggle visibility");G0(J,`${Q} ${$}`),this.cbSelect.setInputAriaLabel(`${Y} (${X})`),r1(J,z.getInputElement().id)}setupDragging(){let z=this.eDragHandle;if(!this.allowDragging){x(z,!1);return}let J=this.beans,{gos:Q,eventSvc:Z,dragAndDrop:$}=J;if(i(this.params))z.setAttribute("data-column-tool-panel-deferred","");let X=!Q.get("suppressDragLeaveHidesColumns"),Y={type:K4.ToolPanel,eElement:z,dragItemName:this.displayName,getDefaultIconName:()=>X&&!i(this.params)?"hide":"notAllowed",getDragItem:()=>this.createDragItem(),onDragStarted:()=>{X=!Q.get("suppressDragLeaveHidesColumns"),Z.dispatchEvent({type:"columnPanelItemDragStart",column:this.column})},onDragStopped:()=>{Z.dispatchEvent({type:"columnPanelItemDragEnd"})},onGridEnter:(U)=>{if(X&&!i(this.params))gU(J,{columns:[this.column],visibleState:U?.visibleState,pivotState:U?.pivotState,eventType:"toolPanelUi",buttons:this.params.buttons})},onGridExit:()=>{if(X&&!i(this.params))this.onChangeCommon(!1)}};$.addDragSource(Y,!0),this.addDestroyFunc(()=>$.removeDragSource(Y))}createDragItem(){let z=this.column.getColId(),J={[z]:this.column.isVisible()},Q=this.beans.columnStateUpdateStrategy,Z={[z]:hU(this.column,Q,i(this.params))};return{columns:[this.column],visibleState:J,pivotState:Z}}onColumnStateChanged(){this.processingColumnStateChange=!0;let z=this.beans.columnStateUpdateStrategy,J=z.getPivotMode(i(this.params));if(J){let $=z.isColumnSelectedInPivotModeToolPanel(i(this.params),this.column);this.cbSelect.setValue($)}else this.cbSelect.setValue(z.isColumnVisibleInToolPanel(i(this.params),this.column));let Q=!0,Z=!0;if(J){let $=this.gos.get("functionsReadOnly"),X=!this.column.isAnyFunctionAllowed();Q=!$&&!X,Z=Q}else{let{enableRowGroup:$,enableValue:X,lockPosition:Y,suppressMovable:U,lockVisible:_}=this.column.getColDef(),H=!!$||!!X,G=!!Y||!!U;Q=!_,Z=H||!G}this.cbSelect.setReadOnly(!Q),this.eDragHandle.classList.toggle("ag-column-select-column-readonly",!Z),this.toggleCss("ag-column-select-column-readonly",!Z&&!Q),this.cbSelect.setPassive(!1),this.processingColumnStateChange=!1}getDisplayName(){return this.displayName}onSelectAllChanged(z){let J=this.cbSelect;if(z!==J.getValue()){if(!J.isReadOnly())J.toggle()}}isSelected(){return this.cbSelect.getValue()}isSelectable(){return!this.cbSelect.isReadOnly()}isExpandable(){return!1}setExpanded(z){V(158)}},bT=class{constructor(z){this.items=z}getRowCount(){return this.items.length}getRow(z){return this.items[z]}},gT="ag-column-select-list",hT=class extends y{constructor(){super({tag:"div",cls:gT,role:"presentation"});this.destroyColumnItemFuncs=[],this.hasLoadedInitialState=!1,this.isInitialState=!1,this.skipRefocus=!1}wireBeans(z){this.colModel=z.colModel}destroy(){this.destroyColumnTree(),super.destroy()}destroyColumnTree(){this.allColsTree=[];for(let z of this.destroyColumnItemFuncs)z();this.destroyColumnItemFuncs=[]}init(z,J,Q){this.params=z;let{suppressSyncLayoutWithGrid:Z,contractColumnSelection:$,suppressColumnMove:X}=z;if(this.allowDragging=J,this.eventType=Q,!Z)this.addManagedEventListeners({columnMoved:this.onColumnsChanged.bind(this)});this.addManagedEventListeners({newColumnsLoaded:this.onColumnsChanged.bind(this)});let Y=this.fireSelectionChangedEvent.bind(this);this.addManagedEventListeners({columnPivotChanged:Y,columnPivotModeChanged:Y,columnRowGroupChanged:Y,columnValueChanged:Y,columnVisible:Y,newColumnsLoaded:Y}),this.expandGroupsByDefault=!$;let U=X||Z,_=this.createManagedBean(new O7({cssIdentifier:"column-select",ariaRole:"tree",moveItemCallback:(H,G)=>{if(U)return;this.moveItems(H,G)}}));if(this.virtualList=_,this.appendChild(_.getGui()),_.setComponentCreator((H,G)=>{return _J(G,H.depth+1),this.createComponentFromItem(H,G)}),this.colModel.ready)this.onColumnsChanged();if(U)return;this.createItemDragFeature()}createItemDragFeature(){let{gos:z,beans:J,virtualList:Q}=this;this.createManagedBean(new xP(this,Q,{dragSourceType:K4.ToolPanel,addListeners:(Z,$,X)=>{Z.addManagedEventListeners({columnPanelItemDragStart:$,columnPanelItemDragEnd:X})},getCurrentDragValue:(Z)=>wT(Z),isMoveBlocked:(Z)=>iY(z,J,Y7(Z),this.params),getNumRows:(Z)=>Z.getDisplayedColsList().length,moveItem:(Z,$)=>dY(J,Y7(Z),$,this.params)}))}moveItems(z,J){let{gos:Q,beans:Z}=this,{modelItem:$}=z,{group:X,columnGroup:Y,column:U,expanded:_}=$,H=Y7(X?Y:U);if(iY(Q,Z,H,this.params))return;let G=this.displayedColsList.indexOf($),W=J?-1:1,q=0;if(J){let E=z.columnDepth>0?U.getParent()?.getChildren():null;if(E?.length&&U===E[0])q=-1}else if(X)q=_?$.children.length:0;let B=Math.min(Math.max(G+q+W,0),this.displayedColsList.length-1);this.skipRefocus=!0,dY(Z,H,{rowIndex:B,position:J?"top":"bottom",component:this.virtualList.getComponentAt(B)},this.params),this.focusRowIfAlive(B-q).then(()=>{this.skipRefocus=!1})}createComponentFromItem(z,J){let Q=this.allowDragging;if(z.group){let $=new iU(z,Q,this.eventType,J,this.params);return this.createBean($),$}let Z=new xT(z,Q,this.groupsExist,J,this.params);return this.createBean(Z),Z}onColumnsChanged(){let z=this.params;if(!this.hasLoadedInitialState)this.hasLoadedInitialState=!0,this.isInitialState=!!z.initialState;let J=this.getExpandedStates(),Q=this.colModel.isPivotMode(),Z=i(z),$=Z&&this.beans.columnStateUpdateStrategy.hasDeferredColumnOrder(Z);if((!z.suppressSyncLayoutWithGrid||Z)&&!Q||$)this.buildTreeFromWhatGridIsDisplaying();else this.buildTreeFromProvidedColumnDefs();this.setExpandedStates(J),this.markFilteredColumns(),this.flattenAndFilterModel(),this.isInitialState=!1}getDisplayedColsList(){return this.displayedColsList}getExpandedStates(){let z={};if(this.isInitialState){let{expandedGroupIds:J}=this.params.initialState;for(let Q of J)z[Q]=!0;return z}if(!this.allColsTree)return{};return this.forEachItem((J)=>{if(!J.group)return;let Q=J.columnGroup;if(Q)z[Q.getId()]=J.expanded}),z}setExpandedStates(z){if(!this.allColsTree)return;let{isInitialState:J}=this;this.forEachItem((Q)=>{if(!Q.group)return;let Z=Q.columnGroup;if(Z){let $=z[Z.getId()];if($!=null||J)Q.expanded=!!$}})}buildTreeFromWhatGridIsDisplaying(){let z=i(this.params);if(z&&this.beans.columnStateUpdateStrategy.hasDeferredColumnOrder(z)){let J=this.beans.columnStateUpdateStrategy.getPrimaryColumns(z);if(J.length>0){DT(J,this.setColumnLayout.bind(this));return}}if(this.params.suppressSyncLayoutWithGrid){this.buildTreeFromProvidedColumnDefs();return}MT(this.colModel,this.setColumnLayout.bind(this))}setColumnLayout(z){let J=LT(this.colModel,z);this.buildListModel(J),this.groupsExist=z.some((Q)=>{return Q&&typeof Q.children<"u"}),this.markFilteredColumns(),this.flattenAndFilterModel()}buildTreeFromProvidedColumnDefs(){let z=this.colModel;this.buildListModel(z.getColDefColTree()),this.groupsExist=!!z.colDefCols?.treeDepth}buildListModel(z){let J=this.onColumnExpanded.bind(this),Q=(U)=>{U.addEventListener("expandedChanged",J);let _=U.removeEventListener.bind(U,"expandedChanged",J);this.destroyColumnItemFuncs.push(_)},Z=this.beans.colNames,$=(U,_,H)=>{for(let G of U)if(_0(G))X(G,_,H);else Y(G,_,H)},X=(U,_,H)=>{if(U.getColGroupDef()?.suppressColumnsToolPanel)return;if(U.isPadding()){$(U.getChildren(),_,H);return}let q=Z.getDisplayNameForProvidedColumnGroup(null,U,"columnToolPanel"),B=new mY(q,U,_,!0,this.expandGroupsByDefault);H.push(B),Q(B),$(U.getChildren(),_+1,B.children)},Y=(U,_,H)=>{if(U.getColDef()?.suppressColumnsToolPanel)return;let W=Z.getDisplayNameForColumn(U,"columnToolPanel");H.push(new mY(W,U,_))};this.destroyColumnTree(),$(z,0,this.allColsTree)}onColumnExpanded(){this.flattenAndFilterModel()}flattenAndFilterModel(){this.displayedColsList=[];let z=(Z)=>{if(!Z.passesFilter)return;if(this.displayedColsList.push(Z),Z.group&&Z.expanded)Z.children.forEach(z)},J=this.virtualList;this.allColsTree.forEach(z),J.setModel(new bT(this.displayedColsList));let Q=null;if(!this.skipRefocus)Q=J.getLastFocusedRow();if(J.refresh(),Q!=null)this.focusRowIfAlive(Q);this.notifyListeners(),this.refreshAriaLabel()}refreshAriaLabel(){let z=this.getLocaleTextFunc(),J=z("ariaColumnPanelList","Column List"),Q=z("columns","Columns"),Z=this.displayedColsList.length;G0(this.virtualList.getAriaElement(),`${J} ${Z} ${Q}`)}focusRowIfAlive(z){if(z===-1)return Promise.resolve();return new Promise((J)=>{window.setTimeout(()=>{if(this.isAlive())this.virtualList.focusRow(z);J()},0)})}forEachItem(z){let J=(Z)=>{for(let $ of Z)if(z($),$.group)J($.children)},Q=this.allColsTree;if(!Q)return;J(Q)}doSetExpandedAll(z){this.forEachItem((J)=>{if(J.group)J.expanded=z})}setGroupsExpanded(z,J){if(!J){this.doSetExpandedAll(z);return}let Q=[];this.forEachItem(($)=>{if(!$.group)return;let X=$.columnGroup.getId();if(J.indexOf(X)>=0)$.expanded=z,Q.push(X)});let Z=J.filter(($)=>!Q.includes($));if(Z.length>0)V(157,{unrecognisedGroupIds:Z})}getExpandState(){let z=0,J=0;if(this.forEachItem((Q)=>{if(!Q.group)return;if(Q.expanded)z++;else J++}),z>0&&J>0)return 2;if(J>0)return 1;return 0}doSetSelectedAll(z){xU(this.beans,this.allColsTree,z,this.eventType,this.params),this.syncVisibleSelectionState(),this.fireSelectionChangedEvent()}syncVisibleSelectionState(){for(let z=0;z<this.displayedColsList.length;z++)this.virtualList.getComponentAt(z)?.onColumnStateChanged?.()}getSelectionState(){let z=0,J=0,Q=this.beans.columnStateUpdateStrategy,Z=Q.getPivotMode(i(this.params));if(this.forEachItem(($)=>{if($.group)return;if(!$.passesFilter)return;let X=$.column,Y=X.getColDef(),U;if(Z){if(!X.isAllowPivot()&&!X.isAllowRowGroup()&&!X.isAllowValue())return;U=Q.isColumnSelectedInPivotModeToolPanel(i(this.params),X)??!1}else{if(Y.lockVisible)return;U=Q.isColumnVisibleInToolPanel(i(this.params),X)??!1}if(U)z++;else J++}),z>0&&J>0)return;return!(z===0||J>0)}setFilterText(z){this.filterText=I(z)?z.toLowerCase():null,this.markFilteredColumns(),this.flattenAndFilterModel()}markFilteredColumns(){let z=(Q)=>{if(!I(this.filterText))return!0;let Z=Q.displayName;return Z==null||Z.toLowerCase().indexOf(this.filterText)!==-1},J=(Q,Z)=>{let $=!1;if(Q.group){let Y=z(Q);for(let U of Q.children){let _=J(U,Y||Z);if(_)$=_}}let X=Z||$?!0:z(Q);return Q.passesFilter=X,X};for(let Q of this.allColsTree)J(Q,!1)}notifyListeners(){this.fireGroupExpandedEvent(),this.fireSelectionChangedEvent()}fireGroupExpandedEvent(){let z=this.getExpandState();this.dispatchLocalEvent({type:"groupExpanded",state:z})}fireSelectionChangedEvent(){if(!this.allColsTree)return;let z=this.getSelectionState();this.dispatchLocalEvent({type:"selectionChanged",state:z})}getExpandedGroups(){let z=[];if(!this.allColsTree)return z;return this.forEachItem((J)=>{if(J.group&&J.expanded)z.push(J.columnGroup.getId())}),z}},uT={selector:"AG-PRIMARY-COLS-LIST",component:hT},mT={tag:"div",cls:"ag-column-select",children:[{tag:"ag-primary-cols-header",ref:"primaryColsHeaderPanel"},{tag:"ag-primary-cols-list",ref:"primaryColsListPanel"}]},dU=class extends y{constructor(){super(mT,[FT,uT]);this.primaryColsHeaderPanel=P,this.primaryColsListPanel=P,this.registerCSS(qT)}init(z,J,Q){let{primaryColsHeaderPanel:Z,primaryColsListPanel:$}=this;Z.init(J);let{suppressColumnFilter:X,suppressColumnSelectAll:Y}=J;if(J.suppressColumnExpandAll&&X&&Y)Z.setDisplayed(!1);this.addManagedListeners($,{groupExpanded:(_)=>{Z.setExpandState(_.state),J.onStateUpdated()},selectionChanged:(_)=>Z.setSelectionState(_.state)}),$.init(J,z,Q),this.addManagedListeners(Z,{expandAll:$.doSetExpandedAll.bind($,!0),collapseAll:$.doSetExpandedAll.bind($,!1),selectAll:$.doSetSelectedAll.bind($,!0),unselectAll:$.doSetSelectedAll.bind($,!1),filterChanged:(_)=>$.setFilterText(_.filterText)}),this.positionableFeature=this.createManagedBean(new s2(this.getGui(),{minHeight:100}))}toggleResizable(z){this.positionableFeature.setResizable(z?{bottom:!0}:!1)}expandGroups(z){this.primaryColsListPanel.setGroupsExpanded(!0,z)}collapseGroups(z){this.primaryColsListPanel.setGroupsExpanded(!1,z)}setColumnLayout(z){this.primaryColsListPanel.setColumnLayout(z)}syncLayoutWithGrid(){this.primaryColsListPanel.onColumnsChanged()}getExpandedGroups(){return this.primaryColsListPanel.getExpandedGroups()}},cT=".ag-column-panel{display:flex;flex:1 1 auto;flex-direction:column;overflow:hidden}.ag-pivot-mode-panel{display:flex;height:var(--ag-header-height)}.ag-pivot-mode-select{align-items:center;display:flex}:where(.ag-ltr) .ag-pivot-mode-select{margin-left:var(--ag-widget-container-horizontal-padding)}:where(.ag-rtl) .ag-pivot-mode-select{margin-right:var(--ag-widget-container-horizontal-padding)}.ag-column-panel-column-select:where(:not(.ag-last-visible-child)){border-bottom:var(--ag-tool-panel-separator-border)}.ag-column-panel-column-select:where(:nth-child(n+2 of :not(.ag-hidden))){border-top:var(--ag-tool-panel-separator-border)}:where(.ag-column-panel) .ag-column-drop-vertical{flex:1 1 0px;min-height:50px}:where(.ag-column-panel) .ag-column-drop-vertical:where(:not(.ag-last-column-drop)){border-bottom:var(--ag-tool-panel-separator-border)}.ag-column-panel-buttons{display:flex;flex-wrap:wrap;gap:var(--ag-widget-vertical-spacing) var(--ag-widget-horizontal-spacing);justify-content:flex-end;overflow:hidden;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding) 0;:where(.ag-standard-button){transition:background-color .25s ease-in-out,color .25s ease-in-out}}.ag-column-panel-buttons:where(:last-child){padding-bottom:var(--ag-widget-container-vertical-padding)}.ag-column-panel-buttons-button{line-height:1.5}:where(.ag-column-panel) .ag-column-panel-buttons-apply-button:not(:disabled){background-color:var(--ag-column-panel-apply-button-background-color);color:var(--ag-column-panel-apply-button-color)}",pT="ag-column-panel-deferred",iT=class extends y{constructor(){super({tag:"div",cls:"ag-column-panel"});this.initialised=!1,this.childDestroyFuncs=[],this.isDeferModeEnabled=!1,this.isCommitting=!1,this.onDeferredApply=()=>{this.isCommitting=!0;try{this.beans.columnStateUpdateStrategy.commit(this.isDeferModeEnabled)}finally{this.isCommitting=!1}this.deferredButtonsComp?.updateValidity(!1),this.lastKnownGridState=this.captureGridState()},this.onDeferredCancel=()=>{this.beans.columnStateUpdateStrategy.reset(this.isDeferModeEnabled),this.deferredButtonsComp?.updateValidity(!1),this.refreshToolPanelLayouts(),this.pivotModePanel?.refreshEditStrategy(),this.lastKnownGridState=this.captureGridState()},this.onPivotModePanelValueChanged=()=>{this.refreshToolPanelLayouts(),this.setLastVisible(),this.deferredButtonsComp?.updateValidity(this.beans.columnStateUpdateStrategy.hasPendingChanges(this.isDeferModeEnabled))},this.onColumnEverythingChanged=()=>{if(!this.isDeferModeEnabled||this.isCommitting)return;let z=this.captureGridState();if(!this.beans.columnStateUpdateStrategy.hasPendingChanges(this.isDeferModeEnabled)){this.lastKnownGridState=z;return}let J=this.lastKnownGridState&&this.isGridStateEqual(this.lastKnownGridState,z);if(this.lastKnownGridState=z,!J)return;this.resetDeferredState()},this.onExternalGridChange=()=>{if(!this.isDeferModeEnabled||this.isCommitting)return;if(!this.beans.columnStateUpdateStrategy.hasPendingChanges(this.isDeferModeEnabled))return;this.resetDeferredState(),this.lastKnownGridState=this.captureGridState()},this.registerCSS(cT)}wireBeans(z){this.colToolPanelFactory=z.colToolPanelFactory}setVisible(z){if(super.setDisplayed(z),z&&!this.initialised)this.init(this.params)}init(z){let Q={...v(this.gos,{suppressColumnMove:!1,suppressColumnSelectAll:!1,suppressColumnFilter:!1,suppressColumnExpandAll:!1,contractColumnSelection:!1,suppressPivotMode:!1,suppressRowGroups:!1,suppressValues:!1,suppressPivots:!1,suppressSyncLayoutWithGrid:!1}),...z};this.params=Q;let{childDestroyFuncs:Z,colToolPanelFactory:$,gos:X}=this,Y=X.isModuleRegistered("SharedPivot"),U=Y||X.isModuleRegistered("SharedRowGrouping");if(this.isDeferModeEnabled=i(Q),this.toggleCss(pT,this.isDeferModeEnabled),!Q.suppressPivotMode&&$&&Y)this.pivotModePanel=$.createPivotModePanel(this,Z,Q,this.onPivotModePanelValueChanged);let _=this.createBean(new dU);if(this.primaryColsPanel=_,Z.push(()=>this.destroyBean(this.primaryColsPanel)),_.init(!0,Q,"toolPanelUi"),_.addCss("ag-column-panel-column-select"),this.appendChild(_),$){if(!Q.suppressRowGroups&&U)this.rowGroupDropZonePanel=$.createRowGroupPanel(this,Z,Q);if(!Q.suppressValues&&U)this.valuesDropZonePanel=$.createValuesPanel(this,Z,Q);if(!Q.suppressPivots&&Y)this.pivotDropZonePanel=$.createPivotPanel(this,Z,Q);this.setLastVisible();let[H]=this.addManagedEventListeners({columnPivotModeChanged:()=>{this.resetChildrenHeight(),this.setLastVisible()}});Z.push(()=>H())}if(this.isDeferModeEnabled){let H=this.onExternalGridChange;Z.push(...this.addManagedEventListeners({columnEverythingChanged:this.onColumnEverythingChanged,sortChanged:H,columnVisible:H,columnRowGroupChanged:H,columnValueChanged:H,columnPivotChanged:H,columnPivotModeChanged:H,newColumnsLoaded:H,...Q.suppressSyncLayoutWithGrid?{}:{columnMoved:H}}))}if(Q.buttons){if(!Q.buttons.includes("apply"))V(298);if(Q.buttons.length)this.initDeferredButtons(Q.buttons)}this.initialised=!0}initDeferredButtons(z){let J=this.createBean(new b5({className:"ag-column-panel-buttons"}));this.deferredButtonsComp=J,this.childDestroyFuncs.push(()=>{this.deferredButtonsComp=this.destroyBean(this.deferredButtonsComp)});let Q=this.getLocaleTextFunc(),Z=z.map(($)=>({type:$,label:Q($==="apply"?"applyColumnToolPanel":"cancelColumnToolPanel",$==="apply"?"Apply":"Cancel")}));J.updateButtons(Z),J.updateValidity(!1),J.addManagedListeners(J,{apply:this.onDeferredApply,cancel:this.onDeferredCancel}),this.appendChild(J)}resetDeferredState(){this.beans.columnStateUpdateStrategy.reset(this.isDeferModeEnabled),this.deferredButtonsComp?.updateValidity(!1),this.refreshToolPanelLayouts(),this.pivotModePanel?.refreshEditStrategy()}captureGridState(){let{beans:z}=this,J=(Q)=>(Q??[]).map((Z)=>Z.getColId());return{rowGroupColIds:J(z.rowGroupColsSvc?.columns),valueColIds:J(z.valueColsSvc?.columns),pivotColIds:J(z.pivotColsSvc?.columns),pivotMode:z.colModel.isPivotMode(),columnOrder:z.colModel.getCols().map((Q)=>Q.getColId()),visibleColIds:z.colModel.getCols().filter((Q)=>Q.isVisible()).map((Q)=>Q.getColId()),sortState:z.colModel.getCols().filter((Q)=>Q.getSort()).map((Q)=>`${Q.getColId()}:${Q.getSort()}:${Q.getSortIndex()}`),aggFuncState:(z.valueColsSvc?.columns??[]).map((Q)=>Q.getAggFunc()),widthState:z.colModel.getCols().map((Q)=>`${Q.getColId()}:${Q.getActualWidth()}`)}}isGridStateEqual(z,J){return Z0(z.rowGroupColIds,J.rowGroupColIds)&&Z0(z.valueColIds,J.valueColIds)&&Z0(z.pivotColIds,J.pivotColIds)&&z.pivotMode===J.pivotMode&&Z0(z.columnOrder,J.columnOrder)&&Z0(z.visibleColIds,J.visibleColIds)&&Z0(z.sortState,J.sortState)&&Z0(z.aggFuncState,J.aggFuncState)&&Z0(z.widthState,J.widthState)}refreshDeferredUi(){this.refreshToolPanelLayouts(),this.setLastVisible(),this.pivotModePanel?.refreshEditStrategy(),this.deferredButtonsComp?.updateValidity(this.beans.columnStateUpdateStrategy.hasPendingChanges(this.isDeferModeEnabled))}refreshToolPanelLayouts(){this.primaryColsPanel.syncLayoutWithGrid(),this.rowGroupDropZonePanel?.refreshGui(),this.valuesDropZonePanel?.refreshGui(),this.pivotDropZonePanel?.refresh()}setPivotModeSectionVisible(z){let J=this.colToolPanelFactory;if(!J)return;this.pivotModePanel=J.setPanelVisible(this.pivotModePanel,z,J.createPivotModePanel.bind(J,this,this.childDestroyFuncs,this.params,this.onPivotModePanelValueChanged,!0)),this.setLastVisible()}setRowGroupsSectionVisible(z){let J=this.colToolPanelFactory;if(!J)return;this.rowGroupDropZonePanel=J.setPanelVisible(this.rowGroupDropZonePanel,z,J.createRowGroupPanel.bind(J,this,this.childDestroyFuncs,this.params)),this.setLastVisible()}setValuesSectionVisible(z){let J=this.colToolPanelFactory;if(!J)return;this.valuesDropZonePanel=J.setPanelVisible(this.valuesDropZonePanel,z,J.createValuesPanel.bind(J,this,this.childDestroyFuncs,this.params)),this.setLastVisible()}setPivotSectionVisible(z){let J=this.colToolPanelFactory;if(!J)return;this.pivotDropZonePanel=J.setPanelVisible(this.pivotDropZonePanel,z,J.createPivotPanel.bind(J,this,this.childDestroyFuncs,this.params)),this.pivotDropZonePanel?.setDisplayed(z),this.setLastVisible()}setResizers(){for(let z of[this.primaryColsPanel,this.rowGroupDropZonePanel,this.valuesDropZonePanel,this.pivotDropZonePanel]){if(!z)continue;let J=z.getGui();z.toggleResizable(!J.classList.contains("ag-last-column-drop")&&!J.classList.contains("ag-hidden")&&!J.classList.contains("ag-last-visible-child"))}}setLastVisible(){let z=this.getGui(),J=Array.prototype.slice.call(z.querySelectorAll(".ag-column-drop"));for(let $ of J)$.classList.remove("ag-last-column-drop");let Q=z.querySelectorAll(".ag-column-drop:not(.ag-hidden)"),Z=N(Q);if(Z)Z.classList.add("ag-last-column-drop");this.primaryColsPanel.getGui().classList.toggle("ag-last-visible-child",!Z),this.setResizers()}resetChildrenHeight(){let J=this.getGui().children;for(let Q=0;Q<J.length;Q++){let{style:Z}=J[Q];Z.removeProperty("height"),Z.removeProperty("flex")}}expandColumnGroups(z){this.primaryColsPanel.expandGroups(z)}collapseColumnGroups(z){this.primaryColsPanel.collapseGroups(z)}setColumnLayout(z){this.primaryColsPanel.setColumnLayout(z)}syncLayoutWithGrid(){this.primaryColsPanel.syncLayoutWithGrid()}destroyChildren(){let z=this.childDestroyFuncs;for(let J of z)J();z.length=0,J0(this.getGui())}refresh(z){return this.destroyChildren(),this.init(z),!0}getState(){return{expandedGroupIds:this.primaryColsPanel.getExpandedGroups()}}destroy(){this.destroyChildren(),super.destroy()}},dT=".ag-column-drop{align-items:center;display:inline-flex;overflow:auto;position:relative;width:100%}.ag-column-drop-list{align-items:center;display:flex}.ag-column-drop-cell{align-items:center;background-color:var(--ag-column-drop-cell-background-color);border:var(--ag-column-drop-cell-border);border-radius:500px;color:var(--ag-column-drop-cell-text-color);display:flex;padding:calc(var(--ag-spacing)*.25);position:relative;&:focus-visible{box-shadow:var(--ag-focus-shadow)}:where(.ag-drag-handle){color:var(--ag-column-drop-cell-drag-handle-color)}}:where(.ag-ltr) .ag-column-drop-cell{padding-left:calc(var(--ag-spacing)*.75)}:where(.ag-rtl) .ag-column-drop-cell{padding-right:calc(var(--ag-spacing)*.75)}.ag-column-drop-cell-text{flex:1 1 auto;margin:0 var(--ag-spacing);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-column-drop-vertical{align-items:stretch;display:flex;flex-direction:column;min-height:75px;overflow:hidden}.ag-column-drop-vertical-title-bar{align-items:center;display:flex;flex:none;padding:var(--ag-widget-container-vertical-padding) calc(var(--ag-spacing)*2) 0}.ag-column-drop-vertical-list{align-items:stretch;flex-direction:column;flex-grow:1;overflow-x:auto;padding-bottom:var(--ag-spacing);padding-left:var(--ag-spacing);padding-right:var(--ag-spacing);position:relative}:where(.ag-column-drop-empty) .ag-column-drop-vertical-list{overflow:hidden}.ag-column-drop-cell-button{cursor:pointer;min-width:0;opacity:.75}:where(.ag-ltr) .ag-column-drop-cell-button{margin-right:calc(var(--ag-spacing)/4)}:where(.ag-rtl) .ag-column-drop-cell-button{margin-left:calc(var(--ag-spacing)/4)}.ag-column-drop-cell-button:hover{opacity:1}:where(.ag-ltr) .ag-column-drop-cell-drag-handle{margin-left:calc(var(--ag-spacing)/4)}:where(.ag-rtl) .ag-column-drop-cell-drag-handle{margin-right:calc(var(--ag-spacing)/4)}.ag-column-drop-wrapper{display:flex}.ag-column-drop-horizontal-half-width{width:50%!important}.ag-column-drop-cell-ghost{opacity:.5}.ag-column-drop-horizontal{background-color:var(--ag-header-background-color);border-bottom:var(--ag-header-row-border);gap:var(--ag-cell-widget-spacing);height:var(--ag-header-height);overflow:hidden;white-space:nowrap}:where(.ag-ltr) .ag-column-drop-horizontal{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-column-drop-horizontal{padding-right:var(--ag-cell-horizontal-padding)}.ag-column-drop-horizontal-list{gap:var(--ag-cell-widget-spacing)}.ag-column-drop-vertical-cell{margin-top:var(--ag-spacing)}:where(.ag-ltr) .ag-column-drop-vertical-icon{margin-right:var(--ag-widget-horizontal-spacing)}:where(.ag-rtl) .ag-column-drop-vertical-icon{margin-left:var(--ag-widget-horizontal-spacing)}.ag-select-agg-func-popup{background:var(--ag-background-color);border:solid var(--ag-border-width) var(--ag-border-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);height:calc(var(--ag-spacing)*5*3.5);padding:0;position:absolute}.ag-select-agg-func-virtual-list-item{cursor:default}:where(.ag-ltr) .ag-select-agg-func-virtual-list-item{padding-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-select-agg-func-virtual-list-item{padding-right:calc(var(--ag-spacing)*2)}.ag-select-agg-func-virtual-list-item:hover{background-color:var(--ag-selected-row-background-color)}:where(.ag-ltr) .ag-column-drop-horizontal-half-width:where(:not(:last-child)){border-right:solid var(--ag-border-width) var(--ag-border-color)}:where(.ag-rtl) .ag-column-drop-horizontal-half-width:where(:not(:last-child)){border-left:solid var(--ag-border-width) var(--ag-border-color)}";function nY(z,J,Q){if(z==null||J==null)return;z.splice(Q,0,...J)}var nT={tag:"div",cls:"ag-unselectable",role:"presentation"},rT=class extends y{constructor(z){super(nT);this.horizontal=z,this.state="notDragging",this.guiDestroyFunctions=[],this.childPillComponents=[],this.resizeEnabled=!1,this.addElementClasses(this.getGui()),this.ePillDropList=z0({tag:"div"}),this.addElementClasses(this.ePillDropList,"list"),this.registerCSS(dT)}toggleResizable(z){this.positionableFeature.setResizable(z?{bottom:!0}:!1),this.resizeEnabled=z}isSourceEventFromTarget(z){let{dropZoneTarget:J,dragSource:Q}=z;return J.contains(Q.eElement)}destroy(){this.destroyGui(),super.destroy()}destroyGui(){for(let z of this.guiDestroyFunctions)z();this.guiDestroyFunctions.length=0,this.childPillComponents.length=0,J0(this.getGui()),J0(this.ePillDropList)}init(z){this.params=z??{},this.createManagedBean(new $z(this.getFocusableElement(),{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.onKeyDown.bind(this)})),this.setupDropTarget(),this.positionableFeature=new s2(this.getGui()),this.createManagedBean(this.positionableFeature),this.refreshGui(),G0(this.ePillDropList,this.getAriaLabel())}onTabKeyDown(z){let J=O4(this.getFocusableElement(),null,!0),Q=J.length;if(Q===0)return;let{shiftKey:Z}=z,$=d(this.beans),X=$===J[0],Y=$===N(J);if(!(Q===1||X&&Z||Y&&!Z))J[Z?0:Q-1].focus()}onKeyDown(z){let{key:J}=z,Q=!this.horizontal,Z=J===R.DOWN,$=J===R.UP;if(!Q){let X=this.gos.get("enableRtl");Z=!X&&J===R.RIGHT||X&&J===R.LEFT,$=!X&&J===R.LEFT||X&&J===R.RIGHT}if(!Z&&!$)return;if(z.preventDefault(),z.shiftKey)this.moveFocusedItem($);else{let X=I0(this.beans,this.getFocusableElement(),!1,$);if(X)X.focus()}}moveFocusedItem(z){let J=this.getFocusedItem();if(J===-1)return;let Q=z?-1:1;if(!this.normalizeAndUpdateInsertIndex(J,J+Q))return;let $=this.childPillComponents[J];if(!$.isMovable())return;let X=$.getItem();this.focusItemAtIndex(this.insertIndex),this.rearrangeItems([X],!0)}addElementClasses(z,J){J=J?`-${J}`:"";let Q=this.horizontal?"horizontal":"vertical";z.classList.add(`ag-column-drop${J}`,`ag-column-drop-${Q}${J}`)}setupDropTarget(){this.dropTarget={getContainer:this.getGui.bind(this),getIconName:this.getIconName.bind(this),onDragging:this.onDragging.bind(this),onDragEnter:this.onDragEnter.bind(this),onDragLeave:this.onDragLeave.bind(this),onDragStop:this.onDragStop.bind(this),onDragCancel:this.onDragCancel.bind(this),isInterestedIn:this.isInterestedIn.bind(this)},this.beans.dragAndDrop?.addDropTarget(this.dropTarget)}minimumAllowedNewInsertIndex(){return 0}checkInsertIndex(z){let J=this.getNewInsertIndex(z);if(J<0)return!1;return this.normalizeAndUpdateInsertIndex(this.insertIndex,J)}normalizeAndUpdateInsertIndex(z,J){let Q=this.minimumAllowedNewInsertIndex(),Z=Math.max(Q,J),$=Z!==z;if($)this.insertIndex=Z;return $}getNewInsertIndex(z){let J=z.event,Q=this.horizontal?J.clientX:J.clientY,Z=this.childPillComponents.map((X)=>X.getGui().getBoundingClientRect()),$=Z.findIndex((X)=>this.horizontal?X.right>Q&&X.left<Q:X.top<Q&&X.bottom>Q);if($===-1){let X=this.gos.get("enableRtl");if(Z.every((_)=>Q>(this.horizontal?_.right:_.bottom)))return X&&this.horizontal?0:this.childPillComponents.length;if(Z.every((_)=>Q<(this.horizontal?_.left:_.top)))return X&&this.horizontal?this.childPillComponents.length:0;return this.insertIndex}if(this.insertIndex<=$)return $+1;return $}checkDragStartedBySelf(z){if(this.state!=="notDragging")return;this.state="rearrangeItems",this.potentialDndItems=this.getItems(z.dragSource.getDragItem()),this.refreshGui(),this.checkInsertIndex(z),this.refreshGui()}onDragging(z){if(this.checkDragStartedBySelf(z),this.checkInsertIndex(z))this.refreshGui()}handleDragEnterEnd(z){}onDragEnter(z){let J=this.getItems(z.dragSource.getDragItem());this.state="newItemsIn";let Q=J.filter(($)=>this.isItemDroppable($,z)),Z=Q.every(($)=>this.childPillComponents.map((X)=>X.getItem()).indexOf($)!==-1);if(Q.length===0)return;if(this.potentialDndItems=Q,Z){this.state="notDragging";return}this.handleDragEnterEnd(z),this.checkInsertIndex(z),this.refreshGui()}isPotentialDndItems(){return!!this.potentialDndItems?.length}handleDragLeaveEnd(z){}onDragLeave(z){if(this.state==="rearrangeItems"){let J=this.getItems(z.dragSource.getDragItem());this.removeItems(J)}if(this.isPotentialDndItems())this.handleDragLeaveEnd(z),this.potentialDndItems=[],this.refreshGui();this.state="notDragging"}onDragCancel(z){if(this.isPotentialDndItems()){if(this.state==="newItemsIn")this.handleDragLeaveEnd(z);this.potentialDndItems=[],this.refreshGui()}this.state="notDragging"}onDragStop(){if(this.isPotentialDndItems()){if(this.state==="newItemsIn")this.addItems(this.potentialDndItems);else this.rearrangeItems(this.potentialDndItems);this.potentialDndItems=[],this.refreshGui()}this.state="notDragging"}removeItems(z){let J=this.getExistingItems().filter((Q)=>!z.includes(Q));this.updateItems(J),this.refreshGui()}addItems(z){if(!z)return;let J=this.getExistingItems().slice(),Q=z.filter((Z)=>J.indexOf(Z)<0);nY(J,Q,this.insertIndex),this.updateItems(J),this.refreshGui()}addItem(z){this.insertIndex=this.getExistingItems().length,this.addItems([z])}rearrangeItems(z,J){let Q;if(!J)Q=this.getNonGhostItems().slice();else Q=this.getExistingItems().filter((Z)=>z.indexOf(Z)===-1);if(nY(Q,z,this.insertIndex),Z0(Q,this.getExistingItems()))return!1;return this.updateItems(Q),this.refreshGui(),!0}refreshGui(){let z=0;if(!this.horizontal)z=this.ePillDropList.scrollTop;let J=this.resizeEnabled,Q=this.getFocusedItem(),{eGridDiv:Z}=this.beans,$=l1(),X=null;if($)X=I0(this.beans,Z)??I0(this.beans,Z,!1,!0);if(this.toggleResizable(!1),this.destroyGui(),this.addIconAndTitleToGui(),this.addEmptyMessageToGui(),this.addItemsToGui(),z!==0)this.ePillDropList.scrollTop=z;if(J)this.toggleResizable(J);if($)this.restoreFocus(Q,X)}getFocusedItem(){let z=this.getGui(),J=d(this.beans);if(!z.contains(J))return-1;return Array.from(z.querySelectorAll(".ag-column-drop-cell")).indexOf(J)}focusItemAtIndex(z){let J=this.getGui(),Z=Array.from(J.querySelectorAll(".ag-column-drop-cell"))[z];if(!Z)return;Z.focus({preventScroll:!0})}restoreFocus(z,J){let Q=this.getGui(),Z=Array.from(Q.querySelectorAll(".ag-column-drop-cell"));if(z===-1)return;if(Z.length===0)J.focus();let $=Math.min(Z.length-1,z),X=Z[$];if(X)X.focus()}focusList(z){let J=z?this.childPillComponents.length-1:0;this.restoreFocus(J,this.getFocusableElement())}getNonGhostItems(){let z=this.getExistingItems();if(this.isPotentialDndItems())return z.filter((J)=>!this.potentialDndItems.includes(J));return z}addItemsToGui(){let J=this.getNonGhostItems().map((Q)=>this.createItemComponent(Q,!1));if(this.isPotentialDndItems()){let Q=this.potentialDndItems.map((Z)=>this.createItemComponent(Z,!0));if(this.insertIndex>=J.length)J.push(...Q);else J.splice(this.insertIndex,0,...Q)}this.appendChild(this.ePillDropList),J.forEach((Q,Z)=>{if(Z>0)this.addArrow(this.ePillDropList);this.ePillDropList.appendChild(Q.getGui())}),this.addAriaLabelsToComponents()}addAriaLabelsToComponents(){let{childPillComponents:z,ePillDropList:J}=this,Q=z.length;H0(J,Q===0?"presentation":"listbox");for(let Z=0;Z<Q;Z++){let X=z[Z].getGui();u2(X,Z+1),h2(X,Q)}}createItemComponent(z,J){let Q=this.createPillComponent(z,this.dropTarget,J,this.horizontal);if(Q.addEventListener("columnRemove",this.removeItems.bind(this,[z])),this.createBean(Q),this.guiDestroyFunctions.push(()=>this.destroyBean(Q)),!J)this.childPillComponents.push(Q);return Q}addIconAndTitleToGui(){let{title:z,icon:J}=this.params;if(!z||!J)return;let Q=z0({tag:"div"});if(HJ(Q,!0),this.addElementClasses(Q,"title-bar"),this.addElementClasses(J,"icon"),this.toggleCss("ag-column-drop-empty",this.isExistingItemsEmpty()),Q.appendChild(J),!this.horizontal){let Z=z0({tag:"span"});this.addElementClasses(Z,"title"),Z.textContent=z,Q.appendChild(Z)}this.appendChild(Q)}isExistingItemsEmpty(){return this.getExistingItems().length===0}addEmptyMessageToGui(){let{emptyMessage:z}=this.params;if(!z||!this.isExistingItemsEmpty()||this.isPotentialDndItems())return;let J=z0({tag:"span"});J.textContent=z,this.addElementClasses(J,"empty-message"),this.ePillDropList.appendChild(J)}addArrow(z){if(this.horizontal){let J=this.gos.get("enableRtl"),Q=h(J?"panelDelimiterRtl":"panelDelimiter",this.beans);this.addElementClasses(Q,"cell-separator"),z.appendChild(Q)}}},tT={tag:"span",role:"option",children:[{tag:"span",ref:"eDragHandle",cls:"ag-drag-handle ag-column-drop-cell-drag-handle",role:"presentation"},{tag:"span",ref:"eText",cls:"ag-column-drop-cell-text",attrs:{"aria-hidden":"true"}},{tag:"span",ref:"eButton",cls:"ag-column-drop-cell-button",role:"presentation"}]},sT=class extends y{constructor(z,J,Q,Z,$){super();this.dragSourceDropTarget=z,this.ghost=J,this.horizontal=Q,this.template=Z,this.agComponents=$,this.eText=P,this.eDragHandle=P,this.eButton=P}postConstruct(){this.setTemplate(this.template??tT,this.agComponents);let z=this.getGui(),{beans:J,eDragHandle:Q,eText:Z,eButton:$}=this;if(this.addElementClasses(z),this.addElementClasses(Q,"drag-handle"),this.addElementClasses(Z,"text"),this.addElementClasses($,"button"),Q.appendChild(h("columnDrag",J)),$.appendChild(h("cancel",J)),this.tooltipFeature=this.createOptionalManagedBean(J.registry.createDynamicBean("tooltipFeature",!1,{getGui:()=>this.getGui()})),this.setupComponents(),!this.ghost&&this.isDraggable())this.addDragSource();this.setupAria(),this.setupTooltip(),this.activateTabIndex(),this.refreshDraggable()}isDraggable(){return!0}refreshDraggable(){this.eDragHandle.classList.toggle("ag-column-select-column-readonly",!this.isDraggable())}setupAria(){let z=this.getLocaleTextFunc(),J=[this.getAriaDisplayName()];this.addAdditionalAriaInstructions(J,z),G0(this.getGui(),J.join(". "))}addAdditionalAriaInstructions(z,J){if(this.isRemovable()){let Q=J("ariaDropZoneColumnComponentDescription","Press DELETE to remove");z.push(Q)}}setupTooltip(){let z=()=>this.tooltipFeature?.setTooltipAndRefresh(this.getTooltip());z(),this.addManagedEventListeners({newColumnsLoaded:z})}getDragSourceId(){return}getDefaultIconName(){return"notAllowed"}addDragSource(){let{beans:{dragAndDrop:z},eDragHandle:J}=this,Q=this.createGetDragItem(),Z=this.getDefaultIconName(),$={type:this.getDragSourceType(),sourceId:this.getDragSourceId(),eElement:J,getDefaultIconName:()=>Z,getDragItem:Q,dragItemName:this.getDisplayName()};z?.addDragSource($,!0),this.addDestroyFunc(()=>z?.removeDragSource($))}setupComponents(){if(this.eText.textContent=this.getDisplayValue(),this.setupRemove(),this.ghost)this.addCss("ag-column-drop-cell-ghost")}isRemovable(){return!0}refreshRemove(){x(this.eButton,this.isRemovable())}setupRemove(){this.refreshRemove();let z={type:"columnRemove"};this.addGuiEventListener("keydown",(Q)=>this.onKeyDown(Q)),this.addManagedElementListeners(this.eButton,{click:(Q)=>{this.dispatchLocalEvent(z),Q.stopPropagation()}});let J=new p0(this.eButton);this.addManagedListeners(J,{tap:()=>this.dispatchLocalEvent(z)}),this.addDestroyFunc(J.destroy.bind(J))}onKeyDown(z){if(z.key===R.DELETE){if(this.isRemovable())z.preventDefault(),this.dispatchLocalEvent({type:"columnRemove"})}}getDisplayValue(){return this.getDisplayName()}addElementClasses(z,J){J=J?`-${J}`:"";let Q=this.horizontal?"horizontal":"vertical";z.classList.add(`ag-column-drop-cell${J}`,`ag-column-drop-${Q}-cell${J}`)}destroy(){super.destroy(),this.dragSourceDropTarget=null}},lT=class extends sT{constructor(z,J,Q,Z,$,X){super(J,Q,$);this.column=z,this.dropZonePurpose=Z,this.updateParams=X,this.eSortIndicator=P,this.popupShowing=!1,this.deferApply=i(X)}postConstruct(){let{sortSvc:z,colNames:J}=this.beans;if(this.template={tag:"span",role:"option",children:[{tag:"span",ref:"eDragHandle",cls:"ag-drag-handle ag-column-drop-cell-drag-handle",role:"presentation"},{tag:"span",ref:"eText",cls:"ag-column-drop-cell-text",attrs:{"aria-hidden":"true"}},z?{tag:"ag-sort-indicator",ref:"eSortIndicator"}:void 0,{tag:"span",ref:"eButton",cls:"ag-column-drop-cell-button",role:"presentation"}]},z)this.agComponents=[z.getSortIndicatorSelector()];if(this.displayName=J.getDisplayNameForColumn(this.column,"columnDrop"),super.postConstruct(),this.deferApply)this.eDragHandle.setAttribute("data-column-tool-panel-deferred","");if(z)this.setupSort(),this.addManagedEventListeners({sortChanged:()=>{this.setupAria()}});if(this.isGroupingZone())this.addManagedPropertyListener("groupLockGroupColumns",()=>{this.refreshRemove(),this.refreshDraggable(),this.setupAria()})}getItem(){return this.column}getDisplayName(){return this.displayName}getTooltip(){return this.column.getColDef().headerTooltip}addAdditionalAriaInstructions(z,J){let Q=this.gos.get("rowGroupPanelSuppressSort"),Z=this.gos.get("functionsReadOnly");if(this.isAggregationZone()&&!Z){let $=J("ariaDropZoneColumnValueItemDescription","Press ENTER to change the aggregation type");z.push($)}if(this.isGroupingZone()&&this.column.isSortable()&&!Q){let $=J("ariaDropZoneColumnGroupItemDescription","Press ENTER to sort");z.push($)}super.addAdditionalAriaInstructions(z,J)}isMovable(){return this.isDraggable()}isDraggable(){return this.isReadOnly()}isRemovable(){return this.isReadOnly()}isReadOnly(){return!this.isGroupingAndLocked()&&!this.gos.get("functionsReadOnly")}getAriaDisplayName(){let z=this.getLocaleTextFunc(),{name:J,aggFuncName:Q}=this.getColumnAndAggFuncName(),Z=z("ariaDropZoneColumnComponentAggFuncSeparator"," of "),$={asc:z("ariaDropZoneColumnComponentSortAscending","ascending"),desc:z("ariaDropZoneColumnComponentSortDescending","descending")},X=this.getCurrentSortDirection(this.column),Y=this.gos.get("rowGroupPanelSuppressSort");return[Q&&`${Q}${Z}`,J,this.isGroupingZone()&&!Y&&X&&`, ${$[X]}`].filter((U)=>!!U).join("")}getColumnAndAggFuncName(){let z=this.displayName,J="";if(this.isAggregationZone()){let Q=this.beans.columnStateUpdateStrategy.getColumnAggFunc(this.deferApply,this.column),Z=typeof Q==="string"?Q:"agg";J=this.getLocaleTextFunc()(Z,Z)}return{name:z,aggFuncName:J}}setupSort(){if(!this.column.isSortable()||!this.isGroupingZone())return;let{gos:z,column:J,eSortIndicator:Q}=this;if(!z.get("rowGroupPanelSuppressSort")){Q.setupSort(J,!0,this.getSortDefOverride.bind(this));let Z=($)=>{$.preventDefault(),this.beans.columnStateUpdateStrategy.progressSortFromEvent(this.deferApply,J,$),Q.refresh(),this.setupAria(),u0(this.beans,this.updateParams)};this.addGuiEventListener("click",Z),this.addGuiEventListener("keydown",($)=>{if($.key===R.ENTER&&this.isGroupingZone())Z($)})}}getCurrentSortDirection(z){return this.beans.columnStateUpdateStrategy.getSortDef(this.deferApply,z)?.direction??null}getSortDefOverride(){if(!this.deferApply)return;return this.beans.columnStateUpdateStrategy.getSortDef(this.deferApply,this.column)}getDefaultIconName(){return"hide"}createGetDragItem(){let{column:z}=this;return()=>{let J={};return J[z.getId()]=z.isVisible(),{columns:[z],visibleState:J}}}setupComponents(){if(super.setupComponents(),this.isAggregationZone()&&!this.gos.get("functionsReadOnly"))this.addGuiEventListener("click",this.onShowAggFuncSelection.bind(this))}onKeyDown(z){if(super.onKeyDown(z),z.key===R.ENTER&&this.isAggregationZone()&&!this.gos.get("functionsReadOnly"))z.preventDefault(),this.onShowAggFuncSelection()}getDisplayValue(){let{name:z,aggFuncName:J}=this.getColumnAndAggFuncName();return this.isAggregationZone()?`${J}(${z})`:z}onShowAggFuncSelection(){if(this.popupShowing)return;this.popupShowing=!0;let{aggFuncSvc:z,popupSvc:J}=this.beans,Q=new O7({cssIdentifier:"select-agg-func"}),Z=z.getFuncNames(this.column),$=this.getGui(),X=Q.getGui();Q.setModel({getRow:function(B){return Z[B]},getRowCount:function(){return Z.length}}),this.createBean(Q);let Y=z0({tag:"div",cls:"ag-select-agg-func-popup"});Y.style.top="0px",Y.style.left="0px",Y.appendChild(X),Y.style.width=`${$.clientWidth}px`;let[U]=this.addManagedElementListeners(Y,{focusout:(B)=>{if(!Y.contains(B.relatedTarget)&&G)G.hideFunc()}}),_=(B)=>{if(this.destroyBean(Q),this.popupShowing=!1,B?.key==="Escape")$.focus();if(U)U()},H=this.getLocaleTextFunc(),G=J.addPopup({modal:!0,eChild:Y,closeOnEsc:!0,closedCallback:_,ariaLabel:H("ariaLabelAggregationFunction","Aggregation Function")});if(G)Q.setComponentCreator(this.createAggSelect.bind(this,G.hideFunc));Q.addGuiEventListener("keydown",(B)=>{if(B.key===R.ENTER||B.key===R.SPACE){let E=Q.getLastFocusedRow();if(E==null)return;let K=Q.getComponentAt(E);if(K)K.selectItem()}}),J.positionPopupByComponent({type:"aggFuncSelect",eventSource:$,ePopup:Y,keepWithinBounds:!0,additionalParams:{column:this.column},position:"under"}),Q.refresh();let W=this.beans.columnStateUpdateStrategy.getColumnAggFunc(this.deferApply,this.column),q=Z.findIndex((B)=>B===W);if(q===-1)q=0;Q.focusRow(q)}createAggSelect(z,J){let Q=()=>{if(z(),this.getGui().focus(),this.beans.columnStateUpdateStrategy.setColumnAggFunc(this.deferApply,this.column,J,"toolPanelDragAndDrop"),this.column){let U=this.getGui().querySelector(".ag-column-drop-cell-text");if(U)U.textContent=this.getDisplayValue();this.setupAria()}u0(this.beans,this.updateParams)},Z=this.getLocaleTextFunc(),$=(J||"").toString(),X=Z($,$);return new aT(Q,X)}isGroupingAndLocked(){return this.isGroupingZone()&&W6(this.column,this.beans)}isAggregationZone(){return this.dropZonePurpose==="aggregation"}isGroupingZone(){return this.dropZonePurpose==="rowGroup"}getDragSourceType(){return K4.ToolPanel}destroy(){super.destroy(),this.column=null}},aT=class extends y{constructor(z,J){super({tag:"div",cls:"ag-select-agg-func-item",children:J});this.selectItem=z,this.addGuiEventListener("click",this.selectItem)}},I7=class extends rT{constructor(z,J,Q){super(z);this.dropZonePurpose=J,this.updateParams=Q,this.addElementClasses(this.getGui(),this.dropZonePurpose.toLowerCase())}init(z){super.init(z),this.addManagedEventListeners({newColumnsLoaded:this.refreshGui.bind(this)}),this.addManagedPropertyListeners(["functionsReadOnly","rowGroupPanelSuppressSort","groupLockGroupColumns"],this.refreshGui.bind(this))}getItems(z){return z.columns??[]}isInterestedIn(z,J){if(z===K4.HeaderCell)return!0;if(z!==K4.ToolPanel)return!1;if(!this.horizontal)return!0;return!J.hasAttribute("data-column-tool-panel-deferred")}minimumAllowedNewInsertIndex(){let{gos:z,rowGroupColsSvc:J}=this.beans,Q=z.get("groupLockGroupColumns"),Z=J?.columns.length??0;if(Q===-1)return Z;return Math.min(Q,Z)}showOrHideColumnOnExit(z){return this.isRowGroupPanel()&&MJ(this.gos,!0)&&!z.fromNudge}handleDragEnterEnd(z){if(this.showOrHideColumnOnExit(z)){let Z=z.dragSource.getDragItem().columns;this.setColumnsVisible(Z,!1,"uiColumnDragged")}}handleDragLeaveEnd(z){if(this.showOrHideColumnOnExit(z)){let Q=z.dragSource.getDragItem();this.setColumnsVisible(Q.columns,!0,"uiColumnDragged")}}setColumnsVisible(z,J,Q){if(!z)return;if(i(this.updateParams))return;let Z=z.filter(($)=>!$.getColDef().lockVisible);this.beans.columnStateUpdateStrategy.setColumnsVisible(!1,Z,J,Q)}isRowGroupPanel(){return this.dropZonePurpose==="rowGroup"}createPillComponent(z,J,Q,Z){return new lT(z,J,Q,this.dropZonePurpose,Z,this.updateParams)}},oT=class extends I7{constructor(z,J){super(z,"pivot",J)}postConstruct(){let z=this.getLocaleTextFunc(),J=z("pivotColumnsEmptyMessage","Drag here to set column labels"),Q=z("pivots","Column Labels");if(super.init({icon:h("pivotPanel",this.beans,null),emptyMessage:J,title:Q}),this.horizontal)vz(this.beans,this,this.getGui());this.addManagedEventListeners({newColumnsLoaded:this.refresh.bind(this),columnPivotChanged:this.refresh.bind(this),columnPivotModeChanged:this.checkVisibility.bind(this)}),this.refresh()}getAriaLabel(){return this.getLocaleTextFunc()("ariaPivotDropZonePanelLabel","Column Labels")}refresh(){this.checkVisibility(),this.refreshGui()}checkVisibility(){let z=this.beans.colModel,J=z.isPivotMode();if(this.horizontal)switch(this.gos.get("pivotPanelShow")){case"always":this.setDisplayed(J);break;case"onlyWhenPivoting":{let Q=z.isPivotActive();this.setDisplayed(J&&Q);break}default:this.setDisplayed(!1);break}else this.setDisplayed(this.beans.columnStateUpdateStrategy.getPivotMode(i(this.updateParams)))}isItemDroppable(z,J){if(this.gos.get("functionsReadOnly")||!z.isPrimary())return!1;let Q=this.beans.columnStateUpdateStrategy.getPivotColumns(i(this.updateParams)).includes(z);return z.isAllowPivot()&&(!Q||this.isSourceEventFromTarget(J))}updateItems(z){this.beans.columnStateUpdateStrategy.setPivotColumns(i(this.updateParams),z,"toolPanelUi"),u0(this.beans,this.updateParams)}getIconName(){return this.isPotentialDndItems()?"pivot":"notAllowed"}getExistingItems(){return this.beans.columnStateUpdateStrategy.getPivotColumns(i(this.updateParams))}getFocusableContainerName(){return"pivotToolbar"}},eT=class extends I7{constructor(z,J){super(z,"rowGroup",J)}postConstruct(){let z=this.getLocaleTextFunc(),J=z("rowGroupColumnsEmptyMessage","Drag here to set row groups"),Q=z("groups","Row Groups");if(super.init({icon:h("rowGroupPanel",this.beans,null),emptyMessage:J,title:Q}),this.horizontal)vz(this.beans,this,this.getGui());this.addManagedEventListeners({columnRowGroupChanged:this.refreshGui.bind(this)})}getAriaLabel(){return this.getLocaleTextFunc()("ariaRowGroupDropZonePanelLabel","Row Groups")}isItemDroppable(z,J){if(this.gos.get("functionsReadOnly")||!z.isPrimary()||z.colDef.showRowGroup)return!1;let Q=this.beans.columnStateUpdateStrategy.getRowGroupColumns(i(this.updateParams)).includes(z);return z.isAllowRowGroup()&&(!Q||this.isSourceEventFromTarget(J))}updateItems(z){this.beans.columnStateUpdateStrategy.setRowGroupColumns(i(this.updateParams),z,"toolPanelUi"),u0(this.beans,this.updateParams)}getIconName(){return this.isPotentialDndItems()?"group":"notAllowed"}getExistingItems(){return this.beans.columnStateUpdateStrategy.getRowGroupColumns(i(this.updateParams))}getFocusableContainerName(){return"rowGroupToolbar"}},zS=class extends I7{constructor(z,J){super(z,"aggregation",J)}postConstruct(){let z=this.getLocaleTextFunc(),J=z("valueColumnsEmptyMessage","Drag here to aggregate"),Q=z("values","Values");super.init({icon:h("valuePanel",this.beans,null),emptyMessage:J,title:Q}),this.addManagedEventListeners({columnValueChanged:this.refreshGui.bind(this)})}getAriaLabel(){return this.getLocaleTextFunc()("ariaValuesDropZonePanelLabel","Values")}getIconName(){return this.isPotentialDndItems()?"aggregate":"notAllowed"}isItemDroppable(z,J){if(this.gos.get("functionsReadOnly")||!z.isPrimary())return!1;let Q=this.beans.columnStateUpdateStrategy.getValueColumns(i(this.updateParams)).includes(z);return z.isAllowValue()&&(!Q||this.isSourceEventFromTarget(J))}updateItems(z){this.beans.columnStateUpdateStrategy.setValueColumns(i(this.updateParams),z,"toolPanelUi"),u0(this.beans,this.updateParams)}getExistingItems(){return this.beans.columnStateUpdateStrategy.getValueColumns(i(this.updateParams))}},JS={tag:"div",cls:"ag-pivot-mode-panel",children:[{tag:"ag-toggle-button",ref:"cbPivotMode",cls:"ag-pivot-mode-select"}]},QS=class extends y{constructor(z,J){super();this.params=z,this.onPivotModeValueChanged=J,this.cbPivotMode=P}getCurrentPivotMode(){return this.beans.columnStateUpdateStrategy.getPivotMode(i(this.params))}syncFromGrid(){this.cbPivotMode.setValue(this.getCurrentPivotMode())}refreshEditStrategy(){this.syncFromGrid()}postConstruct(){this.setTemplate(JS,[IY]);let z=this.cbPivotMode;z.setValue(this.getCurrentPivotMode());let J=this.getLocaleTextFunc();z.setLabel(J("pivotMode","Pivot Mode"));let Q=()=>{let $=!!z.getValue();this.beans.columnStateUpdateStrategy.setPivotMode(i(this.params),$,"toolPanelUi"),this.onPivotModeValueChanged?.()},Z=()=>{z.setValue(this.getCurrentPivotMode())};this.addManagedListeners(z,{fieldValueChanged:Q}),this.addManagedEventListeners({newColumnsLoaded:Z,columnPivotModeChanged:Z})}},ZS=class extends j{constructor(){super(...arguments);this.beanName="colToolPanelFactory"}setPanelVisible(z,J,Q){if(z)z.setDisplayed(J);else if(J)z=Q();return z}createRowGroupPanel(z,J,Q){return this.createPanel(z,J,new eT(!1,Q))}createValuesPanel(z,J,Q){return this.createPanel(z,J,new zS(!1,Q))}createPivotPanel(z,J,Q){return this.createPanel(z,J,new oT(!1,Q))}createPivotModePanel(z,J,Q,Z,$){return this.createPanel(z,J,new QS(Q,Z),$)}createPanel(z,J,Q,Z){if(Q=z.createBean(Q),J.push(()=>z.destroyBean(Q)),Z)z.prependChild(Q);else z.appendChild(Q);return Q}},rY=()=>{},$S=class extends j{constructor(){super(...arguments);this.beanName="columnStateUpdateExecutionStrategy"}applyColumnState(z,J,Q){this.getUpdateStrategy(z).applyColumnState(J,Q)}commit(z){this.getUpdateStrategy(z).commit()}hasPendingChanges(z){return this.getUpdateStrategy(z).hasPendingChanges()}moveColumns(z,J,Q,Z){this.getUpdateStrategy(z).moveColumns(J,Q,Z)}reset(z){this.getUpdateStrategy(z).reset()}setColumnsVisible(z,J,Q,Z){this.getUpdateStrategy(z).setColumnsVisible(J,Q,Z)}isColumnVisibleInToolPanel(z,J){return this.getUpdateStrategy(z).isColumnVisibleInToolPanel(J)}setRowGroupColumns(z,J,Q){this.getUpdateStrategy(z).setRowGroupColumns(J,Q)}getRowGroupColumns(z){return this.getUpdateStrategy(z).getRowGroupColumns()}getPrimaryColumns(z){return this.getUpdateStrategy(z).getPrimaryColumns()}hasDeferredColumnOrder(z){return this.getUpdateStrategy(z).hasDeferredColumnOrder()}setValueColumns(z,J,Q){this.getUpdateStrategy(z).setValueColumns(J,Q)}getValueColumns(z){return this.getUpdateStrategy(z).getValueColumns()}setColumnAggFunc(z,J,Q,Z){this.getUpdateStrategy(z).setColumnAggFunc(J,Q,Z)}getColumnAggFunc(z,J){return this.getUpdateStrategy(z).getColumnAggFunc(J)}setPivotColumns(z,J,Q){this.getUpdateStrategy(z).setPivotColumns(J,Q)}getPivotColumns(z){return this.getUpdateStrategy(z).getPivotColumns()}setPivotMode(z,J,Q){this.getUpdateStrategy(z).setPivotMode(J,Q)}getPivotMode(z){return this.getUpdateStrategy(z).getPivotMode()}isColumnSelectedInPivotModeToolPanel(z,J){return this.getUpdateStrategy(z).isColumnSelectedInPivotModeToolPanel(J)}progressSortFromEvent(z,J,Q){this.getUpdateStrategy(z).progressSortFromEvent(J,Q)}getSortDef(z,J){return this.getUpdateStrategy(z).getSortDef(J)}getUpdateStrategy(z){return z?this.getDeferredUpdateStrategy():this.getSyncUpdateStrategy()}getSyncUpdateStrategy(){return this.syncUpdateStrategy??(this.syncUpdateStrategy=new XS(this.beans))}getDeferredUpdateStrategy(){return this.deferredUpdateStrategy??(this.deferredUpdateStrategy=new YS(this.beans))}},XS=class{constructor(z){this.beans=z,this.lastPivotColIds=[],this.reset=rY,this.commit=rY,this.hasPendingChanges=()=>!1,this.hasDeferredColumnOrder=()=>!1}applyColumnState(z,J){if(z.length===0)return;o0(this.beans,{state:z},J)}moveColumns(z,J,Q){this.beans.colMoves?.moveColumns(z,J,Q),US(this.beans)}setColumnsVisible(z,J,Q){let Z=z.filter(($)=>!$.getColDef().lockVisible);this.beans.colModel.setColsVisible(Z,J,Q)}setRowGroupColumns(z,J){this.beans.rowGroupColsSvc?.setColumns(z,J)}getRowGroupColumns(){return this.beans.rowGroupColsSvc?.columns??[]}getPrimaryColumns(){return f7(this.beans)}setValueColumns(z,J){this.beans.valueColsSvc?.setColumns(z,J)}getValueColumns(){return this.beans.valueColsSvc?.columns??[]}setColumnAggFunc(z,J,Q){this.beans.valueColsSvc?.setColumnAggFunc?.(z,J,Q)}getColumnAggFunc(z){return z.getAggFunc()}setPivotColumns(z,J){this.lastPivotColIds=z.map((Q)=>Q.getColId()),this.beans.pivotColsSvc?.setColumns(z,J)}getPivotColumns(){return this.beans.pivotColsSvc?.columns??[]}setPivotMode(z,J){let{colModel:Q,gos:Z,ctrlsSvc:$}=this.beans;if(z===Q.isPivotMode())return;let X=this.beans.pivotColsSvc?.columns.map((Y)=>Y.getColId())??[];if(X.length>0)this.lastPivotColIds=X;if(!z){let Y=this.beans.colModel.getColDefCols()??[];o0(this.beans,{state:Y.map((U)=>({colId:U.getColId(),pivot:!1,pivotIndex:null}))},J)}if(Z.updateGridOptions({options:{pivotMode:z},source:J}),z&&this.lastPivotColIds.length>0)this.beans.pivotColsSvc?.setColumns(this.lastPivotColIds,J);for(let Y of $.getHeaderRowContainerCtrls())Y.refresh()}progressSortFromEvent(z,J){this.beans.sortSvc?.progressSortFromEvent(z,J)}isColumnVisibleInToolPanel(z){return z.isVisible()}isColumnSelectedInPivotModeToolPanel(z){return z.isAnyFunctionActive()}getPivotMode(){return this.beans.colModel.isPivotMode()}getSortDef(z){return z.getSortDef()}},YS=class{constructor(z){this.beans=z,this.state={},this.sequence=0,this.lastPivotColIds=[]}reset(){this.sequence=0,this.state={}}hasPendingChanges(){let{state:z,beans:J}=this,{columnState:Q,columnOrder:Z,rowGroup:$,aggregation:X,pivot:Y,pivotMode:U,sort:_,aggFuncs:H}=z,G=(W)=>(W??[]).map((q)=>q.getColId());if(Q)for(let[W,q]of Q.patches){let B=J.colModel.getColDefCol(W);if(!B)continue;if(q.hide!==void 0&&q.hide!==!B.isVisible()||q.rowGroup!==void 0&&!!q.rowGroup!==B.isRowGroupActive()||q.pivot!==void 0&&!!q.pivot!==B.isPivotActive()||q.aggFunc!==void 0&&(q.aggFunc??null)!==(B.getAggFunc()??null))return!0}if(Z&&!Z0(Z.colIds,_7(J)))return!0;if($&&!Z0($.colIds,G(J.rowGroupColsSvc?.columns)))return!0;if(X&&!Z0(X.colIds,G(J.valueColsSvc?.columns)))return!0;if(Y&&!Z0(Y.colIds,G(J.pivotColsSvc?.columns)))return!0;if(U&&U.pivotMode!==J.colModel.isPivotMode())return!0;if(_){for(let[W,q]of _.sortDefsByColId){let B=J.colModel.getColDefCol(W);if(!B)continue;if((q?.direction??null)!==(B.getSortDef()?.direction??null))return!0}if(_.baselineCleared){let W=f7(J);for(let q of W)if(!_.sortDefsByColId.has(q.getColId())&&q.getSortDef()!==null)return!0}}if(H)for(let[W,q]of H.values){let B=J.colModel.getColDefCol(W);if(!B)continue;if(q!==B.getAggFunc())return!0}return!1}commit(){let{beans:z,state:J}=this,Q=[];for(let $ of Object.keys(J)){let X=J[$];if(X)Q.push({type:$,...X})}let Z=Q.sort(($,X)=>$.seq-X.seq);for(let $ of Z)switch($.type){case"columnState":{o0(z,{state:[...$.patches.values()]},$.eventType);break}case"columnOrder":{let X=$.colIds.map((Y)=>z.colModel.getColDefCol(Y)).filter((Y)=>!!Y&&q6(Y));if(!z.colModel.isPivotMode())for(let Y=0;Y<X.length;Y++){let U=X[Y],_=z.colModel.getCols(),H=_.findIndex((W)=>q6(W)),G=(H>=0?H:0)+Y;if(_[G]!==U)z.colMoves?.moveColumns([U],G,$.eventType,!0)}nU(z,X);break}case"rowGroup":{z.rowGroupColsSvc?.setColumns($.colIds,$.eventType);break}case"aggregation":{z.valueColsSvc?.setColumns($.colIds,$.eventType);break}case"pivot":{this.lastPivotColIds=$.colIds,z.pivotColsSvc?.setColumns($.colIds,$.eventType);break}case"pivotMode":{let{colModel:X,ctrlsSvc:Y,gos:U,stateSvc:_}=z;if($.pivotMode!==X.isPivotMode()){let H=z.pivotColsSvc?.columns.map((q)=>q.getColId())??[];if(H.length>0)this.lastPivotColIds=H;let G=_?.getState().pivot?.pivotColIds??H,W=$.pivotMode?this.state.pivot?.colIds??this.lastPivotColIds:G;if(_?.setState({..._.getState(),pivot:{pivotMode:$.pivotMode,pivotColIds:W}},["pivot"]),!$.pivotMode){let q=z.colModel.getColDefCols()??[];o0(z,{state:q.map((B)=>({colId:B.getColId(),pivot:!1,pivotIndex:null}))},$.eventType)}if(U.updateGridOptions({options:{pivotMode:$.pivotMode},source:$.eventType}),$.pivotMode&&W.length>0)z.pivotColsSvc?.setColumns(W,$.eventType);for(let q of Y.getHeaderRowContainerCtrls())q.refresh()}break}case"sort":{let X=[],Y=0;for(let[U,_]of $.sortDefsByColId)X.push({colId:U,sort:_?.direction??null,sortIndex:_?.direction?Y++:null,sortType:_?.type??void 0});o0(z,{state:X,defaultState:$.baselineCleared?{sort:null,sortIndex:null,sortType:void 0}:void 0},$.eventType);break}case"aggFuncs":{for(let[X,Y]of $.values){let U=z.colModel.getColDefCol(X);if(!U)continue;z.valueColsSvc?.setColumnAggFunc?.(U,Y,$.eventType)}break}}this.reset()}applyColumnState(z,J){for(let Z of z)H7(this.state,Z);let Q=nJ(this.state);Q.seq=Uz(this.sequence),this.sequence=Q.seq,Q.eventType=J}moveColumns(z,J,Q){let Z=new Set(z.map((_)=>_.getColId())),X=(this.state.columnOrder?.colIds??_7(this.beans)).filter((_)=>!Z.has(_)),Y=z.map((_)=>_.getColId()),U=Uz(this.sequence);this.sequence=U,this.state.columnOrder={colIds:[...X.slice(0,J),...Y,...X.slice(J)],eventType:Q,seq:U}}setColumnsVisible(z,J,Q){for(let $ of z){if($.getColDef().lockVisible)continue;H7(this.state,{colId:$.getColId(),hide:!J})}let Z=nJ(this.state);Z.seq=Uz(this.sequence),this.sequence=Z.seq,Z.eventType=Q}setRowGroupColumns(z,J){G7(this.state,"rowGroup");let Q=Uz(this.sequence);this.sequence=Q,this.state.rowGroup={colIds:z.map((Z)=>Z.getColId()),eventType:J,seq:Q}}setValueColumns(z,J){G7(this.state,"aggFunc");let Q=new Set((this.beans.valueColsSvc?.columns??[]).map((X)=>X.getColId())),Z=tY(this.state);for(let X of z)if(!Q.has(X.getColId())&&!Z.values.has(X.getColId())){let Y=X.getAggFunc(),U=Y!=null?Y:this.beans.aggFuncSvc?.getDefaultAggFunc(X);if(U!=null)Z.values.set(X.getColId(),U)}let $=Uz(this.sequence);this.sequence=$,Z.seq=$,Z.eventType=J,this.state.aggregation={colIds:z.map((X)=>X.getColId()),eventType:J,seq:$}}setColumnAggFunc(z,J,Q){H7(this.state,{colId:z.getColId(),aggFunc:J});let Z=nJ(this.state);Z.seq=Uz(this.sequence),this.sequence=Z.seq,Z.eventType=Q;let $=tY(this.state);$.seq=Z.seq,$.eventType=Q,$.values.set(z.getColId(),J)}getColumnAggFunc(z){let J=z.getColId();if(this.state.aggFuncs?.values.has(J))return this.state.aggFuncs.values.get(J);return z.getAggFunc()}isColumnVisibleInToolPanel(z){let J=this.state.columnState?.patches.get(z.getColId());if(J?.hide!==void 0)return!J.hide;return z.isVisible()}isColumnSelectedInPivotModeToolPanel(z){let J=z.getColId(),Q=this.state.columnState?.patches.get(J),Z;if(Q?.rowGroup!==void 0)Z=!!Q.rowGroup;else if(this.state.rowGroup)Z=this.state.rowGroup.colIds.includes(J);else Z=z.isRowGroupActive();let $;if(Q?.pivot!==void 0)$=!!Q.pivot;else if(this.state.pivot)$=this.state.pivot.colIds.includes(J);else $=z.isPivotActive();let X;if(Q?.aggFunc!==void 0)X=Q.aggFunc!=null;else if(this.state.aggregation)X=this.state.aggregation.colIds.includes(J);else X=z.isValueActive();return Z||$||X}setPivotColumns(z,J){G7(this.state,"pivot");let Q=Uz(this.sequence);this.sequence=Q,this.state.pivot={colIds:z.map((Z)=>Z.getColId()),eventType:J,seq:Q}}setPivotMode(z,J){let Q=Uz(this.sequence);this.sequence=Q,this.state.pivotMode={pivotMode:z,eventType:J,seq:Q}}getRowGroupColumns(){return Z6(this.beans,U7(this.state.rowGroup?.colIds,this.beans.rowGroupColsSvc?.columns,this.state.columnState?.patches,(z)=>z.rowGroup==null?void 0:!!z.rowGroup))}getPrimaryColumns(){return Z6(this.beans,this.state.columnOrder?.colIds??_7(this.beans))}hasDeferredColumnOrder(){return!!this.state.columnOrder}getValueColumns(){return Z6(this.beans,U7(this.state.aggregation?.colIds,this.beans.valueColsSvc?.columns,this.state.columnState?.patches,(z)=>z.aggFunc===void 0?void 0:z.aggFunc!=null))}getPivotColumns(){if(!this.getPivotMode())return[];let z=this.beans.pivotColsSvc?.columns,J=z?.length?z:Z6(this.beans,this.lastPivotColIds);return Z6(this.beans,U7(this.state.pivot?.colIds,J,this.state.columnState?.patches,(Q)=>Q.pivot==null?void 0:!!Q.pivot))}getPivotMode(){return this.state.pivotMode?.pivotMode??this.beans.colModel.isPivotMode()}getSortDef(z){let J=this.state.sort,Q=z.getColId(),Z=J?.sortDefsByColId;if(Z?.has(Q))return Z.get(Q)??null;if(J?.baselineCleared)return null;return z.getSortDef()}progressSortFromEvent(z,J){let Q=this.state.sort??{sortDefsByColId:new Map,baselineCleared:!1,seq:0,eventType:"toolPanelUi"},{sortSvc:Z}=this.beans,$=z.getColId(),X;if(Q.sortDefsByColId.has($))X=Q.sortDefsByColId.get($);else if(Q.baselineCleared)X=null;else X=z.getSortDef();let Y=Z?.getNextSortDirection(z,X);if(!Y)return;let{gos:U}=this.beans;if(!(((U.get("multiSortKey")==="ctrl"?J.ctrlKey||J.metaKey:J.shiftKey)||U.get("alwaysMultiSort"))&&!U.get("suppressMultiSort")))Q.sortDefsByColId.clear(),Q.baselineCleared=!0;Q.sortDefsByColId.set($,Y.direction?Y:null),Q.seq=Uz(this.sequence),this.sequence=Q.seq,this.state.sort=Q}};function Z6(z,J){if(!J)return[];return J.map((Q)=>z.colModel.getColDefCol(Q)).filter((Q)=>!!Q)}function U7(z,J,Q,Z){let $=[...z??J?.map((Y)=>Y.getColId())??[]];if(!Q?.size)return $;let X=new Set($);for(let[Y,U]of Q){let _=Z(U);if(_===void 0)continue;if(_){if(!X.has(Y))$.push(Y),X.add(Y);continue}if(!X.has(Y))continue;X.delete(Y);let H=$.indexOf(Y);if(H>=0)$.splice(H,1)}return $}function US(z){let J=z.colModel.getCols().filter((Q)=>q6(Q)).map((Q)=>z.colModel.getColDefCol(Q.getColId())).filter((Q)=>!!Q);nU(z,J)}function nU(z,J){let Q=_S(z);if(!Q)return;let Z=new Set(J);Q.list=[...J,...Q.list.filter(($)=>q6($)&&!Z.has($))]}function _7(z){return f7(z).map((J)=>J.getColId())}function f7(z){return(z.colModel.getColDefCols()??z.colModel.getCols()).filter((J)=>q6(J))}function _S(z){let J=z.colModel.colDefCols,Q=J?.list;if(!Array.isArray(Q))return;return J}function q6(z){if(!z.isPrimary())return!1;return!U1(z)&&!d2(z)}function Uz(z){return z+1}function H7(z,J){let Q=nJ(z),Z=Q.patches.get(J.colId);Q.patches.set(J.colId,Z?{...Z,...J}:J)}function G7(z,J){let Q=z.columnState?.patches;if(!Q?.size)return;for(let[Z,$]of Q){if(!(J in $))continue;let X={...$};if(delete X[J],Object.keys(X).length===1){Q.delete(Z);continue}Q.set(Z,X)}}function nJ(z){let{columnState:J}=z;if(!J)J={patches:new Map,seq:0,eventType:"toolPanelUi"},z.columnState=J;return J}function tY(z){let{aggFuncs:J}=z;if(!J)J={values:new Map,seq:0,eventType:"toolPanelUi"},z.aggFuncs=J;return J}var HS=class extends j{constructor(){super(...arguments);this.beanName="columnStateUpdateStrategy"}applyColumnState(z,J,Q){this.delegate("applyColumnState",z,J,Q)}commit(z){this.delegate("commit",z)}hasPendingChanges(z){return this.delegate("hasPendingChanges",z)}moveColumns(z,J,Q,Z){this.delegate("moveColumns",z,J,Q,Z)}reset(z){this.delegate("reset",z)}setColumnsVisible(z,J,Q,Z){this.delegate("setColumnsVisible",z,J,Q,Z)}isColumnVisibleInToolPanel(z,J){return this.delegate("isColumnVisibleInToolPanel",z,J)}setRowGroupColumns(z,J,Q){this.delegate("setRowGroupColumns",z,J,Q)}getRowGroupColumns(z){return this.delegate("getRowGroupColumns",z)}getPrimaryColumns(z){return this.delegate("getPrimaryColumns",z)}hasDeferredColumnOrder(z){return this.delegate("hasDeferredColumnOrder",z)}setValueColumns(z,J,Q){this.delegate("setValueColumns",z,J,Q)}getValueColumns(z){return this.delegate("getValueColumns",z)}setColumnAggFunc(z,J,Q,Z){this.delegate("setColumnAggFunc",z,J,Q,Z)}getColumnAggFunc(z,J){return this.delegate("getColumnAggFunc",z,J)}setPivotColumns(z,J,Q){this.delegate("setPivotColumns",z,J,Q)}getPivotColumns(z){return this.delegate("getPivotColumns",z)}setPivotMode(z,J,Q){this.delegate("setPivotMode",z,J,Q)}getPivotMode(z){return this.delegate("getPivotMode",z)}isColumnSelectedInPivotModeToolPanel(z,J){return this.delegate("isColumnSelectedInPivotModeToolPanel",z,J)}progressSortFromEvent(z,J,Q){this.delegate("progressSortFromEvent",z,J,Q)}getSortDef(z,J){return this.delegate("getSortDef",z,J)}getUpdateStrategy(){return this.executionStrategy??(this.executionStrategy=this.createManagedBean(new $S))}delegate(z,...J){let Q=this.getUpdateStrategy();return Q[z].bind(Q)(...J)}},GS={moduleName:"SharedColumnStateUpdateStrategy",version:$0,beans:[HS],dependsOn:[N0]},rU={moduleName:"ColumnsToolPanel",version:$0,beans:[ZS],userComponents:{agColumnsToolPanel:iT},icons:{ensureColumnVisible:"column-arrow",columnsToolPanel:"columns",menuAddRowGroup:"group",menuRemoveRowGroup:"group",pivotPanel:"pivot",rowGroupPanel:"group",valuePanel:"aggregation",columnSelectClosed:"tree-closed",columnSelectOpen:"tree-open",columnSelectIndeterminate:"tree-indeterminate"},dependsOn:[N0,GS,P7,z6,e2,W1,T7]},WS=class extends j{constructor(){super(...arguments);this.beanName="chartMenuItemMapper"}getChartItems(z){let J=this.beans,Q=J.chartSvc,Z=z==="pivotChart";if(!Q)return null;let $=this.getLocaleTextFunc.bind(this),X=Z?new qS(J,Q,$):new BS(J,Q,$),Y=Q.isEnterprise(),U=X.getMenuItem();if(U?.subMenu&&!Y){let H=(G)=>({...G,subMenu:G.subMenu?.filter((W)=>!W._enterprise).map((W)=>H(W))});U=H(U)}let _=this.gos.get("chartToolPanelsDef")?.settingsPanel?.chartGroupsDef;if(_)U=this.filterAndOrderChartMenu(U,_,X.getConfigLookup());return this.cleanInternals(U)}cleanInternals(z){if(!z)return z;let J=(Q)=>{delete Q?._key,delete Q?._enterprise;for(let Z of Q?.subMenu??[])J(Z);return Q};return J(z)}buildLookup(z){let J={},Q=(Z)=>{if(J[Z._key]=Z,Z.subMenu)for(let $ of Z.subMenu)Q($)};return Q(z),J}filterAndOrderChartMenu(z,J,Q){let Z=this.buildLookup(z),$={...z,subMenu:[]};for(let X of Object.keys(J)){let Y=J[X],U=Q[X];if(U===null)continue;if(U==null){V(173,{group:X});continue}let _=Z[U._key];if(_)if(_.subMenu){let H=Y.map((G)=>{let W=U[G];if(W==null){V(174,{group:X,chartType:G});return}return Z[W]}).filter((G)=>G!==void 0);if(H.length>0)_.subMenu=H,$.subMenu?.push(_)}else $.subMenu?.push(_)}if($.subMenu?.length==0)return null;return $}},qS=class{constructor(z,J,Q){this.beans=z,this.chartSvc=J,this.getLocaleTextFunc=Q}getMenuItem(){let z=this.getLocaleTextFunc(),J=(Q,Z,$,X,Y=!1)=>{return{name:z(Q,Z+"‎"),action:()=>this.chartSvc.createPivotChart({chartType:$}),_key:X,_enterprise:Y}};return{name:z("pivotChart","Pivot Chart"),_key:"pivotChart",subMenu:[{_key:"pivotColumnChart",name:z("columnChart","Column"),subMenu:[J("groupedColumn","Grouped","groupedColumn","pivotGroupedColumn"),J("stackedColumn","Stacked","stackedColumn","pivotStackedColumn"),J("normalizedColumn","100% Stacked","normalizedColumn","pivotNormalizedColumn")]},{_key:"pivotBarChart",name:z("barChart","Bar"),subMenu:[J("groupedBar","Grouped","groupedBar","pivotGroupedBar"),J("stackedBar","Stacked","stackedBar","pivotStackedBar"),J("normalizedBar","100% Stacked","normalizedBar","pivotNormalizedBar")]},{_key:"pivotPieChart",name:z("pieChart","Pie"),subMenu:[J("pie","Pie","pie","pivotPie"),J("donut","Donut","donut","pivotDonut")]},{_key:"pivotLineChart",name:z("lineChart","Line"),subMenu:[J("lineChart","Line","line","pivotLineChart"),J("stackedLine","Stacked","stackedLine","pivotStackedLine"),J("normalizedLine","100% Stacked","normalizedLine","pivotNormalizedLine")]},{_key:"pivotAreaChart",name:z("areaChart","Area"),subMenu:[J("areaChart","Area","area","pivotArea"),J("stackedArea","Stacked","stackedArea","pivotStackedArea"),J("normalizedArea","100% Stacked","normalizedArea","pivotNormalizedArea")]},{_key:"pivotXYChart",name:z("xyChart","X Y (Scatter)"),subMenu:[J("scatter","Scatter","scatter","pivotScatter"),J("bubble","Bubble","bubble","pivotBubble")]},{_key:"pivotStatisticalChart",_enterprise:!1,name:z("statisticalChart","Statistical"),subMenu:[J("histogramChart","Histogram","histogram","pivotHistogram",!1)]},{_key:"pivotHierarchicalChart",_enterprise:!0,name:z("hierarchicalChart","Hierarchical"),subMenu:[J("treemapChart","Treemap","treemap","pivotTreemap",!0),J("sunburstChart","Sunburst","sunburst","pivotSunburst",!0)]},{_key:"pivotFunnel",name:z("funnel","Funnel"),subMenu:[J("funnel","Funnel","funnel","pivotFunnel"),J("coneFunnel","Cone Funnel","coneFunnel","pivotConeFunnel"),J("pyramid","Pyramid","pyramid","pivotPyramid")]},{_key:"pivotCombinationChart",name:z("combinationChart","Combination"),subMenu:[J("columnLineCombo","Column & Line","columnLineCombo","pivotColumnLineCombo"),J("AreaColumnCombo","Area & Column","areaColumnCombo","pivotAreaColumnCombo")]}],icon:h("chart",this.beans,void 0)}}getConfigLookup(){return{columnGroup:{_key:"pivotColumnChart",column:"pivotGroupedColumn",stackedColumn:"pivotStackedColumn",normalizedColumn:"pivotNormalizedColumn"},barGroup:{_key:"pivotBarChart",bar:"pivotGroupedBar",stackedBar:"pivotStackedBar",normalizedBar:"pivotNormalizedBar"},pieGroup:{_key:"pivotPieChart",pie:"pivotPie",donut:"pivotDonut",doughnut:"pivotDonut"},lineGroup:{_key:"pivotLineChart",line:"pivotLineChart",stackedLine:"pivotStackedLine",normalizedLine:"pivotNormalizedLine"},areaGroup:{_key:"pivotAreaChart",area:"pivotArea",stackedArea:"pivotStackedArea",normalizedArea:"pivotNormalizedArea"},scatterGroup:{_key:"pivotXYChart",bubble:"pivotBubble",scatter:"pivotScatter"},combinationGroup:{_key:"pivotCombinationChart",columnLineCombo:"pivotColumnLineCombo",areaColumnCombo:"pivotAreaColumnCombo",customCombo:null},hierarchicalGroup:{_key:"pivotHierarchicalChart",treemap:"pivotTreemap",sunburst:"pivotSunburst"},statisticalGroup:{_key:"pivotStatisticalChart",histogram:"pivotHistogram",rangeBar:null,rangeArea:null,boxPlot:null},funnelGroup:{_key:"pivotFunnel",funnel:"pivotFunnel",coneFunnel:"pivotConeFunnel",pyramid:"pivotPyramid"},polarGroup:null,specializedGroup:null}}},BS=class{constructor(z,J,Q){this.beans=z,this.chartSvc=J,this.getLocaleTextFunc=Q}getMenuItem(){let z=this.getLocaleTextFunc(),J=(Q,Z,$,X,Y=!1)=>{return{name:z(Q,Z),action:()=>this.chartSvc.createChartFromCurrentRange($),_key:X,_enterprise:Y}};return{name:z("chartRange","Chart Range"),_key:"chartRange",subMenu:[{name:z("columnChart","Column"),subMenu:[J("groupedColumn","Grouped","groupedColumn","rangeGroupedColumn"),J("stackedColumn","Stacked","stackedColumn","rangeStackedColumn"),J("normalizedColumn","100% Stacked","normalizedColumn","rangeNormalizedColumn")],_key:"rangeColumnChart"},{name:z("barChart","Bar"),subMenu:[J("groupedBar","Grouped","groupedBar","rangeGroupedBar"),J("stackedBar","Stacked","stackedBar","rangeStackedBar"),J("normalizedBar","100% Stacked","normalizedBar","rangeNormalizedBar")],_key:"rangeBarChart"},{name:z("pieChart","Pie"),subMenu:[J("pie","Pie","pie","rangePie"),J("donut","Donut","donut","rangeDonut")],_key:"rangePieChart"},{name:z("lineChart","Line"),subMenu:[J("lineChart","Line","line","rangeLineChart"),J("stackedLine","Stacked","stackedLine","rangeStackedLine"),J("normalizedLine","100% Stacked","normalizedLine","rangeNormalizedLine")],_key:"rangeLineChart"},{name:z("areaChart","Area"),subMenu:[J("areaChart","Area","area","rangeArea"),J("stackedArea","Stacked","stackedArea","rangeStackedArea"),J("normalizedArea","100% Stacked","normalizedArea","rangeNormalizedArea")],_key:"rangeAreaChart"},{name:z("xyChart","X Y (Scatter)"),subMenu:[J("scatter","Scatter","scatter","rangeScatter"),J("bubble","Bubble","bubble","rangeBubble")],_key:"rangeXYChart"},{name:z("polarChart","Polar"),subMenu:[J("radarLine","Radar Line","radarLine","rangeRadarLine"),J("radarArea","Radar Area","radarArea","rangeRadarArea"),J("nightingale","Nightingale","nightingale","rangeNightingale"),J("radialColumn","Radial Column","radialColumn","rangeRadialColumn"),J("radialBar","Radial Bar","radialBar","rangeRadialBar")],_key:"rangePolarChart",_enterprise:!0},{name:z("statisticalChart","Statistical"),subMenu:[J("boxPlot","Box Plot","boxPlot","rangeBoxPlot",!0),J("histogramChart","Histogram","histogram","rangeHistogram",!1),J("rangeBar","Range Bar","rangeBar","rangeRangeBar",!0),J("rangeArea","Range Area","rangeArea","rangeRangeArea",!0)],_key:"rangeStatisticalChart",_enterprise:!1},{name:z("hierarchicalChart","Hierarchical"),subMenu:[J("treemap","Treemap","treemap","rangeTreemap"),J("sunburst","Sunburst","sunburst","rangeSunburst")],_key:"rangeHierarchicalChart",_enterprise:!0},{name:z("specializedChart","Specialized"),subMenu:[J("heatmap","Heatmap","heatmap","rangeHeatmap"),J("waterfall","Waterfall","waterfall","rangeWaterfall")],_key:"rangeSpecializedChart",_enterprise:!0},{name:z("funnel","Funnel"),subMenu:[J("funnel","Funnel","funnel","rangeFunnel"),J("coneFunnel","Cone Funnel","coneFunnel","rangeConeFunnel"),J("pyramid","Pyramid","pyramid","rangePyramid")],_key:"rangeFunnel",_enterprise:!0},{name:z("combinationChart","Combination"),subMenu:[J("columnLineCombo","Column & Line","columnLineCombo","rangeColumnLineCombo"),J("AreaColumnCombo","Area & Column","areaColumnCombo","rangeAreaColumnCombo")],_key:"rangeCombinationChart"}],icon:h("chart",this.beans,void 0)}}getConfigLookup(){return{columnGroup:{_key:"rangeColumnChart",column:"rangeGroupedColumn",stackedColumn:"rangeStackedColumn",normalizedColumn:"rangeNormalizedColumn"},barGroup:{_key:"rangeBarChart",bar:"rangeGroupedBar",stackedBar:"rangeStackedBar",normalizedBar:"rangeNormalizedBar"},pieGroup:{_key:"rangePieChart",pie:"rangePie",donut:"rangeDonut",doughnut:"rangeDonut"},lineGroup:{_key:"rangeLineChart",line:"rangeLineChart",stackedLine:"rangeStackedLine",normalizedLine:"rangeNormalizedLine"},areaGroup:{_key:"rangeAreaChart",area:"rangeArea",stackedArea:"rangeStackedArea",normalizedArea:"rangeNormalizedArea"},scatterGroup:{_key:"rangeXYChart",bubble:"rangeBubble",scatter:"rangeScatter"},polarGroup:{_key:"rangePolarChart",radarLine:"rangeRadarLine",radarArea:"rangeRadarArea",nightingale:"rangeNightingale",radialColumn:"rangeRadialColumn",radialBar:"rangeRadialBar"},statisticalGroup:{_key:"rangeStatisticalChart",boxPlot:"rangeBoxPlot",histogram:"rangeHistogram",rangeBar:"rangeRangeBar",rangeArea:"rangeRangeArea"},hierarchicalGroup:{_key:"rangeHierarchicalChart",treemap:"rangeTreemap",sunburst:"rangeSunburst"},specializedGroup:{_key:"rangeSpecializedChart",heatmap:"rangeHeatmap",waterfall:"rangeWaterfall"},funnelGroup:{_key:"rangeFunnel",funnel:"rangeFunnel",coneFunnel:"rangeConeFunnel",pyramid:"rangePyramid"},combinationGroup:{_key:"rangeCombinationChart",columnLineCombo:"rangeColumnLineCombo",areaColumnCombo:"rangeAreaColumnCombo",customCombo:null}}}},ES=class extends j{constructor(){super(...arguments);this.beanName="colChooserFactory"}createColumnSelectPanel(z,J,Q,Z){let $=z.createManagedBean(new dU),X=Z??J?.getColDef().columnChooserParams??{},{contractColumnSelection:Y,suppressColumnExpandAll:U,suppressColumnFilter:_,suppressColumnSelectAll:H,suppressSyncLayoutWithGrid:G,columnLayout:W}=X;if($.init(!!Q,v(this.gos,{suppressColumnMove:!1,suppressValues:!1,suppressPivots:!1,suppressRowGroups:!1,suppressPivotMode:!1,contractColumnSelection:!!Y,suppressColumnExpandAll:!!U,suppressColumnFilter:!!_,suppressColumnSelectAll:!!H,suppressSyncLayoutWithGrid:!!W||!!G,onStateUpdated:()=>{}}),"columnMenu"),W)$.setColumnLayout(W);return $}showColumnChooser({column:z,chooserParams:J,eventSource:Q,headerPosition:Z}){this.hideActiveColumnChooser();let $=this.createColumnSelectPanel(this,z,!0,J),X=this.getLocaleTextFunc(),Y=this.beans,{visibleCols:U,focusSvc:_,menuUtils:H}=Y,G=U.allCols.indexOf(z),W=z?_.focusedHeader??Z??null:null;this.activeColumnChooserDialog=this.createBean(new yP({title:X("chooseColumns","Choose Columns"),component:$,width:300,height:300,resizable:!0,movable:!0,centered:!0,closable:!0,afterGuiAttached:()=>{I0(Y,$.getGui())?.focus({preventScroll:!0}),this.dispatchVisibleChangedEvent(!0,z)},closedCallback:(q)=>{let B=this.activeColumnChooser.getGui();if(this.destroyBean(this.activeColumnChooser),this.activeColumnChooser=void 0,this.activeColumnChooserDialog=void 0,this.dispatchVisibleChangedEvent(!1,z),z)H.restoreFocusOnClose({column:z,headerPosition:W,columnIndex:G,eventSource:Q},B,q,!0)},postProcessPopupParams:{type:"columnChooser",column:z,eventSource:Q}})),this.activeColumnChooser=$}hideActiveColumnChooser(){this.destroyBean(this.activeColumnChooserDialog)}dispatchVisibleChangedEvent(z,J){this.eventSvc.dispatchEvent({type:"columnMenuVisibleChanged",visible:z,switchingTab:!1,key:"columnChooser",column:J??null})}},KS={pinSubMenu:"PinnedColumn",pinLeft:"PinnedColumn",pinRight:"PinnedColumn",clearPinned:"PinnedColumn",pinRowSubMenu:"PinnedRow",pinBottom:"PinnedRow",pinTop:"PinnedRow",unpinRow:"PinnedRow",valueAggSubMenu:"SharedAggregation",autoSizeThis:"ColumnAutoSize",autoSizeAll:"ColumnAutoSize",rowGroup:"SharedRowGrouping",rowUnGroup:"SharedRowGrouping",resetColumns:"CommunityCore",expandAll:["ClientSideRowModelHierarchy","ServerSideRowModel"],contractAll:["ClientSideRowModelHierarchy","ServerSideRowModel"],copy:"Clipboard",copyWithHeaders:"Clipboard",copyWithGroupHeaders:"Clipboard",cut:"Clipboard",paste:"Clipboard",export:["CsvExport","ExcelExport"],csvExport:"CsvExport",excelExport:"ExcelExport",separator:"CommunityCore",pivotChart:"IntegratedCharts",chartRange:"IntegratedCharts",columnFilter:"ColumnFilter",columnChooser:"ColumnMenu",sortAscending:"Sort",sortDescending:"Sort",sortAbsoluteAscending:"Sort",sortAbsoluteDescending:"Sort",sortUnSort:"Sort"};function FS(z,J){let Q=KS[J];if(Q)z.assertModuleRegistered(Q,`menu item '${J}'`)}var B1="separator";function tU(z,J){if(!z)return;for(let Q=z.length-2;Q>=0;Q--){let Z=z[Q]===J,$=z[Q+1]===J;if(Z&&$)z.splice(Q+1,1)}}var LS={sortAscending:{fallback:"Sort Ascending",getSortDef:()=>({type:"default",direction:"asc"})},sortDescending:{fallback:"Sort Descending",getSortDef:()=>({type:"default",direction:"desc"})},sortAbsoluteAscending:{fallback:"Sort Absolute Ascending",getSortDef:()=>({type:"absolute",direction:"asc"})},sortAbsoluteDescending:{fallback:"Sort Absolute Descending",getSortDef:()=>({type:"absolute",direction:"desc"})},sortUnSort:{fallback:"Clear Sort",getSortDef:(z)=>({type:T4(z.getSortDef()?.type),direction:null})}},MS=class extends j{constructor(){super(...arguments);this.beanName="menuItemMapper"}mapWithStockItems(z,J,Q,Z,$){if(!z)return[];let X=[],Y=this.getLocaleTextFunc(),{beans:U,gos:_}=this,{pinnedCols:H,colAutosize:G,aggFuncSvc:W,rowGroupColsSvc:q,colNames:B,colModel:E,clipboardSvc:K,expansionSvc:F,focusSvc:L,csvCreator:M,excelCreator:D,menuSvc:A,colChooserFactory:O,sortSvc:T,chartMenuItemMapper:S,valueColsSvc:k,pinnedRowModel:C}=U,w=(m,g,e,t)=>{switch(FS(_,m),m){case"pinSubMenu":return H&&g?{name:Y("pinColumn","Pin Column"),icon:h("menuPin",U,null),subMenu:["clearPinned","pinLeft","pinRight"]}:null;case"pinLeft":return H&&g?{name:Y("pinLeft","Pin Left"),action:()=>H.setColsPinned([g],"left",t),checked:!!g&&g.isPinnedLeft()}:null;case"pinRight":return H&&g?{name:Y("pinRight","Pin Right"),action:()=>H.setColsPinned([g],"right",t),checked:!!g&&g.isPinnedRight()}:null;case"clearPinned":return H&&g?{name:Y("noPin","No Pin"),action:()=>H.setColsPinned([g],null,t),checked:!!g&&!g.isPinned()}:null;case"pinRowSubMenu":{let u=_.get("enableRowPinning"),Q0=[],s=Q?.rowPinned??Q?.pinnedSibling?.rowPinned;if(s)Q0.push("unpinRow");if(u&&u!=="bottom"&&s!="top")Q0.push("pinTop");if(u&&u!=="top"&&s!="bottom")Q0.push("pinBottom");return C?.isManual()?{name:Y("pinRow","Pin Row"),icon:h("rowPin",U,g),subMenu:Q0}:null}case"pinTop":return C?.isManual()?{name:Y("pinTop","Pin to Top"),icon:h("rowPinTop",U,g),action:({node:u,column:Q0})=>u&&C.pinRow(u,"top",Q0)}:null;case"pinBottom":return C?.isManual()?{name:Y("pinBottom","Pin to Bottom"),icon:h("rowPinBottom",U,g),action:({node:u,column:Q0})=>u&&C.pinRow(u,"bottom",Q0)}:null;case"unpinRow":return C?.isManual()?{name:Y("unpinRow","Unpin Row"),icon:h("rowUnpin",U,g),action:({node:u,column:Q0})=>u&&C.pinRow(u,null,Q0)}:null;case"valueAggSubMenu":if(W&&k&&(g?.isPrimary()||g?.getColDef().pivotValueColumn))return{name:Y("valueAggregation","Value Aggregation"),icon:h("menuValue",U,null),subMenu:DS(g,W,k,Y),disabled:_.get("functionsReadOnly")};else return null;case"autoSizeThis":return G?{name:Y("autosizeThisColumn","Autosize This Column"),action:()=>g&&G.autoSizeColumn(g,t,_.get("skipHeaderOnAutoSize"))}:null;case"autoSizeAll":return G?{name:Y("autosizeAllColumns","Autosize All Columns"),action:()=>G.autoSizeAllColumns({source:t,skipHeader:_.get("skipHeaderOnAutoSize")})}:null;case"rowGroup":return q?{name:H6(Y,"groupBy",B.getDisplayNameForColumn(g,"header")),disabled:_.get("functionsReadOnly")||g?.isRowGroupActive()||!g?.getColDef().enableRowGroup,action:()=>q.addColumns([g],t),icon:h("menuAddRowGroup",U,null)}:null;case"rowUnGroup":if(q&&_.isModuleRegistered("SharedRowGrouping")){let u=g?.getColDef().showRowGroup,Q0=_.get("groupLockGroupColumns"),s,f0,k0;if(u===!0)s=Y("ungroupAll","Un-Group All"),f0=_.get("functionsReadOnly")||Q0===-1||Q0>=(q.columns.length??0),k0=()=>q.setColumns(q.columns.slice(0,Q0),t);else if(typeof u==="string"){let V0=E.getColDefCol(u),pz=V0!=null?B.getDisplayNameForColumn(V0,"header"):u;s=H6(Y,"ungroupBy",pz),f0=_.get("functionsReadOnly")||W6(V0,U),k0=()=>{q.removeColumns([u],t)}}else s=H6(Y,"ungroupBy",B.getDisplayNameForColumn(g,"header")),f0=_.get("functionsReadOnly")||!g?.isRowGroupActive()||!g?.getColDef().enableRowGroup||W6(g,U),k0=()=>q.removeColumns([g],t);return{name:s,disabled:f0,action:k0,icon:h("menuRemoveRowGroup",U,null)}}else return null;case"resetColumns":return{name:Y("resetColumns","Reset Columns"),action:()=>JX(U,t)};case"expandAll":return F?{name:Y("expandAll","Expand All Row Groups"),action:()=>F.expandAll(!0)}:null;case"contractAll":return F?{name:Y("collapseAll","Collapse All Row Groups"),action:()=>F.expandAll(!1)}:null;case"copy":return K?{name:Y("copy","Copy"),shortcut:Y("ctrlC","Ctrl+C"),icon:h("clipboardCopy",U,null),action:()=>K.copyToClipboard()}:null;case"copyWithHeaders":return K?{name:Y("copyWithHeaders","Copy with Headers"),icon:h("clipboardCopy",U,null),action:()=>K.copyToClipboard({includeHeaders:!0})}:null;case"copyWithGroupHeaders":return K?{name:Y("copyWithGroupHeaders","Copy with Group Headers"),icon:h("clipboardCopy",U,null),action:()=>K.copyToClipboard({includeHeaders:!0,includeGroupHeaders:!0})}:null;case"cut":if(K){let u=L.getFocusedCell(),Q0=u?j0(U,u):null,s=Q0?u?.column.isCellEditable(Q0):!1;return{name:Y("cut","Cut"),shortcut:Y("ctrlX","Ctrl+X"),icon:h("clipboardCut",U,null),disabled:!s||_.get("suppressCutToClipboard"),action:()=>K.cutToClipboard(void 0,"contextMenu")}}else return null;case"paste":if(K){let u=_.get("suppressClipboardApi")||_.get("suppressClipboardPaste")||!g||!Q||!g.isCellEditable(Q)||g.isSuppressPaste(Q);return{name:Y("paste","Paste"),shortcut:Y("ctrlV","Ctrl+V"),icon:h("clipboardPaste",U,null),disabled:u,action:()=>K.pasteFromClipboard()}}else return null;case"export":{let u=[];if(!_.get("suppressCsvExport")&&M)u.push("csvExport");if(!_.get("suppressExcelExport")&&D)u.push("excelExport");return u.length?{name:Y("export","Export"),subMenu:u,icon:h("save",U,null)}:null}case"csvExport":return M?{name:Y("csvExport","CSV Export"),icon:h("csvExport",U,null),action:()=>M.exportDataAsCsv()}:null;case"excelExport":return D?{name:Y("excelExport","Excel Export"),icon:h("excelExport",U,null),action:()=>D.exportDataAsExcel()}:null;case"separator":return m;case"pivotChart":case"chartRange":return S.getChartItems(m);case"columnFilter":return A&&g?{name:Y("columnFilter","Column Filter"),icon:h("filter",U,null),action:()=>A.showFilterMenu({column:g,buttonElement:e(),containerType:"columnFilter",positionBy:"button"})}:null;case"columnChooser":{let u=L.focusedHeader;return O?{name:Y("columnChooser","Choose Columns"),icon:h("columns",U,null),action:()=>O.showColumnChooser({column:g,eventSource:e(),headerPosition:u})}:null}case"sortUnSort":case"sortAscending":case"sortDescending":case"sortAbsoluteAscending":case"sortAbsoluteDescending":{if(!T||!g)return null;let{fallback:u,getSortDef:Q0}=LS[m];return{name:Y(m,u),icon:h(m,U,null),action:()=>T.setSortForColumn(g,Q0(g),!1,t)}}default:return V(176,{key:m}),null}};for(let m of z){let g;if(typeof m==="string")g=w(m,J,Z,$);else g={...m};if(!g)continue;let e=g,{subMenu:t}=e;if(t&&t instanceof Array)e.subMenu=this.mapWithStockItems(t,J,Q,Z,$);if(g!=null)X.push(g)}return tU(X,B1),X}};function DS(z,J,Q,Z){let $;if(z.isPrimary())$=z;else{let Y=z.getColDef().pivotValueColumn;$=I(Y)?Y:void 0}let X=[];if($){let Y=$.isValueActive(),U=J.getFuncNames($);X.push({name:Z("noAggregation","None"),action:()=>{Q.removeColumns([$],"contextMenu"),Q.setColumnAggFunc($,void 0,"contextMenu")},checked:!Y});for(let _ of U)X.push({name:Z(_,J.getDefaultFuncLabel(_)),action:()=>{Q.setColumnAggFunc($,_,"contextMenu"),Q.addColumns([$],"contextMenu")},checked:Y&&$.getAggFunc()===_})}return X}var RS=class extends j{constructor(){super(...arguments);this.beanName="colMenuFactory"}createMenu(z,J,Q,Z){let $=z.createManagedBean(new cU(0,{column:Q??null,node:null,value:null})),X=this.beans.menuItemMapper.mapWithStockItems(J,Q??null,null,Z,"columnMenu");return $.addMenuItems(X),$}getMenuItems(z=null,J=null){let Q=this.getDefaultMenuOptions(z),Z,$=(z?.getColDef()??J?.getColGroupDef())?.mainMenuItems;if(Array.isArray($))Z=$;else if(typeof $==="function")Z=$(v(this.gos,{column:z,columnGroup:J,defaultItems:Q}));else{let X=this.gos.getCallback("getMainMenuItems");if(X)Z=X({column:z,columnGroup:J,defaultItems:Q});else Z=Q}return tU(Z,B1),Z}getDefaultMenuOptions(z){let J=[],{beans:Q,gos:Z}=this,{colChooserFactory:$,rowGroupColsSvc:X,colModel:Y,expansionSvc:U,sortSvc:_,menuSvc:H,pinnedCols:G,aggFuncSvc:W,colAutosize:q}=Q,B=F0(Z),E=()=>{if(!B&&$)J.push("columnChooser");J.push("resetColumns")};if(!z)return E(),J;let{colDef:K}=z,F=G&&!K.lockPinned,L=X?.columns.length??0,M=L>0,D=i4(Z),A=Z.get("treeData"),O=z.isPrimary(),T=!O||W&&z.isAllowValue()&&(M||D||A);if(_&&!B&&z.isSortable()){let{isDefaultSortAllowed:S,isAbsoluteSortAllowed:k,isAbsoluteSort:C,isDefaultSort:w,isAscending:m,isDescending:g,direction:e}=nZ(z,Q);if(S&&!(m&&w))J.push("sortAscending");if(S&&!(g&&w))J.push("sortDescending");if(k&&!(m&&C))J.push("sortAbsoluteAscending");if(k&&!(g&&C))J.push("sortAbsoluteDescending");if(e)J.push("sortUnSort");J.push(B1)}if(H?.isFilterMenuItemEnabled(z))J.push("columnFilter"),J.push(B1);if(F)J.push("pinSubMenu");if(T)J.push("valueAggSubMenu");if(F||T)J.push(B1);if(q){if(!K.suppressAutoSize)J.push("autoSizeThis");J.push("autoSizeAll"),J.push(B1)}if(X&&Z.isModuleRegistered("SharedRowGrouping")){let S=J.length;if(K.showRowGroup)J.push("rowUnGroup");else if(z.isAllowRowGroup()&&O)if(z.isRowGroupActive()){if(!W6(z,Q))J.push("rowUnGroup")}else J.push("rowGroup");if(J.length>S)J.push(B1)}if(E(),U&&(o(Z)||Z.get("ssrmExpandAllAffectsAllRows"))&&(A||L>(Y.isPivotMode()?1:0)))J.push("expandAll"),J.push("contractAll");return J}},sY="ag-context-menu-open",AS=class extends j{constructor(){super(...arguments);this.beanName="contextMenuSvc",this.focusedCell=null}postConstruct(){this.menu=this.createManagedBean(new OP({menuItemCallbacks:S7,getMenuItems:this.getMenuItems.bind(this),mapMenuItems:this.mapWithStockItems.bind(this),beforeMenuOpen:this.beforeMenuOpen.bind(this),onMenuOpen:this.onMenuOpen.bind(this),onMenuClose:this.onMenuClose.bind(this),afterMenuDestroyed:this.afterMenuDestroyed.bind(this),onVisibleChanged:this.dispatchVisibleChangedEvent.bind(this),shouldBlockMenuOpen:()=>!!this.beans.overlays?.exclusive}))}hideActiveMenu(){this.menu.hideActiveMenu()}getMenuItems(z,J){let{column:Q,node:Z,value:$}=z,X=[],{clipboardSvc:Y,chartSvc:U,csvCreator:_,excelCreator:H,colModel:G,rangeSvc:W,gos:q}=this.beans;if(I(Z)&&Y){if(Q){if(!q.get("suppressCutToClipboard"))X.push("cut");X.push("copy","copyWithHeaders","copyWithGroupHeaders","paste","separator")}}if(q.get("enableCharts")&&U){if(G.isPivotMode())X.push("pivotChart");if(W&&!W.isEmpty())X.push("chartRange")}if(I(Z)){let F=q.get("enableRowPinning"),L=q.get("isRowPinnable");if(F){let T=Z.level>-1&&Z.footer,S=Z.level===-1&&Z.footer,k=i4(q);if(S&&!(k==="pinnedBottom"||k==="pinnedTop")||!S&&!T){if(L?.(Z)??!0)X.push("pinRowSubMenu")}}let M=q.get("suppressExcelExport")||!H,D=q.get("suppressCsvExport")||!_;if(!zz()&&(!M||!D))X.push("export")}let B=X.length?X:void 0,E=Q?.getColDef().contextMenuItems;if(Array.isArray(E))return E;if(typeof E==="function")return E(v(q,{column:Q,node:Z,value:$,defaultItems:B,event:J}));return q.getCallback("getContextMenuItems")?.({column:Q,node:Z,value:$,defaultItems:B,event:J})??X}getContextMenuPosition(z,J){let Q=this.getRowCtrl(z),Z=this.getCellGui(Q,J);if(!Z)return{x:0,y:Q?.getRowYPosition()??0};let $=Z.getBoundingClientRect();return{x:$.x+$.width/2,y:$.y+$.height/2}}showContextMenu(z){let J=z.rowNode??null,Q=z.column??null,{anchorToElement:Z,value:$,source:X}=z;if(J&&Q&&$==null)$=this.beans.valueSvc.getValueForDisplay({column:Q,node:J,from:"edit"}).value;if(Z==null)Z=this.getContextMenuAnchorElement(J,Q);this.beans.menuUtils.onContextMenu({mouseEvent:z.mouseEvent??null,touchEvent:z.touchEvent??null,showMenuCallback:(Y)=>this.menu.showMenu({node:J,column:Q,value:$},Y,Z),source:X})}handleContextMenuMouseEvent(z,J,Q,Z){let $=Z?.rowNode??Q?.rowNode??null,X=Z?.column??Q?.findFullWidthInfoForEvent(z||J)?.column??null,{valueSvc:Y,ctrlsSvc:U}=this.beans,_=X?Y.getValue(X,$,"edit"):null,H=U.getGridBodyCtrl(),G=Z?Z.eGui:H.eGridBody;this.showContextMenu({mouseEvent:z,touchEvent:J,rowNode:$,column:X,value:_,anchorToElement:G,source:"ui"})}beforeMenuOpen(z){if(!z.column)this.beans.focusSvc.clearFocusedCell()}onMenuOpen(){let{ctrlsSvc:z,focusSvc:J}=this.beans;z.getGridBodyCtrl().eGridBody.classList.add(sY),this.focusedCell=J.getFocusedCell()}onMenuClose(){this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody.classList.remove(sY)}afterMenuDestroyed(){let{beans:z,focusedCell:J}=this;U5(z,J)}dispatchVisibleChangedEvent(z,J){this.eventSvc.dispatchEvent({type:"contextMenuVisibleChanged",visible:z,source:J})}getRowCtrl(z){let{rowIndex:J,rowPinned:Q}=z||{};if(J==null)return;return this.beans.rowRenderer.getRowByPosition({rowIndex:J,rowPinned:Q})||void 0}getCellGui(z,J){if(!z||!J)return;return z.getCellCtrl(J)?.eGui||void 0}getContextMenuAnchorElement(z,J){let Q=this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody,Z=this.getRowCtrl(z);if(!Z)return Q;let $=this.getCellGui(Z,J);if($)return $;if(Z.isFullWidth())return Z.getFullWidthElement();return Q}mapWithStockItems(z,J,Q){let{column:Z,node:$}=J;return this.beans.menuItemMapper.mapWithStockItems(z,Z,$,Q,"contextMenu")}},gz="filterMenuTab",hz="generalMenuTab",E1="columnsMenuTab",rJ=[hz,gz,E1],jS=class extends j{constructor(){super(...arguments);this.beanName="enterpriseMenuFactory"}hideActiveMenu(){this.destroyBean(this.activeMenu)}showMenuAfterMouseEvent(z,J,Q,Z,$){let{column:X,columnGroup:Y}=this.splitColumnOrGroup(z),U=$?"filterMenuTab":void 0;this.showMenu(X,Y,(_)=>{let H=_.getGui();if(this.beans.popupSvc.positionPopupUnderMouseEvent({type:Q,additionalParams:{column:X},mouseEvent:J,ePopup:H}),U)_.showTab?.(U);this.dispatchVisibleChangedEvent(!0,!1,X,Y,U)},Q,U,void 0,J.target,Z)}splitColumnOrGroup(z){let J=z&&H4(z);return{column:J?z:void 0,columnGroup:J?void 0:z}}showMenuAfterButtonClick(z,J,Q,Z,$){let X=-1,Y="left";if(this.gos.get("enableRtl"))X=1,Y="right";let U=$?"filterMenuTab":void 0,_=U?[U]:void 0,H=F0(this.gos),G=(H?9:4)*X,W=H?-23:4,{column:q,columnGroup:B}=this.splitColumnOrGroup(z);this.showMenu(q,B,(E)=>{let K=E.getGui();if(this.beans.popupSvc.positionPopupByComponent({type:Q,additionalParams:{column:q},eventSource:J,ePopup:K,alignSide:Y,nudgeX:G,nudgeY:W,position:"under",keepWithinBounds:!0}),U)E.showTab?.(U);this.dispatchVisibleChangedEvent(!0,!1,q,B,U)},Q,U,_,J,Z)}showMenu(z,J,Q,Z,$,X,Y,U){let _=this.getMenuParams(z,J,X,Y);if(!_)return;let{menu:H,eMenuGui:G,anchorToElement:W,restoreFocusParams:q}=_,B=[],{menuUtils:E,popupSvc:K}=this.beans;B.push((L)=>{let M=H.getGui();if(this.destroyBean(H),z)x2(z,!1,"contextMenu"),E.restoreFocusOnClose(q,M,L);U?.()});let F=this.getLocaleTextFunc();if(K.addPopup({modal:!0,eChild:G,closeOnEsc:!0,closedCallback:(L)=>{for(let M of B)M(L);this.dispatchVisibleChangedEvent(!1,!1,z,J,$)},afterGuiAttached:(L)=>H.afterGuiAttached(Object.assign({},{container:Z},L)),positionCallback:$?()=>Q(H):void 0,ariaLabel:F("ariaLabelColumnMenu","Column Menu")}),!$)H.showTabBasedOnPreviousSelection?.(),Q(H);if(pZ(this.gos)){let L=K.setPopupPositionRelatedToElement(G,W);if(L&&z)this.addStopAnchoring(L,z,B)}if(H.addEventListener("tabSelected",(L)=>{this.dispatchVisibleChangedEvent(!1,!0,z),this.lastSelectedTab=L.key,this.dispatchVisibleChangedEvent(!0,!0,z)}),z)x2(z,!0,"contextMenu");this.activeMenu=H,H.addEventListener("destroyed",()=>{if(this.activeMenu===H)this.activeMenu=null})}addStopAnchoring(z,J,Q){z.then((Z)=>{J.__addEventListener("leftChanged",Z),J.__addEventListener("visibleChanged",Z),Q.push(()=>{J.__removeEventListener("leftChanged",Z),J.__removeEventListener("visibleChanged",Z)})})}getMenuParams(z,J,Q,Z){let{focusSvc:$,visibleCols:X,ctrlsSvc:Y}=this.beans,U={column:z,headerPosition:$.focusedHeader,columnIndex:X.allCols.indexOf(z),eventSource:Z},_=this.createMenu(z,J,U,Q,Z);return _?{menu:_,eMenuGui:_.getGui(),anchorToElement:Z||Y.getGridBodyCtrl().eGridBody,restoreFocusParams:U}:void 0}createMenu(z,J,Q,Z,$){if(F0(this.gos))return this.createBean(new VS(z,Q,this.lastSelectedTab,Z,$));else{let X=this.beans.colMenuFactory.getMenuItems(z,J);return X.length?this.createBean(new OS(X,z,Q,$)):void 0}}dispatchVisibleChangedEvent(z,J,Q,Z,$){this.eventSvc.dispatchEvent({type:"columnMenuVisibleChanged",visible:z,switchingTab:J,key:this.lastSelectedTab??$??(F0(this.gos)?hz:"columnMenu"),column:Q??null,columnGroup:Z??null})}isMenuEnabled(z){if(!F0(this.gos))return!0;let J=!this.beans.filterManager?.isFilterAllowed(z),Q=z.getColDef().menuTabs??rJ;return(J&&Q.includes(gz)?Q.length-1:Q.length)>0}showMenuAfterContextMenuEvent(z,J,Q){this.beans.menuUtils.onContextMenu({mouseEvent:J,touchEvent:Q,source:"ui",showMenuCallback:(Z)=>{return this.showMenuAfterMouseEvent(z,Z,"columnMenu"),!0}})}},VS=class extends j{constructor(z,J,Q,Z,$){super();this.column=z,this.restoreFocusParams=J,this.initialSelection=Q,this.restrictTo=Z,this.sourceElement=$,this.tabFactories={},this.includeChecks={};let{tabFactories:X,includeChecks:Y}=this;X[hz]=this.createMainPanel.bind(this),X[gz]=this.createFilterPanel.bind(this),X[E1]=this.createColumnsPanel.bind(this),Y[hz]=()=>!0,Y[gz]=()=>z?!!this.beans.filterManager?.isFilterAllowed(z):!1,Y[E1]=()=>!0}postConstruct(){let z=this.getTabsToCreate().map((Q)=>this.createTab(Q)),J=new IP({items:z,cssClass:"ag-menu",onActiveItemClicked:this.onHidePopup.bind(this),onItemClicked:this.onTabItemClicked.bind(this)});this.tabbedLayout=this.createBean(J),this.mainMenuList?.setParentComponent(J),this.addDestroyFunc(()=>this.destroyBean(J))}getTabsToCreate(){if(this.restrictTo)return this.restrictTo;return(this.column?.getColDef().menuTabs??rJ).filter((z)=>this.isValidMenuTabItem(z)&&this.isNotSuppressed(z))}isValidMenuTabItem(z){let J=!0,Q=rJ;if(this.restrictTo!=null)J=this.restrictTo.indexOf(z)>-1,Q=this.restrictTo;if(J=J&&rJ.indexOf(z)>-1,!J)V(175,{menuTabName:z,itemsToConsider:Q});return J}isNotSuppressed(z){return this.includeChecks[z]()}createTab(z){return this.tabFactories[z]()}showTabBasedOnPreviousSelection(){this.showTab(this.initialSelection)}showTab(z){let{tabItemColumns:J,tabbedLayout:Q,tabItemFilter:Z,tabItemGeneral:$}=this;if(J&&z===E1)Q.showItem(J);else if(Z&&z===gz)Q.showItem(Z);else if($&&z===hz)Q.showItem($);else Q.showFirstItem()}onTabItemClicked(z){let J=null;switch(z.item){case this.tabItemColumns:J=E1;break;case this.tabItemFilter:J=gz;break;case this.tabItemGeneral:J=hz;break}if(J)this.activateTab(J)}activateTab(z){let J={type:"tabSelected",key:z};this.dispatchLocalEvent(J)}createMainPanel(){let{beans:z,column:J}=this,Q=z.colMenuFactory,Z=Q.createMenu(this,Q.getMenuItems(J),this.column,()=>this.sourceElement??this.getGui());this.mainMenuList=Z,Z.addEventListener("closeMenu",this.onHidePopup.bind(this));let $={title:h("legacyMenu",z,J),titleLabel:hz.replace("MenuTab",""),bodyPromise:b.resolve(Z.getGui()),name:hz};return this.tabItemGeneral=$,$}onHidePopup(z){this.beans.menuUtils.closePopupAndRestoreFocusOnSelect(this.hidePopupFunc,this.restoreFocusParams,z)}createFilterPanel(){let z=this.column?this.createBean(new h5(this.column,"COLUMN_MENU")):null;if(this.filterComp=z,!z?.hasFilter())r(119);let J=(Z)=>z?.afterGuiAttached(Z),Q=()=>z?.afterGuiDetached();return this.tabItemFilter={title:h("filterTab",this.beans,this.column),titleLabel:gz.replace("MenuTab",""),bodyPromise:b.resolve(z?.getGui()),afterAttachedCallback:J,afterDetachedCallback:Q,name:gz},this.tabItemFilter}createColumnsPanel(){let z=z0({tag:"div",cls:"ag-menu-column-select-wrapper"}),{beans:J,column:Q}=this,$=J.colChooserFactory.createColumnSelectPanel(this,Q).getGui();$.classList.add("ag-menu-column-select"),z.appendChild($);let X={title:h("columns",J,Q),titleLabel:E1.replace("MenuTab",""),bodyPromise:b.resolve(z),name:E1};return this.tabItemColumns=X,X}afterGuiAttached(z){let{container:J,hidePopup:Q}=z;if(this.tabbedLayout.setAfterAttachedParams({container:J,hidePopup:Q}),Q)this.hidePopupFunc=Q,this.addDestroyFunc(Q)}getGui(){return this.tabbedLayout.getGui()}destroy(){super.destroy(),this.destroyBean(this.filterComp)}},OS=class extends y{constructor(z,J,Q,Z){super({tag:"div",ref:"eColumnMenu",cls:"ag-menu ag-column-menu",role:"presentation"});this.menuItems=z,this.column=J,this.restoreFocusParams=Q,this.sourceElement=Z,this.eColumnMenu=P}postConstruct(){let z=this.beans.colMenuFactory.createMenu(this,this.menuItems,this.column,()=>this.sourceElement??this.getGui());this.mainMenuList=z,z.addEventListener("closeMenu",this.onHidePopup.bind(this)),this.eColumnMenu.appendChild(z.getGui())}onHidePopup(z){this.beans.menuUtils.closePopupAndRestoreFocusOnSelect(this.hidePopupFunc,this.restoreFocusParams,z)}afterGuiAttached({hidePopup:z}){if(z)this.hidePopupFunc=z,this.addDestroyFunc(z);E0(this.mainMenuList.getGui())}};function PS(z,J){let{contextMenuSvc:Q}=z;if(!Q)return;let{rowNode:Z,column:$,value:X,x:Y,y:U}=J||{},{x:_,y:H}=Q.getContextMenuPosition(Z,$);if(Y!=null)_=Y;if(U!=null)H=U;Q.showContextMenu({mouseEvent:new MouseEvent("mousedown",{clientX:_,clientY:H}),rowNode:Z,column:$,value:X,source:"api"})}function TS(z,J){z.colChooserFactory?.showColumnChooser({chooserParams:J})}function SS(z){z.colChooserFactory?.hideActiveColumnChooser()}var IS=class extends j{constructor(){super(...arguments);this.beanName="menuUtils"}restoreFocusOnClose(z,J,Q,Z){let{eventSource:$}=z,X=Q instanceof KeyboardEvent;if(!Z&&!X||!$)return;let Y=d(this.beans);if(!J.contains(Y)&&!Tz(this.beans))return;this.focusHeaderCell(z)}closePopupAndRestoreFocusOnSelect(z,J,Q){let Z;if(Q?.keyboardEvent)Z=Q.keyboardEvent;z(Z&&{keyboardEvent:Z});let $=this.beans,X=$.focusSvc,Y=X.getFocusedCell();if(Tz($))if(Y){let{rowIndex:U,rowPinned:_,column:H}=Y;X.setFocusedCell({rowIndex:U,column:H,rowPinned:_,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}else this.focusHeaderCell(J)}onContextMenu(z){let{mouseEvent:J,touchEvent:Q,showMenuCallback:Z,source:$}=z;if(!this.gos.get("allowContextMenuWithControlKey")){if(J&&(J.ctrlKey||J.metaKey))return}if(J)this.blockMiddleClickScrollsIfNeeded(J);if($==="ui"&&this.gos.get("suppressContextMenu"))return;let X=J??Q.touches[0];if(Z(X)){let Y=J??Q;if(Y?.cancelable)Y.preventDefault()}}async focusHeaderCell(z){let{column:J,columnIndex:Q,headerPosition:Z,eventSource:$}=z,{visibleCols:X,headerNavigation:Y,focusSvc:U}=this.beans,_=await X.allCols.some((H)=>H===J);if(!this.isAlive())return;if(J?.isAlive()&&_&&$&&B0($)){let H=jJ($);if(H)Y?.scrollToColumn(J),H.focus()}else if(Z&&Q!==-1){let H=X.allCols,G=H[Q]||N(H);if(G)U.focusHeaderPosition({headerPosition:{headerRowIndex:Z.headerRowIndex,column:G}})}}blockMiddleClickScrollsIfNeeded(z){if(this.gos.get("suppressMiddleClickScrolls")&&z.which===2)z.preventDefault()}},sU={moduleName:"MenuCore",version:$0,beans:[MS,WS,IS],icons:{chart:"chart",columns:"columns",loadingMenuItems:"loading",menuPin:"pin",menuValue:"aggregation",menuAddRowGroup:"group",menuRemoveRowGroup:"group",clipboardCopy:"copy",clipboardCut:"cut",clipboardPaste:"paste",save:"save",csvExport:"csv",excelExport:"excel",sortAscending:"asc",sortDescending:"desc",sortAbsoluteAscending:"aasc",sortAbsoluteDescending:"adesc",sortUnSort:"none"},dependsOn:[N0,W1,N5,T7]},lU={moduleName:"ColumnMenu",version:$0,beans:[jS,RS,ES],icons:{ensureColumnVisible:"column-arrow",legacyMenu:"menu",filterTab:"filter",columnSelectClosed:"tree-closed",columnSelectOpen:"tree-open",columnSelectIndeterminate:"tree-indeterminate"},apiFunctions:{showColumnChooser:TS,hideColumnChooser:SS},dependsOn:[sU,e2,z6]},aU={moduleName:"ContextMenu",version:$0,beans:[AS],apiFunctions:{showContextMenu:PS},dependsOn:[sU]};var F1="__AG_SELECT_ALL__",L1="__AG_ADD_SELECTION_TO_FILTER__",fS=class{constructor(z,J,Q,Z){this.valueSvc=z,this.getValueFormatter=J,this.formatter=Q,this.column=Z,this.displayedKeys=[]}updateDisplayedValuesToAllAvailable(z,J,Q){this.displayedKeys=Array.from(Q)}updateDisplayedValuesToMatchMiniFilter(z,J,Q,Z,$){this.displayedKeys=[];let X=this.getValueFormatter();for(let Y of Q)if(Y==null){if($)this.displayedKeys.push(Y)}else{let U=z(Y),_=this.valueSvc.formatValue(this.column,null,U,X,!1),H=this.formatter(_);if(Z(H))this.displayedKeys.push(Y)}}getDisplayedValueCount(){return this.displayedKeys.length}getDisplayedItem(z){return this.displayedKeys[z]}getSelectAllItem(){return F1}getAddSelectionToFilterItem(){return L1}getDisplayedKeys(){return this.displayedKeys}forEachDisplayedKey(z){this.displayedKeys.forEach(z)}someDisplayedKey(z){return this.displayedKeys.some(z)}hasGroups(){return!1}refresh(){}},kS={tag:"div",cls:"ag-set-filter-item",attrs:{"aria-hidden":"true"},children:[{tag:"span",cls:"ag-set-filter-group-icons",children:[{tag:"span",ref:"eGroupClosedIcon",cls:"ag-set-filter-group-closed-icon"},{tag:"span",ref:"eGroupOpenedIcon",cls:"ag-set-filter-group-opened-icon"},{tag:"span",ref:"eGroupIndeterminateIcon",cls:"ag-set-filter-group-indeterminate-icon"}]},{tag:"ag-checkbox",ref:"eCheckbox",cls:"ag-set-filter-item-checkbox"}]},CS={tag:"div",cls:"ag-set-filter-item",children:[{tag:"ag-checkbox",ref:"eCheckbox",cls:"ag-set-filter-item-checkbox"}]},vS=class extends y{constructor(z){super(z.isGroup?kS:CS,[F4]);this.eCheckbox=P,this.eGroupOpenedIcon=P,this.eGroupClosedIcon=P,this.eGroupIndeterminateIcon=P,this.formattedValue=null,this.focusWrapper=z.focusWrapper,this.value=z.value,this.params=z.params,this.translate=z.translate,this.valueFormatter=z.valueFormatter,this.item=z.item,this.isSelected=z.isSelected,this.isTree=z.isTree,this.depth=z.depth??0,this.isGroup=z.isGroup,this.groupsExist=z.groupsExist,this.isExpanded=z.isExpanded,this.hasIndeterminateExpandState=z.hasIndeterminateExpandState}postConstruct(){if(this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{getGui:()=>this.focusWrapper,getLocation:()=>"setFilterValue",shouldDisplayTooltip:()=>this.shouldDisplayTooltip?.()??!0,getAdditionalParams:()=>{let{colDef:z,column:J}=this.params,Q={colDef:z,column:J,valueFormatted:this.formattedValue??void 0};if(this.isTree)Q.level=this.depth;return Q}})),this.addDestroyFunc(()=>this.destroyCellRendererComponent?.()),this.render(),this.eCheckbox.setLabelEllipsis(!0).setValue(this.isSelected,!0).setDisabled(!!this.params.readOnly).getInputElement().setAttribute("tabindex","-1"),this.refreshVariableAriaLabels(),this.isTree){if(this.depth>0)this.addCss("ag-set-filter-indent-"+this.depth),this.getGui().style.setProperty("--ag-indentation-level",String(this.depth));if(this.isGroup)this.setupExpansion();else if(this.groupsExist)this.addCss("ag-set-filter-add-group-indent");_J(this.getAriaElement(),this.depth+1)}if(this.refreshAriaChecked(),this.params.readOnly)return;this.eCheckbox.onValueChange((z)=>this.onCheckboxChanged(!!z))}getFocusableElement(){return this.focusWrapper}setupExpansion(){let{eGroupClosedIcon:z,eGroupOpenedIcon:J,eGroupIndeterminateIcon:Q,hasIndeterminateExpandState:Z,beans:$}=this;z.appendChild(Nz("setFilterGroupClosed",$,null)),J.appendChild(Nz("setFilterGroupOpen",$,null));let X=this.onExpandOrContractClicked.bind(this);if(this.addManagedElementListeners(z,{click:X}),this.addManagedElementListeners(J,{click:X}),Z)Q.appendChild(Nz("setFilterGroupIndeterminate",$,null)),this.addManagedElementListeners(Q,{click:X});this.setExpandedIcons(),this.refreshAriaExpanded()}onExpandOrContractClicked(){this.setExpanded(!this.isExpanded)}setExpanded(z,J){if(this.isGroup&&z!==this.isExpanded){this.isExpanded=z;let Q={type:"expandedChanged",isExpanded:!!z,item:this.item};if(!J)this.dispatchLocalEvent(Q);this.setExpandedIcons(),this.refreshAriaExpanded()}}setExpandedIcons(){let{isExpanded:z,hasIndeterminateExpandState:J,eGroupClosedIcon:Q,eGroupOpenedIcon:Z,eGroupIndeterminateIcon:$}=this;if(x(Q,J?z===!1:!z),x(Z,z===!0),J)x($,z===void 0)}onCheckboxChanged(z){this.isSelected=z;let J={type:"selectionChanged",isSelected:z,item:this.item};this.dispatchLocalEvent(J),this.refreshVariableAriaLabels(),this.refreshAriaChecked()}toggleSelected(){if(this.params.readOnly)return;this.setSelected(!this.isSelected)}setSelected(z,J){this.isSelected=z,this.eCheckbox.setValue(z,J),this.refreshAriaChecked()}refreshVariableAriaLabels(){if(!this.isTree)return;let z=this.getLocaleTextFunc(),J=this.eCheckbox.getValue(),Q=J===void 0?z("ariaIndeterminate","indeterminate"):J?z("ariaVisible","visible"):z("ariaHidden","hidden"),Z=z("ariaToggleVisibility","Press SPACE to toggle visibility");ez(this.eCheckbox.getInputElement(),void 0),this.eCheckbox.setInputAriaLabel(`${Z} (${Q})`)}setupFixedAriaLabels(z){if(!this.isTree)return;let Q=this.getLocaleTextFunc()("ariaFilterValue","Filter Value"),Z=this.getAriaElement();G0(Z,`${z} ${Q}`),r1(Z,this.eCheckbox.getInputElement().id)}refreshAriaChecked(){let z=this.getAriaElement();WJ(z,this.eCheckbox.getValue())}refreshAriaExpanded(){S0(this.getAriaElement(),!!this.isExpanded)}refresh(z,J,Q){if(this.item=z,J!==this.isSelected)this.setSelected(J,!0);this.setExpanded(Q,!0);let{cellRendererComponent:Z,cellRendererParams:$,beans:X,params:Y}=this;if(this.valueFunction){let U=this.valueFunction();if(this.setTooltipAndCellRendererParams(U,U),!Z)this.renderCellWithoutCellRenderer()}if(Z){let U=Vz(X.userCompFactory,Y,$);if(!Z.refresh?.(U?.params??$)){let H=Z;this.renderCell(),this.destroyBean(H)}}}render(){let{params:{column:z}}=this,{value:J}=this,Q=null;if(typeof J==="function")this.valueFunction=J,Q=this.valueFunction(),J=Q;else if(this.isTree)Q=d0(J);else Q=this.getFormattedValue(z,J);this.formattedValue=Q,this.setTooltipAndCellRendererParams(J,Q),this.renderCell()}setTooltipAndCellRendererParams(z,J){let Q=this.gos;if(this.params.showTooltips&&(!i1(Q)||!this.params.cellRenderer)){let Z=J!=null?J:d0(z);this.shouldDisplayTooltip=e1(Q,()=>this.eCheckbox.getGui().querySelector(".ag-label")),this.tooltipFeature?.setTooltipAndRefresh(Z)}this.cellRendererParams=v(Q,{value:z,valueFormatted:J,colDef:this.params.colDef,column:this.params.column,setTooltip:(Z,$)=>{Q.assertModuleRegistered("Tooltip",3),this.shouldDisplayTooltip=$,this.tooltipFeature?.setTooltipAndRefresh(Z)}})}getFormattedValue(z,J){return this.beans.valueSvc.formatValue(z,null,J,this.valueFormatter,!1)}renderCell(){let J=Vz(this.beans.userCompFactory,this.params,this.cellRendererParams)?.newAgStackInstance();if(J==null){this.renderCellWithoutCellRenderer();return}J.then((Q)=>{if(Q)this.cellRendererComponent=Q,this.eCheckbox.setLabel(Q.getGui()),this.destroyCellRendererComponent=()=>this.destroyBean(Q)})}renderCellWithoutCellRenderer(){let{valueFormatted:z,value:J}=this.cellRendererParams,Q=(z==null?J:z)??this.translate("blanks");if(typeof Q!=="string")V(208),Q="";this.eCheckbox.setLabel(Q),this.setupFixedAriaLabels(Q)}getComponentHolder(){return this.params.column.getColDef()}},NS={loadingOoo:"Loading...",blanks:"(Blanks)",searchOoo:"Search...",selectAll:"(Select All)",selectAllSearchResults:"(Select All Search Results)",addCurrentSelectionToFilter:"Add current selection to filter",noMatches:"No matches.",ariaSearchFilterValues:"Search filter values",ariaFilterList:"Filter List",filterSummaryListInactive:"is (All)",filterSummaryListSeparator:", ",filterSummaryListShort:(z)=>`is (${z[0]})`,filterSummaryListLong:(z)=>`is (${z[0]}) and ${z[1]} more`};function D7(z,J,Q){let Z=z;if(!Z)return null;if(Z=Z.map(($)=>d0(U0($))),!J&&Q&&Z.some(($)=>$==null)){if(N(Z)==null)return null;return Z.filter(($)=>$!=null)}return Z}function l0(z,J,Q){return xZ(z,NS,J,Q)}function wS(z){if(z.excelMode==="windows"){if(!z.buttons)z.buttons=["apply","cancel"];if(z.closeOnApply==null)z.closeOnApply=!0}else if(z.excelMode==="mac"){if(!z.buttons)z.buttons=["reset"];if(z.applyMiniFilterWhileTyping==null)z.applyMiniFilterWhileTyping=!0;if(z.debounceMs==null)z.debounceMs=500}if(z.excelMode&&z.defaultToNothingSelected)z.defaultToNothingSelected=!1,V(207)}function yS(){return([z,J],[Q,Z])=>{if(J==null)return Z==null?0:-1;else if(Z==null)return 1;for(let $=0;$<J.length;$++){if($>=Z.length)return 1;let X=n1(J[$],Z[$]);if(X!==0)return X}return 0}}var lY=class{constructor(z,J,Q,Z){this.formatter=z,this.treeListPathGetter=J,this.treeListFormatter=Q,this.treeDataOrGrouping=Z,this.allDisplayedItemsTree=new Map,this.activeDisplayedItemsFlat=[],this.selectAllItem={depth:0,filterPasses:!0,available:!0,treeKey:F1,children:this.allDisplayedItemsTree,expanded:!0,key:F1,parentTreeKeys:[]},this.addSelectionToFilterItem={depth:0,filterPasses:!0,available:!0,treeKey:L1,expanded:!0,key:L1,parentTreeKeys:[]}}updateParams(z,J){this.treeListPathGetter=z,this.treeListFormatter=J}updateDisplayedValuesToAllAvailable(z,J,Q,Z){if(Z==="reload")this.generateItemTree(z,J,Q);else if(Z==="otherFilter")this.updateAvailable(Q),this.updateExpandAll();else if(Z==="miniFilter")this.resetFilter(),this.updateExpandAll();this.flattenItems()}updateDisplayedValuesToMatchMiniFilter(z,J,Q,Z,$,X){if(X==="reload")this.generateItemTree(z,J,Q);else if(X==="otherFilter")this.updateAvailable(Q);this.updateFilter(Z,$),this.updateExpandAll(),this.flattenItems()}generateItemTree(z,J,Q){let Z=new Map;this.allDisplayedItemsTree=Z;let $=!1,X=this.getTreeListPathGetter(z,Q);for(let Y of J){let U=z(Y),_=X(U)??[null],H=_.length;if(H>1)$=!0;let G=Q.has(Y),W=Z,q,B=[];for(let E=0;E<H;E++){let K=_[E];if(!W)W=new Map,q.children=W;let F=K?.toUpperCase()??null;if(q=W.get(F),!q){if(q={treeKey:K,depth:E,filterPasses:!0,expanded:!1,available:G,parentTreeKeys:B},E===_.length-1)q.key=Y;W.set(F,q)}W=q.children,B=[...B,K]}}this.groupsExist=$,this.updateAvailable(Q),this.selectAllItem.children=Z,this.selectAllItem.expanded=!1}getTreeListPathGetter(z,J){if(this.treeListPathGetter)return this.treeListPathGetter;if(this.treeDataOrGrouping)return(Z)=>Z;let Q=!1;for(let Z of J){let $=z(Z);if($ instanceof Date){Q=!0;break}else if($!=null)break}if(Q)return(Z)=>Lz(Z,!1);return V(211),(Z)=>[String(Z)]}flattenItems(){this.activeDisplayedItemsFlat=[];let z=(J)=>{for(let Q of J.values()){if(!Q.filterPasses||!Q.available)continue;if(this.activeDisplayedItemsFlat.push(Q),Q.children&&Q.expanded)z(Q.children)}};z(this.allDisplayedItemsTree)}resetFilter(){let z=(J)=>{let Q=J.children;if(Q)for(let Z of Q.values())z(Z);J.filterPasses=!0};for(let J of this.allDisplayedItemsTree.values())z(J)}updateFilter(z,J){let Q=(Z)=>{if(!Z.available)return!1;if(Z.treeKey==null)return J;return z(this.formatter(this.treeListFormatter?this.treeListFormatter(Z.treeKey,Z.depth,Z.parentTreeKeys):Z.treeKey))};for(let Z of this.allDisplayedItemsTree.values())this.recursiveItemCheck(Z,!1,Q,"filterPasses")}getDisplayedValueCount(){return this.activeDisplayedItemsFlat.length}getDisplayedItem(z){return this.activeDisplayedItemsFlat[z]}getSelectAllItem(){return this.selectAllItem}getAddSelectionToFilterItem(){return this.addSelectionToFilterItem}getDisplayedKeys(){let z=[];return this.forEachDisplayedKey((J)=>z.push(J)),z}forEachDisplayedKey(z){let J=(Q,Z)=>{let $=Q.children;if($){if(!Q.expanded||!Z){for(let X of $.values())if(X.filterPasses)J(X,!1)}}else z(Q.key)};for(let Q of this.activeDisplayedItemsFlat)J(Q,!0)}someDisplayedKey(z){let J=(Q,Z)=>{let $=Q.children;if($){if(!Q.expanded||!Z){for(let X of $.values())if(X.filterPasses&&J(X,!1))return!0;return!1}}else return z(Q.key);return!1};return this.activeDisplayedItemsFlat.some((Q)=>J(Q,!0))}hasGroups(){return this.groupsExist}refresh(){this.updateExpandAll(),this.flattenItems()}updateExpandAll(){let z=(Q,Z,$)=>{for(let X of Q.values()){if(!X.filterPasses||!X.available||!X.children)continue;if(Z=Z||!!X.expanded,$=$||!X.expanded,Z&&$)return;let Y=z(X.children,Z,$);if(Y===void 0)return;else if(Y)Z=!0;else $=!0}return Z&&$?void 0:Z},J=this.getSelectAllItem();J.expanded=z(J.children,!1,!1)}recursiveItemCheck(z,J,Q,Z){let $=!1,X=z.children;if(X)for(let U of X.values()){let _=this.recursiveItemCheck(U,J||Q(z),Q,Z);$=$||_}let Y=J||$||Q(z);return z[Z]=Y,Y}updateAvailable(z){let J=(Q)=>z.has(Q.key);for(let Q of this.allDisplayedItemsTree.values())this.recursiveItemCheck(Q,!1,J,"available")}},oU=class extends _1{constructor(){super("setFilter","set-filter");this.filterType="set",this.eMiniFilter=P,this.eFilterLoading=P,this.eFilterLoadingIcon=P,this.eSetFilterList=P,this.eFilterNoMatches=P,this.hardRefreshVirtualList=!1,this.miniFilterText=null,this.addCurrentSelectionToFilter=!1,this.selectedKeys=new Set}setParams(z){super.setParams(z);let J=this.updateHandler(z.getHandler()),{column:Q,textFormatter:Z,treeList:$,treeListPathGetter:X,treeListFormatter:Y}=z;if(this.formatter=Z??((U)=>U??null),this.displayValueModel=$?new lY(this.formatter,X,Y,J.isTreeDataOrGrouping()):new fS(this.beans.valueSvc,()=>this.handler.valueFormatter,this.formatter,Q),J.valueModel.allKeys.then((U)=>{if(!this.isAlive())return;this.updateDisplayedValues("reload",U??[]),this.resetSelectionState(U??[])}),J.valueModel.isLoading())this.setIsLoading(!0);this.initialiseFilterBodyUi()}refresh(z){if(this.params.treeList!==z.treeList)return!1;return this.updateHandler(z.getHandler()),super.refresh(z)}updateParams(z,J){if(super.updateParams(z,J),this.updateMiniFilter(),z.suppressSelectAll!==J.suppressSelectAll)this.createVirtualListModel(z);let{textFormatter:Q,treeListPathGetter:Z,treeListFormatter:$}=z;if(this.formatter=Q??((X)=>X??null),this.displayValueModel instanceof lY)this.displayValueModel.updateParams(Z,$);this.handler.refreshFilterValues(!0)}updateHandler(z){if(this.handler!==z){for(let Q of this.handlerDestroyFuncs??[])Q();this.handlerDestroyFuncs=[...this.addManagedListeners(z,{anyFilterChanged:(Q)=>{z.valueModel.allKeys.then((Z)=>{if(this.isAlive()){if(this.updateDisplayedValues("otherFilter",Z??[]),Q.updated)this.checkAndRefreshVirtualList(),this.showOrHideResults()}})},dataChanged:({hardRefresh:Q})=>{z.valueModel.allKeys.then((Z)=>{if(this.isAlive()){if(this.updateDisplayedValues("reload",Z??[]),this.setSelectedModel(this.state.model?.values??null),Q)this.hardRefreshVirtualList=!0;this.checkAndRefreshVirtualList()}})}}),...this.addManagedListeners(z.valueModel,{loadingStart:()=>this.setIsLoading(!0),loadingEnd:()=>this.setIsLoading(!1)})],this.handler=z}return z}updateUiVisibility(){}createBodyTemplate(){return{tag:"div",cls:"ag-set-filter",children:[{tag:"div",ref:"eFilterLoading",cls:"ag-filter-loading ag-loading ag-hidden",children:[{tag:"span",ref:"eFilterLoadingIcon",cls:"ag-loading-icon"},{tag:"span",cls:"ag-loading-text",children:l0(this,"loadingOoo")}]},{tag:"ag-input-text-field",ref:"eMiniFilter",cls:"ag-mini-filter"},{tag:"div",ref:"eFilterNoMatches",cls:"ag-filter-no-matches ag-hidden",children:l0(this,"noMatches")},{tag:"div",ref:"eSetFilterList",cls:"ag-set-filter-list",role:"presentation"}]}}getAgComponents(){return[Yz]}handleKeyDown(z){if(super.handleKeyDown(z),z.defaultPrevented)return;let J=()=>{if(!this.eSetFilterList.contains(d(this.beans)))return;let Q=this.virtualList.getLastFocusedRow();if(Q==null)return;let Z=this.virtualList.getComponentAt(Q);if(Z==null)return;z.preventDefault();let{readOnly:$}=this.params;if($)return;return Z};switch(z.key){case R.SPACE:J()?.toggleSelected();break;case R.ENTER:this.handleKeyEnter(z);break;case R.LEFT:J()?.setExpanded(!1);break;case R.RIGHT:J()?.setExpanded(!0);break}}handleKeyEnter(z){z.preventDefault();let{excelMode:J,readOnly:Q}=this.params;if(!J||!!Q)return;if(this.params.onAction("apply",void 0,z),this.params.excelMode==="mac")this.eMiniFilter.getInputElement().select()}setModelAndRefresh(z){return this.setSelectedModel(z).then(()=>{if(this.isAlive())this.checkAndRefreshVirtualList()})}setModelIntoUi(z){this.setMiniFilter(this.params.state.state?.miniFilterValue??null,!0);let J=z==null?null:z.values;return this.setModelAndRefresh(J)}getModelFromUi(){let z=this.getSelectedModel();if(!z)return null;return{values:z,filterType:this.filterType}}areNonNullModelsEqual(z,J){return Z0(z.values,J.values)}setIsLoading(z){if(x(this.eFilterLoading,z),!z)this.hardRefreshVirtualList=!0}initialiseFilterBodyUi(){this.initVirtualList(),this.initMiniFilter(),this.initLoading()}initLoading(){let z=h("setFilterLoading",this.beans,this.params.column);if(z)this.eFilterLoadingIcon.appendChild(z)}initVirtualList(){let z=l0(this,"ariaFilterList"),J=!!this.params.treeList,Q=this.virtualList=this.createBean(new O7({cssIdentifier:"filter",ariaRole:J?"tree":"listbox",listName:z})),Z=this.eSetFilterList;if(J)Z.classList.add("ag-set-filter-tree-list");Z.appendChild(Q.getGui());let{cellHeight:$}=this.params;if($!=null)Q.setRowHeight($);let X=(U,_)=>this.createSetListItem(U,J,_);Q.setComponentCreator(X);let Y=(U,_)=>this.updateSetListItem(U,_);Q.setComponentUpdater(Y),this.createVirtualListModel(this.params)}createVirtualListModel(z){let J;if(z.suppressSelectAll)J=new xS(this.displayValueModel);else J=new bS(this.displayValueModel,this.showAddCurrentSelectionToFilter.bind(this));if(z.treeList)J=new gS(J);this.virtualList.setModel(J)}getSelectAllLabel(){let z=this.miniFilterText==null||!this.params.excelMode?"selectAll":"selectAllSearchResults";return l0(this,z)}getAddSelectionToFilterLabel(){return l0(this,"addCurrentSelectionToFilter")}createSetListItem(z,J,Q){let Z=this.displayValueModel.hasGroups(),{isSelected:$,isExpanded:X}=this.isSelectedExpanded(z),{value:Y,depth:U,isGroup:_,hasIndeterminateExpandState:H,selectedListener:G,expandedListener:W}=this.newSetListItemAttributes(z),q={focusWrapper:Q,value:Y,params:this.params,translate:(E)=>l0(this,E),valueFormatter:this.handler.valueFormatter,item:z,isSelected:$,isTree:J,depth:U,groupsExist:Z,isGroup:_,isExpanded:X,hasIndeterminateExpandState:H},B=this.createBean(new vS(q));if(B.addEventListener("selectionChanged",G),W)B.addEventListener("expandedChanged",W);return B}newSetTreeItemAttributes(z){let J=this.displayValueModel.hasGroups();if(z.key===F1)return{value:()=>this.getSelectAllLabel(),isGroup:J,depth:z.depth,hasIndeterminateExpandState:!0,selectedListener:(Q)=>this.onSelectAll(Q.isSelected),expandedListener:(Q)=>this.onExpandAll(Q.item,Q.isExpanded)};if(z.key===L1)return{value:()=>this.getAddSelectionToFilterLabel(),depth:z.depth,isGroup:!1,hasIndeterminateExpandState:!1,selectedListener:(Q)=>{this.addCurrentSelectionToFilter=Q.isSelected,this.refreshAfterSelection()}};if(z.children)return{value:this.params.treeListFormatter?.(z.treeKey,z.depth,z.parentTreeKeys)??z.treeKey,depth:z.depth,isGroup:!0,selectedListener:(Q)=>this.onGroupItemSelected(Q.item,Q.isSelected),expandedListener:(Q)=>this.onExpandedChanged(Q.item,Q.isExpanded)};return{value:this.params.treeListFormatter?.(z.treeKey,z.depth,z.parentTreeKeys)??z.treeKey,depth:z.depth,selectedListener:(Q)=>this.onItemSelected(Q.item.key,Q.isSelected)}}newSetListItemAttributes(z){if(this.isSetFilterModelTreeItem(z))return this.newSetTreeItemAttributes(z);if(z===F1)return{value:()=>this.getSelectAllLabel(),selectedListener:(J)=>this.onSelectAll(J.isSelected)};if(z===L1)return{value:()=>this.getAddSelectionToFilterLabel(),selectedListener:(J)=>{this.addCurrentSelectionToFilter=J.isSelected,this.refreshAfterSelection()}};return{value:this.handler.valueModel.allValues.get(z)??null,selectedListener:(J)=>this.onItemSelected(J.item,J.isSelected)}}updateSetListItem(z,J){let{isSelected:Q,isExpanded:Z}=this.isSelectedExpanded(z);J.refresh(z,Q,Z)}isSelectedExpanded(z){let J,Q;if(this.isSetFilterModelTreeItem(z))if(Q=z.expanded,z.key===F1)J=this.isSelectAllSelected();else if(z.key===L1)J=this.isAddCurrentSelectionToFilterChecked();else if(z.children)J=this.areAllChildrenSelected(z);else J=this.selectedKeys.has(z.key);else if(z===F1)J=this.isSelectAllSelected();else if(z===L1)J=this.isAddCurrentSelectionToFilterChecked();else J=this.selectedKeys.has(z);return{isSelected:J,isExpanded:Q}}isSetFilterModelTreeItem(z){return z?.treeKey!==void 0}initMiniFilter(){let{eMiniFilter:z}=this;this.updateMiniFilter(),z.onValueChange(()=>this.onMiniFilterInput()),z.setInputAriaLabel(l0(this,"ariaSearchFilterValues")),this.addManagedElementListeners(z.getInputElement(),{keydown:(J)=>this.onMiniFilterKeyDown(J)})}updateMiniFilter(){let{eMiniFilter:z,miniFilterText:J,params:Q}=this;z.setDisplayed(!Q.suppressMiniFilter),z.setValue(J)}afterGuiAttached(z){super.afterGuiAttached(z),this.resetExpansion(),this.refreshVirtualList();let{eMiniFilter:J}=this;if(J.setInputPlaceholder(l0(this,"searchOoo")),!z?.suppressFocus)if(J.isDisplayed())J.getFocusableElement().focus();else this.virtualList.awaitStable(()=>this.virtualList.focusRow(0))}afterGuiDetached(){super.afterGuiDetached();let{column:z,excelMode:J,model:Q,onStateChange:Z}=this.params;if(this.beans.colFilter?.shouldKeepStateOnDetach(z))return;if(J)this.resetMiniFilter();if(J||Q!==this.state.model)Z({model:Q,state:this.getState()}),this.showOrHideResults()}canApply(z){return this.params.excelMode?z==null||z.values.length>0:!0}onNewRowsLoaded(){}setFilterValues(z){V(283),this.handler.setFilterValues(z)}resetFilterValues(){V(283),this.handler.resetFilterValues()}refreshFilterValues(){V(283),this.doRefreshFilterValues()}doRefreshFilterValues(){this.handler.refreshFilterValues()}onAnyFilterChanged(){}onMiniFilterInput(z){if(!this.doSetMiniFilter(this.eMiniFilter.getValue()))return;if(z){this.showOrHideResults();return}let{applyMiniFilterWhileTyping:J,readOnly:Q,excelMode:Z}=this.params,$=!Q&&(J||!!Z),X=J&&!Q?"debounce":void 0;this.updateUiAfterMiniFilterChange($,X)}updateUiAfterMiniFilterChange(z,J){if(z){let{excelMode:Q,readOnly:Z,model:$}=this.params;if(Q&&!Z&&this.miniFilterText==null)this.setModelAndRefresh($?.values??null);else this.selectAllMatchingMiniFilter(!0)}this.checkAndRefreshVirtualList(),this.onUiChanged(z?J:"prevent"),this.showOrHideResults()}showOrHideResults(){let z=this.miniFilterText!=null&&this.displayValueModel.getDisplayedValueCount()<1;x(this.eFilterNoMatches,z),x(this.eSetFilterList,!z)}resetMiniFilter(){this.eMiniFilter.setValue(null,!0),this.doSetMiniFilter(null)}onMiniFilterKeyDown(z){let{excelMode:J,readOnly:Q}=this.params;if(z.key===R.ENTER&&!J&&!Q)this.updateUiAfterMiniFilterChange(!0,"immediately")}focusRowIfAlive(z){if(z==null)return Promise.resolve();return new Promise((J)=>{window.setTimeout(()=>{if(this.isAlive())this.virtualList.focusRow(z);J()},0)})}onSelectAll(z){if(z)this.selectAllMatchingMiniFilter();else this.deselectAllMatchingMiniFilter();this.refreshAfterSelection()}onGroupItemSelected(z,J){let Q=(Z)=>{if(!Z.filterPasses)return;let $=Z.children;if($)for(let X of $.values())Q(X);else this.setKeySelected(Z.key,J)};Q(z),this.refreshAfterSelection()}onItemSelected(z,J){this.setKeySelected(z,J),this.refreshAfterSelection()}onExpandAll(z,J){let Q=(Z)=>{if(Z.filterPasses&&Z.available&&Z.children){for(let $ of Z.children.values())Q($);Z.expanded=J}};Q(z),this.refreshAfterExpansion()}onExpandedChanged(z,J){z.expanded=J,this.refreshAfterExpansion()}refreshAfterExpansion(){let z=this.virtualList.getLastFocusedRow();this.updateDisplayedValues("expansion"),this.checkAndRefreshVirtualList(),this.focusRowIfAlive(z)}refreshAfterSelection(){let z=this.virtualList.getLastFocusedRow();this.checkAndRefreshVirtualList(),this.onUiChanged(),this.focusRowIfAlive(z)}setMiniFilter(z,J){this.eMiniFilter.setValue(z,J),this.onMiniFilterInput(J)}doSetMiniFilter(z){if(z=U0(z),this.miniFilterText===z)return!1;if(z===null)this.addCurrentSelectionToFilter=!1;return this.miniFilterText=z,this.updateDisplayedValues("miniFilter"),!0}getMiniFilter(){return this.miniFilterText}getUiChangeEventParams(){return{miniFilterValue:this.miniFilterText}}getState(){let z=this.miniFilterText;return z?{miniFilterValue:z}:void 0}checkAndRefreshVirtualList(){if(this.virtualList.refresh(!this.hardRefreshVirtualList),this.hardRefreshVirtualList)this.hardRefreshVirtualList=!1}getFilterKeys(){return V(283),this.handler.getFilterKeys()}getFilterValues(){return V(283),this.handler.getFilterValues()}refreshVirtualList(){if(this.params.refreshValuesOnOpen)this.doRefreshFilterValues();else this.checkAndRefreshVirtualList()}isSelectAllSelected(){if(!this.params.defaultToNothingSelected){if(this.hasSelections()&&this.isNothingVisibleSelected())return!1;if(this.isEverythingVisibleSelected())return!0}else{if(this.hasSelections()&&this.isEverythingVisibleSelected())return!0;if(this.isNothingVisibleSelected())return!1}return}areAllChildrenSelected(z){let J=(Q)=>{if(Q.children){let Z=!1,$=!1;for(let X of Q.children.values()){if(!X.filterPasses||!X.available)continue;let Y=J(X);if(Y===void 0)return;if(Y)Z=!0;else $=!0;if(Z&&$)return}return Z}else return this.selectedKeys.has(Q.key)};if(!this.params.defaultToNothingSelected)return J(z);else return this.hasSelections()&&J(z)}resetExpansion(){if(!this.params.treeList)return;let z=this.displayValueModel.getSelectAllItem();if(this.isSetFilterModelTreeItem(z)){let J=(Q)=>{let Z=Q.children;if(Z){for(let $ of Z.values())J($);Q.expanded=!1}};J(z),this.updateDisplayedValues("expansion")}}getModelAsString(z){return this.handler.getModelAsString(z)}getPositionableElement(){return this.eSetFilterList}updateDisplayedValues(z,J){if(z==="expansion"){this.displayValueModel.refresh();return}let Q=this.handler,Z=Q.valueModel;if(this.miniFilterText==null){this.displayValueModel.updateDisplayedValuesToAllAvailable((U)=>Z.allValues.get(U)??null,J,Z.availableKeys,z);return}let $=Q.caseFormat(this.formatter(this.miniFilterText)||""),X=(U)=>U!=null&&Q.caseFormat(U).includes($),Y=!!this.params.excelMode&&X(l0(this,"blanks"));this.displayValueModel.updateDisplayedValuesToMatchMiniFilter((U)=>Z.allValues.get(U)??null,J,Z.availableKeys,X,Y,z)}hasSelections(){return this.params.defaultToNothingSelected?this.selectedKeys.size>0:this.handler.valueModel.allValues.size!==this.selectedKeys.size}isInWindowsExcelMode(){return this.params.excelMode==="windows"}isAddCurrentSelectionToFilterChecked(){return this.isInWindowsExcelMode()&&this.addCurrentSelectionToFilter}showAddCurrentSelectionToFilter(){return this.isInWindowsExcelMode()&&I(this.miniFilterText)&&this.miniFilterText.length>0}selectAllMatchingMiniFilter(z=!1){if(this.miniFilterText==null)this.selectedKeys=new Set(this.handler.valueModel.allValues.keys());else{if(z)this.selectedKeys.clear();this.displayValueModel.forEachDisplayedKey((J)=>this.selectedKeys.add(J))}}deselectAllMatchingMiniFilter(){if(this.miniFilterText==null)this.selectedKeys.clear();else this.displayValueModel.forEachDisplayedKey((z)=>this.selectedKeys.delete(z))}setKeySelected(z,J){if(J)this.selectedKeys.add(z);else{if(this.params.excelMode&&this.isEverythingVisibleSelected())this.resetSelectionState(this.displayValueModel.getDisplayedKeys());this.selectedKeys.delete(z)}}isEverythingVisibleSelected(){return!this.displayValueModel.someDisplayedKey((z)=>!this.selectedKeys.has(z))}isNothingVisibleSelected(){return!this.displayValueModel.someDisplayedKey((z)=>this.selectedKeys.has(z))}getSelectedModel(){if(!this.hasSelections())return null;let z=this.isAddCurrentSelectionToFilterChecked()?this.params.model?.values:void 0;if(z?.length){if(this.selectedKeys){let J=new Set([...z,...this.selectedKeys]);return Array.from(J)}return Array.from(z)}return Array.from(this.selectedKeys)}setSelectedModel(z){let J=this.handler,Q=J.valueModel;return Q.allKeys.then((Z)=>{if(z==null)this.resetSelectionState(Z??[]);else{this.selectedKeys.clear();let $=new Map;Q.allValues.forEach((X,Y)=>{$.set(J.caseFormat(Y),Y)}),z.forEach((X)=>{let Y=J.caseFormat(U0(X)),U=$.get(Y);if(U!==void 0)this.selectedKeys.add(U)})}})}resetSelectionState(z){if(this.params.defaultToNothingSelected)this.selectedKeys.clear();else this.selectedKeys=new Set(z)}getFilterHandler(){return this.handler}destroy(){this.virtualList=this.destroyBean(this.virtualList);for(let z of this.handlerDestroyFuncs??[])z();this.handler=void 0,this.displayValueModel=void 0,this.selectedKeys.clear(),super.destroy()}},xS=class{constructor(z){this.model=z}getRowCount(){return this.model.getDisplayedValueCount()}getRow(z){return this.model.getDisplayedItem(z)}areRowsEqual(z,J){return z===J}},bS=class{constructor(z,J){this.model=z,this.showAddCurrentSelectionToFilter=J}getRowCount(){let J=this.showAddCurrentSelectionToFilter()?2:1;return this.model.getDisplayedValueCount()+J}getRow(z){if(z===0)return this.model.getSelectAllItem();let J=this.showAddCurrentSelectionToFilter(),Q=J?2:1;if(z===1&&J)return this.model.getAddSelectionToFilterItem();return this.model.getDisplayedItem(z-Q)}areRowsEqual(z,J){return z===J}},gS=class{constructor(z){this.model=z}getRowCount(){return this.model.getRowCount()}getRow(z){return this.model.getRow(z)}areRowsEqual(z,J){if(z==null&&J==null)return!0;return z!=null&&J!=null&&z.treeKey===J.treeKey&&z.depth===J.depth}},hS=class extends j{constructor(z,J,Q,Z,$){super();this.createKey=z,this.caseFormat=J,this.getValue=Q,this.isTreeDataOrGrouping=Z,this.isTreeData=$}extractUniqueValuesAsync(z,J){return new b((Q)=>{if(this.beans.rowModel.rowCountReady)Q(this.extractUniqueValues(z,J));else{let[Z]=this.addManagedEventListeners({rowCountReady:()=>{Z?.(),Q(this.extractUniqueValues(z,J))}})}})}extractUniqueValues(z,J){let Q=new Map,Z=this.extractExistingFormattedKeys(J),$=new Set,X=this.isTreeData(),Y=this.isTreeDataOrGrouping(),U=this.beans.rowGroupColsSvc?.columns,_=this.gos.get("groupAllowUnbalanced"),H=(G,W)=>{let q=this.caseFormat(G);if(!$.has(q)){$.add(q);let B=G,E=U0(W),K=Z?.get(q);if(K!=null)B=K,E=J.get(K);Q.set(B,E)}};return this.beans.rowModel.forEachLeafNode((G)=>{if(!G.data||!z(G))return;if(Y){this.addValueForTreeDataOrGrouping(G,X,U,H,_);return}let W=this.getValue(G);if(W!=null&&Array.isArray(W)){for(let q of W)H(this.createKey(q,G),q);if(W.length===0)H(null,null)}else H(this.createKey(W,G),W)}),Q}addValueForTreeDataOrGrouping(z,J,Q=[],Z,$){let X;if(J){if(z.childrenAfterGroup?.length)return;X=z.getRoute()??[z.key??z.id]}else X=Q.map((U)=>this.beans.valueSvc.getKeyForNode(U,z)),X.push(this.getValue(z));let Y=D7(X,J,$);Z(this.createKey(Y),Y)}extractExistingFormattedKeys(z){if(!z)return null;let J=new Map;return z.forEach((Q,Z)=>{J.set(this.caseFormat(Z),Z)}),J}},uS=class{constructor(z){this.caseFormat=z,this.keys=null}isNull(){return this.keys==null}isEmpty(){return!this.keys?.size}update(z){let J=new Set;this.keys=J;let Q=z?.values;if(Q){let Z=this.caseFormat;for(let $=0,X=Q.length;$<X;$++)J.add(Z(Q[$]))}}has(z){return!!this.keys?.has(this.caseFormat(z))}destroy(){this.keys=null}},eU=((z)=>{return z[z.PROVIDED_LIST=0]="PROVIDED_LIST",z[z.PROVIDED_CALLBACK=1]="PROVIDED_CALLBACK",z[z.TAKEN_FROM_GRID_VALUES=2]="TAKEN_FROM_GRID_VALUES",z})(eU||{}),W7=eU,mS=class extends j{constructor(z,J,Q,Z,$){super();this.clientSideValuesExtractor=z,this.caseFormat=J,this.createKey=Q,this.isTreeDataOrGrouping=Z,this.params=$,this.allValues=new Map,this.availableKeys=new Set,this.providedValues=null,this.initialised=!1}postConstruct(){let z=this.params,J=z.handlerParams.filterParams.values;if(this.updateParams(z),J==null)this.valuesType=2;else this.valuesType=Array.isArray(J)?0:1,this.providedValues=J;this.updateAllValues()}refresh(z){let J=z.handlerParams;if(J.source!=="colDef")return;let{values:Q,suppressSorting:Z}=J.filterParams,$=this.providedValues,X=this.params.handlerParams.filterParams.suppressSorting;if(this.params=z,this.updateParams(z),this.providedValues=Q??null,this.providedValues!==$||Z!==X){if(!Q||Q.length===0)this.valuesType=2,this.providedValues=null;else this.valuesType=Array.isArray(Q)?0:1;this.updateAllValues()}}updateParams(z){let{handlerParams:{colDef:J,filterParams:{comparator:Q,treeList:Z,treeListPathGetter:$}},usingComplexObjects:X}=z,Y=Q??J.comparator,U=this.isTreeDataOrGrouping(),_;if(U&&!Y)_=yS();else if(Z&&!$&&!Y)_=([H,G],[W,q])=>n1(G,q);else _=([H,G],[W,q])=>Y(G,q);this.entryComparator=_,this.keyComparator=Y??n1,this.compareByValue=!!(X&&Y||U||Z&&!$)}updateAllValues(){return this.allKeys=new b((z)=>{switch(this.valuesType){case 2:this.getValuesFromRowsAsync().then((J)=>z(this.processAllValues(J)));break;case 0:{z(this.processAllValues(this.uniqueValues(this.validateProvidedValues(this.providedValues))));break}case 1:{this.dispatchLocalEvent({type:"loadingStart"});let J=this.providedValues,{column:Q,colDef:Z}=this.params.handlerParams,$=v(this.gos,{success:(X)=>{this.dispatchLocalEvent({type:"loadingEnd"}),z(this.processAllValues(this.uniqueValues(this.validateProvidedValues(X))))},colDef:Z,column:Q});window.setTimeout(()=>J($),0);break}}}),this.allKeys.then((z)=>{this.updateAvailableKeys(z??[]),this.initialised=!0}),this.allKeys}getAvailableValues(z){return this.sortKeys(this.getValuesFromRows(z))}overrideValues(z){return this.allKeys.then(()=>{this.valuesType=0,this.providedValues=z})}refreshAvailable(){return new b((z)=>{if(this.showAvailableOnly()){this.allKeys.then((J)=>{let Q=J??[];this.updateAvailableKeys(Q),z(!0)});return}z(!1)})}refreshAll(){return new b((z)=>{this.allKeys.then(()=>{this.updateAllValues().then(()=>{z()})})})}isLoading(){return!this.initialised&&this.valuesType===1}isInitialised(){return this.initialised}getValueForFormatter(z){return this.initialised?this.allValues.get(z):z}getAvailableKeys(z){return this.initialised?z.filter((J)=>this.availableKeys.has(J)):z}getParamsForValuesFromRows(z){if(!this.clientSideValuesExtractor){r(113);return}return z&&!this.params.handlerParams.filterParams.caseSensitive?this.allValues:void 0}getValuesFromRows(z){let J=this.getParamsForValuesFromRows(!0);return this.clientSideValuesExtractor?.extractUniqueValues(z,J)??null}getValuesFromRowsAsync(){let z=this.getParamsForValuesFromRows(!1);return this.clientSideValuesExtractor?.extractUniqueValuesAsync(()=>!0,z)??b.resolve(null)}processAllValues(z){let J=this.sortKeys(z);return this.allValues=z??new Map,J}uniqueValues(z){let J=new Map,Q=new Set,{caseFormat:Z,createKey:$}=this;for(let X of z??[]){let Y=U0(X),U=$(Y),_=Z(U);if(!Q.has(_))Q.add(_),J.set(U,Y)}return J}validateProvidedValues(z){if(this.params.usingComplexObjects&&z?.length){let J=z[0];if(J&&typeof J!=="object"&&typeof J!=="function")if(this.createKey(J)==null)V(209);else V(210)}return z}sortKeys(z){let J=z??new Map,Q=this.params.handlerParams.filterParams;if(Q.suppressSorting)return Array.from(J.keys());let Z;if(this.compareByValue)Z=Array.from(J.entries()).sort(this.entryComparator).map(([$])=>$);else Z=Array.from(J.keys()).sort(this.keyComparator);if(Q.excelMode&&J.has(null))Z=Z.filter(($)=>$!=null),Z.push(null);return Z}showAvailableOnly(){return this.valuesType===2}updateAvailableKeys(z){let J=this.showAvailableOnly()?this.getAvailableValues((Q)=>this.params.handlerParams.doesRowPassOtherFilter(Q)):z;this.availableKeys=new Set(J),window.setTimeout(()=>{if(this.isAlive())this.dispatchLocalEvent({type:"availableValuesChanged"})})}},cS=class extends j{constructor(){super(...arguments);this.filterType="set",this.treeDataTreeList=!1,this.groupingTreeList=!1,this.caseSensitive=!1,this.noValueFormatterSupplied=!1}init(z){this.updateParams(z);let J=this.isTreeDataOrGrouping.bind(this),Q=()=>this.treeDataTreeList,Z=this.createKey,$=this.caseFormat.bind(this),{gos:X,beans:Y}=this,U=o(X,Y.rowModel)?this.createManagedBean(new hS(Z,$,z.getValue,J,Q)):void 0,_=this.createManagedBean(new mS(U,$,Z,J,{handlerParams:z,usingComplexObjects:!!(z.filterParams.keyCreator??z.colDef.keyCreator)}));this.addManagedListeners(_,{availableValuesChanged:z.onModelAsStringChange}),this.valueModel=_,this.appliedModel=new uS(this.caseFormat.bind(this)),this.appliedModel.update(z.model),this.validateModel(z),this.addEventListenersForDataChanges()}refresh(z){this.updateParams(z),this.valueModel.refresh({handlerParams:z,usingComplexObjects:!!(z.filterParams.keyCreator??z.colDef.keyCreator)}),this.appliedModel.update(z.model),this.validateModel(z)}updateParams(z){this.params=z;let{colDef:J,filterParams:{caseSensitive:Q,treeList:Z,keyCreator:$,valueFormatter:X}}=z;this.caseSensitive=!!Q;let Y=!!J.showRowGroup;this.treeDataTreeList=this.gos.get("treeData")&&!!Z&&Y,this.groupingTreeList=!!this.beans.rowGroupColsSvc?.columns.length&&!!Z&&Y;let U=$??J.keyCreator;this.createKey=this.generateCreateKey(U,this.isTreeDataOrGrouping()),this.setValueFormatter(X,U,!!Z,!!J.refData)}doesFilterPass(z){let{appliedModel:J,treeDataTreeList:Q,groupingTreeList:Z}=this;if(J.isNull())return!0;if(J.isEmpty())return!1;let{node:$}=z;if(Q)return this.doesFilterPassForTreeData($);if(Z)return this.doesFilterPassForGrouping($);let X=this.params.getValue($);if(X!=null&&Array.isArray(X)){if(X.length===0)return J.has(null);return X.some((Y)=>J.has(this.createKey(Y,$)))}return J.has(this.createKey(X,$))}getFormattedValue(z){let J=this.valueModel.getValueForFormatter(z);if(this.noValueFormatterSupplied&&this.isTreeDataOrGrouping()&&Array.isArray(J))J=N(J);let Q=this.beans.valueSvc.formatValue(this.params.column,null,J,this.valueFormatter,!1);return(Q==null?d0(J):Q)??l0(this,"blanks")}getModelAsString(z,J){let{values:Q}=z??{},Z=J==="filterToolPanel";if(Q==null)return Z?l0(this,"filterSummaryListInactive"):"";let $=this.valueModel.getAvailableKeys(Q),X=$.length,Y=Z?3:10,U=$.slice(0,Y).map((_)=>this.getFormattedValue(_));if(Z){let _=U.join(l0(this,"filterSummaryListSeparator"));if(X>3)return l0(this,"filterSummaryListLong",[_,String(X-3)]);else return l0(this,"filterSummaryListShort",[_])}return`(${X}) ${U.join(",")}${X>10?",...":""}`}onAnyFilterChanged(){window.setTimeout(()=>{if(!this.isAlive())return;this.valueModel.refreshAvailable().then((z)=>{this.dispatchLocalEvent({type:"anyFilterChanged",updated:!!z})})})}onNewRowsLoaded(){this.syncAfterDataChange()}setFilterValues(z){this.valueModel.overrideValues(z).then(()=>{this.refreshFilterValues()})}resetFilterValues(){this.valueModel.valuesType=W7.TAKEN_FROM_GRID_VALUES,this.syncAfterDataChange()}refreshFilterValues(z){if(!this.valueModel.isInitialised())return;this.valueModel.refreshAll().then(()=>{this.dispatchLocalEvent({type:"dataChanged",hardRefresh:!0}),this.validateModel(this.params,void 0,!z)})}getFilterKeys(){return Array.from(this.valueModel.allValues.keys())}getFilterValues(){return Array.from(this.valueModel.allValues.values())}isTreeDataOrGrouping(){return this.treeDataTreeList||this.groupingTreeList}caseFormat(z){if(z==null||typeof z!=="string")return z;return this.caseSensitive?z:z.toUpperCase()}addEventListenersForDataChanges(){this.addManagedPropertyListeners(["groupAllowUnbalanced"],()=>this.syncAfterDataChange());let z=i0(this,this.syncAfterDataChange.bind(this),0);this.addManagedEventListeners({cellValueChanged:(J)=>{if(J.column===this.params.column)z()}})}syncAfterDataChange(){if(!this.isValuesTakenFromGrid())return;this.valueModel.refreshAll().then(()=>{this.dispatchLocalEvent({type:"dataChanged"}),this.validateModel(this.params,{afterDataChange:!0})})}validateModel(z,J,Q){let Z=this.valueModel;Z.allKeys.then(()=>{let $=z.model;if($==null)return;let X=new Map,Y=(B)=>X.set(this.caseFormat(B),B);if(Q)for(let B of Z.availableKeys)Y(B);else Z.allValues.forEach((B,E)=>Y(E));let U=[],_=!1;for(let B of $.values){let E=this.caseFormat(U0(B)),K=X.get(E);if(K!==void 0){if(U.push(K),K!==B)_=!0}else _=!0}let H=U.length,G=z.filterParams;if(H===0&&G.excelMode){z.onModelChange(null,J);return}let q=!G.defaultToNothingSelected&&(this.valueModel.valuesType===W7.TAKEN_FROM_GRID_VALUES||!G.suppressClearModelOnRefreshValues)&&H===X.size;if(_||!$.filterType||q){let B=q?null:{filterType:this.filterType,values:U};z.onModelChange(B,J)}})}isValuesTakenFromGrid(){return this.valueModel.valuesType===W7.TAKEN_FROM_GRID_VALUES}doesFilterPassForTreeData(z){if(z.childrenAfterGroup?.length)return!1;let{gos:J,appliedModel:Q}=this;return Q.has(this.createKey(D7(z.getRoute()??[z.key??z.id],!0,J.get("groupAllowUnbalanced"))))}doesFilterPassForGrouping(z){let{appliedModel:J,params:Q,gos:Z,beans:{rowGroupColsSvc:$,valueSvc:X}}=this,Y=($?.columns??[]).map((U)=>X.getKeyForNode(U,z));return Y.push(Q.getValue(z)),J.has(this.createKey(D7(Y,!1,Z.get("groupAllowUnbalanced"))))}generateCreateKey(z,J){if(J&&!z)return r(250),()=>null;if(z)return(Q,Z=null)=>{let $=this.getKeyCreatorParams(Q,Z);return U0(z($))};return(Q)=>U0(d0(Q))}getKeyCreatorParams(z,J=null){let{colDef:Q,column:Z}=this.params;return v(this.gos,{value:z,colDef:Q,column:Z,node:J,data:J?.data})}setValueFormatter(z,J,Q,Z){let $=z;if(!$){if(J&&!Q){r(249);return}if(this.noValueFormatterSupplied=!0,!Z)$=(X)=>d0(X.value)}this.valueFormatter=$}getCrossFilterModel(z){let{createKey:J,valueModel:Q,params:Z}=this;return z(J,Q.availableKeys,Z.model?.values)}destroy(){this.appliedModel.destroy(),super.destroy(),this.valueModel=void 0}},pS={tag:"div",cls:"ag-floating-filter-input ag-set-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eFloatingFilterText"}]},iS=class extends y{constructor(){super(pS,[Yz]);this.eFloatingFilterText=P}init(z){this.params=z,this.eFloatingFilterText.setDisabled(!0).addGuiEventListener("click",()=>this.params.showParentFilter()),this.setParams(z)}setParams(z){let J=this.beans.colNames.getDisplayNameForColumn(z.column,"header",!0),Q=this.getLocaleTextFunc();if(this.eFloatingFilterText.setInputAriaLabel(`${J} ${Q("ariaFilterInput","Filter Input")}`),this.gos.get("enableFilterHandlers")){let Z=z;this.updateFloatingFilterText(Z.model)}}refresh(z){this.params=z,this.setParams(z)}onParentModelChanged(z){this.updateFloatingFilterText(z)}parentSetFilterInstance(z){this.params.parentFilterInstance((J)=>{if(!(J instanceof oU)){r(248);return}z(J)})}updateFloatingFilterText(z){if(z==null)this.eFloatingFilterText.setValue("");else if(this.gos.get("enableFilterHandlers"))this.eFloatingFilterText.setValue(this.params.getHandler().getModelAsString?.(z)??"");else this.parentSetFilterInstance((J)=>{this.eFloatingFilterText.setValue(J.getModelAsString(z))})}},z_={moduleName:"SetFilter",version:$0,userComponents:{agSetColumnFilter:{classImp:oU,params:{useForm:!0},processParams:(z)=>{return wS(z),z}},agSetColumnFloatingFilter:iS},dynamicBeans:{agSetColumnFilterHandler:cS},icons:{setFilterGroupClosed:"tree-closed",setFilterGroupOpen:"tree-open",setFilterGroupIndeterminate:"tree-indeterminate",setFilterLoading:"loading"},dependsOn:[N0,q1]},dS=".ag-status-bar{border-top:var(--ag-footer-row-border);display:flex;justify-content:space-between;line-height:1.5;overflow:hidden;padding-left:calc(var(--ag-spacing)*4);padding-right:calc(var(--ag-spacing)*4)}.ag-status-panel,:where(.ag-status-panel.ag-status-panel-aggregations .ag-status-name-value){display:inline-flex}.ag-status-name-value{color:var(--ag-status-bar-label-color);font-weight:var(--ag-status-bar-label-font-weight);margin-left:var(--ag-spacing);margin-right:var(--ag-spacing);padding-bottom:var(--ag-widget-container-vertical-padding);padding-top:var(--ag-widget-container-vertical-padding);white-space:nowrap}.ag-status-name-value-value{color:var(--ag-status-bar-value-color);font-weight:var(--ag-status-bar-value-font-weight)}.ag-status-bar-left{display:inline-flex}.ag-status-bar-center{display:inline-flex;text-align:center}.ag-status-bar-right{display:inline-flex}";function nS(z,J,Q){return z.getCompDetails(J,rS,void 0,Q,!0)}var rS={name:"statusPanel",optionalMethods:["refresh"]},tS={agAggregationComponent:{rowModels:["clientSide","serverSide"],warnArgs:[221]},agFilteredRowCountComponent:{rowModels:["clientSide"],warnArgs:[222]},agSelectedRowCountComponent:{rowModels:["clientSide","serverSide"],warnArgs:[223]},agTotalAndFilteredRowCountComponent:{rowModels:["clientSide"],warnArgs:[224]},agTotalRowCountComponent:{rowModels:["clientSide"],warnArgs:[225]}},sS={tag:"div",cls:"ag-status-bar",children:[{tag:"div",ref:"eStatusBarLeft",cls:"ag-status-bar-left",role:"status"},{tag:"div",ref:"eStatusBarCenter",cls:"ag-status-bar-center",role:"status"},{tag:"div",ref:"eStatusBarRight",cls:"ag-status-bar-right",role:"status"}]},lS=class extends y{constructor(){super(sS);this.updateQueued=!1,this.panelsPromise=b.resolve(),this.eStatusBarLeft=P,this.eStatusBarCenter=P,this.eStatusBarRight=P,this.compDestroyFunctions={},this.registerCSS(dS)}wireBeans(z){this.userCompFactory=z.userCompFactory,this.statusBarSvc=z.statusBarSvc}postConstruct(){this.processStatusPanels(new Map),this.addManagedPropertyListeners(["statusBar"],this.handleStatusBarChanged.bind(this)),vz(this.beans,this,this.getGui())}getFocusableContainerName(){return"statusBar"}getValidPanels(){let z=this.gos,J=z.get("statusBar")?.statusPanels;if(!J)return J;return J.filter((Q)=>{let{rowModels:Z,warnArgs:$}=tS[Q.statusPanel]??{};if(!Z)return!0;if(Z.includes(z.get("rowModelType")))return!0;return V(...$),!1})}processStatusPanels(z){let J=this.getValidPanels();if(J){let Q=J.filter((X)=>X.align==="left"),Z=J.filter((X)=>X.align==="center"),$=J.filter((X)=>!X.align||X.align==="right");this.panelsPromise=b.all([this.createAndRenderComponents(Q,this.eStatusBarLeft,z),this.createAndRenderComponents(Z,this.eStatusBarCenter,z),this.createAndRenderComponents($,this.eStatusBarRight,z)])}else this.setDisplayed(!1)}handleStatusBarChanged(){if(this.updateQueued)return;this.updateQueued=!0,this.panelsPromise.then(()=>{this.updateStatusBar(),this.updateQueued=!1})}updateStatusBar(){let z=this.getValidPanels(),J=Array.isArray(z)&&z.length>0;this.setDisplayed(J);let Q=new Map;if(J)for(let Z of z){let $=Z.key??Z.statusPanel,X=this.statusBarSvc.getStatusPanel($);if(X?.refresh){let Y=v(this.gos,{...Z.statusPanelParams??{},key:$});if(X.refresh(Y))Q.set($,X),delete this.compDestroyFunctions[$],P0(X.getGui())}}if(this.resetStatusBar(),J)this.processStatusPanels(Q)}resetStatusBar(){J0(this.eStatusBarLeft),J0(this.eStatusBarCenter),J0(this.eStatusBarRight),this.destroyComponents(),this.statusBarSvc.unregisterAllComponents()}destroy(){this.destroyComponents(),super.destroy()}destroyComponents(){for(let z of Object.values(this.compDestroyFunctions))z();this.compDestroyFunctions={}}createAndRenderComponents(z,J,Q){let Z=[];for(let $ of z){let X=$.key||$.statusPanel,Y=Q.get(X),U;if(Y)U=b.resolve(Y);else{let _=nS(this.userCompFactory,$,v(this.gos,{key:X}));if(_==null)continue;U=_.newAgStackInstance()}Z.push({key:X,promise:U})}return b.all(Z.map(($)=>$.promise)).then(()=>{for(let $ of Z)$.promise.then((X)=>{let Y=()=>{this.destroyBean(X)};if(this.isAlive())this.statusBarSvc.registerStatusPanel($.key,X),J.appendChild(X.getGui()),this.compDestroyFunctions[$.key]=Y;else Y()})})}},aS={selector:"AG-STATUS-BAR",component:lS},oS={tag:"div",cls:"ag-status-name-value",children:[{tag:"span",ref:"eLabel"},": ",{tag:"span",ref:"eValue",cls:"ag-status-name-value-value"}]},eS=BigInt(Number.MIN_SAFE_INTEGER),zI=BigInt(Number.MAX_SAFE_INTEGER),E6=class extends y{constructor(){super(oS);this.eLabel=P,this.eValue=P}setLabel(z,J){this.setDisplayed(!1),this.eLabel.textContent=this.getLocaleTextFunc()(z,J)}setValue(z,J){let Q=null,Z;if(typeof z==="bigint"){if(Z=z,z>=eS&&z<=zI)Q=Number(z)}else Q=z;this.eValue.textContent=this.valueFormatter(v(this.gos,{value:Q,bigintValue:Z,totalRows:J,key:this.key}))}},JI={selector:"AG-NAME-VALUE",component:E6},J_=(z)=>{let J=0;return z.forEachNodeAfterFilter((Q)=>{if(Q.data)J++}),J},K6=(z)=>{let J=0;return z.forEachNode((Q)=>{if(Q.data)J++}),J};function QI(z,J){if(typeof z!=="number")return"";return f4(Math.round(z*100)/100,J)}var ZI={tag:"div",cls:"ag-status-panel ag-status-panel-aggregations",children:[{tag:"ag-name-value",ref:"avgAggregationComp"},{tag:"ag-name-value",ref:"countAggregationComp"},{tag:"ag-name-value",ref:"minAggregationComp"},{tag:"ag-name-value",ref:"maxAggregationComp"},{tag:"ag-name-value",ref:"sumAggregationComp"}]},$I=class extends y{constructor(){super(ZI,[JI]);this.sumAggregationComp=P,this.countAggregationComp=P,this.minAggregationComp=P,this.maxAggregationComp=P,this.avgAggregationComp=P}postConstruct(){this.avgAggregationComp.setLabel("avg","Average"),this.countAggregationComp.setLabel("count","Count"),this.minAggregationComp.setLabel("min","Min"),this.maxAggregationComp.setLabel("max","Max"),this.sumAggregationComp.setLabel("sum","Sum"),this.addManagedEventListeners({cellSelectionChanged:this.onCellSelectionChanged.bind(this),modelUpdated:this.onCellSelectionChanged.bind(this)})}init(z){this.refresh(z)}refresh(z){this.params=z;let J=z.valueFormatter??((Z)=>{let{value:$,bigintValue:X}=Z;if(X!=null)return X.toString();return QI($,this.getLocaleTextFunc.bind(this))}),Q=["avg","count","min","max","sum"];for(let Z of Q){let $=this.getAllowedAggregationValueComponent(Z);if($)$.key=Z,$.valueFormatter=J.bind(this)}return this.onCellSelectionChanged(),!0}setAggregationComponentValue(z,J,Q){let Z=this.getAllowedAggregationValueComponent(z),$=K6(this.beans.rowModel);if(I(Z)&&Z)Z.setValue(J,$),Z.setDisplayed(Q);else this.getAggregationValueComponent(z)?.setDisplayed(!1)}getAllowedAggregationValueComponent(z){let{aggFuncs:J}=this.params;if(!J||J.includes(z))return this.getAggregationValueComponent(z);return null}getAggregationValueComponent(z){let J=`${z}AggregationComp`;return this[J]}onCellSelectionChanged(){let z=this.beans,{rangeSvc:J,valueSvc:Q}=z,Z=J?.getCellRanges(),$=0,X=0n,Y=!1,U=!1,_=0,H=0,G=null,W=null,q=null,B=null,E=(C)=>{if(typeof C==="number"){if($+=C,G===null||C<G)G=C;if(W===null||C>W)W=C;if(!Number.isInteger(C)||!Number.isSafeInteger(C))U=!0;else{let w=BigInt(C);if(X+=w,q===null||w<q)q=w;if(B===null||w>B)B=w}}else{if(Y=!0,X+=C,q===null||C<q)q=C;if(B===null||C>B)B=C;let w=Number(C);if($+=w,G===null||w<G)G=w;if(W===null||w>W)W=w}H++},K={};if(Z?.length&&J)for(let C=0;C<Z.length;C++){let w=Z[C],m=J.getRangeStartRow(w),g=J.getRangeEndRow(w);while(!0){if(n(m)||!m||q0(g,m)||!m||!w.columns)break;w.columns.forEach((t)=>{if(m===null)return;let u=r4({rowPinned:m.rowPinned,column:t,rowIndex:m.rowIndex});if(K[u])return;K[u]=!0;let Q0=j0(z,m);if(n(Q0))return;let s=Q.getValue(t,Q0,"data");if(n(s)||s==="")return;if(_++,typeof s==="object"&&"value"in s){if(s=s.value,s==="")return}if(typeof s==="string"){let f0=s.trim();if(f0==="")return;let k0=Number(f0);if(!Number.isFinite(k0))return;if($+k0>=Number.MAX_SAFE_INTEGER||$+k0<=Number.MIN_SAFE_INTEGER||k0>=Number.MAX_SAFE_INTEGER||k0<=Number.MIN_SAFE_INTEGER){if(s=Pz(f0),s===null)s=k0}else s=k0}if(typeof s==="number"&&!isNaN(s)||typeof s==="bigint")E(s)}),m=D0(z,m)}}let F=_>1,L=H>1,M=Y&&!U,D;if(M)D=X/BigInt(H);else D=$/H;let A=L?M?X:$:null,O=L?M?q:G:null,T=L?M?B:W:null,S=L?D:null,k=L;this.setAggregationComponentValue("count",_,F),this.setAggregationComponentValue("sum",A,L),this.setAggregationComponentValue("min",O,L),this.setAggregationComponentValue("max",T,L),this.setAggregationComponentValue("avg",S,k)}},XI=class extends E6{postConstruct(){this.setLabel("filteredRows","Filtered"),this.addCss("ag-status-panel"),this.addCss("ag-status-panel-filtered-row-count"),this.setDisplayed(!0);let z=this.onDataChanged.bind(this);this.addManagedEventListeners({modelUpdated:z})}onDataChanged(){let{rowModel:z}=this.beans,J=K6(z),Q=J_(z);this.setValue(Q,J),this.setDisplayed(J!==Q)}init(z){this.refresh(z),this.onDataChanged()}updateValueFormatter(z){this.valueFormatter=z??(({value:J})=>f4(J,this.getLocaleTextFunc.bind(this)))}refresh(z){let{key:J,valueFormatter:Q}=z;return this.key=J,this.updateValueFormatter(Q),!0}},YI=class extends E6{postConstruct(){this.setLabel("selectedRows","Selected"),this.addCss("ag-status-panel"),this.addCss("ag-status-panel-selected-row-count");let z=this.onRowSelectionChanged.bind(this);this.addManagedEventListeners({modelUpdated:z,selectionChanged:z})}onRowSelectionChanged(){let{selectionSvc:z,rowModel:J}=this.beans,Q=z?.getSelectionCount()??0,Z=K6(J);if(this.setValue(Q,Z),Q<0){this.setDisplayed(!0);return}this.setDisplayed(Q>0)}init(z){this.refresh(z),this.onRowSelectionChanged()}updateValueFormatter(z){this.valueFormatter=z??(({value:J})=>{if(J==null||J>=0)return f4(J,this.getLocaleTextFunc.bind(this));return this.getLocaleTextFunc()("statusBarLastRowUnknown","?")})}refresh(z){let{key:J,valueFormatter:Q}=z;return this.key=J,this.updateValueFormatter(Q),!0}},UI=class extends E6{postConstruct(){this.setLabel("totalAndFilteredRows","Rows"),this.addCss("ag-status-panel"),this.addCss("ag-status-panel-total-and-filtered-row-count"),this.setDisplayed(!0),this.addManagedEventListeners({modelUpdated:this.onDataChanged.bind(this)})}onDataChanged(){let{rowModel:z}=this.beans,J=J_(z),Q=K6(z);this.setValue(J,Q)}init(z){this.refresh(z),this.onDataChanged()}updateValueFormatter(z){this.valueFormatter=z??(({value:J,totalRows:Q})=>{let Z=this.getLocaleTextFunc.bind(this),$=f4(J,Z),X=f4(Q??J,Z);if(J===Q)return $;let Y=Z();return`${$} ${Y("of","of")} ${X}`})}refresh(z){let{key:J,valueFormatter:Q}=z;return this.key=J,this.updateValueFormatter(Q),!0}},_I=class extends E6{postConstruct(){this.setLabel("totalRows","Total Rows"),this.addCss("ag-status-panel"),this.addCss("ag-status-panel-total-row-count"),this.setDisplayed(!0),this.addManagedEventListeners({modelUpdated:this.onDataChanged.bind(this)})}onDataChanged(){let z=K6(this.beans.rowModel);this.setValue(z,z)}init(z){this.refresh(z),this.onDataChanged()}updateValueFormatter(z){this.valueFormatter=z??(({value:J})=>f4(J,this.getLocaleTextFunc.bind(this)))}refresh(z){let{key:J,valueFormatter:Q}=z;return this.key=J,this.updateValueFormatter(Q),!0}};function HI(z,J){let Q=z.statusBarSvc?.getStatusPanel(J);return Zz(Q)}var GI=class extends j{constructor(){super();this.beanName="statusBarSvc",this.comps=new Map}registerStatusPanel(z,J){this.comps.set(z,J)}unregisterStatusPanel(z){this.comps.delete(z)}unregisterAllComponents(){this.comps.clear()}getStatusPanel(z){return this.comps.get(z)}destroy(){this.unregisterAllComponents(),super.destroy()}},Q_={moduleName:"StatusBar",version:$0,beans:[GI],userComponents:{agAggregationComponent:$I,agTotalRowCountComponent:_I,agFilteredRowCountComponent:XI,agTotalAndFilteredRowCountComponent:UI,agSelectedRowCountComponent:YI},selectors:[aS],apiFunctions:{getStatusPanel:HI},dependsOn:[N0,G1]};function Z_(z){if(z.excelCreator?.getFactoryMode()==="MULTI_SHEET")return V(161),!1;return!0}function WI(z,J){if(Z_(z))return z.excelCreator?.getDataAsExcel(J);return}function qI(z,J){if(Z_(z))z.excelCreator?.exportDataAsExcel(J)}function BI(z,J){return z.excelCreator?.setFactoryMode("MULTI_SHEET"),z.excelCreator?.getSheetDataForExcel(J)}function EI(z,J){return z.excelCreator?.getMultipleSheetsAsExcel(J)}function KI(z,J){z.excelCreator?.exportMultipleSheetsAsExcel(J)}var $_={moduleName:"ExcelExport",version:$0,beans:[WP],apiFunctions:{getDataAsExcel:WI,exportDataAsExcel:qI,getSheetDataForExcel:BI,getMultipleSheetsAsExcel:EI,exportMultipleSheetsAsExcel:KI},dependsOn:[k5,N0]};function XQ(z){let{filters:J}=z;return J&&J.length>0?J:[{filter:"agTextColumnFilter"},{filter:"agSetColumnFilter"}]}function zQ(z,J){if(z==null)return;for(let Q=z.length-1;Q>=0;Q--)J(z[Q],Q)}function FI(z,J){if(J.title!=null)return J.title;return z instanceof _1?z.getFilterTitle():"Filter"}function JQ(z,J,Q,Z){let $=[],X=z?.filterModels;for(let Y=0;Y<J;Y++)$[Y]=(Y===Z?Q:X?.[Y])??null;return $.every((Y)=>Y==null)?null:{filterType:"multi",filterModels:$}}function _z(z,J){return z?.filterModels?.[J]??null}function QQ(z,J,Q,Z){let $=Q.filterValueGetter;return $?z.colFilter.createGetValue(J,$):Z}var X_=class extends L5{constructor(){super({tag:"div",cls:"ag-multi-filter ag-menu-list-compact"});this.filterDefs=[],this.guiDestroyFuncs=[],this.filterGuis=[],this.lastActivatedMenuItem=null}postConstruct(){this.initialiseTabGuard({onFocusIn:(z)=>this.onFocusIn(z)})}refreshGui(z){if(z===this.lastOpenedInContainer)return b.resolve();return this.tabGuardFeature.removeAllChildrenExceptTabGuards(),this.destroyChildren(),b.all(this.getFilterWrappers().map((J,Q)=>{if(!J)return b.resolve(null);let Z=this.getFilterFromWrapper(J),$=this.getCompFromWrapper(J),X=this.filterDefs[Q],Y=FI(Z,X),U;if(X.display==="subMenu"&&z!=="toolPanel")U=this.insertFilterMenu($,Z,Y).then((_)=>_.getGui());else if(X.display==="subMenu"||X.display==="accordion"){let _=this.insertFilterGroup(Z,$,Y);U=b.resolve(_.getGui())}else U=b.resolve($.getGui());return U})).then((J)=>{J.forEach((Q,Z)=>{if(!Q)return;if(Z>0)this.appendChild(z0({tag:"div",cls:"ag-filter-separator"}));this.appendChild(Q)}),this.filterGuis=J,this.lastOpenedInContainer=z})}destroyChildren(){for(let z of this.guiDestroyFuncs)z();this.guiDestroyFuncs.length=0,this.filterGuis.length=0}insertFilterMenu(z,J,Q){let Z=z.getGui();H0(Z,"dialog");let $=this.createBean(new kT),X={getGui:()=>z.getGui(),afterGuiAttached:(Y)=>{if(z.afterGuiAttached?.(Y),z!==J)J.afterGuiAttached?.(Y)}};return $.init({menuItemDef:{name:Q,subMenu:[],subMenuRole:"dialog",cssClasses:["ag-multi-filter-menu-item"],menuItem:vU,menuItemParams:{cssClassPrefix:"ag-compact-menu-option",isCompact:!0}},level:0,isAnotherSubMenuOpen:()=>!1,childComponent:X,contextParams:{column:null,node:null,value:null}}).then(()=>{$.setParentComponent(this),this.guiDestroyFuncs.push(()=>this.destroyBean($)),this.addManagedListeners($,{menuItemActivated:(U)=>{if(this.lastActivatedMenuItem&&this.lastActivatedMenuItem!==U.menuItem)this.lastActivatedMenuItem.deactivate();this.lastActivatedMenuItem=U.menuItem}});let Y=$.getGui();return $.addManagedElementListeners(Y,{keydown:(U)=>{let{key:_}=U;switch(_){case R.UP:case R.RIGHT:case R.DOWN:case R.LEFT:if(U.preventDefault(),_===R.RIGHT)$.openSubMenu(!0);break}},focusin:()=>$.activate(),focusout:()=>{if(!$.isSubMenuOpen()&&!$.isSubMenuOpening())$.deactivate()}}),$})}insertFilterGroup(z,J,Q){let Z=this.createBean(new CP({title:Q,cssIdentifier:"multi-filter"}));if(this.guiDestroyFuncs.push(()=>this.destroyBean(Z)),Z.addItem(J.getGui()),Z.toggleGroupExpand(!1),z.afterGuiAttached)Z.addManagedListeners(Z,{expanded:()=>z.afterGuiAttached({container:this.lastOpenedInContainer,suppressFocus:!0,hidePopup:this.hidePopup})});return Z}afterGuiAttached(z){let J;if(z)this.hidePopup=z.hidePopup,J=this.refreshGui(z.container);else this.hidePopup=void 0,J=b.resolve();let Q=z?.suppressFocus;J.then(()=>{let{filterDefs:Z,filterGuis:$,beans:X}=this,Y=this.getFilterWrappers(),U=!!Q;if(Z)zQ(Z,(H,G)=>{let W=G===0,q=H.display&&H.display!=="inline",B=Q||!W||q,E={...z??{},suppressFocus:B},K=Y[G],F=K?this.getFilterFromWrapper(K):void 0;if(K){let L=this.getCompFromWrapper(K);if(L!==F)L.afterGuiAttached(E)}if(F){if(this.executeFunctionIfExistsOnFilter(F,"afterGuiAttached",E),W&&!B)U=!0}if(!Q&&W&&q){let L=$[G];if(L){if(!E0(L))L.focus({preventScroll:!0});U=!0}}});let _=d(X);if(!U&&(Tz(X)||this.getGui().contains(_)))this.forceFocusOutOfContainer(!0)})}afterGuiDetached(){this.executeFunctionIfExists("afterGuiDetached")}onAnyFilterChanged(){this.executeFunctionIfExists("onAnyFilterChanged",(z)=>this.executeOnWrapper(z,"onAnyFilterChanged"))}onNewRowsLoaded(){this.executeFunctionIfExists("onNewRowsLoaded",(z)=>this.executeOnWrapper(z,"onNewRowsLoaded"))}destroy(){this.destroyChildren(),this.hidePopup=void 0,super.destroy()}executeOnWrapper(z,J){}executeFunctionIfExists(z,J){zQ(this.getFilterWrappers(),(Q)=>{if(Q)J?.(Q),this.executeFunctionIfExistsOnFilter(this.getFilterFromWrapper(Q),z)})}executeFunctionIfExistsOnFilter(z,J,...Q){let Z=z[J];if(typeof Z==="function")Z.apply(z,Q)}onFocusIn(z){let J=this.lastActivatedMenuItem;if(J!=null&&!J.getGui().contains(z.target))J.deactivate(),this.lastActivatedMenuItem=null}},Y_=class extends X_{constructor(){super(...arguments);this.filterType="multi",this.wrappers=[],this.activeFilterIndices=[],this.afterFiltersReadyFuncs=[]}init(z){this.params=z,this.filterDefs=XQ(z);let J=A0(this.beans.colFilter.model,z.column.getColId()),{filterChangedCallback:Q}=z;this.filterChangedCallback=Q;let Z=this.filterDefs.map(($,X)=>this.createFilter($,X,J));return new b(($)=>{b.all(Z).then((X)=>{this.wrappers=X,this.refreshGui("columnMenu").then(()=>{$()})})}).then(()=>{for(let $ of this.afterFiltersReadyFuncs)$();this.afterFiltersReadyFuncs.length=0})}refresh(z){return this.params=z,!0}isFilterActive(){return this.wrappers.some((z)=>{if(!z)return!1;let{filter:J,handler:Q,model:Z}=z;if(Q)return Z!=null;return J.isFilterActive()})}getLastActiveFilterIndex(){let z=this.activeFilterIndices;return z.length>0?z[z.length-1]:null}doesFilterPass(z,J){return this.wrappers.every((Q,Z)=>{if(!Q||J!=null&&Z===J)return!0;let{handler:$,filter:X,model:Y}=Q;if($)return Y==null||$.doesFilterPass({...z,model:Y,handlerParams:Q.handlerParams});return!X.isFilterActive()||X.doesFilterPass(z)})}getModelFromUi(){return{filterType:this.filterType,filterModels:this.wrappers.map((J)=>{if(!J)return null;let Q=J.filter;if(typeof Q.getModelFromUi==="function")return Q.getModelFromUi();return null})}}getModel(){if(!this.isFilterActive())return null;return{filterType:this.filterType,filterModels:this.wrappers.map((J)=>{if(!J)return null;let{filter:Q,handler:Z,model:$}=J;if(Z)return $;return Q.isFilterActive()?Q.getModel():null})}}setModel(z){let J=(Z,$)=>{return new b((X)=>{let Y=Z.setModel($);if(Y)Y.then(X);else X()})},Q=[];return this.wrappers.forEach((Z,$)=>{if(!Z)return;let X=_z(z,$),{filter:Y,filterParams:U,handler:_,handlerParams:H,state:G}=Z;if(_){let W={model:X,state:G?.state};Z.state=W,Z.model=X,Q.push(yJ(()=>b.resolve({filter:Y,filterParams:U}),_,H,X,W,"api").then(()=>{this.updateActiveListForHandler($,Z.model)}))}else Q.push(J(Y,X).then(()=>{this.updateActiveListForFilter($,Y)}))}),b.all(Q).then(()=>{})}applyModel(z="api"){let J=!1;for(let Q of this.wrappers)if(Q){let Z=Q.filter;if(Z instanceof _1)J=Z.applyModel(z)||J}return J}getChildFilterInstance(z){return this.wrappers[z]?.filter}getNumChildFilters(){return this.wrappers.length}destroy(){for(let z of this.wrappers)this.destroyBean(z?.filter),this.destroyBean(z?.handler);this.wrappers.length=0,super.destroy()}getFilterWrappers(){return this.wrappers}getFilterFromWrapper(z){return z.filter}getCompFromWrapper(z){return z.comp}executeOnWrapper(z,J){z.handler?.[J]?.()}createFilter(z,J,Q){let Z=this.params.column,$=null,X,Y=this.beans,U=(B,E)=>{let K=this.wrappers[J];if(!K)return;let F={model:B,state:K.state?.state};K.state=F,K.model=B,yJ(()=>b.resolve({filter:K.filter,filterParams:K.filterParams}),K.handler,K.handlerParams,B,F,"ui").then(()=>{this.onHandlerModelChanged(J,K.model,E)})},{compDetails:_,handler:H,handlerParams:G,createFilterUi:W}=Y.colFilter.createFilterInstance(Z,z,"agTextColumnFilter",(B,E)=>{let K={...B,filterChangedCallback:E?()=>{}:(F)=>{this.executeWhenAllFiltersReady(()=>this.onFilterModelChanged(J,F))},doesRowPassOtherFilter:(F)=>B.doesRowPassOtherFilter(F)&&this.doesFilterPass({node:F,data:F.data},J),getValue:QQ(Y,Z,z,B.getValue)};if(E)$=_z(Q,J),X=this.updateDisplayParams(K,J,$,()=>_,()=>H,U);return K});if(!W)return b.resolve(null);let q;if(H){let{doesRowPassOtherFilter:B,getValue:E}=G;q={...G,onModelChange:U,doesRowPassOtherFilter:(K)=>B(K)&&this.doesFilterPass({node:K,data:K.data},J),getValue:QQ(Y,Z,z,E)},H.init?.({...q,model:$,source:"init"})}return W().then((B)=>{if(!H)return{filter:B,comp:B};let E=_?.params,K=X(B);return{filter:B,comp:K,filterParams:E,handler:H,handlerParams:q,model:$}})}updateDisplayParams(z,J,Q,Z,$,X){let Y=this.params.column,U=new P4;z.model=Q,z.state={model:Q},z.onModelChange=X,z.getHandler=$;let _=(G,W)=>{G.state=W,U.dispatchEvent({type:"filterStateChanged",column:Y,state:W})};z.onStateChange=(G)=>{let W=this.wrappers[J];if(!W)return;_(W,G),J2(W.filter,W.filterParams,W.model??null,G,"ui")};let H=(G,W,q)=>{let B=this.wrappers[J];if(!B)return;let E=()=>B?.model??null;$J({action:W,filterParams:B.filterParams,getFilterUi:()=>{let K=b.resolve(B.filter);return{created:!0,filterParams:B.filterParams,compDetails:Z(),create:()=>K,promise:K}},getModel:E,getState:()=>B?.state??{model:E()},updateState:(K)=>_(B,K),updateModel:(K)=>B.filterParams?.onModelChange(K,q),processModelToApply:B.handler?.processModelToApply?.bind(B.handler)})};return z.onAction=(G,W,q)=>{H(Y,G,W),U.dispatchEvent({type:"filterAction",column:Y,action:G,event:q})},(G)=>{let W=Z()?.params;return this.createManagedBean(new g5(Y,{comp:G,params:W,isHandler:!0},U,H,!1))}}executeWhenAllFiltersReady(z){if((this.wrappers?.length??0)>0)z();else this.afterFiltersReadyFuncs.push(z)}updateActiveListForFilter(z,J){this.updateActiveList(z,()=>J?.isFilterActive())}updateActiveListForHandler(z,J){this.updateActiveList(z,()=>J!=null)}updateActiveList(z,J){let Q=this.activeFilterIndices;if(X0(this.activeFilterIndices,z),J())Q.push(z)}onFilterModelChanged(z,J){this.updateActiveListForFilter(z,this.wrappers[z]?.filter),this.filterChanged(z,J)}onHandlerModelChanged(z,J,Q){this.updateActiveListForHandler(z,J),this.filterChanged(z,Q)}filterChanged(z,J){this.filterChangedCallback(J),this.wrappers.forEach((Q,Z)=>{if(z===Z||!Q)return;let{filter:$,handler:X}=Q;if(X?.onAnyFilterChanged?.(),typeof $.onAnyFilterChanged==="function")$.onAnyFilterChanged()})}getModelAsString(z){if(!z?.filterModels?.length)return"";let J=this.getLastActiveFilterIndex()??0;return this.wrappers[J]?.filter?.getModelAsString?.(z.filterModels[J])??""}},LI=class extends j{constructor(){super(...arguments);this.filterType="multi",this.handlerWrappers=[],this.activeFilterIndices=[],this.filterDefs=[]}init(z){this.params=z;let J=XQ(z.filterParams);this.filterDefs=J,J.forEach((Q,Z)=>{let $=this.beans.colFilter.createHandler(z.column,Q,"agTextColumnFilter");if(this.handlerWrappers.push($),!$){V(278,{colId:z.column.getColId()});return}let{handler:X,handlerParams:Y}=$;X.init?.({...this.updateHandlerParams(Y,Z,!0),model:_z(z.model,Z),source:"init"})}),this.resetActiveList(z.model)}refresh(z){this.params=z;let{model:J,source:Q,filterParams:Z}=z,$=Z?.filters;if(this.handlerWrappers.forEach((X,Y)=>{if(X){let U=this.updateHandlerParams(z,Y,!1,$?.[Y].filterParams);X.handlerParams=U,X.handler.refresh?.({...U,model:_z(J,Y),source:Q})}}),z.source!=="floating"&&z.source!=="ui")this.resetActiveList(z.model);if(z.additionalEventAttributes?.fromButtons)this.onAnyFilterChanged()}updateHandlerParams(z,J,Q,Z){let{onModelChange:$,doesRowPassOtherFilter:X,getValue:Y}=z,U={...z,onModelChange:(_,H)=>$(JQ(this.params.model,this.handlerWrappers.length,_,J),H),doesRowPassOtherFilter:(_)=>X(_)&&this.doesFilterPass({node:_,data:_.data,model:this.params.model,handlerParams:U},J),getValue:QQ(this.beans,z.column,this.filterDefs[J],Y),filterParams:this.updateFilterParams(z,Q,Z)};return U}updateFilterParams(z,J,Q){let Z=z.filterParams;if(Q?.buttons&&J)V(292,{colId:z.column.getColId()});let $=Q?{...Z,...Q}:Z;if(!$.buttons)return $;if(Q)return delete $.buttons,$;let{buttons:X,...Y}=$;return Y}doesFilterPass(z,J){let Q=z.model?.filterModels;if(Q==null)return!0;return this.handlerWrappers.every((Z,$)=>{let X=Q[$];if(X==null||J!=null&&$===J)return!0;let Y=Z?.handler;return!Y||Y.doesFilterPass({...z,model:X,handlerParams:Z.handlerParams})})}resetActiveList(z){this.activeFilterIndices=[];let J=z?.filterModels;if(J==null)return;for(let Q=0;Q<this.handlerWrappers.length;Q++)if(J[Q]!=null)this.activeFilterIndices.push(Q)}updateActiveList(z,J){let Q=this.activeFilterIndices;if(X0(Q,z),J!=null)Q.push(z)}getLastActiveFilterIndex(){let z=this.activeFilterIndices;return z.length>0?z[z.length-1]:null}getModelAsString(z,J){let Q=J==="filterToolPanel",Z=()=>Q?this.getLocaleTextFunc()("filterSummaryInactive","is (All)"):"";if(!z?.filterModels?.length)return Z();let $=this.getLastActiveFilterIndex()??0;return this.handlerWrappers[$]?.handler.getModelAsString?.(z.filterModels[$],J)??Z()}getHandler(z){return this.handlerWrappers[z]?.handler}onAnyFilterChanged(){zQ(this.handlerWrappers,(z)=>z?.handler?.onAnyFilterChanged?.())}onNewRowsLoaded(){zQ(this.handlerWrappers,(z)=>z?.handler?.onNewRowsLoaded?.())}destroy(){for(let z of this.handlerWrappers)this.destroyBean(z?.handler);this.handlerWrappers.length=0,super.destroy()}},MI=class extends j{constructor(){super(...arguments);this.beanName="multiFilter"}getParamsForDataType(z,J,Q,Z){let $=z?.filters,X=this.beans;if(!$)$=[{filter:y5(Q.baseDataType)},{filter:"agSetColumnFilter"}];let Y=this.getLocaleTextFunc();return $=$.map((U)=>{let{filter:_,filterParams:H,filterValueGetter:G}=U;if(typeof _!=="string")return U;let{filterParams:W,filterValueGetter:q}=w5(_,H,G??J,Q,Z,X,Y);return{...U,filterParams:W,filterValueGetter:q}}),{filterParams:{...z,filters:$}}}},U_=class extends X_{constructor(){super(...arguments);this.filterType="multi",this.filters=[],this.filterParams=[],this.validity=[]}init(z){this.params=z;let J=XQ(z).map((Z)=>{if(Z.filterParams?.buttons){V(292,{colId:z.column.getColId()});let $={...Z.filterParams};return delete $.buttons,{...Z,filterParams:$}}return Z});this.filterDefs=J,this.allState=z.state;let Q=this.filterDefs.map((Z,$)=>this.createFilter(Z,$));return new b((Z)=>{b.all(Q).then(($)=>{this.filters=$,this.refreshGui("columnMenu").then(()=>{Z()})})})}refresh(z){let{model:J,state:Q,source:Z}=z;if(Z==="colDef")return!1;this.params=z;let $=this.filterParams;if(Q===this.allState)return!0;this.allState=Q;let X=Q.state;return this.filters.forEach((Y,U)=>{let _=_z(J,U),H={state:X?.[U],model:_z(Q.model,U)};J2(Y,$[U],_,H,Z)}),!0}getLastActiveFilterIndex(){return this.getHandler().getLastActiveFilterIndex?.()??null}getChildFilterInstance(z){return this.filters[z]??void 0}getNumChildFilters(){return this.filters.length}destroy(){for(let z of this.filters)this.destroyBean(z);this.filters.length=0,super.destroy()}getFilterWrappers(){return this.filters}getFilterFromWrapper(z){return z}getCompFromWrapper(z){return z}createFilter(z,J){let Q=this.beans.userCompFactory,Z=this.updateParams(z,this.params,J),$=aZ(Q,z,Z,"agTextColumnFilter");if(!$)return b.resolve(null);return this.filterParams[J]=$.params,$.newAgStackInstance()}updateParams(z,J,Q){let{doesRowPassOtherFilter:Z,model:$,onModelChange:X,state:Y,onStateChange:U,column:_,source:H,onAction:G,onUiChange:W,getValue:q}=J,B=_z($,Q),E=Y?{model:_z(Y.model,Q),state:Y.state?.[Q]}:{model:B},K=()=>{let L=this.getHandler();this.filters.forEach((M,D)=>{if(Q!==D)L.getHandler(D)?.onAnyFilterChanged?.(),M?.onAnyFilterChanged?.()})},F=this.beans.colFilter;return{...F.createBaseFilterParams(_),...z,doesRowPassOtherFilter:(L)=>Z(L)&&this.getHandler().doesFilterPass({node:L,data:L.data,model:this.params.model,handlerParams:F.getHandlerParams(_)},Q),model:B,state:E,onModelChange:(L,M)=>{let{filters:D,params:A}=this,O=JQ(A.model,D.length,L,Q);this.updateActiveList(Q,L),X(O,M),K()},onStateChange:(L)=>this.onStateChange(U,Q,L),getHandler:()=>this.getHandler().getHandler(Q),onAction:(L,M,D)=>{if(a1(J))return;let A=L==="apply"||L==="reset";if(A)this.updateActiveList(Q,_z(this.params.state.model,Q));if(G(L,M,D),A)K()},onUiChange:W,source:H,getValue:QQ(this.beans,_,z,q)}}updateActiveList(z,J){this.getHandler().updateActiveList?.(z,J)}getHandler(){return this.params.getHandler()}onStateChange(z,J,Q){let{model:Z,state:$,valid:X}=Q,Y=this.validity;Y[J]=X;let U=this.allState,_=JQ(U.model,this.filters.length,Z,J),H=Y.every((q)=>q!==!1),G=[...U.state??[]];G[J]=$;let W={state:G,model:_,valid:H};this.allState=W,z(W)}getModelAsString(z){return this.getHandler().getModelAsString?.(z)??""}},DI={tag:"div",cls:"ag-multi-floating-filter ag-floating-filter-input"},RI=class extends y{constructor(){super(DI);this.floatingFilters=[],this.compDetailsList=[]}init(z){this.params=z;let{compDetailsList:J}=this.getCompDetailsList(z);return this.setParams(J)}setParams(z){let J=[];return z.forEach((Q)=>{let Z=Q?.newAgStackInstance();if(Z!=null)this.compDetailsList.push(Q),J.push(Z)}),b.all(J).then((Q)=>{Q.forEach((Z,$)=>{this.floatingFilters.push(Z);let X=Z.getGui();if(this.appendChild(X),$>0)x(X,!1)})})}refresh(z){this.params=z;let{compDetailsList:J,floatingFilterParamsList:Q}=this.getCompDetailsList(z);if(J.length===this.compDetailsList.length&&J.every(($,X)=>!this.beans.colFilter?.areFilterCompsDifferent(this.compDetailsList[X],$))){if(Q.forEach(($,X)=>{this.floatingFilters[X].refresh?.($)}),this.gos.get("enableFilterHandlers")){let $=z;if($.model==null)this.floatingFilters.forEach((X,Y)=>{x(X.getGui(),Y===0)});else{let X=$.getHandler()?.getLastActiveFilterIndex?.();this.floatingFilters.forEach((Y,U)=>{let _=X==null?U===0:U===X;x(Y.getGui(),_)})}}}else J0(this.getGui()),this.destroyBeans(this.floatingFilters),this.floatingFilters=[],this.compDetailsList=[],this.setParams(J)}getCompDetailsList(z){let J=[],Q=[],Z=z.filterParams,$=z.currentParentModel,X=XQ(Z);return X.forEach((Y,U)=>{let _={...z,parentFilterInstance:(G)=>{this.parentMultiFilterInstance((W)=>{let q=W.getChildFilterInstance(U);if(q==null)return;G(q)})},currentParentModel:()=>$()?.filterModels?.[U]??null};if(this.gos.get("enableFilterHandlers")){let G=_;G.model=G.model?.filterModels?.[U]??null;let{onModelChange:W,getHandler:q}=G;G.onModelChange=(B,E)=>W(JQ(this.params.model,X.length,B,U),E),G.getHandler=()=>{return q().getHandler(U)}}M0(_.filterParams,Y.filterParams);let H=this.getCompDetails(Y,_);if(H)J.push(H),Q.push(_)}),{compDetailsList:J,floatingFilterParamsList:Q}}onParentModelChanged(z,J){if(J?.afterFloatingFilter)return;this.parentMultiFilterInstance((Q)=>{if(z==null)this.floatingFilters.forEach((Z,$)=>{Z.onParentModelChanged(null,J),x(Z.getGui(),$===0)});else{let Z=Q.getLastActiveFilterIndex();this.floatingFilters.forEach(($,X)=>{let Y=z.filterModels.length>X?z.filterModels[X]:null;$.onParentModelChanged(Y,J);let U=Z==null?X===0:X===Z;x($.getGui(),U)})}})}destroy(){this.destroyBeans(this.floatingFilters),this.floatingFilters.length=0,super.destroy()}getCompDetails(z,J){let{colFilter:Q,frameworkOverrides:Z,userCompFactory:$}=this.beans,X=x5(Z,z,()=>Q.getDefaultFloatingFilter(this.params.column))??"agReadOnlyFloatingFilter";return oZ($,z,J,X)}parentMultiFilterInstance(z){this.params.parentFilterInstance((J)=>{if(!(J instanceof Y_||J instanceof U_))r(120);z(J)})}},__={moduleName:"MultiFilter",version:$0,userComponents:{agMultiColumnFilter:{getComp:(z)=>z.gos.get("enableFilterHandlers")?{classImp:U_,params:{useForm:!0}}:Y_},agMultiColumnFloatingFilter:RI},beans:[MI],dynamicBeans:{agMultiColumnFilterHandler:LI},dependsOn:[N0,q1,T7]},AI=class extends j{constructor(){super(...arguments);this.beanName="aggColNameSvc"}getHeaderName(z,J){if(this.gos.get("suppressAggFuncInHeader"))return J;let{valueColsSvc:Q,colModel:Z,rowGroupColsSvc:$}=this.beans,X=z.getColDef().pivotValueColumn,Y=I(X),U=null,_;if(Y){let H=Q?.columns??[],G=this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&H.length===1,W=z.getColDef().pivotTotalColumnIds!==void 0;if(G&&!W)return J;U=X?X.getAggFunc():null,_=!0}else{let H=z.isValueActive(),G=$?.columns.length!==0,W=Z.isPivotMode()||G||this.gos.get("treeData");if(H&&W)U=z.getAggFunc(),_=!0;else _=!1}if(_){let H=typeof U==="string"?U:"func";return`${this.getLocaleTextFunc()(H,H)}(${J})`}return J}},jI={sum:"Sum",first:"First",last:"Last",min:"Min",max:"Max",count:"Count",avg:"Average"},VI=class extends j{constructor(){super(...arguments);this.beanName="aggFuncSvc",this.aggFuncsMap={},this.initialised=!1}postConstruct(){this.init()}init(){if(this.initialised)return;this.initialiseWithDefaultAggregations(),this.addAggFuncs(this.gos.get("aggFuncs"))}initialiseWithDefaultAggregations(){let z=this.aggFuncsMap;z.sum=OI,z.first=PI,z.last=TI,z.min=SI,z.max=II,z.count=kI,z.avg=vI,this.initialised=!0}isAggFuncPossible(z,J){let Z=this.getFuncNames(z).includes(J),$=I(this.aggFuncsMap[J]);return Z&&$}getDefaultFuncLabel(z){return jI[z]??z}getDefaultAggFunc(z){let J=z.getColDef().defaultAggFunc;if(I(J)&&this.isAggFuncPossible(z,J))return J;if(this.isAggFuncPossible(z,"sum"))return"sum";let Q=this.getFuncNames(z);return Q?.length?Q[0]:null}addAggFuncs(z){if(this.init(),!z)return;for(let J of Object.keys(z))if(z[J])this.aggFuncsMap[J]=z[J]}getAggFunc(z){return this.init(),this.aggFuncsMap[z]}getFuncNames(z){let J=z.getColDef().allowedAggFuncs;return J==null?Object.keys(this.aggFuncsMap).sort():J}clear(){this.aggFuncsMap={}}};function OI(z){let{values:J}=z,Q=null;for(let Z=0;Z<J.length;Z++){let $=J[Z];if(typeof $==="number")if(Q===null)Q=$;else Q+=typeof Q==="number"?$:BigInt($);else if(typeof $==="bigint")if(Q===null)Q=$;else Q=(typeof Q==="bigint"?Q:BigInt(Q))+$}return Q}function PI(z){return z.values.length>0?z.values[0]:null}function TI(z){return z.values.length>0?N(z.values):null}function SI(z){let{values:J}=z,Q=null;for(let Z=0;Z<J.length;Z++){let $=J[Z];if((typeof $==="number"||typeof $==="bigint")&&(Q===null||Q>$))Q=$}return Q}function II(z){let{values:J}=z,Q=null;for(let Z=0;Z<J.length;Z++){let $=J[Z];if((typeof $==="number"||typeof $==="bigint")&&(Q===null||Q<$))Q=$}return Q}var fI=Object.freeze({toString:function(){return this.value.toString()},toNumber:function(){return this.value}});function kI(z){let{values:J}=z,Q=0;for(let X=0;X<J.length;X++){let Y=J[X];Q+=Y!=null&&typeof Y.value==="number"?Y.value:1}let Z=z.rowNode?.aggData?.[z.column.getColId()];if(Z&&Z.value===Q)return Z;let $=Object.create(fI);return $.value=Q,$}var CI=Object.freeze({toString:function(){return typeof this.value==="number"||typeof this.value==="bigint"?this.value.toString():""},toNumber:function(){return this.value}});function vI(z){let{values:J}=z,Q=0,Z=0;for(let U=0;U<J.length;U++){let _=J[U],H=null;if(typeof _==="number"||typeof _==="bigint")H=_,Z++;else if(_!=null&&(typeof _.value==="number"||typeof _.value==="bigint")&&typeof _.count==="number")H=_.value*(typeof _.value==="number"?_.count:BigInt(_.count)),Z+=_.count;if(typeof H==="number")Q+=typeof Q==="number"?H:BigInt(H);else if(typeof H==="bigint")Q=(typeof Q==="bigint"?Q:BigInt(Q))+H}let $=null;if(Z>0)$=Q/(typeof Q==="number"?Z:BigInt(Z));let X=z.rowNode?.aggData?.[z.column?.getColId()];if(X&&X.count===Z&&X.value===$)return X;let Y=Object.create(CI);return Y.count=Z,Y.value=$,Y}var NI=class extends j{constructor(){super(...arguments);this.beanName="aggChildrenSvc"}getAggregatedChildren(z,J,Q){if(!z?.group)return[];if(z.rowPinned){if(z=z.pinnedSibling,!z)return[]}let Z=this.gos,$=H_(z,J,Z);if(!Q)return $;let X=[];return G_($,J,Z,X),X}},H_=(z,J,Q)=>{let Z=J?.colDef,$=Z?.pivotKeys;if($){if(z.leafGroup&&$.length&&!Z.pivotTotalColumnIds)return uU(z.childrenMapped,$);return z.childrenAfterFilter??z.childrenAfterGroup??[]}if(c4(Q)||Q.get("suppressAggFilteredOnly"))return z.childrenAfterGroup??[];return z.childrenAfterFilter??z.childrenAfterGroup??[]},G_=(z,J,Q,Z)=>{for(let $=0,X=z.length;$<X;++$){let Y=z[$];if(Y.group)G_(H_(Y,J,Q),J,Q,Z);else Z.push(Y)}};function wI(z,J){if(z.aggFuncSvc)z.aggFuncSvc.addAggFuncs(J)}function yI(z){if(z.aggFuncSvc)z.aggFuncSvc.clear()}function xI(z,J,Q){z.valueColsSvc?.setColumnAggFunc?.(J,Q,"api")}var bI=class extends j{constructor(){super(...arguments);this.beanName="aggStage",this.step="aggregate",this.refreshProps=["getGroupRowAgg","alwaysAggregateAtRootLevel","suppressAggFilteredOnly","grandTotalRow"],this.hadAgg=!1}execute(z){let{gos:J,beans:Q}=this,Z=J.getCallback("getGroupRowAgg"),$=Q.valueColsSvc?.columns;if(!$?.length&&!Z){if(this.hadAgg&&!z){this.hadAgg=!1;let{colModel:A,rowModel:O}=Q;t0(O.rootNode,O.hierarchical,void 0,(T)=>{cY(T,null,A)})}return}this.hadAgg=!0;let{colModel:X,aggFuncSvc:Y}=Q,U=J.get("alwaysAggregateAtRootLevel")||!!i4(J)||X.isPivotMode(),_=!c4(J)&&!J.get("suppressAggFilteredOnly"),H=Q.valueSvc,G=Q.gridApi,W=Q.gridOptions.context,q=$??[],B=q.length,E=z?.kind==="cells"?z:void 0,K,F=Array(B);for(let A=0;A<B;++A){let O=q[A],T=E?E.getSlot(O.colId):-1;if(T>=0)K=E;F[A]={column:O,colId:O.colId,colDef:O.colDef,aggFunc:W_(O.getAggFunc(),Y,O),colSlot:T}}let L=uI(X,Q.pivotResultCols,Y),M=B>0?Array(B):null,D=Q.rowModel;t0(D.rootNode,D.hierarchical,z,(A)=>{if(A.level===-1&&!U){X2(A,null,X);return}let O;if(Z)O=Z({nodes:A.childrenAfterFilter});else if(!M)O=null;else if(L)O=hI(A,L,H,G,W);else O=gI(A,F,B,M,K,_,H,G,W);cY(A,O,X)})}},gI=(z,J,Q,Z,$,X,Y,U,_)=>{let H=(X?z.childrenAfterFilter:z.childrenAfterGroup)??[],G=H.length,W=z.data,q=Object.create(null),B=$?$.getSlot(z):-1,E=B>=0?z.aggData:void 0,K=0;for(let F=0;F<Q;++F){let L=J[F];if(B>=0&&!$.hasCellBySlot(B,L.colSlot)){if(Z[F]=null,E)q[L.colId]=E[L.colId]}else Z[F]=Array(G),++K}if(K===0)return q;for(let F=0;F<G;++F){let L=H[F],M=L.aggData;if(M)for(let D=0;D<Q;++D){let A=Z[D];if(A!==null){let O=J[D],T=M[O.colId];A[F]=T!==void 0?T:Y.getValue(O.column,L,"data")}}else for(let D=0;D<Q;++D){let A=Z[D];if(A!==null)A[F]=Y.getValue(J[D].column,L,"data")}}for(let F=0;F<Q;++F){let L=Z[F];if(L===null)continue;let M=J[F],D=M.aggFunc;q[M.colId]=D?D({values:L,column:M.column,colDef:M.colDef,rowNode:z,data:W,aggregatedChildren:H,api:U,context:_}):null}return q},hI=(z,J,Q,Z,$)=>{let X=J.length,Y=z.leafGroup,U=z.data,_=z.childrenMapped,H=z.childrenAfterFilter??[],G=Object.create(null),W,q;for(let B=0;B<X;++B){let E=J[B],K=E.column,F=E.colId,L=E.totalColIds,M,D;if(L!=null){let O=L.length;M=Array(O);for(let T=0;T<O;++T)M[T]=G[L[T]];D=H}else if(Y){let O=E.pivotKeys;if(!q||O!==W)W=O,q=uU(_,O);D=q;let T=D.length;M=Array(T);for(let S=0;S<T;++S)M[S]=Q.getValue(K,D[S],"data")}else{D=H;let O=D.length;M=Array(O);for(let T=0;T<O;++T){let S=D[T],k=S.aggData,C=k?k[F]:void 0;M[T]=C!==void 0?C:Q.getValue(K,S,"data")}}let A=E.aggFunc;G[F]=A?A({values:M,column:K,colDef:K.colDef,pivotResultColumn:E.pivotResultCol,rowNode:z,data:U,aggregatedChildren:D,api:Z,context:$}):null}return G},W_=(z,J,Q)=>{if(typeof z==="function")return z;if(z==null)return null;let Z=J.getAggFunc(z);if(typeof Z!=="function")return V(109,{inputValue:z.toString(),allSuggestions:J.getFuncNames(Q)}),null;return Z},uI=(z,J,Q)=>{if(!z.isPivotActive())return null;let Z=J?.getAggregationOrderedList();if(!Z||Z.length===0)return null;let $=Z.length,X=Array($),Y=0;for(let U=0;U<$;++U){let _=Z[U],H=_.colDef,G=H.pivotValueColumn;if(!G)continue;X[Y++]={column:G,colId:H.colId,aggFunc:W_(G.getAggFunc(),Q,G),pivotResultCol:_,pivotKeys:H.pivotKeys,totalColIds:H.pivotTotalColumnIds}}if(Y===0)return null;return X.length=Y,X},mI=class extends j{constructor(){super(...arguments);this.beanName="filterAggStage",this.step="filter_aggregates",this.refreshProps=[],this.setAllChildrenCountTreeData=(z)=>{let J=z.childrenAfterAggFilter,Q=0;if(J){let $=J.length;Q=$;for(let X=0;X<$;++X)Q+=J[X].allChildrenCount??0}let Z=Q===0&&z.level>=0?null:Q;z.setAllChildrenCount(Z),z.pinnedSibling?.setAllChildrenCount(Z)},this.setAllChildrenCountGridGrouping=(z)=>{let J=z.childrenAfterAggFilter,Q=0;for(let Z=0,$=J.length;Z<$;++Z){let X=J[Z];if(X.group)Q+=X.allChildrenCount;else Q++}z.setAllChildrenCount(Q),z.pinnedSibling?.setAllChildrenCount(Q)}}wireBeans(z){this.filterManager=z.filterManager}execute(z){let{rowModel:J,colModel:Q,groupStage:Z}=this.beans,{filterManager:$}=this,X=Q.isPivotMode(),Y=$?.isAggregateFilterPresent()||$?.isAggregateQuickFilterPresent(),U=!!Z?.treeData,_=(E)=>!E.node.group,H=(E)=>E.node.leafGroup,G=c4(this.gos)||(X?H:_),W=U?this.setAllChildrenCountTreeData:this.setAllChildrenCountGridGrouping,q=(E,K=!1)=>{if(E.childrenAfterFilter){if(E.childrenAfterAggFilter=E.childrenAfterFilter,K){let F=E.childrenAfterAggFilter;for(let L=0,M=F.length;L<M;++L)q(F[L],K)}if(E.hasChildren())W(E);else E.setAllChildrenCount(null),E.pinnedSibling?.setAllChildrenCount(null)}if(E.sibling)E.sibling.childrenAfterAggFilter=E.childrenAfterAggFilter},B=(E)=>{if(E.childrenAfterAggFilter=E.childrenAfterFilter?.filter((K)=>{if(G({node:K})){if($.doesRowPassAggregateFilters({rowNode:K}))return q(K,!0),!0}return K.childrenAfterAggFilter?.length})||null,E.hasChildren())W(E);else E.setAllChildrenCount(null),E.pinnedSibling?.setAllChildrenCount(null);if(E.sibling)E.sibling.childrenAfterAggFilter=E.childrenAfterAggFilter};t0(J.rootNode,J.hierarchical,z,Y?B:q)}};function G6(z,J){if(z.sibling)return;let Q=M$(z,J);Q.footer=!0,Q.setRowTop(null),Q.setRowIndex(null),Q.oldRowTop=null,Q.id="rowGroupFooter_"+z.id,Q.sibling=z,z.sibling=Q}function cI(z){let J=z.sibling;if(!J)return;J._destroy(!1),z.sibling=void 0,J.sibling=void 0}var pI=class extends j{constructor(){super(...arguments);this.beanName="footerSvc"}addTotalRows(z,J,Q,Z,$,X){let Y=z;if($){let H=Z&&i4(this.gos);if(iI(X,H))G6(J,this.beans),Q(J.sibling,Y++);return Y}let U=FJ(this.gos);if((Z&&U({node:J}))===X)G6(J,this.beans),Q(J.sibling,Y++);return Y}getTopDisplayIndex(z,J,Q,Z){let $=J;if(z[0].footer){if(J===0)return 0;$-=1}let X=z[z.length-1],Y=$>=Q.length;if(X.footer&&Y)return X.rowIndex;return Z($)}doesCellShowTotalPrefix(z,J){if(!z.footer||!J?.getColDef().showRowGroup)return!1;if(this.gos.get("treeData"))return!0;if(z.level===-1)return this.beans.showRowGroupCols?.columns[0]===J;return!!z.rowGroupColumn&&J?.isRowGroupDisplayed(z.rowGroupColumn.getId())}applyTotalPrefix(z,J,Q,Z){let $=Z.getColDef().cellRendererParams?.totalValueGetter;if($){let X=v(this.gos,{column:Z,node:Q,value:z,formattedValue:J});if(typeof $==="function")return $(X);if(typeof $==="string")return this.beans.expressionSvc?.evaluate($,X);V(179)}if(Q.level===-1)return this.getLocaleTextFunc()("footerTotal","Total")+" ";return this.getTotalValue(J??z)??""}getTotalValue(z){return this.getLocaleTextFunc()("footerTotal","Total")+" "+(z??"")}};function iI(z,J){switch(J){case"top":case"pinnedTop":return z==="top";case"bottom":case"pinnedBottom":return z==="bottom";default:return!1}}var q_=class extends Q2{constructor(){super(...arguments);this.beanName="valueColsSvc",this.eventName="columnValueChanged",this.columnProcessors={set:(z,J,Q)=>this.setValueActive(J,z,Q),add:(z,J,Q)=>this.setValueActive(!0,z,Q),remove:(z,J,Q)=>this.setValueActive(!1,z,Q)},this.columnExtractors={setFlagFunc:(z,J,Q)=>this.setColValueActive(z,J,Q),getIndexFunc:()=>{return},getInitialIndexFunc:()=>{return},getValueFunc:(z)=>{let J=z.aggFunc;if(J===null||J==="")return null;if(J===void 0)return;return!!J},getInitialValueFunc:(z)=>{return z.initialAggFunc!=null&&z.initialAggFunc!=""}},this.modifyColumnsNoEventsCallbacks={addCol:(z)=>this.columns.push(z),removeCol:(z)=>X0(this.columns,z)}}extractCols(z,J){this.columns=super.extractCols(z,J);for(let Q of this.columns){let Z=Q.getColDef();if(Z.aggFunc!=null&&Z.aggFunc!="")this.setColAggFunc(Q,Z.aggFunc);else if(!Q.getAggFunc())this.setColAggFunc(Q,Z.initialAggFunc)}return this.columns}setColumnAggFunc(z,J,Q){if(!z)return;let Z=this.colModel.getColDefCol(z);if(!Z)return;this.setColAggFunc(Z,J),this.dispatchColumnChangedEvent(this.eventSvc,this.eventName,[Z],Q)}syncColumnWithState(z,J,Q){let Z=Q("aggFunc").value1;if(Z!==void 0)if(typeof Z==="string"){if(this.setColAggFunc(z,Z),!z.isValueActive())this.setColValueActive(z,!0,J),this.modifyColumnsNoEventsCallbacks.addCol(z)}else{if(I(Z))V(33);if(z.isValueActive())this.setColValueActive(z,!1,J),this.modifyColumnsNoEventsCallbacks.removeCol(z)}}setValueActive(z,J,Q){if(z===J.isValueActive())return;if(this.setColValueActive(J,z,Q),z&&!J.getAggFunc()&&this.aggFuncSvc){let Z=this.aggFuncSvc.getDefaultAggFunc(J);this.setColAggFunc(J,Z)}}setColAggFunc(z,J){z.aggFunc=J,z.dispatchStateUpdatedEvent("aggFunc")}setColValueActive(z,J,Q){if(z.aggregationActive!==J)z.aggregationActive=J,z.dispatchColEvent("columnValueChanged",Q)}},B_={moduleName:"SharedAggregation",version:$0,beans:[VI,AI,pI,q_],apiFunctions:{addAggFuncs:wI,clearAggFuncs:yI,setColumnAggFunc:xI},dependsOn:[N0]},dI={moduleName:"Aggregation",version:$0,beans:[bI,mI,NI],rowModels:["clientSide"],dependsOn:[B_]},E_=class extends Q2{constructor(){super(...arguments);this.beanName="pivotColsSvc",this.eventName="columnPivotChanged",this.columnProcessors={set:(z,J,Q)=>this.setColPivotActive(z,J,Q),add:(z,J,Q)=>this.setColPivotActive(z,!0,Q),remove:(z,J,Q)=>this.setColPivotActive(z,!1,Q)},this.columnOrdering={enableProp:"pivot",initialEnableProp:"initialPivot",indexProp:"pivotIndex",initialIndexProp:"initialPivotIndex"},this.columnExtractors={setFlagFunc:(z,J,Q)=>this.setColPivotActive(z,J,Q),getIndexFunc:(z)=>z.pivotIndex,getInitialIndexFunc:(z)=>z.initialPivotIndex,getValueFunc:(z)=>z.pivot,getInitialValueFunc:(z)=>z.initialPivot},this.modifyColumnsNoEventsCallbacks={addCol:(z)=>{if(!this.columns.includes(z))this.columns.push(z)},removeCol:(z)=>X0(this.columns,z)}}syncColumnWithState(z,J,Q,Z){let{value1:$,value2:X}=Q("pivot","pivotIndex");if($!==void 0||X!==void 0){if(typeof X==="number"||$){if(!z.isPivotActive())this.setColPivotActive(z,!0,J),this.modifyColumnsNoEventsCallbacks.addCol(z);if(Z&&typeof X==="number")Z[z.getId()]=X}else if(z.isPivotActive())this.setColPivotActive(z,!1,J),this.modifyColumnsNoEventsCallbacks.removeCol(z)}}setColPivotActive(z,J,Q){if(z.pivotActive!==J){if(z.pivotActive=J,J)this.beans.groupHierarchyColSvc?.insertVirtualColumnsForCol(this.columns,z)?.forEach(($)=>this.setColPivotActive($,J,Q));z.dispatchColEvent("columnPivotChanged",Q)}z.dispatchStateUpdatedEvent("pivot")}},nI=class extends Q2{constructor(){super(...arguments);this.beanName="rowGroupColsSvc",this.eventName="columnRowGroupChanged",this.columnProcessors={set:(z,J,Q)=>this.setActive(J,z,Q),add:(z,J,Q)=>this.setActive(!0,z,Q),remove:(z,J,Q)=>this.setActive(!1,z,Q)},this.columnOrdering={enableProp:"rowGroup",initialEnableProp:"initialRowGroup",indexProp:"rowGroupIndex",initialIndexProp:"initialRowGroupIndex"},this.columnExtractors={setFlagFunc:(z,J,Q)=>this.setColRowGroupActive(z,J,Q),getIndexFunc:(z)=>z.rowGroupIndex,getInitialIndexFunc:(z)=>z.initialRowGroupIndex,getValueFunc:(z)=>z.rowGroup,getInitialValueFunc:(z)=>z.initialRowGroup},this.modifyColumnsNoEventsCallbacks={addCol:(z)=>{if(!this.columns.includes(z))this.columns.push(z)},removeCol:(z)=>X0(this.columns,z)}}moveColumn(z,J,Q){if(this.columns.length===0)return;let Z=this.columns[z],$=this.columns.slice(z,J);this.columns.splice(z,1),this.columns.splice(J,0,Z),this.updateIndexMap(),this.eventSvc.dispatchEvent({type:this.eventName,columns:$,column:$.length===1?$[0]:null,source:Q})}syncColumnWithState(z,J,Q,Z){let{value1:$,value2:X}=Q("rowGroup","rowGroupIndex");if($!==void 0||X!==void 0){if(typeof X==="number"||$){if(!z.isRowGroupActive())this.setColRowGroupActive(z,!0,J),this.modifyColumnsNoEventsCallbacks.addCol(z);if(Z&&typeof X==="number")Z[z.getId()]=X}else if(z.isRowGroupActive())this.setColRowGroupActive(z,!1,J),this.modifyColumnsNoEventsCallbacks.removeCol(z)}}setActive(z,J,Q){if(z===J.isRowGroupActive())return;this.setColRowGroupActive(J,z,Q);let Z=this.beans.groupHierarchyColSvc?.getColumn(J);if(MJ(this.gos,z)&&!Z)this.colModel.setColsVisible([J],!z,Q)}setColRowGroupActive(z,J,Q){if(z.rowGroupActive!==J){if(z.rowGroupActive=J,J)this.beans.groupHierarchyColSvc?.insertVirtualColumnsForCol(this.columns,z)?.forEach(($)=>this.setColRowGroupActive($,J,Q));z.dispatchColEvent("columnRowGroupChanged",Q)}z.dispatchStateUpdatedEvent("rowGroup")}},rI=class extends j{constructor(){super(...arguments);this.beanName="autoColSvc"}postConstruct(){this.addManagedPropertyListener("autoGroupColumnDef",this.updateColumns.bind(this)),this.setupGroupHideColumnsUntilExpanded()}setupGroupHideColumnsUntilExpanded(){let z=()=>this.updateGroupColumnVisibility();this.addManagedEventListeners({modelUpdated:z}),this.addManagedPropertyListeners(["groupHideColumnsUntilExpanded","groupDisplayType","groupHideOpenParents"],z)}addColumns(z){let{columns:J}=this;if(J==null)return;z.list=J.list.concat(z.list),z.tree=J.tree.concat(z.tree),r2(z)}createColumns(z,J,Q){let Z=this.beans,{colModel:$,gos:X,rowGroupColsSvc:Y,colGroupSvc:U}=Z,_=$.isPivotMode(),H=LJ(X,_),G=_?X.get("pivotSuppressAutoColumn"):this.isSuppressAutoCol(),W=Y?.columns,B=!(W&&W.length>0||X.get("treeData"))||G||H,E=()=>{if(this.columns)G4(Z,this.columns.tree),this.columns=null};if(B){E();return}let K=this.generateAutoCols(W),F=n2(K,this.columns?.list||null),L=z.treeDepth,D=(this.columns?this.columns.treeDepth:-1)==L;if(F&&D){let S=new Map(K.map((k)=>[k.getId(),k]));for(let k of this.columns?.list??[]){let C=S.get(k.getId());if(C)k.setColDef(C.getColDef(),null,Q)}return}E();let A=U?.findDepth(z.tree)??0,O=U?.balanceTreeForAutoCols(K,A)??[];this.columns={list:K,tree:O,treeDepth:A,map:{}},J((S)=>{if(!S)return null;let k=S.filter((C)=>!U1(C));return[...K,...k]})}updateColumns(z){let J=Az(z.source);this.columns?.list.forEach((Q,Z)=>this.updateOneAutoCol(Q,Z,J))}getColumn(z){return this.columns?.list.find((J)=>m4(J,z))??null}getColumns(){return this.columns?.list??null}generateAutoCols(z=[]){let J=[],{gos:Q}=this,Z=Q.get("treeData"),$=i2(Q);if(Z&&$)V(182),$=!1;if($)z.forEach((X,Y)=>{J.push(this.createOneAutoCol(X,Y))});else J.push(this.createOneAutoCol());return J}isSuppressAutoCol(){let z=this.gos;if(z.get("groupDisplayType")==="custom")return!0;return z.get("treeDataDisplayType")==="custom"}createOneAutoCol(z,J){let Q;if(z)Q=`${Y1}-${z.getId()}`;else Q=Y1;let Z=this.createAutoColDef(Q,z,J);Z.colId=Q;let $=new E4(Z,null,Q,!0);return this.createBean($),$}updateOneAutoCol(z,J,Q){let Z=z.getColDef(),$=typeof Z.showRowGroup=="string"?Z.showRowGroup:void 0,X=this.beans,Y=$!=null?X.colModel.getColDefCol($):void 0,U=z.getId(),_=this.createAutoColDef(U,Y??void 0,J);z.setColDef(_,null,Q),o0(X,{state:[tZ(_,U)]},Q)}createAutoColDef(z,J,Q){let Z=this.createBaseColDef(J),$=this.gos.get("autoGroupColumnDef");if(M0(Z,$),Z=Qz(this.beans,Z,z,!0),$?.groupRowEditable==null)Z.groupRowEditable=void 0;if($?.groupRowValueSetter==null)Z.groupRowValueSetter=void 0;if(!this.gos.get("treeData")){if(n(Z.field)&&n(Z.valueGetter)&&n(Z.filterValueGetter)&&Z.filter!=="agGroupColumnFilter")Z.filter=!1}if(Q&&Q>0)Z.headerCheckboxSelection=!1;let X=x4(this.gos),Y=Z.valueGetter||Z.field!=null;if(X&&!Y)Z.sortIndex=void 0,Z.initialSort=void 0;return Z}createBaseColDef(z){let J=this.gos.get("autoGroupColumnDef"),Z={headerName:this.getLocaleTextFunc()("group","Group"),showRowGroup:z?.getColId()??!0};if(!(J&&(J.cellRenderer||J.cellRendererSelector)))Z.cellRenderer="agGroupCellRenderer";if(z)Z.headerName=this.beans.colNames.getDisplayNameForColumn(z,"header")??void 0,Z.headerValueGetter=z.colDef.headerValueGetter;return Z}getDeepestExpandedLevel(z,J){let Q=-1;if(!z)return Q;for(let Z of z){if(!Z.group||!Z.expanded)continue;if(Z.level>Q)Q=Z.level;if(Q>=J)return Q;let $=this.getDeepestExpandedLevel(Z.childrenAfterGroup,J);if($>Q)Q=$;if(Q>=J)return Q}return Q}updateGroupColumnVisibility(){let z=this.columns?.list;if(!z||z.length===0)return;let{gos:J,visibleCols:Q,rowModel:Z}=this.beans,$=cZ(J),X=!1,Y=(_,H)=>{if(H!==_.isVisible())_.setVisible(H,"api"),X=!0},U=()=>{for(let _ of z)Y(_,!0)};if(!$)U();else if(z.length>1){let _=z.length-2,H=Z?.rootNode?.childrenAfterGroup,G=this.getDeepestExpandedLevel(H,_);if(G>=_)U();else for(let W=0;W<z.length-1;W++)Y(z[W+1],G>=W)}if(X)Q.refresh("api")}destroy(){G4(this.beans,this.columns?.tree),super.destroy()}},R7=null,aY=(z)=>{let J=R7,Q=new Uint32Array(1<<32-Math.clz32(z|63));if(J)Q.set(J);return R7=Q,Q},tI=(z,J,Q,Z)=>{let $=J-Z,X=Q-1;if($===1){let H=0;while(z[H].level===X)++H;if(H<J-1){let G=z[H];z.copyWithin(H,H+1),z[J-1]=G}return z}if(Z===1){let H=0;while(z[H].level!==X)++H;if(H>0){let G=z[H];z.copyWithin(1,0,H),z[0]=G}return z}let Y=Array($),U=0,_=0;for(let H=0;H<J;++H){let G=z[H];if(G.level===X)z[U++]=G;else Y[_++]=G}for(let H=0;H<$;++H)z[Z+H]=Y[H];return z},sI=(z,J)=>{let Q=z[0].level+1,Z=Q,$=0,X=Q,Y=R7;if(!Y||Q>=Y.length)Y=aY(Q);++Y[Q];for(let W=1;W<J;++W){let q=z[W].level+1;if(q>Q){if(Q=q,Q>=Y.length)Y=aY(Q)}else if(q<Z)Z=q;++Y[q],$|=X-q,X=q}if($>=0)return Y.fill(0,Z,Q+1),z;let U=Y[Z],_=Y[Q];if(U+_===J)return Y[Z]=0,Y[Q]=0,tI(z,J,Q,_);let H=0;for(let W=Q;W>=Z;--W){let q=Y[W];Y[W]=H,H+=q}let G=Array(J);for(let W=0;W<J;++W){let q=z[W];G[Y[q.level+1]++]=q}return Y.fill(0,Z,Q+1),G},K_=(z,J=z.length)=>{if(J===2){if(z[0].level<z[1].level){let Q=z[0];z[0]=z[1],z[1]=Q}return z}if(J>16)return sI(z,J);for(let Q=1;Q<J;Q++){let Z=z[Q],$=Z.level,X=Q-1;if(z[X].level<$){let Y=Q;do z[Y]=z[X],Y=X--;while(X>=0&&z[X].level<$);z[Y]=Z}}return z},lI=class{constructor(){this.kind="cells",this.rows=[],this.unsorted=!1,this.slots=new Map,this.bits=[],this.extraBits=null,this.colCount=0}addRow(z){let J=z;if(J==null)return;let Q=this.slots;if(Q.get(J)!==void 0){while(J!=null&&Q.get(J)>=0)Q.set(J,-1),J=J.parent;return}let Z=this.rows;do Q.set(J,-1),Z.push(J),J=J.parent;while(J!=null&&!Q.has(J));this.unsorted=!0}addCell(z,J){if(J==null){this.addRow(z);return}if(z==null)return;let Q=this.slots,Z=this.bits,$=Q.get(J)??this.ensureCol(J),X=Q.get(z);if(X===void 0)X=this.ensureRow(z);else if(X<0)return;let Y=$<32?Z:this.extraBits[($>>>5)-1],U=1<<($&31),_=Y[X];if((_&U)!==0)return;Y[X]=_|U;let H=z.parent;while(H!=null){let G=Q.get(H);if(G<0)break;let W=Y[G];if((W&U)!==0)break;Y[G]=W|U,H=H.parent}}hasRow(z){return this.slots.has(z)}getSortedRows(){if(!this.unsorted)return this.rows;this.unsorted=!1;let z=K_(this.rows);return this.rows=z,z}getSlot(z){return this.slots.get(z)??-1}hasCellBySlot(z,J){if(z<0)return!0;if(J<32)return J>=0&&(this.bits[z]&1<<J)!==0;return(this.extraBits[(J>>>5)-1][z]&1<<(J&31))!==0}ensureRow(z){let J=this.slots,Q=this.rows,Z=this.bits,$=this.extraBits,X=Z.push(0),Y=X-1;if($!==null)for(let _=0,H=$.length;_<H;++_)$[_].push(0);J.set(z,Y),Q.push(z),this.unsorted=!0;let U=z.parent;while(U!=null&&!J.has(U)){if(J.set(U,X),Q.push(U),X=Z.push(0),$!==null)for(let _=0,H=$.length;_<H;++_)$[_].push(0);U=U.parent}return Y}ensureCol(z){let J=this.colCount++;if(this.slots.set(z,J),J>=32){let Q=(J>>>5)-1,Z=this.extraBits;if(Z===null)Z=[],this.extraBits=Z;if(Q>=Z.length)Z.push(Array(this.bits.length).fill(0))}return J}},oY=class{constructor(){this.kind="rows",this.rows=[],this.unsorted=!1,this.rowSet=new Set}addRow(z){let J=z;if(J==null)return;let Q=this.rowSet;if(Q.has(J))return;let Z=this.rows;do Q.add(J),Z.push(J),J=J.parent;while(J!=null&&!Q.has(J));this.unsorted=!0}addCell(z,J){this.addRow(z)}hasRow(z){return this.rowSet.has(z)}getSortedRows(){if(!this.unsorted)return this.rows;this.unsorted=!1;let z=K_(this.rows);return this.rows=z,z}},aI=class extends j{constructor(){super(...arguments);this.beanName="changedPathFactory"}newPath(z){return z?new lI:new oY}ensureRowsPath(z){let J=z.changedPath;if(!J&&z.changedRowNodes&&!z.newData){let Q=this.beans.rowModel;if(Q.hierarchical)J=new oY,z.changedPath=J,J.addRow(Q.rootNode)}return J}},oI=class extends j{addExpandedCss(z,J){if(J.isExpandable())z.push("ag-row-group"),z.push(J.expanded?"ag-row-group-expanded":"ag-row-group-contracted")}getRowExpandedListeners(z){let{rowNode:J}=z,Q=this.updateExpandedCss.bind(this,z,J);return{expandedChanged:Q,hasChildrenChanged:Q}}setExpanded(z,J,Q,Z){if(z.expanded===J)return;z._expanded=J,z.dispatchRowEvent("expandedChanged");let $={...X5(z,this.gos,"rowGroupOpened"),expanded:J,event:Q||null};this.dispatchExpandedEvent($,Z)}defaultExpanded(z){let Q=this.beans.gos,Z=z.level??0,$=z.group&&Q.get("isGroupOpenByDefault");if(!$){let Y=Q.get("groupDefaultExpanded");return Y===-1||Z<Y}let X=v(Q,{rowNode:z,field:z.field,key:z.key,level:Z,rowGroupColumn:z.rowGroupColumn});return!!$(X)}isExpandable(z){if(z.footer)return!1;if(this.beans.colModel.isPivotMode())return z.hasChildren()&&!z.leafGroup;return z.hasChildren()||z.master}updateExpandedCss(z,J){let Q=J.isExpandable(),Z=J.expanded==!0;z.forEachGui(void 0,($)=>{let X=$.rowComp;X.toggleCss("ag-row-group",Q),X.toggleCss("ag-row-group-expanded",Q&&Z),X.toggleCss("ag-row-group-contracted",Q&&!Z),S0($.element,Q&&Z)})}dispatchStateUpdatedEvent(){this.eventSvc.dispatchEvent({type:"rowExpansionStateChanged"})}},eI=class extends oI{constructor(){super(...arguments);this.beanName="expansionSvc",this.events=null,this.dispatchExpandedDebounced=null}destroy(){super.destroy(),this.events=null,this.dispatchExpandedDebounced=null}setExpansionState(z){let J=new Set(z.expandedRowGroupIds);this.beans.rowModel.forEachNode((Q)=>{let Z=Q.id;if(!Z)return;Q._expanded=J.has(Z)}),this.onGroupExpandedOrCollapsed()}getInternalExpansionState(z=!1){let J=[],Q=[];return this.beans.rowModel.forEachNode((Z)=>{let $=Z.id;if(!$)return;if(Z.expanded)J.push($);else if(z&&Z.isExpandable())Q.push($)}),{expandedRowGroupIds:J,collapsedRowGroupIds:Q}}getExpansionState(){return this.getInternalExpansionState()}isExpanded(z){if(z.footer)return!!z._expanded;if(!(z.group||z.master)||z.leafGroup&&this.beans.colModel.isPivotMode())return!1;let J=z._expanded;if(J===null)J=this.defaultExpanded(z)??!1,z._expanded=J;return!!J}resetExpansion(){let{rowModel:z}=this.beans;z.forEachNode((J)=>{if(!J.group&&!J.master)return;J._expanded=null}),this.onGroupExpandedOrCollapsed()}expandAll(z){let{gos:J,rowModel:Q,colModel:Z,eventSvc:$}=this.beans,X=J.get("treeData"),Y=Z.isPivotActive(),U=(H)=>{if(!H)return;for(let G of H){let W=()=>{G._expanded=z,U(G.childrenAfterGroup)};if(G.master){W();continue}if(X){if(I(G.childrenAfterGroup))W();continue}if(Y){if(!G.leafGroup)W();continue}if(G.group)W()}},_=Q.rootNode;if(_)U(_.childrenAfterGroup);this.onGroupExpandedOrCollapsed(),$.dispatchEvent({type:"expandOrCollapseAll",source:z?"expandAll":"collapseAll"})}onGroupExpandedOrCollapsed(){this.dispatchStateUpdatedEvent(),this.beans.rowModel.reMapRows()}setDetailsExpansionState(z){let J=this.getInternalExpansionState(!0),Q=J.collapsedRowGroupIds.length===0;if(J.expandedRowGroupIds.length===0===Q)return;return Q?z.expandAll():z.collapseAll()}dispatchExpandedEvent(z,J){if((this.events??(this.events=[])).push(z),J){this.dispatchExpandedEvents();return}let Q=this.dispatchExpandedDebounced;if(!Q){if(!this.isAlive())return;Q=this.debounce(()=>this.dispatchExpandedEvents()),this.dispatchExpandedDebounced=Q}Q()}dispatchExpandedEvents(){let{eventSvc:z,rowRenderer:J}=this.beans,Q=this.events,Z=Q?.length;if(!Z)return;this.events=null;let $=Array(Z);for(let X=0;X<Z;++X)$[X]=Q[X].node,z.dispatchEvent(Q[X]);this.dispatchStateUpdatedEvent(),J.refreshCells({rowNodes:$})}debounce(z){let J=this.beans.animationFrameSvc;if(!J)return()=>window.setTimeout(z,0);let Q=!1;return()=>{if(!J.active){window.setTimeout(z,0);return}if(Q)return;Q=!0,J.addDestroyTask(()=>{Q=!1,z()})}}};function zf(z){let J=z.get("groupHideParentOfSingleChild");if(!J){if(J=z.get("groupRemoveSingleChildren"),!J&&z.get("groupRemoveLowestSingleChildren"))J="leafGroupsOnly"}return{groupHideParentOfSingleChild:J,isGroupMultiAutoColumn:i2(z),hideOpenParents:z.get("groupHideOpenParents"),grandTotalRow:i4(z),groupTotalRow:FJ(z)}}function Jf(z,J,Q){return z.groupHideParentOfSingleChild===!0&&Q&&J.childrenAfterGroup.length===1}function Qf(z,J,Q){return z.groupHideParentOfSingleChild==="leafGroupsOnly"&&Q&&J.leafGroup&&J.childrenAfterGroup.length===1}function Zf(z,J,Q,Z,$,X){if(Z&&!Q)return!1;if($||X)return!1;if(!z.hideOpenParents)return!0;if(J.master||J.level===-1)return!0;if(!(Z&&J.leafGroup)&&J.expanded)return!1;return!0}var $f=class extends j{constructor(){super(...arguments);this.beanName="flattenStage",this.step="map",this.refreshProps=["groupHideParentOfSingleChild","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","groupTotalRow","masterDetail"]}execute(){let{beans:z,gos:J}=this,Q=[],Z=z.rowModel.rootNode;if(!Z)return Q;let $=z.colModel.isPivotMode(),X=$&&Z.leafGroup&&Z.aggData,Y=X?[Z]:Z.childrenAfterSort,U=zf(J);this.recursivelyAddToRowsToDisplay(U,Y,Q,$,0);let _=Q.length>0,H=U.grandTotalRow;if(!X&&_&&H)if(G6(Z,z),H==="pinnedBottom"||H==="pinnedTop")this.beans.pinnedRowModel?.setGrandTotalPinned(H==="pinnedBottom"?"bottom":"top");else{let W=H==="top";this.addRowNodeToRowsToDisplay(U,Z.sibling,Q,0,W)}return Q}recursivelyAddToRowsToDisplay(z,J,Q,Z,$){if(!J?.length)return;let X=this.beans.masterDetailSvc;for(let Y=0;Y<J.length;Y++){let U=J[Y],_=U.hasChildren(),H=Jf(z,U,_),G=Qf(z,U,_);if(Zf(z,U,_,Z,H,G))this.addRowNodeToRowsToDisplay(z,U,Q,$);if(Z&&U.leafGroup)continue;if(_){let q=H||G;if(U.expanded||q){let B=z.groupTotalRow({node:U});if(!B)cI(U);let E=q?$:$+1;if(B==="top")G6(U,this.beans),this.addRowNodeToRowsToDisplay(z,U.sibling,Q,E);let K=X?.getDetail(U);if(K)this.addRowNodeToRowsToDisplay(z,K,Q,$);if(this.recursivelyAddToRowsToDisplay(z,U.childrenAfterSort,Q,Z,E),B==="bottom")G6(U,this.beans),this.addRowNodeToRowsToDisplay(z,U.sibling,Q,E)}}else{let q=X?.getDetail(U);if(q)this.addRowNodeToRowsToDisplay(z,q,Q,$)}}}addRowNodeToRowsToDisplay(z,J,Q,Z,$){if($)Q.unshift(J);else Q.push(J);J.setUiLevel(z.isGroupMultiAutoColumn?0:Z)}},Xf=class extends j{constructor(){super(...arguments);this.beanName="groupEditSvc",this.pendingEditRefresh=null,this.dropGroupTarget=null,this.dropGroupTimer=null,this.dropGroupThrottled=!1,this.draggingGroups=null}postConstruct(){if(o(this.gos))this.addManagedListeners(this.eventSvc,{cellValueChanged:(z)=>this.onCsrmCellChange(z),batchEditingStopped:()=>this.flushGroupEdits()})}destroy(){this.stopDragging(!0),super.destroy()}isGroupingDrop(z){if(!z.rowDragManaged||!z.sameGrid)return!1;if(!this.gos.get("refreshAfterGroupEdit"))return!1;return!!this.beans.rowGroupColsSvc?.columns?.length&&!this.beans.colModel.isPivotMode()}initDraggingGroups(z){let J=new Map,Q=(Z)=>{let $=Z.childrenAfterGroup;if($){if(J.has(Z))return;let X=$.slice();J.set(Z,X);for(let Y of X)Q(Y)}};for(let Z of z.rows)if(Z.group)Q(Z);this.draggingGroups=J}canSetParent(z){if(!z.sameGrid)return!1;if(this.beans.groupStage?.treeData)return!0;if(z.rowDragManaged&&!this.gos.get("refreshAfterGroupEdit"))return!1;return!!this.beans.rowGroupColsSvc?.columns?.length}canDropRow(z,J){if(this.beans.groupStage?.treeData)return!Yf(z,J.newParent);let{position:Q,target:Z,newParent:$,rootNode:X}=J,Y=z.parent;if(z.group&&(zU(z,Z)||zU(z,$)))return!1;if(Q==="inside")return!0;if($&&$!==Y)return $!==X||Y===X;let U=$??Z?.parent??X;if(U!==Y)return!1;let _=z.group?z.level:Y.level??-1,H=-1;if(Z)H=Z.group?Z.level:Z.parent?.level??-1;else if(U)H=U.level;if(_>=0&&H>=0&&H!==_)return!1;return!0}fixRowsDrop(z,J,Q,Z){let $=!!this.beans.groupStage?.treeData;if(z.treeData=$,!(!!this.beans.rowGroupColsSvc?.columns?.length||this.gos.get("pivotMode"))&&!$)return;if(!this.draggingGroups&&this.isGroupingDrop(z)&&!z.suppressMoveWhenRowDragging)this.initDraggingGroups(z);let Y=z.target,U=null,_=!1,H=z.rootNode,G=this.beans.rowModel,W=this.canStartGroup(Y,$);this.updateDropTarget(z,Q,W);let q=this.beans.pageBounds?.getLastRow?.()??G.getRowCount()-1;if(J){if(!Y||Z>=0.5&&Y.rowIndex===q)U=H;else if(z.moved&&Y&&this.dropGroupThrottled&&this.shouldDropTargetBeParent(z))U=Y;if(!U)U=Y?.parent??H}if(!Q&&Y&&W&&!(Y.group&&Y.expanded))this.startDropGroupDelay(Y);if(U){if(Y&&U===Y&&U!==H){let B=U.expanded?D$(G,1,Y):null;if(B?.parent===U)Y=B,Z=-0.5;else _=!0}if(Y&&!_){let B=Y;while(B&&B!==H&&B!==U)Y=B,B=B.parent}}z.target=Y,z.newParent=U,z.yDelta=Z,z.inside=_}clearNewSameParent(z,J){let Q=z.newParent;if(Q&&(!J||Uf(z.rows,Q)))z.newParent=null}updateDropTarget(z,J,Q){let Z=Q?z.target:null;if(this.dropGroupTarget&&this.dropGroupTarget!==Z)this.resetDragGroup();if(!Z?.childrenAfterSort?.length)return;if(J&&this.dropGroupThrottled&&!Z.expanded&&Z.isExpandable?.())Z.setExpanded(!0,void 0,!0);if(this.canDropInTarget(Z,z))this.dropGroupThrottled=!0,this.dropGroupTarget=Z}canDropInTarget(z,J){if(z.expanded)return!0;if(!z.group)return!1;if(J.pointerPos==="inside")return!0;if(J.treeData)return!1;let Q=J.rows,Z=z.level;for(let $=0,X=Q.length;$<X;++$){let Y=Q[$];if(Y!==z&&Y.group&&Y.level!==Z)return!1}return!0}startDropGroupDelay(z){if(this.dropGroupTarget&&this.dropGroupTarget!==z)this.resetDragGroup();if(this.dropGroupTarget=z,this.dropGroupTimer!==null)return;let J=this.gos.get("rowDragInsertDelay");this.dropGroupTimer=window.setTimeout(()=>{this.dropGroupTimer=null,this.dropGroupThrottled=!0,this.beans.dragAndDrop?.nudge()},J)}resetDragGroup(){if(this.dropGroupTimer!==null)window.clearTimeout(this.dropGroupTimer),this.dropGroupTimer=null;this.dropGroupTarget=null,this.dropGroupThrottled=!1}stopDragging(z){if(z)this.draggingGroups=null;this.resetDragGroup()}shouldDropTargetBeParent({target:z,rows:J,pointerPos:Q,treeData:Z}){if(!z||Q==="none")return!1;if(Q==="inside")return!0;if(!Z&&z.group&&!z.expanded)return!0;if(Q==="above")return!1;let $=this.beans.rowModel,Y=z.rowIndex+1,U;do U=$.getRow(Y++);while(U?.footer);let _=this.draggingGroups?.get(z)??z.childrenAfterGroup;if(U&&U.parent===z&&_?.length){let H=new Set(J);for(let G=0,W=_.length;G<W;++G){let q=_[G];if(q.rowIndex!==null&&!H.has(q))return!0}}return!1}dropGroupEdit(z){let{beans:J}=this,Q=z.position,Z=z.target??null,$=z.rootNode,X=z.newParent??Z?.parent??$,Y=J.focusSvc,U=Y.getFocusedCell(),_=U&&Y4(J,U),H=new Set,G=new x1,W=G.updates,q,B=(M)=>{if(H.has(M))return;if(H.add(M),q??(q=this.newGroupValues(X)),this.setRowGroup(M,q))W.add(M)},E=(M)=>{let D=this.draggingGroups?.get(M)??M.childrenAfterGroup,A=D?.length;if(A)for(let O=0;O<A;++O){let T=D[O];if(T.sourceRowIndex>=0)B(T);else E(T)}};for(let M of z.rows)if(M.group)E(M);else{let D=M.sourceRowIndex>=0&&!M.destroyed?M:this.csrmFirstLeaf(M);if(D)B(D)}let K=Q==="inside"?"above":Q,F=Q==="inside"?this.findFirstLeafForParent(X,H)??Z:Z,L=!1;if(H.size&&K!=="none")L=d$($._leafs,H,F,K==="above");if(!W.size&&!L)return!1;G.reordered=L;for(let M of H)G.updates.add(M);if(this.csrmRefresh(G),_)_.focusCell();else Y.clearFocusedCell();return!0}canStartGroup(z,J){if(!z||z.level<0||z.footer||z.detail)return!1;if(z.group)return!0;return J}flushGroupEdits(){let z=this.pendingEditRefresh;if(z)this.pendingEditRefresh=null,this.csrmRefresh(z)}csrmRefresh(z){let J=this.beans.rowModel;if(!J.rootNode)return;J.refreshModel({step:"group",keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame"),changedRowNodes:z})}newGroupValues(z){let J=this.beans.rowGroupColsSvc?.columns??[],Q=Array(J.length),Z=-1,$=z;while($&&$.level>=0){let X=J[$.level];if(X){let Y=X.getColId(),U=$.level;if(Q[U]=$.groupData?.[Y]??$.key??void 0,U>Z)Z=U}$=$.parent}return{values:Q,columns:J,maxLevel:Z}}setRowGroup(z,{values:J,columns:Q,maxLevel:Z}){if(Z<0)return!1;let{valueSvc:$,changeDetectionSvc:X}=this.beans,Y=!1;X?.beginDeferred();try{for(let U=0;U<Q.length;++U){let _=Q[U];if(!_||U>Z)continue;let H=J[U],G=$.getValue(_,z,"data");if(G===H||G==null&&H==null)continue;let W=H,q=$.parseValue(_,z,H,G);if(q!==void 0)W=q;if(z.setDataValue(_,W,"rowDrag"))Y=!0}}finally{X?.endDeferred()}return Y}onCsrmCellChange(z){let{column:J,node:Q,source:Z}=z;if(!this.gos.get("refreshAfterGroupEdit"))return;if(Z==="rowDrag")return;if(!J?.isRowGroupActive())return;if(Q.group||!Q.data)return;if(this.beans.editSvc?.isBatchEditing()){let X=this.pendingEditRefresh;if(!X)X=eY(),this.pendingEditRefresh=X;X.updates.add(Q)}else{let X=eY();X.updates.add(Q),this.csrmRefresh(X)}}csrmFirstLeaf(z){if(!z)return null;let J=this.draggingGroups,Q=J?.get(z)??z.childrenAfterGroup;while(Q?.length){let Z=Q[0];if(Z.sourceRowIndex>=0){if(!Z.destroyed)return Z;return this.firstAliveChildLeaf(Z)}Q=J?.get(Z)??Z.childrenAfterGroup}return H1(z)}firstAliveChildLeaf(z){let J=this.draggingGroups?.get(z)??z.childrenAfterGroup;if(J){for(let Q of J)if(Q.sourceRowIndex>=0&&!Q.destroyed)return Q}return null}findFirstLeafForParent(z,J){if(!z)return null;let Q=this.draggingGroups?.get(z)??z?.childrenAfterGroup;if(!Q)return null;for(let Z=0,$=Q.length;Z<$;++Z){let X=Q[Z];if(X.sourceRowIndex>=0&&!J.has(X))return X;let Y=this.findFirstLeafForParent(X,J);if(Y!==null)return Y}return null}},eY=()=>{let z=new x1;return z.reordered=!0,z},zU=(z,J)=>{if(!z||!J)return!1;let Q=J;while(Q){if(Q===z)return!0;Q=Q.parent}return!1},Yf=(z,J)=>{if(!J||z.parent===J)return!1;let Q=J,Z=z.id;while(Q){if(Q===z)return!0;if(Z!=null&&Q.id===Z)return!0;Q=Q.parent}return!1},Uf=(z,J)=>{for(let Q=0,Z=z.length;Q<Z;++Q)if(z[Q].parent!==J)return!1;return!0},_f=class extends j{constructor(){super(...arguments);this.beanName="groupStage",this.step="group",this.refreshProps=["groupAllowUnbalanced","groupDefaultExpanded","groupDisplayType","groupHideOpenParents","initialGroupOrderComparator","treeData","treeDataChildrenField","treeDataParentIdField"],this.treeData=!1,this.grouping=!1,this.gosTreeData=!1,this.pivotMode=!1,this.hasTreeData=!1,this.hasRowGrouping=!1,this.needReset=!1,this.nested=!1,this.strategy=void 0,this.strategyType=void 0,this.columnsInvalidated=!1}postConstruct(){let z=this.gos;if(this.hasRowGrouping=z.isModuleRegistered("RowGrouping"),z.isModuleRegistered("TreeData"))this.hasTreeData=!0,this.gosTreeData=z.get("treeData");this.addManagedEventListeners({showRowGroupColsSetChanged:()=>this.strategy?.onShowRowGroupColsSetChanged()})}invalidateGroupCols(){this.columnsInvalidated=!0,this.strategy?.invalidateGroupCols?.()}destroy(){this.strategy=this.destroyBean(this.strategy),super.destroy()}getNonLeaf(z){return this.strategy?.nonLeafsById?.get(z)}getNestedDataGetter(){return this.getStrategy()?.nestedDataGetter}onPropChange(z){let J=this.gos,Q=this.strategy?.nestedDataGetter;if(z.has("treeData"))this.gosTreeData=J.get("treeData")&&this.hasTreeData,this.columnsInvalidated=!0;return this.strategy?.onPropChange?.(z),this.getNestedDataGetter()!==Q}extractData(){let z=this.beans.rowModel.rootNode,J=this.nested?z?.childrenAfterGroup:z?._leafs;if(!J)return this.gos.get("rowData")??[];let Q=J.length,Z=Array(Q),$=0;for(let X=0;X<Q;++X){let Y=J[X].data;if(Y!=null)Z[$++]=Y}return Z.length=$,Z}execute(z){let J=this.beans,Q=J.rowModel,Z=Q.rootNode;if(!Z)return!1;let $=this.getStrategy(),X=!!$?.nestedDataGetter,Y=this.needReset;if(this.nested=X,Y)this.needReset=!1,J.rowDragSvc?.cancelRowDrag(),z.animate=!1,Gf(Z,!X,J);if(!$){Q.hierarchical=!1;return}return Q.hierarchical=!0,J.changedPathFactory?.ensureRowsPath(z,Z),$.execute(Z,z)||Y}loadLeafs(z){return z.footer?Hf(z):ZQ(z)}loadGroupData(z){let J=this.getStrategy();if(J)return J.loadGroupData(z);return z._groupData=null,null}clearNonLeafs(){this.strategy?.clearNonLeafs()}getWantedStrategyType(){if(this.isAlive()){if(this.gosTreeData)return"tree";if(this.hasRowGrouping&&(this.beans.rowGroupColsSvc?.columns?.length||this.pivotMode))return"group"}return"none"}getStrategy(){let z=this.strategy,J=this.beans.colModel.isPivotMode();if(J!==this.pivotMode)this.pivotMode=J,this.columnsInvalidated=!0;if(z!==void 0&&!this.columnsInvalidated&&this.isAlive())return z;this.columnsInvalidated=!1;let Q=this.getWantedStrategyType();if(Q===this.strategyType){if(z!==void 0)return z;return this.strategy=null,null}if(z)this.strategy=this.destroyBean(z),this.needReset=!0;if(this.strategyType=Q,this.treeData=Q==="tree",this.grouping=Q==="group",Q==="none")return this.strategy=null,null;let Z=Q==="tree"?"treeGroupStrategy":"groupStrategy";return z=this.beans.registry.createDynamicBean(Z,!1)??null,this.strategy=z&&this.createBean(z),z}},Hf=(z)=>{let J=z.sibling;if(!J)return null;let Q=J._leafs;if(Q!==void 0)return Q;return ZQ(J)},ZQ=(z)=>{let J=z.childrenAfterGroup,Q=J?.length;if(z._leafs=null,!Q)return null;let Z,$=Q===1?J[0]:null;if($?.group&&$.sourceRowIndex<0){if(Z=$._leafs,Z===void 0)Z=ZQ($)}else if(z.leafGroup)Z=J;else{Z=[];for(let X=0;X<Q;++X){let Y=J[X];if(Y.sourceRowIndex>=0)Z.push(Y);if(!Y.group)continue;let U=Y._leafs;if(U===void 0)U=ZQ(Y);if(U)for(let _=0,H=U.length;_<H;++_)Z.push(U[_])}}return z._leafs=Z,Z},Gf=(z,J,Q)=>{let{_leafs:Z,sibling:$}=z;if(z.treeNodeFlags=0,z.childrenAfterGroup=Z,z.childrenMapped=null,z._groupData=void 0,z.aggData=null,$)$.childrenAfterGroup=z.childrenAfterGroup,$.childrenAfterAggFilter=z.childrenAfterAggFilter,$.childrenAfterFilter=z.childrenAfterFilter,$.childrenAfterSort=z.childrenAfterSort,$.childrenMapped=null,$._groupData=void 0,$.aggData=null;for(let X=0,Y=Z.length??0;X<Y;++X){let U=Z[X],_=U.sibling;if(U._leafs=void 0,JU(U),_)JU(_);if(U.parent=z,J)U.treeParent=null;mU(U,Q,!1)}z.updateHasChildren()},JU=(z)=>{z.key=null,z.treeNodeFlags=0,z.allChildrenCount=null,z.childrenAfterGroup=null,z.childrenAfterAggFilter=null,z.childrenAfterFilter=null,z.childrenAfterSort=null,z.childrenMapped=null,z.level=0,z._groupData=void 0};function QU(z,J,Q){let Z=z,$=Z.level-J.level;if($<=0)return!1;if(!Q.get("groupHideOpenParents"))return!1;for(let Y=0;Y<$;Y++){if(Z.parent?.getFirstChild()!==Z)return!1;Z=Z.parent}return Z===J}var F_=class extends j{constructor(){super(...arguments);this.indentClass=null}init(z,J,Q,Z,$,X,Y){this.params=Y,this.eGui=J,this.eCheckbox=Q,this.eExpanded=Z,this.eContracted=$,this.comp=z,this.compClass=X;let{node:U,column:_}=Y;if(this.node=U,this.displayedNode=U,this.isEmbeddedRowMismatch())return;if(U.footer){this.initFooterCell();return}if(!_){this.initFullWidthCell();return}this.displayedNode=this.beans.showRowGroupColValueSvc?.getDisplayedNode(U,_)??this.node,this.setupExpand(),this.setupCheckbox(),this.addGroupValue(),this.setupIndent()}initFooterCell(){let{node:z}=this.params;if(this.addGroupValue(),this.setupIndent(),z.level!==-1)this.comp.toggleCss("ag-row-group-leaf-indent",!0)}initFullWidthCell(){let z=()=>{let{rowDragSvc:J}=this.beans;if(!this.params.rowDrag||!J)return;let Q=J.createRowDragComp(()=>this.params.value,this.params.node);this.createManagedBean(Q),this.eGui.insertAdjacentElement("afterbegin",Q.getGui())};this.setupExpand(),z(),this.setupCheckbox(),this.addGroupValue(),this.setupIndent()}getCellAriaRole(){let z=this.params.colDef?.cellAriaRole,J=this.params.column?.getColDef().cellAriaRole;return z||J||"gridcell"}isEmbeddedRowMismatch(){if(!this.params.fullWidth||!this.gos.get("embedFullWidthRows"))return!1;let{visibleCols:z}=this.beans,J=this.params.pinned==="left",Q=this.params.pinned==="right",Z=!J&&!Q;if(this.gos.get("enableRtl")){if(z.isPinningLeft())return!Q;return!Z}if(z.isPinningLeft())return!J;return!Z}addGroupValue(){let{params:{value:z,valueFormatted:J}}=this,Q=this.getInnerCompDetails();this.comp.setInnerRenderer(Q,J??z??null)}setupExpand(){let{colModel:z}=this.beans,{eGridCell:J,suppressDoubleClickExpand:Q}=this.params,Z=(_,H)=>{let G=h(_,this.beans,null);if(G)H.appendChild(G),this.addDestroyFunc(()=>G.remove())};Z("groupExpanded",this.eExpanded),Z("groupContracted",this.eContracted);let $=this.comp,X=()=>{if(!this.isExpandable())return;let H=!!this.displayedNode.expanded;$.setExpandedDisplayed(H),$.setContractedDisplayed(!H),S0(J,H)},Y=()=>{let _=this.isExpandable();$.toggleCss("ag-cell-expandable",_),$.toggleCss("ag-row-group",_);let H=!_&&z.isPivotMode();$.toggleCss("ag-pivot-leaf-group",H);let G=!z.isPivotMode()&&(!this.displayedNode.footer||this.displayedNode.level!==-1);$.toggleCss("ag-row-group-leaf-indent",!_&&G);let W=this.getChildCount(),q=W>0?`(${W})`:"";if($.setChildCount(q),!_)$.setExpandedDisplayed(!1),$.setContractedDisplayed(!1),G9(J);else X()};(()=>{if(!Q&&!this.isGroupCellEditable(this.displayedNode))this.addManagedListeners(J,{dblclick:this.onCellDblClicked.bind(this)});this.addManagedListeners(this.eExpanded,{click:this.onExpandClicked.bind(this)}),this.addManagedListeners(this.eContracted,{click:this.onExpandClicked.bind(this)}),this.addManagedListeners(J,{keydown:this.onKeyDown.bind(this)}),this.addManagedListeners(this.displayedNode,{allChildrenCountChanged:Y,masterChanged:Y,groupChanged:Y,hasChildrenChanged:Y,expandedChanged:X})})(),Y()}getInnerCompDetails(){let{userCompFactory:z,findSvc:J}=this.beans,Q=this.params;if(Q.fullWidth){let _=this.gos.get("groupRowRendererParams"),H=t2(z,_,Q);if(H)return H;if(J?.isMatch(Q.node,null))return t2(z,{..._,innerRenderer:"agFindCellRenderer"},Q);return}let Z=(_)=>_&&_.componentClass==this.compClass,$=t2(z,Q,Q);if($&&!Z($))return $;let{displayedNode:{rowGroupColumn:X}}=this,Y=X?.colDef,U=X&&Q.column?.isRowGroupDisplayed(X.getId());if(Y&&U){let _=Vz(z,Y,Q);if(_)if(Z(_)){if(Y?.cellRendererParams?.innerRenderer)return t2(z,Y.cellRendererParams,Q)}else return _}if(J?.isMatch(Q.node,Q.column))return Vz(z,{...Y??Q.colDef,cellRenderer:"agFindCellRenderer"},Q)}getChildCount(){let{column:z,suppressCount:J}=this.params;if(J)return 0;let{allChildrenCount:Q,rowGroupColumn:Z}=this.displayedNode;if(!((Q??0)>0&&(!Z||!z||z?.isRowGroupDisplayed(Z.getId()))))return 0;if(this.gos.get("showOpenedGroup")&&this.displayedNode!==this.node&&!QU(this.node,this.displayedNode,this.gos))return 0;return Q??0}isExpandable(){let{node:z,column:J,colDef:Q}=this.params;if(!this.displayedNode.isExpandable())return!1;if(z.rowPinned)return!1;if(!J)return!0;if(z.hasChildren()&&Q){let{showRowGroup:X}=Q;if(!X)return!1;if(X===!0)return!0}if(z===this.displayedNode){if(z.rowGroupColumn){if(J?.isRowGroupDisplayed(z.rowGroupColumn.getId()))return!0}if(z.master)return Q?.showRowGroup===!0||Q?.showRowGroup==null;return!1}return QU(this.node,this.displayedNode,this.gos)}setupIndent(){let{suppressPadding:z,node:J,colDef:Q}=this.params;if(z)return;let Z=()=>{let $=J.uiLevel;if(Q&&Q.showRowGroup!==!0)$=0;let X="ag-row-group-indent-"+$;if(X===this.indentClass)return;if(this.indentClass)this.comp.toggleCss(this.indentClass,!1);this.indentClass=X,this.comp.toggleCss(X,!0),this.eGui.style.setProperty("--ag-indentation-level",String($))};this.addManagedListeners(J,{uiLevelChanged:Z.bind(this)}),Z()}setupCheckbox(){let{node:z}=this.params;if(!(!z.footer&&!z.rowPinned&&!z.detail))return;this.addManagedPropertyListener("rowSelection",({currentValue:Q,previousValue:Z})=>{let $=typeof Q==="object"?Q:void 0,X=typeof Z==="object"?Z:void 0;if($?.checkboxLocation!==X?.checkboxLocation)this.destroyCheckbox(),this.addCheckbox()}),this.addCheckbox()}addCheckbox(){let{selectionSvc:z}=this.beans;if(!z||!o4(this.gos))return;let{node:J,column:Q}=this.params,Z=this.gos.get("rowSelection"),$=h1(Z);if($==="selectionColumn")return;if($==="autoGroupColumn"){let H=Q?.getColDef().showRowGroup!=null,G=!Q&&J.group;if(!(H||G))return}let X=typeof Z==="object"?Dz(Z):this.params.checkbox;if(!(typeof X==="function"||X===!0))return;if(typeof Q?.getColDef().showRowGroup==="string"&&!this.isExpandable()){this.comp.setCheckboxSpacing(!0);return}let _=z.createCheckboxSelectionComponent();this.cbComp=_,this.createBean(_),_.init({rowNode:J,column:Q,overrides:{isVisible:X,callbackParams:this.params,removeHidden:!0}}),this.eCheckbox.appendChild(_.getGui()),this.comp.setCheckboxVisible(!0)}destroyCheckbox(){this.comp.setCheckboxSpacing(!1),this.comp.setCheckboxVisible(!1),this.cbComp?.getGui().remove(),this.cbComp=this.destroyBean(this.cbComp)}isGroupCellEditable(z){let J=this.params.column;return!!J&&(!!J.getColDef().groupRowEditable||this.gos.get("enableGroupEdit"))&&J.isCellEditable(z)}onExpandClicked(z){if(_4(z))return;a0(z),this.onExpandOrContract(z)}onKeyDown(z){if(z.key!==R.ENTER||this.params.suppressEnterExpand)return;if(this.isGroupCellEditable(this.params.node))return;this.onExpandOrContract(z)}onCellDblClicked(z){if(_4(z))return;if(!(qJ(this.eExpanded,z)||qJ(this.eContracted,z)))this.onExpandOrContract(z)}onExpandOrContract(z){if(!this.isExpandable())return;let J=this.displayedNode,Q=!J.expanded;if(!Q&&J.sticky)this.beans.ctrlsSvc.getScrollFeature().setVerticalScrollPosition(J.rowTop-J.stickyRowTop);J.setExpanded(Q,z)}destroy(){super.destroy(),this.destroyCheckbox()}},Wf={tag:"span",cls:"ag-cell-wrapper",children:[{tag:"span",ref:"eExpanded",cls:"ag-group-expanded ag-hidden"},{tag:"span",ref:"eContracted",cls:"ag-group-contracted ag-hidden"},{tag:"span",ref:"eCheckbox",cls:"ag-group-checkbox ag-invisible"},{tag:"span",ref:"eValue",cls:"ag-group-value"},{tag:"span",ref:"eChildCount",cls:"ag-group-child-count"}]},ZU=class extends y{constructor(){super(Wf);this.eExpanded=P,this.eContracted=P,this.eCheckbox=P,this.eValue=P,this.eChildCount=P}init(z){let J={setInnerRenderer:(X,Y)=>this.setRenderDetails(X,Y),setChildCount:(X)=>this.eChildCount.textContent=X,toggleCss:(X,Y)=>this.toggleCss(X,Y),setContractedDisplayed:(X)=>x(this.eContracted,X),setExpandedDisplayed:(X)=>x(this.eExpanded,X),setCheckboxVisible:(X)=>this.eCheckbox.classList.toggle("ag-invisible",!X),setCheckboxSpacing:(X)=>this.eCheckbox.classList.toggle("ag-group-checkbox-spacing",X)},Q=this.createManagedBean(new F_),Z=!z.colDef,$=this.getGui();if(Q.init(J,$,this.eCheckbox,this.eExpanded,this.eContracted,this.constructor,z),Z)H0($,Q.getCellAriaRole())}setRenderDetails(z,J){if(z)z.newAgStackInstance().then((Q)=>{if(!Q)return;let Z=()=>this.destroyBean(Q);if(this.isAlive())this.eValue.appendChild(Q.getGui()),this.addDestroyFunc(Z);else Z()});else this.eValue.innerText=J}destroy(){this.destroyBean(this.innerCellRenderer),super.destroy()}refresh(){return!1}},qf=".ag-group-checkbox-spacing{width:var(--ag-icon-size)}:where(.ag-ltr) .ag-group-checkbox-spacing{margin-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-group-checkbox-spacing{margin-left:var(--ag-cell-widget-spacing)}",Bf=class extends j{constructor(){super(...arguments);this.beanName="showRowGroupColValueSvc"}getGroupValue(z,J,Q){if(!J){if(!z.group)return null;return{displayedNode:z,value:z.groupValue}}let Z=this.beans.valueSvc,$=J.colDef.showRowGroup;if(!$)return null;if(z.level===-1&&z.footer)return{displayedNode:z,value:null};if(typeof $==="string"){if((this.beans.rowGroupColsSvc?.getColumnIndex($)??-1)>z.level)return null;let U=this.getDisplayedNode(z,J,!0);if(U)return{displayedNode:U,value:Z.getValue(J,U,"data",Q)}}let X=Z.getValue(J,z,"data",Q);if(X==null){let Y=this.getDisplayedNode(z,J);if(Y)return{displayedNode:Y,value:Z.getValue(J,Y,"data",Q)}}return{displayedNode:z,value:X}}formatAndPrefixGroupColValue(z,J,Q=!1){let Z=this.formatGroupColValue(z,J,Q),{value:$,displayedNode:X}=z,Y=this.beans.footerSvc;if(Y?.doesCellShowTotalPrefix(X,J))return Y.applyTotalPrefix($,Z,X,J);if(X.footer&&X.level===-1)return null;return Z}formatGroupColValue(z,J,Q=!1){let Z=this.beans.valueSvc,{displayedNode:$,value:X}=z,Y=$.rowGroupColumn,U=$.group&&!J;if(Y&&(U||J?.isRowGroupDisplayed(Y.colId))){if(Q&&Y.colDef.useValueFormatterForExport===!1)return null;let H=Z.formatValue(Y,$,X);if(H==null&&$.key==="")return this.getLocaleTextFunc()("blanks","(Blanks)");return H}if(!J||$.group)return null;if(Q&&J.colDef.useValueFormatterForExport===!1)return null;return Z.formatValue(J,$,X)}getDisplayedNode(z,J,Q=!1){let Z=this.gos,$=Z.get("groupHideOpenParents"),X=Z.get("showOpenedGroup")&&!Q;if(!$&&!X)return;let Y=J.colDef.showRowGroup;if(Y===!0){if(z.group)return;return z.parent??void 0}let U=z;while(U&&U.rowGroupColumn?.getId()!=Y){let _=U===U.parent?.getFirstChild();if(!X&&!_)return;U=U.parent}if(U===z)return;return U??void 0}},Ef=class extends j{constructor(){super(...arguments);this.beanName="showRowGroupCols",this.columns=[],this.colsSet=new Set,this.colsMap=new Map}destroy(){super.destroy(),this.columns.length=0,this.colsSet.clear(),this.colsMap.clear()}refresh(){let{colModel:z,rowGroupColsSvc:J}=this.beans,Q=this.columns,Z=this.colsSet,$=this.colsMap;$.clear();let X=Q.length,Y=0,U=!1,_=z.getCols();for(let H=0,G=_.length;H<G;++H){let W=_[H],B=W.getColDef().showRowGroup;if(typeof B==="string")$.set(B,W);else if(B===!0){let E=J?.columns;if(E)for(let K=0,F=E.length;K<F;++K)$.set(E[K].getId(),W)}else continue;U||(U=Y>=X||!Z.has(W)),Q[Y++]=W}if(U||(U=Y!==X),U){Q.length=Y,Z.clear();for(let H=0;H<Y;++H)Z.add(Q[H]);this.eventSvc.dispatchEvent({type:"showRowGroupColsSetChanged"})}}getShowRowGroupCol(z){return this.colsMap.get(z)}getSourceColumnsForGroupColumn(z){let J=z.getColDef().showRowGroup;if(!J)return null;let{rowGroupColsSvc:Q,colModel:Z}=this.beans;if(J===!0&&Q)return Q.columns;let $=Z.getColDefCol(J);return $?[$]:null}isRowGroupDisplayed(z,J){let Q=z.getColDef()?.showRowGroup;return Q===!0||Q!=null&&Q===J}},Kf=class extends j{constructor(z,J){super();this.createRowCon=z,this.destroyRowCtrls=J,this.stickyTopRowCtrls=[],this.stickyBottomRowCtrls=[],this.extraTopHeight=0,this.extraBottomHeight=0}postConstruct(){this.isClientSide=o(this.gos),this.beans.ctrlsSvc.whenReady(this,(z)=>{this.gridBodyCtrl=z.gridBodyCtrl}),this.resetStickyContainers()}setOffsetTop(z){if(this.extraTopHeight===z)return;this.extraTopHeight=z,this.eventSvc.dispatchEvent({type:"stickyTopOffsetChanged",offset:z})}setOffsetBottom(z){if(this.extraBottomHeight===z)return;this.extraBottomHeight=z}resetOffsets(){this.setOffsetBottom(0),this.setOffsetTop(0)}getLastPixelOfGroup(z){return this.isClientSide?Lf(z):Ff(z)}getFirstPixelOfGroup(z){if(z.footer)return z.sibling.rowTop+z.sibling.rowHeight-1;if(z.hasChildren())return z.rowTop-1;return 0}updateStickyRows(z){let J=z==="top",Q=0;if(!this.canRowsBeSticky())return this.refreshNodesAndContainerHeight(z,new Set,Q);let Z=new Set,{rowModel:$,rowRenderer:X,pinnedRowModel:Y,pageBounds:U,rowContainerHeight:_}=this.beans,{pageFirstPixel:H,pageLastPixel:G}=U.getCurrentPagePixelRange(),W=J?X.firstVisibleVPixel-this.extraTopHeight:X.lastVisibleVPixel-this.extraTopHeight,q=_.divStretchOffset??0,B=H+q,E=G+q,K=(D)=>{if(Z.add(D),J){let A=this.getLastPixelOfGroup(D),O=W+Q+D.rowHeight;if(A<O)D.stickyRowTop=Q+(A-O);else D.stickyRowTop=Q}else{let A=this.getFirstPixelOfGroup(D),O=W-(Q+D.rowHeight);if(A>O)D.stickyRowTop=Q-(A-O);else D.stickyRowTop=Q}Q=0,Z.forEach((A)=>{let O=A.stickyRowTop+A.rowHeight;if(Q<O)Q=O})},F=this.areFooterRowsStickySuppressed(),L=this.gos.get("suppressGroupRowsSticky"),M=(D)=>{if(!D.displayed)return!1;if(D.footer){if(F===!0)return!1;if(F==="grand"&&D.level===-1)return!1;if(F==="group"&&D.level>-1)return!1;let A=D.sibling.rowIndex?D.sibling.rowIndex+1===D.rowIndex:!1;if(z==="bottom"&&A)return!1;if(D.level===-1&&Y?.getGrandTotalPinned())return!1;return!Z.has(D)}if(D.isExpandable()){if(L===!0)return!1;if(z==="bottom")return!1;return!Z.has(D)&&!!D.expanded}return!1};for(let D=0;D<100;D++){let A=W+Q;if(!J)A=W-Q;if(J&&A<B)A=B;else if(!J&&A>E)A=E;let O=$.getRowIndexAtPixel(A),T=$.getRow(O);if(T==null)break;let k=this.getStickyAncestors(T).find((w)=>(J?w.rowIndex<O:w.rowIndex>O)&&M(w));if(k){K(k);continue}if((J?T.rowTop<A:T.rowTop+T.rowHeight>A)&&M(T)){K(T);continue}break}if(!J)Z.forEach((D)=>{D.stickyRowTop=Q-(D.stickyRowTop+D.rowHeight)});return this.refreshNodesAndContainerHeight(z,Z,Q)}areFooterRowsStickySuppressed(){let z=this.gos.get("suppressStickyTotalRow");if(z===!0)return!0;let J=z==="group",Q=z==="grand";if(J&&Q)return!0;if(Q)return"grand";if(J)return"group";return!1}canRowsBeSticky(){let z=s1(this.gos),J=this.areFooterRowsStickySuppressed(),Q=this.gos.get("suppressGroupRowsSticky");return z&&(!J||!Q)}getStickyAncestors(z){let J=[],Q=z.footer?z.sibling:z.parent;while(Q){if(Q.sibling)J.push(Q.sibling);J.push(Q),Q=Q.parent}return J.reverse()}checkStickyRows(){let z=this.updateStickyRows("top"),J=this.updateStickyRows("bottom");return z||J}destroyStickyCtrls(){this.resetStickyContainers()}resetStickyContainers(){this.refreshNodesAndContainerHeight("top",new Set,0),this.refreshNodesAndContainerHeight("bottom",new Set,0)}refreshStickyNode(z){let J=new Set;if(this.stickyTopRowCtrls.some((Q)=>Q.rowNode===z)){for(let Q=0;Q<this.stickyTopRowCtrls.length;Q++){let Z=this.stickyTopRowCtrls[Q].rowNode;if(Z!==z)J.add(Z)}if(this.refreshNodesAndContainerHeight("top",J,this.topContainerHeight))this.checkStickyRows();return}for(let Q=0;Q<this.stickyBottomRowCtrls.length;Q++){let Z=this.stickyBottomRowCtrls[Q].rowNode;if(Z!==z)J.add(Z)}if(this.refreshNodesAndContainerHeight("bottom",J,this.bottomContainerHeight))this.checkStickyRows()}refreshNodesAndContainerHeight(z,J,Q){let Z=z==="top",$=Z?this.stickyTopRowCtrls:this.stickyBottomRowCtrls,X={},Y=[];for(let B=0;B<$.length;B++){let E=$[B].rowNode;if(!J.has(E)){X[E.id]=$[B],E.sticky=!1;continue}Y.push($[B])}let U=new Set;for(let B=0;B<Y.length;B++)U.add(Y[B].rowNode);let _=[];J.forEach((B)=>{if(U.has(B))return;B.sticky=!0,_.push(this.createRowCon(B,!1,!1))});let H=!!_.length||Y.length!==$.length;if(Z){if(this.topContainerHeight!==Q)this.topContainerHeight=Q,this.gridBodyCtrl.setStickyTopHeight(Q),H=!0}else if(this.bottomContainerHeight!==Q)this.bottomContainerHeight=Q,this.gridBodyCtrl.setStickyBottomHeight(Q),H=!0;this.destroyRowCtrls(X,!1);let G=[...Y,..._];if(G.sort((B,E)=>E.rowNode.rowIndex-B.rowNode.rowIndex),!Z)G.reverse();for(let B of G)B.setRowTop(B.rowNode.stickyRowTop);let W=this.beans.pageBounds,q=0;if(Z){for(let B of J)if(B.rowIndex<W.getFirstRow())q+=B.rowHeight;if(q>this.topContainerHeight)q=this.topContainerHeight;this.setOffsetTop(q)}else{for(let B of J)if(B.rowIndex>W.getLastRow())q+=B.rowHeight;if(q>this.bottomContainerHeight)q=this.bottomContainerHeight;this.setOffsetBottom(q)}if(!H)return!1;if(Z)this.stickyTopRowCtrls=G;else this.stickyBottomRowCtrls=G;return!0}ensureRowHeightsValid(){let z=!1,J=(Q)=>{let Z=Q.rowNode;if(Z.rowHeightEstimated){let $=k2(this.beans,Z);Z.setRowHeight($.height),z=!0}};return this.stickyTopRowCtrls.forEach(J),this.stickyBottomRowCtrls.forEach(J),z}};function Ff(z){if(z.isExpandable()||z.footer){if(z.master&&z.detailNode)return z.detailNode.rowTop+z.detailNode.rowHeight;if(!z.sibling||Math.abs(z.sibling.rowIndex-z.rowIndex)===1){let Q=z.childStore?.getStoreBounds();if(z.footer)Q=z.sibling.childStore?.getStoreBounds();return(Q?.heightPx??0)+(Q?.topPx??0)}if(z.footer)return z.rowTop+z.rowHeight;return z.sibling.rowTop+z.sibling.rowHeight}return Number.MAX_SAFE_INTEGER}function Lf(z){if(z.isExpandable()||z.footer){if(z.footer&&z.rowIndex===0)return Number.MAX_SAFE_INTEGER;if(!z.sibling||Math.abs(z.sibling.rowIndex-z.rowIndex)===1){let Z=z.footer?z.sibling:z;while(Z.isExpandable()&&Z.expanded)if(Z.master&&Z.detailNode)Z=Z.detailNode;else if(Z.childrenAfterSort){if(Z.childrenAfterSort.length===0)break;Z=N(Z.childrenAfterSort)}return Z.rowTop+Z.rowHeight}if(z.footer)return z.rowTop+z.rowHeight;return z.sibling.rowTop+z.sibling.rowHeight}return Number.MAX_SAFE_INTEGER}var Mf=class extends j{constructor(){super(...arguments);this.beanName="stickyRowSvc"}createStickyRowFeature(z,J,Q){let Z=this.gos;if(s1(Z)&&o(Z)||Iz(Z))return z.createManagedBean(new Kf(J,Q));return}},L_={moduleName:"GroupCellRenderer",version:$0,userComponents:{agGroupRowRenderer:ZU,agGroupCellRenderer:ZU},dynamicBeans:{groupCellRendererCtrl:F_},icons:{groupContracted:"tree-closed",groupExpanded:"tree-open"},css:[qf],dependsOn:[N0]},Df={moduleName:"GroupColumn",version:$0,beans:[rI,Ef,Bf,nI,E_,q_],dependsOn:[N0,L_]},M_={moduleName:"ChangedPath",version:$0,beans:[aI],dependsOn:[N0]},YQ={moduleName:"ClientSideRowModelHierarchy",version:$0,rowModels:["clientSide"],beans:[_f,$f,eI],dependsOn:[N0,M_]},D_={moduleName:"StickyRow",version:$0,beans:[Mf]},Rf={moduleName:"GroupEdit",version:$0,beans:[Xf],dependsOn:[N0,YQ]},Af=({valueSvc:z,dataTypeSvc:J},Q,Z)=>{let $=z.getValue(Q,Z,"data"),X=null;if($ instanceof Date)X=$;else if(typeof $==="string")X=(J?.getDateParserFunction(Q)??h0)($)??null;return X},yz=(z,J,Q,Z)=>($)=>{let X=Af(z,J,$.node),Y=Lz(X);if(!Y)return null;return Z?.(Y[Q])??Y[Q]},xz=({colNames:z},J,Q)=>(Z)=>{let $=z.getDisplayNameForColumn(J,Z.location);if($)return`${$} (${Q})`;return""},jf=Object.fromEntries(w2.map((z)=>[z,z.toLowerCase()])),Vf=(z)=>{let J=w2[Number.parseInt(z,10)-1]??z,Q=jf[J]??z;return{month:J,localeKey:Q}};function $U(z){return z.groupHierarchy??z.rowGroupingHierarchy}var Of=class extends j{constructor(){super(...arguments);this.beanName="groupHierarchyColSvc",this.columns=null,this.sourceColumnMap=new WeakMap,this.inverseColumnMap=new WeakMap}addColumns(z){let J=this.columns;if(J==null)return;z.list=J.list.filter((Q)=>!z.list.some((Z)=>Z.getColId()===Q.getColId())).concat(z.list),z.tree=J.tree.filter((Q)=>!z.tree.some((Z)=>Z.getId()===Q.getId())).concat(z.tree),r2(z)}createColumns(z){let J=new WeakMap,Q=new WeakMap,Z=this.createGroupHierarchyColumns(z,J,Q);if(n2(Z,this.columns?.list??[]))return;G4(this.beans,this.columns?.tree),this.columns=null;let{colGroupSvc:X}=this.beans,Y=X?.findDepth(z.tree)??0,U=X?.balanceTreeForAutoCols(Z,Y)??[];this.columns={list:Z,tree:U,treeDepth:Y,map:{}},this.sourceColumnMap=J,this.inverseColumnMap=Q}updateColumns(z){}getColumn(z){return this.columns?.list.find((J)=>m4(J,z))??null}getColumns(){return this.columns?.list??null}expandColumnInto(z,J){let Q=this.getVirtualColumnsForColumn(J).concat(J);for(let Z of Q)if(!z.some(($)=>m4($,Z)||$.getColId()===Z.getColId()))z.push(Z)}compareVirtualColumns(z,J){let Q=this.inverseColumnMap.get(z),Z=this.inverseColumnMap.get(J);if(Q&&Q===Z){let $=this.sourceColumnMap.get(Q)??[];return $?.indexOf(z)-$?.indexOf(J)}if(this.sourceColumnMap.get(z)?.includes(J))return 1;if(this.sourceColumnMap.get(J)?.includes(z))return-1;return null}insertVirtualColumnsForCol(z,J){let Q=this.getVirtualColumnsForColumn(J);if(!Q)return[];let Z=z.indexOf(J);if(Z<0)Z=z.length-1;return b2(z,Q),z.splice(Z,0,...Q),Q}getVirtualColumnsForColumn(z){if(this.isGroupHierarchyColsEnabledForCol(z))return this.sourceColumnMap.get(z)??[];return[]}isGroupHierarchyColsEnabled(z){return z.list.some((J)=>this.isGroupHierarchyColsEnabledForCol(J))}isGroupHierarchyColsEnabledForCol(z){let J=z.getColDef();return!!($U(J)&&(J.rowGroup||J.enableRowGroup||J.rowGroupIndex!=null||J.pivot||J.enablePivot||J.pivotIndex!=null))}createGroupHierarchyColDefs(z){let J=[],Q=z.getColDef(),Z=$U(Q);if(!Z)return J;if(!this.isGroupHierarchyColsEnabledForCol(z))return J;for(let $ of Z){let X=null;if(typeof $==="string")X=this.createColDefForPart($,z,Q);else X=$;if(X)J.push(X)}return J}createGroupHierarchyColumns(z,J,Q){if(!this.isGroupHierarchyColsEnabled(z))return[];let Z=[];for(let $ of z.list)for(let X of this.createGroupHierarchyColDefs($)){let Y=X.colId;this.gos.validateColDef(X,Y,!0);let U=new E4(X,null,Y,!0);this.createBean(U),Z.push(U),Pf(J,$,U),Q.set(U,$)}return Z}createColDefForPart(z,J,Q){let{beans:Z,gos:$}=this,X=`${z$}-${J.getColId()}-${z}`,Y={enableRowGroup:Q.enableRowGroup,rowGroup:Q.rowGroup,enablePivot:Q.enablePivot,hide:!0,editable:!1},U=$.get("groupHierarchyConfig")??{};if(z in U){let W={...Y,...U[z]};return W.colId??(W.colId=X),Qz(Z,W,W.colId,!0)}let _=Qz(Z,{colId:X,...Y},X,!0),H=this.getLocaleTextFunc(),G=(W,q)=>H?.(W,q)??q;switch(z){case"year":return{..._,headerValueGetter:xz(Z,J,G(z,"Year")),valueGetter:yz(Z,J,0)};case"quarter":return{..._,headerValueGetter:xz(Z,J,G(z,"Quarter")),valueGetter:yz(Z,J,1,(W)=>(Math.floor(Number(W)/4)+1).toString())};case"month":return{..._,headerValueGetter:xz(Z,J,G(z,"Month")),valueGetter:yz(Z,J,1)};case"formattedMonth":return{..._,headerValueGetter:xz(Z,J,G("month","Month")),valueGetter:yz(Z,J,1,(W)=>{let q=Vf(W);return G(q.localeKey,q.month)})};case"day":return{..._,headerValueGetter:xz(Z,J,G(z,"Day")),valueGetter:yz(Z,J,2)};case"hour":return{..._,headerValueGetter:xz(Z,J,G(z,"Hour")),valueGetter:yz(Z,J,3)};case"minute":return{..._,headerValueGetter:xz(Z,J,G(z,"Minute")),valueGetter:yz(Z,J,4)};case"second":return{..._,headerValueGetter:xz(Z,J,G(z,"Second")),valueGetter:yz(Z,J,5)};default:return null}}};function Pf(z,J,Q){let Z=z.get(J);z.set(J,(Z??[]).concat(Q))}var Tf={moduleName:"GroupHierarchy",version:$0,beans:[Of],dependsOn:[M_]};var Sf=(z,J)=>{if(!z){J.length=0;return}let Q=z.length;J.length=Q;for(let Z=0;Z<Q;Z++){let $=z[Z],X=$.getColDef();J[Z]={col:$,field:X.field,type:X.type,keyCreator:X.keyCreator,valueGetter:X.valueGetter}}},If=(z,J)=>{let Q=z.length;if(Q!==J?.length)return!0;for(let Z=0;Z<Q;Z++){let $=z[Z],X=J[Z];if($.col!==X)return!0;let Y=X.getColDef();if($.field!==Y.field||$.type!==Y.type||$.valueGetter!==Y.valueGetter||$.keyCreator!==Y.keyCreator)return!0}return!1};function ff(z){if(!z)return!1;let J=z.length;if(J<2)return!1;let Q=!1;for(let Z=1;Z<J;Z++)if(XU(z[Z-1],z[Z])>0){Q=!0;break}if(!Q)return!1;return z.sort(XU),!0}function XU(z,J){let Q=z.sourceRowIndex,Z=J.sourceRowIndex,$=Q>=0,X=Z>=0,Y=$&&X,U=!$&&!X;if(Y)return Q-Z;if(U)return z.__objectId-J.__objectId;if($)return 1;return-1}var kf=class extends j{constructor(){super(...arguments);this.groupCols=[],this.nonLeafsById=new Map,this.checkGroupCols=!0,this.pivotMode=!1,this.groupEmpty=!1}invalidateGroupCols(){this.checkGroupCols=!0}destroy(){super.destroy(),this.groupCols.length=0,this.nonLeafsById.clear()}clearNonLeafs(){let z=this.nonLeafsById;for(let J of z.values())J._destroy(!1);z.clear()}loadGroupData(z){if(!z.group)return z._groupData=null,null;let J=z.rowGroupColumn,{valueSvc:Q,showRowGroupCols:Z}=this.beans,$={};if(z._groupData=$,!J)return $;let X=H1(z),Y=J.getId();if(!Z)return $;let U=Z.columns;for(let _=0,H=U.length;_<H;++_){let G=U[_];if(G.isRowGroupDisplayed(Y))$[G.getColId()]=Q.getValue(J,X,"data")}return $}execute(z,J){let Q=J.changedPath;if(this.initRefresh(J)!=="skip"){let $=J.changedRowNodes;if($)this.handleDeltaUpdate(z,Q,$,!!J.animate);else this.shotgunResetEverything(z)}this.positionLeafsAndGroups(z,Q),this.orderGroups(z),this.beans.selectionSvc?.updateSelectableAfterGrouping(Q)}positionLeafsAndGroups(z,J){t0(z,!0,J,(Q)=>{let Z=Q.childrenAfterGroup,$=Z?.length;if(!$)return;let X=Array($),Y=0,U=!1,_;for(let H=0;H<$;++H){let G=Z[H];if(!G.childrenAfterGroup?.length)U||(U=Y!==H),X[Y++]=G;else if(!_&&G.key===""){_=G;let W=$-1;U||(U=H!==W),X[W]=G}}if(U){for(let G=0;G<$;++G){let W=Z[G];if(W.childrenAfterGroup?.length&&W!==_)X[Y++]=W}Q.childrenAfterGroup=X;let H=Q.sibling;if(H)H.childrenAfterGroup=X}})}initRefresh(z){let{rowGroupColsSvc:J,colModel:Q,gos:Z}=this.beans;this.pivotMode=Q.isPivotMode(),this.groupEmpty=this.pivotMode||!Z.get("groupAllowUnbalanced");let $=J?.columns,X=this.groupCols,Y=z.afterColumnsChanged;if(Y||!X||this.checkGroupCols)if(this.checkGroupCols=!1,X&&!If(X,$)){if(Y)return"skip"}else{z.animate=!1;let U=X[0]?.col.getId()!==$?.[0]?.getId();return Sf($,X),U?"refresh":"groupColsChanged"}return"refresh"}handleDeltaUpdate(z,J,{removals:Q,updates:Z,adds:$,reordered:X},Y){let U=new Set;for(let _=0,H=Q.length;_<H;++_){let G=Q[_],W=this.removeFromParent(G);if(!U.has(W))U.add(W),J?.addRow(W)}for(let _ of Z){let H=_.parent;if(J?.addRow(H),this.moveNodeInWrongPath(z,_)){U.add(H);let G=_.parent;J?.addRow(G),X||(X=(G?.childrenAfterGroup?.length??0)>1)}}if($.size)for(let _ of $){this.insertOneNode(z,_);let H=_.parent;J?.addRow(H),X||(X=(H?.childrenAfterGroup?.length??0)>1)}if(U.size)YU(U),this.removeEmptyGroups(U,Y);if(X)this.sortChildren(z,J)}sortChildren(z,J){t0(z,!0,void 0,(Q)=>{if(ff(Q.childrenAfterGroup))J?.addRow(Q)})}orderGroups(z){let J=this.gos.getCallback("initialGroupOrderComparator");if(!J)return;let Q=this.beans,Z=Q.gridApi,$=Q.gridOptions.context,X=(U,_)=>J({api:Z,context:$,nodeA:U,nodeB:_}),Y=(U)=>{let _=U.childrenAfterGroup,H=_?.length;if(!H||U.leafGroup)return;if(H>1)_.sort(X);for(let G=0,W=H;G<W;++G)Y(_[G])};Y(z)}moveNodeInWrongPath(z,J){let{valueSvc:Q}=this.beans,Z=this.groupEmpty,$=J.parent,X=!1,Y=this.groupCols;if(!Y)return!1;for(let U=Y.length-1;U>=0;--U){let{col:_}=Y[U],H=Q.getKeyForNode(_,J);if(H==null||H===""){if(!Z)continue;H=""}if(!$?.parent||$.key!==H){X=!0;break}$=$.parent}if(X||(X=!!$?.parent),!X)return!1;return this.removeFromParent(J),this.insertOneNode(z,J),J.setData(J.data),!0}groupShouldBeRemoved(z){let J=this.getChildrenMappedKey(z.key,z.rowGroupColumn),Q=z.parent?.childrenMapped;if(Q?!Q[J]:!0)return!1;return!!z.group&&(z.childrenAfterGroup?.length??0)===0}removeEmptyGroups(z,J){let Q=this.beans.selectionSvc,Z,$=Array.from(z),X=this.nonLeafsById;do{z.clear();for(let Y=0;Y<$.length;++Y){let U=$[Y];while(U){let _=U.parent;if(U.destroyed){$[Y]=_,U=_;continue}if(!_)break;if(!this.groupShouldBeRemoved(U)){U=_;continue}if(z.add(_),this.removeFromParent(U),Q&&U.isSelected())Z??(Z=[]),Z.push(U);$[Y]=_,X.delete(U.id),U._destroy(J),U=_}}YU(z)}while(z.size);if(Z)Q.setNodesSelected({nodes:Z,newValue:!1,source:"rowGroupChanged"})}removeFromParent(z){let J=z.parent;if(J){let Q=this.getChildrenMappedKey(z.key,z.rowGroupColumn),Z=J.childrenMapped;if(Z)delete Z[Q]}return z.setRowTop(null),z.setRowIndex(null),J}addToParent(z,J){let Q=J.childrenMapped??(J.childrenMapped={}),Z=this.getChildrenMappedKey(z.key,z.rowGroupColumn);if(Q[Z]!==z){Q[Z]=z;let $=J.childrenAfterGroup;if(!$){J.childrenAfterGroup=$=[];let X=J.sibling;if(X)X.childrenAfterGroup=J.childrenAfterGroup}$.push(z),mU(J,this.beans,!0),tJ(J)}}shotgunResetEverything(z){let J=this.nonLeafsById;for(let $ of J.values())$.childrenAfterGroup=null,$.childrenMapped=null;z.leafGroup=!this.groupCols?.length,z.childrenAfterGroup=[],z.childrenMapped={},z.updateHasChildren();let Q=z.sibling;if(Q)Q.childrenAfterGroup=z.childrenAfterGroup,Q.childrenMapped=z.childrenMapped;let Z=z._leafs;for(let $=0,X=Z.length;$<X;++$)this.insertOneNode(z,Z[$]);this.destroyStaleGroups(J)}destroyStaleGroups(z){let J=this.beans.selectionSvc,Q;for(let[Z,$]of z){if($.childrenAfterGroup!==null)continue;if(J&&$.isSelected())(Q??(Q=[])).push($);z.delete(Z),$._destroy(!1)}if(Q)J.setNodesSelected({nodes:Q,newValue:!1,source:"rowGroupChanged"})}insertOneNode(z,J){let Q=z,{beans:Z,groupCols:$,groupEmpty:X}=this,Y=Z.valueSvc;if(!$)return;let U=$.length;for(let _=0;_<U;++_){let H=$[_],G=H.col,W=Y.getKeyForNode(G,J);if(W==null||W===""){if(!X)continue;W=""}let q=Q.childrenMapped?.[this.getChildrenMappedKey(W,G)];if(q){Q=q;continue}let B=Q.level+1,E=B>=U-1,K=this.createGroup(Q,H,W,B,E,J);this.addToParent(K,Q),Q=K}if(!Q.group)V(184,{parentGroupData:Q.data,childNodeData:J.data});J.parent=Q,J.level=Q.level+1,Q.childrenAfterGroup.push(J),Q.updateHasChildren(),tJ(Q)}createGroup(z,J,Q,Z,$,X){let Y=J.col,U=(z.level>=0?z.id+"-":"row-group-")+(Y.getColId()+"-"+Q),_=this.nonLeafsById,H=_.get(U),G=!0;if(H){if(H.childrenAfterGroup!==null)return H._expanded??(H._expanded=null),H;G=!1,tJ(H)}else H=new Cz(this.beans),H.group=!0,H.key=Q,H.id=U,H.aggData=null,_.set(U,H);let W=(K)=>{K.childrenAfterGroup=q,K.childrenMapped=B,K.parent=z,K.level=Z,K.rowGroupIndex=Z,K.leafGroup=$},q=[],B={};if(W(H),H.field=J.field??null,H.rowGroupColumn=Y,H.groupValue=this.beans.valueSvc.getValue(Y,X,"data"),H._expanded??(H._expanded=null),G)return H.setAllChildrenCount(0),H.updateHasChildren(),H;let E=H.sibling;if(E)W(E);return H.dispatchRowEvent("hasChildrenChanged"),H}getChildrenMappedKey(z,J){return J?J.getId()+"-"+z:z}onShowRowGroupColsSetChanged(){let{rowModel:z,valueSvc:J}=this.beans;for(let Z of this.nonLeafsById.values()){Z._groupData=void 0;let $=Z.rowGroupColumn,X=$&&H1(Z);Z.groupValue=X&&J.getValue($,X,"data")}let Q=z.rootNode?._leafs;if(Q)for(let Z=0,$=Q.length;Z<$;++Z){let X=Q[Z];X.parent._groupData=void 0}}},YU=(z)=>{for(let J of z){let Q=J?.childrenAfterGroup;if(!Q)continue;let Z=Q.length,$=0;for(let X=0;X<Z;++X){let Y=Q[X];if(Y.parent===J&&!Y.destroyed){if($!==X)Q[$]=Y;++$}}if(Z!==$)Q.length=$,J.updateHasChildren(),tJ(J)}},tJ=(z)=>{while(z._leafs!==void 0){let J=z.parent;if(!J)break;z._leafs=void 0,z=J}};function Cf(z,J){z.rowGroupColsSvc?.setColumns(J,"api")}function vf(z,J){z.rowGroupColsSvc?.removeColumns(J,"api")}function Nf(z,J){z.rowGroupColsSvc?.addColumns(J,"api")}function wf(z,J,Q){z.rowGroupColsSvc?.moveColumn?.(J,Q,"api")}function yf(z){return z.rowGroupColsSvc?.columns??[]}var R_={moduleName:"SharedRowGrouping",version:$0,apiFunctions:{setRowGroupColumns:Cf,removeRowGroupColumns:vf,addRowGroupColumns:Nf,getRowGroupColumns:yf,moveRowGroupColumn:wf},dependsOn:[N0,B_,Df,D_,Tf]},xf={moduleName:"RowGrouping",version:$0,dynamicBeans:{groupStrategy:kf},rowModels:["clientSide"],dependsOn:[R_,dI,YQ,Rf]};function bf(z,J){z.clipboardSvc?.copyToClipboard(J)}function gf(z,J){z.clipboardSvc?.cutToClipboard(J)}function hf(z,J){z.clipboardSvc?.copySelectedRowsToClipboard(J)}function uf(z,J){z.clipboardSvc?.copySelectedRangeToClipboard(J)}function mf(z){z.clipboardSvc?.copyRangeDown()}function cf(z){z.clipboardSvc?.pasteFromClipboard()}var pJ="paste",q7="dragCopy",B7="clipboard";function pf(z,J=","){let Q=[],Z=(X)=>X==="\r"||X===`
76
+ `,$=!1;if(z==="")return[[""]];for(let X=0,Y=0,U=0;U<z.length;U++){let _=z[U-1],H=z[U],G=z[U+1],W=()=>{if(!Q[X])Q[X]=[];if(!Q[X][Y])Q[X][Y]=""};if(W(),H==='"'){if($)if(G==='"')Q[X][Y]+='"',U++;else $=!1;else if(_===void 0||_===J||Z(_))$=!0}if(!$&&H!=='"'){if(H===J){Y++,W();continue}else if(Z(H)){if(Y=0,X++,W(),H==="\r"&&G===`
77
+ `)U++;continue}}Q[X][Y]+=H}return Q}var df=class extends j{constructor(){super(...arguments);this.beanName="clipboardSvc",this.clientSideRowModel=null,this.gridCtrl=null,this.lastPasteOperationTime=0,this.navigatorApiFailed=!1}postConstruct(){let{gos:z,rowModel:J,ctrlsSvc:Q}=this.beans;if(o(z,J))this.clientSideRowModel=J;Q.whenReady(this,(Z)=>{this.gridCtrl=Z.gridCtrl})}destroy(){super.destroy(),this.clientSideRowModel=null,this.gridCtrl=null}pasteFromClipboard(){if(!this.gos.get("suppressClipboardApi")&&!this.navigatorApiFailed&&navigator.clipboard?.readText)navigator.clipboard.readText().then(this.processClipboardData.bind(this)).catch((J)=>{V(40,{e:J,method:"readText"}),this.navigatorApiFailed=!0,this.pasteFromClipboardLegacy()});else this.pasteFromClipboardLegacy()}pasteFromClipboardLegacy(){let z=!1,J=(Q)=>{let Z=Date.now();if(Z-this.lastPasteOperationTime<50)z=!0,Q.preventDefault();this.lastPasteOperationTime=Z};this.executeOnTempElement((Q)=>{Q.addEventListener("paste",J),Q.focus({preventScroll:!0})},(Q)=>{let Z=Q.value;if(!z)this.processClipboardData(Z);else this.refocusLastFocusedCell();Q.removeEventListener("paste",J)})}refocusLastFocusedCell(){let{focusSvc:z}=this.beans,J=z.getFocusedCell();if(J)z.setFocusedCell({rowIndex:J.rowIndex,column:J.column,rowPinned:J.rowPinned,forceBrowserFocus:!0})}getClipboardDelimiter(){let z=this.gos.get("clipboardDelimiter");return I(z)?z:"\t"}processClipboardData(z){if(z==null)return;let J=pf(z,this.getClipboardDelimiter()),Q=this.gos.getCallback("processDataFromClipboard");if(Q)J=Q({data:J});if(J==null)return;if(this.gos.get("suppressLastEmptyLineOnPaste"))this.removeLastLineIfBlank(J);let{rangeSvc:Z,editSvc:$}=this.beans,X=(Y,U,_,H)=>{if(Z?.isMoreThanOneCell()&&!this.hasOnlyOneValueToPaste(J))this.pasteIntoActiveRange(J,Y,U,H);else this.pasteStartingFromFocusedCell(J,Y,U,_,H);$?.stopEditing(void 0,{source:pJ})};this.doPasteOperation(X)}doPasteOperation(z){let{eventSvc:Q,focusSvc:Z,rowRenderer:$,gos:X}=this.beans;Q.dispatchEvent({type:"pasteStart",source:"clipboard"});let{clientSideRowModel:Y}=this,U=Y?.rootNode,_=U&&this.beans.changedPathFactory?.newPath(X.get("aggregateOnlyChangedColumns")),H={},G=[],W=Z.getFocusedCell();z(H,G,W,_);let q=G.slice();if(_)Y.doAggregate(_),t0(U,Y.hierarchical,_,(B)=>{q.push(B)});$.refreshCells({rowNodes:q}),this.dispatchFlashCells(H),this.fireRowChanged(G),this.refocusLastFocusedCell(),Q.dispatchEvent({type:"pasteEnd",source:"clipboard"})}getPreProcessRangeCallback(z){return(J)=>{let{rangeSvc:Q}=this.beans;if(!Q)return;let{rowDiff:Z,colDiff:$}=this.getAdjustedRangeDimensionForPaste(J,z);if(Z!==0)Q.extendRangeRowCountBy(J,Z);if($!==0)Q.extendRangeColumnCountBy(J,$)}}getAdjustedRangeDimensionForPaste(z,J){let Q=this.beans.rangeSvc,Z=J.length,$=Q.getRangeRowCount(z),X=$>=Z&&$%Z===0,Y=J[0].length,U=z.columns.length,_=U>=Y&&U%Y===0;return{rowDiff:X?0:Z-$,colDiff:_?0:Y-U}}pasteIntoActiveRange(z,J,Q,Z){let $=0,X=0,Y=(U,_,H,G)=>{if(G-$>=z.length){if(G%z.length!==0)return;$+=X,X=0}let q=z[G-$];Q.push(_);let B=this.gos.getCallback("processCellFromClipboard"),E=H.columns,K=E.findIndex(d4);if(K!==-1)E.splice(K,1);for(let F=0;F<E.length;F++){let L=E[F];if(!L.isCellEditable(_)||L.isSuppressPaste(_))continue;let M=F;if(F>=q.length)M=F%q.length;let D=this.processCell(_,L,q[M],q7,B,!0);_.setDataValue(L,D,pJ),Z?.addCell(_.parent,L.getId());let{rowIndex:A,rowPinned:O}=U,T=r4({rowIndex:A,column:L,rowPinned:O});J[T]=!0}X++};this.iterateActiveRanges(Y,!1,this.getPreProcessRangeCallback(z))}getDisplayedColumnsStartingAt(z){let J=z,Q=[],{visibleCols:Z}=this.beans;while(J&&d2(J))J=Z.getColAfter(J);while(J!=null)Q.push(J),J=Z.getColAfter(J);return Q}pasteStartingFromFocusedCell(z,J,Q,Z,$){if(!Z)return;let X={rowIndex:Z.rowIndex,rowPinned:Z.rowPinned},Y=this.getDisplayedColumnsStartingAt(Z.column);if(this.isPasteSingleValueIntoRange(z))this.pasteSingleValueIntoRange(z,Q,J,$);else this.pasteMultipleValues(z,X,Q,Y,J,B7,$)}isPasteSingleValueIntoRange(z){let J=this.beans.rangeSvc;return this.hasOnlyOneValueToPaste(z)&&!!J&&!J.isEmpty()}pasteSingleValueIntoRange(z,J,Q,Z){let $=z[0][0],X=(Y,U,_)=>{J.push(U),_.columns.forEach((H)=>this.updateCellValue(U,H,$,Q,B7,Z))};this.iterateActiveRanges(X)}hasOnlyOneValueToPaste(z){return z.length===1&&z[0].length===1}copyRangeDown(){let{rangeSvc:z,gos:J,formula:Q,valueSvc:Z}=this.beans;if(!z||z.isEmpty())return;let $=[],X=(Y,U,_,H)=>{let G=J.getCallback("processCellForClipboard"),W=J.getCallback("processCellFromClipboard"),q=(B,E,K)=>{let{columns:F}=K;if(!$.length)F.forEach((L)=>{let M=this.processCell(E,L,Z.getValue(L,E,"batch"),q7,G,!1,!0);$.push(M)});else U.push(E),F.forEach((L,M)=>{if(!L.isCellEditable(E)||L.isSuppressPaste(E))return;if(L.isAllowFormula()&&Q?.isFormula($[M]))$[M]=Q?.updateFormulaByOffset({value:$[M],rowDelta:1});let A=this.processCell(E,L,$[M],q7,W,!0);E.setDataValue(L,A,pJ),H?.addCell(E.parent,L.getId());let{rowIndex:O,rowPinned:T}=B,S=r4({rowIndex:O,column:L,rowPinned:T});Y[S]=!0})};this.iterateActiveRanges(q,!0)};this.doPasteOperation(X)}removeLastLineIfBlank(z){let J=N(z);if(J&&J.length===1&&J[0]===""){if(z.length===1)return;X0(z,J)}}fireRowChanged(z){if(this.gos.get("editType")!=="fullRow")return;for(let J of z)this.eventSvc.dispatchEvent({type:"rowValueChanged",node:J,data:J.data,rowIndex:J.rowIndex,rowPinned:J.rowPinned})}shouldSkipPasteRow(z,J,Q){if(z.detail||z.footer)return!0;if(Q&&z.group){for(let Z of J)if(Z.isCellEditable(z))return!1;return!0}return!1}pasteMultipleValues(z,J,Q,Z,$,X,Y){let U=J,_=this.beans,{gos:H}=_,G=this.clientSideRowModel!=null&&!H.get("enableGroupEdit")&&!H.get("treeData"),W=()=>{while(U){let q=j0(_,U);if(U=D0(_,{rowPinned:U.rowPinned,rowIndex:U.rowIndex}),q!=null&&!this.shouldSkipPasteRow(q,Z,G))return q}return null};for(let q of z){let B=W();if(!B)continue;q.forEach((E,K)=>this.updateCellValue(B,Z[K],E,$,X,Y)),Q.push(B)}}updateCellValue(z,J,Q,Z,$,X){if(!z||!J?.isCellEditable(z)||J?.isSuppressPaste(z))return;let Y=this.processCell(z,J,Q,$,this.gos.getCallback("processCellFromClipboard"),!0);z.setDataValue(J,Y,pJ);let{rowIndex:U,rowPinned:_}=z,H=r4({rowIndex:U,column:J,rowPinned:_});Z[H]=!0,X?.addCell(z.parent,J.getId())}copyToClipboard(z={}){this.copyOrCutToClipboard(z)}cutToClipboard(z={},J="api"){if(this.gos.get("suppressCutToClipboard"))return;this.eventSvc.dispatchEvent({type:"cutStart",source:J}),this.copyOrCutToClipboard(z,!0),this.eventSvc.dispatchEvent({type:"cutEnd",source:J})}copyOrCutToClipboard(z,J){let{includeHeaders:Q,includeGroupHeaders:Z}=z,{gos:$,focusSvc:X}=this.beans;if(Q==null)Q=$.get("copyHeadersToClipboard");if(Z==null)Z=$.get("copyGroupHeadersToClipboard");let Y={includeHeaders:Q,includeGroupHeaders:Z},U=$.get("rowSelection"),_=$.get("cellSelection"),H=null;if(this.shouldCopyCells(_,U))this.copySelectedRangeToClipboard(Y),H=0;else if(this.shouldCopyRows(U))this.copySelectedRowsToClipboard(Y),H=1;else if(X.isAnyCellFocused())this.copyFocusedCellToClipboard(Y),H=2;if(J&&H!==null)this.clearCellsAfterCopy(H)}shouldCopyCells(z,J){let{rangeSvc:Q,selectionSvc:Z,gos:$}=this.beans;if(!Q||Q.isEmpty())return!1;if(z)return!(typeof J==="object"&&J.copySelectedRows&&!Z?.isEmpty());else{let X=$.get("suppressCopySingleCellRanges");return!(!Q.isMoreThanOneCell()&&X)}}shouldCopyRows(z){let{selectionSvc:J,gos:Q}=this.beans;if(J?.isEmpty()??!0)return!1;if(z&&typeof z!=="string")return z.copySelectedRows??!1;else return!Q.get("suppressCopyRowsToClipboard")}clearCellsAfterCopy(z){let J=this.beans,{rangeSvc:Q,focusSvc:Z,eventSvc:$}=J;if($.dispatchEvent({type:"keyShortcutChangedCellStart"}),z===0)Q.clearCellRangeCellValues({cellEventSource:"clipboardSvc"});else if(z===1)this.clearSelectedRows();else{let X=Z.getFocusedCell();if(X==null)return;let Y=j0(J,X);if(Y)this.clearCellValue(Y,X.column)}$.dispatchEvent({type:"keyShortcutChangedCellEnd"})}clearSelectedRows(){let{selectionSvc:z,visibleCols:J}=this.beans,Q=z?.getSelectedNodes()??[],Z=J.allCols;for(let $ of Q)for(let X of Z)this.clearCellValue($,X)}clearCellValue(z,J){if(!J.isCellEditable(z))return;let Q=this.beans.valueSvc.getDeleteValue(J,z);z.setDataValue(J,Q,"clipboardSvc")}iterateActiveRanges(z,J,Q){let Z=this.beans.rangeSvc;if(!Z||Z.isEmpty())return;let $=Z.getCellRanges(),X=J?[$[0]]:$;for(let Y of X)this.iterateActiveRange({cellRange:Y,rowCallback:z,preProcessRange:Q})}iterateActiveRange(z){let{cellRange:J,preProcessRange:Q,rowCallback:Z}=z,{beans:$}=this,{rangeSvc:X}=$;if(!X)return;if(Q)Q(J);let Y=X.getRangeStartRow(J),U=X.getRangeEndRow(J),_=0,H=!1;while(!H&&Y!=null){let G=j0($,Y);H=a(Y,U),Z(Y,G,J,_++),Y=D0($,Y)}}copySelectedRangeToClipboard(z={}){let J=this.beans.rangeSvc;if(!J||J.isEmpty())return;let Q=J.areAllRangesAbleToMerge(),{data:Z,cellsToFlash:$}=Q?this.buildDataFromMergedRanges(J,z):this.buildDataFromRanges(J,z);this.copyDataToClipboard(Z),this.dispatchFlashCells($)}buildDataFromMergedRanges(z,J){let Q=new Set,Z=z.getCellRanges(),$=new Map,X=[],Y={},U=o(this.gos,this.beans.rowModel),_=new Set;if(!U)this.beans.rowModel.forEachNode((q)=>{_.add(q.rowIndex)});for(let q of Z){q.columns.forEach((K)=>Q.add(K));let{rowPositions:B,cellsToFlash:E}=this.getRangeRowPositionsAndCellsToFlash(z,q);for(let K of B){let F=_.has(K.rowIndex);if(!U&&!F)continue;let L=`${K.rowIndex}-${K.rowPinned||"null"}`;if(!$.get(L))$.set(L,!0),X.push(K)}Object.assign(Y,E)}let H=this.beans.visibleCols.allCols,G=Array.from(Q);return G.sort((q,B)=>{let E=H.indexOf(q),K=H.indexOf(B);return E-K}),{data:this.buildExportParams({columns:G,rowPositions:X,includeHeaders:J.includeHeaders,includeGroupHeaders:J.includeGroupHeaders}),cellsToFlash:Y}}buildDataFromRanges(z,J){let Q=z.getCellRanges(),Z=[],$={};for(let X of Q){let{rowPositions:Y,cellsToFlash:U}=this.getRangeRowPositionsAndCellsToFlash(z,X);Object.assign($,U),Z.push(this.buildExportParams({columns:X.columns,rowPositions:Y,includeHeaders:J.includeHeaders,includeGroupHeaders:J.includeGroupHeaders}))}return{data:Z.join(`
78
+ `),cellsToFlash:$}}getRangeRowPositionsAndCellsToFlash(z,J){let Q=[],Z={},$=z.getRangeStartRow(J),X=z.getRangeEndRow(J),Y=$;while(Y){Q.push(Y);for(let U of J.columns){let{rowIndex:_,rowPinned:H}=Y,G=r4({rowIndex:_,column:U,rowPinned:H});Z[G]=!0}if(a(Y,X))break;Y=D0(this.beans,Y)}return{rowPositions:Q,cellsToFlash:Z}}getCellsToFlashFromRowNodes(z){let J=this.beans.visibleCols.allCols,Q={};for(let Z=0;Z<z.length;Z++){let{level:$,rowIndex:X,rowPinned:Y,sibling:U}=z[Z],_=$===-1?U.rowIndex:X;if(_==null)continue;for(let H=0;H<J.length;H++){let G=J[H],W=r4({rowIndex:_,column:G,rowPinned:Y});Q[W]=!0}}return Q}copyFocusedCellToClipboard(z={}){let J=this.beans.focusSvc.getFocusedCell();if(J==null)return;J=this.beans.rowSpanSvc?.getCellStart(J)??J;let Q=r4(J),Z={rowPinned:J.rowPinned,rowIndex:J.rowIndex},$=J.column,X=this.buildExportParams({columns:[$],rowPositions:[Z],includeHeaders:z.includeHeaders,includeGroupHeaders:z.includeGroupHeaders});this.copyDataToClipboard(X),this.dispatchFlashCells({[Q]:!0})}copySelectedRowsToClipboard(z={}){let{columnKeys:J,includeHeaders:Q,includeGroupHeaders:Z}=z,$=this.buildExportParams({columns:J,includeHeaders:Q,includeGroupHeaders:Z});this.copyDataToClipboard($);let X=this.beans.selectionSvc?.getSelectedNodes()||[];this.dispatchFlashCells(this.getCellsToFlashFromRowNodes(X))}buildExportParams(z){let{columns:J,rowPositions:Q,includeHeaders:Z=!1,includeGroupHeaders:$=!1}=z,{gos:X,csvCreator:Y}=this.beans,U=({node:H,column:G})=>{let{value:W,valueFormatted:q}=this.beans.valueSvc.getValueForDisplay({column:G,node:H,includeValueFormatted:!0,from:"batch"}),B=q??W??"",E=X.getCallback("processCellForClipboard");if(!E)return B;return E({column:G,node:H,value:B,type:B7,formatValue:(K)=>this.beans.valueSvc.formatValue(G,H,K)??K,parseValue:(K)=>this.beans.valueSvc.parseValue(G,H,K,W)??K})},_={columnKeys:J,rowPositions:Q,skipColumnHeaders:!Z,skipColumnGroupHeaders:!$,suppressQuotes:!0,columnSeparator:this.getClipboardDelimiter(),onlySelected:!Q,valueFrom:"batch",processCellCallback:X.getCallback("processCellForClipboard"),processRowGroupCallback:U,processHeaderCallback:X.getCallback("processHeaderForClipboard"),processGroupHeaderCallback:X.getCallback("processGroupHeaderForClipboard")};return Y.getDataAsCsv(_,!0)}dispatchFlashCells(z){window.setTimeout(()=>{this.eventSvc.dispatchEvent({type:"flashCells",cells:z})},0)}processCell(z,J,Q,Z,$,X,Y){let{valueSvc:U,formula:_}=this.beans;if($)return $({column:J,node:z,value:Q,type:Z,formatValue:(G)=>U.formatValue(J,z??null,G)??G,parseValue:(G)=>U.parseValue(J,z??null,G,U.getValue(J,z,"edit"))});if(X&&J.getColDef().useValueParserForImport!==!1)return U.parseValue(J,z??null,Q,U.getValue(J,z,"edit"));if(Y&&J.getColDef().useValueFormatterForExport!==!1){if(_?.isFormula(Q))return Q;return U.formatValue(J,z??null,Q)??Q}return Q}copyDataToClipboard(z){let J=this.gos.getCallback("sendToClipboard");if(J){J({data:z});return}if(!this.gos.get("suppressClipboardApi")&&navigator.clipboard){navigator.clipboard.writeText(z).catch((Z)=>{V(40,{e:Z,method:"writeText"}),this.copyDataToClipboardLegacy(z)});return}this.copyDataToClipboardLegacy(z)}copyDataToClipboardLegacy(z){this.executeOnTempElement((J)=>{let Q=Y0(this.beans),Z=d(this.beans);if(J.value=z||" ",J.select(),J.focus({preventScroll:!0}),!Q.execCommand("copy"))V(41);if(Z?.focus!=null)Z.focus({preventScroll:!0})})}executeOnTempElement(z,J){if(!this.gridCtrl)return;let Q=Y0(this.beans),Z=Q.createElement("textarea"),$=Z.style;$.width="1px",$.height="1px";let X=Q.documentElement;$.top=X.scrollTop+"px",$.left=X.scrollLeft+"px",$.position="absolute",$.opacity="0",this.gridCtrl.getGui().appendChild(Z);try{z(Z)}catch(U){V(42)}if(J)window.setTimeout(()=>{J(Z),Z.remove()},100);else Z.remove()}},A_={moduleName:"Clipboard",version:$0,beans:[df],apiFunctions:{copyToClipboard:bf,cutToClipboard:gf,copySelectedRowsToClipboard:hf,copySelectedRangeToClipboard:uf,copySelectedRangeDown:mf,pasteFromClipboard:cf},dependsOn:[N0,bX,G1,RY]};var j_=class extends j{constructor(){super(...arguments);this.loadRowDataVersion=0}wireBeans(z){this.environment=z.environment}init(z,J){if(this.params=J,this.comp=z,J.pinned!=null)return;this.setAutoHeightClasses(),this.setupRefreshStrategy(),this.createDetailGrid(),this.loadRowData(),this.addManagedEventListeners({fullWidthRowFocused:this.onFullWidthRowFocused.bind(this)})}onFullWidthRowFocused(z){let J=this.params,Q={rowIndex:J.node.rowIndex,rowPinned:J.node.rowPinned},Z={rowIndex:z.rowIndex,rowPinned:z.rowPinned};if(!a(Q,Z))return;E0(this.comp.getGui(),z.fromBelow)}setAutoHeightClasses(){let z=this.gos.get("detailRowAutoHeight"),J=z?"ag-details-row-auto-height":"ag-details-row-fixed-height",Q=z?"ag-details-grid-auto-height":"ag-details-grid-fixed-height",Z=this.comp;Z.toggleCss(J,!0),Z.toggleDetailGridCss(Q,!0)}setupRefreshStrategy(){let z=this.params.refreshStrategy;if(z=="everything"||z=="nothing"||z=="rows"){this.refreshStrategy=z;return}if(z!=null)V(170,{providedStrategy:z});this.refreshStrategy="rows"}createDetailGrid(){let{params:z,gos:J}=this;if(n(z.detailGridOptions)){V(171);return}let Q=J.get("theme"),Z=z.detailGridOptions.theme;if(Z&&Z!==Q)V(267);let $={themeStyleContainer:this.environment.eStyleContainer,...z.detailGridOptions,theme:Q};if(J.get("detailRowAutoHeight"))$.domLayout="autoHeight";this.comp.setDetailGrid($)}registerDetailWithMaster(z){let{params:J,beans:{selectionSvc:Q,findSvc:Z,expansionSvc:$}}=this,X=J.node.id,Y=J.api,U={id:X,api:z},_=J.node;if(Y.isDestroyed())return;Y.addDetailGridInfo(X,U),_.detailGridInfo=U;let H=_.parent;Z?.registerDetailGrid(_,z);function G(){if(H)Q?.refreshMasterNodeState(H)}function W({source:B}){if(B==="expandAll")return z.expandAll();if(B==="collapseAll")return z.collapseAll()}function q({node:B,source:E}){if(B!==H||E==="masterDetail"||z.isDestroyed())return;Q?.setDetailSelectionState(H,J.detailGridOptions,z)}z.addEventListener("firstDataRendered",()=>{if(z.isDestroyed()||Y.isDestroyed())return;Q?.setDetailSelectionState(H,J.detailGridOptions,z),z.addEventListener("selectionChanged",G),Y.addEventListener("rowSelected",q);let E=`${"CsrmSsrmSharedApi"}Module`;if(z.isModuleRegistered(E))Y.addEventListener("expandOrCollapseAll",W),$?.setDetailsExpansionState(z)}),this.addManagedListeners(H,{masterChanged:(B)=>{if(!B.node.master)this.onDestroy(U)}}),this.addDestroyFunc(()=>this.onDestroy(U))}onDestroy(z){let{params:J}=this,Q=J.node,Z=J.api;if(Q.detailGridInfo!==z)return;if(!Z.isDestroyed())Z.removeDetailGridInfo(Q.id);Q.detailGridInfo=null}loadRowData(){this.loadRowDataVersion++;let z=this.loadRowDataVersion,J=this.params;if(J.detailGridOptions?.rowModelType==="serverSide"){J.node.detailGridInfo?.api?.refreshServerSide({purge:!0});return}let Q=J.getDetailRowData;if(!Q){V(172);return}let Z=(X)=>{if(this.loadRowDataVersion===z)this.comp.setRowData(X)},$={node:J.node,data:J.node.data,successCallback:Z,context:v(this.gos,{}).context};Q($)}refresh(){switch(this.refreshStrategy){case"nothing":return!0;case"everything":return!1}return this.loadRowData(),!0}},nf=class{constructor(z){this.parentWrapper=z}wrap(z,J,Q,Z){return this.parentWrapper.wrap(z,J,Q,Z)}},rf={tag:"div",cls:"ag-details-row"},tf={tag:"div",cls:"ag-details-row",role:"gridcell",children:[{tag:"div",ref:"eDetailGrid",cls:"ag-details-grid",role:"presentation"}]},sf=class extends y{constructor(){super(...arguments);this.eDetailGrid=P}wireBeans(z){this.context=z.context}init(z){this.params=z,this.selectAndSetTemplate();let J={toggleCss:(Q,Z)=>this.toggleCss(Q,Z),toggleDetailGridCss:(Q,Z)=>this.eDetailGrid.classList.toggle(Q,Z),setDetailGrid:(Q)=>this.setDetailGrid(Q),setRowData:(Q)=>this.setRowData(Q),getGui:()=>this.eDetailGrid};this.ctrl=this.createManagedBean(new j_),this.ctrl.init(J,z)}refresh(){return this.ctrl?.refresh()??!1}selectAndSetTemplate(){let z=this.params;if(z.pinned){this.setTemplate(rf);return}let J=()=>{this.setTemplate(tf)};if(n(z.template))J();else if(typeof z.template==="string")this.setTemplate(z.template,[]);else if(typeof z.template==="function"){let Q=z.template,Z=Q(z);this.setTemplate(Z,[])}else V(168),J();if(this.eDetailGrid==null)V(169)}setDetailGrid(z){if(!this.eDetailGrid)return;let J=this.context.getBean("frameworkCompWrapper"),Q=new nf(J),{frameworkOverrides:Z}=this.beans,$=NJ(this.eDetailGrid,z,{frameworkOverrides:Z,providedBeanInstances:{frameworkCompWrapper:Q},modules:I9(this.params.api.getGridId(),z.rowModelType??"clientSide")});this.detailApi=$,this.ctrl?.registerDetailWithMaster($),this.addDestroyFunc(()=>{$.destroy()})}setRowData(z){this.detailApi?.setGridOption("rowData",z)}};function UQ(z,J){let Q=z.masterDetailSvc?.store;return Q?J(Q):void 0}function lf(z,J,Q){UQ(z,(Z)=>{Z[J]=Q})}function af(z,J){UQ(z,(Q)=>{delete Q[J]})}function of(z,J){return UQ(z,(Q)=>Q[J])}function ef(z,J){UQ(z,(Q)=>{let Z=0;Object.values(Q).forEach(($)=>{if($)J($,Z++)})})}var zk=".ag-details-row{width:100%}.ag-details-row-fixed-height{height:100%}.ag-details-grid{width:100%}.ag-details-grid-fixed-height{height:100%}",Jk=class extends j{constructor(){super(...arguments);this.beanName="masterDetailSvc",this.store={}}isEnabled(){return this.gos.get("masterDetail")}postConstruct(){let z=this.gos;if(o(z))this.enabled=this.isEnabled();if(Iz(z))this.addEventListeners()}addEventListeners(){let z=(Z)=>{this.setMaster(Z.node,!1,!0)},J,Q=()=>{if(J){for(let Z of J)Z();J=void 0}if(this.isEnabled())J=this.addManagedListeners(this.beans.eventSvc,{rowNodeDataChanged:z})};Q(),this.gos.addPropertyEventListener("masterDetail",Q)}refreshModel(z){if(z.changedProps){let J=this.isEnabled();if(this.enabled!==J){this.setMasters(null);return}}if(z.rowDataUpdated)this.setMasters(z.changedRowNodes)}setMaster(z,J,Q){let Z=z.master,$=this.isEnabled(),X=$,Y=this.gos,U=Y.get("isRowMaster"),_=Y.get("treeData");if($)if(J||Q){if(U){let H=z.data;X=!!H&&!!U(H)}}else X=Z;if(!_){if(X&&J||!X&&Z)z._expanded??(z._expanded=null)}if(X!==Z)z.master=X,z.dispatchRowEvent("masterChanged")}setMasters(z){if(this.enabled=this.isEnabled(),z){for(let J of z.updates)this.setMaster(J,!1,!0);for(let J of z.adds)this.setMaster(J,!0,!1)}else{let J=$5(this.beans)?.rootNode?._leafs;if(J)for(let Q=0,Z=J.length;Q<Z;++Q)this.setMaster(J[Q],!0,!1)}}getDetail(z){if(!z.master||!z.expanded)return null;let J=z.detailNode;if(J)return J;if(J=new Cz(this.beans),J.detail=!0,J.selectable=!1,J.parent=z,I(z.id))J.id="detail_"+z.id;return J.data=z.data,J.level=z.level+1,z.detailNode=J,J}setupDetailRowAutoHeight(z,J){let{gos:Q,beans:Z}=this;if(!Q.get("detailRowAutoHeight"))return;let $=()=>{let Y=J.clientHeight;if(Y!=null&&Y>0){let U=()=>{let{rowModel:_}=this.beans,{rowNode:H}=z;if(H.setRowHeight(Y),o(Q,_)||Iz(Q,_))_.onRowHeightChanged()};window.setTimeout(U,0)}},X=S4(Z,J,$);z.addDestroyFunc(X),$()}destroy(){this.store={},super.destroy()}},Qk={moduleName:"SharedMasterDetail",version:$0,beans:[Jk],userComponents:{agDetailCellRenderer:sf},dynamicBeans:{detailCellRendererCtrl:j_},apiFunctions:{addDetailGridInfo:lf,removeDetailGridInfo:af,getDetailGridInfo:of,forEachDetailGridInfo:ef},dependsOn:[N0,L_,D_],css:[zk]},V_={moduleName:"MasterDetail",version:$0,dependsOn:[Qk,YQ,DY]},O_=class extends y{constructor(){super(...arguments);this.changedCalculatedValues=!1,this.dragging=!1,this.shouldDestroyOnEndDragging=!1}postConstruct(){this.beans.dragSvc.addDragSource({dragStartPixels:0,eElement:this.getGui(),onDragging:(z)=>{let J=!1;if(!this.dragging)J=!0,this.dragging=!0,Sz(this.beans).classList?.add(this.getDraggingCssClass());if(this.updateValuesOnMove(z),J){this.changedCalculatedValues=!1;return}if(this.beans.rangeSvc.autoScrollService.check(z),this.changedCalculatedValues)this.onDrag(z),this.changedCalculatedValues=!1},onDragStop:(z)=>{this.dragging=!1,this.onDragEnd(z),this.clearDragProperties()},onDragCancel:()=>{this.dragging=!1,this.onDragCancel(),this.clearDragProperties()}}),this.addManagedEventListeners({cellSelectionChanged:this.updateLocalRangeIfNeeded.bind(this)}),this.addManagedElementListeners(this.getGui(),{pointerdown:UU,mousedown:UU})}getLastCellHovered(){return this.lastCellHovered}getDraggingCssClass(){return`ag-dragging-${this.type===0?"fill":"range"}-handle`}updateValuesOnMove(z){let J=M5(this.gos,z);if(!J||this.shouldSkipCell(J)||this.lastCellHovered&&o1(J,this.lastCellHovered))return;this.lastCellHovered=J,this.changedCalculatedValues=!0}clearDragProperties(){if(this.clearValues(),this.beans.rangeSvc.autoScrollService.ensureCleared(),Sz(this.beans).classList?.remove(this.getDraggingCssClass()),this.shouldDestroyOnEndDragging)this.destroy()}getType(){return this.type}refresh(z,J){let Q=this.cellCtrl,Z=this.getGui(),$=J??N(this.beans.rangeSvc.getCellRanges()),X=$.startRow,Y=$.endRow;if(X&&Y)if(q0(Y,X))this.rangeStartRow=Y,this.rangeEndRow=X;else this.rangeStartRow=X,this.rangeEndRow=Y;if(Q!==z||!B0(Z)){this.cellCtrl=z;let U=z.comp.getParentOfValue();if(U)U.appendChild(Z)}this.cellRange=$}clearValues(){this.lastCellHovered=void 0}destroy(){if(!this.shouldDestroyOnEndDragging&&this.dragging){x(this.getGui(),!1),this.shouldDestroyOnEndDragging=!0;return}this.shouldDestroyOnEndDragging=!1,super.destroy(),this.getGui()?.remove()}updateLocalRangeIfNeeded(z){if(!this.cellRange)return;let{id:J,type:Q}=this.cellRange;if(!J||J!==z.id)return;let Z=this.beans.rangeSvc?.getCellRanges().find(($)=>$.id===J&&$.type===Q);if(Z&&Z!==this.cellRange)this.cellRange=Z}},UU=(z)=>{z.stopPropagation()};function Zk(z){let J=z.length,Q=0;if(J<=1)return z;for(let W=0;W<z.length;W++){let q=z[W],B=q.toString().split("e-");if(B.length>1){Q=Math.max(Q,parseInt(B[1],10));continue}if(Math.floor(q)===q)continue;Q=Math.max(Q,q.toString().split(".")[1].length)}let Z=0,$=0,X=0,Y=0,U=0;for(let W=0;W<J;W++)U=z[W],Z+=W,$+=U,Y+=W*W,X+=W*U;let _=(J*X-Z*$)/(J*Y-Z*Z),H=$/J-_*Z/J,G=[];for(let W=0;W<=J;W++)G.push(parseFloat((W*_+H).toFixed(Q)));return G}var $k={tag:"div",cls:"ag-fill-handle"},Xk=class extends O_{constructor(){super($k);this.markedCells=[],this.cellValues=[],this.isUp=!1,this.isLeft=!1,this.isReduce=!1,this.type=0}postConstruct(){super.postConstruct(),this.addManagedElementListeners(this.getGui(),{dblclick:this.onDblClick.bind(this)})}onDblClick(z){a0(z);let{cellRange:J,rangeStartRow:Q,beans:Z}=this,{rangeSvc:$,visibleCols:X}=Z,Y=Oz(Z);if(!Y)return;let U=this.getFillHandleDirection();this.dragAxis=U==="xy"?"y":U;let _=$?.createCellRangeFromCellRangeParams({rowStartIndex:Q.rowIndex,rowStartPinned:Q.rowPinned,columnStart:J.columns[0],rowEndIndex:this.dragAxis==="x"?J.endRow?.rowIndex??null:Y.rowIndex,rowEndPinned:this.dragAxis==="x"?J.endRow?.rowPinned:Y.rowPinned,columnEnd:this.dragAxis==="x"?N(X.allCols):N(J.columns)});if(this.isUp=!1,this.isLeft=!1,_)this.performFill({event:z,initialRange:J,finalRange:_});this.dragAxis=void 0}updateValuesOnMove(z){if(super.updateValuesOnMove(z),!this.initialXY)this.initialXY=D5(this.beans,z);let{x:J,y:Q}=this.initialXY,{x:Z,y:$}=D5(this.beans,z),X=Math.abs(J-Z),Y=Math.abs(Q-$),U=this.getFillHandleDirection(),_;if(U==="xy")_=X>Y?"x":"y";else _=U;if(_!==this.dragAxis)this.dragAxis=_,this.changedCalculatedValues=!0}shouldSkipCell(z){return w0(z.column)}onDrag(z){if(!this.initialPosition){let Q=this.cellCtrl;if(!Q)return;this.initialPosition=Q.cellPosition}let J=this.getLastCellHovered();if(J)this.markPathFrom(this.initialPosition,J)}onDragEnd(z){if(this.initialXY=null,!this.markedCells.length)return;let J=this.dragAxis==="x",{cellRange:Q,rangeStartRow:Z,rangeEndRow:$,beans:{rangeSvc:X}}=this,Y=Q.columns.length,U;if(!this.isUp&&!this.isLeft)U=X.createCellRangeFromCellRangeParams({rowStartIndex:Z.rowIndex,rowStartPinned:Z.rowPinned,columnStart:Q.columns[0],rowEndIndex:J?$.rowIndex:this.lastCellMarked.rowIndex,rowEndPinned:J?$.rowPinned:this.lastCellMarked.rowPinned,columnEnd:J?this.lastCellMarked.column:Q.columns[Y-1]});else{let _=J?Z:this.lastCellMarked;U=X.createCellRangeFromCellRangeParams({rowStartIndex:_.rowIndex,rowStartPinned:_.rowPinned,columnStart:J?this.lastCellMarked.column:Q.columns[0],rowEndIndex:$.rowIndex,rowEndPinned:$.rowPinned,columnEnd:Q.columns[Y-1]})}if(U)this.performFill({event:z,initialRange:Q,finalRange:U,shouldUpdateRange:!0})}onDragCancel(){if(this.initialXY=null,!this.markedCells.length)return;this.clearMarkedPath()}performFill({event:z,initialRange:J,finalRange:Q,shouldUpdateRange:Z}){let{eventSvc:$,rangeSvc:X}=this.beans;if($.dispatchEvent({type:"fillStart"}),this.handleValueChanged(J,Q,z),Z)X.setCellRanges([Q]);$.dispatchEvent({type:"fillEnd",initialRange:J,finalRange:Q})}getFillHandleDirection(){let z=DJ(this.gos)?.direction;if(!z)return"xy";if(z!=="x"&&z!=="y"&&z!=="xy")return V(177),"xy";return z}handleValueChanged(z,J,Q){let{beans:Z}=this,{rangeSvc:$,gos:X,valueSvc:Y}=Z,U=$.getRangeEndRow(z),_=$.getRangeStartRow(z),H=$.getRangeEndRow(J),G=$.getRangeStartRow(J),W=this.dragAxis==="y";if(this.isReduce&&!DJ(X)?.suppressClearOnFillReduction){let T=W?z.columns:z.columns.filter((k)=>J.columns.indexOf(k)<0),S=W?D0(Z,H):G;if(S)this.clearCellsInRange(S,U,T);return}let q=[],B=[],E=[],K=[],F=!0,L=0,M=()=>{q.length=0,B.length=0,E.length=0,K.length=0,L=0},D=(T,S)=>{let k=this.isUp?U:_,C=!1;if(W)F=!0,M();while(!C&&k){let w=j0(Z,k);if(!w)break;if(W&&T)A(q,T,w,()=>!a(k,this.isUp?_:U));else if(S){F=!0,M();for(let m of S)A(q,m,w,()=>m!==(this.isLeft?z.columns[0]:N(z.columns)))}C=a(k,this.isUp?G:H),k=this.isUp?r0(this.beans,k):D0(Z,k)}},A=(T,S,k,C)=>{let w,m=!1;if(F)w=Y.getValue(S,k,"edit"),B.push(w),E.push(Y.getValue(S,k,"edit",!0)),K.push(Y.getValueForDisplay({column:S,node:k,from:"edit"}).valueFormatted),F=C();else{let{value:g,fromUserFunction:e,sourceCol:t,sourceRowNode:u}=this.processValues({event:Q,values:T,initialValues:B,initialNonAggregatedValues:E,initialFormattedValues:K,col:S,rowNode:k,idx:L++});if(w=g,S.isCellEditable(k)){let Q0=Y.getValue(S,k,"edit");if(!e){if(t){let s=t.getColDef();if(s.useValueFormatterForExport!==!1&&s.valueFormatter){let f0=Y.getValueForDisplay({column:t,node:u,includeValueFormatted:!0,from:"edit"}).valueFormatted;if(f0!=null)w=f0}}if(S.getColDef().useValueParserForImport!==!1)w=Y.parseValue(S,k,t?w:d0(w),Q0)}if(!e||Q0!==w)k.setDataValue(S,w,"rangeSvc");else m=!0}}if(!m)T.push({value:w,column:S,rowNode:k})},{changeDetectionSvc:O}=this.beans;O?.beginDeferred();try{if(W)z.columns.forEach((T)=>{D(T)});else{let T=this.isLeft?[...J.columns].reverse():J.columns;D(void 0,T)}this.beans.editSvc?.stopEditing(void 0,{source:"fillHandle"})}finally{O?.endDeferred()}}clearCellsInRange(z,J,Q){let Z={startRow:z,endRow:J,columns:Q,startColumn:Q[0]};this.beans.rangeSvc.clearCellRangeCellValues({cellRanges:[Z],restoreSourceInBatch:!0})}processValues(z){let{formula:J,valueSvc:Q}=this.beans,{event:Z,values:$,initialValues:X,initialNonAggregatedValues:Y,initialFormattedValues:U,col:_,rowNode:H,idx:G}=z,W=DJ(this.gos)?.setFillValue,q=this.dragAxis==="y",B;if(q)B=this.isUp?"up":"down";else B=this.isLeft?"left":"right";if(W){let F=v(this.gos,{event:Z,values:$.map(({value:M})=>M),initialValues:X,initialNonAggregatedValues:Y,initialFormattedValues:U,currentIndex:G,currentCellValue:Q.getValue(_,H,"edit"),direction:B,column:_,rowNode:H}),L=W(F);if(L!==!1)return{value:L,fromUserFunction:!0}}let E=(F)=>typeof F==="number"&&Number.isFinite(F)||typeof F==="string"&&/^[+-]?\d+(?:\.\d+)?$/.test(F.trim()),K=$.every(({value:F})=>E(F));if(Z.altKey||!K){let F=String(N($)?.value??"");if(K&&X.length===1){let T=this.isUp||this.isLeft?-1:1;return{value:parseFloat(F)+1*T,fromUserFunction:!1}}let{value:L,column:M,rowNode:D}=$[G%$.length],A,O=M.isAllowFormula()&&J?.isFormula(F);if(O){let T=B==="up"?-1:B==="down"?1:0,S=B==="left"?-1:B==="right"?1:0;A=J.updateFormulaByOffset({value:F,rowDelta:T,columnDelta:S})}else A=L;return{value:A,fromUserFunction:!1,sourceCol:O?void 0:M,sourceRowNode:D}}return{value:N(Zk($.map(({value:F})=>Number(F)))),fromUserFunction:!1}}clearValues(){this.clearMarkedPath(),this.clearCellValues(),this.lastCellMarked=void 0,super.clearValues()}clearMarkedPath(){for(let z of this.markedCells){if(!z.isAlive())continue;let{comp:J}=z;J.toggleCss("ag-selection-fill-top",!1),J.toggleCss("ag-selection-fill-right",!1),J.toggleCss("ag-selection-fill-bottom",!1),J.toggleCss("ag-selection-fill-left",!1)}this.markedCells.length=0,this.isUp=!1,this.isLeft=!1,this.isReduce=!1}clearCellValues(){this.cellValues.length=0}markPathFrom(z,J){if(this.clearMarkedPath(),this.clearCellValues(),this.dragAxis==="y"){if(a(J,z))return;let Q=q0(J,z),{rangeStartRow:Z,rangeEndRow:$}=this;if(Q&&(J.rowPinned==Z.rowPinned&&J.rowIndex>=Z.rowIndex||Z.rowPinned!=$.rowPinned&&J.rowPinned==$.rowPinned&&J.rowIndex<=$.rowIndex))this.reduceVertical(z,J),this.isReduce=!0;else this.extendVertical(z,J,Q),this.isReduce=!1}else{let Q=z.column,Z=J.column;if(Q===Z)return;let $=this.beans.visibleCols.allCols,X=$.indexOf(Q),Y=$.indexOf(Z);if(Y<=X&&Y>=$.indexOf(this.cellRange.columns[0]))this.reduceHorizontal(z,J),this.isReduce=!0;else this.extendHorizontal(z,J,Y<X),this.isReduce=!1}this.lastCellMarked=J}extendVertical(z,J,Q){let Z=this.beans,{rangeSvc:$}=Z,X=z;do{let Y=this.cellRange,U=Y.columns.length;for(let _=0;_<U;_++){let H=Y.columns[_],W={...{rowIndex:X.rowIndex,rowPinned:X.rowPinned},column:H},q=$.isCellInSpecificRange(W,Y),B=a(X,z);if(Q)this.isUp=!0;if(!B){let E=Y4(Z,W);if(E){this.markedCells.push(E);let K=E.comp;if(!q)K.toggleCss("ag-selection-fill-left",_===0),K.toggleCss("ag-selection-fill-right",_===U-1);K.toggleCss(Q?"ag-selection-fill-top":"ag-selection-fill-bottom",a(X,J))}}}if(a(X,J))break}while(X=Q?r0(this.beans,X):D0(Z,X))}reduceVertical(z,J){let Q=z,Z=this.beans;do{let $=this.cellRange,X=$.columns.length,Y=a(Q,J);for(let U=0;U<X;U++){let H={...{rowIndex:Q.rowIndex,rowPinned:Q.rowPinned},column:$.columns[U]},G=Y4(Z,H);if(G)this.markedCells.push(G),G.comp.toggleCss("ag-selection-fill-bottom",a(Q,J))}if(Y)break}while(Q=r0(Z,Q))}extendHorizontal(z,J,Q){let Z=this.beans,{visibleCols:$}=Z,X=$.allCols,Y=X.indexOf(Q?J.column:z.column),U=X.indexOf(Q?this.cellRange.columns[0]:J.column),_=Q?0:1,H=X.slice(Y+_,U+_),{rangeStartRow:G,rangeEndRow:W}=this;for(let q of H){let B=G,E=!1;do{E=a(B,W);let K=Y4(Z,{rowIndex:B.rowIndex,rowPinned:B.rowPinned,column:q});if(K){this.markedCells.push(K);let F=K.comp;if(F.toggleCss("ag-selection-fill-top",a(B,G)),F.toggleCss("ag-selection-fill-bottom",a(B,W)),Q)this.isLeft=!0,F.toggleCss("ag-selection-fill-left",q===H[0]);else F.toggleCss("ag-selection-fill-right",q===N(H))}B=D0(Z,B)}while(!E)}}reduceHorizontal(z,J){let Q=this.beans,{visibleCols:Z}=Q,$=Z.allCols,X=$.indexOf(J.column),Y=$.indexOf(z.column),U=$.slice(X,Y),{rangeStartRow:_,rangeEndRow:H}=this;for(let G of U){let W=_,q=!1;do{q=a(W,H);let B=Y4(this.beans,{rowIndex:W.rowIndex,rowPinned:W.rowPinned,column:G});if(B)this.markedCells.push(B),B.comp.toggleCss("ag-selection-fill-right",G===U[0]);W=D0(Q,W)}while(!q)}}refresh(z,J){let Q=J??this.beans.rangeSvc.getCellRanges()[0];if(!Q.startRow||!Q.endRow){this.destroy();return}super.refresh(z,Q)}},Yk=class extends O_{constructor(){super({tag:"div",cls:"ag-range-handle"});this.type=1,this.rangeFixed=!1}onDrag(z){let J=this.getLastCellHovered();if(!J)return;let Q=this.beans.rangeSvc,Z=this.cellRange??N(Q.getCellRanges());if(!Z)return;if(!this.rangeFixed)this.fixRangeStartEnd(Z),this.rangeFixed=!0;if(this.endPosition={rowIndex:J.rowIndex,rowPinned:J.rowPinned,column:J.column},Q.getCellRanges().length===2&&Q.getCellRanges()[0].type===n4.DIMENSION&&Z.type===n4.VALUE){if(!a(this.endPosition,Q.getRangeEndRow(Z)))Q.updateRangeRowBoundary({cellRange:Q.getCellRanges()[0],boundary:"end",cellPosition:{...this.endPosition,column:Q.getCellRanges()[0].columns[0]},silent:!0})}Q.extendRangeToCell(Z,this.endPosition)}shouldSkipCell(z){return!1}onDragEnd(z){let J=this.cellRange??N(this.beans.rangeSvc.getCellRanges());if(!J)return;this.fixRangeStartEnd(J),this.rangeFixed=!1}onDragCancel(){this.rangeFixed=!1}fixRangeStartEnd(z){let J=this.beans.rangeSvc,Q=J.getRangeStartRow(z),Z=J.getRangeEndRow(z),$=z.columns[0];z.startRow=Q,z.endRow=Z,z.startColumn=$}},Uk=".ag-body-viewport:not(.ag-has-focus) .ag-cell-range-single-cell:not(.ag-cell-inline-editing),.ag-cell-range-selected.ag-cell-range-chart,.ag-cell-range-selected:not(.ag-cell-focus){background-color:var(--ag-range-selection-background-color);&.ag-cell-range-chart{background-color:var(--ag-range-selection-chart-background-color)!important;&.ag-cell-range-chart-category{background-color:var(--ag-range-selection-chart-category-background-color)!important}}}.ag-cell-range-selected-1.ag-cell-range-chart,.ag-cell-range-selected-1.ag-formula-range,.ag-cell-range-selected-1:not(.ag-cell-focus),.ag-root:not(.ag-context-menu-open) .ag-body-viewport:not(.ag-has-focus) .ag-cell-range-selected-1:not(.ag-cell-inline-editing){background-color:var(--ag-range-selection-background-color)}.ag-cell-range-selected-2.ag-cell-range-chart,.ag-cell-range-selected-2.ag-formula-range,.ag-cell-range-selected-2:not(.ag-cell-focus){background-image:linear-gradient(var(--ag-range-selection-background-color),var(--ag-range-selection-background-color))}.ag-cell-range-selected-3.ag-cell-range-chart,.ag-cell-range-selected-3.ag-formula-range,.ag-cell-range-selected-3:not(.ag-cell-focus){background-image:linear-gradient(var(--ag-range-selection-background-color),var(--ag-range-selection-background-color)),linear-gradient(var(--ag-range-selection-background-color),var(--ag-range-selection-background-color))}.ag-cell-range-selected-4.ag-cell-range-chart,.ag-cell-range-selected-4.ag-formula-range,.ag-cell-range-selected-4:not(.ag-cell-focus){background-image:linear-gradient(var(--ag-range-selection-background-color),var(--ag-range-selection-background-color)),linear-gradient(var(--ag-range-selection-background-color),var(--ag-range-selection-background-color)),linear-gradient(var(--ag-range-selection-background-color),var(--ag-range-selection-background-color))}.ag-cell.ag-cell-range-selected:not(.ag-cell-range-single-cell){&.ag-cell-range-top{border-top-color:var(--ag-range-selection-border-color);border-top-style:var(--ag-range-selection-border-style)}&.ag-cell-range-right{border-right-color:var(--ag-range-selection-border-color);border-right-style:var(--ag-range-selection-border-style)}&.ag-cell-range-bottom{border-bottom-color:var(--ag-range-selection-border-color);border-bottom-style:var(--ag-range-selection-border-style)}&.ag-cell-range-left{border-left-color:var(--ag-range-selection-border-color);border-left-style:var(--ag-range-selection-border-style)}}.ag-cell.ag-selection-fill-top,.ag-cell.ag-selection-fill-top.ag-cell-range-selected{border-top:1px dashed;border-top-color:var(--ag-range-selection-border-color)}:where(.ag-ltr) .ag-cell.ag-selection-fill-right,:where(.ag-ltr) .ag-cell.ag-selection-fill-right.ag-cell-range-selected{border-right:1px dashed var(--ag-range-selection-border-color)!important}:where(.ag-rtl) .ag-cell.ag-selection-fill-right,:where(.ag-rtl) .ag-cell.ag-selection-fill-right.ag-cell-range-selected{border-left:1px dashed var(--ag-range-selection-border-color)!important}.ag-cell.ag-selection-fill-bottom,.ag-cell.ag-selection-fill-bottom.ag-cell-range-selected{border-bottom:1px dashed;border-bottom-color:var(--ag-range-selection-border-color)}:where(.ag-ltr) .ag-cell.ag-selection-fill-left,:where(.ag-ltr) .ag-cell.ag-selection-fill-left.ag-cell-range-selected{border-left:1px dashed var(--ag-range-selection-border-color)!important}:where(.ag-rtl) .ag-cell.ag-selection-fill-left,:where(.ag-rtl) .ag-cell.ag-selection-fill-left.ag-cell-range-selected{border-right:1px dashed var(--ag-range-selection-border-color)!important}.ag-fill-handle,.ag-range-handle{background-color:var(--ag-range-selection-border-color);bottom:-1px;height:6px;position:absolute;width:6px}:where(.ag-ltr) .ag-fill-handle,:where(.ag-ltr) .ag-range-handle{right:-1px}:where(.ag-rtl) .ag-fill-handle,:where(.ag-rtl) .ag-range-handle{left:-1px}.ag-fill-handle{cursor:crosshair}:where(.ag-ltr) .ag-range-handle{cursor:nwse-resize}:where(.ag-rtl) .ag-range-handle{cursor:nesw-resize}";function _k(z){return z.rangeSvc?.getCellRanges()??null}function Hk(z,J){z.rangeSvc?.addCellRange(J)}function _U(z){z.rangeSvc?.removeAllCellRanges()}var $6="ag-cell-range-selected",Gk="ag-cell-range-chart",Wk="ag-cell-range-single-cell",HU="ag-cell-range-chart-category",qk="ag-cell-range-handle",Bk="ag-cell-range-top",Ek="ag-cell-range-right",Kk="ag-cell-range-bottom",Fk="ag-cell-range-left";function Lk(z){let J=z.get("cellSelection");if(J===void 0)return z.get("enableRangeHandle");return typeof J!=="boolean"?J.handle?.mode==="range":!1}function GU(z){let J=z.get("cellSelection");if(J===void 0)return z.get("enableFillHandle");return typeof J!=="boolean"?J.handle?.mode==="fill":!1}var Mk=class{constructor(z,J){this.beans=z,this.cellCtrl=J,this.rangeColorClass=null,this.handleColorClass=null,this.rangeSvc=z.rangeSvc}setComp(z){this.cellComp=z,this.eGui=this.cellCtrl.eGui,this.onCellSelectionChanged()}unsetComp(){this.beans.context.destroyBean(this.selectionHandle)}onCellSelectionChanged(){let z=this.cellComp;if(!z)return;let{rangeSvc:J,cellCtrl:Q,eGui:Z}=this,$=J.getCellRangeCount(Q.cellPosition);this.rangeCount=$;let X=this.getHasChartRange();this.hasChartRange=X,z.toggleCss($6,$!==0),z.toggleCss(`${$6}-1`,$===1),z.toggleCss(`${$6}-2`,$===2),z.toggleCss(`${$6}-3`,$===3),z.toggleCss(`${$6}-4`,$>=4),z.toggleCss(Gk,X),GJ(Z,$>0?!0:void 0),z.toggleCss(Wk,this.isSingleCell()),this.updateRangeBorders(),this.refreshRangeStyleAndHandle()}updateRangeBorders(){let z=this.getRangeBorders(),J=this.isSingleCell(),Q=!J&&z.top,Z=!J&&z.right,$=!J&&z.bottom,X=!J&&z.left,Y=this.cellComp;Y.toggleCss(Bk,Q),Y.toggleCss(Ek,Z),Y.toggleCss(Kk,$),Y.toggleCss(Fk,X)}isSingleCell(){let{rangeSvc:z}=this;return this.rangeCount===1&&!!z&&!z.isMoreThanOneCell()}getHasChartRange(){let{rangeSvc:z}=this;if(!this.rangeCount||!z)return!1;let J=z.getCellRanges();return J.length>0&&J.every((Q)=>[n4.DIMENSION,n4.VALUE].includes(Q.type))}updateRangeBordersIfRangeCount(){if(this.rangeCount>0)this.updateRangeBorders(),this.refreshRangeStyleAndHandle()}getRangeBorders(){let z=this.beans.gos.get("enableRtl"),J=!1,Q=!1,Z=!1,$=!1,{rangeSvc:X,beans:{visibleCols:Y},cellCtrl:{cellPosition:U}}=this,_=U.column,H=X.getCellRanges().filter((q)=>X.isCellInSpecificRange(U,q));if(!H.length)return{top:J,right:Q,bottom:Z,left:$};let G,W;if(z)G=Y.getColAfter(_),W=Y.getColBefore(_);else G=Y.getColBefore(_),W=Y.getColAfter(_);if(!G)$=!0;if(!W)Q=!0;for(let q=0;q<H.length;q++){if(J&&Q&&Z&&$)break;let B=H[q],E=X.getRangeStartRow(B),K=X.getRangeEndRow(B);if(!J&&a(E,U))J=!0;if(!Z&&a(K,U))Z=!0;if(!$&&G&&B.columns.indexOf(G)<0)$=!0;if(!Q&&W&&B.columns.indexOf(W)<0)Q=!0}return{top:J,right:Q,bottom:Z,left:$}}refreshRangeStyleAndHandle(){let{context:z}=this.beans;if(z.isDestroyed())return;this.styleCellForRangeType();let J=this.getRangeForHandle();if(this.selectionHandle&&!J)this.selectionHandle=z.destroyBean(this.selectionHandle);if(J)this.addSelectionHandle(J);this.refreshHandleColor(J),this.cellComp.toggleCss(qk,!!this.selectionHandle)}styleCellForRangeType(){if(this.hasChartRange){let{rangeSvc:z}=this,J=z.getCellRanges()[0],Z=J.type===n4.DIMENSION&&z.isCellInSpecificRange(this.cellCtrl.cellPosition,J);this.cellComp.toggleCss(HU,Z)}else this.cellComp.toggleCss(HU,!1),this.applyRangeColor(this.getRangeColorClass())}applyRangeColor(z){if(this.rangeColorClass&&this.rangeColorClass!==z)this.cellComp.toggleCss(this.rangeColorClass,!1),this.cellComp.toggleCss("ag-formula-range",!1);if(z)this.cellComp.toggleCss(z,!0),this.cellComp.toggleCss("ag-formula-range",z.startsWith("ag-formula-range"));this.rangeColorClass=z??null}getRangeColorClass(){let{rangeSvc:z,rangeCount:J}=this;if(!z||!J)return null;let Q=z.getCellRanges();for(let Z=Q.length-1;Z>=0;Z--){let $=Q[Z],X=$.colorClass;if(!X)continue;if(z.isCellInSpecificRange(this.cellCtrl.cellPosition,$))return X}return null}refreshHandleColor(z){let J=this.selectionHandle?.getGui?.(),Q=z?.colorClass??null;if(!J){this.handleColorClass=null;return}if(this.handleColorClass&&this.handleColorClass!==Q)J.classList.remove(this.handleColorClass);if(Q)J.classList.add(Q);else if(this.handleColorClass)J.classList.remove(this.handleColorClass);this.handleColorClass=Q??null}getRangeForHandle(){let{gos:z,editSvc:J}=this.beans,Q=this.rangeSvc,Z=Q.getCellRanges(),$=Z.length;if(this.rangeCount<1||$<1)return null;let X=J?.isRangeSelectionEnabledWhileEditing(),Y=X?Z:[N(Z)];for(let U of Y){let{cellPosition:_,column:H}=this.cellCtrl,G=GU(z)&&!H.isSuppressFillHandle(),W=Lk(z),B=!J?.isEditing(this.cellCtrl,{withOpenEditor:!0})&&(X||$===1&&(G||W));if(this.hasChartRange)B=U.type===n4.VALUE;if(B&&U.endRow!=null&&Q.isContiguousRange(U)&&Q.isBottomRightCell(U,_))return U}return null}addSelectionHandle(z){let{beans:J}=this,Q=J.editSvc?.isRangeSelectionEnabledWhileEditing(),Z=z.type,X=!Q&&GU(J.gos)&&n(Z)?0:1;if(this.selectionHandle&&this.selectionHandle.getType()!==X)this.selectionHandle=J.context.destroyBean(this.selectionHandle);if(!this.selectionHandle){let Y=J.registry.createDynamicBean(X===0?"fillHandle":"rangeHandle",!1);if(Y)this.selectionHandle=J.context.createBean(Y)}this.selectionHandle?.refresh(this.cellCtrl,z)}destroy(){this.unsetComp()}},Dk=class extends j{constructor(z){super();this.eContainer=z}postConstruct(){let{beans:z,gos:J,eContainer:Q}=this,Z=z.rangeSvc,$={eElement:Q,onDragStart:Z.onDragStart.bind(Z),onDragStop:Z.onDragStop.bind(Z),onDragging:Z.onDragging.bind(Z)},X=z.dragSvc,Y=X.addDragSource.bind(X,$),U=X.removeDragSource.bind(X,$);if(this.addManagedPropertyListeners(["enableRangeSelection","cellSelection"],()=>{if(n0(J))Y();else U()}),this.addDestroyFunc(U),n0(J))Y()}},Rk=class extends j{constructor(z,J){super();this.column=z,this.eGui=J}postConstruct(){this.addManagedElementListeners(this.eGui,{click:(z)=>z&&this.onClick(z)})}onClick(z){this.beans.rangeSvc?.handleColumnSelection(this.column,z)}},Ak=class extends j{constructor(z,J){super();this.column=z,this.comp=J,this.columnMap=new Map,this.isActive=!1,this.resetColumnMap()}postConstruct(){this.addManagedPropertyListener("cellSelection",()=>{this.refreshActive()}),this.refreshActive(),this.setupRangeHeaderHighlight()}resetColumnMap(){this.columnMap.clear();let z;if(this.column.isColumn)z=[this.column];else z=this.column.getDisplayedLeafColumns();for(let J of z)this.columnMap.set(J,!1)}refreshActive(){let{gos:z,rangeSvc:J}=this.beans,Q=z.get("cellSelection");this.isActive=!!(Q&&J&&typeof Q==="object"&&Q.enableHeaderHighlight)}setupRangeHeaderHighlight(){let z=this.onRangeSelectionChanged.bind(this);this.addManagedEventListeners({rangeSelectionChanged:z,columnPinned:z,columnMoved:z,columnGroupOpened:z}),z()}onRangeSelectionChanged(){if(!this.isActive)return;this.resetColumnMap();let z=this.beans.rangeSvc.getCellRanges(),J=!1,Q=!0;for(let Z of z){if(J)break;for(let $ of Z.columns)if(this.columnMap.has($))this.columnMap.set($,!0),J||(J=!0)}for(let Z of Array.from(this.columnMap.values()))if(Z===!1){Q=!1;break}this.comp.toggleCss("ag-header-range-highlight",J&&Q)}destroy(){super.destroy(),this.comp=null,this.column=null}},jk=class extends j{constructor(){super(...arguments);this.beanName="rangeSvc",this.rangeSelectionExtensions=[],this.cellRanges=[],this.bodyScrollListener=this.onBodyScroll.bind(this),this.dragging=!1,this.intersectionRange=!1,this.columnRangeSelectionCtx={}}wireBeans(z){this.rowModel=z.rowModel,this.dragSvc=z.dragSvc,this.colModel=z.colModel,this.visibleCols=z.visibleCols,this.cellNavigation=z.cellNavigation,this.ctrlsSvc=z.ctrlsSvc}postConstruct(){let z=this.onColumnsChanged.bind(this),J=()=>this.removeAllCellRanges(),Q=this.refreshLastRangeStart.bind(this);this.addManagedEventListeners({newColumnsLoaded:z,columnVisible:z,columnValueChanged:z,columnPivotModeChanged:J,columnRowGroupChanged:J,columnPivotChanged:J,columnGroupOpened:Q,columnMoved:Q,columnPinned:Q}),this.ctrlsSvc.whenReady(this,(Z)=>{let $=Z.gridBodyCtrl;this.autoScrollService=new TJ({scrollContainer:$.eBodyViewport,scrollAxis:"xy",getVerticalPosition:()=>$.scrollFeature.getVScrollPosition().top,setVerticalPosition:(X)=>$.scrollFeature.setVerticalScrollPosition(X),getHorizontalPosition:()=>$.scrollFeature.getHScrollPosition().left,setHorizontalPosition:(X)=>$.scrollFeature.setHorizontalScrollPosition(X),shouldSkipVerticalScroll:()=>!T0(this.gos,"normal"),shouldSkipHorizontalScroll:()=>!$.scrollFeature.isHorizontalScrollShowing()})})}registerRangeSelectionExtension(z){if(this.rangeSelectionExtensions.includes(z))return;this.rangeSelectionExtensions.push(z)}unregisterRangeSelectionExtension(z){X0(this.rangeSelectionExtensions,z)}shouldSuppressRangeSelection(z){return this.rangeSelectionExtensions.some((J)=>J.shouldSuppressRangeSelection?.(z))}shouldSkipColumn(z){return this.rangeSelectionExtensions.some((J)=>J.shouldSkipColumn?.(z))}isAllColumnsSelectionCell(z){return this.rangeSelectionExtensions.some((J)=>J.isAllColumnsSelectionCell?.(z))}isAllColumnsRange(z,J){return this.rangeSelectionExtensions.some((Q)=>Q.isAllColumnsRange?.(z,J))}updateSelectionModeForCell(z){this.setSelectionMode(this.isAllColumnsSelectionCell(z))}onDragStart(z){let J=this.gos,Q=z.target;if(!n0(J)||K5(J,Q)?.isSuppressMouseEvent(z))return;if(this.shouldSuppressRangeSelection(Q))return;let{shiftKey:Z}=z,$=this.isMultiRange(z),X=Z&&!!this.cellRanges?.length;if(!$&&(!X||I(N(this.cellRanges).type)))this.removeAllCellRanges(!0);let Y=this.dragSvc.startTarget;if(Y)this.updateValuesOnMove(Y);if(!this.lastCellHovered)return;if(this.dragging=!0,this.lastMouseEvent=z,this.intersectionRange=$&&this.getCellRangeCount(this.lastCellHovered)>1,!X)this.setNewestRangeStartCell(this.lastCellHovered);if(this.cellRanges.length>0)this.draggingRange=N(this.cellRanges);else{let U={rowIndex:this.lastCellHovered.rowIndex,rowPinned:this.lastCellHovered.rowPinned},_=this.getColumnsFromModel([this.lastCellHovered.column]);if(!_?.length)return;this.draggingRange={startRow:U,endRow:U,columns:_,startColumn:this.newestRangeStartCell.column},this.cellRanges.push(this.draggingRange)}this.ctrlsSvc.getGridBodyCtrl().eBodyViewport.addEventListener("scroll",this.bodyScrollListener,{passive:!0}),this.dispatchChangedEvent(!0,!1,this.draggingRange.id)}onDragging(z){let{dragging:J,lastCellHovered:Q,newestRangeStartCell:Z,autoScrollService:$,cellHasChanged:X}=this;if(!J||!z)return;this.updateValuesOnMove(z.target),this.lastMouseEvent=z;let Y=(B)=>Q&&Q.rowPinned===B&&Z.rowPinned===B,U=Y("top")||Y("bottom");if($.check(z,U),!X||!Q)return;let _=Z?.column,H=Q?.column,G=this.calculateColumnsBetween(_,H);if(!G)return;let{rowIndex:W,rowPinned:q}=Q;this.draggingRange.endRow={rowIndex:W,rowPinned:q},this.draggingRange.columns=G,this.dispatchChangedEvent(!1,!1,this.draggingRange.id)}onDragStop(){if(!this.dragging)return;let{id:z}=this.draggingRange;if(this.autoScrollService.ensureCleared(),this.ctrlsSvc.getGridBodyCtrl().eBodyViewport.removeEventListener("scroll",this.bodyScrollListener),this.lastMouseEvent=null,this.dragging=!1,this.draggingRange=void 0,this.lastCellHovered=void 0,this.intersectionRange)this.intersectionRange=!1,this.intersectLastRange();this.dispatchChangedEvent(!1,!0,z)}onColumnsChanged(){this.refreshLastRangeStart();let z=this.visibleCols.allCols;for(let Q of this.cellRanges){let Z=Q.columns;if(Q.columns=Q.columns.filter((X)=>X.isVisible()&&z.indexOf(X)!==-1),!Z0(Z,Q.columns))this.dispatchChangedEvent(!1,!0,Q.id)}let J=this.cellRanges.length;if(this.cellRanges=this.cellRanges.filter((Q)=>Q.columns.length>0),J>this.cellRanges.length)this.dispatchChangedEvent(!1,!0)}refreshLastRangeStart(){let z=N(this.cellRanges);if(!z)return;this.refreshRangeStart(z)}isContiguousRange(z){let J=z.columns;if(!J.length)return!1;let Q=this.visibleCols.allCols,Z=J.map(($)=>Q.indexOf($)).sort(($,X)=>$-X);return N(Z)-Z[0]+1===J.length}getRangeStartRow(z){if(z.startRow&&z.endRow)return q0(z.startRow,z.endRow)?z.startRow:z.endRow;return{rowIndex:0,rowPinned:(this.beans.pinnedRowModel?.getPinnedTopRowCount()??0)>0?"top":null}}getRangeEndRow(z){if(z.startRow&&z.endRow)return q0(z.startRow,z.endRow)?z.endRow:z.startRow;let J=this.beans.pinnedRowModel?.getPinnedBottomRowCount()??0;if(J>0)return{rowIndex:J-1,rowPinned:"bottom"};return{rowIndex:this.rowModel.getRowCount()-1,rowPinned:null}}getRangeRowCount(z){let J=this.beans,Q=this.getRangeStartRow(z),Z=this.getRangeEndRow(z),$=Y5(J,Q);return Y5(J,Z)-$+1}handleCellMouseDown(z,J){let Q=z.ctrlKey||z.metaKey;this.handleCellSelectionInput(J,{target:z.target,shiftKey:z.shiftKey,isRightClick:iZ(this.beans,z),isMultiRange:this.isMultiRange(z),isMultiKey:Q,preventDefault:()=>z.preventDefault()})}handleCellKeyboardSelect(z,J){let Q=z.ctrlKey||z.metaKey;this.handleCellSelectionInput(J,{target:z.target,shiftKey:z.shiftKey,isRightClick:!1,isMultiRange:this.isMultiRangeForKeyState(Q),isMultiKey:Q,preventDefault:()=>z.preventDefault()})}handleCellSelectionInput(z,J){let{target:Q,shiftKey:Z,isRightClick:$,isMultiRange:X,isMultiKey:Y,preventDefault:U}=J;if(this.shouldSuppressRangeSelection(Q))return;let _=this.isAllColumnsSelectionCell(z);if(_)U();if(Z)return this.extendLatestRangeToCell(z);if(_&&$)return;this.updateSelectionModeForCell(z);let H=this.calculateColumnsBetween(z.column,z.column);if(!H)return;let G=_?this.findContainingRange({columns:H,startRow:z,endRow:z}):void 0;if(_&&!!G&&X&&Y&&G)this.removeRowFromAllColumnsRange(z,G);else this.setRangeToCell(z,X)}isMultiRange(z){return this.isMultiRangeForKeyState(z.ctrlKey||z.metaKey)}isMultiRangeForKeyState(z){let{editingWithRanges:J,allowMulti:Q}=this.getMultiRangeContext();return J||(Q?z:!1)}getMultiRangeContext(){let{gos:z,editSvc:J}=this.beans,Q=!!J?.isEditing()&&!!J?.isRangeSelectionEnabledWhileEditing(),Z=m9(z)&&!Q;return{editingWithRanges:Q,suppressMultiRanges:Z,allowMulti:!Z}}removeRowFromAllColumnsRange(z,J){let{beans:Q,cellRanges:Z}=this,$=m1(Q),X=Oz(Q),Y=this.getRangeStartRow(J),U=this.getRangeEndRow(J);if(!Y&&a($,z))iJ(J,D0(Q,$),"top");else if(!U&&a(X,z))iJ(J,r0(Q,X),"bottom");else if(a(Y,U))X0(Z,J);else if(a(Y,z))iJ(J,D0(Q,z),"top");else if(a(U,z))iJ(J,r0(Q,z),"bottom");else{let _=r0(Q,z),H=D0(Q,z);J.startRow=Y,J.endRow=_??void 0,Z.push({...J,startRow:H??void 0,endRow:U})}this.dispatchChangedEvent(!0,!0)}setRangeToCell(z,J=!1){let{gos:Q}=this;if(!n0(Q))return;this.updateSelectionModeForCell(z);let Z=this.calculateColumnsBetween(z.column,z.column);if(!Z)return;let{suppressMultiRanges:$}=this.getMultiRangeContext();if($||!J||n(this.cellRanges))this.removeAllCellRanges(!0);let X={rowIndex:z.rowIndex,rowPinned:z.rowPinned},Y={startRow:X,endRow:X,columns:Z,startColumn:z.column},U=this.ensureRangeStartColumn(Y);if(!U)return;this.cellRanges.push(Y),this.setNewestRangeStartCell({...z,column:U}),this.onDragStop(),this.dispatchChangedEvent(!0,!0)}getRangeLastColumn(z){let J=z.columns[0],Q=N(z.columns);return this.newestRangeStartCell?.column===J?Q:J}extendRangeRowCountBy(z,J){let{beans:Q}=this,{startRow:Z,endRow:$}=z;if(!Z||!$)return;let X=0,Y,U=q0($,Z);if(U)Y=Z;else Y=$;let _=J>0?D0:r0,H=Math.abs(J);while(X<H){let W=_(Q,Y);if(!W)break;Y=W,X++}if(X!==H)return;let G={...Y,column:this.getRangeLastColumn(z)};this.updateRangeRowBoundary({cellRange:z,boundary:U?"start":"end",cellPosition:G})}extendRangeColumnCountBy(z,J){let{columns:Q}=z;if(J===0)return;let Z=this.getColumnsFromModel();if(!Z)return;let $=this.ensureRangeStartColumn(z);if(!$)return;let X=N(Q),Y=$===Q[0]?X:Q[0];if(!X||!Y)return;let U=Z.indexOf($),_=Z.indexOf(Y),H=_<U;if(H)U=_;let W=Q.length+J;if(W<=0)return;let q=[];for(let B=U;B<U+W;B++){let E=Z[B];if(!E)break;q.push(E)}if(q.length===W){if(H){let B=N(q);z.startColumn=B,this.focusCellOnNewColumn(z,B)}z.columns=q,this.dispatchChangedEvent(!0,!0,z.id)}}extendLatestRangeToCell(z){if(this.isEmpty()||!this.newestRangeStartCell)return;let J=N(this.cellRanges);this.updateSelectionModeForCell(z),this.updateRangeRowBoundary({cellRange:J,boundary:"end",cellPosition:z})}extendRangeToCell(z,J){if(!z)return;this.updateSelectionModeForCell(J),this.updateRangeRowBoundary({cellRange:z,boundary:"end",cellPosition:J})}updateRangeRowBoundary(z){let{cellRange:J,boundary:Q,cellPosition:Z,silent:$=!1}=z,X=Z.column,Y=this.ensureRangeStartColumn(J);if(!Y)return;let U=this.calculateColumnsBetween(Y,X);if(!U||Pk(J,Z))return;if(Q==="start")this.focusCellOnNewRow(J,Z);if(J.columns=U,J[Q==="start"?"startRow":"endRow"]={rowIndex:Z.rowIndex,rowPinned:Z.rowPinned},!$)this.dispatchChangedEvent(!0,!0,J.id)}getRangeEdgeColumns(z){let J=this.visibleCols.allCols,Q=z.columns.map((Z)=>J.indexOf(Z)).filter((Z)=>Z>-1).sort((Z,$)=>Z-$);return{left:J[Q[0]],right:J[N(Q)]}}extendLatestRangeInDirection(z){if(this.isEmpty()||!this.newestRangeStartCell)return;let J=z.key,Q=z.ctrlKey||z.metaKey,Z=N(this.cellRanges),$=this.newestRangeStartCell,X=Z.endRow.rowIndex,Y=Z.endRow.rowPinned,_={column:this.getRangeLastColumn(Z),rowIndex:X,rowPinned:Y},H=this.cellNavigation.getNextCellToFocus(J,_,Q);if(!H)return;if(this.shouldSkipColumn(H.column))return;return this.setCellRange({rowStartIndex:$.rowIndex,rowStartPinned:$.rowPinned,rowEndIndex:H.rowIndex,rowEndPinned:H.rowPinned,columnStart:$.column,columnEnd:H.column}),H}setCellRange(z){if(!n0(this.gos))return;this.removeAllCellRanges(!0),this.addCellRange(z)}setCellRanges(z){if(Z0(this.cellRanges,z))return;if(!this.verifyCellRanges(this.gos))return;this.setSelectionMode(!1),this.removeAllCellRanges(!0);let J=this.getColumnsFromModel(this.visibleCols.allCols)??[],Q=!1;for(let Z of z){if(Z.columns&&Z.startRow){let $=this.getColumnsFromModel(Z.columns);if(!$||$.length===0)continue;Z.columns=$;let{startRow:X}=Z;this.setNewestRangeStartCell({rowIndex:X.rowIndex,rowPinned:X.rowPinned,column:Z.columns[0]})}if(!Q&&J.length>0&&this.isAllColumnsRange(Z,J))Q=!0;this.cellRanges.push(Z)}this.setSelectionMode(Q),this.dispatchChangedEvent(!1,!0)}clearCellRangeCellValues(z){let{beans:J,eventSvc:Q}=this,{cellEventSource:Z="rangeSvc",dispatchWrapperEvents:$,wrapperEventSource:X="deleteKey",restoreSourceInBatch:Y}=z,{cellRanges:U}=z;if($)Q.dispatchEvent({type:"cellSelectionDeleteStart",source:X}),Q.dispatchEvent({type:"rangeDeleteStart",source:X});if(!U)U=this.cellRanges;let{valueSvc:_,editSvc:H}=J,G=!!H?.isBatchEditing(),{changeDetectionSvc:W}=J;W?.beginDeferred();try{this.forEachEditableCellInRanges(U,(q,B)=>{if(Y&&G){H?.batchResetToSourceValue({rowNode:q,column:B});return}let E=_.getDeleteValue(B,q);q.setDataValue(B,E,Z)})}finally{W?.endDeferred()}if($)Q.dispatchEvent({type:"cellSelectionDeleteEnd",source:X}),Q.dispatchEvent({type:"rangeDeleteEnd",source:X})}createCellRangeFromCellRangeParams(z){return this.createPartialCellRangeFromRangeParams(z,!1)}createPartialCellRangeFromRangeParams(z,J){let{columns:Q,columnStart:Z,columnEnd:$,rowStartIndex:X,rowStartPinned:Y,rowEndIndex:U,rowEndPinned:_}=z,H=this.getColumnsFromParams(Q,Z,$);if(!H||!J&&H.columns.length===0)return;let{columns:G,startsOnTheRight:W}=H,q=WU(X,Y),B=WU(U,_);return{startRow:q,endRow:B,columns:G,startColumn:this.getColumnFromModel(Z)??(W?N(G):G[0])}}addCellRange(z){let J=this.gos;if(!n0(J)||!this.verifyCellRanges(J))return;this.setSelectionMode(!1);let Q=this.createCellRangeFromCellRangeParams(z);if(Q){if(Q.startRow)this.setNewestRangeStartCell({rowIndex:Q.startRow.rowIndex,rowPinned:Q.startRow.rowPinned,column:Q.startColumn});return this.cellRanges.push(Q),this.dispatchChangedEvent(!1,!0,Q.id),Q}}getCellRanges(){return this.cellRanges}isEmpty(){return this.cellRanges.length===0}isMoreThanOneCell(){let z=this.cellRanges.length;if(z===0)return!1;if(z>1)return!0;let J=this.cellRanges[0],Q=this.getRangeStartRow(J),Z=this.getRangeEndRow(J);return Q.rowPinned!==Z.rowPinned||Q.rowIndex!==Z.rowIndex||J.columns.length!==1}areAllRangesAbleToMerge(){let z=new Map;if(this.cellRanges.length<=1)return!0;for(let Z of this.cellRanges)this.forEachRowInRange(Z,($)=>{let X=`${$.rowPinned||"normal"}_${$.rowIndex}`,Y=z.get(X),U=Z.columns.map((_)=>_.getId());if(Y){let _=U.filter((H)=>Y.indexOf(H)===-1);Y.push(..._)}else z.set(X,U)});let Q;for(let Z of z.values()){let $=Z.sort().join();if(Q===void 0){Q=$;continue}if(Q!==$)return!1}return!0}removeAllCellRanges(z){if(this.isEmpty())return;if(this.onDragStop(),this.cellRanges.length=0,!z)this.dispatchChangedEvent(!1,!0)}isCellInAnyRange(z){return this.getCellRangeCount(z)>0}isCellInSpecificRange(z,J){let Q=J.columns?.includes(z.column),Z=this.isRowInRange(z,J);return Q&&Z}isColumnInAnyRange(z){let{beans:J}=this,Q=m1(J),Z=Oz(J);if(!Q||!Z)return!1;let $=z.isColumn?[z]:z.getDisplayedLeafColumns();return this.findContainingRange({columns:$,startRow:Q,endRow:Z},!0)!=null}findContainingRange({columns:z,startRow:J,endRow:Q},Z=!1){let $=this.cellRanges;for(let X=$.length-1;X>=0;X--){let Y=$[X],U=z.every((H)=>Y.columns.includes(H)),_=!1;if(Z)_=a(Y.startRow,J)&&a(Y.endRow,Q);else{let H=J&&this.isRowInRange(J,Y),G=Q&&this.isRowInRange(Q,Y);_=!!H&&!!G}if(U&&_)return Y}}isBottomRightCell(z,J){let Q=this.visibleCols.allCols,Z=z.columns.map((H)=>Q.indexOf(H)).sort((H,G)=>H-G),{startRow:$,endRow:X}=z,Y=q0($,X)?X:$,U=Q.indexOf(J.column)===N(Z),_=J.rowIndex===Y.rowIndex&&U0(J.rowPinned)===U0(Y.rowPinned);return U&&_}getCellRangeCount(z){return this.cellRanges.filter((J)=>this.isCellInSpecificRange(z,J)).length}isRowInRange(z,J){let Q=this.getRangeStartRow(J),Z=this.getRangeEndRow(J),$=a(z,Q),X=a(z,Z);if($||X)return!0;let Y=!q0(z,Q),U=q0(z,Z);return Y&&U}intersectLastRange(z){let{editingWithRanges:J,suppressMultiRanges:Q}=this.getMultiRangeContext();if(J||Q||z&&this.dragging||this.isEmpty())return;let Z=N(this.cellRanges),$=this.getRangeStartRow(Z),X=this.getRangeEndRow(Z),Y=[];for(let U of this.cellRanges.slice(0,-1)){let _=this.getRangeStartRow(U),H=this.getRangeEndRow(U),G=U.columns,W=G.filter((B)=>Z.columns.indexOf(B)===-1);if(W.length===G.length){Y.push(U);continue}if(q0(X,_)||q0(H,$)){Y.push(U);continue}let q=Y.length;if(q0(_,$)){let B={columns:[...G],startColumn:Z.startColumn,startRow:{..._},endRow:r0(this.beans,$)};Y.push(B)}if(W.length>0){let B={columns:W,startColumn:W.includes(Z.startColumn)?Z.startColumn:W[0],startRow:Vk([{...$},{..._}]),endRow:Ok([{...X},{...H}])};Y.push(B)}if(q0(X,H))Y.push({columns:[...G],startColumn:Z.startColumn,startRow:D0(this.beans,X),endRow:{...H}});if(Y.length-q===1)Y[Y.length-1].id=U.id}if(this.cellRanges=Y,z)this.dispatchChangedEvent(!1,!0)}createRangeHighlightFeature(z,J,Q){z.createManagedBean(new Ak(J,Q))}setSelectionMode(z){this.selectionMode=z?1:0}refreshRangeStart(z){let{columns:J}=z,Q=this.ensureRangeStartColumn(z);if(!Q)return;let Z=(_,H)=>{let G=z.columns.filter((W)=>W!==_);if(_)z.startColumn=_,z.columns=H?[_,...G]:[...G,_];else z.columns=G},{left:$,right:X}=this.getRangeEdgeColumns(z);if(Q===J[0]&&Q!==$){Z($,!0);return}if(Q===N(J)&&Q===X)Z(X,!1)}setNewestRangeStartCell(z){this.newestRangeStartCell=z}getColumnsFromParams(z,J,Q){let Z=!z&&!J&&!Q,$,X=!1;if(Z||z)$=this.getColumnsFromModel(Z?void 0:z);else if(J&&Q){if($=this.calculateColumnsBetween(J,Q),$?.length)X=$[0]!==this.getColumnFromModel(J)}return $?{columns:$,startsOnTheRight:X}:void 0}verifyCellRanges(z){let{suppressMultiRanges:J}=this.getMultiRangeContext(),Q=u9(z)&&J&&this.cellRanges.length>1;if(Q)V(93);return!Q}forEachRowInRange(z,J){let Q=this.getRangeStartRow(z),Z=this.getRangeEndRow(z),$=Q;while($){if(J($),a($,Z))break;$=D0(this.beans,$)}}forEachEditableCellInRanges(z,J){let{beans:Q}=this;for(let Z of z)this.forEachRowInRange(Z,($)=>{let X=j0(Q,$);if(!X)return;for(let Y=0;Y<Z.columns.length;Y++){let U=this.getColumnFromModel(Z.columns[Y]);if(!U?.isCellEditable(X))continue;J(X,U)}})}onBodyScroll(){if(this.dragging&&this.lastMouseEvent)this.onDragging(this.lastMouseEvent)}updateValuesOnMove(z){let J=a2(this.gos,z),Q=J?.cellPosition;if(this.cellHasChanged=!1,!Q||this.lastCellHovered&&o1(Q,this.lastCellHovered))return;let Z=this.beans.editSvc;if(Z?.isEditing(J,{withOpenEditor:!0})&&!Z?.isRangeSelectionEnabledWhileEditing()){this.dragSvc.cancelDrag(z);return}if(this.lastCellHovered)this.cellHasChanged=!0;this.lastCellHovered=Q}dispatchChangedEvent(z,J,Q){this.eventSvc.dispatchEvent({type:"cellSelectionChanged",started:z,finished:J,id:Q}),this.eventSvc.dispatchEvent({type:"rangeSelectionChanged",started:z,finished:J,id:Q})}getColumnFromModel(z){return typeof z==="string"?this.colModel.getCol(z):z}getColumnsFromModel(z){let{visibleCols:J,selectionMode:Q}=this;if(!z||Q===1)z=J.allCols;let Z=[];for(let $ of z){let X=this.getColumnFromModel($);if(!X||this.shouldSkipColumn(X))continue;Z.push(X)}return Z.length?Z:void 0}ensureRangeStartColumn(z){let J=this.getRangeStartColumn(z.columns,z.startColumn);if(!J)return;return z.startColumn=J,J}getRangeStartColumn(z,J){let Q=z[0],Z=N(z);if(!Q||!Z)return;if(!J||z.includes(J))return J??Q;let $=this.visibleCols.allCols,X=$.indexOf(J),Y=$.indexOf(Q),U=$.indexOf(Z);if(X<0||Y<0||U<0)return Q;return X-Y<=U-X?Q:Z}calculateColumnsBetween(z,J){let Q=this.visibleCols.allCols,Z=this.getColumnFromModel(z),$=this.getColumnFromModel(J),X=Z===$,Y=Q.indexOf(Z);if(Y<0){V(178,{colId:Z.getId()});return}let U=X?Y:Q.indexOf($);if(U<0){V(178,{colId:$.getId()});return}if(X||this.selectionMode===1)return this.getColumnsFromModel([Z]);let _=Math.min(Y,U),H=_===Y?U:Y;return this.getColumnsFromModel(Q.slice(_,H+1))}focusCellOnNewColumn(z,J){let{focusSvc:Q}=this.beans,Z=Q.getFocusedCell();if(!Z)return;if(this.isCellInSpecificRange(Z,z))Q.setFocusedCell({...Z,column:J,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}focusCellOnNewRow(z,J){let{focusSvc:Q}=this.beans,Z=Q.getFocusedCell();if(!Z)return;if(this.isCellInSpecificRange(Z,z))Q.setFocusedCell({...J,column:Z.column,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}createDragListenerFeature(z){return new Dk(z)}createCellRangeFeature(z){return new Mk(this.beans,z)}createHeaderGroupCellMouseListenerFeature(z,J){return new Rk(z,J)}handleColumnSelection(z,J){let{gos:Q,beans:Z,columnRangeSelectionCtx:$,cellRanges:X}=this;if(!e4(Q))return;let{suppressMultiRanges:Y,editingWithRanges:U}=this.getMultiRangeContext(),_=X.length>0,H=J.ctrlKey||J.metaKey,G=!U||H,W=m1(Z),q=Oz(Z);if(!W||!q)return;if(J.key===R.ENTER)J.preventDefault();if(J.shiftKey){let E=$.root;if(!E)return;let K=z.isColumn?z:N(z.getLeafColumns()),F=this.findContainingRange({columns:[E],startRow:W,endRow:q},!0);if(!F){X0(X,$.lastCellRange),this.selectColumns(this.calculateColumnsBetween(E,K),W,q);return}this.updateRangeRowBoundary({cellRange:F,boundary:"end",cellPosition:{column:K,...q}});return}if(_&&(Y||!H&&!U))this.removeAllCellRanges(!0);let B=(E,K)=>{let F=this.findContainingRange({columns:E,startRow:W,endRow:q},!0);if(F&&G)this.deselectColumnsFromRange(F,E);else{let L=this.selectColumns(E,W,q);if(L)$.lastCellRange=L}$.root=K};if(z.isColumn)B([z],z);else{let E=z.getDisplayedLeafColumns();B(E,E[0])}}deselectColumnsFromRange(z,J){if(b2(z.columns,J),J.includes(z.startColumn))z.startColumn=z.columns[0];if(z.columns.length===0)X0(this.cellRanges,z);this.dispatchChangedEvent(!0,!0)}selectColumns(z,J,Q){return this.addCellRange({columns:z,columnStart:z[0],columnEnd:N(z),rowStartIndex:J.rowIndex,rowStartPinned:J.rowPinned,rowEndIndex:Q.rowIndex,rowEndPinned:Q.rowPinned})}};function WU(z,J){return z!=null?{rowIndex:z,rowPinned:J}:void 0}function Vk(z){let J;for(let Q of z)if(J===void 0||q0(J,Q))J=Q;return J}function Ok(z){let J;for(let Q of z)if(J===void 0||q0(Q,J))J=Q;return J}function Pk(z,J){let{startRow:Q,endRow:Z}=z,$=q0(Q,Z)?Z:Q,X=J.rowIndex===$.rowIndex&&J.rowPinned===$.rowPinned,Y=z.columns[0],U=N(z.columns),_=z.startColumn===Y?U:Y;return J.column===_&&X}function iJ(z,J,Q){let Z;if(Q==="top")Z=!z.startRow||!z.endRow||q0(z.startRow,z.endRow)?"startRow":"endRow";else Z=!z.startRow||!z.endRow||q0(z.startRow,z.endRow)?"endRow":"startRow";z[Z]=J??void 0}var P_={moduleName:"CellSelection",version:$0,beans:[jk],dynamicBeans:{fillHandle:Xk,rangeHandle:Yk},apiFunctions:{getCellRanges:_k,addCellRange:Hk,clearRangeSelection:_U,clearCellSelection:_U},dependsOn:[N0,G1,SJ],css:[Uk]};function Tk(z){return z.colModel.isPivotMode()}function Sk(z,J,Q){return z.pivotResultCols?.lookupPivotResultCol(J,Q)??null}function Ik(z,J){z.valueColsSvc?.setColumns(J,"api")}function fk(z){return z.valueColsSvc?.columns??[]}function kk(z,J){z.valueColsSvc?.removeColumns(J,"api")}function Ck(z,J){z.valueColsSvc?.addColumns(J,"api")}function vk(z,J){z.pivotColsSvc?.setColumns(J,"api")}function Nk(z,J){z.pivotColsSvc?.removeColumns(J,"api")}function wk(z,J){z.pivotColsSvc?.addColumns(J,"api")}function yk(z){return z.pivotColsSvc?.columns??[]}function xk(z,J){z.pivotResultCols?.setPivotResultCols(J,"api")}function bk(z){let J=z.pivotResultCols?.getPivotResultCols();return J?J.list:null}var qU="PivotRowTotal_",gk=({headerName:z},{headerName:J})=>{if(z&&!J)return 1;else if(!z&&J)return-1;else if(!z&&!J)return 0;if(z<J)return-1;else if(z>J)return 1;else return 0},hk=(z)=>(J,Q)=>z(J.headerName,Q.headerName),uk=class extends j{constructor(){super(...arguments);this.beanName="pivotColDefSvc"}wireBeans(z){this.colModel=z.colModel,this.pivotColsSvc=z.pivotColsSvc,this.valueColsSvc=z.valueColsSvc,this.colNames=z.colNames}postConstruct(){let z=()=>this.gos.get("serverSidePivotResultFieldSeparator")??"_";this.fieldSeparator=z(),this.addManagedPropertyListener("serverSidePivotResultFieldSeparator",()=>{this.fieldSeparator=z()});let J=()=>this.gos.get("pivotDefaultExpanded");this.pivotDefaultExpanded=J(),this.addManagedPropertyListener("pivotDefaultExpanded",()=>{this.pivotDefaultExpanded=J()})}createPivotColumnDefs(z){let J=this.createPivotColumnsFromUniqueValues(z);function Q($,X=[]){return $.forEach((Y)=>{if(Y.children!==void 0)Q(Y.children,X);else X.push(Y)}),X}let Z=Q(J);return this.addRowGroupTotals(J,Z),this.addExpandablePivotGroups(J,Z),this.addPivotTotalsToGroups(J,Z),J}createPivotColumnsFromUniqueValues(z){let J=this.pivotColsSvc?.columns??[],Q=J.length;return this.recursivelyBuildGroup(0,z,[],Q,J)}recursivelyBuildGroup(z,J,Q,Z,$){if(z>=Z)return this.buildMeasureCols(Q);let{pivotComparator:X}=$[z].getColDef(),Y=X?hk(X):gk,U=this.valueColsSvc?.columns;if(U?.length===1&&this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&z===Z-1){let H=[];for(let G of J.keys()){let W=[...Q,G],q=this.createColDef(U[0],G,W);q.columnGroupShow="open",H.push(q)}return H.sort(Y),H}let _=[];for(let H of J.keys()){let G=this.pivotDefaultExpanded===-1||z<this.pivotDefaultExpanded,W=[...Q,H];_.push({children:this.recursivelyBuildGroup(z+1,J.get(H),W,Z,$),headerName:H,pivotKeys:W,columnGroupShow:"open",openByDefault:G,groupId:this.generateColumnGroupId(W)})}return _.sort(Y),_}buildMeasureCols(z){let J=this.valueColsSvc?.columns??[];if(J.length===0)return[this.createColDef(null,"-",z)];return J.map((Q)=>{let Z=this.colNames.getDisplayNameForColumn(Q,"header"),$=this.createColDef(Q,Z,z);return $.columnGroupShow="open",$})}addExpandablePivotGroups(z,J){let Q=this.gos.get("suppressExpandablePivotGroups");if(Q||this.gos.get("pivotColumnGroupTotals"))return;let Z=($,X,Y)=>{if("children"in $){let{valueColsSvc:H}=this,{columns:G=[]}=H??{},W=new Map;$.children.forEach((E)=>{Z(E,X,W)});let q=!$.children.some((E)=>E.children),B=q&&G.length===1&&this.gos.get("removePivotHeaderRowWhenSingleValueColumn");for(let E of G){let K=this.colNames.getDisplayNameForColumn(E,"header"),F=this.createColDef(E,K,$.pivotKeys);if(F.pivotTotalColumnIds=W.get(E.getColId()),F.columnGroupShow=!Q?"closed":"open",F.aggFunc=E.getAggFunc(),!q||B)$.children.push(F),X.push(F)}this.merge(Y,W);return}if(!$.pivotValueColumn)return;let U=$.pivotValueColumn.getColId();if(Y.has(U))Y.get(U).push($.colId);else Y.set(U,[$.colId])};z.forEach(($)=>{Z($,J,new Map)})}addPivotTotalsToGroups(z,J){if(!this.gos.get("pivotColumnGroupTotals"))return;let Q=this.gos.get("pivotColumnGroupTotals")==="after",Z=this.valueColsSvc?.columns,$=Z?.map((X)=>X.getAggFunc());if(!$||$.length<1||!this.sameAggFuncs($))return;if(Z){let X=Z[0];z.forEach((Y)=>{this.recursivelyAddPivotTotal(Y,J,X,Q)})}}recursivelyAddPivotTotal(z,J,Q,Z){let $=z;if(!$.children){let Y=z;return Y.colId?[Y.colId]:null}let X=[];if($.children.forEach((Y)=>{let U=this.recursivelyAddPivotTotal(Y,J,Q,Z);if(U)X=X.concat(U)}),$.children.length>1){let U=this.getLocaleTextFunc()("pivotColumnGroupTotals","Total"),_=this.createColDef(Q,U,z.pivotKeys,!0);_.pivotTotalColumnIds=X,_.aggFunc=Q.getAggFunc(),_.columnGroupShow=this.gos.get("suppressExpandablePivotGroups")?"open":void 0;let H=z.children;if(Z)H.push(_);else H.unshift(_);J.push(_)}return X}addRowGroupTotals(z,J){if(!this.gos.get("pivotRowTotals"))return;let Q=this.gos.get("pivotRowTotals")==="after",$=(this.valueColsSvc?.columns??[]).slice();if(!Q)$.reverse();let X=$.length>1||!this.gos.get("removePivotHeaderRowWhenSingleValueColumn");for(let Y=0;Y<$.length;Y++){let U=$[Y],_=this.colNames.getDisplayNameForColumn(U,"header"),H=this.createColDef(U,_,[]),G=[];for(let q=0;q<J.length;q++){let B=J[q];if(B.pivotValueColumn===U)G.push(B.colId)}H.pivotTotalColumnIds=G,H.colId=qU+H.colId;let W=X?{children:[H],pivotKeys:[],groupId:`${qU}_pivotGroup_${U.getColId()}`}:H;if(J.push(H),Q)z.push(W);else z.unshift(W)}}recreateColDef(z){let{pivotValueColumn:J,headerName:Q,pivotKeys:Z,pivotTotalColumnIds:$,columnGroupShow:X,colId:Y,valueGetter:U,aggFunc:_}=z;if(!J)return z;let H=this.createColDef(J,Q,Z,!!$);return H.columnGroupShow=X,H.colId=Y,H.valueGetter=U,H.aggFunc=_,H.pivotTotalColumnIds=$,this.gos.get("processPivotResultColDef")?.(H),H}createColDef(z,J,Q,Z=!1){let $={};if(z){let X=z.getColDef();Object.assign($,X),$.hide=!1}if($.headerName=J,$.colId=this.generateColumnId(Q||[],z&&!Z?z.getColId():""),$.field=$.colId,$.valueGetter=(X)=>X.data?.[X.colDef.field],$.pivotKeys=Q,$.pivotValueColumn=z,$.filter===!0)$.filter="agNumberColumnFilter";return $}sameAggFuncs(z){if(z.length==1)return!0;for(let J=1;J<z.length;J++)if(z[J]!==z[0])return!1;return!0}merge(z,J){J.forEach((Q,Z)=>{let X=[...z.has(Z)?z.get(Z):[],...Q];z.set(Z,X)})}generateColumnGroupId(z){return`pivotGroup_${(this.pivotColsSvc?.columns??[]).map((Q)=>Q.getColId()).join("-")}_${z.join("-")}`}generateColumnId(z,J){return`pivot_${(this.pivotColsSvc?.columns??[]).map((Z)=>Z.getColId()).join("-")}_${z.join("-")}_${J}`}createColDefsFromFields(z){let J=new Map;for(let $=0;$<z.length;$++){let Y=z[$].split(this.fieldSeparator),U=J;for(let _=0;_<Y.length;_++){let H=Y[_],G=U.get(H);if(!G)G=new Map,U.set(H,G);U=G}}let Q=($,X,Y,U)=>{let _=[];for(let[W,q]of Y){let B=Q(`${$}${this.fieldSeparator}${W}`,W,q,U+1);_.push(B)}if(_.length===0){let W=this.colModel.getColDefCol(X);if(W){let B=this.colNames.getDisplayNameForColumn(W,"header")??X,E=this.createColDef(W,B,void 0,!1);return E.colId=$,E.aggFunc=W.getAggFunc(),E.valueGetter=(K)=>K.data?.[$],E}return{colId:$,headerName:X,valueGetter:(B)=>B.data?.[$]}}if(this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&_.length===1&&"colId"in _[0])return _[0].headerName=X,_[0];return{openByDefault:this.pivotDefaultExpanded===-1||U<this.pivotDefaultExpanded,groupId:$,headerName:X,children:_}},Z=[];for(let[$,X]of J){let Y=Q($,$,X,0);Z.push(Y)}return Z}},mk=class extends j{constructor(){super(...arguments);this.beanName="pivotResultCols"}wireBeans(z){this.colModel=z.colModel,this.visibleCols=z.visibleCols}destroy(){G4(this.beans,this.pivotResultCols?.tree),super.destroy()}isPivotResultColsPresent(){return this.pivotResultCols!=null}lookupPivotResultCol(z,J){if(this.pivotResultCols==null)return null;let Q=this.colModel.getColDefCol(J),Z=null;for(let $ of this.pivotResultCols.list){let X=$.getColDef().pivotKeys,Y=$.getColDef().pivotValueColumn;if(Z0(X,z)&&Y===Q)Z=$}return Z}getPivotResultCols(){return this.pivotResultCols}getPivotResultCol(z){if(!this.pivotResultCols)return null;return this.colModel.getColFromCollection(z,this.pivotResultCols)}getAggregationOrderedList(){let z=this.aggOrderedList;if(z!==void 0)return z;let J=this.pivotResultCols?.list;if(!J||J.length===0)return this.aggOrderedList=null,null;let Q=!1;for(let Z=0;Z<J.length;++Z)if(J[Z].getColDef().pivotTotalColumnIds!=null){Q=!0;break}if(!Q)z=J;else{let Z=[],$=[];for(let X=0;X<J.length;++X){let Y=J[X];if(Y.getColDef().pivotTotalColumnIds!=null)$.push(Y);else Z.push(Y)}z=Z.concat($)}return this.aggOrderedList=z,z}setPivotResultCols(z,J){if(this.aggOrderedList=void 0,!this.colModel.ready)return;if(z==null&&this.pivotResultCols==null)return;if(z){this.processPivotResultColDef(z);let Z=(J==="api"?rZ:n9)(this.beans,z,!1,this.pivotResultCols?.tree||this.previousPivotResultCols||void 0,J);G4(this.beans,this.pivotResultCols?.tree,Z.columnTree);let{columnTree:$,treeDepth:X}=Z,Y=AJ($),U={};this.pivotResultCols={tree:$,treeDepth:X,list:Y,map:U};for(let H of this.pivotResultCols.list)this.pivotResultCols.map[H.getId()]=H;let _=!!this.previousPivotResultCols;this.previousPivotResultCols=null,this.colModel.refreshCols(!_,J)}else this.previousPivotResultCols=this.pivotResultCols?this.pivotResultCols.tree:null,this.pivotResultCols=null,this.colModel.refreshCols(!1,J);this.visibleCols.refresh(J)}processPivotResultColDef(z){let J=this.gos.get("processPivotResultColDef"),Q=this.gos.get("processPivotResultColGroupDef");if(!J&&!Q)return;let Z=($)=>{$.forEach((X)=>{if(I(X.children)){let U=X;if(Q)Q(U);Z(U.children)}else{let U=X;if(J)J(U)}})};if(z)Z(z)}},BU="Exceeded maximum allowed pivot column count.",sJ=(z)=>{let J={};return z.forEach((Q,Z)=>J[Z]=Q instanceof Map?sJ(Q):Q),J},ck=class extends j{constructor(){super(...arguments);this.beanName="pivotStage",this.step="pivot",this.refreshProps=["removePivotHeaderRowWhenSingleValueColumn","pivotRowTotals","pivotColumnGroupTotals","suppressExpandablePivotGroups"],this.uniqueValues=new Map,this.lastTimeFailed=!1,this.maxUniqueValues=-1,this.currentUniqueCount=0}wireBeans(z){this.valueSvc=z.valueSvc,this.colModel=z.colModel,this.pivotResultCols=z.pivotResultCols,this.rowGroupColsSvc=z.rowGroupColsSvc,this.valueColsSvc=z.valueColsSvc,this.pivotColsSvc=z.pivotColsSvc,this.pivotColDefSvc=z.pivotColDefSvc}execute(z){if(this.colModel.isPivotActive())return this.executePivotOn(z);else return this.executePivotOff()}executePivotOff(){if(this.aggregationColumnsHashLastTime=null,this.uniqueValues=new Map,this.pivotResultCols.isPivotResultColsPresent())return this.pivotResultCols.setPivotResultCols(null,"rowModelUpdated"),!0;return!1}executePivotOn(z){let J=this.valueColsSvc?.columns.length??1,Q=this.gos.get("pivotMaxGeneratedColumns");this.maxUniqueValues=Q===-1?-1:Q/J;let Z;try{Z=this.bucketUpRowNodes(z)}catch(L){if(L.message===BU)return this.pivotResultCols.setPivotResultCols([],"rowModelUpdated"),this.eventSvc.dispatchEvent({type:"pivotMaxColumnsExceeded",message:L.message}),this.lastTimeFailed=!0,!1;throw L}let $=this.setUniqueValues(Z),X=this.valueColsSvc?.columns??[],Y=X.map((L)=>`${L.getId()}-${L.getColDef().headerName}`).join("#"),U=X.map((L)=>L.getAggFunc().toString()).join("#"),_=this.aggregationColumnsHashLastTime!==Y,H=this.aggregationFuncsHashLastTime!==U;this.aggregationColumnsHashLastTime=Y,this.aggregationFuncsHashLastTime=U;let G=(this.rowGroupColsSvc?.columns??[]).map((L)=>L.getId()).join("#"),W=G!==this.groupColumnsHashLastTime;this.groupColumnsHashLastTime=G;let q=this.gos.get("pivotRowTotals"),B=this.gos.get("pivotColumnGroupTotals"),E=this.gos.get("suppressExpandablePivotGroups"),K=this.gos.get("removePivotHeaderRowWhenSingleValueColumn"),F=q!==this.pivotRowTotalsLastTime||B!==this.pivotColumnGroupTotalsLastTime||E!==this.suppressExpandablePivotGroupsLastTime||K!==this.removePivotHeaderRowWhenSingleValueColumnLastTime;if(this.pivotRowTotalsLastTime=q,this.pivotColumnGroupTotalsLastTime=B,this.suppressExpandablePivotGroupsLastTime=E,this.removePivotHeaderRowWhenSingleValueColumnLastTime=K,this.lastTimeFailed||$||_||W||H||F){let L=this.pivotColDefSvc.createPivotColumnDefs(this.uniqueValues);return this.pivotResultCols.setPivotResultCols(L,"rowModelUpdated"),this.lastTimeFailed=!1,!0}return this.lastTimeFailed=!1,!1}setUniqueValues(z){if(!UJ(sJ(this.uniqueValues),sJ(z)))return this.uniqueValues=z,!0;return!1}bucketUpRowNodes(z){this.currentUniqueCount=0;let J=new Map;t0(this.beans.rowModel.rootNode,this.beans.rowModel.hierarchical,z,(Z)=>{if(Z.leafGroup)Z.childrenMapped=null});let Q=(Z)=>{if(Z.leafGroup)this.bucketRowNode(Z,J);else{let $=Z.childrenAfterFilter;if($)for(let X=0,Y=$.length;X<Y;++X)Q($[X])}};return Q(this.beans.rowModel.rootNode),J}bucketRowNode(z,J){let Q=this.pivotColsSvc?.columns;if(Q?.length===0)z.childrenMapped=null;else z.childrenMapped=sJ(this.bucketChildren(z.childrenAfterFilter,Q,0,J));if(z.sibling)z.sibling.childrenMapped=z.childrenMapped}bucketChildren(z,J=[],Q,Z){let $=new Map,X=J[Q],Y=this.maxUniqueValues!==-1;for(let _=0,H=z.length;_<H;++_){let G=z[_],W=this.valueSvc.getKeyForNode(X,G);if(n(W))W="";if(!Z.get(W)){this.currentUniqueCount+=1,Z.set(W,new Map);let q=this.currentUniqueCount>this.maxUniqueValues;if(Y&&q)throw Error(BU)}if(!$.has(W))$.set(W,[]);$.get(W).push(G)}if(Q===J.length-1)return $;let U=new Map;for(let _ of $.keys())U.set(_,this.bucketChildren($.get(_),J,Q+1,Z.get(_)));return U}},pk={moduleName:"SharedPivot",version:$0,beans:[mk,uk,E_],apiFunctions:{isPivotMode:Tk,getPivotResultColumn:Sk,setValueColumns:Ik,getValueColumns:fk,removeValueColumns:kk,addValueColumns:Ck,setPivotColumns:vk,removePivotColumns:Nk,addPivotColumns:wk,getPivotColumns:yk,setPivotResultColumns:xk,getPivotResultColumns:bk},dependsOn:[R_,A5]},T_={moduleName:"Pivot",version:$0,rowModels:["clientSide"],beans:[ck],dependsOn:[pk,xf,YQ]};var Yg=String.fromCodePoint(31,41150,8291);var S_=[{symbol:"%",fixity:"postfix",precedence:100},{symbol:"-",fixity:"prefix",precedence:90},{symbol:"+",fixity:"prefix",precedence:90},{symbol:"^",fixity:"infix",precedence:80,associativity:"right"},{symbol:"*",fixity:"infix",precedence:70,associativity:"left",isAssociative:!0},{symbol:"/",fixity:"infix",precedence:70,associativity:"left"},{symbol:"+",fixity:"infix",precedence:60,associativity:"left",isAssociative:!0},{symbol:"-",fixity:"infix",precedence:60,associativity:"left"},{symbol:"&",fixity:"infix",precedence:55,associativity:"left",isAssociative:!0},{symbol:"=",fixity:"infix",precedence:50,associativity:"left"},{symbol:"<>",fixity:"infix",precedence:50,associativity:"left"},{symbol:">=",fixity:"infix",precedence:50,associativity:"left"},{symbol:"<=",fixity:"infix",precedence:50,associativity:"left"},{symbol:">",fixity:"infix",precedence:50,associativity:"left"},{symbol:"<",fixity:"infix",precedence:50,associativity:"left"}],EU=new Map;for(let z of S_){let J=EU.get(z.symbol)??[];J.push(z),EU.set(z.symbol,J)}var Ug=[...new Set(S_.map((z)=>z.symbol))].sort((z,J)=>J.length-z.length);var _g=Symbol("WrappedFunctionMarker");var ik={column:"bar",groupedColumn:"bar",stackedColumn:"bar",normalizedColumn:"bar",bar:"bar",groupedBar:"bar",stackedBar:"bar",normalizedBar:"bar",line:"line",stackedLine:"line",normalizedLine:"line",scatter:"scatter",bubble:"bubble",pie:"pie",donut:"donut",doughnut:"donut",area:"area",stackedArea:"area",normalizedArea:"area",histogram:"histogram",radarLine:"radar-line",radarArea:"radar-area",nightingale:"nightingale",radialColumn:"radial-column",radialBar:"radial-bar",sunburst:"sunburst",rangeBar:"range-bar",rangeArea:"range-area",boxPlot:"box-plot",treemap:"treemap",heatmap:"heatmap",waterfall:"waterfall",funnel:"funnel",coneFunnel:"cone-funnel",pyramid:"pyramid"},dk=new Set(["columnLineCombo","areaColumnCombo","customCombo"]);function nk(z){return dk.has(z)}function rk(z){return z==="doughnut"?"donut":z}function tk(z){return ik[z]}var sk=["number","category","grouped-category","log","time"];var Hg=sk.reduce((z,J)=>({...z,[J]:{title:{_enabledFromTheme:!0}}}),{});var _Q=(z)=>{return(J)=>{if(J==null)return!0;return z(J)}};var lk=["doughnut"];function ak(z){return!!tk(z)||nk(z)}function ok(z){return lk.includes(z)}var Wg=_Q((z)=>{if(ak(z))return!0;if(ok(z)){let J=rk(z);return y4(`The chart type '${z}' has been deprecated. Please use '${J}' instead.`),J}return!1}),qg=_Q((z)=>{return typeof z==="object"}),Bg=_Q((z)=>{return typeof z==="object"}),Eg=_Q((z)=>{return typeof z==="string"||typeof z==="function"});function I_(z){return z.map((J,Q,Z)=>J.map(($,X)=>Z.slice(0,Q+1).reduce((Y,U)=>Y+U[X],0)))}function f_(z){let J=z.map((Q,Z)=>z.reduce(($,X)=>Math.max($,X[Z]),0));return z.map((Q)=>Q.map((Z,$)=>Z/J[$]*19))}var k_=[[1,3,5],[2,6,4],[5,3,1]];var ek=I_(k_);var Kg=f_(ek);var zC=k_;var JC=I_(zC);var Fg=f_(JC);var QC=["number","category","time","grouped-category"],ZC=["angle-category","angle-number","radius-category","radius-number"],Lg=[...QC,...ZC];f9.registerModules([SY,xX,TY,MY,PY,rX,wX,__,P_,T_,V_,P7,rU,lU,Q_,$_,A_,FY,KY,z_,LY,aU]);var su=(z)=>{let{data:J,options:Q,api:Z,on:$,class:X,style:Y="height: 100%; width: 100%",dark:U}=z,_=()=>U!==void 0?typeof U==="function"?U():U:document.documentElement.getAttribute("data-theme")==="dark"||window.matchMedia("(prefers-color-scheme: dark)").matches,H=()=>{if(_())return kJ.withParams({headerFontSize:14,headerVerticalPaddingScale:0.4,rowVerticalPaddingScale:0.4,backgroundColor:"#1d1d1d",foregroundColor:"#ffffff",headerBackgroundColor:"#2a2a2a",headerForegroundColor:"#ffffff",oddRowBackgroundColor:"#262626",borderColor:"#404040",browserColorScheme:"dark"});return kJ.withParams({browserColorScheme:"light",headerFontSize:14,headerVerticalPaddingScale:0.4,rowVerticalPaddingScale:0.4})};return L6("div",{class:X,style:Y,ref:(W)=>{k4(()=>{let q=M6(()=>typeof J==="function"?J():J),B=M6(()=>typeof Q==="function"?Q():Q),E=M6(()=>H()),K=["onFilterChanged","onModelUpdated","onGridSizeChanged","onFirstDataRendered","onRowValueChanged","onSelectionChanged","onCellClicked","onCellDoubleClicked","onCellValueChanged","onRowClicked","onSortChanged","onContextMenu","onColumnResized","onColumnMoved","onRowDataUpdated","onCellEditingStarted","onCellEditingStopped","onPaginationChanged","onBodyScroll"],F={};K.forEach((D)=>{if($?.[D])F[D]=(A)=>$[D](A)});let L={...B,theme:E,rowData:q||[],onGridReady:(D)=>{if(Z)Z.current=D.api;if($?.onGridReady)$.onGridReady(D);if(B?.autoSizeColumns)D.api.autoSizeAllColumns()},...F},M=NJ(W,L);if(Z)Z.current=M;return k4(()=>{let D=typeof J==="function"?J():J;if(Array.isArray(D)){let A=M.getGridOption("rowData");if(D!==A)M.setGridOption("rowData",D)}}),k4(()=>{_();let D=H(),A=M.getGridOption("theme");if(JSON.stringify(D)!==JSON.stringify(A))M.setGridOption("theme",D)}),k4(()=>{if(!Q)return;let D=typeof Q==="function"?Q():Q;if(D)Object.entries(D).forEach(([A,O])=>{try{M.setGridOption(A,O)}catch(T){}})}),()=>{if(M&&!M.isDestroyed())M.destroy();if(Z)Z.current=null}})}})};export{su as Grid};