PageSourceSearch

https://www.switchboard.co/_next/static/chunks/32ea55aa-81a4fdf651af397d.js

js switchboard.co collected 2026-10-03 21:12:07 UTC 996,697 bytes, 267 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[314],{38280:function(e,t,i){let s;i.d(t,{$8A:function(){return lh},$j7:function(){return e_},$zI:function(){return l8},A6C:function(){return n1},AGU:function(){return op},AS9:function(){return tR},Ae9:function(){return ag},AhB:function(){return rF},B7y:function(){return s2},BSb:function(){return ri},Bnu:function(){return nJ},Bs:function(){return er},BxR:function(){return lw},CPJ:function(){return lK},Cfz:function(){return lA},Cvn:function(){return rZ},D_6:function(){return oa},Dkq:function(){return lI},Dl:function(){return s4},EDi:function(){return nI},EHG:function(){return ds},Ecs:function(){return lo},Ekq:function(){return nS},EnH:function(){return r8},Exx:function(){return tA},FST:function(){return r4},FXL:function(){return eH},FiY:function(){return eW},Ft2:function(){return aw},Fxk:function(){return rt},GXE:function(){return eI},Gxm:function(){return ou},H1u:function(){return lX},HO_:function(){return rs},ICW:function(){return hR},IFn:function(){return hY},INo:function(){return oO},IUB:function(){return hX},J8Z:function(){return om},KTj:function(){return lB},KTm:function(){return eZ},KeyCode:function(){return sk},LBn:function(){return ni},LQq:function(){return oR},Lm6:function(){return na},LuV:function(){return lY},MNK:function(){return lm},MQo:function(){return ov},MT0:function(){return nt},MiH:function(){return as},Mqm:function(){return nG},NV1:function(){return lR},Nk3:function(){return hu},NlK:function(){return lO},NqP:function(){return eV},O3h:function(){return eO},OLO:function(){return a3},OQ$:function(){return l2},O_3:function(){return l1},P8n:function(){return ad},PFq:function(){return lV},POd:function(){return e$},QEX:function(){return ru},QHL:function(){return tK},QKF:function(){return ox},QVL:function(){return oU},Qk6:function(){return lN},RGo:function(){return nk},RXH:function(){return o1},RiB:function(){return nV},S8x:function(){return n7},SCV:function(){return n2},SJN:function(){return nr},StC:function(){return nh},TJz:function(){return a_},Tj:function(){return ok},TkE:function(){return lk},TqN:function(){return a$},TsN:function(){return ll},TyE:function(){return nX},VN$:function(){return n6},Vg4:function(){return am},VpB:function(){return aT},VrZ:function(){return n4},Vu6:function(){return ek},WD6:function(){return lS},WJO:function(){return l_},WKU:function(){return hz},Ws0:function(){return s0},X1o:function(){return au},XJR:function(){return nD},XO3:function(){return tD},Y4P:function(){return rQ},Y8R:function(){return ld},YSe:function(){return n$},YaM:function(){return hq},YdH:function(){return av},YvM:function(){return nK},ZST:function(){return og},_:function(){return sJ},_1X:function(){return tj},_3b:function(){return ar},_g0:function(){return nW},_yD:function(){return ex},aCu:function(){return hj},aTd:function(){return ob},aVm:function(){return hK},at1:function(){return sZ},axE:function(){return ly},bL4:function(){return lF},cqo:function(){return ot},drM:function(){return nq},eHy:function(){return tM},f5Y:function(){return nU},fKL:function(){return lx},fQL:function(){return nf},fRQ:function(){return s3},fUo:function(){return oM},fYY:function(){return hL},fkf:function(){return tL},fsG:function(){return eB},gA7:function(){return lc},gu6:function(){return rb},h7_:function(){return lq},hA6:function(){return nN},hSF:function(){return tF},hbW:function(){return hn},hlc:function(){return lb},iZe:function(){return rq},iof:function(){return aS},jMC:function(){return hQ},jUB:function(){return rn},j_S:function(){return s1},j_r:function(){return lD},jkc:function(){return oy},jrN:function(){return o7},js:function(){return rP},juH:function(){return ap},k1$:function(){return lM},kQZ:function(){return lg},l3s:function(){return af},l8_:function(){return nj},lFc:function(){return rE},lul:function(){return lW},mAT:function(){return aC},mUx:function(){return aK},mm1:function(){return oA},n9:function(){return a8},nAt:function(){return rp},nN0:function(){return lH},nPL:function(){return rX},nWP:function(){return hp},nbK:function(){return o8},oSg:function(){return aI},oh5:function(){return rJ},pKK:function(){return oe},plv:function(){return tZ},poj:function(){return ro},qAh:function(){return aM},qKg:function(){return rD},qLq:function(){return l9},qaB:function(){return ez},rYX:function(){return lT},rjZ:function(){return ha},rty:function(){return ry},ruI:function(){return aE},rvo:function(){return rr},rwP:function(){return oQ},s$r:function(){return lf},sAq:function(){return ln},sJC:function(){return l5},sgG:function(){return eX},si9:function(){return oJ},t2:function(){return rA},tEC:function(){return nB},tEG:function(){return a2},tfn:function(){return o5},uIV:function(){return hl},uON:function(){return o9},uRY:function(){return oj},uW1:function(){return lC},uy9:function(){return aW},vA3:function(){return ah},vRu:function(){return lu},vak:function(){return hc},w4P:function(){return s6},wA2:function(){return s9},wEq:function(){return t0},wGv:function(){return oE},wR1:function(){return r1},wSp:function(){return l6},wTq:function(){return tX},wox:function(){return nl},wqO:function(){return ax},x$5:function(){return r3},xu$:function(){return al},y3c:function(){return o3},yQX:function(){return r7},ySp:function(){return lt},ydd:function(){return ng},z0n:function(){return hU},zW2:function(){return tP},zmG:function(){return hd},zn:function(){return lv}});var o,r,n,l,a,h,d,u,c,p,g,m,C,v,f,w,E,S,y,R,D,T,b,A,P,F,L,M,N,I=Object.defineProperty,G=Object.defineProperties,O=Object.getOwnPropertyDescriptor,x=Object.getOwnPropertyDescriptors,_=Object.getOwnPropertySymbols,V=Object.prototype.hasOwnProperty,H=Object.prototype.propertyIsEnumerable,k=(e,t,i)=>t in e?I(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,B=(e,t)=>{for(var i in t||(t={}))V.call(t,i)&&k(e,i,t[i]);if(_)for(var i of _(t))H.call(t,i)&&k(e,i,t[i]);return e},W=(e,t)=>G(e,x(t)),U=(e,t)=>{var i={};for(var s in e)V.call(e,s)&&0>t.indexOf(s)&&(i[s]=e[s]);if(null!=e&&_)for(var s of _(e))0>t.indexOf(s)&&H.call(e,s)&&(i[s]=e[s]);return i},z=(e,t)=>{for(var i in t)I(e,i,{get:t[i],enumerable:!0})},K=(e,t,i,s)=>{for(var o,r=s>1?void 0:s?O(t,i):t,n=e.length-1;n>=0;n--)(o=e[n])&&(r=(s?o(t,i,r):o(r))||r);return s&&r&&I(t,i,r),r},$=(e,t)=>(i,s)=>t(i,s,e),Y={};function j(e){return null==e||""===e?null:e}function q(e,t=!1){return null!=e&&(""!==e||t)}function Q(e){return!q(e)}function X(e){return null==e||0===e.length}function J(e){return null!=e&&"function"==typeof e.toString?e.toString():null}function Z(e){if(void 0===e)return;if(null===e||""===e)return null;if("number"==typeof e)return isNaN(e)?void 0:e;let t=parseInt(e,10);return isNaN(t)?void 0:t}function ee(e){return void 0===e?void 0:null!==e&&""!==e&&("boolean"==typeof e?e:/true/i.test(e))}function et(e){if(null!=e&&""!==e)return e}function ei(e,t){return(e?JSON.stringify(e):null)===(t?JSON.stringify(t):null)}function es(e,t,i=!1){var s,o,r,n;let l=null==e,a=null==t;if(e&&e.toNumber&&(e=e.toNumber()),t&&t.toNumber&&(t=t.toNumber()),l&&a)return 0;if(l)return -1;if(a)return 1;if("string"!=typeof e||!i)return(s=e)>(o=t)?1:s<o?-1:0;try{return e.localeCompare(t)}catch(i){return(r=e)>(n=t)?1:r<n?-1:0}}function eo(e){if(e instanceof Set||e instanceof Map){let t=[];
1return e.forEach(e=>t.push(e)),t}return Object.values(e)}z(Y,{attrToBoolean:()=>ee,attrToNumber:()=>Z,attrToString:()=>et,defaultComparator:()=>es,exists:()=>q,jsonEquals:()=>ei,makeNull:()=>j,missing:()=>Q,missingOrEmpty:()=>X,toStringOrNull:()=>J,values:()=>eo});var er=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=J(e);let i=0;for(;;){let s;if(e?(s=e,0!==i&&(s+="_"+i)):t?(s=t,0!==i&&(s+="_"+i)):s=i,!this.existingKeys[s])return this.existingKeys[s]=!0,String(s);i++}}},en={};z(en,{SKIP_JS_BUILTINS:()=>el,cloneObject:()=>eh,deepCloneDefinition:()=>ed,getAllValuesInObject:()=>eu,getValueUsingField:()=>ep,isNonNullObject:()=>em,iterateObject:()=>ea,mergeDeep:()=>ec,removeAllReferences:()=>eg});var el=new Set(["__proto__","constructor","prototype"]);function ea(e,t){if(null!=e){if(Array.isArray(e)){for(let i=0;i<e.length;i++)t(i.toString(),e[i]);return}for(let[i,s]of Object.entries(e))t(i,s)}}function eh(e){let t={},i=Object.keys(e);for(let s=0;s<i.length;s++){if(el.has(i[s]))continue;let o=i[s],r=e[o];t[o]=r}return t}function ed(e,t){if(!e)return;let i={};return Object.keys(e).forEach(s=>{if(t&&t.indexOf(s)>=0||el.has(s))return;let o=e[s];em(o)&&o.constructor===Object?i[s]=ed(o):i[s]=o}),i}function eu(e){if(!e)return[];let t=Object;if("function"==typeof t.values)return t.values(e);let i=[];for(let t in e)e.hasOwnProperty(t)&&e.propertyIsEnumerable(t)&&i.push(e[t]);return i}function ec(e,t,i=!0,s=!1){q(t)&&ea(t,(t,o)=>{if(el.has(t))return;let r=e[t];r!==o&&(s&&null==r&&null!=o&&"object"==typeof o&&o.constructor===Object&&(r={},e[t]=r),em(o)&&em(r)&&!Array.isArray(r)?ec(r,o,i,s):(i||void 0!==o)&&(e[t]=o))})}function ep(e,t,i){if(!t||!e)return;if(!i)return e[t];let s=t.split("."),o=e;for(let e=0;e<s.length;e++){if(null==o)return;o=o[s[e]]}return o}function eg(e,t=[],i){Object.keys(e).forEach(i=>{"object"!=typeof e[i]||t.includes(i)||(e[i]=void 0)});let s=Object.getPrototypeOf(e),o={},r=e=>`AG Grid: Grid API function ${e}() cannot be called as the grid has been destroyed.
2    It is recommended to remove local references to the grid api. Alternatively, check gridApi.isDestroyed() to avoid calling methods against a destroyed grid.
3    To run logic when the grid is about to be destroyed use the gridPreDestroy event. See: ${i}`;Object.getOwnPropertyNames(s).forEach(e=>{"function"!=typeof s[e]||t.includes(e)||(o[e]={value:()=>{console.warn(r(e))},writable:!0})}),Object.defineProperties(e,o)}function em(e){return"object"==typeof e&&null!==e}var eC={};z(eC,{compose:()=>eM,debounce:()=>eP,doOnce:()=>ef,errorOnce:()=>eE,executeAfter:()=>eA,executeInAWhile:()=>eR,executeNextVMTurn:()=>eb,getFunctionName:()=>eS,isFunction:()=>ey,noop:()=>eN,throttle:()=>eF,waitUntil:()=>eL,warnOnce:()=>ew});var ev={};function ef(e,t){ev[t]||(e(),ev[t]=!0)}function ew(e){ef(()=>console.warn("AG Grid: "+e),e)}function eE(e){ef(()=>console.error("AG Grid: "+e),e)}function eS(e){if(e.name)return e.name;let t=/function\s+([^\(]+)/.exec(e.toString());return t&&2===t.length?t[1].trim():null}function ey(e){return!!(e&&e.constructor&&e.call&&e.apply)}function eR(e){eA(e,400)}var eD=[],eT=!1;function eb(e){eD.push(e),eT||(eT=!0,window.setTimeout(()=>{let e=eD.slice();eD.length=0,eT=!1,e.forEach(e=>e())},0))}function eA(e,t=0){e.length>0&&window.setTimeout(()=>e.forEach(e=>e()),t)}function eP(e,t){let i;return function(...s){let o=this;window.clearTimeout(i),i=window.setTimeout(function(){e.apply(o,s)},t)}}function eF(e,t){let i=0;return function(...s){let o=new Date().getTime();o-i<t||(i=o,e.apply(this,s))}}function eL(e,t,i=100,s){let o=new Date().getTime(),r=null,n=!1,l=()=>{let l=new Date().getTime()-o>i;(e()||l)&&(t(),n=!0,null!=r&&(window.clearInterval(r),r=null),l&&s&&console.warn(s))};l(),n||(r=window.setInterval(l,10))}function eM(...e){return t=>e.reduce((e,t)=>t(e),t)}var eN=()=>{},eI=((o=eI||{}).CommunityCoreModule="@ag-grid-community/core",o.InfiniteRowModelModule="@ag-grid-community/infinite-row-model",o.ClientSideRowModelModule="@ag-grid-community/client-side-row-model",o.CsvExportModule="@ag-grid-community/csv-export",o.EnterpriseCoreModule="@ag-grid-enterprise/core",o.RowGroupingModule="@ag-grid-enterprise/row-grouping",o.ColumnsToolPanelModule="@ag-grid-enterprise/column-tool-panel",o.FiltersToolPanelModule="@ag-grid-enterprise/filter-tool-panel",o.MenuModule="@ag-grid-enterprise/menu",o.SetFilterModule="@ag-grid-enterprise/set-filter",o.MultiFilterModule="@ag-grid-enterprise/multi-filter",o.StatusBarModule="@ag-grid-enterprise/status-bar",o.SideBarModule="@ag-grid-enterprise/side-bar",o.RangeSelectionModule="@ag-grid-enterprise/range-selection",o.MasterDetailModule="@ag-grid-enterprise/master-detail",o.RichSelectModule="@ag-grid-enterprise/rich-select",o.GridChartsModule="@ag-grid-enterprise/charts",o.ViewportRowModelModule="@ag-grid-enterprise/viewport-row-model",o.ServerSideRowModelModule="@ag-grid-enterprise/server-side-row-model",o.ExcelExportModule="@ag-grid-enterprise/excel-export",o.ClipboardModule="@ag-grid-enterprise/clipboard",o.SparklinesModule="@ag-grid-enterprise/sparklines",o.AdvancedFilterModule="@ag-grid-enterprise/advanced-filter",o.AngularModule="@ag-grid-community/angular",o.ReactModule="@ag-grid-community/react",o.VueModule="@ag-grid-community/vue",o),eG=class e{static register(t){e.__register(t,!0,void 0)}static registerModules(t){e.__registerModules(t,!0,void 0)}static __register(t,i,s){e.runVersionChecks(t),void 0!==s?(e.areGridScopedModules=!0,void 0===e.gridModulesMap[s]&&(e.gridModulesMap[s]={}),e.gridModulesMap[s][t.moduleName]=t):e.globalModulesMap[t.moduleName]=t,e.setModuleBased(i)}static __unRegisterGridModules(t){delete e.gridModulesMap[t]}static __registerModules(t,i,s){e.setModuleBased(i),t&&t.forEach(t=>e.__register(t,i,s))}
3static isValidModuleVersion(t){let[i,s]=t.version.split(".")||[],[o,r]=e.currentModuleVersion.split(".")||[];return i===o&&s===r}static runVersionChecks(t){if(e.currentModuleVersion||(e.currentModuleVersion=t.version),t.version?e.isValidModuleVersion(t)||console.error(`AG Grid: You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. '${t.moduleName}' is version ${t.version} but the other modules are version ${this.currentModuleVersion}. Please update all modules to the same version.`):console.error(`AG Grid: You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. '${t.moduleName}' is incompatible. Please update all modules to the same version.`),t.validate){let e=t.validate();e.isValid||console.error(`AG Grid: ${e.message}`)}}static setModuleBased(t){void 0===e.moduleBased?e.moduleBased=t:e.moduleBased!==t&&ef(()=>{console.warn("AG Grid: You are mixing modules (i.e. @ag-grid-community/core) and packages (ag-grid-community) 
3- you can only use one or the other of these mechanisms."),console.warn("Please see https://www.ag-grid.com/javascript-grid/modules/ for more information.")},"ModulePackageCheck")}static __setIsBundled(){e.isBundled=!0}static __assertRegistered(t,i,s){var o;let r;if(this.__isRegistered(t,s))return!0;if(e.isBundled)r=`AG Grid: unable to use ${i} as 'ag-grid-enterprise' has not been loaded. Check you are using the Enterprise bundle:
4        
5        <script src="https://cdn.jsdelivr.net/npm/ag-grid-enterprise@AG_GRID_VERSION/dist/ag-grid-enterprise.min.js"></script>
6        
7For more info see: https://ag-grid.com/javascript-data-grid/getting-started/#getting-started-with-ag-grid-enterprise`;else if(e.moduleBased||void 0===e.moduleBased){let n=null==(o=Object.entries(eI).find(([e,i])=>i===t))?void 0:o[0];r=`AG Grid: unable to use ${i} as the ${n} is not registered${e.areGridScopedModules?` for gridId: ${s}`:""}. Check if you have registered the module:
8           
9    import { ModuleRegistry } from '@ag-grid-community/core';
10    import { ${n} } from '${t}';
11    
12    ModuleRegistry.registerModules([ ${n} ]);
13
14For more info see: https://www.ag-grid.com/javascript-grid/modules/`}else r=`AG Grid: unable to use ${i} as package 'ag-grid-enterprise' has not been imported. Check that you have imported the package:
15            
16    import 'ag-grid-enterprise';`;return ef(()=>{console.warn(r)},i+t),!1}static __isRegistered(t,i){var s;return!!e.globalModulesMap[t]||!!(null==(s=e.gridModulesMap[i])?void 0:s[t])}static __getRegisteredModules(t){return[...eo(e.globalModulesMap),...eo(e.gridModulesMap[t]||{})]}static __getGridRegisteredModules(t){var i;return eo(null!=(i=e.gridModulesMap[t])?i:{})||[]}static __isPackageBased(){return!e.moduleBased}};eG.globalModulesMap={},eG.gridModulesMap={},eG.areGridScopedModules=!1;var eO=eG,ex=class{constructor(e,t){if(this.beanWrappers={}
16,this.destroyed=!1,!e||!e.beanClasses)return;this.contextParams=e,this.logger=t,this.logger.log(">> creating ag-Application Context"),this.createBeans();let i=this.getBeanInstances();this.wireBeans(i),this.logger.log(">> ag-Application Context ready - component is alive")}getBeanInstances(){return eo(this.beanWrappers).map(e=>e.beanInstance)}createBean(e,t){if(!e)throw Error("Can't wire to bean since it is null");return this.wireBeans([e],t),e}wireBeans(e,t){this.autoWireBeans(e),this.methodWireBeans(e),this.callLifeCycleMethods(e,"preConstructMethods"),q(t)&&e.forEach(t),this.callLifeCycleMethods(e,"postConstructMethods")}createBeans(){this.contextParams.beanClasses.forEach(this.createBeanWrapper.bind(this)),ea(this.beanWrappers,(e,t)=>{let i;t.bean.__agBeanMetaData&&t.bean.__agBeanMetaData.autowireMethods&&t.bean.__agBeanMetaData.autowireMethods.agConstructor&&(i=t.bean.__agBeanMetaData.autowireMethods.agConstructor);let s=this.getBeansForParameters(i,t.bean.name),o=new(t.bean.bind.apply(t.bean,[null,...s]));t.beanInstance=o});let e=Object.keys(this.beanWrappers).join(", ");this.logger.log(`created beans: ${e}`)}createBeanWrapper(e){let t=e.__agBeanMetaData;if(!t){let t;t=e.prototype.constructor?eS(e.prototype.constructor):""+e,console.error(`Context item ${t} is not a bean`);return}let i={bean:e,beanInstance:null,beanName:t.beanName};this.beanWrappers[t.beanName]=i}autoWireBeans(e){e.forEach(e=>{this.forEachMetaDataInHierarchy(e,(t,i)=>{let s=t.agClassAttributes;s&&s.forEach(t=>{let s=this.lookupBeanInstance(i,t.beanName,t.optional);e[t.attributeName]=s})})})}methodWireBeans(e){e.forEach(e=>{this.forEachMetaDataInHierarchy(e,(t,i)=>{ea(t.autowireMethods,(t,s)=>{if("agConstructor"===t)return;let o=this.getBeansForParameters(s,i);e[t].apply(e,o)})})})}forEachMetaDataInHierarchy(e,t){let i=Object.getPrototypeOf(e);for(;null!=i;){let e=i.constructor;e.hasOwnProperty("__agBeanMetaData")&&t(e.__agBeanMetaData,this.getBeanName(e)),i=Object.getPrototypeOf(i)}}getBeanName(e){if(e.__agBeanMetaData&&e.__agBeanMetaData.beanName)return e.__agBeanMetaData.beanName;let t=e.toString();return t.substring(9,t.indexOf("("))}getBeansForParameters(e,t){let i=[];return e&&ea(e,(e,s)=>{let o=this.lookupBeanInstance(t,s);i[Number(e)]=o}),i}lookupBeanInstance(e,t,i=!1){if(this.destroyed)return this.logger.log(`AG Grid: bean reference ${t} is used after the grid is destroyed!`),null;if("context"===t)return this;if(this.contextParams.providedBeanInstances&&this.contextParams.providedBeanInstances.hasOwnProperty(t))return this.contextParams.providedBeanInstances[t];let s=this.beanWrappers[t];return s?s.beanInstance:(i||console.error(`AG Grid: unable to find bean reference ${t} while initialising ${e}`),null)}callLifeCycleMethods(e,t){e.forEach(e=>this.callLifeCycleMethodsOnBean(e,t))}callLifeCycleMethodsOnBean(e,t,i){let s={};this.forEachMetaDataInHierarchy(e,e=>{let o=e[t];o&&o.forEach(e=>{e!=i&&(s[e]=!0)})}),Object.keys(s).forEach(t=>e[t]())}getBean(e){return this.lookupBeanInstance("getBean",e,!0)}destroy(){if(this.destroyed)return;this.destroyed=!0,this.logger.log(">> Shutting down ag-Application Context");let e=this.getBeanInstances();this.destroyBeans(e),this.contextParams.providedBeanInstances=null,eO.__unRegisterGridModules(this.contextParams.gridId),this.logger.log(">> ag-Application Context shut down - component is dead")}destroyBean(e){e&&this.destroyBeans([e])}destroyBeans(e){return e&&e.forEach(e=>{this.callLifeCycleMethodsOnBean(e,"preDestroyMethods","destroy"),"function"==typeof e.destroy&&e.destroy()}),[]}isDestroyed(){return this.destroyed}getGridId(){return this.contextParams.gridId}};function e_(e,t,i){let s=eK(e.constructor);s.preConstructMethods||(s.preConstructMethods=[]),s.preConstructMethods.push(t)}function eV(e,t,i){let s=eK(e.constructor);s.postConstructMethods||(s.postConstructMethods=[]),s.postConstructMethods.push(t)}function eH(e,t,i){let s=eK(e.constructor);s.preDestroyMethods||(s.preDestroyMethods=[]),s.preDestroyMethods.push(t)}function ek(e){return t=>{eK(t).beanName=e}}function eB(e){return(t,i,s)=>{eU(t,e,!1,t,i,null)}}function eW(e){return(t,i,s)=>{eU(t,e,!0,t,i,null)}}function eU(e,t,i,s,o,r){if(null===t){console.error("AG Grid: Autowired name should not be null");return}if("number"==typeof r){console.error("AG Grid: Autowired should be on an attribute");return}let n=eK(e.constructor);n.agClassAttributes||(n.agClassAttributes=[]),n.agClassAttributes.push({attributeName:o,beanName:t,optional:i})}function ez(e){return(t,i,s)=>{let o;let r="function"==typeof t?t:t.constructor;if("number"==typeof s){let t;i?(o=eK(r),t=i):(o=eK(r),t="agConstructor"),o.autowireMethods||(o.autowireMethods={}),o.autowireMethods[t]||(o.autowireMethods[t]={}),o.autowireMethods[t][s]=e}}}function eK(e){return e.hasOwnProperty("__agBeanMetaData")||(e.__agBeanMetaData={}),e.__agBeanMetaData}var e$=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={}}
16setBeans(e,t,i=null,s=null){if(this.frameworkOverrides=t,this.gos=e,i){let t=e.useAsyncEvents();this.addGlobalListener(i,t)}s&&this.addGlobalListener(s,!1)}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,i){let s=t?this.allAsyncListeners:this.allSyncListeners,o=s.get(e);return!o&&i&&(o=new Set,s.set(e,o)),o}noRegisteredListenersExist(){return 0===this.allSyncListeners.size&&0===this.allAsyncListeners.size&&0===this.globalSyncListeners.size&&0===this.globalAsyncListeners.size}addEventListener(e,t,i=!1){this.getListeners(e,i,!0).add(t)}removeEventListener(e,t,i=!1){let s=this.getListeners(e,i,!1);s&&(s.delete(t),0===s.size&&(i?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).add(e)}removeGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).delete(e)}dispatchEvent(e){this.gos&&this.gos.addGridCommonParams(e),this.dispatchToListeners(e,!0),this.dispatchToListeners(e,!1),this.firedEvents[e.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){var i;let s=e.type;if(t&&"event"in e){let t=e.event;t instanceof Event&&(e.eventPath=t.composedPath())}let o=null!=(i=this.getListeners(s,t,!1))?i:new Set,r=new Set(o);r.size>0&&r.forEach(i=>{if(!o.has(i))return;let s=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>i(e)):()=>i(e);t?this.dispatchAsync(s):s()}),new Set(t?this.globalAsyncListeners:this.globalSyncListeners).forEach(i=>{let o=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>i(s,e)):()=>i(s,e);t?this.dispatchAsync(o):o()})}dispatchAsync(e){this.asyncFunctionsQueue.push(e),this.scheduled||(this.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)}),this.scheduled=!0)}flushAsyncQueue(){this.scheduled=!1;let e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],e.forEach(e=>e())}};K([$(0,ez("gridOptionsService")),$(1,ez("frameworkOverrides")),$(2,ez("globalEventListener")),$(3,ez("globalSyncEventListener"))],e$.prototype,"setBeans",1),e$=K([ek("eventService")],e$);var eY=class{constructor(e){this.frameworkOverrides=e,this.wrappedListeners=new Map,this.wrappedGlobalListeners=new Map}wrap(e){let t=e;return this.frameworkOverrides.shouldWrapOutgoing&&(t=t=>{this.frameworkOverrides.wrapOutgoing(()=>e(t))},this.wrappedListeners.set(e,t)),t}wrapGlobal(e){let t=e;return this.frameworkOverrides.shouldWrapOutgoing&&(t=(t,i)=>{this.frameworkOverrides.wrapOutgoing(()=>e(t,i))},this.wrappedGlobalListeners.set(e,t)),t}unwrap(e){var t;return null!=(t=this.wrappedListeners.get(e))?t:e}unwrapGlobal(e){var t;return null!=(t=this.wrappedGlobalListeners.get(e))?t:e}},ej={resizable:!0,sortable:!0},eq=0,eQ=class e{constructor(e,t,i,s){this.instanceId=eq++,this.autoHeaderHeight=null,this.moving=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.eventService=new e$,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.colDef=e,this.userProvidedColDef=t,this.colId=i,this.primary=s,this.setState(e)}getInstanceId(){return this.instanceId}setState(e){void 0!==e.sort?("asc"===e.sort||"desc"===e.sort)&&(this.sort=e.sort):("asc"===e.initialSort||"desc"===e.initialSort)&&(this.sort=e.initialSort);let t=e.sortIndex,i=e.initialSortIndex;void 0!==t?null!==t&&(this.sortIndex=t):null!==i&&(this.sortIndex=i);let s=e.hide,o=e.initialHide;void 0!==s?this.visible=!s:this.visible=!o,void 0!==e.pinned?this.setPinned(e.pinned):this.setPinned(e.initialPinned);let r=e.flex,n=e.initialFlex;void 0!==r?this.flex=r:void 0!==n&&(this.flex=n)}setColDef(e,t,i){this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),this.eventService.dispatchEvent(this.createColumnEvent("colDefChanged",i))}getUserProvidedColDef(){return this.userProvidedColDef}setParent(e){this.parent=e}getParent(){return this.parent}setOriginalParent(e){this.originalParent=e}getOriginalParent(){return this.originalParent}initialise(){this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip()}initDotNotation(){let e=this.gos.get("suppressFieldDotNotation");this.fieldContainsDots=q(this.colDef.field)&&this.colDef.field.indexOf(".")>=0&&!e,this.tooltipFieldContainsDots=q(this.colDef.tooltipField)&&this.colDef.tooltipField.indexOf(".")>=0&&!e}initMinAndMaxWidths(){var e,t;let i=this.colDef;this.minWidth=null!=(e=i.minWidth)?e:this.environment.getMinColW
16idth(),this.maxWidth=null!=(t=i.maxWidth)?t:Number.MAX_SAFE_INTEGER}initTooltip(){this.tooltipEnabled=q(this.colDef.tooltipField)||q(this.colDef.tooltipValueGetter)||q(this.colDef.tooltipComponent)}resetActualWidth(e){let t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){var t,i;let s=null!=(t=e.minWidth)?t:this.environment.getMinColWidth(),o=null!=(i=e.maxWidth)?i:Number.MAX_SAFE_INTEGER,r=Z(e.width),n=Z(e.initialWidth);return Math.max(Math.min(null!=r?r:null!=n?n:200,o),s)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){if(Q(this.colDef)||Q(this.colDef.showRowGroup))return!1;let t=!0===this.colDef.showRowGroup,i=this.colDef.showRowGroup===e;return t||i}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldContainsDots}isTooltipEnabled(){return this.tooltipEnabled}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots}addEventListener(e,t){var i,s;this.frameworkOverrides.shouldWrapOutgoing&&!this.frameworkEventListenerService&&(this.eventService.setFrameworkOverrides(this.frameworkOverrides),this.frameworkEventListenerService=new eY(this.frameworkOverrides));let o=null!=(s=null==(i=this.frameworkEventListenerService)?void 0:i.wrap(t))?s:t;this.eventService.addEventListener(e,o)}removeEventListener(e,t){var i,s;let o=null!=(s=null==(i=this.frameworkEventListenerService)?void 0:i.unwrap(t))?s:t;this.eventService.removeEventListener(e,o)}createColumnFunctionCallbackParams(e){return this.gos.addGridCommonParams({node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){if("boolean"==typeof this.colDef.suppressNavigable)return this.colDef.suppressNavigable;if("function"==typeof this.colDef.suppressNavigable){let t=this.createColumnFunctionCallbackParams(e);return(0,this.colDef.suppressNavigable)(t)}return!1}isCellEditable(e){return(!e.group||!!this.gos.get("enableGroupEdit"))&&this.isColumnFunc(e,this.colDef.editable)}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle}isAutoHeight(){return!!this.colDef.autoHeight}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight}isRowDrag(e){return this.isColumnFunc(e,this.colDef.rowDrag)}isDndSource(e){return this.isColumnFunc(e,this.colDef.dndSource)}isCellCheckboxSelection(e){return this.isColumnFunc(e,this.colDef.checkboxSelection)}isSuppressPaste(e){return this.isColumnFunc(e,this.colDef?this.colDef.suppressPaste:null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(e){var t;return null!=(t=this.colDef[e])?t:ej[e]}isColumnFunc(e,t){return"boolean"==typeof t?t:"function"==typeof t&&t(this.createColumnFunctionCallbackParams(e))}setMoving(e,t){this.moving=e,this.eventService.dispatchEvent(this.createColumnEvent("movingChanged",t))}createColumnEvent(e,t){return this.gos.addGridCommonParams({type:e,column:this,columns:[this],source:t})}isMoving(){return this.moving}getSort(){return this.sort}setSort(e,t){this.sort!==e&&(this.sort=e,this.eventService.dispatchEvent(this.createColumnEvent("sortChanged",t))),this.dispatchStateUpdatedEvent("sort")}setMenuVisible(e,t){this.menuVisible!==e&&(this.menuVisible=e,this.eventService.dispatchEvent(this.createColumnEvent("menuVisibleChanged",t)))}isMenuVisible(){return this.menuVisible}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return"asc"===this.sort}isSortDescending(){return"desc"===this.sort}isSortNone(){return Q(this.sort)}isSorting(){return q(this.sort)}getSortIndex(){return this.sortIndex}setSortIndex(e){this.sortIndex=e,this.dispatchStateUpdatedEvent("sortIndex")}setAggFunc(e){this.aggFunc=e,this.dispatchStateUpdatedEvent("aggFunc")}getAggFunc(){return this.aggFunc}getLeft(){return this.left}getOldLeft(){return this.oldLeft}getRight(){return this.left+this.actualWidth}setLeft(e,t){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.eventService.dispatchEvent(this.createColumnEvent("leftChanged",t)))}isFilterActive(){return this.filterActive}setFilterActive(e,t,i){this.filterActive!==e&&(this.filterActive=e,this.eventService.dispatchEvent(this.createColumnEvent("filterActiveChanged",t)));let s=this.createColumnEvent("filterChanged",t);i&&ec(s,i),this.eventService.dispatchEvent(s)}isHovered(){return this.columnHoverService.isHovered(this)}setPinned(e){!0===e||"left"===e?this.pinned="left":"right"===e?this.pinned="right":this.pinned=null,this.dispatchStateUpdatedEvent("pinned")}setFirstRightPinned(e,t){this.firstRightPinned!==e&&(this.firstRightPinned=e,this.eventService.dispatchEvent(this.createColumnEvent("firstRightPinnedChanged",t)))}setLastLeftPinned(e,t){this.lastLeftPinned!==e&&(this.lastLeftPinned=e,this.eventService.dispatchEvent(this.createColumnEvent("lastLeftPinnedChanged",t)))}isFirstRightPinned(){return this.firstRightPinned}isLastLeftPinned(){return this.lastLeftPinned}isPinned(){return"left"===this.pinned||"right"===this.pinned}isPinnedLeft(){return"left"===this.pinned}isPinnedRight(){return"right"===this.pinned}getPinned(){return this.pinned}setVisible(e,t){let i=!0===e;this.visible!==i&&(this.visible=i,this.eventService.dispatchEvent(this.createColumnEvent("visibleChanged",t))),this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){let e=this.getColDef();
16return!e.suppressSpanHeaderHeight&&!e.autoHeaderHeight}getColumnGroupPaddingInfo(){let e=this.getParent();if(!e||!e.isPadding())return{numberOfParents:0,isSpanningTotal:!1};let t=e.getPaddingLevel()+1,i=!0;for(;e;){if(!e.isPadding()){i=!1;break}e=e.getParent()}return{numberOfParents:t,isSpanningTotal:i}}getColDef(){return this.colDef}getColumnGroupShow(){return this.colDef.columnGroupShow}getColId(){return this.colId}getId(){return this.colId}getUniqueId(){return this.colId}getDefinition(){return this.colDef}getActualWidth(){return this.actualWidth}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){let t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}createBaseColDefParams(e){return this.gos.addGridCommonParams({node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(Q(this.colDef.colSpan))return 1;let t=this.createBaseColDefParams(e);return Math.max(this.colDef.colSpan(t),1)}getRowSpan(e){if(Q(this.colDef.rowSpan))return 1;let t=this.createBaseColDefParams(e);return Math.max(this.colDef.rowSpan(t),1)}setActualWidth(e,t,i=!1){null!=this.minWidth&&(e=Math.max(e,this.minWidth)),null!=this.maxWidth&&(e=Math.min(e,this.maxWidth)),this.actualWidth===e||(this.actualWidth=e,this.flex&&"flex"!==t&&"gridInitializing"!==t&&(this.flex=null),i||this.fireColumnWidthChangedEvent(t)),this.dispatchStateUpdatedEvent("width")}fireColumnWidthChangedEvent(e){this.eventService.dispatchEvent(this.createColumnEvent("widthChanged",e))}isGreaterThanMax(e){return null!=this.maxWidth&&e>this.maxWidth}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex||0}setFlex(e){this.flex!==e&&(this.flex=e),this.dispatchStateUpdatedEvent("flex")}setMinimum(e){q(this.minWidth)&&this.setActualWidth(this.minWidth,e)}setRowGroupActive(e,t){this.rowGroupActive!==e&&(this.rowGroupActive=e,this.eventService.dispatchEvent(this.createColumnEvent("columnRowGroupChanged",t))),this.dispatchStateUpdatedEvent("rowGroup")}isRowGroupActive(){return this.rowGroupActive}setPivotActive(e,t){this.pivotActive!==e&&(this.pivotActive=e,this.eventService.dispatchEvent(this.createColumnEvent("columnPivotChanged",t))),this.dispatchStateUpdatedEvent("pivot")}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}setValueActive(e,t){this.aggregationActive!==e&&(this.aggregationActive=e,this.eventService.dispatchEvent(this.createColumnEvent("columnValueChanged",t)))}isValueActive(){return this.aggregationActive}isAllowPivot(){return!0===this.colDef.enablePivot}isAllowValue(){return!0===this.colDef.enableValue}isAllowRowGroup(){return!0===this.colDef.enableRowGroup}getMenuTabs(e){ew("As of v31.1, 'getMenuTabs' is deprecated. Use 'getColDef().menuTabs ?? defaultValues' instead.");let t=this.getColDef().menuTabs;return null==t&&(t=e),t}dispatchStateUpdatedEvent(t){this.eventService.dispatchEvent({type:e.EVENT_STATE_UPDATED,key:t})}};eQ.EVENT_MOVING_CHANGED="movingChanged",eQ.EVENT_LEFT_CHANGED="leftChanged",eQ.EVENT_WIDTH_CHANGED="widthChanged",eQ.EVENT_LAST_LEFT_PINNED_CHANGED="lastLeftPinnedChanged",eQ.EVENT_FIRST_RIGHT_PINNED_CHANGED="firstRightPinnedChanged",eQ.EVENT_VISIBLE_CHANGED="visibleChanged",eQ.EVENT_FILTER_CHANGED="filterChanged",eQ.EVENT_FILTER_ACTIVE_CHANGED="filterActiveChanged",eQ.EVENT_SORT_CHANGED="sortChanged",eQ.EVENT_COL_DEF_CHANGED="colDefChanged",eQ.EVENT_MENU_VISIBLE_CHANGED="menuVisibleChanged",eQ.EVENT_ROW_GROUP_CHANGED="columnRowGroupChanged",eQ.EVENT_PIVOT_CHANGED="columnPivotChanged",eQ.EVENT_VALUE_CHANGED="columnValueChanged",eQ.EVENT_STATE_UPDATED="columnStateUpdated",K([eB("gridOptionsService")],eQ.prototype,"gos",2),K([eB("environment")],eQ.prototype,"environment",2),K([eB("columnHoverService")],eQ.prototype,"columnHoverService",2),K([eB("frameworkOverrides")],eQ.prototype,"frameworkOverrides",2),K([eV],eQ.prototype,"initialise",1);var eX=eQ,eJ=class e{constructor(e,t,i,s){this.localEventService=new e$,this.expandable=!1,this.instanceId=eq++,this.expandableListenerRemoveCallback=null,this.colGroupDef=e,this.groupId=t,this.expanded=!!e&&!!e.openByDefault,this.padding=i,this.level=s}destroy(){this.expandableListenerRemoveCallback&&this.reset(null,void 0)}reset(e,t){this.colGroupDef=e,this.level=t,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0}getInstanceId(){return this.instanceId}setOriginalParent(e){this.originalParent=e}getOriginalParent(){return this.originalParent}getLevel(){return this.level}isVisible(){return!!this.children&&this.children.some(e=>e.isVisible())}isPadding(){return this.padding}setExpanded(t){this.expanded=void 0!==t&&t;let i={type:e.EVENT_EXPANDED_CHANGED};this.localEventService.dispatchEvent(i)}isExpandable(){return this.expandable}isExpanded(){return this.expanded}getGroupId(){return this.groupId}getId(){return this.getGroupId()}setChildren(e){this.children=e}getChildren(){return this.children}getColGroupDef(){return this.colGroupDef}getLeafColumns(){let e=[];return this.addLeafColumns(e),e}
16addLeafColumns(t){this.children&&this.children.forEach(i=>{i instanceof eX?t.push(i):i instanceof e&&i.addLeafColumns(t)})}getColumnGroupShow(){let e=this.colGroupDef;if(e)return e.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();let e=this.onColumnVisibilityChanged.bind(this);this.getLeafColumns().forEach(t=>t.addEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=()=>{this.getLeafColumns().forEach(t=>t.removeEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let t=!1,i=!1,s=!1,o=this.findChildrenRemovingPadding();for(let e=0,r=o.length;e<r;e++){let r=o[e];if(!r.isVisible())continue;let n=r.getColumnGroupShow();"open"===n?(t=!0,s=!0):"closed"===n?(i=!0,s=!0):(t=!0,i=!0)}let r=t&&i&&s;if(this.expandable!==r){this.expandable=r;let t={type:e.EVENT_EXPANDABLE_CHANGED};this.localEventService.dispatchEvent(t)}}findChildrenRemovingPadding(){let t=[],i=s=>{s.forEach(s=>{s instanceof e&&s.isPadding()?i(s.children):t.push(s)})};return i(this.children),t}onColumnVisibilityChanged(){this.setExpandable()}addEventListener(e,t){this.localEventService.addEventListener(e,t)}removeEventListener(e,t){this.localEventService.removeEventListener(e,t)}};eJ.EVENT_EXPANDED_CHANGED="expandedChanged",eJ.EVENT_EXPANDABLE_CHANGED="expandableChanged",K([eH],eJ.prototype,"destroy",1);var eZ=eJ,e0={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}},e1={};z(e1,{addSafePassiveEventListener:()=>tS,createEventPath:()=>tw,getCtrlForEventTarget:()=>tv,getEventPath:()=>tE,isElementInEventPath:()=>tf,isEventSupported:()=>tC,isStopPropagationForAgGrid:()=>tm,stopPropagationForAgGrid:()=>tg});var e2={};function e3(e){return null!=e&&e.length>0}function e5(e){if(e&&e.length)return e[e.length-1]}function e4(e,t,i){return null==e&&null==t||null!=e&&null!=t&&e.length===t.length&&e.every((e,s)=>i?i(e,t[s]):t[s]===e)}function e6(e,t){return e4(e,t)}function e8(e){return e.sort((e,t)=>e-t)}function e7(e,t){if(e)for(let i=e.length-2;i>=0;i--){let s=e[i]===t,o=e[i+1]===t;s&&o&&e.splice(i+1,1)}}function e9(e,t){let i=e.indexOf(t);i>=0&&(e[i]=e[e.length-1],e.pop())}function te(e,t){let i=e.indexOf(t);i>=0&&e.splice(i,1)}function tt(e,t){for(let i=0;i<t.length;i++)e9(e,t[i])}function ti(e,t){for(let i=0;i<t.length;i++)te(e,t[i])}function ts(e,t,i){e.splice(i,0,t)}function to(e,t,i){if(null!=e&&null!=t)for(let s=t.length-1;s>=0;s--)ts(e,t[s],i)}function tr(e,t,i){ti(e,t),t.slice().reverse().forEach(t=>ts(e,t,i))}function tn(e,t){return e.indexOf(t)>-1}function tl(e){return[].concat.apply([],e)}function ta(e,t){null!=t&&null!=e&&t.forEach(t=>e.push(t))}function th(e){return e.map(J)}function td(e,t){if(null!=e)for(let i=e.length-1;i>=0;i--)t(e[i],i)}z(e2,{areEqual:()=>e4,existsAndNotEmpty:()=>e3,flatten:()=>tl,forEachReverse:()=>td,includes:()=>tn,insertArrayIntoArray:()=>to,insertIntoArray:()=>ts,last:()=>e5,moveInArray:()=>tr,pushAll:()=>ta,removeAllFromArray:()=>ti,removeAllFromUnorderedArray:()=>tt,removeFromArray:()=>te,removeFromUnorderedArray:()=>e9,removeRepeatsFromArray:()=>e7,shallowCompare:()=>e6,sortNumerically:()=>e8,toStrings:()=>th});var tu="__ag_Grid_Stop_Propagation",tc=["touchstart","touchend","touchmove","touchcancel","scroll"],tp={};function tg(e){e[tu]=!0}function tm(e){return!0===e[tu]}var tC=(()=>{let e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return t=>{if("boolean"==typeof tp[t])return tp[t];let i=document.createElement(e[t]||"div");return tp[t="on"+t]=t in i}})();function tv(e,t,i){let s=t;for(;s;){let t=e.getDomData(s,i);if(t)return t;s=s.parentElement}return null}function tf(e,t){return!!t&&!!e&&tE(t).indexOf(e)>=0}function tw(e){let t=[],i=e.target;for(;i;)t.push(i),i=i.parentElement;return t}function tE(e){return e.path?e.path:e.composedPath?e.composedPath():tw(e)}function tS(e,t,i,s){let o=tn(tc,i);e&&e.addEventListener&&e.addEventListener(t,i,s,o?{passive:!0}:void 0)}var ty=class e{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.lastChangeSetIdLookup={},this.propertyListenerId=0,this.isAlive=()=>!this.destroyed}getFrameworkOverrides(){return this.frameworkOverrides}getContext(){return this.context}destroy(){for(let e=0;e<this.destroyFunctions.length;e++)this.destroyFunctions[e]();this.destroyFunctions.length=0,this.destroyed=!0,this.dispatchEvent({type:e.EVENT_DESTROYED})}addEventListener(e,t){this.localEventService||(this.localEventService=new e$),this.localEventService.addEventListener(e,t)}removeEventListener(e,t){this.localEventService&&this.localEventService.removeEventListener(e,t)}
16dispatchEvent(e){this.localEventService&&this.localEventService.dispatchEvent(e)}addManagedListener(e,t,i){if(this.destroyed)return;e instanceof HTMLElement?tS(this.getFrameworkOverrides(),e,t,i):e.addEventListener(t,i);let s=()=>(e.removeEventListener(t,i),null);return this.destroyFunctions.push(s),()=>(s(),this.destroyFunctions=this.destroyFunctions.filter(e=>e!==s),null)}setupGridOptionListener(e,t){this.gos.addEventListener(e,t);let i=()=>(this.gos.removeEventListener(e,t),null);return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(e=>e!==i),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupGridOptionListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;let i=e.join("-")+this.propertyListenerId++,s=e=>{if(e.changeSet){if(e.changeSet&&e.changeSet.id===this.lastChangeSetIdLookup[i])return;this.lastChangeSetIdLookup[i]=e.changeSet.id}t({type:"gridPropertyChanged",changeSet:e.changeSet,source:e.source})};e.forEach(e=>this.setupGridOptionListener(e,s))}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createManagedBean(e,t){let i=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),i}createBean(e,t,i){return(t||this.getContext()).createBean(e,i)}destroyBean(e,t){return(t||this.getContext()).destroyBean(e)}destroyBeans(e,t){if(e)for(let i=0;i<e.length;i++)this.destroyBean(e[i],t);return[]}};ty.EVENT_DESTROYED="destroyed",K([eB("frameworkOverrides")],ty.prototype,"frameworkOverrides",2),K([eB("context")],ty.prototype,"context",2),K([eB("eventService")],ty.prototype,"eventService",2),K([eB("gridOptionsService")],ty.prototype,"gos",2),K([eB("localeService")],ty.prototype,"localeService",2),K([eB("environment")],ty.prototype,"environment",2),K([eH],ty.prototype,"destroy",1);var tR=ty,tD=class extends tR{setBeans(e){this.logger=e.create("ColumnFactory")}createColumnTree(e,t,i,s){let o=new er,{existingCols:r,existingGroups:n,existingColKeys:l}=this.extractExistingTreeData(i);o.addExistingKeys(l);let a=this.recursivelyCreateColumns(e,0,t,r,o,n,s),h=this.findMaxDept(a,0);this.logger.log("Number of levels for grouped columns is "+h);let d=this.balanceColumnTree(a,0,h,o);return tT(null,d,(e,t)=>{e instanceof eZ&&e.setupExpandable(),e.setOriginalParent(t)}),{columnTree:d,treeDept:h}}extractExistingTreeData(e){let t=[],i=[],s=[];return e&&tT(null,e,e=>{e instanceof eZ?i.push(e):(s.push(e.getId()),t.push(e))}),{existingCols:t,existingGroups:i,existingColKeys:s}}createForAutoGroups(e,t){return e.map(e=>this.createAutoGroupTreeItem(t,e))}createAutoGroupTreeItem(e,t){let i=this.findDepth(e),s=t;for(let e=i-1;e>=0;e--){let i=new eZ(null,`FAKE_PATH_${t.getId()}}_${e}`,!0,e);this.createBean(i),i.setChildren([s]),s.setOriginalParent(i),s=i}return 0===i&&t.setOriginalParent(null),s}findDepth(e){let t=0,i=e;for(;i&&i[0]&&i[0]instanceof eZ;)t++,i=i[0].getChildren();return t}balanceColumnTree(e,t,i,s){let o=[];for(let r=0;r<e.length;r++){let n=e[r];if(n instanceof eZ){let e=this.balanceColumnTree(n.getChildren(),t+1,i,s);n.setChildren(e),o.push(n)}else{let r,l;for(let e=i-1;e>=t;e--){let e=s.getUniqueKey(null,null),i=new eZ(this.createMergedColGroupDef(null),e,!0,t);this.createBean(i),l&&l.setChildren([i]),l=i,r||(r=l)}if(r&&l){if(o.push(r),e.some(e=>e instanceof eZ)){l.setChildren([n]);continue}l.setChildren(e);break}o.push(n)}}return o}findMaxDept(e,t){let i=t;for(let s=0;s<e.length;s++){let o=e[s];if(o instanceof eZ){let e=this.findMaxDept(o.getChildren(),t+1);i<e&&(i=e)}}return i}recursivelyCreateColumns(e,t,i,s,o,r,n){if(!e)return[];let l=Array(e.length);for(let a=0;a<l.length;a++){let h=e[a];this.isColumnGroup(h)?l[a]=this.createColumnGroup(i,h,t,s,o,r,n):l[a]=this.createColumn(i,h,s,o,n)}return l}createColumnGroup(e,t,i,s,o,r,n){let l=this.createMergedColGroupDef(t),a=o.getUniqueKey(l.groupId||null,null),h=new eZ(l,a,!1,i);this.createBean(h);let d=this.findExistingGroup(t,r);d&&r.splice(d.idx,1);let u=null==d?void 0:d.group;u&&h.setExpanded(u.isExpanded());let c=this.recursivelyCreateColumns(l.children,i+1,e,s,o,r,n);return h.setChildren(c),h}createMergedColGroupDef(e){let t={};return Object.assign(t,this.gos.get("defaultColGroupDef")),Object.assign(t,e),t}createColumn(e,t,i,s,o){let r=this.findExistingColumn(t,i);r&&(null==i||i.splice(r.idx,1));let n=null==r?void 0:r.column;if(n){let e=this.addColumnDefaultAndTypes(t,n.getColId());n.setColDef(e,t,o),this.applyColumnState(n,e,o)}else{let i=s.getUniqueKey(t.colId,t.field);n=new eX(this.addColumnDefaultAndTypes(t,i),t,i,e),this.context.createBean(n)}return this.dataTypeService.addColumnListeners(n),n}applyColumnState(e,t,i){let s=Z(t.flex);if(void 0!==s&&e.setFlex(s),0>=e.getFlex()){let s=Z(t.width);if(null!=s)e.setActualWidth(s,i);else{let t=e.getActualWidth();e.setActualWidth(t,i)}}void 0!==t.sort&&("asc"==t.sort||"desc"==t.sort?e.setSort(t.sort,i):e.setSort(void 0,i));let o=Z(t.sortIndex);void 0!==o&&e.setSortIndex(o);let r=ee(t.hide);void 0!==r&&e.setVisible(!r,i),void 0!==t.pinned&&e.setPinned(t.pinned)}findExistingColumn(e,t){if(t)for(let i=0;i<t.length;i++){let s=t[i].getUserProvidedColDef();if(s){if(null!=e.colId){if(t[i].getId()===e.colId)return{idx:i,column:t[i]};continue}
16if(null!=e.field){if(s.field===e.field)return{idx:i,column:t[i]};continue}if(s===e)return{idx:i,column:t[i]}}}}findExistingGroup(e,t){if(null!=e.groupId)for(let i=0;i<t.length;i++){let s=t[i];if(s.getColGroupDef()&&s.getId()===e.groupId)return{idx:i,group:s}}}addColumnDefaultAndTypes(e,t){let i={};ec(i,this.gos.get("defaultColDef"),!1,!0);let s=this.dataTypeService.updateColDefAndGetColumnType(i,e,t);s&&this.assignColumnTypes(s,i),ec(i,e,!1,!0);let o=this.gos.get("autoGroupColumnDef"),r=this.gos.isColumnsSortingCoupledToGroup();return e.rowGroup&&o&&r&&ec(i,{sort:o.sort,initialSort:o.initialSort},!1,!0),this.dataTypeService.validateColDef(i),i}assignColumnTypes(e,t){if(!e.length)return;let i=Object.assign({},e0);ea(this.gos.get("columnTypes")||{},(e,t)=>{e in i?console.warn(`AG Grid: the column type '${e}' is a default column type and cannot be overridden.`):(t.type&&ew("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."),i[e]=t)}),e.forEach(e=>{let s=i[e.trim()];s?ec(t,s,!1,!0):console.warn("AG Grid: colDef.type '"+e+"' does not correspond to defined gridOptions.columnTypes")})}isColumnGroup(e){return void 0!==e.children}};function tT(e,t,i){if(t)for(let s=0;s<t.length;s++){let o=t[s];o instanceof eZ&&tT(o,o.getChildren(),i),i(o,e)}}K([eB("dataTypeService")],tD.prototype,"dataTypeService",2),K([$(0,ez("loggerFactory"))],tD.prototype,"setBeans",1),tD=K([ek("columnFactory")],tD);var tb=class e{constructor(e,t,i,s){this.displayedChildren=[],this.localEventService=new e$,this.groupId=t,this.partId=i,this.providedColumnGroup=e,this.pinned=s}static createUniqueId(e,t){return e+"_"+t}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}setParent(e){this.parent=e}getUniqueId(){return e.createUniqueId(this.groupId,this.partId)}isEmptyGroup(){return 0===this.displayedChildren.length}isMoving(){let e=this.getProvidedColumnGroup().getLeafColumns();return!!e&&0!==e.length&&e.every(e=>e.isMoving())}checkLeft(){if(this.displayedChildren.forEach(t=>{t instanceof e&&t.checkLeft()}),this.displayedChildren.length>0){if(this.gos.get("enableRtl")){let e=e5(this.displayedChildren).getLeft();this.setLeft(e)}else{let e=this.displayedChildren[0].getLeft();this.setLeft(e)}}else this.setLeft(null)}getLeft(){return this.left}getOldLeft(){return this.oldLeft}setLeft(t){this.oldLeft=this.left,this.left!==t&&(this.left=t,this.localEventService.dispatchEvent(this.createAgEvent(e.EVENT_LEFT_CHANGED)))}getPinned(){return this.pinned}createAgEvent(e){return{type:e}}addEventListener(e,t){this.localEventService.addEventListener(e,t)}removeEventListener(e,t){this.localEventService.removeEventListener(e,t)}getGroupId(){return this.groupId}getPartId(){return this.partId}isChildInThisGroupDeepSearch(t){let i=!1;return this.children.forEach(s=>{t===s&&(i=!0),s instanceof e&&s.isChildInThisGroupDeepSearch(t)&&(i=!0)}),i}getActualWidth(){let e=0;return this.displayedChildren&&this.displayedChildren.forEach(t=>{e+=t.getActualWidth()}),e}isResizable(){if(!this.displayedChildren)return!1;let e=!1;return this.displayedChildren.forEach(t=>{t.isResizable()&&(e=!0)}),e}getMinWidth(){let e=0;return this.displayedChildren.forEach(t=>{e+=t.getMinWidth()||0}),e}addChild(e){this.children||(this.children=[]),this.children.push(e)}getDisplayedChildren(){return this.displayedChildren}getLeafColumns(){let e=[];return this.addLeafColumns(e),e}getDisplayedLeafColumns(){let e=[];return this.addDisplayedLeafColumns(e),e}getDefinition(){return this.providedColumnGroup.getColGroupDef()}getColGroupDef(){return this.providedColumnGroup.getColGroupDef()}isPadding(){return this.providedColumnGroup.isPadding()}isExpandable(){return this.providedColumnGroup.isExpandable()}isExpanded(){return this.providedColumnGroup.isExpanded()}setExpanded(e){this.providedColumnGroup.setExpanded(e)}addDisplayedLeafColumns(t){this.displayedChildren.forEach(i=>{i instanceof eX?t.push(i):i instanceof e&&i.addDisplayedLeafColumns(t)})}
16addLeafColumns(t){this.children.forEach(i=>{i instanceof eX?t.push(i):i instanceof e&&i.addLeafColumns(t)})}getChildren(){return this.children}getColumnGroupShow(){return this.providedColumnGroup.getColumnGroupShow()}getProvidedColumnGroup(){return this.providedColumnGroup}getPaddingLevel(){let e=this.getParent();return this.isPadding()&&e&&e.isPadding()?1+e.getPaddingLevel():0}calculateDisplayedColumns(){this.displayedChildren=[];let t=this;for(;null!=t&&t.isPadding();)t=t.getParent();if(!(t&&t.providedColumnGroup.isExpandable())){this.displayedChildren=this.children,this.localEventService.dispatchEvent(this.createAgEvent(e.EVENT_DISPLAYED_CHILDREN_CHANGED));return}this.children.forEach(i=>{if(!(i instanceof e)||i.displayedChildren&&i.displayedChildren.length)switch(i.getColumnGroupShow()){case"open":t.providedColumnGroup.isExpanded()&&this.displayedChildren.push(i);break;case"closed":t.providedColumnGroup.isExpanded()||this.displayedChildren.push(i);break;default:this.displayedChildren.push(i)}}),this.localEventService.dispatchEvent(this.createAgEvent(e.EVENT_DISPLAYED_CHILDREN_CHANGED))}};tb.EVENT_LEFT_CHANGED="leftChanged",tb.EVENT_DISPLAYED_CHILDREN_CHANGED="displayedChildrenChanged",K([eB("gridOptionsService")],tb.prototype,"gos",2);var tA=tb,tP=class{};tP.EVENT_COLUMN_EVERYTHING_CHANGED="columnEverythingChanged",tP.EVENT_NEW_COLUMNS_LOADED="newColumnsLoaded",tP.EVENT_COLUMN_PIVOT_MODE_CHANGED="columnPivotModeChanged",tP.EVENT_PIVOT_MAX_COLUMNS_EXCEEDED="pivotMaxColumnsExceeded",tP.EVENT_COLUMN_ROW_GROUP_CHANGED="columnRowGroupChanged",tP.EVENT_EXPAND_COLLAPSE_ALL="expandOrCollapseAll",tP.EVENT_COLUMN_PIVOT_CHANGED="columnPivotChanged",tP.EVENT_GRID_COLUMNS_CHANGED="gridColumnsChanged",tP.EVENT_COLUMN_VALUE_CHANGED="columnValueChanged",tP.EVENT_COLUMN_MOVED="columnMoved",tP.EVENT_COLUMN_VISIBLE="columnVisible",tP.EVENT_COLUMN_PINNED="columnPinned",tP.EVENT_COLUMN_GROUP_OPENED="columnGroupOpened",tP.EVENT_COLUMN_RESIZED="columnResized",tP.EVENT_DISPLAYED_COLUMNS_CHANGED="displayedColumnsChanged",tP.EVENT_SUPPRESS_COLUMN_MOVE_CHANGED="suppressMovableColumns",tP.EVENT_SUPPRESS_MENU_HIDE_CHANGED="suppressMenuHide",tP.EVENT_SUPPRESS_FIELD_DOT_NOTATION="suppressFieldDotNotation",tP.EVENT_VIRTUAL_COLUMNS_CHANGED="virtualColumnsChanged",tP.EVENT_COLUMN_HEADER_MOUSE_OVER="columnHeaderMouseOver",tP.EVENT_COLUMN_HEADER_MOUSE_LEAVE="columnHeaderMouseLeave",tP.EVENT_COLUMN_HEADER_CLICKED="columnHeaderClicked",tP.EVENT_COLUMN_HEADER_CONTEXT_MENU="columnHeaderContextMenu",tP.EVENT_ASYNC_TRANSACTIONS_FLUSHED="asyncTransactionsFlushed",tP.EVENT_ROW_GROUP_OPENED="rowGroupOpened",tP.EVENT_ROW_DATA_UPDATED="rowDataUpdated",tP.EVENT_PINNED_ROW_DATA_CHANGED="pinnedRowDataChanged",tP.EVENT_RANGE_SELECTION_CHANGED="rangeSelectionChanged",tP.EVENT_CHART_CREATED="chartCreated",tP.EVENT_CHART_RANGE_SELECTION_CHANGED="chartRangeSelectionChanged",tP.EVENT_CHART_OPTIONS_CHANGED="chartOptionsChanged",tP.EVENT_CHART_DESTROYED="chartDestroyed",tP.EVENT_TOOL_PANEL_VISIBLE_CHANGED="toolPanelVisibleChanged",tP.EVENT_TOOL_PANEL_SIZE_CHANGED="toolPanelSizeChanged",tP.EVENT_COLUMN_PANEL_ITEM_DRAG_START="columnPanelItemDragStart",tP.EVENT_COLUMN_PANEL_ITEM_DRAG_END="columnPanelItemDragEnd",tP.EVENT_MODEL_UPDATED="modelUpdated",tP.EVENT_CUT_START="cutStart",tP.EVENT_CUT_END="cutEnd",tP.EVENT_PASTE_START="pasteStart",tP.EVENT_PASTE_END="pasteEnd",tP.EVENT_FILL_START="fillStart",tP.EVENT_FILL_END="fillEnd",tP.EVENT_RANGE_DELETE_START="rangeDeleteStart",tP.EVENT_RANGE_DELETE_END="rangeDeleteEnd",tP.EVENT_UNDO_STARTED="undoStarted",tP.EVENT_UNDO_ENDED="undoEnded",tP.EVENT_REDO_STARTED="redoStarted",tP.EVENT_REDO_ENDED="redoEnded",tP.EVENT_KEY_SHORTCUT_CHANGED_CELL_START="keyShortcutChangedCellStart",tP.EVENT_KEY_SHORTCUT_CHANGED_CELL_END="keyShortcutChangedCellEnd",tP.EVENT_CELL_CLICKED="cellClicked",tP.EVENT_CELL_DOUBLE_CLICKED="cellDoubleClicked",tP.EVENT_CELL_MOUSE_DOWN="cellMouseDown",tP.EVENT_CELL_CONTEXT_MENU="cellContextMenu",tP.EVENT_CELL_VALUE_CHANGED="cellValueChanged",tP.EVENT_CELL_EDIT_REQUEST="cellEditRequest",tP.EVENT_ROW_VALUE_CHANGED="rowValueChanged",tP.EVENT_CELL_FOCUSED="cellFocused",tP.EVENT_CELL_FOCUS_CLEARED="cellFocusCleared",tP.EVENT_FULL_WIDTH_ROW_FOCUSED="fullWidthRowFocused",tP.EVENT_ROW_SELECTED="rowSelected",tP.EVENT_SELECTION_CHANGED="selectionChanged",tP.EVENT_TOOLTIP_SHOW="tooltipShow",tP.EVENT_TOOLTIP_HIDE="tooltipHide",tP.EVENT_CELL_KEY_DOWN="cellKeyDown",tP.EVENT_CELL_MOUSE_OVER="cellMouseOver",tP.EVENT_CELL_MOUSE_OUT="cellMouseOut",tP.EVENT_FILTER_CHANGED="filterChanged",tP.EVENT_FILTER_MODIFIED="filterModified",tP.EVENT_FILTER_OPENED="filterOpened",tP.EVENT_ADVANCED_FILTER_BUILDER_VISIBLE_CHANGED="advancedFilterBuilderVisibleChanged",tP.EVENT_SORT_CHANGED="sortChanged",tP.EVENT_VIRTUAL_ROW_REMOVED="virtualRowRemoved",tP.EVENT_ROW_CLICKED="rowClicked",tP.EVENT_ROW_DOUBLE_CLICKED="rowDoubleClicked",tP.EVENT_GRID_READY="gridReady",tP.EVENT_GRID_PRE_DESTROYED="gridPreDestroyed",tP.EVENT_GRID_SIZE_CHANGED="gridSizeChanged",tP.EVENT_VIEWPORT_CHANGED="viewportChanged",tP.EVENT_SCROLLBAR_WIDTH_CHANGED="scrollbarWidthChanged",tP.EVENT_FIRST_DATA_RENDERED="firstDataRendered",tP.EVENT_DRAG_STARTED="dragStarted",tP.EVENT_DRAG_STOPPED="dragStopped",tP.EVENT_CHECKBOX_CHANGED="checkboxChanged",tP.EVENT_ROW_EDITING_STARTED="rowEditingStarted",tP.EVENT_ROW_EDITING_STOPPED="rowEditingStopped",tP.EVENT_CELL_EDITING_STARTED="cellEditingStarted",tP.EVENT_CELL_EDITING_STOPPED="cellEditingStopped",tP.EVENT_BODY_SCROLL="bodyScroll",tP.EVENT_BODY_SCROLL_END="bodyScrollEnd",tP.EVENT_HEIGHT_SCALE_CHANGED="heightScaleChanged",tP.EVENT_PAGINATION_CHANGED="paginationChanged",tP.EVENT_COMPONENT_STATE_CHANGED="componentStateChanged",tP.EVENT_STORE_REFRESHED="storeRefreshed",tP.EVENT_STATE_UPDATED="stateUpdated",tP.EVENT_COLUMN_MENU_VISIBLE_CHANGED="columnMenuVisibleChanged",tP.EVENT_CONTEXT_MENU_VISIBLE_CHANGED="contextMenuVisibleChanged",tP.EVENT_BODY_HEIGHT_CHANGED="bodyHeightChanged",tP.EVENT_COLUMN_CONTAINER_WIDTH_CHANGED="columnContainerWidthChanged",tP.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED="displayedColumnsWidthChanged",tP.EVENT_SCROLL_VISIBILITY_CHANGED="scrollVisibilityChanged",tP.EVENT_COLUMN_HOVER_CHANGED="columnHoverChanged",tP.EVENT_FLASH_CELLS="flashCells",tP.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED="paginationPixelOff
16setChanged",tP.EVENT_DISPLAYED_ROWS_CHANGED="displayedRowsChanged",tP.EVENT_LEFT_PINNED_WIDTH_CHANGED="leftPinnedWidthChanged",tP.EVENT_RIGHT_PINNED_WIDTH_CHANGED="rightPinnedWidthChanged",tP.EVENT_ROW_CONTAINER_HEIGHT_CHANGED="rowContainerHeightChanged",tP.EVENT_HEADER_HEIGHT_CHANGED="headerHeightChanged",tP.EVENT_COLUMN_HEADER_HEIGHT_CHANGED="columnHeaderHeightChanged",tP.EVENT_ROW_DRAG_ENTER="rowDragEnter",tP.EVENT_ROW_DRAG_MOVE="rowDragMove",tP.EVENT_ROW_DRAG_LEAVE="rowDragLeave",tP.EVENT_ROW_DRAG_END="rowDragEnd",tP.EVENT_GRID_STYLES_CHANGED="gridStylesChanged",tP.EVENT_COLUMN_ROW_GROUP_CHANGE_REQUEST="columnRowGroupChangeRequest",tP.EVENT_COLUMN_PIVOT_CHANGE_REQUEST="columnPivotChangeRequest",tP.EVENT_COLUMN_VALUE_CHANGE_REQUEST="columnValueChangeRequest",tP.EVENT_COLUMN_AGG_FUNC_CHANGE_REQUEST="columnAggFuncChangeRequest",tP.EVENT_STORE_UPDATED="storeUpdated",tP.EVENT_FILTER_DESTROYED="filterDestroyed",tP.EVENT_ROW_DATA_UPDATE_STARTED="rowDataUpdateStarted",tP.EVENT_ROW_COUNT_READY="rowCountReady",tP.EVENT_ADVANCED_FILTER_ENABLED_CHANGED="advancedFilterEnabledChanged",tP.EVENT_DATA_TYPES_INFERRED="dataTypesInferred",tP.EVENT_FIELD_VALUE_CHANGED="fieldValueChanged",tP.EVENT_FIELD_PICKER_VALUE_SELECTED="fieldPickerValueSelected",tP.EVENT_SIDE_BAR_UPDATED="sideBarUpdated";var tF=new Set([tP.EVENT_GRID_PRE_DESTROYED,tP.EVENT_FILL_START]),tL=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){let t;let i=this.existingIds[e];return t="number"!=typeof i?0:i+1,this.existingIds[e]=t,t}},tM="ag-Grid-AutoColumn",tN=class extends tR{createAutoGroupColumns(e){let t=[],i=this.gos.get("treeData"),s=this.gos.isGroupMultiAutoColumn();return i&&s&&(console.warn('AG Grid: you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data'),s=!1),s?e.forEach((e,i)=>{t.push(this.createOneAutoGroupColumn(e,i))}):t.push(this.createOneAutoGroupColumn()),t}updateAutoGroupColumns(e,t){e.forEach((e,i)=>this.updateOneAutoGroupColumn(e,i,t))}createOneAutoGroupColumn(e,t){let i;i=e?`${tM}-${e.getId()}`:tM;let s=this.createAutoGroupColDef(i,e,t);s.colId=i;let o=new eX(s,null,i,!0);return this.context.createBean(o),o}updateOneAutoGroupColumn(e,t,i){let s=e.getColDef(),o="string"==typeof s.showRowGroup?s.showRowGroup:void 0,r=null!=o?this.columnModel.getPrimaryColumn(o):void 0,n=this.createAutoGroupColDef(e.getId(),null!=r?r:void 0,t);e.setColDef(n,null,i),this.columnFactory.applyColumnState(e,n,i)}createAutoGroupColDef(e,t,i){let s=this.createBaseColDef(t);ec(s,this.gos.get("autoGroupColumnDef")),s=this.columnFactory.addColumnDefaultAndTypes(s,e),!this.gos.get("treeData")&&Q(s.field)&&Q(s.valueGetter)&&Q(s.filterValueGetter)&&"agGroupColumnFilter"!==s.filter&&(s.filter=!1),i&&i>0&&(s.headerCheckboxSelection=!1);let o=this.gos.isColumnsSortingCoupledToGroup(),r=s.valueGetter||null!=s.field;return o&&!r&&(s.sortIndex=void 0,s.initialSort=void 0),s}createBaseColDef(e){let t=this.gos.get("autoGroupColumnDef"),i={headerName:this.localeService.getLocaleTextFunc()("group","Group")};if(t&&(t.cellRenderer||t.cellRendererSelector)||(i.cellRenderer="agGroupCellRenderer"),e){let t=e.getColDef();Object.assign(i,{headerName:this.columnModel.getDisplayNameForColumn(e,"header"),headerValueGetter:t.headerValueGetter}),t.cellRenderer&&Object.assign(i,{cellRendererParams:{innerRenderer:t.cellRenderer,innerRendererParams:t.cellRendererParams}}),i.showRowGroup=e.getColId()}else i.showRowGroup=!0;return i}};K([eB("columnModel")],tN.prototype,"columnModel",2),K([eB("columnFactory")],tN.prototype,"columnFactory",2),tN=K([ek("autoGroupColService")],tN);var tI={};z(tI,{camelCaseToHumanText:()=>tH,camelCaseToHyphenated:()=>tk,capitalise:()=>t_,escapeString:()=>tV,utf8_encode:()=>tx});var tG=/[&<>"']/g,tO={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function tx(e){let t=String.fromCharCode;function i(e,i){return t(e>>i&63|128)}let s=function(e){let t,i;let s=[];if(!e)return[];let o=e.length,r=0;for(;r<o;)(t=e.charCodeAt(r++))>=55296&&t<=56319&&r<o?(64512&(i=e.charCodeAt(r++)))==56320?s.push(((1023&t)<<10)+(1023&i)+65536):(s.push(t),r--):s.push(t);return s}(e),o=s.length,r=-1,n="";for(;++r<o;)n+=function(e){if(e>=0&&e<=31&&10!==e){let t=e.toString(16).toUpperCase().padStart(4,"0");return`_x${t}_`}if((4294967168&e)==0)return t(e);let s="";return(4294965248&e)==0?s=t(e>>6&31|192):(4294901760&e)==0?(function(e){if(e>=55296&&e<=57343)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value")}(e),s=t(e>>12&15|224)+i(e,6)):(4292870144&e)==0&&(s=t(e>>18&7|240)+i(e,12)+i(e,6)),s+=t(63&e|128)}(s[r]);return n}function t_(e){return e[0].toUpperCase()+e.substring(1).toLowerCase()}function tV(e,t){if(null==e)return null;let i=e.toString().toString();return t?i:i.replace(tG,e=>tO[e])}function tH(e){return e&&null!=e?e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z])([a-z])/g,"$1 $2$3").replace(/\./g," ").split(" ").map(e=>e.substring(0,1).toUpperCase()+(e.length>1?e.substring(1,e.length):"")).join(" "):null}function tk(e){return e.replace(/[A-Z]/g,e=>`-${e.toLocaleLowerCase()}`)}var tB={};function tW(e){let t=new Map;
16return e.forEach(e=>t.set(e[0],e[1])),t}function tU(e,t){let i=new Map;return e.forEach(e=>i.set(t(e),e)),i}function tz(e){let t=[];return e.forEach((e,i)=>t.push(i)),t}z(tB,{convertToMap:()=>tW,keys:()=>tz,mapById:()=>tU});var tK=class extends tR{constructor(){super(...arguments),this.primaryHeaderRowCount=0,this.secondaryHeaderRowCount=0,this.gridHeaderRowCount=0,this.displayedColumnsLeft=[],this.displayedColumnsRight=[],this.displayedColumnsCenter=[],this.displayedColumns=[],this.displayedColumnsAndGroupsMap={},this.viewportColumns=[],this.viewportColumnsHash="",this.headerViewportColumns=[],this.viewportColumnsCenter=[],this.headerViewportColumnsCenter=[],this.viewportRowLeft={},this.viewportRowRight={},this.viewportRowCenter={},this.autoHeightActiveAtLeastOnce=!1,this.rowGroupColumns=[],this.valueColumns=[],this.pivotColumns=[],this.ready=!1,this.changeEventsDispatching=!1,this.autoGroupsNeedBuilding=!1,this.forceRecreateAutoGroups=!1,this.pivotMode=!1,this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.bodyWidthDirty=!0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}init(){this.suppressColumnVirtualisation=this.gos.get("suppressColumnVirtualisation");let e=this.gos.get("pivotMode");this.isPivotSettingAllowed(e)&&(this.pivotMode=e),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents"],e=>this.buildAutoGroupColumns(t$(e.source))),this.addManagedPropertyListener("autoGroupColumnDef",e=>this.onAutoGroupColumnDefChanged(t$(e.source))),this.addManagedPropertyListeners(["defaultColDef","columnTypes","suppressFieldDotNotation"],e=>this.onSharedColDefChanged(t$(e.source))),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),t$(e.source))),this.addManagedListener(this.eventService,tP.EVENT_FIRST_DATA_RENDERED,()=>this.onFirstDataRendered())}buildAutoGroupColumns(e){this.columnDefs&&(this.autoGroupsNeedBuilding=!0,this.forceRecreateAutoGroups=!0,this.updateGridColumns(),this.updateDisplayedColumns(e))}onAutoGroupColumnDefChanged(e){this.groupAutoColumns&&this.autoGroupColService.updateAutoGroupColumns(this.groupAutoColumns,e)}onSharedColDefChanged(e){this.gridColumns&&(this.groupAutoColumns&&this.autoGroupColService.updateAutoGroupColumns(this.groupAutoColumns,e),this.createColumnsFromColumnDefs(!0,e))}setColumnDefs(e,t){let i=!!this.columnDefs;this.columnDefs=e,this.createColumnsFromColumnDefs(i,t)}recreateColumnDefs(e){this.onSharedColDefChanged(e)}destroyOldColumns(e,t){let i={};if(!e)return;tT(null,e,e=>{i[e.getInstanceId()]=e}),t&&tT(null,t,e=>{i[e.getInstanceId()]=null});let s=Object.values(i).filter(e=>null!=e);this.destroyBeans(s)}destroyColumns(){this.destroyOldColumns(this.primaryColumnTree),this.destroyOldColumns(this.secondaryBalancedTree),this.destroyOldColumns(this.groupAutoColsBalancedTree)}createColumnsFromColumnDefs(e,t){let i=e?this.compareColumnStatesAndDispatchEvents(t):void 0;this.valueCache.expire(),this.autoGroupsNeedBuilding=!0;let s=this.primaryColumns,o=this.primaryColumnTree,r=this.columnFactory.createColumnTree(this.columnDefs,!0,o,t);this.destroyOldColumns(this.primaryColumnTree,r.columnTree),this.primaryColumnTree=r.columnTree,this.primaryHeaderRowCount=r.treeDept+1,this.primaryColumns=this.getColumnsFromTree(this.primaryColumnTree),this.primaryColumnsMap={},this.primaryColumns.forEach(e=>this.primaryColumnsMap[e.getId()]=e),this.extractRowGroupColumns(t,s),this.extractPivotColumns(t,s),this.extractValueColumns(t,s),this.ready=!0;let n=void 0===this.gridColsArePrimary;(this.gridColsArePrimary||n||this.autoGroupsNeedBuilding)&&(this.updateGridColumns(),e&&this.gridColsArePrimary&&!this.gos.get("maintainColumnOrder")&&this.orderGridColumnsLikePrimary(),this.updateDisplayedColumns(t),this.checkViewportColumns()),this.dispatchEverythingChanged(t),this.changeEventsDispatching=!0,i&&i(),this.changeEventsDispatching=!1,this.dispatchNewColumnsLoaded(t)}shouldRowModelIgnoreRefresh(){return this.changeEventsDispatching}dispatchNewColumnsLoaded(e){let t={type:tP.EVENT_NEW_COLUMNS_LOADED,source:e};this.eventService.dispatchEvent(t),"gridInitializing"===e&&this.onColumnsReady()}dispatchEverythingChanged(e){let t={type:tP.EVENT_COLUMN_EVERYTHING_CHANGED,source:e};this.eventService.dispatchEvent(t)}orderGridColumnsLikePrimary(){let e=this.primaryColumns;if(!e)return;let t=e.filter(e=>this.gridColumns.indexOf(e)>=0),i=this.gridColumns.filter(e=>0>t.indexOf(e));this.gridColumns=[...i,...t],this.gridColumns=this.placeLockedColumns(this.gridColumns)}getAllDisplayedAutoHeightCols(){return this.displayedAutoHeightCols}setViewport(){this.gos.get("enableRtl")?(this.viewportLeft=this.bodyWidth-this.scrollPosition-this.scrollWidth,this.viewportRight=this.bodyWidth-this.scrollPosition):(this.viewportLeft=this.scrollPosition,this.viewportRight=this.scrollWidth+this.scrollPosition)}checkViewportColumns(e=!1){if(null==this.displayedColumnsCenter||!this.extractViewport())return;let t={type:tP.EVENT_VIRTUAL_COLUMNS_CHANGED,afterScroll:e};this.eventService.dispatchEvent(t)}setViewportPosition(e,t,i=!1){(e!==this.scrollWidth||t!==this.scrollPosition||this.bodyWidthDirty)&&
16(this.scrollWidth=e,this.scrollPosition=t,this.bodyWidthDirty=!0,this.setViewport(),this.ready&&this.checkViewportColumns(i))}isPivotMode(){return this.pivotMode}isPivotSettingAllowed(e){return!(e&&this.gos.get("treeData"))||(ew("Pivot mode not available with treeData."),!1)}setPivotMode(e,t){if(e===this.pivotMode||!this.isPivotSettingAllowed(this.pivotMode)||(this.pivotMode=e,!this.gridColumns))return;this.autoGroupsNeedBuilding=!0,this.updateGridColumns(),this.updateDisplayedColumns(t);let i={type:tP.EVENT_COLUMN_PIVOT_MODE_CHANGED};this.eventService.dispatchEvent(i)}getSecondaryPivotColumn(e,t){if(Q(this.secondaryColumns))return null;let i=this.getPrimaryColumn(t),s=null;return this.secondaryColumns.forEach(t=>{let o=t.getColDef().pivotKeys,r=t.getColDef().pivotValueColumn;e4(o,e)&&r===i&&(s=t)}),s}setBeans(e){this.logger=e.create("columnModel")}setFirstRightAndLastLeftPinned(e){let t,i;this.gos.get("enableRtl")?(t=this.displayedColumnsLeft?this.displayedColumnsLeft[0]:null,i=this.displayedColumnsRight?e5(this.displayedColumnsRight):null):(t=this.displayedColumnsLeft?e5(this.displayedColumnsLeft):null,i=this.displayedColumnsRight?this.displayedColumnsRight[0]:null),this.gridColumns.forEach(s=>{s.setLastLeftPinned(s===t,e),s.setFirstRightPinned(s===i,e)})}autoSizeColumns(e){if(this.shouldQueueResizeOperations){this.resizeOperationQueue.push(()=>this.autoSizeColumns(e));return}let{columns:t,skipHeader:i,skipHeaderGroups:s,stopAtGroup:o,source:r="api"}=e;this.animationFrameService.flushAllFrames();let n=[],l=-1,a=null!=i?i:this.gos.get("skipHeaderOnAutoSize"),h=null!=s?s:a;for(;0!==l;)l=0,this.actionOnGridColumns(t,e=>{if(n.indexOf(e)>=0)return!1;let t=this.autoWidthCalculator.getPreferredWidthForColumn(e,a);if(t>0){let i=this.normaliseColumnWidth(e,t);e.setActualWidth(i,r),n.push(e),l++}return!0},r);h||this.autoSizeColumnGroupsByColumns(t,r,o),this.dispatchColumnResizedEvent(n,!0,"autosizeColumns")}dispatchColumnResizedEvent(e,t,i,s=null){if(e&&e.length){let o={type:tP.EVENT_COLUMN_RESIZED,columns:e,column:1===e.length?e[0]:null,flexColumns:s,finished:t,source:i};this.eventService.dispatchEvent(o)}}dispatchColumnChangedEvent(e,t,i){let s={type:e,columns:t,column:t&&1==t.length?t[0]:null,source:i};this.eventService.dispatchEvent(s)}dispatchColumnMovedEvent(e){let{movedColumns:t,source:i,toIndex:s,finished:o}=e,r={type:tP.EVENT_COLUMN_MOVED,columns:t,column:t&&1===t.length?t[0]:null,toIndex:s,finished:o,source:i};this.eventService.dispatchEvent(r)}dispatchColumnPinnedEvent(e,t){if(!e.length)return;let i=1===e.length?e[0]:null,s=this.getCommonValue(e,e=>e.getPinned()),o={type:tP.EVENT_COLUMN_PINNED,pinned:null!=s?s:null,columns:e,column:i,source:t};this.eventService.dispatchEvent(o)}dispatchColumnVisibleEvent(e,t){if(!e.length)return;let i=1===e.length?e[0]:null,s=this.getCommonValue(e,e=>e.isVisible()),o={type:tP.EVENT_COLUMN_VISIBLE,visible:s,columns:e,column:i,source:t};this.eventService.dispatchEvent(o)}autoSizeColumn(e,t,i){e&&this.autoSizeColumns({columns:[e],skipHeader:i,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,i){let s;let o=new Set;for(let r of(this.getGridColumns(e).forEach(e=>{let t=e.getParent();for(;t&&t!=i;)t.isPadding()||o.add(t),t=t.getParent()}),o)){for(let e of this.ctrlsService.getHeaderRowContainerCtrls())if(s=e.getHeaderCtrlForColumn(r))break;s&&s.resizeLeafColumnsToFit(t)}return[]}autoSizeAllColumns(e,t){if(this.shouldQueueResizeOperations){this.resizeOperationQueue.push(()=>this.autoSizeAllColumns(e,t));return}let i=this.getAllDisplayedColumns();this.autoSizeColumns({columns:i,skipHeader:t,source:e})}getColumnsFromTree(e){let t=[],i=e=>{for(let s=0;s<e.length;s++){let o=e[s];o instanceof eX?t.push(o):o instanceof eZ&&i(o.getChildren())}};return i(e),t}getAllDisplayedTrees(){return this.displayedTreeLeft&&this.displayedTreeRight&&this.displayedTreeCentre?this.displayedTreeLeft.concat(this.displayedTreeCentre).concat(this.displayedTreeRight):null}getPrimaryColumnTree(){return this.primaryColumnTree}getHeaderRowCount(){return this.gridHeaderRowCount}getDisplayedTreeLeft(){return this.displayedTreeLeft}getDisplayedTreeRight(){return this.displayedTreeRight}getDisplayedTreeCentre(){return this.displayedTreeCentre}isColumnDisplayed(e){return this.getAllDisplayedColumns().indexOf(e)>=0}getAllDisplayedColumns(){return this.displayedColumns}getViewportColumns(){return this.viewportColumns}getDisplayedLeftColumnsForRow(e){return this.colSpanActive?this.getDisplayedColumnsForRow(e,this.displayedColumnsLeft):this.displayedColumnsLeft}getDisplayedRightColumnsForRow(e){return this.colSpanActive?this.getDisplayedColumnsForRow(e,this.displayedColumnsRight):this.displayedColumnsRight}isColSpanActive(){return this.colSpanActive}getDisplayedColumnsForRow(e,t,i,s){let o=[],r=null;for(let n=0;n<t.length;n++){let l;let a=t[n],h=t.length-n,d=Math.min(a.getColSpan(e),h),u=[a];if(d>1){let e=d-1;for(let i=1;i<=e;i++)u.push(t[n+i]);n+=e}
16i?(l=!1,u.forEach(e=>{i(e)&&(l=!0)})):l=!0,l&&(0===o.length&&r&&s&&s(a)&&o.push(r),o.push(a)),r=a}return o}getViewportCenterColumnsForRow(e){if(!this.colSpanActive)return this.viewportColumnsCenter;let t=this.isColumnVirtualisationSuppressed()?null:this.isColumnInRowViewport.bind(this);return this.getDisplayedColumnsForRow(e,this.displayedColumnsCenter,t,e=>{let t=e.getLeft();return q(t)&&t>this.viewportLeft})}isColumnAtEdge(e,t){let i;let s=this.getAllDisplayedColumns();if(!s.length)return!1;let o="first"===t;if(e instanceof tA){let t=e.getDisplayedLeafColumns();if(!t.length)return!1;i=o?t[0]:e5(t)}else i=e;return(o?s[0]:e5(s))===i}getAriaColumnIndex(e){let t;return t=e instanceof tA?e.getLeafColumns()[0]:e,this.ariaOrderColumns.indexOf(t)+1}isColumnInHeaderViewport(e){return!!e.isAutoHeaderHeight()||this.isColumnInRowViewport(e)}isColumnInRowViewport(e){if(e.isAutoHeight())return!0;let t=e.getLeft()||0,i=t+e.getActualWidth(),s=this.viewportLeft-200,o=this.viewportRight+200;return!(t<s&&i<s)&&!(t>o&&i>o)}getDisplayedColumnsLeftWidth(){return this.getWidthOfColsInList(this.displayedColumnsLeft)}getDisplayedColumnsRightWidth(){return this.getWidthOfColsInList(this.displayedColumnsRight)}updatePrimaryColumnList(e,t,i,s,o,r){if(!e||X(e))return;let n=!1;if(e.forEach(e=>{if(!e)return;let o=this.getPrimaryColumn(e);if(o){if(i){if(t.indexOf(o)>=0)return;t.push(o)}else{if(0>t.indexOf(o))return;te(t,o)}s(o),n=!0}}),!n)return;this.autoGroupsNeedBuilding&&this.updateGridColumns(),this.updateDisplayedColumns(r);let l={type:o,columns:t,column:1===t.length?t[0]:null,source:r};this.eventService.dispatchEvent(l)}setRowGroupColumns(e,t){this.autoGroupsNeedBuilding=!0,this.setPrimaryColumnList(e,this.rowGroupColumns,tP.EVENT_COLUMN_ROW_GROUP_CHANGED,!0,this.setRowGroupActive.bind(this),t)}setRowGroupActive(e,t,i){e!==t.isRowGroupActive()&&(t.setRowGroupActive(e,i),e&&!this.gos.get("suppressRowGroupHidesColumns")&&this.setColumnsVisible([t],!1,i),e||this.gos.get("suppressMakeColumnVisibleAfterUnGroup")||this.setColumnsVisible([t],!0,i))}addRowGroupColumns(e,t){this.autoGroupsNeedBuilding=!0,this.updatePrimaryColumnList(e,this.rowGroupColumns,!0,this.setRowGroupActive.bind(this,!0),tP.EVENT_COLUMN_ROW_GROUP_CHANGED,t)}removeRowGroupColumns(e,t){this.autoGroupsNeedBuilding=!0,this.updatePrimaryColumnList(e,this.rowGroupColumns,!1,this.setRowGroupActive.bind(this,!1),tP.EVENT_COLUMN_ROW_GROUP_CHANGED,t)}addPivotColumns(e,t){this.updatePrimaryColumnList(e,this.pivotColumns,!0,e=>e.setPivotActive(!0,t),tP.EVENT_COLUMN_PIVOT_CHANGED,t)}setPivotColumns(e,t){this.setPrimaryColumnList(e,this.pivotColumns,tP.EVENT_COLUMN_PIVOT_CHANGED,!0,(e,i)=>{i.setPivotActive(e,t)},t)}removePivotColumns(e,t){this.updatePrimaryColumnList(e,this.pivotColumns,!1,e=>e.setPivotActive(!1,t),tP.EVENT_COLUMN_PIVOT_CHANGED,t)}setPrimaryColumnList(e,t,i,s,o,r){if(!this.gridColumns)return;let n=new Map;t.forEach((e,t)=>n.set(e,t)),t.length=0,q(e)&&e.forEach(e=>{let i=this.getPrimaryColumn(e);i&&t.push(i)}),t.forEach((e,t)=>{let i=n.get(e);if(void 0===i){n.set(e,0);return}s&&i!==t||n.delete(e)}),(this.primaryColumns||[]).forEach(e=>{o(t.indexOf(e)>=0,e)}),this.autoGroupsNeedBuilding&&this.updateGridColumns(),this.updateDisplayedColumns(r),this.dispatchColumnChangedEvent(i,[...n.keys()],r)}setValueColumns(e,t){this.setPrimaryColumnList(e,this.valueColumns,tP.EVENT_COLUMN_VALUE_CHANGED,!1,this.setValueActive.bind(this),t)}setValueActive(e,t,i){if(e!==t.isValueActive()&&(t.setValueActive(e,i),e&&!t.getAggFunc()&&this.aggFuncService)){let e=this.aggFuncService.getDefaultAggFunc(t);t.setAggFunc(e)}}addValueColumns(e,t){this.updatePrimaryColumnList(e,this.valueColumns,!0,this.setValueActive.bind(this,!0),tP.EVENT_COLUMN_VALUE_CHANGED,t)}removeValueColumns(e,t){this.updatePrimaryColumnList(e,this.valueColumns,!1,this.setValueActive.bind(this,!1),tP.EVENT_COLUMN_VALUE_CHANGED,t)}normaliseColumnWidth(e,t){let i=e.getMinWidth();q(i)&&t<i&&(t=i);let s=e.getMaxWidth();return q(s)&&e.isGreaterThanMax(t)&&(t=s),t}getPrimaryOrGridColumn(e){return this.getPrimaryColumn(e)||this.getGridColumn(e)}setColumnWidths(e,t,i,s){let o=[];
16e.forEach(e=>{let i=this.getPrimaryOrGridColumn(e.key);if(i&&(o.push({width:e.newWidth,ratios:[1],columns:[i]}),"shift"===this.gos.get("colResizeDefault")&&(t=!t),t)){let t=this.getDisplayedColAfter(i);if(!t)return;let s=i.getActualWidth()-e.newWidth,r=t.getActualWidth()+s;o.push({width:r,ratios:[1],columns:[t]})}}),0!==o.length&&this.resizeColumnSets({resizeSets:o,finished:i,source:s})}checkMinAndMaxWidthsForSet(e){let{columns:t,width:i}=e,s=0,o=0,r=!0;t.forEach(e=>{let t=e.getMinWidth();s+=t||0;let i=e.getMaxWidth();q(i)&&i>0?o+=i:r=!1});let n=i>=s,l=!r||i<=o;return n&&l}resizeColumnSets(e){let{resizeSets:t,finished:i,source:s}=e;if(!(!t||t.every(e=>this.checkMinAndMaxWidthsForSet(e)))){if(i){let e=t&&t.length>0?t[0].columns:null;this.dispatchColumnResizedEvent(e,i,s)}return}let o=[],r=[];t.forEach(e=>{let{width:t,columns:i,ratios:n}=e,l={},a={};i.forEach(e=>r.push(e));let h=!0,d=0;for(;h;){if(++d>1e3){console.error("AG Grid: infinite loop in resizeColumnSets");break}h=!1;let e=[],s=0,o=t;i.forEach((t,i)=>{if(a[t.getId()])o-=l[t.getId()];else{e.push(t);let o=n[i];s+=o}});let r=1/s;e.forEach((i,s)=>{let d;s===e.length-1?d=o:(d=Math.round(n[s]*t*r),o-=d);let u=i.getMinWidth(),c=i.getMaxWidth();q(u)&&d<u?(d=u,a[i.getId()]=!0,h=!0):q(c)&&c>0&&d>c&&(d=c,a[i.getId()]=!0,h=!0),l[i.getId()]=d})}i.forEach(e=>{let t=l[e.getId()];e.getActualWidth()!==t&&(e.setActualWidth(t,s),o.push(e))})});let n=o.length>0,l=[];n&&(l=this.refreshFlexedColumns({resizingCols:r,skipSetLeft:!0}),this.setLeftValues(s),this.updateBodyWidths(),this.checkViewportColumns());let a=r.concat(l);(n||i)&&this.dispatchColumnResizedEvent(a,i,s,l)}setColumnAggFunc(e,t,i){if(!e)return;let s=this.getPrimaryColumn(e);s&&(s.setAggFunc(t),this.dispatchColumnChangedEvent(tP.EVENT_COLUMN_VALUE_CHANGED,[s],i))}moveRowGroupColumn(e,t,i){if(this.isRowGroupEmpty())return;let s=this.rowGroupColumns[e],o=this.rowGroupColumns.slice(e,t);this.rowGroupColumns.splice(e,1),this.rowGroupColumns.splice(t,0,s);let r={type:tP.EVENT_COLUMN_ROW_GROUP_CHANGED,columns:o,column:1===o.length?o[0]:null,source:i};this.eventService.dispatchEvent(r)}moveColumns(e,t,i,s=!0){if(!this.gridColumns)return;if(this.columnAnimationService.start(),t>this.gridColumns.length-e.length){console.warn("AG Grid: tried to insert columns in invalid location, toIndex = "+t),console.warn("AG Grid: remember that you should not count the moving columns when calculating the new index");return}let o=this.getGridColumns(e);this.doesMovePassRules(o,t)&&(tr(this.gridColumns,o,t),this.updateDisplayedColumns(i),this.dispatchColumnMovedEvent({movedColumns:o,source:i,toIndex:t,finished:s}),this.columnAnimationService.finish())}doesMovePassRules(e,t){let i=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(i)}doesOrderPassRules(e){return!!(this.doesMovePassMarryChildren(e)&&this.doesMovePassLockedPositions(e))}getProposedColumnOrder(e,t){let i=this.gridColumns.slice();return tr(i,e,t),i}sortColumnsLikeGridColumns(e){!e||e.length<=1||e.filter(e=>0>this.gridColumns.indexOf(e)).length>0||e.sort((e,t)=>this.gridColumns.indexOf(e)-this.gridColumns.indexOf(t))}doesMovePassLockedPositions(e){let t=0,i=!0,s=e=>e?!0===e?0:"left"===e?0:2:1;return e.forEach(e=>{let o=s(e.getColDef().lockPosition);o<t&&(i=!1),t=o}),i}doesMovePassMarryChildren(e){let t=!0;return tT(null,this.gridBalancedTree,i=>{if(!(i instanceof eZ))return;let s=i.getColGroupDef();if(!(s&&s.marryChildren))return;let o=[];i.getLeafColumns().forEach(t=>{let i=e.indexOf(t);o.push(i)}),Math.max.apply(Math,o)-Math.min.apply(Math,o)>i.getLeafColumns().length-1&&(t=!1)}),t}moveColumnByIndex(e,t,i){if(!this.gridColumns)return;let s=this.gridColumns[e];this.moveColumns([s],t,i)}getColumnDefs(){if(!this.primaryColumns)return;let e=this.primaryColumns.slice();return this.gridColsArePrimary?e.sort((e,t)=>this.gridColumns.indexOf(e)-this.gridColumns.indexOf(t)):this.lastPrimaryOrder&&e.sort((e,t)=>this.lastPrimaryOrder.indexOf(e)-this.lastPrimaryOrder.indexOf(t)),this.columnDefFactory.buildColumnDefs(e,this.rowGroupColumns,this.pivotColumns)}getBodyContainerWidth(){return this.bodyWidth}getContainerWidth(e){switch(e){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}}updateBodyWidths(){let e=this.getWidthOfColsInList(this.displayedColumnsCenter),t=this.getWidthOfColsInList(this.displayedColumnsLeft),i=this.getWidthOfColsInList(this.displayedColumnsRight);if(this.bodyWidthDirty=this.bodyWidth!==e,this.bodyWidth!==e||this.leftWidth!==t||this.rightWidth!==i){this.bodyWidth=e,this.leftWidth=t,this.rightWidth=i;let s={type:tP.EVENT_COLUMN_CONTAINER_WIDTH_CHANGED};this.eventService.dispatchEvent(s);let o={type:tP.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED};this.eventService.dispatchEvent(o)}}getValueColumns(){return this.valueColumns?this.valueColumns:[]}getPivotColumns(){return this.pivotColumns?this.pivotColumns:[]}isPivotActive(){return this.pivotColumns&&this.pivotColumns.length>0&&this.pivotMode}getRowGroupColumns(){return this.rowGroupColumns?this.rowGroupColumns:[]}getDisplayedCenterColumns(){return this.displayedColumnsCenter}getDisplayedLeftColumns(){return this.displayedColumnsLeft}getDisplayedRightColumns(){return this.displayedColumnsRight}getAllPrimaryColumns(){return this.primaryColumns?this.primaryColumns:null}getSecondaryColumns(){return this.secondaryColumns?this.secondaryColumns:null}getAllColumnsForQuickFilter(){return this.columnsForQuickFilter}getAllGridColumns(){var e;return null!=(e=this.gridColumns)?e:[]}isRowGroupEmpty(){return X(this.rowGroupColumns)}setColumnsVisible(e,t=!1,i){this.applyColumnState({state:e.map(e=>({colId:"string"==typeof e?e:e.getColId(),hide:!t}))},i)}setColumnsPinned(e,t,i){let s;if(this.gridColumns){if(this.gos.isDomLayout("print")){console.warn("AG Grid: Changing the column pinning status is not allowed with domLayout='print'");return}this.columnAnimationService.start(),s=!0===t||"left"===t?"left":"right"===t?"right":null,this.actionOnGridColumns(e,e=>e.getPinned()!==s&&(e.setPinned(s),!0),i,()=>({type:tP.EVENT_COLUMN_PINNED,pinned:s,column:null,columns:null,source:i})),this.columnAnimationService.finish()}}actionOnGridColumns(e,t,i,s){if(X(e))return;let o=[];
16if(e.forEach(e=>{if(!e)return;let i=this.getGridColumn(e);i&&!1!==t(i)&&o.push(i)}),o.length&&(this.updateDisplayedColumns(i),q(s)&&s)){let e=s();e.columns=o,e.column=1===o.length?o[0]:null,this.eventService.dispatchEvent(e)}}getDisplayedColBefore(e){let t=this.getAllDisplayedColumns(),i=t.indexOf(e);return i>0?t[i-1]:null}getDisplayedColAfter(e){let t=this.getAllDisplayedColumns(),i=t.indexOf(e);return i<t.length-1?t[i+1]:null}getDisplayedGroupAtDirection(e,t){let i=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),s=e.getDisplayedLeafColumns(),o="After"===t?e5(s):s[0],r=`getDisplayedCol${t}`;for(;;){let t=this[r](o);if(!t)return null;let s=this.getColumnGroupAtLevel(t,i);if(s!==e)return s}}getColumnGroupAtLevel(e,t){let i=e.getParent();for(;!(i.getProvidedColumnGroup().getLevel()+i.getPaddingLevel()<=t);)i=i.getParent();return i}isPinningLeft(){return this.displayedColumnsLeft.length>0}isPinningRight(){return this.displayedColumnsRight.length>0}getPrimaryAndSecondaryAndAutoColumns(){return[].concat(this.primaryColumns||[],this.groupAutoColumns||[],this.secondaryColumns||[])}createStateItemFromColumn(e){let t=e.isRowGroupActive()?this.rowGroupColumns.indexOf(e):null,i=e.isPivotActive()?this.pivotColumns.indexOf(e):null,s=e.isValueActive()?e.getAggFunc():null,o=null!=e.getSort()?e.getSort():null,r=null!=e.getSortIndex()?e.getSortIndex():null,n=null!=e.getFlex()&&e.getFlex()>0?e.getFlex():null;return{colId:e.getColId(),width:e.getActualWidth(),hide:!e.isVisible(),pinned:e.getPinned(),sort:o,sortIndex:r,aggFunc:s,rowGroup:e.isRowGroupActive(),rowGroupIndex:t,pivot:e.isPivotActive(),pivotIndex:i,flex:n}}getColumnState(){if(Q(this.primaryColumns)||!this.isAlive())return[];let e=this.getPrimaryAndSecondaryAndAutoColumns().map(this.createStateItemFromColumn.bind(this));return this.orderColumnStateList(e),e}orderColumnStateList(e){let t=tW(this.gridColumns.map((e,t)=>[e.getColId(),t]));e.sort((e,i)=>(t.has(e.colId)?t.get(e.colId):-1)-(t.has(i.colId)?t.get(i.colId):-1))}resetColumnState(e){if(X(this.primaryColumns))return;let t=this.getColumnsFromTree(this.primaryColumnTree),i=[],s=1e3,o=1e3,r=[];this.groupAutoColumns&&(r=r.concat(this.groupAutoColumns)),t&&(r=r.concat(t)),r.forEach(e=>{let t=this.getColumnStateFromColDef(e);Q(t.rowGroupIndex)&&t.rowGroup&&(t.rowGroupIndex=s++),Q(t.pivotIndex)&&t.pivot&&(t.pivotIndex=o++),i.push(t)}),this.applyColumnState({state:i,applyOrder:!0},e)}getColumnStateFromColDef(e){let t=(e,t)=>null!=e?e:null!=t?t:null,i=e.getColDef(),s=t(i.sort,i.initialSort),o=t(i.sortIndex,i.initialSortIndex),r=t(i.hide,i.initialHide),n=t(i.pinned,i.initialPinned),l=t(i.width,i.initialWidth),a=t(i.flex,i.initialFlex),h=t(i.rowGroupIndex,i.initialRowGroupIndex),d=t(i.rowGroup,i.initialRowGroup);null==h&&(null==d||!1==d)&&(h=null,d=null);let u=t(i.pivotIndex,i.initialPivotIndex),c=t(i.pivot,i.initialPivot);null==u&&(null==c||!1==c)&&(u=null,c=null);let p=t(i.aggFunc,i.initialAggFunc);return{colId:e.getColId(),sort:s,sortIndex:o,hide:r,pinned:n,width:l,flex:a,rowGroup:d,rowGroupIndex:h,pivot:c,pivotIndex:u,aggFunc:p}}applyColumnState(e,t){if(X(this.primaryColumns))return!1;if(e&&e.state&&!e.state.forEach)return console.warn("AG Grid: 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."),!1;let i=(i,s,o)=>{let r=this.compareColumnStatesAndDispatchEvents(t);this.autoGroupsNeedBuilding=!0;let n=s.slice(),l={},a={},h=[],d=[],u=0,c=this.rowGroupColumns.slice(),p=this.pivotColumns.slice();i.forEach(i=>{let s=i.colId||"";if(s.startsWith(tM)){h.push(i),d.push(i);return}let r=o(s);r?(this.syncColumnWithStateItem(r,i,e.defaultState,l,a,!1,t),te(n,r)):(d.push(i),u+=1)});let g=i=>this.syncColumnWithStateItem(i,null,e.defaultState,l,a,!1,t);n.forEach(g);let m=(e,t,i,s)=>{let o=e[i.getId()],r=e[s.getId()],n=null!=o,l=null!=r;if(n&&l)return o-r;if(n)return -1;if(l)return 1;let a=t.indexOf(i),h=t.indexOf(s),d=a>=0;return d&&h>=0?a-h:d?-1:1};this.rowGroupColumns.sort(m.bind(this,l,c)),this.pivotColumns.sort(m.bind(this,a,p)),this.updateGridColumns();let C=this.groupAutoColumns?this.groupAutoColumns.slice():[];return h.forEach(i=>
16{let s=this.getAutoColumn(i.colId);te(C,s),this.syncColumnWithStateItem(s,i,e.defaultState,null,null,!0,t)}),C.forEach(g),this.applyOrderAfterApplyState(e),this.updateDisplayedColumns(t),this.dispatchEverythingChanged(t),r(),{unmatchedAndAutoStates:d,unmatchedCount:u}};this.columnAnimationService.start();let{unmatchedAndAutoStates:s,unmatchedCount:o}=i(e.state||[],this.primaryColumns||[],e=>this.getPrimaryColumn(e));return(s.length>0||q(e.defaultState))&&(o=i(s,this.secondaryColumns||[],e=>this.getSecondaryColumn(e)).unmatchedCount),this.columnAnimationService.finish(),0===o}applyOrderAfterApplyState(e){if(!e.applyOrder||!e.state)return;let t=[],i={};e.state.forEach(e=>{if(!e.colId||i[e.colId])return;let s=this.gridColumnsMap[e.colId];s&&(t.push(s),i[e.colId]=!0)});let s=0;if(this.gridColumns.forEach(e=>{let o=e.getColId();null==i[o]&&(o.startsWith(tM)?ts(t,e,s++):t.push(e))}),t=this.placeLockedColumns(t),!this.doesMovePassMarryChildren(t)){console.warn("AG Grid: Applying column order broke a group where columns should be married together. Applying new order has been discarded.");return}this.gridColumns=t}compareColumnStatesAndDispatchEvents(e){let t={rowGroupColumns:this.rowGroupColumns.slice(),pivotColumns:this.pivotColumns.slice(),valueColumns:this.valueColumns.slice()},i=this.getColumnState(),s={};return i.forEach(e=>{s[e.colId]=e}),()=>{let o=this.getPrimaryAndSecondaryAndAutoColumns(),r=(t,i,s,o)=>{if(e4(i.map(o),s.map(o)))return;let r=new Set(i);s.forEach(e=>{r.delete(e)||r.add(e)});let n=[...r],l={type:t,columns:n,column:1===n.length?n[0]:null,source:e};this.eventService.dispatchEvent(l)},n=e=>{let t=[];return o.forEach(i=>{let o=s[i.getColId()];o&&e(o,i)&&t.push(i)}),t},l=e=>e.getColId();r(tP.EVENT_COLUMN_ROW_GROUP_CHANGED,t.rowGroupColumns,this.rowGroupColumns,l),r(tP.EVENT_COLUMN_PIVOT_CHANGED,t.pivotColumns,this.pivotColumns,l);let a=n((e,t)=>{let i=null!=e.aggFunc,s=i!=t.isValueActive(),o=i&&e.aggFunc!=t.getAggFunc();return s||o});a.length>0&&this.dispatchColumnChangedEvent(tP.EVENT_COLUMN_VALUE_CHANGED,a,e),this.dispatchColumnResizedEvent(n((e,t)=>e.width!=t.getActualWidth()),!0,e),this.dispatchColumnPinnedEvent(n((e,t)=>e.pinned!=t.getPinned()),e),this.dispatchColumnVisibleEvent(n((e,t)=>e.hide==t.isVisible()),e);let h=n((e,t)=>e.sort!=t.getSort()||e.sortIndex!=t.getSortIndex());h.length>0&&this.sortController.dispatchSortChangedEvents(e,h),this.normaliseColumnMovedEventForColumnState(i,e)}}getCommonValue(e,t){if(!e||0==e.length)return;let i=t(e[0]);for(let s=1;s<e.length;s++)if(i!==t(e[s]))return;return i}normaliseColumnMovedEventForColumnState(e,t){let i=this.getColumnState(),s={};i.forEach(e=>s[e.colId]=e);let o={};e.forEach(e=>{s[e.colId]&&(o[e.colId]=!0)});let r=e.filter(e=>o[e.colId]),n=i.filter(e=>o[e.colId]),l=[];n.forEach((e,t)=>{let i=r&&r[t];if(i&&i.colId!==e.colId){let e=this.getGridColumn(i.colId);e&&l.push(e)}}),l.length&&this.dispatchColumnMovedEvent({movedColumns:l,source:t,finished:!0})}syncColumnWithStateItem(e,t,i,s,o,r,n){var l;if(!e)return;let a=(e,s)=>{let o={value1:void 0,value2:void 0},r=!1;return t&&(void 0!==t[e]&&(o.value1=t[e],r=!0),q(s)&&void 0!==t[s]&&(o.value2=t[s],r=!0)),!r&&i&&(void 0!==i[e]&&(o.value1=i[e]),q(s)&&void 0!==i[s]&&(o.value2=i[s])),o},h=a("hide").value1;void 0!==h&&e.setVisible(!h,n);let d=a("pinned").value1;void 0!==d&&e.setPinned(d);let u=null!=(l=e.getColDef().minWidth)?l:this.environment.getMinColWidth(),c=a("flex").value1;if(void 0!==c&&e.setFlex(c),null==c){let t=a("width").value1;null!=t&&null!=u&&t>=u&&e.setActualWidth(t,n)}let p=a("sort").value1;void 0!==p&&("desc"===p||"asc"===p?e.setSort(p,n):e.setSort(void 0,n));let g=a("sortIndex").value1;if(void 0!==g&&e.setSortIndex(g),r||!e.isPrimary())return;let m=a("aggFunc").value1;void 0!==m&&("string"==typeof m?(e.setAggFunc(m),e.isValueActive()||(e.setValueActive(!0,n),this.valueColumns.push(e))):(q(m)&&console.warn("AG Grid: 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."),e.isValueActive()&&(e.setValueActive(!1,n),te(this.valueColumns,e))));let{value1:C,value2:v}=a("rowGroup","rowGroupIndex");(void 0!==C||void 0!==v)&&("number"==typeof v||C?(e.isRowGroupActive()||(e.setRowGroupActive(!0,n),this.rowGroupColumns.push(e)),s&&"number"==typeof v&&(s[e.getId()]=v)):e.isRowGroupActive()&&(e.setRowGroupActive(!1,n),te(this.rowGroupColumns,e)));let{value1:f,value2:w}=a("pivot","pivotIndex");(void 0!==f||void 0!==w)&&("number"==typeof w||f?(e.isPivotActive()||(e.setPivotActive(!0,n),this.pivotColumns.push(e)),o&&"number"==typeof w&&(o[e.getId()]=w)):e.isPivotActive()&&(e.setPivotActive(!1,n),te(this.pivotColumns,e)))}getGridColumns(e){return this.getColumns(e,this.getGridColumn.bind(this))}getColumns(e,t){let i=[];
16return e&&e.forEach(e=>{let s=t(e);s&&i.push(s)}),i}getColumnWithValidation(e){if(null==e)return null;let t=this.getGridColumn(e);return t||console.warn("AG Grid: could not find column "+e),t}getPrimaryColumn(e){return this.primaryColumns?this.getColumn(e,this.primaryColumns,this.primaryColumnsMap):null}getGridColumn(e){return this.getColumn(e,this.gridColumns,this.gridColumnsMap)}lookupGridColumn(e){return this.gridColumnsMap[e]}getSecondaryColumn(e){return this.secondaryColumns?this.getColumn(e,this.secondaryColumns,this.secondaryColumnsMap):null}getColumn(e,t,i){if(!e||!i)return null;if("string"==typeof e&&i[e])return i[e];for(let i=0;i<t.length;i++)if(this.columnsMatch(t[i],e))return t[i];return this.getAutoColumn(e)}getSourceColumnsForGroupColumn(e){let t=e.getColDef().showRowGroup;if(!t)return null;if(!0===t)return this.rowGroupColumns.slice(0);let i=this.getPrimaryColumn(t);return i?[i]:null}getAutoColumn(e){return!this.groupAutoColumns||!q(this.groupAutoColumns)||Q(this.groupAutoColumns)?null:this.groupAutoColumns.find(t=>this.columnsMatch(t,e))||null}columnsMatch(e,t){let i=e.getColDef()===t,s=e.getColId()==t;return e===t||i||s}getDisplayNameForColumn(e,t,i=!1){if(!e)return null;let s=this.getHeaderName(e.getColDef(),e,null,null,t);return i?this.wrapHeaderNameWithAggFunc(e,s):s}getDisplayNameForProvidedColumnGroup(e,t,i){let s=t?t.getColGroupDef():null;return s?this.getHeaderName(s,null,e,t,i):null}getDisplayNameForColumnGroup(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),t)}getHeaderName(e,t,i,s,o){let r=e.headerValueGetter;if(r){let n=this.gos.addGridCommonParams({colDef:e,column:t,columnGroup:i,providedColumnGroup:s,location:o});if("function"==typeof r)return r(n);if("string"==typeof r)return this.expressionService.evaluate(r,n);console.warn("AG Grid: headerValueGetter must be a function or a string")}else if(null!=e.headerName)return e.headerName;else if(e.field)return tH(e.field);return""}wrapHeaderNameWithAggFunc(e,t){let i;if(this.gos.get("suppressAggFuncInHeader"))return t;let s=e.getColDef().pivotValueColumn,o=q(s),r=null;if(o){let o=this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&1===this.valueColumns.length,n=void 0!==e.getColDef().pivotTotalColumnIds;if(o&&!n)return t;r=s?s.getAggFunc():null,i=!0}else{let t=e.isValueActive(),s=this.pivotMode||!this.isRowGroupEmpty();t&&s?(r=e.getAggFunc(),i=!0):i=!1}if(i){let e="string"==typeof r?r:"func",i=this.localeService.getLocaleTextFunc()(e,e);return`${i}(${t})`}return t}getColumnGroup(e,t){if(!e)return null;if(e instanceof tA)return e;let i=this.getAllDisplayedTrees(),s="number"==typeof t,o=null;return tY(i,!1,i=>{i instanceof tA&&(s?e===i.getGroupId()&&t===i.getPartId():e===i.getGroupId())&&(o=i)}),o}isReady(){return this.ready}extractValueColumns(e,t){this.valueColumns=this.extractColumns(t,this.valueColumns,(t,i)=>t.setValueActive(i,e),()=>void 0,()=>void 0,e=>{let t=e.aggFunc;return null===t||""===t?null:void 0!==t?!!t:void 0},e=>null!=e.initialAggFunc&&""!=e.initialAggFunc),this.valueColumns.forEach(e=>{let t=e.getColDef();null!=t.aggFunc&&""!=t.aggFunc?e.setAggFunc(t.aggFunc):e.getAggFunc()||e.setAggFunc(t.initialAggFunc)})}extractRowGroupColumns(e,t){this.rowGroupColumns=this.extractColumns(t,this.rowGroupColumns,(t,i)=>t.setRowGroupActive(i,e),e=>e.rowGroupIndex,e=>e.initialRowGroupIndex,e=>e.rowGroup,e=>e.initialRowGroup)}extractColumns(e=[],t=[],i,s,o,r,n){let l=[],a=[];(this.primaryColumns||[]).forEach(i=>{let h=0>e.indexOf(i),d=i.getColDef(),u=ee(r(d)),c=ee(n(d)),p=Z(s(d)),g=Z(o(d));(void 0!==u?u:void 0!==p?null!==p&&p>=0:h?void 0!==c?c:void 0!==g&&null!=g&&g>=0:t.indexOf(i)>=0)&&((h?null!=p||null!=g:null!=p)?l.push(i):a.push(i))});let h=e=>{let t=s(e.getColDef()),i=o(e.getColDef());return null!=t?t:i};l.sort((e,t)=>{let i=h(e),s=h(t);return i===s?0:i<s?-1:1});let d=[].concat(l);return t.forEach(e=>{a.indexOf(e)>=0&&d.push(e)}),a.forEach(e=>{0>d.indexOf(e)&&d.push(e)}),t.forEach(e=>{0>d.indexOf(e)&&i(e,!1)}),d.forEach(e=>{0>t.indexOf(e)&&i(e,!0)}),d}extractPivotColumns(e,t){this.pivotColumns=this.extractColumns(t,this.pivotColumns,(t,i)=>t.setPivotActive(i,e),e=>e.pivotIndex,e=>e.initialPivotIndex,e=>e.pivot,e=>e.initialPivot)}resetColumnGroupState(e){if(!this.primaryColumnTree)return;let t=[];tT(null,this.primaryColumnTree,e=>{if(e instanceof eZ){let i=e.getColGroupDef(),s={groupId:e.getGroupId(),open:i?i.openByDefault:void 0};t.push(s)}}),this.setColumnGroupState(t,e)}getColumnGroupState(){let e=[];return tT(null,this.gridBalancedTree,t=>{t instanceof eZ&&e.push({groupId:t.getGroupId(),open:t.isExpanded()})}),e}setColumnGroupState(e,t){if(!this.gridBalancedTree)return;this.columnAnimationService.start();let i=[];
16if(e.forEach(e=>{let t=e.groupId,s=e.open,o=this.getProvidedColumnGroup(t);o&&o.isExpanded()!==s&&(this.logger.log("columnGroupOpened("+o.getGroupId()+","+s+")"),o.setExpanded(s),i.push(o))}),this.updateGroupsAndDisplayedColumns(t),this.setFirstRightAndLastLeftPinned(t),i.length){let e={type:tP.EVENT_COLUMN_GROUP_OPENED,columnGroup:1===eZ.length?i[0]:void 0,columnGroups:i};this.eventService.dispatchEvent(e)}this.columnAnimationService.finish()}setColumnGroupOpened(e,t,i){let s;s=e instanceof eZ?e.getId():e||"",this.setColumnGroupState([{groupId:s,open:t}],i)}getProvidedColumnGroup(e){"string"!=typeof e&&console.error("AG Grid: group key must be a string");let t=null;return tT(null,this.gridBalancedTree,i=>{i instanceof eZ&&i.getId()===e&&(t=i)}),t}calculateColumnsForDisplay(){return this.pivotMode&&Q(this.secondaryColumns)?this.gridColumns.filter(e=>{let t=this.groupAutoColumns&&tn(this.groupAutoColumns,e),i=this.valueColumns&&tn(this.valueColumns,e);return t||i}):this.gridColumns.filter(e=>this.groupAutoColumns&&tn(this.groupAutoColumns,e)||e.isVisible())}checkColSpanActiveInCols(e){let t=!1;return e.forEach(e=>{q(e.getColDef().colSpan)&&(t=!0)}),t}calculateColumnsForGroupDisplay(){this.groupDisplayColumns=[],this.groupDisplayColumnsMap={},this.gridColumns.forEach(e=>{let t=e.getColDef(),i=t.showRowGroup;t&&q(i)&&(this.groupDisplayColumns.push(e),"string"==typeof i?this.groupDisplayColumnsMap[i]=e:!0===i&&this.getRowGroupColumns().forEach(t=>{this.groupDisplayColumnsMap[t.getId()]=e}))})}getGroupDisplayColumns(){return this.groupDisplayColumns}getGroupDisplayColumnForGroup(e){return this.groupDisplayColumnsMap[e]}updateDisplayedColumns(e){let t=this.calculateColumnsForDisplay();this.buildDisplayedTrees(t),this.updateGroupsAndDisplayedColumns(e),this.setFirstRightAndLastLeftPinned(e)}isSecondaryColumnsPresent(){return q(this.secondaryColumns)}setSecondaryColumns(e,t){if(this.gridColumns&&!(!e&&Q(this.secondaryColumns))){if(e){this.processSecondaryColumnDefinitions(e);let i=this.columnFactory.createColumnTree(e,!1,this.secondaryBalancedTree||this.previousSecondaryColumns||void 0,t);this.destroyOldColumns(this.secondaryBalancedTree,i.columnTree),this.secondaryBalancedTree=i.columnTree,this.secondaryHeaderRowCount=i.treeDept+1,this.secondaryColumns=this.getColumnsFromTree(this.secondaryBalancedTree),this.secondaryColumnsMap={},this.secondaryColumns.forEach(e=>this.secondaryColumnsMap[e.getId()]=e),this.previousSecondaryColumns=null}else this.previousSecondaryColumns=this.secondaryBalancedTree,this.secondaryBalancedTree=null,this.secondaryHeaderRowCount=-1,this.secondaryColumns=null,this.secondaryColumnsMap={};this.updateGridColumns(),this.updateDisplayedColumns(t)}}processSecondaryColumnDefinitions(e){let t=this.gos.get("processPivotResultColDef"),i=this.gos.get("processPivotResultColGroupDef");if(!t&&!i)return;let s=e=>{e.forEach(e=>{q(e.children)?(i&&i(e),s(e.children)):t&&t(e)})};e&&s(e)}updateGridColumns(){let e;let t=this.gridBalancedTree;if(this.gridColsArePrimary?this.lastPrimaryOrder=this.gridColumns:this.lastSecondaryOrder=this.gridColumns,this.createGroupAutoColumnsIfNeeded()){let e=tW(this.groupAutoColumns.map(e=>[e,!0]));this.lastPrimaryOrder&&(this.lastPrimaryOrder=this.lastPrimaryOrder.filter(t=>!e.has(t)),this.lastPrimaryOrder=[...this.groupAutoColumns,...this.lastPrimaryOrder]),this.lastSecondaryOrder&&(this.lastSecondaryOrder=this.lastSecondaryOrder.filter(t=>!e.has(t)),this.lastSecondaryOrder=[...this.groupAutoColumns,...this.lastSecondaryOrder])}if(this.secondaryColumns&&this.secondaryBalancedTree){let t=this.secondaryColumns.some(e=>void 0!==this.gridColumnsMap[e.getColId()]);this.gridBalancedTree=this.secondaryBalancedTree.slice(),this.gridHeaderRowCount=this.secondaryHeaderRowCount,this.gridColumns=this.secondaryColumns.slice(),this.gridColsArePrimary=!1,t&&(e=this.lastSecondaryOrder)}else this.primaryColumns&&(this.gridBalancedTree=this.primaryColumnTree.slice(),this.gridHeaderRowCount=this.primaryHeaderRowCount,this.gridColumns=this.primaryColumns.slice(),this.gridColsArePrimary=!0,e=this.lastPrimaryOrder);if(this.addAutoGroupToGridColumns(),this.orderGridColsLike(e),this.gridColumns=this.placeLockedColumns(this.gridColumns),this.calculateColumnsForGroupDisplay(),this.refreshQuickFilterColumns(),this.clearDisplayedAndViewportColumns(),this.colSpanActive=this.checkColSpanActiveInCols(this.gridColumns),this.gridColumnsMap={}
16,this.gridColumns.forEach(e=>this.gridColumnsMap[e.getId()]=e),this.setAutoHeightActive(),!e4(t,this.gridBalancedTree)){let e={type:tP.EVENT_GRID_COLUMNS_CHANGED};this.eventService.dispatchEvent(e)}}setAutoHeightActive(){this.autoHeightActive=this.gridColumns.filter(e=>e.isAutoHeight()).length>0,this.autoHeightActive&&(this.autoHeightActiveAtLeastOnce=!0,this.gos.isRowModelType("clientSide")||this.gos.isRowModelType("serverSide")||ew("autoHeight columns only work with Client Side Row Model and Server Side Row Model."))}orderGridColsLike(e){if(Q(e))return;let t=tW(e.map((e,t)=>[e,t])),i=!0;if(this.gridColumns.forEach(e=>{t.has(e)&&(i=!1)}),i)return;let s=tW(this.gridColumns.map(e=>[e,!0])),o=e.filter(e=>s.has(e)),r=tW(o.map(e=>[e,!0])),n=this.gridColumns.filter(e=>!r.has(e)),l=o.slice();n.forEach(e=>{let t=e.getOriginalParent();if(!t){l.push(e);return}let i=[];for(;!i.length&&t;)t.getLeafColumns().forEach(e=>{let t=l.indexOf(e)>=0,s=0>i.indexOf(e);t&&s&&i.push(e)}),t=t.getOriginalParent();if(!i.length){l.push(e);return}let s=Math.max(...i.map(e=>l.indexOf(e)));ts(l,e,s+1)}),this.gridColumns=l}isPrimaryColumnGroupsPresent(){return this.primaryHeaderRowCount>1}refreshQuickFilterColumns(){var e;let t=null!=(e=this.isPivotMode()&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")?this.secondaryColumns:this.primaryColumns)?e:[];this.groupAutoColumns&&(t=t.concat(this.groupAutoColumns)),this.columnsForQuickFilter=this.gos.get("includeHiddenColumnsInQuickFilter")?t:t.filter(e=>e.isVisible()||e.isRowGroupActive())}placeLockedColumns(e){let t=[],i=[],s=[];return e.forEach(e=>{let o=e.getColDef().lockPosition;"right"===o?s.push(e):"left"===o||!0===o?t.push(e):i.push(e)}),[...t,...i,...s]}addAutoGroupToGridColumns(){if(Q(this.groupAutoColumns)){this.destroyOldColumns(this.groupAutoColsBalancedTree),this.groupAutoColsBalancedTree=null;return}this.gridColumns=this.groupAutoColumns?this.groupAutoColumns.concat(this.gridColumns):this.gridColumns;let e=this.columnFactory.createForAutoGroups(this.groupAutoColumns,this.gridBalancedTree);this.destroyOldColumns(this.groupAutoColsBalancedTree,e),this.groupAutoColsBalancedTree=e,this.gridBalancedTree=e.concat(this.gridBalancedTree)}clearDisplayedAndViewportColumns(){this.viewportRowLeft={},this.viewportRowRight={},this.viewportRowCenter={},this.displayedColumnsLeft=[],this.displayedColumnsRight=[],this.displayedColumnsCenter=[],this.displayedColumns=[],this.ariaOrderColumns=[],this.viewportColumns=[],this.headerViewportColumns=[],this.viewportColumnsHash=""}updateGroupsAndDisplayedColumns(e){this.updateOpenClosedVisibilityInColumnGroups(),this.deriveDisplayedColumns(e),this.refreshFlexedColumns(),this.extractViewport(),this.updateBodyWidths();let t={type:tP.EVENT_DISPLAYED_COLUMNS_CHANGED};this.eventService.dispatchEvent(t)}deriveDisplayedColumns(e){this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeLeft,this.displayedColumnsLeft),this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeCentre,this.displayedColumnsCenter),this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeRight,this.displayedColumnsRight),this.joinColumnsAriaOrder(),this.joinDisplayedColumns(),this.setLeftValues(e),this.displayedAutoHeightCols=this.displayedColumns.filter(e=>e.isAutoHeight())}isAutoRowHeightActive(){return this.autoHeightActive}wasAutoRowHeightEverActive(){return this.autoHeightActiveAtLeastOnce}joinColumnsAriaOrder(){let e=this.getAllGridColumns(),t=[],i=[],s=[];for(let o of e){let e=o.getPinned();e?!0===e||"left"===e?t.push(o):s.push(o):i.push(o)}this.ariaOrderColumns=t.concat(i).concat(s)}joinDisplayedColumns(){this.gos.get("enableRtl")?this.displayedColumns=this.displayedColumnsRight.concat(this.displayedColumnsCenter).concat(this.displayedColumnsLeft):this.displayedColumns=this.displayedColumnsLeft.concat(this.displayedColumnsCenter).concat(this.displayedColumnsRight)}setLeftValues(e){this.setLeftValuesOfColumns(e),this.setLeftValuesOfGroups()}setLeftValuesOfColumns(e){if(!this.primaryColumns)return;let t=this.getPrimaryAndSecondaryAndAutoColumns().slice(0),i=this.gos.get("enableRtl");[this.displayedColumnsLeft,this.displayedColumnsRight,this.displayedColumnsCenter].forEach(s=>{if(i){let t=this.getWidthOfColsInList(s);
16s.forEach(i=>{t-=i.getActualWidth(),i.setLeft(t,e)})}else{let t=0;s.forEach(i=>{i.setLeft(t,e),t+=i.getActualWidth()})}tt(t,s)}),t.forEach(t=>{t.setLeft(null,e)})}setLeftValuesOfGroups(){[this.displayedTreeLeft,this.displayedTreeRight,this.displayedTreeCentre].forEach(e=>{e.forEach(e=>{e instanceof tA&&e.checkLeft()})})}derivedDisplayedColumnsFromDisplayedTree(e,t){t.length=0,tY(e,!0,e=>{e instanceof eX&&t.push(e)})}isColumnVirtualisationSuppressed(){return this.suppressColumnVirtualisation||0===this.viewportRight}extractViewportColumns(){this.isColumnVirtualisationSuppressed()?(this.viewportColumnsCenter=this.displayedColumnsCenter,this.headerViewportColumnsCenter=this.displayedColumnsCenter):(this.viewportColumnsCenter=this.displayedColumnsCenter.filter(this.isColumnInRowViewport.bind(this)),this.headerViewportColumnsCenter=this.displayedColumnsCenter.filter(this.isColumnInHeaderViewport.bind(this))),this.viewportColumns=this.viewportColumnsCenter.concat(this.displayedColumnsLeft).concat(this.displayedColumnsRight),this.headerViewportColumns=this.headerViewportColumnsCenter.concat(this.displayedColumnsLeft).concat(this.displayedColumnsRight)}getVirtualHeaderGroupRow(e,t){let i;switch(e){case"left":i=this.viewportRowLeft[t];break;case"right":i=this.viewportRowRight[t];break;default:i=this.viewportRowCenter[t]}return Q(i)&&(i=[]),i}calculateHeaderRows(){this.viewportRowLeft={},this.viewportRowRight={},this.viewportRowCenter={};let e={};this.headerViewportColumns.forEach(t=>e[t.getId()]=!0);let t=(i,s,o)=>{let r=!1;for(let n=0;n<i.length;n++){let l=i[n],a=!1;if(l instanceof eX)a=!0===e[l.getId()];else{let e=l.getDisplayedChildren();e&&(a=t(e,s,o+1))}a&&(r=!0,s[o]||(s[o]=[]),s[o].push(l))}return r};t(this.displayedTreeLeft,this.viewportRowLeft,0),t(this.displayedTreeRight,this.viewportRowRight,0),t(this.displayedTreeCentre,this.viewportRowCenter,0)}extractViewport(){this.extractViewportColumns();let e=this.viewportColumns.map(e=>`${e.getId()}-${e.getPinned()||"normal"}`).join("#"),t=this.viewportColumnsHash!==e;return t&&(this.viewportColumnsHash=e,this.calculateHeaderRows()),t}refreshFlexedColumns(e={}){var t;let i;let s=e.source?e.source:"flex";if(null!=e.viewportWidth&&(this.flexViewportWidth=e.viewportWidth),!this.flexViewportWidth)return[];let o=-1;if(e.resizingCols){let t=new Set(e.resizingCols),i=this.displayedColumnsCenter;for(let e=i.length-1;e>=0;e--)if(t.has(i[e])){o=e;break}}let r=0,n=[],l=0,a=0;for(let e=0;e<this.displayedColumnsCenter.length;e++)this.displayedColumnsCenter[e].getFlex()&&e>o?(n.push(this.displayedColumnsCenter[e]),a+=this.displayedColumnsCenter[e].getFlex(),l+=null!=(t=this.displayedColumnsCenter[e].getMinWidth())?t:0):r+=this.displayedColumnsCenter[e].getActualWidth();if(!n.length)return[];let h=[];r+l>this.flexViewportWidth&&(n.forEach(e=>{var t;return e.setActualWidth(null!=(t=e.getMinWidth())?t:0,s)}),h=n,n=[]);let d=[];e:for(;;){let e=(i=this.flexViewportWidth-r)/a;for(let t=0;t<n.length;t++){let i=n[t],o=e*i.getFlex(),l=0,u=i.getMinWidth(),c=i.getMaxWidth();if(q(u)&&o<u?l=u:q(c)&&o>c&&(l=c),l){i.setActualWidth(l,s),e9(n,i),a-=i.getFlex(),h.push(i),r+=i.getActualWidth();continue e}d[t]=Math.round(o)}break}let u=i;return n.forEach((e,t)=>{e.setActualWidth(Math.min(d[t],u),s),h.push(e),u-=d[t]}),e.skipSetLeft||this.setLeftValues(s),e.updateBodyWidths&&this.updateBodyWidths(),e.fireResizedEvent&&this.dispatchColumnResizedEvent(h,!0,s,n),n}sizeColumnsToFit(e,t="sizeColumnsToFit",i,s){var o,r,n,l,a;if(this.shouldQueueResizeOperations){this.resizeOperationQueue.push(()=>this.sizeColumnsToFit(e,t,i,s));return}let h={};s&&(null==(o=null==s?void 0:s.columnLimits)||o.forEach(e=>{var{key:t}=e,i=U(e,["key"]);h["string"==typeof t?t:t.getColId()]=i}));let d=this.getAllDisplayedColumns(),u=e===this.getWidthOfColsInList(d);if(e<=0||!d.length||u)return;let c=[],p=[];d.forEach(e=>{!0===e.getColDef().suppressSizeToFit?p.push(e):c.push(e)});let g=c.slice(0),m=!1,C=e=>{te(c,e),p.push(e)};for(c.forEach(e=>{var i,o;e.resetActualWidth(t);let r=null==h?void 0:h[e.getId()],n=null!=(i=null==r?void 0:r.minWidth)?i:null==s?void 0:s.defaultMinWidth,l=null!=(o=null==r?void 0:r.maxWidth)?o:null==s?void 0:s.defaultMaxWidth,a=e.getActualWidth();"number"==typeof n&&a<n?e.setActualWidth(n,t,!0):"number"==typeof l&&a>l&&e.setActualWidth(l,t,!0)});!m;){m=!0;let i=e-this.getWidthOfColsInList(p);
16if(i<=0)c.forEach(e=>{var i,o;let r=null!=(o=null==(i=null==h?void 0:h[e.getId()])?void 0:i.minWidth)?o:null==s?void 0:s.defaultMinWidth;if("number"==typeof r){e.setActualWidth(r,t,!0);return}e.setMinimum(t)});else{let e=i/this.getWidthOfColsInList(c),o=i;for(let i=c.length-1;i>=0;i--){let d=c[i],u=null==h?void 0:h[d.getId()],p=null!=(r=null==u?void 0:u.minWidth)?r:null==s?void 0:s.defaultMinWidth,g=null!=(n=null==u?void 0:u.maxWidth)?n:null==s?void 0:s.defaultMaxWidth,v=null!=(l=d.getMinWidth())?l:0,f=null!=(a=d.getMaxWidth())?a:Number.MAX_VALUE,w="number"==typeof p&&p>v?p:d.getMinWidth(),E="number"==typeof g&&g<f?g:d.getMaxWidth(),S=Math.round(d.getActualWidth()*e);q(w)&&S<w?(S=w,C(d),m=!1):q(E)&&S>E?(S=E,C(d),m=!1):0===i&&(S=o),d.setActualWidth(S,t,!0),o-=S}}}g.forEach(e=>{e.fireColumnWidthChangedEvent(t)}),this.setLeftValues(t),this.updateBodyWidths(),i||this.dispatchColumnResizedEvent(g,!0,t)}buildDisplayedTrees(e){let t=[],i=[],s=[];e.forEach(e=>{switch(e.getPinned()){case"left":t.push(e);break;case"right":i.push(e);break;default:s.push(e)}});let o=new tL;this.displayedTreeLeft=this.displayedGroupCreator.createDisplayedGroups(t,o,"left",this.displayedTreeLeft),this.displayedTreeRight=this.displayedGroupCreator.createDisplayedGroups(i,o,"right",this.displayedTreeRight),this.displayedTreeCentre=this.displayedGroupCreator.createDisplayedGroups(s,o,null,this.displayedTreeCentre),this.updateDisplayedMap()}updateDisplayedMap(){this.displayedColumnsAndGroupsMap={};let e=e=>{this.displayedColumnsAndGroupsMap[e.getUniqueId()]=e};tY(this.displayedTreeCentre,!1,e),tY(this.displayedTreeLeft,!1,e),tY(this.displayedTreeRight,!1,e)}isDisplayed(e){return this.displayedColumnsAndGroupsMap[e.getUniqueId()]===e}updateOpenClosedVisibilityInColumnGroups(){tY(this.getAllDisplayedTrees(),!1,e=>{e instanceof tA&&e.calculateDisplayedColumns()})}getGroupAutoColumns(){return this.groupAutoColumns}createGroupAutoColumnsIfNeeded(){let e=this.forceRecreateAutoGroups;if(this.forceRecreateAutoGroups=!1,!this.autoGroupsNeedBuilding)return!1;this.autoGroupsNeedBuilding=!1;let t=this.gos.isGroupUseEntireRow(this.pivotMode),i=this.pivotMode?this.gos.get("pivotSuppressAutoColumn"):this.isGroupSuppressAutoColumn();if(!(this.rowGroupColumns.length>0||this.gos.get("treeData"))||i||t)this.groupAutoColumns=null;else{let t=this.autoGroupColService.createAutoGroupColumns(this.rowGroupColumns);if(!this.autoColsEqual(t,this.groupAutoColumns)||e)return this.groupAutoColumns=t,!0}return!1}isGroupSuppressAutoColumn(){return"custom"===this.gos.get("groupDisplayType")||"custom"===this.gos.get("treeDataDisplayType")}autoColsEqual(e,t){return e4(e,t,(e,t)=>e.getColId()===t.getColId())}getWidthOfColsInList(e){return e.reduce((e,t)=>e+t.getActualWidth(),0)}getFirstDisplayedColumn(){let e=this.gos.get("enableRtl"),t=["getDisplayedLeftColumns","getDisplayedCenterColumns","getDisplayedRightColumns"];e&&t.reverse();for(let i=0;i<t.length;i++){let s=this[t[i]]();if(s.length)return e?e5(s):s[0]}return null}setColumnHeaderHeight(e,t){if(e.setAutoHeaderHeight(t)){let t={type:tP.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,column:e,columns:[e],source:"autosizeColumnHeaderHeight"};this.eventService.dispatchEvent(t)}}getColumnGroupHeaderRowHeight(){return this.isPivotMode()?this.getPivotGroupHeaderHeight():this.getGroupHeaderHeight()}getColumnHeaderRowHeight(){return Math.max(this.isPivotMode()?this.getPivotHeaderHeight():this.getHeaderHeight(),...this.getAllDisplayedColumns().filter(e=>e.isAutoHeaderHeight()).map(e=>e.getAutoHeaderHeight()||0))}getHeaderHeight(){var e;return null!=(e=this.gos.get("headerHeight"))?e:this.environment.getFromTheme(25,"headerHeight")}getFloatingFiltersHeight(){var e;return null!=(e=this.gos.get("floatingFiltersHeight"))?e:this.getHeaderHeight()}getGroupHeaderHeight(){var e;return null!=(e=this.gos.get("groupHeaderHeight"))?e:this.getHeaderHeight()}getPivotHeaderHeight(){var e;return null!=(e=this.gos.get("pivotHeaderHeight"))?e:this.getHeaderHeight()}getPivotGroupHeaderHeight(){var e;return null!=(e=this.gos.get("pivotGroupHeaderHeight"))?e:this.getGroupHeaderHeight()}queueResizeOperations(){this.shouldQueueResizeOperations=!0}processResizeOperations(){this.shouldQueueResizeOperations=!1,this.resizeOperation
16Queue.forEach(e=>e()),this.resizeOperationQueue=[]}resetColumnDefIntoColumn(e,t){let i=e.getUserProvidedColDef();if(!i)return!1;let s=this.columnFactory.addColumnDefaultAndTypes(i,e.getColId());return e.setColDef(s,i,t),!0}isColumnGroupingLocked(e){let t=this.gos.get("groupLockGroupColumns");return!!e.isRowGroupActive()&&0!==t&&(-1===t||t>this.rowGroupColumns.findIndex(t=>t.getColId()===e.getColId()))}generateColumnStateForRowGroupAndPivotIndexes(e,t){let i={},s=(e,t,s,o,r,n)=>{if(!t.length||!this.primaryColumns)return[];let l=Object.keys(e),a=new Set(l),h=new Set(l),d=new Set(t.map(e=>{let t=e.getColId();return h.delete(t),t}).concat(l)),u=[],c={},p=0;for(let e=0;e<this.primaryColumns.length;e++){let t=this.primaryColumns[e].getColId();d.has(t)&&(u.push(t),c[t]=p++)}let g=1e3,m=!1,C=0,v=t=>{let i=c[t];for(let t=C;t<i;t++){let i=u[t];h.has(i)&&(e[i][r]=g++,h.delete(i))}C=i};t.forEach(t=>{let l=t.getColId();if(a.has(l))v(l),e[l][r]=g++;else{let a=t.getColDef();(null===a[r]||void 0===a[r]&&null==a[n])&&(m||(a[s]||void 0===a[s]&&a[o]?v(l):(h.forEach(t=>{e[t][r]=g+c[t]}),g+=u.length,m=!0)),i[l]||(i[l]={colId:l}),i[l][r]=g++)}})};return s(e,this.rowGroupColumns,"rowGroup","initialRowGroup","rowGroupIndex","initialRowGroupIndex"),s(t,this.pivotColumns,"pivot","initialPivot","pivotIndex","initialPivotIndex"),Object.values(i)}onColumnsReady(){let e=this.gos.get("autoSizeStrategy");if(!e)return;let{type:t}=e;setTimeout(()=>{if("fitGridWidth"===t){let{columnLimits:t,defaultMinWidth:i,defaultMaxWidth:s}=e,o=null==t?void 0:t.map(({colId:e,minWidth:t,maxWidth:i})=>({key:e,minWidth:t,maxWidth:i}));this.ctrlsService.getGridBodyCtrl().sizeColumnsToFit({defaultMinWidth:i,defaultMaxWidth:s,columnLimits:o})}else"fitProvidedWidth"===t&&this.sizeColumnsToFit(e.width,"sizeColumnsToFit")})}onFirstDataRendered(){let e=this.gos.get("autoSizeStrategy");if((null==e?void 0:e.type)!=="fitCellContents")return;let{colIds:t,skipHeader:i}=e;setTimeout(()=>{t?this.autoSizeColumns({columns:t,skipHeader:i,source:"autosizeColumns"}):this.autoSizeAllColumns("autosizeColumns",i)})}};function t$(e){return"gridOptionsUpdated"===e?"gridOptionsChanged":e}function tY(e,t,i){if(e)for(let s=0;s<e.length;s++){let o=e[s];o instanceof tA&&tY(t?o.getDisplayedChildren():o.getChildren(),t,i),i(o)}}K([eB("expressionService")],tK.prototype,"expressionService",2),K([eB("columnFactory")],tK.prototype,"columnFactory",2),K([eB("displayedGroupCreator")],tK.prototype,"displayedGroupCreator",2),K([eB("ctrlsService")],tK.prototype,"ctrlsService",2),K([eB("autoWidthCalculator")],tK.prototype,"autoWidthCalculator",2),K([eB("columnAnimationService")],tK.prototype,"columnAnimationService",2),K([eB("autoGroupColService")],tK.prototype,"autoGroupColService",2),K([eB("valueCache")],tK.prototype,"valueCache",2),K([eB("animationFrameService")],tK.prototype,"animationFrameService",2),K([eB("sortController")],tK.prototype,"sortController",2),K([eB("columnDefFactory")],tK.prototype,"columnDefFactory",2),K([eW("aggFuncService")],tK.prototype,"aggFuncService",2),K([eV],tK.prototype,"init",1),K([eH],tK.prototype,"destroyColumns",1),K([$(0,ez("loggerFactory"))],tK.prototype,"setBeans",1),tK=K([ek("columnModel")],tK);var tj=class extends tR{createDisplayedGroups(e,t,i,s){let o=this.mapOldGroupsById(s),r=[],n=e;for(;n.length;){let e=n;n=[];let s=0,l=l=>{let a=s;s=l;let h=e[a],d=(h instanceof tA?h.getProvidedColumnGroup():h).getOriginalParent();if(null==d){for(let t=a;t<l;t++)r.push(e[t]);return}let u=this.createColumnGroup(d,t,o,i);for(let t=a;t<l;t++)u.addChild(e[t]);n.push(u)};for(let t=1;t<e.length;t++){let i=e[t],o=(i instanceof tA?i.getProvidedColumnGroup():i).getOriginalParent(),r=e[s];o!==(r instanceof tA?r.getProvidedColumnGroup():r).getOriginalParent()&&l(t)}s<e.length&&l(e.length)}return this.setupParentsIntoColumns(r,null),r}createColumnGroup(e,t,i,s){let o=e.getGroupId(),r=t.getInstanceIdForKey(o),n=i[tA.createUniqueId(o,r)];return n&&n.getProvidedColumnGroup()!==e&&(n=null),q(n)?n.reset():(n=new tA(e,o,r,s),this.context.createBean(n)),n}mapOldGroupsById(e){let t={},i=e=>{e.forEach(e=>{e instanceof tA&&(t[e.getUniqueId()]=e,i(e.getChildren()))})};return e&&i(e),t}
16setupParentsIntoColumns(e,t){e.forEach(e=>{e.setParent(t),e instanceof tA&&this.setupParentsIntoColumns(e.getChildren(),e)})}};tj=K([ek("displayedGroupCreator")],tj);var tq={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,excludeHiddenColumnsFromQuickFilter:!0,advancedFilterModel:!0,customChartThemes:!0,chartThemeOverrides:!0,enableChartToolPanelsButton:!0,suppressChartToolPanelsButton:!0,chartToolPanelsDef:!0,loadingCellRendererSelector:!0,localeText:!0,keepDetailRows:!0,keepDetailRowsCount:!0,detailRowHeight:!0,detailRowAutoHeight:!0,tabIndex:!0,valueCache:!0,valueCacheNeverExpires:!0,enableCellExpressions:!0,suppressParentsInRowNodes:!0,suppressTouch:!0,suppressAsyncEvents:!0,suppressBrowserResizeObserver:!0,suppressPropertyNamesCheck:!0,debug:!0,loadingOverlayComponent:!0,suppressLoadingOverlay:!0,noRowsOverlayComponent:!0,paginationPageSizeSelector:!0,paginateChildRows:!0,pivotPanelShow:!0,pivotSuppressAutoColumn:!0,suppressExpandablePivotGroups:!0,aggFuncs:!0,suppressAggFuncInHeader:!0,suppressAggAtRootLevel:!0,removePivotHeaderRowWhenSingleValueColumn:!0,allowShowChangeAfterFilter:!0,ensureDomOrder:!0,enableRtl:!0,suppressColumnVirtualisation:!0,suppressMaxRenderedRowRestriction:!0,suppressRowVirtualisation:!0,rowDragText:!0,suppressGroupMaintainValueType:!0,groupLockGroupColumns:!0,rowGroupPanelSuppressSort:!0,suppressGroupRowsSticky:!0,rowModelType:!0,cacheOverflowSize:!0,infiniteInitialRowCount:!0,serverSideInitialRowCount:!0,suppressServerSideInfiniteScroll:!0,maxBlocksInCache:!0,maxConcurrentDatasourceRequests:!0,blockLoadDebounceMillis:!0,serverSideOnlyRefreshFilteredGroups:!0,serverSidePivotResultFieldSeparator:!0,viewportRowModelPageSize:!0,viewportRowModelBufferSize:!0,debounceVerticalScrollbar:!0,suppressAnimationFrame:!0,suppressPreventDefaultOnMouseWheel:!0,scrollbarWidth:!0,icons:!0,suppressRowTransform:!0,gridId:!0,functionsPassive:!0,enableGroupEdit:!0,initialState:!0,processUnpinnedColumns:!0,createChartContainer:!0,getLocaleText:!0,getRowId:!0,reactiveCustomComponents:!0,columnMenu:!0},tQ=class{};tQ.STRING_PROPERTIES=["rowSelection","overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","colResizeDefault","tooltipTrigger","serverSidePivotResultFieldSeparator","columnMenu","tooltipShowMode","grandTotalRow"],tQ.OBJECT_PROPERTIES=["components","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultCsvExportParams","defaultExcelExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","popupParent","statusBar","sideBar","chartThemeOverrides","customChartThemes","chartToolPanelsDef","dataTypeDefinitions","advancedFilterModel","advancedFilterParent","advancedFilterBuilderParams","initialState","autoSizeStrategy"],tQ.ARRAY_PROPERTIES=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector"],tQ.NUMBER_PROPERTIES=["rowHeight","detailRowHeight","rowBuffer","headerHeight","groupHeaderHeight","groupLockGroupColumns","floatingFiltersHeight","pivotHeaderHeight","pivotGroupHeaderHeight","groupDefaultExpanded","pivotDefaultExpanded","viewportRowModelPageSize","viewportRowModelBufferSize","autoSizePadding","maxBlocksInCache","maxConcurrentDatasourceRequests","tooltipShowDelay","tooltipHideDelay","cacheOverflowSize","paginationPageSize","cacheBlockSize","infiniteInitialRowCount","serverSideInitialRowCount","scrollbarWidth","asyncTransactionWaitMillis","blockLoadDebounceMillis","keepDetailRowsCount","undoRedoCellEditingLimit","cellFlashDelay","cellFadeDelay","cellFlashDuration","cellFadeDuration","tabIndex","pivotMaxGeneratedColumns"],tQ.BOOLEAN_PROPERTIES=["suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellFocus","suppressHeaderFocus","suppressHorizontalScroll","groupSelectsChildren","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debug","enableBrowserTooltips","enableCellExpressions","groupIncludeTotalFooter","groupSuppressBlankHeader","suppressMenuHide","suppressRowDeselection","unSortIcon","suppressMultiSort","alwaysMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","skipHeaderOnAutoSize","suppressParentsInRowNodes","suppressColumnMoveAnimation","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","suppressAsyncEvents","allowContextMenuWithControlKey","suppressContextMenu","enableCellChangeFlash","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","alwaysAggregateAtRootLevel","suppressAggAtRootLevel","suppressFocusAfterRefresh","functionsPassive","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","suppressClickEdit","rowDragEntireRow","rowDragManaged","suppressRowDrag","suppressMoveWhenRowDragging","rowDragMultiRow","enableGroupEdit","embedFullWidthRows","suppressPaginationPanel","groupHideOpenParents","groupAllowUnbalanced","pagination","paginationAutoPageSize","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","purgeClosedRowNodes","cacheQuickFilter","includeHiddenColumnsInQuickFilter","excludeHiddenColumnsFromQuickFilter","ensureDomOrder","accentedSort","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","includeHiddenColumnsInAdvancedFilter","suppressMultiRangeSelection","enterMovesDown","enterMovesDownAfterEdit","enterNavigatesVerticallyAfterEdit","enterNavigatesVertically","suppressPropertyNamesCheck","rowMultiSelectWithClick","suppressRowHoverHighlight","suppressRowTransform","suppressClipboardPaste","suppressLastEmptyLineOnPaste","enableCharts","enableChartToolPanelsButton","suppressChartToolPanelsButton","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering","tooltipMouseTrack","tooltipInteraction","keepDetailRows","paginateChildRows","preventDefaultOnContextMenu","undoRedoCellEditing","allowDragFromColumnsToolPanel","pivotSuppressAutoColumn","suppressExpandablePivotGroups","debounceVerticalScrollbar","detailRowAutoHeight","serverSideFilterAllLevels","serverSideSortAllLevels","serverSideEnableClientSideSort","serverSideOnlyRefreshFilteredGroups","serverSideSortOnServer","serverSideFilterOnServer","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","maintainColumnOrder","groupMaintainOrder","columnHoverHighlight","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","suppressGroupRowsSticky","suppressCutToClipboard","suppressServerSideInfiniteScroll","rowGroupPanelSuppressSort","allowShowChangeAfterFilter","enableAdvancedFilter","masterDetail","treeData","suppressGroupMaintainValueType","reactiveCustomComponents","applyQuickFilterBeforePivotOrAgg","suppressServerSideFullWidthLoadingRow","suppressAdvancedFilterEval"],tQ.OTHER_PROPERTIES=["suppressStickyTotalRow"],tQ.FUNCTIONAL_PROPERTIES=["doesExternalFilterPass","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","fullWidthCellRenderer","loadingCellRenderer","loadingOverlayComponent","noRowsOverlayComponent","detailCellRenderer","quickFilterParser","quickFilterMatcher"],tQ.CALLBACK_PROPERTIES=["getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getContextMenuItems","getMainMenuItems","processRowPostCreate","processCellForClipboard","getGroupRowAgg","isFullWidthRow","
16sendToClipboard","navigateToNextHeader","tabToNextHeader","navigateToNextCell","tabToNextCell","processCellFromClipboard","getDocument","postProcessPopup","getChildCount","getDataPath","isRowMaster","postSortRows","processHeaderForClipboard","processUnpinnedColumns","processGroupHeaderForClipboard","paginationNumberFormatter","processDataFromClipboard","getServerSideGroupKey","isServerSideGroup","createChartContainer","getChartToolbarItems","fillOperation","isApplyServerSideTransaction","getServerSideGroupLevelParams","isServerSideGroupOpenByDefault","isGroupOpenByDefault","initialGroupOrderComparator","groupIncludeFooter","loadingCellRendererSelector","getRowId","groupAggFiltering","chartMenuItems","groupTotalRow"],tQ.FUNCTION_PROPERTIES=[...tQ.FUNCTIONAL_PROPERTIES,...tQ.CALLBACK_PROPERTIES],tQ.ALL_PROPERTIES=[...tQ.ARRAY_PROPERTIES,...tQ.OBJECT_PROPERTIES,...tQ.STRING_PROPERTIES,...tQ.NUMBER_PROPERTIES,...tQ.FUNCTION_PROPERTIES,...tQ.BOOLEAN_PROPERTIES,...tQ.OTHER_PROPERTIES];var tX=tQ,tJ=class e{static getCallbackForEvent(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}static getGridOptionKeys(){return this.ALL_PROPERTIES_AND_CALLBACKS}static combineAttributesAndGridOptions(t,i){"object"!=typeof t&&(t={});let s=B({},t);return e.getGridOptionKeys().forEach(t=>{let o=i[t];void 0!==o&&o!==e.VUE_OMITTED_PROPERTY&&(s[t]=o)}),s}static processOnChange(t,i,s){if(!t)return;let o={},r=!1;if(Object.keys(t).filter(t=>e.ALL_PROPERTIES_AND_CALLBACKS_SET.has(t)).forEach(e=>{o[e]=t[e],r=!0}),!r)return;i.__internalUpdateGridOptions(o,!0);let n={type:tP.EVENT_COMPONENT_STATE_CHANGED};ea(o,(e,t)=>{n[e]=t}),i.dispatchEvent(n)}};tJ.EVENTS=eo(tP),tJ.VUE_OMITTED_PROPERTY="AG-VUE-OMITTED-PROPERTY",tJ.EXCLUDED_INTERNAL_EVENTS=[tP.EVENT_SCROLLBAR_WIDTH_CHANGED,tP.EVENT_CHECKBOX_CHANGED,tP.EVENT_HEIGHT_SCALE_CHANGED,tP.EVENT_BODY_HEIGHT_CHANGED,tP.EVENT_COLUMN_CONTAINER_WIDTH_CHANGED,tP.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,tP.EVENT_SCROLL_VISIBILITY_CHANGED,tP.EVENT_COLUMN_HOVER_CHANGED,tP.EVENT_FLASH_CELLS,tP.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED,tP.EVENT_DISPLAYED_ROWS_CHANGED,tP.EVENT_LEFT_PINNED_WIDTH_CHANGED,tP.EVENT_RIGHT_PINNED_WIDTH_CHANGED,tP.EVENT_ROW_CONTAINER_HEIGHT_CHANGED,tP.EVENT_STORE_UPDATED,tP.EVENT_COLUMN_PANEL_ITEM_DRAG_START,tP.EVENT_COLUMN_PANEL_ITEM_DRAG_END,tP.EVENT_KEY_SHORTCUT_CHANGED_CELL_START,tP.EVENT_KEY_SHORTCUT_CHANGED_CELL_END,tP.EVENT_FULL_WIDTH_ROW_FOCUSED,tP.EVENT_HEADER_HEIGHT_CHANGED,tP.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,tP.EVENT_CELL_FOCUS_CLEARED,tP.EVENT_GRID_STYLES_CHANGED,tP.EVENT_FILTER_DESTROYED,tP.EVENT_ROW_DATA_UPDATE_STARTED,tP.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,tP.EVENT_DATA_TYPES_INFERRED,tP.EVENT_FIELD_VALUE_CHANGED,tP.EVENT_FIELD_PICKER_VALUE_SELECTED,tP.EVENT_SUPPRESS_COLUMN_MOVE_CHANGED,tP.EVENT_SUPPRESS_MENU_HIDE_CHANGED,tP.EVENT_SUPPRESS_FIELD_DOT_NOTATION,tP.EVENT_ROW_COUNT_READY,tP.EVENT_SIDE_BAR_UPDATED],tJ.PUBLIC_EVENTS=tJ.EVENTS.filter(e=>!tn(tJ.EXCLUDED_INTERNAL_EVENTS,e)),tJ.EVENT_CALLBACKS=tJ.EVENTS.map(e=>tJ.getCallbackForEvent(e)),tJ.BOOLEAN_PROPERTIES=tX.BOOLEAN_PROPERTIES,tJ.ALL_PROPERTIES=tX.ALL_PROPERTIES,tJ.ALL_PROPERTIES_AND_CALLBACKS=[...tJ.ALL_PROPERTIES,...tJ.EVENT_CALLBACKS],tJ.ALL_PROPERTIES_AND_CALLBACKS_SET=new Set(tJ.ALL_PROPERTIES_AND_CALLBACKS);var tZ=tJ,t0=class extends tR{constructor(){super(...arguments),this.componentsMappedByName={}}setupComponents(e){e&&e.forEach(e=>this.addComponent(e))}addComponent(e){let t=e.componentName.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase().toUpperCase();this.componentsMappedByName[t]=e.componentClass}getComponentClass(e){return this.componentsMappedByName[e]}};t0=K([ek("agStackComponentsRegistry")],t0);var t1={};function t2(e,t,i){null==i||"string"==typeof i&&""==i?t5(e,t):t3(e,t,i)}function t3(e,t,i){e.setAttribute(`aria-${t}`,i.toString())}function t5(e,t){e.removeAttribute(`aria-${t}`)}function t4(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function t6(e){return"asc"===e?"ascending":"desc"===e?"descending":"mixed"===e?"other":"none"}function t8(e){return parseInt(e.getAttribute("aria-level"),10)}function t7(e){return parseInt(e.getAttribute("aria-posinset"),10)}function t9(e){return e.getAttribute("aria-label")}function ie(e,t){t2(e,"label",t)}function it(e,t){t2(e,"labelledby",t)}function ii(e,t){t2(e,"describedby",t)}function is(e,t){t2(e,"live",t)}function io(e,t){t2(e,"atomic",t)}function ir(e,t){t2(e,"relevant",t)}function il(e,t){t2(e,"level",t)}function ia(e,t){t2(e,"disabled",t)}function ih(e,t){t2(e,"hidden",t)}function id(e,t){t2(e,"activedescendant",t)}function iu(e,t){t3(e,"expanded",t)}function ic(e){t5(e,"expanded")}function ip(e,t){t3(e,"setsize",t)}function ig(e,t){t3(e,"posinset",t)}function im(e,t){t3(e,"multiselectable",t)}function iC(e,t){t3(e,"rowcount",t)}function iv(e,t){t3(e,"rowindex",t)}function iw(e,t){t3(e,"colcount",t)}function iE(e,t){t3(e,"colindex",t)}function iS(e,t){t3(e,"colspan",t)}function iy(e,t){t3(e,"sort",t)}function iR(e){t5(e,"sort")}function iD(e,t){t2(e,"selected",t)}function iT(e,t){t3(e,"checked",void 0===t?"mixed":t)}function ib(e,t){t2(e,"controls",t.id),it(t,e.id)}function iA(e,t){return void 0===t?e("ariaIndeterminate","indeterminate"):!0===t?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}z(t1,{getAriaCheckboxStateName:()=>iA,getAriaLabel:()=>t9,getAriaLevel:()=>t8,getAriaPosInSet:()=>t7,getAriaSortState:()=>t6,removeAriaExpanded:()=>ic,removeAriaSort:()=>iR,setAriaActiveDescendant:()=>id,setAriaAtomic:()=>io,setAriaChecked:()=>iT,setAriaColCount:()=>iw,setAriaColIndex:()=>iE,setAriaColSpan:()=>
16iS,setAriaControls:()=>ib,setAriaDescribedBy:()=>ii,setAriaDisabled:()=>ia,setAriaExpanded:()=>iu,setAriaHidden:()=>ih,setAriaLabel:()=>ie,setAriaLabelledBy:()=>it,setAriaLevel:()=>il,setAriaLive:()=>is,setAriaMultiSelectable:()=>im,setAriaPosInSet:()=>ig,setAriaRelevant:()=>ir,setAriaRole:()=>t4,setAriaRowCount:()=>iC,setAriaRowIndex:()=>iv,setAriaSelected:()=>iD,setAriaSetSize:()=>ip,setAriaSort:()=>iy});var iP={};function iF(){return void 0===D&&(D=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),D}function iL(){if(void 0===T){if(iF()){let e=navigator.userAgent.match(/version\/(\d+)/i);e&&(T=null!=e[1]?parseFloat(e[1]):0)}else T=0}return T}function iM(){if(void 0===b){let e=window;b=!!e.chrome&&(!!e.chrome.webstore||!!e.chrome.runtime)||/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}return b}function iN(){return void 0===A&&(A=/(firefox)/i.test(navigator.userAgent)),A}function iI(){return void 0===P&&(P=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),P}function iG(){return void 0===F&&(F=/iPad|iPhone|iPod/.test(navigator.platform)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1),F}function iO(){return!iF()||iL()>=15}function ix(e){if(!e)return null;let t=e.tabIndex,i=e.getAttribute("tabIndex");return -1!==t||null!==i&&(""!==i||iN())?t.toString():null}function i_(){if(!document.body)return -1;let e=1e6,t=navigator.userAgent.toLowerCase().match(/firefox/)?6e6:1e9,i=document.createElement("div");for(document.body.appendChild(i);;){let s=2*e;if(i.style.height=s+"px",s>t||i.clientHeight!==s)break;e=s}return document.body.removeChild(i),e}function iV(){var e,t,i;return null!=(i=null==(e=document.body)?void 0:e.clientWidth)?i:window.innerHeight||(null==(t=document.documentElement)?void 0:t.clientWidth)||-1}function iH(){var e,t,i;return null!=(i=null==(e=document.body)?void 0:e.clientHeight)?i:window.innerHeight||(null==(t=document.documentElement)?void 0:t.clientHeight)||-1}function ik(){return null==M&&iB(),M}function iB(){let e=document.body,t=document.createElement("div");t.style.width=t.style.height="100px",t.style.opacity="0",t.style.overflow="scroll",t.style.msOverflowStyle="scrollbar",t.style.position="absolute",e.appendChild(t);let i=t.offsetWidth-t.clientWidth;0===i&&0===t.clientWidth&&(i=null),t.parentNode&&t.parentNode.removeChild(t),null!=i&&(M=i,L=0===i)}function iW(){return null==L&&iB(),L}z(iP,{browserSupportsPreventScroll:()=>iO,getBodyHeight:()=>iH,getBodyWidth:()=>iV,getMaxDivHeight:()=>i_,getSafariVersion:()=>iL,getScrollbarWidth:()=>ik,getTabIndex:()=>ix,isBrowserChrome:()=>iM,isBrowserFirefox:()=>iN,isBrowserSafari:()=>iF,isIOSUserAgent:()=>iG,isInvisibleScrollbar:()=>iW,isMacOsUserAgent:()=>iI});var iU={};z(iU,{dateToFormattedString:()=>i0,parseDateTimeFromString:()=>i1,serialiseDate:()=>iJ});var iz={};function iK(e,t){return e.toString().padStart(t,"0")}function i$(e,t){let i=[];for(let s=e;s<=t;s++)i.push(s);return i}function iY(e){return("string"==typeof e&&(e=parseInt(e,10)),"number"==typeof e)?Math.floor(e):null}function ij(e,t){let i="";for(let s=0;s<t;s++)i+=String.fromCharCode(255&e),e>>>=8;return i}function iq(e,t,i){return"number"!=typeof e?"":iQ(Math.round(100*e)/100,t,i)}function iQ(e,t,i){return"number"!=typeof e?"":e.toString().replace(".",i).replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1${t}`)}function iX(e){return null==e?null:e.reduce((e,t)=>e+t,0)}function iJ(e,t=!0,i="-"){if(!e)return null;let s=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(e=>iK(e,2)).join(i);return t&&(s+=" "+[e.getHours(),e.getMinutes(),e.getSeconds()].map(e=>iK(e,2)).join(":")),s}z(iz,{cleanNumber:()=>iY,createArrayOfNumbers:()=>i$,decToHex:()=>ij,formatNumberCommas:()=>iQ,formatNumberTwoDecimalPlacesAndCommas:()=>iq,padStartWidthZeros:()=>iK,sum:()=>iX});var iZ=e=>{if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd"}return"th"};function i0(e,t="YYYY-MM-DD"){let i=iK(e.getFullYear(),4),s=["January","February","March","April","May","June","July","August","September","October","November","December"],o=["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
16ay","Saturday"],r={YYYY:()=>i.slice(i.length-4,i.length),YY:()=>i.slice(i.length-2,i.length),Y:()=>`${e.getFullYear()}`,MMMM:()=>s[e.getMonth()],MMM:()=>s[e.getMonth()].slice(0,3),MM:()=>iK(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${iZ(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${iZ(e.getDate())}`,DD:()=>iK(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>o[e.getDay()],ddd:()=>o[e.getDay()].slice(0,3),dd:()=>o[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${iZ(e.getDay())}`,d:()=>`${e.getDay()}`},n=RegExp(Object.keys(r).join("|"),"g");return t.replace(n,e=>e in r?r[e]():e)}function i1(e){if(!e)return null;let[t,i]=e.split(" ");if(!t)return null;let s=t.split("-").map(e=>parseInt(e,10));if(3!==s.filter(e=>!isNaN(e)).length)return null;let[o,r,n]=s,l=new Date(o,r-1,n);if(l.getFullYear()!==o||l.getMonth()!==r-1||l.getDate()!==n)return null;if(!i||"00:00:00"===i)return l;let[a,h,d]=i.split(":").map(e=>parseInt(e,10));return a>=0&&a<24&&l.setHours(a),h>=0&&h<60&&l.setMinutes(h),d>=0&&d<60&&l.setSeconds(d),l}var i2={};function i3(e,t,i){let s=e.parentElement,o=s&&s.firstChild;for(;o;)t&&o.classList.toggle(t,o===e),i&&o.classList.toggle(i,o!==e),o=o.nextSibling}z(i2,{FOCUSABLE_EXCLUDE:()=>i4,FOCUSABLE_SELECTOR:()=>i5,addOrRemoveAttribute:()=>sF,addStylesToElement:()=>sf,bindCellRendererToHtmlElement:()=>sM,clearElement:()=>sd,copyNodeList:()=>sA,ensureDomOrder:()=>sm,formatSize:()=>sT,getAbsoluteHeight:()=>so,getAbsoluteWidth:()=>sr,getElementRectWithOffset:()=>sn,getElementSize:()=>st,getInnerHeight:()=>si,getInnerWidth:()=>ss,getScrollLeft:()=>sa,insertWithDomOrder:()=>sv,isElementChildOfClass:()=>se,isFocusableFormField:()=>i6,isHorizontalScrollShowing:()=>sw,isInDOM:()=>sc,isNodeOrElement:()=>sb,isRtlNegativeScroll:()=>sl,isVerticalScrollShowing:()=>sE,isVisible:()=>sp,iterateNamedNodeMap:()=>sP,loadTemplate:()=>sg,nodeListForEach:()=>sL,radioCssClass:()=>i3,removeFromParent:()=>su,setDisabled:()=>i9,setDisplayed:()=>i8,setDomChildOrder:()=>sC,setElementHeight:()=>sR,setElementWidth:()=>sS,setFixedHeight:()=>sD,setFixedWidth:()=>sy,setScrollLeft:()=>sh,setVisible:()=>i7});var i5="[tabindex], input, select, button, textarea, [href]",i4="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function i6(e){let t=Element.prototype.matches||Element.prototype.msMatchesSelector,i=t.call(e,"input, select, button, textarea"),s=t.call(e,i4),o=sp(e);return i&&!s&&o}function i8(e,t,i={}){let{skipAriaHidden:s}=i;e.classList.toggle("ag-hidden",!t),s||ih(e,!t)}function i7(e,t,i={}){let{skipAriaHidden:s}=i;e.classList.toggle("ag-invisible",!t),s||ih(e,!t)}function i9(e,t){let i="disabled",s=t?e=>e.setAttribute(i,""):e=>e.removeAttribute(i);s(e),sL(e.querySelectorAll("input"),e=>s(e))}function se(e,t,i){let s=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,"number"==typeof i){if(++s>i)break}else if(e===i)break}return!1}function st(e){let{height:t,width:i,borderTopWidth:s,borderRightWidth:o,borderBottomWidth:r,borderLeftWidth:n,paddingTop:l,paddingRight:a,paddingBottom:h,paddingLeft:d,marginTop:u,marginRight:c,marginBottom:p,marginLeft:g,boxSizing:m}=window.getComputedStyle(e);return{height:parseFloat(t||"0"),width:parseFloat(i||"0"),borderTopWidth:parseFloat(s||"0"),borderRightWidth:parseFloat(o||"0"),borderBottomWidth:parseFloat(r||"0"),borderLeftWidth:parseFloat(n||"0"),paddingTop:parseFloat(l||"0"),paddingRight:parseFloat(a||"0"),paddingBottom:parseFloat(h||"0"),paddingLeft:parseFloat(d||"0"),marginTop:parseFloat(u||"0"),marginRight:parseFloat(c||"0"),marginBottom:parseFloat(p||"0"),marginLeft:parseFloat(g||"0"),boxSizing:m}}function si(e){let t=st(e);return"border-box"===t.boxSizing?t.height-t.paddingTop-t.paddingBottom:t.height}function ss(e){let t=st(e);return"border-box"===t.boxSizing?t.width-t.paddingLeft-t.paddingRight:t.width}function so(e){let t=st(e),i=t.marginBottom+t.marginTop;return Math.ceil(e.offsetHeight+i)}function sr(e){let t=st(e),i=t.marginLeft+t.marginRight;return Math.ceil(e.offsetWidth+i)}function sn(e){let t=e.getBoundingClientRect(),{borderTopWidth:i,borderLeftWidth:s,borderRightWidth:o,borderBottomWidth:r}=st(e);
16return{top:t.top+(i||0),left:t.left+(s||0),right:t.right+(o||0),bottom:t.bottom+(r||0)}}function sl(){if("boolean"==typeof N)return N;let e=document.createElement("div");return e.style.direction="rtl",e.style.width="1px",e.style.height="1px",e.style.position="fixed",e.style.top="0px",e.style.overflow="hidden",e.dir="rtl",e.innerHTML=`<div style="width: 2px">
17            <span style="display: inline-block; width: 1px"></span>
18            <span style="display: inline-block; width: 1px"></span>
19        </div>`,document.body.appendChild(e),e.scrollLeft=1,N=0===Math.floor(e.scrollLeft),document.body.removeChild(e),N}function sa(e,t){let i=e.scrollLeft;return t&&(i=Math.abs(i),iM()&&!sl()&&(i=e.scrollWidth-e.clientWidth-i)),i}function sh(e,t,i){i&&(sl()?t*=-1:(iF()||iM())&&(t=e.scrollWidth-e.clientWidth-t)),e.scrollLeft=t}function sd(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}function su(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function sc(e){return!!e.offsetParent}function sp(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!sc(e)||"visible"!==window.getComputedStyle(e).visibility)}function sg(e){let t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function sm(e,t,i){(!i||i.nextSibling!==t)&&(i?i.nextSibling?e.insertBefore(t,i.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.insertAdjacentElement("afterbegin",t))}function sC(e,t){for(let i=0;i<t.length;i++){let s=t[i],o=e.children[i];o!==s&&e.insertBefore(s,o)}}function sv(e,t,i){i?i.insertAdjacentElement("afterend",t):e.firstChild?e.insertAdjacentElement("afterbegin",t):e.appendChild(t)}function sf(e,t){if(t)for(let[i,s]of Object.entries(t)){if(!i||!i.length||null==s)continue;let t=tk(i),o=s.toString(),r=o.replace(/\s*!important/g,""),n=r.length!=o.length?"important":void 0;e.style.setProperty(t,r,n)}}function sw(e){return e.clientWidth<e.scrollWidth}function sE(e){return e.clientHeight<e.scrollHeight}function sS(e,t){"flex"===t?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):sy(e,t)}function sy(e,t){t=sT(t),e.style.width=t.toString(),e.style.maxWidth=t.toString(),e.style.minWidth=t.toString()}function sR(e,t){"flex"===t?(e.style.removeProperty("height"),e.style.removeProperty("minHeight"),e.style.removeProperty("maxHeight"),e.style.flex="1 1 auto"):sD(e,t)}function sD(e,t){t=sT(t),e.style.height=t.toString(),e.style.maxHeight=t.toString(),e.style.minHeight=t.toString()}function sT(e){return"number"==typeof e?`${e}px`:e}function sb(e){return e instanceof Node||e instanceof HTMLElement}function sA(e){if(null==e)return[];let t=[];return sL(e,e=>t.push(e)),t}function sP(e,t){if(e)for(let i=0;i<e.length;i++){let s=e[i];t(s.name,s.value)}}function sF(e,t,i){null==i?e.removeAttribute(t):e.setAttribute(t,i.toString())}function sL(e,t){if(null!=e)for(let i=0;i<e.length;i++)t(e[i])}function sM(e,t){e.then(e=>{let i=e.getGui();null!=i&&("object"==typeof i?t.appendChild(i):t.innerHTML=i)})}var sN={};function sI(e,t,i){let s={},o=e.filter(e=>!t.some(t=>t===e));return o.length>0&&o.forEach(e=>s[e]=sG(e,i).values),s}function sG(e,t,i,s){let o=t.map((t,i)=>({value:t,relevance:function(e,t){let i=e.replace(/\s/g,""),s=t.replace(/\s/g,""),o=0,r=-1;for(let e=0;e<i.length;e++){let t=s.indexOf(i[e],r+1);-1!==t&&(o+=100-100*(r=t)/1e4*100)}return o}(e.toLowerCase(),t.toLocaleLowerCase()),idx:i}));if(o.sort((e,t)=>t.relevance-e.relevance),i&&(o=o.filter(e=>0!==e.relevance)),o.length>0&&s&&s>0){let e=o[0].relevance*s;o=o.filter(t=>e-t.relevance<0)}let r=[],n=[];for(let e of o)r.push(e.value),n.push(e.idx);return{values:r,indices:n}}z(sN,{fuzzyCheckStrings:()=>sI,fuzzySuggestions:()=>sG});var sO={};z(sO,{createIcon:()=>s_,createIconNoSpan:()=>sV,iconNameClassMap:()=>sx});var sx={columnGroupOpened:"expanded",columnGroupClosed:"contracted",columnSelectClosed:"tree-closed",columnSelectOpen:"tree-open",columnSelectIndeterminate:"tree-indeterminate",columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",groupContracted:"tree-closed",groupExpanded:"tree-open",setFilterGroupClosed:"tree-closed",setFilterGroupOpen:"tree-open",setFilterGroupIndeterminate:"tree-indeterminate",chart:"chart",close:"cross",cancel:"cancel",check:"tick",first:"first",previous:"previous",next:"next",last:"last",linked:"linked",unlinked:"unlinked",colorPicker:"color-picker",groupLoading:"loading",menu:"menu",menuAlt:"menu-alt",filter:"filter",columns:"columns",maximize:"maximize",minimize:"minimize",menuPin:"pin",menuValue:"aggregation",menuAddRowGroup:"group",menuRemoveRowGroup:"group",clipboardCopy:"copy",clipboardCut:"cut",clipboardPaste:"paste",pivotPanel:"pivot",rowGroupPanel:"group",valuePanel:"aggregation",columnDrag:"grip",rowDrag:"grip",save:"save",csvExport:"csv",excelExport:"excel",smallDown:"small-down",smallLeft:"small-left",smallRight:"small-right",smallUp:"small-up",sortAscending:"asc",sortDescending:"desc",sortUnSort:"none",advancedFilterBuilder:"group",advancedFilterBuilderDrag:"grip",advancedFilterBuilderInvalid:"not-allowed",advancedFilterBuilderMoveUp:"up",advancedFilterBuilderMoveDown:"down",advancedFilterBuilderAdd:"plus",advancedFilterBuilderRemove:"minus",chartsMenuEdit:"chart",chartsMenuAdvancedSettings:"settings",chartsMenuAdd:"plus"};function s_(e,t,i){let s=sV(e,t,i);if(s){let{className:e}=s;if("string"==typeof e&&e.indexOf("ag-icon")>-1||"object"==typeof e&&e["ag-icon"])return s}let o=document.createElement("span");return o.appendChild(s),o}function sV(e,t,i,s){let o=null,r=i&&i.getColDef().icons;
19if(r&&(o=r[e]),t&&!o){let i=t.get("icons");i&&(o=i[e])}if(o){let e;if("function"==typeof o)e=o();else if("string"==typeof o)e=o;else throw Error("icon from grid options needs to be a string or a function");if("string"==typeof e)return sg(e);if(sb(e))return e;console.warn("AG Grid: iconRenderer should return back a string or a dom object")}else{let t=document.createElement("span"),i=sx[e];return i||(s?i=e:(console.warn(`AG Grid: Did not find icon ${e}`),i="")),t.setAttribute("class",`ag-icon ag-icon-${i}`),t.setAttribute("unselectable","on"),t4(t,"presentation"),t}}var sH={};z(sH,{isDeleteKey:()=>sK,isEventFromPrintableCharacter:()=>sB,isUserSuppressingHeaderKeyboardEvent:()=>sU,isUserSuppressingKeyboardEvent:()=>sW,normaliseQwertyAzerty:()=>sz});var sk=class{};function sB(e){return!e.altKey&&!e.ctrlKey&&!e.metaKey&&1===e.key.length}function sW(e,t,i,s,o){let r=s?s.getColDef().suppressKeyboardEvent:void 0;if(!r)return!1;let n=e.addGridCommonParams({event:t,editing:o,column:s,node:i,data:i.data,colDef:s.getColDef()});return!!(r&&r(n))}function sU(e,t,i,s){let o=s.getDefinition(),r=o&&o.suppressHeaderKeyboardEvent;return!!q(r)&&!!r(e.addGridCommonParams({colDef:o,column:s,headerRowIndex:i,event:t}))}function sz(e){let t;let{keyCode:i}=e;switch(i){case 65:t=sk.A;break;case 67:t=sk.C;break;case 86:t=sk.V;break;case 68:t=sk.D;break;case 90:t=sk.Z;break;case 89:t=sk.Y;break;default:t=e.code}return t}function sK(e,t=!1){return e===sk.DELETE||!t&&e===sk.BACKSPACE&&iI()}sk.BACKSPACE="Backspace",sk.TAB="Tab",sk.ENTER="Enter",sk.ESCAPE="Escape",sk.SPACE=" ",sk.LEFT="ArrowLeft",sk.UP="ArrowUp",sk.RIGHT="ArrowRight",sk.DOWN="ArrowDown",sk.DELETE="Delete",sk.F2="F2",sk.PAGE_UP="PageUp",sk.PAGE_DOWN="PageDown",sk.PAGE_HOME="Home",sk.PAGE_END="End",sk.A="KeyA",sk.C="KeyC",sk.D="KeyD",sk.V="KeyV",sk.X="KeyX",sk.Y="KeyY",sk.Z="KeyZ";var s$={};function sY(e,t,i){return 0!==i&&Math.max(Math.abs(e.clientX-t.clientX),Math.abs(e.clientY-t.clientY))<=i}z(s$,{areEventsNear:()=>sY});var sj={};function sq(e,t){if(!e)return!1;let i=(e,i)=>{let s=t[e.id],o=t[i.id],r=void 0!==s,n=void 0!==o;return r&&n?s-o:r||n?r?1:-1:e.__objectId-i.__objectId},s=!1;for(let t=0;t<e.length-1;t++)if(i(e[t],e[t+1])>0){s=!0;break}return!!s&&(e.sort(i),!0)}z(sj,{sortRowNodesByOrder:()=>sq});var sQ={};function sX(e){let t=new Set;return e.forEach(e=>t.add(e)),t}z(sQ,{convertToSet:()=>sX});var sJ=B(B(B(B(B(B(B(B(B(B(B(B(B(B(B(B(B(B({},t1),e2),iP),iU),i2),e1),eC),sN),Y),sO),sH),tB),s$),iz),en),sj),sQ),tI),sZ=class{constructor(e=0,t=1){this.nextValue=e,this.step=t}next(){let e=this.nextValue;return this.nextValue+=this.step,e}peek(){return this.nextValue}skip(e){this.nextValue+=e}},s0=((r=s0||{})[r.IN_PROGRESS=0]="IN_PROGRESS",r[r.RESOLVED=1]="RESOLVED",r),s1=class e{constructor(e){this.status=0,this.resolution=null,this.waiters=[],e(e=>this.onDone(e),e=>this.onReject(e))}static all(t){return new e(e=>{let i=t.length,s=Array(i);t.forEach((t,o)=>{t.then(t=>{s[o]=t,0==--i&&e(s)})})})}static resolve(t=null){return new e(e=>e(t))}then(t){return new e(e=>{1===this.status?e(t(this.resolution)):this.waiters.push(i=>e(t(i)))})}resolveNow(e,t){return 1===this.status?t(this.resolution):e}onDone(e){this.status=1,this.resolution=e,this.waiters.forEach(t=>t(e))}onReject(e){console.warn("TBI")}},s2=class{constructor(){this.timestamp=new Date().getTime()}print(e){let t=new Date().getTime()-this.timestamp;console.info(`${e} = ${t}`),this.timestamp=new Date().getTime()}},s3=class{constructor(e){this.cssClassStates={},this.getGui=e}addCssClass(e){let t=(e||"").split(" ");if(t.length>1){t.forEach(e=>this.addCssClass(e));return}if(!0!==this.cssClassStates[e]&&e.length){let t=this.getGui();t&&t.classList.add(e),this.cssClassStates[e]=!0}}removeCssClass(e){let t=(e||"").split(" ");if(t.length>1){t.forEach(e=>this.removeCssClass(e));return}if(!1!==this.cssClassStates[e]&&e.length){let t=this.getGui();t&&t.classList.remove(e),this.cssClassStates[e]=!1}}containsCssClass(e){let t=this.getGui();return!!t&&t.classList.contains(e)}addOrRemoveCssClass(e,t){if(e){if(e.indexOf(" ")>=0){let i=(e||"").split(" ");if(i.length>
191){i.forEach(e=>this.addOrRemoveCssClass(e,t));return}}if(this.cssClassStates[e]!==t&&e.length){let i=this.getGui();i&&i.classList.toggle(e,t),this.cssClassStates[e]=t}}}},s5=class e extends tR{constructor(e,t,i,s){super(),this.parentComp=e,this.tooltipShowDelayOverride=t,this.tooltipHideDelayOverride=i,this.shouldDisplayTooltip=s,this.SHOW_QUICK_TOOLTIP_DIFF=1e3,this.FADE_OUT_TOOLTIP_TIMEOUT=1e3,this.INTERACTIVE_HIDE_DELAY=100,this.interactionEnabled=!1,this.isInteractingWithTooltip=!1,this.state=0,this.tooltipInstanceCount=0,this.tooltipMouseTrack=!1}postConstruct(){this.gos.get("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gos.get("tooltipMouseTrack");let e=this.parentComp.getGui();0===this.tooltipTrigger&&(this.addManagedListener(e,"mouseenter",this.onMouseEnter.bind(this)),this.addManagedListener(e,"mouseleave",this.onMouseLeave.bind(this))),1===this.tooltipTrigger&&(this.addManagedListener(e,"focusin",this.onFocusIn.bind(this)),this.addManagedListener(e,"focusout",this.onFocusOut.bind(this))),this.addManagedListener(e,"mousemove",this.onMouseMove.bind(this)),this.interactionEnabled||(this.addManagedListener(e,"mousedown",this.onMouseDown.bind(this)),this.addManagedListener(e,"keydown",this.onKeyDown.bind(this)))}getGridOptionsTooltipDelay(e){let t=this.gos.get(e);return t<0&&ew(`${e} should not be lower than 0`),Math.max(200,t)}getTooltipDelay(e){var t,i;return"show"===e?null!=(t=this.tooltipShowDelayOverride)?t:this.getGridOptionsTooltipDelay("tooltipShowDelay"):null!=(i=this.tooltipHideDelayOverride)?i:this.getGridOptionsTooltipDelay("tooltipHideDelay")}destroy(){this.setToDoNothing(),super.destroy()}getTooltipTrigger(){let e=this.gos.get("tooltipTrigger");return e&&"hover"!==e?1:0}onMouseEnter(t){this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),iG()||(e.isLocked?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(t)},this.INTERACTIVE_HIDE_DELAY):this.prepareToShowTooltip(t))}onMouseMove(e){this.lastMouseEvent&&(this.lastMouseEvent=e),this.tooltipMouseTrack&&2===this.state&&this.tooltipComp&&this.positionTooltip()}onMouseDown(){this.setToDoNothing()}onMouseLeave(){this.interactionEnabled?this.lockService():this.setToDoNothing()}onFocusIn(){this.prepareToShowTooltip()}onFocusOut(e){var t;let i=e.relatedTarget,s=this.parentComp.getGui(),o=null==(t=this.tooltipComp)?void 0:t.getGui();this.isInteractingWithTooltip||s.contains(i)||this.interactionEnabled&&(null==o?void 0:o.contains(i))||this.setToDoNothing()}onKeyDown(){this.setToDoNothing()}prepareToShowTooltip(t){if(0!=this.state||e.isLocked)return;let i=0;t&&(i=this.isLastTooltipHiddenRecently()?200:this.getTooltipDelay("show")),this.lastMouseEvent=t||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),i),this.state=1}isLastTooltipHiddenRecently(){return new Date().getTime()-e.lastTooltipHideTime<this.SHOW_QUICK_TOOLTIP_DIFF}setToDoNothing(){2===this.state&&this.hideTooltip(),this.onBodyScrollEventCallback&&(this.onBodyScrollEventCallback(),this.onBodyScrollEventCallback=void 0),this.onColumnMovedEventCallback&&(this.onColumnMovedEventCallback(),this.onColumnMovedEventCallback=void 0),this.clearTimeouts(),this.state=0,this.lastMouseEvent=null}showTooltip(){let e=B({},this.parentComp.getTooltipParams());if(!q(e.value)||this.shouldDisplayTooltip&&!this.shouldDisplayTooltip()){this.setToDoNothing();return}this.state=2,this.tooltipInstanceCount++;let t=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);this.userComponentFactory.getTooltipCompDetails(e).newAgStackInstance().then(t)}hideTooltip(t){if(!t&&this.isInteractingWithTooltip)return;this.tooltipComp&&(this.destroyTooltipComp(),e.lastTooltipHideTime=new Date().getTime());let i={type:tP.EVENT_TOOLTIP_HIDE,parentGui:this.parentComp.getGui()};this.eventService.dispatchEvent(i),this.state=0}newTooltipComponentCallback(e,t){if(2!==this.state||this.tooltipInstanceCount!==e){this.getContext().destroyBean(t);return}let i=t.getGui();this.tooltipComp=t,i.classList.contains("ag-tooltip")||i.classList.add("ag-tooltip-custom"),0===this.tooltipTrigger&&i.classList.add("ag-tooltip-animate"),this.interactionEnabled&&i.classList.add("ag-tooltip-interactive");let s=this.localeService.getLocaleTextFunc(),o=this.popupService.addPopup({eChild:i,ariaLabel:s("ariaLabelTooltip","Tooltip")});o&&(this.tooltipPopupDestroyFunc=o.hideFunc),this.positionTooltip(),1===this.tooltipTrigger&&(this.onBodyScrollEventCallback=this.addManagedListener(this.eventService,tP.EVENT_BODY_SCROLL,this.setToDoNothing.bind(this)),this.onColumnMovedEventCallback=this.addManagedListener(this.eventService,tP.EVENT_COLUMN_MOVED,this.setToDoNothing.bind(this))),this.interactionEnabled&&(0===this.tooltipTrigger?(this.tooltipMouseEnterListener=this.addManagedListener(i,"mouseenter",this.onTooltipMouseEnter.bind(this))||null,this.tooltipMouseLeaveListener=this.addManagedListener(i,"mouseleave",this.onTooltipMouseLeave.bind(this))||null):(this.tooltipFocusInListener=this.addManagedListener(i,"focu
19sin",this.onTooltipFocusIn.bind(this))||null,this.tooltipFocusOutListener=this.addManagedListener(i,"focusout",this.onTooltipFocusOut.bind(this))||null));let r={type:tP.EVENT_TOOLTIP_SHOW,tooltipGui:i,parentGui:this.parentComp.getGui()};this.eventService.dispatchEvent(r),this.startHideTimeout()}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService()}onTooltipMouseLeave(){this.isInteractingWithTooltip=!1,this.lockService()}onTooltipFocusIn(){this.isInteractingWithTooltip=!0}onTooltipFocusOut(e){var t;let i=this.parentComp.getGui(),s=null==(t=this.tooltipComp)?void 0:t.getGui(),o=e.relatedTarget;null!=s&&s.contains(o)||(this.isInteractingWithTooltip=!1,i.contains(o)?this.startHideTimeout():this.hideTooltip())}positionTooltip(){let e={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?this.popupService.positionPopupUnderMouseEvent(W(B({},e),{mouseEvent:this.lastMouseEvent})):this.popupService.positionPopupByComponent(W(B({},e),{eventSource:this.parentComp.getGui(),position:"under",keepWithinBounds:!0,nudgeY:5}))}destroyTooltipComp(){this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");let e=this.tooltipPopupDestroyFunc,t=this.tooltipComp,i=0===this.tooltipTrigger?this.FADE_OUT_TOOLTIP_TIMEOUT:0;window.setTimeout(()=>{e(),this.getContext().destroyBean(t)},i),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}clearTooltipListeners(){[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener].forEach(e=>{e&&e()}),this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}lockService(){e.isLocked=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},this.INTERACTIVE_HIDE_DELAY)}unlockService(){e.isLocked=!1,this.clearInteractiveTimeout()}startHideTimeout(){this.clearHideTimeout(),this.hideTooltipTimeoutId=window.setTimeout(this.hideTooltip.bind(this),this.getTooltipDelay("hide"))}clearShowTimeout(){this.showTooltipTimeoutId&&(window.clearTimeout(this.showTooltipTimeoutId),this.showTooltipTimeoutId=void 0)}clearHideTimeout(){this.hideTooltipTimeoutId&&(window.clearTimeout(this.hideTooltipTimeoutId),this.hideTooltipTimeoutId=void 0)}clearInteractiveTimeout(){this.interactiveTooltipTimeoutId&&(window.clearTimeout(this.interactiveTooltipTimeoutId),this.interactiveTooltipTimeoutId=void 0)}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout(),this.clearInteractiveTimeout()}};s5.isLocked=!1,K([eB("popupService")],s5.prototype,"popupService",2),K([eB("userComponentFactory")],s5.prototype,"userComponentFactory",2),K([eV],s5.prototype,"postConstruct",1);var s4=s5,s6=class extends tR{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}postConstruct(){this.refreshToolTip()}setBrowserTooltip(e){let t="title",i=this.ctrl.getGui();i&&(null!=e&&""!=e?i.setAttribute(t,e):i.removeAttribute(t))}updateTooltipText(){this.tooltip=this.ctrl.getTooltipValue()}createTooltipFeatureIfNeeded(){var e,t,i,s;null==this.tooltipManager&&(this.tooltipManager=this.createBean(new s4({getTooltipParams:()=>this.getTooltipParams(),getGui:()=>this.ctrl.getGui()},null==(t=(e=this.ctrl).getTooltipShowDelayOverride)?void 0:t.call(e),null==(s=(i=this.ctrl).getTooltipHideDelayOverride)?void 0:s.call(i),this.ctrl.shouldDisplayTooltip),this.beans.context))}refreshToolTip(){this.browserTooltips=this.beans.gos.get("enableBrowserTooltips"),this.updateTooltipText(),this.browserTooltips?(this.setBrowserTooltip(this.tooltip),this.tooltipManager&&(this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context))):(this.setBrowserTooltip(null),this.createTooltipFeatureIfNeeded())}getTooltipParams(){let e=this.ctrl,t=e.getColumn?e.getColumn():void 0,i=e.getColDef?e.getColDef():void 0,s=e.getRowNode?e.getRowNode():void 0;return{location:e.getLocation(),colDef:i,column:t,rowIndex:e.getRowIndex?e.getRowIndex():void 0,node:s,data:s?s.data:void 0,value:this.getTooltipText(),valueFormatted:e.getValueFormatted?e.getValueFormatted():void 0,hideTooltipCallback:()=>{var e;return null==(e=this.tooltipManager)?void 0:e.hideTooltip(!0)}}}getTooltipText(){return this.tooltip}destroy(){this.tooltipManager&&(this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context)),super.destroy()}};K([eB("beans")],s6.prototype,"beans",2),K([eV],s6.prototype,"postConstruct",1);var s8=new sZ,s7=class e extends tR{constructor(e){super(),this.displayed=!0,this.visible=!0,this.compId=s8.next(),this.cssClassManager=new s3(()=>this.eGui),e&&this.setTemplate(e)}preConstructOnComponent(){this.usingBrowserTooltips=this.gos.get("enableBrowserTooltips")}getCompId(){return this.compId}getTooltipParams(){return{value:this.tooltipText,location:"UNKNOWN"}}setTooltip(e){let{newTooltipText:t,showDelayOverride:i,hideDelayOverride:s,location:o,shouldDisplayTooltip:r}=e||{};this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),this.tooltipText!==t&&(this.tooltipText=t),null!=t&&(this.tooltipFeature=this.createBean(new s6({getTooltipValue:()=>this.tooltipText,getGui:()=>this.getGui(),getLocation:()=>null!=o?o:"UNKNOWN",getColDef:null==e?void 0:e.getColDef,getColumn:null==e?void 0:e.getColumn,getTooltipShowDelayOverride:null!=i?()=>i:void 0,getTooltipHideDelayOverride:null!=s?()=>s:void 0,shouldDisplayTooltip:r})))}
19createChildComponentsFromTags(e,t){sA(e.childNodes).forEach(i=>{if(!(i instanceof HTMLElement))return;let s=this.createComponentFromElement(i,e=>{e.getGui()&&this.copyAttributesFromNode(i,e.getGui())},t);if(s){if(s.addItems&&i.children.length){this.createChildComponentsFromTags(i,t);let e=Array.prototype.slice.call(i.children);s.addItems(e)}this.swapComponentForNode(s,e,i)}else i.childNodes&&this.createChildComponentsFromTags(i,t)})}createComponentFromElement(t,i,s){let o=t.nodeName,r=s?s[t.getAttribute("ref")]:void 0,n=this.agStackComponentsRegistry.getComponentClass(o);if(n){e.elementGettingCreated=t;let s=new n(r);return s.setParentComponent(this),this.createBean(s,null,i),s}return null}copyAttributesFromNode(e,t){sP(e.attributes,(e,i)=>t.setAttribute(e,i))}swapComponentForNode(e,t,i){let s=e.getGui();t.replaceChild(s,i),t.insertBefore(document.createComment(i.nodeName),s),this.addDestroyFunc(this.destroyBean.bind(this,e)),this.swapInComponentForQuerySelectors(e,i)}swapInComponentForQuerySelectors(e,t){let i=this;this.iterateOverQuerySelectors(s=>{i[s.attributeName]===t&&(i[s.attributeName]=e)})}iterateOverQuerySelectors(e){let t=Object.getPrototypeOf(this);for(;null!=t;){let i=t.__agComponentMetaData,s=eS(t.constructor);i&&i[s]&&i[s].querySelectors&&i[s].querySelectors.forEach(t=>e(t)),t=Object.getPrototypeOf(t)}}activateTabIndex(e){let t=this.gos.get("tabIndex");e||(e=[]),e.length||e.push(this.getGui()),e.forEach(e=>e.setAttribute("tabindex",t.toString()))}setTemplate(e,t){let i=sg(e);this.setTemplateFromElement(i,t)}setTemplateFromElement(e,t){this.eGui=e,this.eGui.__agComponent=this,this.wireQuerySelectors(),this.getContext()&&this.createChildComponentsFromTags(this.getGui(),t)}createChildComponentsPreConstruct(){this.getGui()&&this.createChildComponentsFromTags(this.getGui())}wireQuerySelectors(){if(!this.eGui)return;let e=this;this.iterateOverQuerySelectors(t=>{let i=i=>e[t.attributeName]=i;if(t.refSelector&&this.getAttribute("ref")===t.refSelector)i(this.eGui);else{let e=this.eGui.querySelector(t.querySelector);e&&i(e.__agComponent||e)}})}getGui(){return this.eGui}getFocusableElement(){return this.eGui}getAriaElement(){return this.getFocusableElement()}setParentComponent(e){this.parentComponent=e}getParentComponent(){return this.parentComponent}setGui(e){this.eGui=e}queryForHtmlElement(e){return this.eGui.querySelector(e)}queryForHtmlInputElement(e){return this.eGui.querySelector(e)}appendChild(e,t){null!=e&&(t||(t=this.eGui),sb(e)?t.appendChild(e):t.appendChild(e.getGui()))}isDisplayed(){return this.displayed}setVisible(e,t={}){if(e!==this.visible){this.visible=e;let{skipAriaHidden:i}=t;i7(this.eGui,e,{skipAriaHidden:i})}}setDisplayed(t,i={}){if(t!==this.displayed){this.displayed=t;let{skipAriaHidden:s}=i;i8(this.eGui,t,{skipAriaHidden:s});let o={type:e.EVENT_DISPLAYED_CHANGED,visible:this.displayed};this.dispatchEvent(o)}}destroy(){this.parentComponent&&(this.parentComponent=void 0),this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature));let e=this.eGui;e&&e.__agComponent&&(e.__agComponent=void 0),super.destroy()}addGuiEventListener(e,t,i){this.eGui.addEventListener(e,t,i),this.addDestroyFunc(()=>this.eGui.removeEventListener(e,t))}addCssClass(e){this.cssClassManager.addCssClass(e)}removeCssClass(e){this.cssClassManager.removeCssClass(e)}containsCssClass(e){return this.cssClassManager.containsCssClass(e)}addOrRemoveCssClass(e,t){this.cssClassManager.addOrRemoveCssClass(e,t)}getAttribute(e){let{eGui:t}=this;return t?t.getAttribute(e):null}getRefElement(e){return this.queryForHtmlElement(`[ref="${e}"]`)}};s7.EVENT_DISPLAYED_CHANGED="displayedChanged",K([eB("agStackComponentsRegistry")],s7.prototype,"agStackComponentsRegistry",2),K([e_],s7.prototype,"preConstructOnComponent",1),K([e_],s7.prototype,"createChildComponentsPreConstruct",1);var s9=s7;function oe(e){return oi.bind(this,e,void 0)}function ot(e){return oi.bind(this,`[ref=${e}]`,e)}function oi(e,t,i,s,o){if(null===e){console.error("AG Grid: QuerySelector selector should not be null");return}if("number"==typeof o){console.error("AG Grid: QuerySelector should be on an attribute");return}!function(e,t,i){var s;let o=(s=eS(e.constructor),e.__agComponentMetaData||(e.__agComponentMetaData={}),e.__agComponentMetaData[s]||(e.__agComponentMetaData[s]={}),e.__agComponentMetaData[s]);o[t]||(o[t]=[]),o[t].push(i)}(i,"querySelectors",{attributeName:s,querySelector:e,refSelector:t})}var os=class extends s9{constructor(){super(`
20            <div class="ag-floating-filter-input" role="presentation">
21                <ag-input-text-field ref="eFloatingFilterText"></ag-input-text-field>
22            </div>`)}destroy(){super.destroy()}init(e){this.params=e;let t=this.columnModel.getDisplayNameForColumn(e.column,"header",!0),i=this.localeService.getLocaleTextFunc();this.eFloatingFilterText.setDisabled(!0).setInputAriaLabel(`${t} ${i("ariaFilterInput","Filter Input")}`)}onParentModelChanged(e){if(null==e){this.eFloatingFilterText.setValue("");return}this.params.parentFilterInstance(t=>{if(t.getModelAsString){let i=t.getModelAsString(e);this.eFloatingFilterText.setValue(i)}})}onParamsUpdated(e){this.refresh(e)}refresh(e){this.init(e)}};K([ot("eFloatingFilterText")],os.prototype,"eFloatingFilterText",2),K([eB("columnModel")],os.prototype,"columnModel",2);var oo=class{constructor(e,t,i,s,o){this.alive=!0,this.context=e,this.eParent=s,t.getDateCompDetail
22s(i).newAgStackInstance().then(t=>{if(!this.alive){e.destroyBean(t);return}this.dateComp=t,t&&(s.appendChild(t.getGui()),t.afterGuiAttached&&t.afterGuiAttached(),this.tempValue&&t.setDate(this.tempValue),null!=this.disabled&&this.setDateCompDisabled(this.disabled),null==o||o(this))})}destroy(){this.alive=!1,this.dateComp=this.context.destroyBean(this.dateComp)}getDate(){return this.dateComp?this.dateComp.getDate():this.tempValue}setDate(e){this.dateComp?this.dateComp.setDate(e):this.tempValue=e}setDisabled(e){this.dateComp?this.setDateCompDisabled(e):this.disabled=e}setDisplayed(e){i8(this.eParent,e)}setInputPlaceholder(e){this.dateComp&&this.dateComp.setInputPlaceholder&&this.dateComp.setInputPlaceholder(e)}setInputAriaLabel(e){this.dateComp&&this.dateComp.setInputAriaLabel&&this.dateComp.setInputAriaLabel(e)}afterGuiAttached(e){this.dateComp&&"function"==typeof this.dateComp.afterGuiAttached&&this.dateComp.afterGuiAttached(e)}updateParams(e){var t,i;let s=!1;(null==(t=this.dateComp)?void 0:t.refresh)&&"function"==typeof this.dateComp.refresh&&null!==this.dateComp.refresh(e)&&(s=!0),!s&&(null==(i=this.dateComp)?void 0:i.onParamsUpdated)&&"function"==typeof this.dateComp.onParamsUpdated&&null!==this.dateComp.onParamsUpdated(e)&&ew("Custom date component method 'onParamsUpdated' is deprecated. Use 'refresh' instead.")}setDateCompDisabled(e){null!=this.dateComp&&null!=this.dateComp.setDisabled&&this.dateComp.setDisabled(e)}},or=class{constructor(){this.customFilterOptions={}}init(e,t){this.filterOptions=e.filterOptions||t,this.mapCustomOptions(),this.selectDefaultItem(e)}getFilterOptions(){return this.filterOptions}mapCustomOptions(){this.filterOptions&&this.filterOptions.forEach(e=>{if("string"!=typeof e){if(![["displayKey"],["displayName"],["predicate","test"]].every(t=>!!t.some(t=>null!=e[t])||(console.warn(`AG Grid: ignoring FilterOptionDef as it doesn't contain one of '${t}'`),!1))){this.filterOptions=this.filterOptions.filter(t=>t===e)||[];return}this.customFilterOptions[e.displayKey]=e}})}selectDefaultItem(e){if(e.defaultOption)this.defaultOption=e.defaultOption;else if(this.filterOptions.length>=1){let e=this.filterOptions[0];"string"==typeof e?this.defaultOption=e:e.displayKey?this.defaultOption=e.displayKey:console.warn("AG Grid: invalid FilterOptionDef supplied as it doesn't contain a 'displayKey'")}else console.warn("AG Grid: no filter options for filter")}getDefaultOption(){return this.defaultOption}getCustomOption(e){return this.customFilterOptions[e]}},on={applyFilter:"Apply",clearFilter:"Clear",resetFilter:"Reset",cancelFilter:"Cancel",textFilter:"Text Filter",numberFilter:"Number Filter",dateFilter:"Date Filter",setFilter:"Set Filter",filterOoo:"Filter...",empty:"Choose one",equals:"Equals",notEqual:"Does not equal",lessThan:"Less than",greaterThan:"Greater than",inRange:"Between",inRangeStart:"From",inRangeEnd:"To",lessThanOrEqual:"Less than or equal to",greaterThanOrEqual:"Greater than or equal to",contains:"Contains",notContains:"Does not contain",startsWith:"Begins with",endsWith:"Ends with",blank:"Blank",notBlank:"Not blank",before:"Before",after:"After",andCondition:"AND",orCondition:"OR",dateFormatOoo:"yyyy-mm-dd"},ol=class e extends tR{constructor(e,t={}){super(),this.eFocusableElement=e,this.callbacks=t,this.callbacks=B({shouldStopEventPropagation:()=>!1,onTabKeyDown:e=>{if(e.defaultPrevented)return;let t=this.focusService.findNextFocusableElement(this.eFocusableElement,!1,e.shiftKey);t&&(t.focus(),e.preventDefault())}},t)}postConstruct(){this.eFocusableElement.classList.add(e.FOCUS_MANAGED_CLASS),this.addKeyDownListeners(this.eFocusableElement),this.callbacks.onFocusIn&&this.addManagedListener(this.eFocusableElement,"focusin",this.callbacks.onFocusIn),this.callbacks.onFocusOut&&this.addManagedListener(this.eFocusableElement,"focusout",this.callbacks.onFocusOut)}addKeyDownListeners(e){this.addManagedListener(e,"keydown",e=>{if(!(e.defaultPrevented||tm(e))){if(this.callbacks.shouldStopEventPropagation(e)){tg(e);return}e.key===sk.TAB?this.callbacks.onTabKeyDown(e):this.callbacks.handleKeyDown&&this.callbacks.handleKeyDown(e)}})}};ol.FOCUS_MANAGED_CLASS="ag-focus-managed",K([eB("focusService")],ol.prototype,"focusService",2),K([eV],ol.prototype,"postConstruct",1);var oa=ol,oh="ag-resizer-wrapper",od=`<div class="${oh}">
23        <div ref="eTopLeftResizer" class="ag-resizer ag-resizer-topLeft"></div>
24        <div ref="eTopResizer" class="ag-resizer ag-resizer-top"></div>
25        <div ref="eTopRightResizer" class="ag-resizer ag-resizer-topRight"></div>
26        <div ref="eRightResizer" class="ag-resizer ag-resizer-right"></div>
27        <div ref="eBottomRightResizer" class="ag-resizer ag-resizer-bottomRight"></div>
28        <div ref="eBottomResizer" class="ag-resizer ag-resizer-bottom"></div>
29        <div ref="eBottomLeftResizer" class="ag-resizer ag-resizer-bottomLeft"></div>
30        <div ref="eLeftResizer" class="ag-resizer ag-resizer-left"></div>
31    </div>`,ou=class extends tR{constructor(e,t){super(),this.element=e,this.dragStartPosition={x:0,y:0},this.position={x:0,y:0}
31,this.lastSize={width:-1,height:-1},this.positioned=!1,this.resizersAdded=!1,this.resizeListeners=[],this.boundaryEl=null,this.isResizing=!1,this.isMoving=!1,this.resizable={},this.movable=!1,this.currentResizer=null,this.config=Object.assign({},{popup:!1},t)}center(){let{clientHeight:e,clientWidth:t}=this.offsetParent,i=t/2-this.getWidth()/2,s=e/2-this.getHeight()/2;this.offsetElement(i,s)}initialisePosition(){if(this.positioned)return;let{centered:e,forcePopupParentAsOffsetParent:t,minWidth:i,width:s,minHeight:o,height:r,x:n,y:l}=this.config;this.offsetParent||this.setOffsetParent();let a=0,h=0,d=sp(this.element);if(d){let e=this.findBoundaryElement(),t=window.getComputedStyle(e);if(null!=t.minWidth){let i=e.offsetWidth-this.element.offsetWidth;h=parseInt(t.minWidth,10)-i}if(null!=t.minHeight){let i=e.offsetHeight-this.element.offsetHeight;a=parseInt(t.minHeight,10)-i}}if(this.minHeight=o||a,this.minWidth=i||h,s&&this.setWidth(s),r&&this.setHeight(r),s&&r||this.refreshSize(),e)this.center();else if(n||l)this.offsetElement(n,l);else if(d&&t){let e=this.boundaryEl,t=!0;if(e||(e=this.findBoundaryElement(),t=!1),e){let i=parseFloat(e.style.top),s=parseFloat(e.style.left);t?this.offsetElement(isNaN(s)?0:s,isNaN(i)?0:i):this.setPosition(s,i)}}this.positioned=!!this.offsetParent}isPositioned(){return this.positioned}getPosition(){return this.position}setMovable(e,t){if(!this.config.popup||e===this.movable)return;this.movable=e;let i=this.moveElementDragListener||{eElement:t,onDragStart:this.onMoveStart.bind(this),onDragging:this.onMove.bind(this),onDragStop:this.onMoveEnd.bind(this)};e?(this.dragService.addDragSource(i),this.moveElementDragListener=i):(this.dragService.removeDragSource(i),this.moveElementDragListener=void 0)}setResizable(e){if(this.clearResizeListeners(),e?this.addResizers():this.removeResizers(),"boolean"==typeof e){if(!1===e)return;e={topLeft:e,top:e,topRight:e,right:e,bottomRight:e,bottom:e,bottomLeft:e,left:e}}Object.keys(e).forEach(t=>{let i=!!e[t],s=this.getResizerElement(t),o={dragStartPixels:0,eElement:s,onDragStart:e=>this.onResizeStart(e,t),onDragging:this.onResize.bind(this),onDragStop:e=>this.onResizeEnd(e,t)};!i&&(this.isAlive()||i)||(i?(this.dragService.addDragSource(o),this.resizeListeners.push(o),s.style.pointerEvents="all"):s.style.pointerEvents="none",this.resizable[t]=i)})}removeSizeFromEl(){this.element.style.removeProperty("height"),this.element.style.removeProperty("width"),this.element.style.removeProperty("flex")}restoreLastSize(){this.element.style.flex="0 0 auto";let{height:e,width:t}=this.lastSize;-1!==t&&(this.element.style.width=`${t}px`),-1!==e&&(this.element.style.height=`${e}px`)}getHeight(){return this.element.offsetHeight}setHeight(e){let{popup:t}=this.config,i=this.element,s=!1;if("string"==typeof e&&-1!==e.indexOf("%"))sD(i,e),e=so(i),s=!0;else if(e=Math.max(this.minHeight,e),this.positioned){let t=this.getAvailableHeight();t&&e>t&&(e=t)}this.getHeight()!==e&&(s?(i.style.maxHeight="unset",i.style.minHeight="unset"):t?sD(i,e):(i.style.height=`${e}px`,i.style.flex="0 0 auto",this.lastSize.height="number"==typeof e?e:parseFloat(e)))}getAvailableHeight(){let{popup:e,forcePopupParentAsOffsetParent:t}=this.config;this.positioned||this.initialisePosition();let{clientHeight:i}=this.offsetParent;if(!i)return null;let s=this.element.getBoundingClientRect(),o=this.offsetParent.getBoundingClientRect(),r=e?this.position.y:s.top,n=e?0:o.top,l=0;if(t){let e=this.element.parentElement;if(e){let{bottom:t}=e.getBoundingClientRect();l=t-s.bottom}}return i+n-r-l}getWidth(){return this.element.offsetWidth}setWidth(e){let t=this.element,{popup:i}=this.config,s=!1;if("string"==typeof e&&-1!==e.indexOf("%"))sy(t,e),e=sr(t),s=!0;else if(this.positioned){e=Math.max(this.minWidth,e);let{clientWidth:t}=this.offsetParent,s=i?this.position.x:this.element.getBoundingClientRect().left;t&&e+s>t&&(e=t-s)}this.getWidth()!==e&&(s?(t.style.maxWidth="unset",t.style.minWidth="unset"):this.config.popup?sy(t,e):(t.style.width=`${e}px`,t.style.flex=" unset",this.lastSize.width="number"==typeof e?e:parseFloat(e)))}offsetElement(e=0,t=0){let{forcePopupParentAsOffsetParent:i}=this.config,s=i?this.boundaryEl:this.element;s&&(this.popupService.positionPopup({ePopup:s,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:()=>({x:e,y:t})}),this.setPosition(parseFloat(s.style.left),parseFloat(s.style.top)))}constrainSizeToAvailableHeight(e){this.config.forcePopupParentAsOffsetParent&&(e?this.resizeObserverSubscriber=this.resizeObserverService.observeResize(this.popupService.getPopupParent(),()=>{let e=this.getAvailableHeight();this.element.style.setProperty("max-height",`${e}px`)}):(this.element.style.removeProperty("max-height"),this.resizeObserverSubscriber&&(this.resizeObserverSubscriber(),this.resizeObserverSubscriber=void 0)))}setPosition(e,t){this.position.x=e,this.position.y=t}updateDragStartPosition(e,t){this.dragStartPosition={x:e,y:t}}calculateMouseMovement(e){let{e:t,isLeft:i,isTop:s,anywhereWithin:o,topBuffer:r}=e,n=t.clientX-this.dragStartPosition.x,l=t.clientY-this.dragStartPosition.y;return{movementX:this.shouldSkipX(t,!!i,!!o,n)?0:n,movementY:this.shouldSkipY(t,!!s,r,l)?0:l}}shouldSkipX(e,t,i,s){let o=this.element.getBoundingClientRect(),r=this.offsetParent.getBoundingClientRect(),n=this.boundaryEl.getBoundingClientRect(),l=this.config.popup?this.position.x:o.left,a=l<=0&&r.left>=e.clientX||r.right<=e.clientX&&r.right<=n.right;return!!a||(a=t?s<0&&e.clientX>l+r.left||s>0&&e.clientX<l+r.left:i?s<0&&e.clientX>n.right||s>0&&e.clientX<l+r.left:s<0&&e.clientX>n.right||s>0&&e.clientX<n.right)}shouldSkipY(e,t,i=0,s){let o=this.element.getBoundingClientRect(),r=this.offsetParent.getBoundingClientRect(),n=this.boundaryEl.getBoundingClientRect(),l=this.config.popup?this.position.y:o.top,a=l<=0&&r.top>=e.clientY||r.bottom<=e.clientY&&r.bottom<=n.bottom;return!!a||(a=t?s<0&&e.clientY>l+r.top+i||s>
310&&e.clientY<l+r.top:s<0&&e.clientY>n.bottom||s>0&&e.clientY<n.bottom)}createResizeMap(){let e=this.element;this.resizerMap={topLeft:{element:e.querySelector("[ref=eTopLeftResizer]")},top:{element:e.querySelector("[ref=eTopResizer]")},topRight:{element:e.querySelector("[ref=eTopRightResizer]")},right:{element:e.querySelector("[ref=eRightResizer]")},bottomRight:{element:e.querySelector("[ref=eBottomRightResizer]")},bottom:{element:e.querySelector("[ref=eBottomResizer]")},bottomLeft:{element:e.querySelector("[ref=eBottomLeftResizer]")},left:{element:e.querySelector("[ref=eLeftResizer]")}}}addResizers(){if(this.resizersAdded)return;let e=this.element;if(!e)return;let t=new DOMParser().parseFromString(od,"text/html").body;e.appendChild(t.firstChild),this.createResizeMap(),this.resizersAdded=!0}removeResizers(){this.resizerMap=void 0;let e=this.element.querySelector(`.${oh}`);e&&this.element.removeChild(e),this.resizersAdded=!1}getResizerElement(e){return this.resizerMap[e].element}onResizeStart(e,t){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.currentResizer={isTop:!!t.match(/top/i),isRight:!!t.match(/right/i),isBottom:!!t.match(/bottom/i),isLeft:!!t.match(/left/i)},this.element.classList.add("ag-resizing"),this.resizerMap[t].element.classList.add("ag-active");let{popup:i,forcePopupParentAsOffsetParent:s}=this.config;i||s||this.applySizeToSiblings(this.currentResizer.isBottom||this.currentResizer.isTop),this.isResizing=!0,this.updateDragStartPosition(e.clientX,e.clientY)}getSiblings(){let e=this.element.parentElement;return e?Array.prototype.slice.call(e.children).filter(e=>!e.classList.contains("ag-hidden")):null}getMinSizeOfSiblings(){let e=this.getSiblings()||[],t=0,i=0;for(let s=0;s<e.length;s++){let o=e[s],r=!!o.style.flex&&"0 0 auto"!==o.style.flex;if(o===this.element)continue;let n=this.minHeight||0,l=this.minWidth||0;if(r){let e=window.getComputedStyle(o);e.minHeight&&(n=parseInt(e.minHeight,10)),e.minWidth&&(l=parseInt(e.minWidth,10))}else n=o.offsetHeight,l=o.offsetWidth;t+=n,i+=l}return{height:t,width:i}}applySizeToSiblings(e){let t=null,i=this.getSiblings();if(i){for(let s=0;s<i.length;s++){let o=i[s];o!==t&&(e?o.style.height=`${o.offsetHeight}px`:o.style.width=`${o.offsetWidth}px`,o.style.flex="0 0 auto",o===this.element&&(t=i[s+1]))}t&&(t.style.removeProperty("height"),t.style.removeProperty("min-height"),t.style.removeProperty("max-height"),t.style.flex="1 1 auto")}}isResizable(){return Object.values(this.resizable).some(e=>e)}onResize(e){if(!this.isResizing||!this.currentResizer)return;let{popup:t,forcePopupParentAsOffsetParent:i}=this.config,{isTop:s,isRight:o,isBottom:r,isLeft:n}=this.currentResizer,l=o||n,a=r||s,{movementX:h,movementY:d}=this.calculateMouseMovement({e,isLeft:n,isTop:s}),u=this.position.x,c=this.position.y,p=0,g=0;if(l&&h){let e=n?-1:1,t=this.getWidth(),i=t+h*e,s=!1;n&&(u+(p=t-i)<=0||i<=this.minWidth)&&(s=!0,p=0),s||this.setWidth(i)}if(a&&d){let e=s?-1:1,t=this.getHeight(),i=t+d*e,o=!1;s?(c+(g=t-i)<=0||i<=this.minHeight)&&(o=!0,g=0):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&t<i&&this.getMinSizeOfSiblings().height+i>this.element.parentElement.offsetHeight&&(o=!0),o||this.setHeight(i)}this.updateDragStartPosition(e.clientX,e.clientY),((t||i)&&p||g)&&this.offsetElement(u+p,c+g)}onResizeEnd(e,t){this.isResizing=!1,this.currentResizer=null,this.boundaryEl=null,this.element.classList.remove("ag-resizing"),this.resizerMap[t].element.classList.remove("ag-active"),this.dispatchEvent({type:"resize"})}refreshSize(){let e=this.element;this.config.popup&&(this.config.width||this.setWidth(e.offsetWidth),this.config.height||this.setHeight(e.offsetHeight))}onMoveStart(e){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.isMoving=!0,this.element.classList.add("ag-moving"),this.updateDragStartPosition(e.clientX,e.clientY)}onMove(e){let t;if(!this.isMoving)return;let{x:i,y:s}=this.position;this.config.calculateTopBuffer&&(t=this.config.calculateTopBuffer());let{movementX:o,movementY:r}=this.calculateMouseMovement({e,isTop:!0,anywhereWithin:!0,topBuffer:t});this.offsetElement(i+o,s+r),this.updateDragStartPosition(e.clientX,e.clientY)}onMoveEnd(){this.isMoving=!1,this.boundaryEl=null,this.element.classList.remove("ag-moving")}setOffsetParent(){this.config.forcePopupParentAsOffsetParent?this.offsetParent=this.popupService.getPopupParent():this.offsetParent=this.element.offsetParent}findBoundaryElement(){let e=this.element;for(;e;){if("static"!==window.getComputedStyle(e).position)return e;e=e.parentElement}return this.element}clearResizeListeners(){for(;this.resizeListeners.length;){let e=this.resizeListeners.pop();this.dragService.removeDragSource(e)}}destroy(){super.destroy(),this.moveElementDragListener&&this.dragService.removeDragSource(this.moveElementDragListener),this.constrainSizeToAvailableHeight(!1),this.clearResizeListeners(),this.removeResizers()}};K([eB("popupService")],ou.prototype,"popupService",2),K([eB("resizeObserverService")],ou.prototype,"resizeObserverService",2),K([eB("dragService")],ou.prototype,"dragService",2);var oc=class e extends s9{constructor(e){super(),this.filterNameKey=e,this.applyActive=!1,this.hidePopup=null,this.debouncePending=!1,this.appliedModel=null,this.buttonListeners=[]}postConstruct(){this.resetTemplate(),this.createManagedBean(new oa(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=new ou(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}),this.createBean(this.positionableFeature)}handleKeyDown(e){}getFilterTitle(){return this.translate(this.filterNameKey)}isFilterActive(){return!!this.appliedModel}resetTemplate(e){let t=this.getGui();t&&t.removeEventListener("submit",this.onFormSubmit);let i=`
32            <form class="ag-filter-wrapper">
33                <div class="ag-filter-body-wrapper ag-${this.getCssIdentifier()}-body-wrapper" ref="eFilterBody">
34                    ${this.createBodyTemplate()}
35                </div>
36            </form>`;this.setTemplate(i,e),(t=this.getGui())&&t.addEventListener("submit",this.onFormSubmit)}isReadOnly(){return!!this.providedFilterParams.readOnly}init(e){this.setParams(e),this.resetUiToDefaults(!0).then(()=>{this.updateUiVisibility(),this.setupOnBtApplyDebounce()})}setParams(t){this.providedFilterParams=t,this.applyActive=e.isUseApplyButton(t),this.resetButtonsPanel()}updateParams(t){this.providedFilterParams=t,this.applyActive=e.isUseApplyButton(t),this.resetUiToActiveModel(this.getModel(),()=>{this.updateUiVisibility(),this.setupOnBtApplyDebounce()})}resetButtonsPanel(){let{buttons:e}=this.providedFilterParams,t=e&&e.length>0&&!this.isReadOnly();if(this.eButtonsPanel?(sd(this.eButtonsPanel),this.buttonListeners.forEac
36h(e=>null==e?void 0:e()),this.buttonListeners=[]):t&&(this.eButtonsPanel=document.createElement("div"),this.eButtonsPanel.classList.add("ag-filter-apply-panel")),!t){this.eButtonsPanel&&su(this.eButtonsPanel);return}let i=document.createDocumentFragment(),s=e=>{let t,s;switch(e){case"apply":t=this.translate("applyFilter"),s=e=>this.onBtApply(!1,!1,e);break;case"clear":t=this.translate("clearFilter"),s=()=>this.onBtClear();break;case"reset":t=this.translate("resetFilter"),s=()=>this.onBtReset();break;case"cancel":t=this.translate("cancelFilter"),s=e=>{this.onBtCancel(e)};break;default:console.warn("AG Grid: Unknown button type specified");return}let o=sg(`<button
37                    type="${"apply"===e?"submit":"button"}"
38                    ref="${e}FilterButton"
39                    class="ag-button ag-standard-button ag-filter-apply-panel-button"
40                >${t}
41                </button>`);this.buttonListeners.push(this.addManagedListener(o,"click",s)),i.append(o)};sX(e).forEach(e=>s(e)),this.eButtonsPanel.append(i),this.getGui().appendChild(this.eButtonsPanel)}getDefaultDebounceMs(){return 0}setupOnBtApplyDebounce(){let t=e.getDebounceMs(this.providedFilterParams,this.getDefaultDebounceMs()),i=eP(this.checkApplyDebounce.bind(this),t);this.onBtApplyDebounce=()=>{this.debouncePending=!0,i()}}checkApplyDebounce(){this.debouncePending&&(this.debouncePending=!1,this.onBtApply())}getModel(){return this.appliedModel?this.appliedModel:null}setModel(e){return(null!=e?this.setModelIntoUi(e):this.resetUiToDefaults()).then(()=>{this.updateUiVisibility(),this.applyModel("api")})}onBtCancel(e){this.resetUiToActiveModel(this.getModel(),()=>{this.handleCancelEnd(e)})}handleCancelEnd(e){this.providedFilterParams.closeOnApply&&this.close(e)}resetUiToActiveModel(e,t){let i=()=>{this.onUiChanged(!1,"prevent"),null==t||t()};null!=e?this.setModelIntoUi(e).then(i):this.resetUiToDefaults().then(i)}onBtClear(){this.resetUiToDefaults().then(()=>this.onUiChanged())}onBtReset(){this.onBtClear(),this.onBtApply()}applyModel(e="api"){let t=this.getModelFromUi();if(!this.isModelValid(t))return!1;let i=this.appliedModel;return this.appliedModel=t,!this.areModelsEqual(i,t)}isModelValid(e){return!0}onFormSubmit(e){e.preventDefault()}onBtApply(e=!1,t=!1,i){i&&i.preventDefault(),this.applyModel(t?"rowDataUpdated":"ui")&&this.providedFilterParams.filterChangedCallback({afterFloatingFilter:e,afterDataChange:t,source:"columnFilter"});let{closeOnApply:s}=this.providedFilterParams;s&&this.applyActive&&!e&&!t&&this.close(i)}onNewRowsLoaded(){}close(e){let t;if(!this.hidePopup)return;let i=e&&e.key;("Enter"===i||"Space"===i)&&(t={keyboardEvent:e}),this.hidePopup(t),this.hidePopup=null}onUiChanged(e=!1,t){if(this.updateUiVisibility(),this.providedFilterParams.filterModifiedCallback(),this.applyActive&&!this.isReadOnly()){let e=this.isModelValid(this.getModelFromUi()),t=this.getRefElement("applyFilterButton");t&&i9(t,!e)}e&&!t||"immediately"===t?this.onBtApply(e):(this.applyActive||t)&&"debounce"!==t||this.onBtApplyDebounce()}afterGuiAttached(e){e&&(this.hidePopup=e.hidePopup),this.refreshFilterResizer(null==e?void 0:e.container)}refreshFilterResizer(e){if(!this.positionableFeature||"toolPanel"===e)return;let{positionableFeature:t,gos:i}=this;"floatingFilter"===e||"columnFilter"===e?(t.restoreLastSize(),t.setResizable(i.get("enableRtl")?{bottom:!0,bottomLeft:!0,left:!0}:{bottom:!0,bottomRight:!0,right:!0})):(this.positionableFeature.removeSizeFromEl(),this.positionableFeature.setResizable(!1)),this.positionableFeature.constrainSizeToAvailableHeight(!0)}afterGuiDetached(){this.checkApplyDebounce(),this.positionableFeature&&this.positionableFeature.constrainSizeToAvailableHeight(!1)}static getDebounceMs(t,i){return e.isUseApplyButton(t)?(null!=t.debounceMs&&console.warn("AG Grid: debounceMs is ignored when apply button is present"),0):null!=t.debounceMs?t.debounceMs:i}static isUseApplyButton(e){return!!e.buttons&&e.buttons.indexOf("apply")>=0}refresh(e){return this.providedFilterParams=e,!0}destroy(){let e=this.getGui();e&&e.removeEventListener("submit",this.onFormSubmit),this.hidePopup=null,this.positionableFeature&&(this.positionableFeature=this.destroyBean(this.positionableFeature)),this.appliedModel=null,super.destroy()}translate(e){return this.localeService.getLocaleTextFunc()(e,on[e])}getCellValue(e){return this.providedFilterParams.getValue(e)}getPositionableElement(){return this.eFilterBody}};K([eB("rowModel")],oc.prototype,"rowModel",2),K([ot("eFilterBody")],oc.prototype,"eFilterBody",2),K([eV],oc.prototype,"postConstruct",1);var op=oc,og=class extends s9{constructor(e,t){super(t),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{}}postConstruct(){this.addCssClass("ag-labeled"),this.eLabel.classList.add("ag-label");let{labelSeparator:e,label:t,labelWidth:i,labelAlignment:s,disabled:o}=this.config;null!=o&&this.setDisabled(o),null!=e&&this.setLabelSeparator(e),null!=t&&this.setLabel(t),null!=i&&this.setLabelWidth(i),this.setLabelAlignment(s||this.labelAlignment),this.refreshLabel()}refreshLabel(){sd(this.eLabel),"string"==typeof this.label?this.eLabel.innerText=this.label+this.labelSeparator:this.label&&this.eLabel.appendChild(this.label),""===this.label?(i8(this.eLabel,!1),t4(this.eLabel,"presentation")):(i8(this.eLabel,!0),t4(this.eLabel,null))}setLabelSeparator(e){return this.labelSeparator===e||(this.labelSeparator=e,null!=this.label&&this.refreshLabel()),this}getLabelId(){return this.eLabel.id=this.eLabel.id||`ag-${this.getCompId()}-label`,this.eLabel.id}getLabel(){return this.label}setLabel(e){return this.label===e||(this.label=e,this.refreshLabel()),this}setLabelAlignment(e){let t=this.getGui().classList;return t.toggle("ag-label-align-left","left"===e),t.toggle("ag-label-align-right","right"===e),t.toggle("ag-label-align-top","top"===e),this}setLabelEllipsis(e){return this.eLabel.classList.toggle("ag-label-ellipsis",e),this}setLabelWidth(e){return null==this.label||sS(this.eLabel,e),this}setDisabled(e){e=!!e;let t=this.getGui();return i9(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}};K([eV],og.prototype,"postConstruct",1);var om=class extends og{constructor(e,t,i){super(e,t),this.className=i}
41postConstruct(){super.postConstruct();let{width:e,value:t,onValueChange:i}=this.config;null!=e&&this.setWidth(e),null!=t&&this.setValue(t),null!=i&&this.onValueChange(i),this.className&&this.addCssClass(this.className),this.refreshAriaLabelledBy()}refreshAriaLabelledBy(){let e=this.getAriaElement(),t=this.getLabelId();null!==t9(e)?it(e,""):it(e,null!=t?t:"")}setAriaLabel(e){return ie(this.getAriaElement(),e),this.refreshAriaLabelledBy(),this}onValueChange(e){return this.addManagedListener(this,tP.EVENT_FIELD_VALUE_CHANGED,()=>e(this.getValue())),this}getWidth(){return this.getGui().clientWidth}setWidth(e){return sy(this.getGui(),e),this}getPreviousValue(){return this.previousValue}getValue(){return this.value}setValue(e,t){return this.value===e||(this.previousValue=this.value,this.value=e,t||this.dispatchEvent({type:tP.EVENT_FIELD_VALUE_CHANGED})),this}},oC=`
42    <div class="ag-picker-field" role="presentation">
43        <div ref="eLabel"></div>
44            <div ref="eWrapper" class="ag-wrapper ag-picker-field-wrapper ag-picker-collapsed">
45            <div ref="eDisplayField" class="ag-picker-field-display"></div>
46            <div ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></div>
47        </div>
48    </div>`,ov=class extends om{constructor(e){if(super(e,(null==e?void 0:e.template)||oC,null==e?void 0:e.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.ariaRole=null==e?void 0:e.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;let{pickerGap:t,maxPickerHeight:i,variableWidth:s,minPickerWidth:o,maxPickerWidth:r}=e;null!=t&&(this.pickerGap=t),this.variableWidth=!!s,null!=i&&this.setPickerMaxHeight(i),null!=o&&this.setPickerMinWidth(o),null!=r&&this.setPickerMaxWidth(r)}postConstruct(){super.postConstruct(),this.setupAria();let e=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute("id",e);let t=this.getAriaElement();this.addManagedListener(t,"keydown",this.onKeyDown.bind(this)),this.addManagedListener(this.eLabel,"mousedown",this.onLabelOrWrapperMouseDown.bind(this)),this.addManagedListener(this.eWrapper,"mousedown",this.onLabelOrWrapperMouseDown.bind(this));let{pickerIcon:i,inputWidth:s}=this.config;if(i){let e=sV(i,this.gos);e&&this.eIcon.appendChild(e)}null!=s&&this.setInputWidth(s)}setupAria(){let e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),iu(e,!1),this.ariaRole&&t4(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){let t=this.getFocusableElement();if(t!==this.eWrapper&&(null==e?void 0:e.target)===t)return;e.preventDefault(),this.getFocusableElement().focus()}if(this.skipClick){this.skipClick=!1;return}this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())}onKeyDown(e){switch(e.key){case sk.UP:case sk.DOWN:case sk.ENTER:case sk.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case sk.ESCAPE:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker())}}showPicker(){this.isPickerDisplayed=!0,this.pickerComponent||(this.pickerComponent=this.createPickerComponent());let e=this.pickerComponent.getGui();e.addEventListener("focusin",this.onPickerFocusIn),e.addEventListener("focusout",this.onPickerFocusOut),this.hideCurrentPicker=this.renderAndPositionPicker(),this.toggleExpandedStyles(!0)}renderAndPositionPicker(){let e=this.gos.getDocument(),t=this.pickerComponent.getGui();this.gos.get("suppressScrollWhenPopupsAreOpen")||(this.destroyMouseWheelFunc=this.addManagedListener(this.eventService,tP.EVENT_BODY_SCROLL,()=>{this.hidePicker()}));let i=this.localeService.getLocaleTextFunc(),{pickerAriaLabelKey:s,pickerAriaLabelValue:o,modalPicker:r=!0}=this.config,n={modal:r,eChild:t,closeOnEsc:!0,closedCallback:()=>{let t=this.gos.getActiveDomElement(),i=!t||t===e.body;this.beforeHidePicker(),i&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:i(s,o)},l=this.popupService.addPopup(n),{maxPickerHeight:a,minPickerWidth:h,maxPickerWidth:d,variableWidth:u}=this;u?(h&&(t.style.minWidth=h),t.style.width=sT(sr(this.eWrapper)),d&&(t.style.maxWidth=d)):sS(t,null!=d?d:sr(this.eWrapper));let c=null!=a?a:`${si(this.popupService.getPopupParent())}px`;return t.style.setProperty("max-height",c),t.style.position="absolute",this.alignPickerToComponent(),l.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;let{pickerType:e}=this.config,{pickerGap:t}=this,i=this.gos.get("enableRtl")?"right":"left";this.popupService.positionPopupByComponent({type:e,eventSource:this.eWrapper,ePopup:this.pickerComponent.getGui(),position:"under",alignSide:i,keepWithinBounds:!0,nudgeY:t})}beforeHidePicker(){this.destroyMouseWheelFunc&&(this.destroyMouseWheelFunc(),this.destroyMouseWheelFunc=void 0),this.toggleExpandedStyles(!1);let e=this.pickerComponent.getGui();e.removeEventListener("focusin",this.onPickerFocusIn),e.removeEventListener("focusout",this.onPickerFocusOut),this.isPickerDisplayed=!1,this.pickerComponent=void 0,this.hideCurrentPicker=null}toggleExpandedStyles(e){this.isAlive()&&(iu(this.getAriaElement(),e),this.eWrapper.classList.toggle("ag-picker-expanded",e),this.eWrapper.classList.toggle("ag-picker-collapsed",!e))}onPickerFocusIn(){this.togglePickerHasFocus(!0)}onPickerFocusOut(e){var t;(null==(t=this.pickerComponent)?void 0:t.getGui().contains(e.relatedTarget))||this.togglePickerHasFocus(!1)}togglePickerHasFocus(e){this.pickerComponent&&this.eWrapper.classList.toggle("ag-picker-has-focus",e)}hidePicker(){this.hideCurrentPicker&&this.hideCurrentPicker()}setInputWidth(e){return sS(this.eWrapper,e),this}getFocusableElement(){return this.eWrapper}setPickerGap(e){return this.pickerGap=e,this}setPickerMinWidth(e){return"number"==typeof e&&(e=`${e}px`),this.minPickerWidth=null==e?void 0:e,this}setPickerMaxWidth(e){return"number"==typeof e&&(e=`${e}px`),this.maxPickerWidth=null==e?void 0:e,this}setPickerMaxHeight(e){return"number"==typeof e&&(e=`${e}px`),this.maxPickerHeight=null==e?void 0:e,this}destroy(){this.hidePicker(),super.destroy()}};K([eB("popupService")],ov.prototype,"popupService",2),K([ot("eLabel")],ov.prototype,"eLabel",2),K([ot("eWrapper")],ov.prototype,"eWrapper",2),K([ot("eDisplayField")],ov.prototype,"eDisplayField",2),K([ot("eIcon")],ov.prototype,"eIcon",2);var of=class e extends s9{constructor(e="default",t=!1){super(`<div class="ag-list ag-${e}-list" role="listbox"></div>`),this.cssIdentifier=e,this.unFocusable=t,this.options=[],this.itemEls=[]}init(){let e=this.getGui();this.addManagedListener(e,"mouseleave",()=>this.clearHighlighted()),this.unFocusable||this.addManagedListener(e,"keydown",this.handleKeyDown.bind(this))}handleKeyDown(e){let t=e.key;switch(t){case sk.ENTER:if(this.highlightedEl){let e=this.itemEls.indexOf(this.highlightedEl);this.setValueByIndex(e)}else this.setValue(this.getValue());break;case sk.DOWN:case sk.UP:e.preventDefault(),this.navigate(t);break;case sk.PAGE_DOWN:case sk.PAGE_UP:case sk.PAGE_HOME:case sk.PAGE_END:e.preventDefault(),this.navigateToPage(t)}}navigate(e){let t;let i=e===sk.DOWN;if(this.highlightedEl){let e=this.itemEls.indexOf(this.highlightedEl)+(i?1:-1);e=Math.min(Math.max(e,0),this.itemEls.length-1),t=this.itemEls[e]}else t=this.itemEls[i?0:this.itemEls.length-1];this.highlightItem(t)}navigateToPage(e){if(!this.highlightedEl||0===this.itemEls.length)return;let t=this.itemEls.indexOf(this.highlightedEl),i=this.options.length-1,s=this.itemEls[0].clientHeight,o=Math.floor(this.getGui().clientHeight/s),r=-1;e===sk.PAGE_HOME?r=0:e===sk.PAGE_END?r=i:e===sk.PAGE_DOWN?r=Math.min(t+o,i):e===sk.PAGE_UP&&(r=Math.max(t-o,0)),-1!==r&&this.highlightItem(this.itemEls[r])}
48addOptions(e){return e.forEach(e=>this.addOption(e)),this}addOption(e){let{value:t,text:i}=e,s=i||t;return this.options.push({value:t,text:s}),this.renderOption(t,s),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0),this.itemEls.forEach(e=>{su(e)}),this.itemEls=[]}updateIndices(){let e=this.getGui().querySelectorAll(".ag-list-item");e.forEach((t,i)=>{ig(t,i+1),ip(t,e.length)})}renderOption(e,t){let i=this.gos.getDocument(),s=i.createElement("div");t4(s,"option"),s.classList.add("ag-list-item",`ag-${this.cssIdentifier}-list-item`);let o=i.createElement("span");s.appendChild(o),o.textContent=t,this.unFocusable||(s.tabIndex=-1),this.itemEls.push(s),this.addManagedListener(s,"mousemove",()=>this.highlightItem(s)),this.addManagedListener(s,"mousedown",t=>{t.preventDefault(),this.setValue(e)}),this.createManagedBean(new s6({getTooltipValue:()=>t,getGui:()=>s,getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>o.scrollWidth>o.clientWidth})),this.getGui().appendChild(s)}setValue(e,t){if(this.value===e)return this.fireItemSelected(),this;if(null==e)return this.reset(t),this;let i=this.options.findIndex(t=>t.value===e);if(-1!==i){let e=this.options[i];this.value=e.value,this.displayValue=e.text,this.highlightItem(this.itemEls[i]),t||this.fireChangeEvent()}return this}setValueByIndex(e){return this.setValue(this.options[e].value)}getValue(){return this.value}getDisplayValue(){return this.displayValue}refreshHighlighted(){this.clearHighlighted();let e=this.options.findIndex(e=>e.value===this.value);-1!==e&&this.highlightItem(this.itemEls[e])}reset(e){this.value=null,this.displayValue=null,this.clearHighlighted(),e||this.fireChangeEvent()}highlightItem(t){if(!sp(t))return;this.clearHighlighted(),this.highlightedEl=t,this.highlightedEl.classList.add(e.ACTIVE_CLASS),iD(this.highlightedEl,!0);let{scrollTop:i,clientHeight:s}=this.getGui(),{offsetTop:o,offsetHeight:r}=t;(o+r>i+s||o<i)&&this.highlightedEl.scrollIntoView({block:"nearest"}),this.unFocusable||this.highlightedEl.focus()}clearHighlighted(){this.highlightedEl&&sp(this.highlightedEl)&&(this.highlightedEl.classList.remove(e.ACTIVE_CLASS),iD(this.highlightedEl,!1),this.highlightedEl=null)}fireChangeEvent(){this.dispatchEvent({type:tP.EVENT_FIELD_VALUE_CHANGED}),this.fireItemSelected()}fireItemSelected(){this.dispatchEvent({type:e.EVENT_ITEM_SELECTED})}};of.EVENT_ITEM_SELECTED="selectedItem",of.ACTIVE_CLASS="ag-active-item",K([eV],of.prototype,"init",1);var ow=class e extends ov{constructor(e){super(B({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"smallDown",ariaRole:"combobox"},e))}postConstruct(){super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");let{options:e,value:t,placeholder:i}=this.config;null!=e&&this.addOptions(e),null!=t&&this.setValue(t,!0),i&&null==t&&(this.eDisplayField.textContent=i),this.addManagedListener(this.eWrapper,"focusout",this.onWrapperFocusOut.bind(this))}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}createListComponent(){this.listComponent=this.createBean(new of("select",!0)),this.listComponent.setParentComponent(this);let t=this.listComponent.getAriaElement(),i=`ag-select-list-${this.listComponent.getCompId()}`;t.setAttribute("id",i),ib(this.getAriaElement(),t),this.listComponent.addManagedListener(this.listComponent,of.EVENT_ITEM_SELECTED,()=>{this.hidePicker(),this.dispatchEvent({type:e.EVENT_ITEM_SELECTED})}),this.listComponent.addManagedListener(this.listComponent,tP.EVENT_FIELD_VALUE_CHANGED,()=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker())})}createPickerComponent(){return this.listComponent}onKeyDown(e){var t;let{key:i}=e;switch(i===sk.TAB&&this.hidePicker(),i){case sk.ENTER:case sk.UP:case sk.DOWN:case sk.PAGE_UP:case sk.PAGE_DOWN:case sk.PAGE_HOME:case sk.PAGE_END:e.preventDefault(),this.isPickerDisplayed?null==(t=this.listComponent)||t.handleKeyDown(e):super.onKeyDown(e);break;case sk.ESCAPE:super.onKeyDown(e)}}showPicker(){this.listComponent&&(super.showPicker(),this.listComponent.refreshHighlighted())}
48addOptions(e){return e.forEach(e=>this.addOption(e)),this}addOption(e){return this.listComponent.addOption(e),this}clearOptions(){var e;return null==(e=this.listComponent)||e.clearOptions(),this}setValue(e,t,i){if(this.value===e||!this.listComponent||(i||this.listComponent.setValue(e,!0),this.listComponent.getValue()===this.getValue()))return this;let s=this.listComponent.getDisplayValue();return null==s&&this.config.placeholder&&(s=this.config.placeholder),this.eDisplayField.textContent=s,this.setTooltip({newTooltipText:null!=s?s:null,shouldDisplayTooltip:()=>this.eDisplayField.scrollWidth>this.eDisplayField.clientWidth}),super.setValue(e,t)}destroy(){this.listComponent&&(this.destroyBean(this.listComponent),this.listComponent=void 0),super.destroy()}};ow.EVENT_ITEM_SELECTED="selectedItem";var oE=ow,oS=class extends om{constructor(e,t,i="text",s="input"){super(e,`
49            <div role="presentation">
50                <div ref="eLabel" class="ag-input-field-label"></div>
51                <div ref="eWrapper" class="ag-wrapper ag-input-wrapper" role="presentation">
52                    <${s} ref="eInput" class="ag-input-field-input"></${s}>
53                </div>
54            </div>`,t),this.inputType=i,this.displayFieldTag=s}postConstruct(){super.postConstruct(),this.setInputType(),this.eLabel.classList.add(`${this.className}-label`),this.eWrapper.classList.add(`${this.className}-input-wrapper`),this.eInput.classList.add(`${this.className}-input`),this.addCssClass("ag-input-field"),this.eInput.id=this.eInput.id||`ag-${this.getCompId()}-input`;let{inputName:e,inputWidth:t}=this.config;null!=e&&this.setInputName(e),null!=t&&this.setInputWidth(t),this.addInputListeners(),this.activateTabIndex([this.eInput])}addInputListeners(){this.addManagedListener(this.eInput,"input",e=>this.setValue(e.target.value))}setInputType(){"input"===this.displayFieldTag&&this.eInput.setAttribute("type",this.inputType)}getInputElement(){return this.eInput}setInputWidth(e){return sS(this.eWrapper,e),this}setInputName(e){return this.getInputElement().setAttribute("name",e),this}getFocusableElement(){return this.eInput}setMaxLength(e){return this.eInput.maxLength=e,this}setInputPlaceholder(e){return sF(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return ie(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return i9(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){return!0===e?sF(this.eInput,"autocomplete",null):sF(this.eInput,"autocomplete","string"==typeof e?e:"off"),this}};K([ot("eLabel")],oS.prototype,"eLabel",2),K([ot("eWrapper")],oS.prototype,"eWrapper",2),K([ot("eInput")],oS.prototype,"eInput",2);var oy=class extends oS{constructor(e,t="ag-checkbox",i="checkbox"){super(e,t,i),this.labelAlignment="right",this.selected=!1,this.readOnly=!1,this.passive=!1}postConstruct(){super.postConstruct();let{readOnly:e,passive:t}=this.config;"boolean"==typeof e&&this.setReadOnly(e),"boolean"==typeof t&&this.setPassive(t)}addInputListeners(){this.addManagedListener(this.eInput,"click",this.onCheckboxClick.bind(this)),this.addManagedListener(this.eLabel,"click",this.toggle.bind(this))}getNextValue(){return void 0===this.selected||!this.selected}setPassive(e){this.passive=e}isReadOnly(){return this.readOnly}setReadOnly(e){this.eWrapper.classList.toggle("ag-disabled",e),this.eInput.disabled=e,this.readOnly=e}setDisabled(e){return this.eWrapper.classList.toggle("ag-disabled",e),super.setDisabled(e)}toggle(){if(this.eInput.disabled)return;let e=this.isSelected(),t=this.getNextValue();this.passive?this.dispatchChange(t,e):this.setValue(t)}getValue(){return this.isSelected()}setValue(e,t){return this.refreshSelectedClass(e),this.setSelected(e,t),this}setName(e){return this.getInputElement().name=e,this}isSelected(){return this.selected}setSelected(e,t){this.isSelected()!==e&&(this.previousValue=this.isSelected(),e=this.selected="boolean"==typeof e?e:void 0,this.eInput.checked=e,this.eInput.indeterminate=void 0===e,t||this.dispatchChange(this.selected,this.previousValue))}dispatchChange(e,t,i){this.dispatchEvent({type:tP.EVENT_FIELD_VALUE_CHANGED,selected:e,previousValue:t,event:i});let s=this.getInputElement(),o={type:tP.EVENT_CHECKBOX_CHANGED,id:s.id,name:s.name,selected:e,previousValue:t};this.eventService.dispatchEvent(o)}onCheckboxClick(e){if(this.passive||this.eInput.disabled)return;let t=this.isSelected(),i=this.selected=e.target.checked;this.refreshSelectedClass(i),this.dispatchChange(i,t,e)}refreshSelectedClass(e){this.eWrapper.classList.toggle("ag-checked",!0===e),this.eWrapper.classList.toggle("ag-indeterminate",null==e)}},oR=class extends oy{constructor(e){super(e,"ag-radio-button","radio")}isSelected(){return this.eInput.checked}toggle(){!this.eInput.disabled&&(this.isSelected()||this.setValue(!0))}addInputListeners(){super.addInputListeners(),this.addManagedListener(this.eventService,tP.EVENT_CHECKBOX_CHANGED,this.onChange.bind(this))}onChange(e){e.selected&&e.name&&this.eInput.name&&this.eInput.name===e.name&&e.id&&this.eInput.id!==e.id&&this.setValue(!1,!0)}},oD=class{constructor(e,t,i){this.localeService=e,this.optionsFactory=t,this.valueFormatter=i}getModelAsString(e){if(!e)return null;let t=null!=e.operator,i=this.localeService.getLocaleTextFunc();if(t){let{conditions:t}=e;if(!t){let{condition1:i,condition2:s}=e;t=[i,s]}let s=t.map(e=>this.getModelAsString(e)),o="AND"===e.operator?"andCondition":"orCondition";return s.join(` ${i(o,on[o])} `)}if(e.type===ob.BLANK||e.type===ob.NOT_BLANK)return i(e.type,e.type);{let t=this.optionsFactory.getCustomOption(e.type),{displayKey:s,displayName:o,numberOfInputs:r}=t||{};return s&&o&&0===r?(i(s,o),o):this.conditionToString(e,t)}}updateParams(e){this.optionsFactory=e.optionsFactory}formatValue(e){var t;return this.valueFormatter?null!=(t=this.valueFormatter(null!=e?e:null))?t:"":String(e)}}
54,oT=class e extends op{constructor(){super(...arguments),this.eTypes=[],this.eJoinOperatorPanels=[],this.eJoinOperatorsAnd=[],this.eJoinOperatorsOr=[],this.eConditionBodies=[],this.listener=()=>this.onUiChanged(),this.lastUiCompletePosition=null,this.joinOperatorId=0}getNumberOfInputs(t){let i=this.optionsFactory.getCustomOption(t);if(i){let{numberOfInputs:e}=i;return null!=e?e:1}let s=[e.EMPTY,e.NOT_BLANK,e.BLANK];return t&&s.indexOf(t)>=0?0:t===e.IN_RANGE?2:1}onFloatingFilterChanged(e,t){this.setTypeFromFloatingFilter(e),this.setValueFromFloatingFilter(t),this.onUiChanged(!0)}setTypeFromFloatingFilter(e){this.eTypes.forEach((t,i)=>{0===i?t.setValue(e,!0):t.setValue(this.optionsFactory.getDefaultOption(),!0)})}getModelFromUi(){let e=this.getUiCompleteConditions();return 0===e.length?null:this.maxNumConditions>1&&e.length>1?{filterType:this.getFilterType(),operator:this.getJoinOperator(),condition1:e[0],condition2:e[1],conditions:e}:e[0]}getConditionTypes(){return this.eTypes.map(e=>e.getValue())}getConditionType(e){return this.eTypes[e].getValue()}getJoinOperator(){return 0===this.eJoinOperatorsOr.length?this.defaultJoinOperator:!0===this.eJoinOperatorsOr[0].getValue()?"OR":"AND"}areModelsEqual(e,t){if(!e&&!t)return!0;if(!e&&t||e&&!t)return!1;let i=!e.operator,s=!t.operator;return(!!i||!s)&&(!i||!!s)&&(i?this.areSimpleModelsEqual(e,t):e.operator===t.operator&&e4(e.conditions,t.conditions,(e,t)=>this.areSimpleModelsEqual(e,t)))}shouldRefresh(e){var t,i,s;let o=this.getModel(),r=o?null!=(t=o.conditions)?t:[o]:null,n=null!=(s=null==(i=e.filterOptions)?void 0:i.map(e=>"string"==typeof e?e:e.displayKey))?s:this.getDefaultFilterOptions();return!!(!r||r.every(e=>void 0!==n.find(t=>t===e.type)))&&("number"!=typeof e.maxNumConditions||!r||!(r.length>e.maxNumConditions))}refresh(e){return!!(this.shouldRefresh(e)&&super.refresh(e))&&(this.setParams(e),this.removeConditionsAndOperators(0),this.createOption(),this.setModel(this.getModel()),!0)}setModelIntoUi(e){if(e.operator){e.conditions||(e.conditions=[e.condition1,e.condition2]);let t=this.validateAndUpdateConditions(e.conditions),i=this.getNumConditions();if(t<i)this.removeConditionsAndOperators(t);else if(t>i)for(let e=i;e<t;e++)this.createJoinOperatorPanel(),this.createOption();let s="OR"===e.operator;this.eJoinOperatorsAnd.forEach(e=>e.setValue(!s,!0)),this.eJoinOperatorsOr.forEach(e=>e.setValue(s,!0)),e.conditions.forEach((e,t)=>{this.eTypes[t].setValue(e.type,!0),this.setConditionIntoUi(e,t)})}else this.getNumConditions()>1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(e.type,!0),this.setConditionIntoUi(e,0);return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.onUiChanged(),s1.resolve()}validateAndUpdateConditions(e){let t=e.length;return t>this.maxNumConditions&&(e.splice(this.maxNumConditions),ew('Filter Model contains more conditions than "filterParams.maxNumConditions". Additional conditions have been ignored.'),t=this.maxNumConditions),t}doesFilterPass(e){var t;let i=this.getModel();if(null==i)return!0;let{operator:s}=i,o=[];return s?o.push(...null!=(t=i.conditions)?t:[]):o.push(i),o[s&&"OR"===s?"some":"every"](t=>this.individualConditionPasses(e,t))}setParams(e){super.setParams(e),this.setNumConditions(e),this.defaultJoinOperator=this.getDefaultJoinOperator(e.defaultJoinOperator),this.filterPlaceholder=e.filterPlaceholder,this.optionsFactory=new or,this.optionsFactory.init(e,this.getDefaultFilterOptions()),this.createFilterListOptions(),this.createOption(),this.createMissingConditionsAndOperators(),this.isReadOnly()&&this.eFilterBody.setAttribute("tabindex","-1")}setNumConditions(e){var t,i;null!=e.suppressAndOrCondition&&ew('Since v29.2 "filterParams.suppressAndOrCondition" is deprecated. Use "filterParams.maxNumConditions = 1" instead.'),null!=e.alwaysShowBothConditions&&ew('Since v29.2 "filterParams.alwaysShowBothConditions" is deprecated. Use "filterParams.numAlwaysVisibleConditions = 2" instead.'),this.maxNumConditions=null!=(t=e.maxNumConditions)?t:e.suppressAndOrCondition?1:2,this.maxNumConditions<1&&(ew('"filterParams.maxNumConditions" must be greater than or equal to zero.'),this.maxNumConditions=1),this.numAlwaysVisibleConditions=null!=(i=e.numAlwaysVisibleConditions)?i:e.alwaysShowBothConditions?2:1,this.numAlwaysVisibleConditions<1&&(ew('"filterParams.numAlwaysVisibleConditions" must be greater than or equal to zero.'),this.numAlwaysVisibleConditions=1),this.numAlwaysVisibleConditions>this.maxNumConditions&&(ew('"filterParams.numAlwaysVisibleConditions" cannot be greater than "filterParams.maxNumConditions".'),this.numAlwaysVisibleConditions=this.maxNumConditions)}createOption(){let e=this.createManagedBean(new oE);this.eTypes.push(e),e.addCssClass("ag-filter-select"),this.eFilterBody.appendChild(e.getGui());let t=this.createValueElement();this.eConditionBodies.push(t),this.eFilterBody.appendChild(t),this.putOptionsIntoDropdown(e),this.resetType(e);
54let i=this.getNumConditions()-1;this.forEachPositionInput(i,e=>this.resetInput(e)),this.addChangedListeners(e,i)}createJoinOperatorPanel(){let e=document.createElement("div");this.eJoinOperatorPanels.push(e),e.classList.add("ag-filter-condition");let t=this.createJoinOperator(this.eJoinOperatorsAnd,e,"and"),i=this.createJoinOperator(this.eJoinOperatorsOr,e,"or");this.eFilterBody.appendChild(e);let s=this.eJoinOperatorPanels.length-1,o=this.joinOperatorId++;this.resetJoinOperatorAnd(t,s,o),this.resetJoinOperatorOr(i,s,o),this.isReadOnly()||(t.onValueChange(this.listener),i.onValueChange(this.listener))}createJoinOperator(e,t,i){let s=this.createManagedBean(new oR);return e.push(s),s.addCssClass("ag-filter-condition-operator"),s.addCssClass(`ag-filter-condition-operator-${i}`),t.appendChild(s.getGui()),s}getDefaultJoinOperator(e){return"AND"===e||"OR"===e?e:"AND"}createFilterListOptions(){let e=this.optionsFactory.getFilterOptions();this.filterListOptions=e.map(e=>"string"==typeof e?this.createBoilerplateListOption(e):this.createCustomListOption(e))}putOptionsIntoDropdown(e){this.filterListOptions.forEach(t=>{e.addOption(t)}),e.setDisabled(this.filterListOptions.length<=1)}createBoilerplateListOption(e){return{value:e,text:this.translate(e)}}createCustomListOption(e){let{displayKey:t}=e,i=this.optionsFactory.getCustomOption(e.displayKey);return{value:t,text:i?this.localeService.getLocaleTextFunc()(i.displayKey,i.displayName):this.translate(t)}}isAllowTwoConditions(){return this.maxNumConditions>=2}createBodyTemplate(){return""}getCssIdentifier(){return"simple-filter"}updateUiVisibility(){let e=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,e)}updateNumConditions(){var e;let t=-1,i=!0;for(let e=0;e<this.getNumConditions();e++)this.isConditionUiComplete(e)?t=e:i=!1;if(this.shouldAddNewConditionAtEnd(i))this.createJoinOperatorPanel(),this.createOption();else{let i=null!=(e=this.lastUiCompletePosition)?e:this.getNumConditions()-2;if(t<i){this.removeConditionsAndOperators(i+1);let e=t+1,s=i-e;s>0&&this.removeConditionsAndOperators(e,s),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=t}updateConditionStatusesAndValues(e,t){this.eTypes.forEach((t,i)=>{let s=this.isConditionDisabled(i,e);t.setDisabled(s||this.filterListOptions.length<=1),1===i&&(i9(this.eJoinOperatorPanels[0],s),this.eJoinOperatorsAnd[0].setDisabled(s),this.eJoinOperatorsOr[0].setDisabled(s))}),this.eConditionBodies.forEach((e,t)=>{i8(e,this.isConditionBodyVisible(t))});let i=(null!=t?t:this.getJoinOperator())==="OR";this.eJoinOperatorsAnd.forEach((e,t)=>{e.setValue(!i,!0)}),this.eJoinOperatorsOr.forEach((e,t)=>{e.setValue(i,!0)}),this.forEachInput((t,i,s,o)=>{this.setElementDisplayed(t,i<o),this.setElementDisabled(t,this.isConditionDisabled(s,e))}),this.resetPlaceholder()}shouldAddNewConditionAtEnd(e){return e&&this.getNumConditions()<this.maxNumConditions&&!this.isReadOnly()}removeConditionsAndOperators(e,t){if(e>=this.getNumConditions())return;this.removeComponents(this.eTypes,e,t),this.removeElements(this.eConditionBodies,e,t),this.removeValueElements(e,t);let i=Math.max(e-1,0);this.removeElements(this.eJoinOperatorPanels,i,t),this.removeComponents(this.eJoinOperatorsAnd,i,t),this.removeComponents(this.eJoinOperatorsOr,i,t)}removeElements(e,t,i){this.removeItems(e,t,i).forEach(e=>su(e))}
54removeComponents(e,t,i){this.removeItems(e,t,i).forEach(e=>{su(e.getGui()),this.destroyBean(e)})}removeItems(e,t,i){return null==i?e.splice(t):e.splice(t,i)}afterGuiAttached(e){if(super.afterGuiAttached(e),this.resetPlaceholder(),!(null==e?void 0:e.suppressFocus)){if(this.isReadOnly())this.eFilterBody.focus();else{let e=this.getInputs(0)[0];if(!e)return;e instanceof oS&&e.getInputElement().focus()}}}afterGuiDetached(){super.afterGuiDetached();let e=this.getModel();this.resetUiToActiveModel(e);let t=-1,i=-1,s=!1,o=this.getJoinOperator();for(let e=this.getNumConditions()-1;e>=0;e--)if(this.isConditionUiComplete(e))-1===t&&(t=e,i=e);else{let o=e>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(e-1),r=e<t;(o||r)&&(this.removeConditionsAndOperators(e,1),s=!0,r&&i--)}let r=!1;this.getNumConditions()<this.numAlwaysVisibleConditions&&(this.createMissingConditionsAndOperators(),r=!0),this.shouldAddNewConditionAtEnd(i===this.getNumConditions()-1)&&(this.createJoinOperatorPanel(),this.createOption(),r=!0),r&&this.updateConditionStatusesAndValues(i,o),s&&this.updateJoinOperatorsDisabled(),this.lastUiCompletePosition=i}getPlaceholderText(e,t){let i=this.translate(e);if(ey(this.filterPlaceholder)){let e=this.filterPlaceholder,s=this.eTypes[t].getValue(),o=this.translate(s);i=e({filterOptionKey:s,filterOption:o,placeholder:i})}else"string"==typeof this.filterPlaceholder&&(i=this.filterPlaceholder);return i}resetPlaceholder(){let e=this.localeService.getLocaleTextFunc();this.forEachInput((t,i,s,o)=>{if(!(t instanceof oS))return;let r=0===i&&o>1?e("ariaFilterFromValue","Filter from value"):0===i?e("ariaFilterValue","Filter Value"):e("ariaFilterToValue","Filter to Value");t.setInputPlaceholder(this.getPlaceholderText(0===i&&o>1?"inRangeStart":0===i?"filterOoo":"inRangeEnd",s)),t.setInputAriaLabel(r)})}setElementValue(e,t,i){e instanceof oS&&e.setValue(null!=t?String(t):null,!0)}setElementDisplayed(e,t){e instanceof s9&&i8(e.getGui(),t)}setElementDisabled(e,t){e instanceof s9&&i9(e.getGui(),t)}attachElementOnChange(e,t){e instanceof oS&&e.onValueChange(t)}forEachInput(e){this.getConditionTypes().forEach((t,i)=>{this.forEachPositionTypeInput(i,t,e)})}forEachPositionInput(e,t){let i=this.getConditionType(e);this.forEachPositionTypeInput(e,i,t)}forEachPositionTypeInput(e,t,i){let s=this.getNumberOfInputs(t),o=this.getInputs(e);for(let t=0;t<o.length;t++){let r=o[t];null!=r&&i(r,t,e,s)}}isConditionDisabled(e,t){return!!this.isReadOnly()||0!==e&&e>t+1}isConditionBodyVisible(e){let t=this.getConditionType(e);return this.getNumberOfInputs(t)>0}isConditionUiComplete(t){return!(t>=this.getNumConditions()||this.getConditionType(t)===e.EMPTY||this.getValues(t).some(e=>null==e))}getNumConditions(){return this.eTypes.length}getUiCompleteConditions(){let e=[];for(let t=0;t<this.getNumConditions();t++)this.isConditionUiComplete(t)&&e.push(this.createCondition(t));return e}createMissingConditionsAndOperators(){if(!this.isReadOnly())for(let e=this.getNumConditions();e<this.numAlwaysVisibleConditions;e++)this.createJoinOperatorPanel(),this.createOption()}resetUiToDefaults(e){return this.removeConditionsAndOperators(this.isReadOnly()?1:this.numAlwaysVisibleConditions),this.eTypes.forEach(e=>this.resetType(e)),this.eJoinOperatorsAnd.forEach((e,t)=>this.resetJoinOperatorAnd(e,t,this.joinOperatorId+t)),this.eJoinOperatorsOr.forEach((e,t)=>this.resetJoinOperatorOr(e,t,this.joinOperatorId+t)),this.joinOperatorId++,this.forEachInput(e=>this.resetInput(e)),this.resetPlaceholder(),this.createMissingConditionsAndOperators(),this.lastUiCompletePosition=null,e||this.onUiChanged(),s1.resolve()}resetType(e){let t=this.localeService.getLocaleTextFunc()("ariaFilteringOperator","Filtering operator");e.setValue(this.optionsFactory.getDefaultOption(),!0).setAriaLabel(t).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1)}resetJoinOperatorAnd(e,t,i){this.resetJoinOperator(e,t,this.isDefaultOperator("AND"),this.translate("andCondition"),i)}resetJoinOperatorOr(e,t,i){this.resetJoinOperator(e,t,this.isDefaultOperator("OR"),this.translate("orCondition"),i)}resetJoinOperator(e,t,i,s,o){this.updateJoinOperatorDisabled(e.setValue(i,!0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${o}`).setLabel(s),t)}
54updateJoinOperatorsDisabled(){this.eJoinOperatorsAnd.forEach((e,t)=>this.updateJoinOperatorDisabled(e,t)),this.eJoinOperatorsOr.forEach((e,t)=>this.updateJoinOperatorDisabled(e,t))}updateJoinOperatorDisabled(e,t){e.setDisabled(this.isReadOnly()||t>0)}resetInput(e){this.setElementValue(e,null),this.setElementDisabled(e,this.isReadOnly())}setConditionIntoUi(e,t){let i=this.mapValuesFromModel(e);this.forEachInput((e,s,o,r)=>{o===t&&this.setElementValue(e,null!=i[s]?i[s]:null)})}setValueFromFloatingFilter(e){this.forEachInput((t,i,s,o)=>{this.setElementValue(t,0===i&&0===s?e:null,!0)})}isDefaultOperator(e){return e===this.defaultJoinOperator}addChangedListeners(e,t){this.isReadOnly()||(e.onValueChange(this.listener),this.forEachPositionInput(t,e=>{this.attachElementOnChange(e,this.listener)}))}individualConditionPasses(e,t){let i=this.getCellValue(e.node),s=this.mapValuesFromModel(t),o=this.optionsFactory.getCustomOption(t.type),r=this.evaluateCustomFilter(o,s,i);return null!=r?r:null==i?this.evaluateNullValue(t.type):this.evaluateNonNullValue(s,i,t,e)}evaluateCustomFilter(e,t,i){if(null==e)return;let{predicate:s}=e;if(null!=s&&!t.some(e=>null==e))return s(t,i)}isBlank(e){return null==e||"string"==typeof e&&0===e.trim().length}hasInvalidInputs(){return!1}};oT.EMPTY="empty",oT.BLANK="blank",oT.NOT_BLANK="notBlank",oT.EQUALS="equals",oT.NOT_EQUAL="notEqual",oT.LESS_THAN="lessThan",oT.LESS_THAN_OR_EQUAL="lessThanOrEqual",oT.GREATER_THAN="greaterThan",oT.GREATER_THAN_OR_EQUAL="greaterThanOrEqual",oT.IN_RANGE="inRange",oT.CONTAINS="contains",oT.NOT_CONTAINS="notContains",oT.STARTS_WITH="startsWith",oT.ENDS_WITH="endsWith";var ob=oT,oA=class e extends ob{setParams(e){super.setParams(e),this.scalarFilterParams=e}evaluateNullValue(t){switch(t){case e.EQUALS:case e.NOT_EQUAL:if(this.scalarFilterParams.includeBlanksInEquals)return!0;break;case e.GREATER_THAN:case e.GREATER_THAN_OR_EQUAL:if(this.scalarFilterParams.includeBlanksInGreaterThan)return!0;break;case e.LESS_THAN:case e.LESS_THAN_OR_EQUAL:if(this.scalarFilterParams.includeBlanksInLessThan)return!0;break;case e.IN_RANGE:if(this.scalarFilterParams.includeBlanksInRange)return!0;break;case e.BLANK:return!0;case e.NOT_BLANK:}return!1}evaluateNonNullValue(t,i,s){let o=this.comparator(),r=null!=t[0]?o(t[0],i):0;switch(s.type){case e.EQUALS:return 0===r;case e.NOT_EQUAL:return 0!==r;case e.GREATER_THAN:return r>0;case e.GREATER_THAN_OR_EQUAL:return r>=0;case e.LESS_THAN:return r<0;case e.LESS_THAN_OR_EQUAL:return r<=0;case e.IN_RANGE:{let e=o(t[1],i);return this.scalarFilterParams.inRangeInclusive?r>=0&&e<=0:r>0&&e<0}case e.BLANK:return this.isBlank(i);case e.NOT_BLANK:return!this.isBlank(i);default:return console.warn('AG Grid: Unexpected type of filter "'+s.type+'", it looks like the filter was configured with incorrect Filter Options'),!0}}},oP=1/0,oF=class extends oD{constructor(e,t,i){super(t,i),this.dateFilterParams=e}conditionToString(e,t){let{type:i}=e,{numberOfInputs:s}=t||{},o=i==ob.IN_RANGE||2===s,r=i1(e.dateFrom),n=i1(e.dateTo),l=this.dateFilterParams.inRangeFloatingFilterDateFormat;if(o){let e=null!==r?i0(r,l):"null",t=null!==n?i0(n,l):"null";return`${e}-${t}`}return null!=r?i0(r,l):`${i}`}updateParams(e){super.updateParams(e),this.dateFilterParams=e.dateFilterParams}},oL=class e extends oA{constructor(){super("dateFilter"),this.eConditionPanelsFrom=[],this.eConditionPanelsTo=[],this.dateConditionFromComps=[],this.dateConditionToComps=[],this.minValidYear=1e3,this.maxValidYear=oP,this.minValidDate=null,this.maxValidDate=null}afterGuiAttached(e){super.afterGuiAttached(e),this.dateConditionFromComps[0].afterGuiAttached(e)}mapValuesFromModel(e){let{dateFrom:t,dateTo:i,type:s}=e||{};return[t&&i1(t)||null,i&&i1(i)||null].slice(0,this.getNumberOfInputs(s))}comparator(){return this.dateFilterParams.comparator?this.dateFilterParams.comparator:this.defaultComparator.bind(this)}defaultComparator(e,t){return null==t||t<e?-1:t>e?1:0}setParams(e){this.dateFilterParams=e,super.setParams(e);let t=(t,i)=>{if(null!=e[t]){if(!isNaN(e[t]))return null==e[t]?i:Number(e[t]);console.warn(`AG Grid: DateFilter ${t} is not a number`)}return i};this.minValidYear=t("minValidYear",1e3),this.maxValidYear=t("maxValidYear",oP),this.minValidYear>this.maxValidYear&&console.warn("AG Grid: DateFilter minValidYear should be <= maxValidYear"),e.minValidDate?this.minValidDate=e.minValidDate instanceof Date?e.minValidDate:i1(e.minValidDate):this.minValidDate=null,e.maxValidDate?this.maxValidDate=e.maxValidDate instanceof Date?e.maxValidDate:i1(e.maxValidDate):this.maxValidDate=null,this.minValidDate&&this.maxValidDate&&this.minValidDate>this.maxValidDate&&console.warn("AG Grid: DateFilter minValidDate should be <= maxValidDate"),this.filterModelFormatter=new oF(this.dateFilterParams,this.localeService,this.optionsFactory)}createDateCompWrapper(e){let t=new oo(this.getContext(),this.userComponentFactory,{onDateChanged:()=>this.onUiChanged(),filterParams:this.dateFilterParams},e);return this.addDestroyFunc(()=>t.destroy()),t}setElementValue(e,t){e.setDate(t)}setElementDisplayed(e,t){e.setDisplayed(t)}setElementDisabled(e,t){e.setDisabled(t)}getDefaultFilterOptions(){return e.DEFAULT_FILTER_OPTIONS}createValueElement(){let e=this.gos.getDocument().createElement("div");return e.classList.add("ag-filter-body"),this.createFromToElement(e,this.eConditionPanelsFrom,this.dateConditionFromComps,"from"),this.createFromToElement(e,this.eConditionPanelsTo,this.dateConditionToComps,"to"),e}createFromToElement(e,t,i,s){let o=this.gos.getDocument().createElement("div");o.classList.add(`ag-filter-${s}`),o.classList.add(`ag-filter-date-${s}
54`),t.push(o),e.appendChild(o),i.push(this.createDateCompWrapper(o))}removeValueElements(e,t){this.removeDateComps(this.dateConditionFromComps,e,t),this.removeDateComps(this.dateConditionToComps,e,t),this.removeItems(this.eConditionPanelsFrom,e,t),this.removeItems(this.eConditionPanelsTo,e,t)}removeDateComps(e,t,i){this.removeItems(e,t,i).forEach(e=>e.destroy())}isValidDateValue(e){if(null===e)return!1;if(this.minValidDate){if(e<this.minValidDate)return!1}else if(e.getUTCFullYear()<this.minValidYear)return!1;if(this.maxValidDate){if(e>this.maxValidDate)return!1}else if(e.getUTCFullYear()>this.maxValidYear)return!1;return!0}isConditionUiComplete(e){if(!super.isConditionUiComplete(e))return!1;let t=!0;return this.forEachInput((i,s,o,r)=>{o===e&&t&&!(s>=r)&&(t=t&&this.isValidDateValue(i.getDate()))}),t}areSimpleModelsEqual(e,t){return e.dateFrom===t.dateFrom&&e.dateTo===t.dateTo&&e.type===t.type}getFilterType(){return"date"}createCondition(e){let t=this.getConditionType(e),i={},s=this.getValues(e);return s.length>0&&(i.dateFrom=iJ(s[0])),s.length>1&&(i.dateTo=iJ(s[1])),B({dateFrom:null,dateTo:null,filterType:this.getFilterType(),type:t},i)}resetPlaceholder(){let e=this.localeService.getLocaleTextFunc(),t=this.translate("dateFormatOoo"),i=e("ariaFilterValue","Filter Value");this.forEachInput(e=>{e.setInputPlaceholder(t),e.setInputAriaLabel(i)})}getInputs(e){return e>=this.dateConditionFromComps.length?[null,null]:[this.dateConditionFromComps[e],this.dateConditionToComps[e]]}getValues(e){let t=[];return this.forEachPositionInput(e,(e,i,s,o)=>{i<o&&t.push(e.getDate())}),t}translate(e){return e===oA.LESS_THAN?super.translate("before"):e===oA.GREATER_THAN?super.translate("after"):super.translate(e)}getModelAsString(e){var t;return null!=(t=this.filterModelFormatter.getModelAsString(e))?t:""}};oL.DEFAULT_FILTER_OPTIONS=[oA.EQUALS,oA.NOT_EQUAL,oA.LESS_THAN,oA.GREATER_THAN,oA.IN_RANGE,oA.BLANK,oA.NOT_BLANK],K([eB("userComponentFactory")],oL.prototype,"userComponentFactory",2);var oM=oL,oN=class extends s9{getDefaultDebounceMs(){return 0}destroy(){super.destroy()}isEventFromFloatingFilter(e){return e&&e.afterFloatingFilter}isEventFromDataChange(e){return null==e?void 0:e.afterDataChange}getLastType(){return this.lastType}isReadOnly(){return this.readOnly}setLastTypeFromModel(e){let t;if(!e){this.lastType=this.optionsFactory.getDefaultOption();return}t=e.operator?e.conditions[0]:e,this.lastType=t.type}canWeEditAfterModelFromParentFilter(e){return e?!e.operator&&this.isTypeEditable(e.type):this.isTypeEditable(this.lastType)}init(e){this.setSimpleParams(e,!1)}setSimpleParams(e,t=!0){this.optionsFactory=new or,this.optionsFactory.init(e.filterParams,this.getDefaultFilterOptions()),t||(this.lastType=this.optionsFactory.getDefaultOption()),this.readOnly=!!e.filterParams.readOnly;let i=this.isTypeEditable(this.optionsFactory.getDefaultOption());this.setEditable(i)}onParamsUpdated(e){this.refresh(e)}refresh(e){this.setSimpleParams(e)}doesFilterHaveSingleInput(e){let{numberOfInputs:t}=this.optionsFactory.getCustomOption(e)||{};return null==t||1==t}isTypeEditable(e){let t=[ob.IN_RANGE,ob.EMPTY,ob.BLANK,ob.NOT_BLANK];return!!e&&!this.isReadOnly()&&this.doesFilterHaveSingleInput(e)&&0>t.indexOf(e)}getAriaLabel(e){let t=this.columnModel.getDisplayNameForColumn(e.column,"header",!0),i=this.localeService.getLocaleTextFunc();return`${t} ${i("ariaFilterInput","Filter Input")}`}};K([eB("columnModel")],oN.prototype,"columnModel",2);var oI=class extends oN{constructor(){super(`
55            <div class="ag-floating-filter-input" role="presentation">
56                <ag-input-text-field ref="eReadOnlyText"></ag-input-text-field>
57                <div ref="eDateWrapper" style="display: flex;"></div>
58            </div>`)}getDefaultFilterOptions(){return oM.DEFAULT_FILTER_OPTIONS}init(e){super.init(e),this.params=e,this.filterParams=e.filterParams,this.createDateComponent(),this.filterModelFormatter=new oF(this.filterParams,this.localeService,this.optionsFactory);let t=this.localeService.getLocaleTextFunc();this.eReadOnlyText.setDisabled(!0).setInputAriaLabel(t("ariaDateFilterInput","Date Filter Input"))}onParamsUpdated(e){this.refresh(e)}refresh(e){super.refresh(e),this.params=e,this.filterParams=e.filterParams,this.updateDateComponent(),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory,dateFilterParams:this.filterParams}),this.updateCompOnModelChange(e.currentParentModel())}updateCompOnModelChange(e){let t=!this.isReadOnly()&&this.canWeEditAfterModelFromParentFilter(e);this.setEditable(t),t?(e?this.dateComp.setDate(i1(e.dateFrom)):this.dateComp.setDate(null),this.eReadOnlyText.setValue("")):(this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null))}setEditable(e){i8(this.eDateWrapper,e),i8(this.eReadOnlyText.getGui(),!e)}onParentModelChanged(e,t){this.isEventFromFloatingFilter(t)||this.isEventFromDataChange(t)||(super.setLastTypeFromModel(e),this.updateCompOnModelChange(e))}onDateChanged(){let e=iJ(this.dateComp.getDate());this.params.parentFilterInstance(t=>{if(t){let i=i1(e);t.onFloatingFilterChanged(this.getLastType()||null,i)}})}getDateComponentParams(){let e=op.getDebounceMs(this.params.filterParams,this.getDefaultDebounceMs());return{onDateChanged:eP(this.onDateChanged.bind(this),e),filterParams:this.params.column.getColDef().filterParams}}createDateComponent(){this.dateComp=new oo(this.getContext(),this.userComponentFactory,this.getDateComponentParams(),this.eDateWrapper,e=>{e.setInputAriaLabel(this.getAriaLabel(this.params))}),this.addDestroyFunc(()=>this.dateComp.destroy())}updateDateComponent(){let e=this.gos.addGridCommonParams(this.getDateComponentParams());this.dateComp.updateParams(e)}getFilterModelFormatter(){return this.filterModelFormatter}};K([eB("userComponentFactory")],oI.prototype,"userComponentFactory",2),K([ot("eReadOnlyText")],oI.prototype,"eReadOnlyText",2),K([ot("eDateWrapper")],oI.prototype,"eDateWrapper",2);var oG=class extends s9{constructor(){super(`
59            <div class="ag-filter-filter">
60                <ag-input-text-field class="ag-date-filter" ref="eDateInput"></ag-input-text-field>
61            </div>`)}destroy(){super.destroy()}init(e){this.params=e,this.setParams(e);let t=this.eDateInput.getInputElement();this.addManagedListener(t,"mousedown",()=>{this.eDateInput.isDisabled()||this.usingSafariDatePicker||t.focus()}),this.addManagedListener(t,"input",e=>{e.target!==this.gos.getActiveDomElement()||this.eDateInput.isDisabled()||this.params.onDateChanged()})}setParams(e){let t=this.eDateInput.getInputElement(),i=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=i&&iF(),t.type=i?"date":"text";let{minValidYear:s,maxValidYear:o,minValidDate:r,maxValidDate:n}=e.filterParams||{};if(r&&s&&ew("DateFilter should not have both minValidDate and minValidYear parameters set at the same time! minValidYear will be ignored."),n&&o&&ew("DateFilter should not have both maxValidDate and maxValidYear parameters set at the same time! maxValidYear will be ignored."),r&&n){let[e,t]=[r,n].map(e=>e instanceof Date?e:i1(e));e&&t&&e.getTime()>t.getTime()&&ew("DateFilter parameter minValidDate should always be lower than or equal to parameter maxValidDate.")}r?r instanceof Date?t.min=i0(r):t.min=r:s&&(t.min=`${s}-01-01`),n?n instanceof Date?t.max=i0(n):t.max=n:o&&(t.max=`${o}-12-31`)}onParamsUpdated(e){this.refresh(e)}refresh(e){this.params=e,this.setParams(e)}getDate(){return i1(this.eDateInput.getValue())}setDate(e){this.eDateInput.setValue(iJ(e,!1))}setInputPlaceholder(e){this.eDateInput.setInputPlaceholder(e)}setInputAriaLabel(e){this.eDateInput.setAriaLabel(e)}setDisabled(e){this.eDateInput.setDisabled(e)}afterGuiAttached(e){e&&e.suppressFocus||this.eDateInput.getInputElement().focus()}
61shouldUseBrowserDatePicker(e){return e.filterParams&&null!=e.filterParams.browserDatePicker?e.filterParams.browserDatePicker:iM()||iN()||iF()&&iL()>=14.1}};K([ot("eDateInput")],oG.prototype,"eDateInput",2);var oO=class extends oS{constructor(e,t="ag-text-field",i="text"){super(e,t,i)}postConstruct(){super.postConstruct(),this.config.allowedCharPattern&&this.preventDisallowedCharacters()}setValue(e,t){return this.eInput.value!==e&&(this.eInput.value=q(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}preventDisallowedCharacters(){let e=RegExp(`[${this.config.allowedCharPattern}]`);this.addManagedListener(this.eInput,"keydown",t=>{sB(t)&&t.key&&!e.test(t.key)&&t.preventDefault()}),this.addManagedListener(this.eInput,"paste",t=>{var i;let s=null==(i=t.clipboardData)?void 0:i.getData("text");s&&s.split("").some(t=>!e.test(t))&&t.preventDefault()})}},ox=class extends oO{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct(),this.addManagedListener(this.eInput,"blur",()=>{let e=parseFloat(this.eInput.value),t=isNaN(e)?"":this.normalizeValue(e.toString());this.value!==t&&this.setValue(t)}),this.addManagedListener(this.eInput,"wheel",this.onWheel.bind(this)),this.eInput.step="any";let{precision:e,min:t,max:i,step:s}=this.config;"number"==typeof e&&this.setPrecision(e),"number"==typeof t&&this.setMin(t),"number"==typeof i&&this.setMax(i),"number"==typeof s&&this.setStep(s)}onWheel(e){this.gos.getActiveDomElement()===this.eInput&&e.preventDefault()}normalizeValue(e){if(""===e)return"";null!=this.precision&&(e=this.adjustPrecision(e));let t=parseFloat(e);return null!=this.min&&t<this.min?e=this.min.toString():null!=this.max&&t>this.max&&(e=this.max.toString()),e}adjustPrecision(e,t){if(null==this.precision)return e;if(t)return parseFloat(parseFloat(e).toFixed(this.precision)).toString();let i=String(e).split(".");if(i.length>1){if(i[1].length<=this.precision)return e;if(this.precision>0)return`${i[0]}.${i[1].slice(0,this.precision)}`}return i[0]}setMin(e){return this.min===e||(this.min=e,sF(this.eInput,"min",e)),this}setMax(e){return this.max===e||(this.max=e,sF(this.eInput,"max",e)),this}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e||(this.step=e,sF(this.eInput,"step",e)),this}setValue(e,t){return this.setValueOrInputValue(e=>super.setValue(e,t),()=>this,e)}setStartValue(e){return this.setValueOrInputValue(e=>super.setValue(e,!0),e=>{this.eInput.value=e},e)}setValueOrInputValue(e,t,i){if(q(i)){let s=this.isScientificNotation(i);if(s&&this.eInput.validity.valid)return e(i);if(!s){i=this.adjustPrecision(i);let e=this.normalizeValue(i);s=i!=e}if(s)return t(i)}return e(i)}getValue(){if(!this.eInput.validity.valid)return;let e=this.eInput.value;return this.isScientificNotation(e)?this.adjustPrecision(e,!0):super.getValue()}isScientificNotation(e){return"string"==typeof e&&e.includes("e")}},o_=class extends oD{conditionToString(e,t){let{numberOfInputs:i}=t||{};return e.type==ob.IN_RANGE||2===i?`${this.formatValue(e.filter)}-${this.formatValue(e.filterTo)}
61`:null!=e.filter?this.formatValue(e.filter):`${e.type}`}};function oV(e){let{allowedCharPattern:t}=null!=e?e:{};return null!=t?t:null}var oH=class e extends oA{constructor(){super("numberFilter"),this.eValuesFrom=[],this.eValuesTo=[]}refresh(e){return this.numberFilterParams.allowedCharPattern===e.allowedCharPattern&&super.refresh(e)}mapValuesFromModel(e){let{filter:t,filterTo:i,type:s}=e||{};return[this.processValue(t),this.processValue(i)].slice(0,this.getNumberOfInputs(s))}getDefaultDebounceMs(){return 500}comparator(){return(e,t)=>e===t?0:e<t?1:-1}setParams(e){this.numberFilterParams=e,super.setParams(e),this.filterModelFormatter=new o_(this.localeService,this.optionsFactory,this.numberFilterParams.numberFormatter)}getDefaultFilterOptions(){return e.DEFAULT_FILTER_OPTIONS}setElementValue(e,t,i){let s=!i&&this.numberFilterParams.numberFormatter?this.numberFilterParams.numberFormatter(null!=t?t:null):t;super.setElementValue(e,s)}createValueElement(){let e=oV(this.numberFilterParams),t=document.createElement("div");return t.classList.add("ag-filter-body"),t4(t,"presentation"),this.createFromToElement(t,this.eValuesFrom,"from",e),this.createFromToElement(t,this.eValuesTo,"to",e),t}createFromToElement(e,t,i,s){let o=this.createManagedBean(s?new oO({allowedCharPattern:s}):new ox);o.addCssClass(`ag-filter-${i}`),o.addCssClass("ag-filter-filter"),t.push(o),e.appendChild(o.getGui())}removeValueElements(e,t){this.removeComponents(this.eValuesFrom,e,t),this.removeComponents(this.eValuesTo,e,t)}getValues(e){let t=[];return this.forEachPositionInput(e,(e,i,s,o)=>{i<o&&t.push(this.processValue(this.stringToFloat(e.getValue())))}),t}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}getFilterType(){return"number"}processValue(e){return null==e?null:isNaN(e)?null:e}stringToFloat(e){if("number"==typeof e)return e;let t=j(e);return(null!=t&&""===t.trim()&&(t=null),this.numberFilterParams.numberParser)?this.numberFilterParams.numberParser(t):null==t||"-"===t.trim()?null:parseFloat(t)}createCondition(e){let t=this.getConditionType(e),i={filterType:this.getFilterType(),type:t},s=this.getValues(e);return s.length>0&&(i.filter=s[0]),s.length>1&&(i.filterTo=s[1]),i}getInputs(e){return e>=this.eValuesFrom.length?[null,null]:[this.eValuesFrom[e],this.eValuesTo[e]]}getModelAsString(e){var t;return null!=(t=this.filterModelFormatter.getModelAsString(e))?t:""}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>{if(!t.getInputElement().validity.valid){e=!0;return}}),e}};oH.DEFAULT_FILTER_OPTIONS=[oA.EQUALS,oA.NOT_EQUAL,oA.GREATER_THAN,oA.GREATER_THAN_OR_EQUAL,oA.LESS_THAN,oA.LESS_THAN_OR_EQUAL,oA.IN_RANGE,oA.BLANK,oA.NOT_BLANK];var ok=oH,oB=class extends oD{conditionToString(e,t){let{numberOfInputs:i}=t||{};return e.type==ob.IN_RANGE||2===i?`${e.filter}-${e.filterTo}
61`:null!=e.filter?`${e.filter}`:`${e.type}`}},oW=class e extends ob{constructor(){super("textFilter"),this.eValuesFrom=[],this.eValuesTo=[]}static trimInput(e){let t=e&&e.trim();return""===t?e:t}getDefaultDebounceMs(){return 500}setParams(t){this.textFilterParams=t,super.setParams(t),this.matcher=this.getTextMatcher(),this.formatter=this.textFilterParams.textFormatter||(this.textFilterParams.caseSensitive?e.DEFAULT_FORMATTER:e.DEFAULT_LOWERCASE_FORMATTER),this.filterModelFormatter=new oB(this.localeService,this.optionsFactory)}getTextMatcher(){let t=this.textFilterParams.textCustomComparator;return t?(sJ.warnOnce("textCustomComparator is deprecated, use textMatcher instead."),({filterOption:e,value:i,filterText:s})=>t(e,i,s)):this.textFilterParams.textMatcher||e.DEFAULT_MATCHER}createCondition(e){let t=this.getConditionType(e),i={filterType:this.getFilterType(),type:t},s=this.getValuesWithSideEffects(e,!0);return s.length>0&&(i.filter=s[0]),s.length>1&&(i.filterTo=s[1]),i}getFilterType(){return"text"}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}getInputs(e){return e>=this.eValuesFrom.length?[null,null]:[this.eValuesFrom[e],this.eValuesTo[e]]}getValues(e){return this.getValuesWithSideEffects(e,!1)}getValuesWithSideEffects(t,i){let s=[];return this.forEachPositionInput(t,(t,o,r,n)=>{var l;if(o<n){let o=j(t.getValue());i&&this.textFilterParams.trimInput&&(o=null!=(l=e.trimInput(o))?l:null,t.setValue(o,!0)),s.push(o)}}),s}getDefaultFilterOptions(){return e.DEFAULT_FILTER_OPTIONS}createValueElement(){let e=document.createElement("div");return e.classList.add("ag-filter-body"),t4(e,"presentation"),this.createFromToElement(e,this.eValuesFrom,"from"),this.createFromToElement(e,this.eValuesTo,"to"),e}createFromToElement(e,t,i){let s=this.createManagedBean(new oO);s.addCssClass(`ag-filter-${i}`),s.addCssClass("ag-filter-filter"),t.push(s),e.appendChild(s.getGui())}removeValueElements(e,t){this.removeComponents(this.eValuesFrom,e,t),this.removeComponents(this.eValuesTo,e,t)}mapValuesFromModel(e){let{filter:t,filterTo:i,type:s}=e||{};return[t||null,i||null].slice(0,this.getNumberOfInputs(s))}evaluateNullValue(e){let t=[ob.NOT_EQUAL,ob.NOT_CONTAINS,ob.BLANK];return!!e&&t.indexOf(e)>=0}evaluateNonNullValue(e,t,i,s){let o=e.map(e=>this.formatter(e))||[],r=this.formatter(t),{api:n,colDef:l,column:a,columnApi:h,context:d,textFormatter:u}=this.textFilterParams;if(i.type===ob.BLANK)return this.isBlank(t);if(i.type===ob.NOT_BLANK)return!this.isBlank(t);let c={api:n,colDef:l,column:a,columnApi:h,context:d,node:s.node,data:s.data,filterOption:i.type,value:r,textFormatter:u};return o.some(e=>this.matcher(W(B({},c),{filterText:e})))}getModelAsString(e){var t;return null!=(t=this.filterModelFormatter.getModelAsString(e))?t:""}};oW.DEFAULT_FILTER_OPTIONS=[ob.CONTAINS,ob.NOT_CONTAINS,ob.EQUALS,ob.NOT_EQUAL,ob.STARTS_WITH,ob.ENDS_WITH,ob.BLANK,ob.NOT_BLANK],oW.DEFAULT_FORMATTER=e=>e,oW.DEFAULT_LOWERCASE_FORMATTER=e=>null==e?null:e.toString().toLowerCase(),oW.DEFAULT_MATCHER=({filterOption:e,value:t,filterText:i})=>{if(null==i)return!1;switch(e){case oW.CONTAINS:return t.indexOf(i)>=0;case oW.NOT_CONTAINS:return 0>t.indexOf(i);case oW.EQUALS:return t===i;case oW.NOT_EQUAL:return t!=i;case oW.STARTS_WITH:return 0===t.indexOf(i);case oW.ENDS_WITH:let s=t.lastIndexOf(i);return s>=0&&s===t.length-i.length;default:return!1}};var oU=oW,oz=class extends tR{constructor(e){super(),this.params=e,this.valueChangedListener=()=>{}}setupGui(e){var t;this.eFloatingFilterTextInput=this.createManagedBean(new oO(null==(t=this.params)?void 0:t.config));let i=this.eFloatingFilterTextInput.getGui();e.appendChild(i),this.addManagedListener(i,"input",e=>this.valueChangedListener(e)),this.addManagedListener(i,"keydown",e=>this.valueChangedListener(e))}setEditable(e){this.eFloatingFilterTextInput.setDisabled(!e)}setAutoComplete(e){this.eFloatingFilterTextInput.setAutoComplete(e)}getValue(){return this.eFloatingFilterTextInput.getValue()}setValue(e,t){this.eFloatingFilterTextInput.setValue(e,t)}setValueChangedListener(e){this.valueChangedListener=e}setParams(e){this.setAriaLabel(e.ariaLabel),void 0!==e.autoComplete&&this.setAutoComplete(e.autoComplete)}setAriaLabel(e){this.eFloatingFilterTextInput.setInputAriaLabel(e)}},oK=class extends oN{postConstruct(){this.setTemplate(`
62            <div class="ag-floating-filter-input" role="presentation" ref="eFloatingFilterInputContainer"></div>
63        `)}getDefaultDebounceMs(){return 500}onParentModelChanged(e,t){this.isEventFromFloatingFilter(t)||this.isEventFromDataChange(t)||(this.setLastTypeFromModel(e),this.setEditable(this.canWeEditAfterModelFromParentFilter(e)),this.floatingFilterInputService.setValue(this.getFilterModelFormatter().getModelAsString(e)))}init(e){this.setupFloatingFilterInputService(e),super.init(e),this.setTextInputParams(e)}setupFloatingFilterInputService(e){this.floatingFilterInputService=this.createFloatingFilterInputService(e),this.floatingFilterInputService.setupGui(this.eFloatingFilterInputContainer)}setTextInputParams(e){var t;this.params=e;let i=null!=(t=e.browserAutoComplete)&&t;if(this.floatingFilterInputService.setParams({ariaLabel:this.getAriaLabel(e),autoComplete:i}),this.applyActive=op.isUseApplyButton(this.params.filterParams),!this.isReadOnly()){let e=op.getDebounceMs(this.params.filterParams,this.getDefaultDebounceMs()),t=eP(this.syncUpWithParentFilter.bind(this),e);this.floatingFilterInputService.setValueChangedListener(t)}}onParamsUpdated(e){this.refresh(e)}refresh(e){super.refresh(e),this.setTextInputParams(e)}recreateFloatingFilterInputService(e){let t=this.floatingFilterInputService.getValue();sd(this.eFloatingFilterInputContainer),this.destroyBean(this.floatingFilterInputService),this.setupFloatingFilterInputService(e),this.floatingFilterInputService.setValue(t,!0)}syncUpWithParentFilter(e){let t=e.key===sk.ENTER;if(this.applyActive&&!t)return;let i=this.floatingFilterInputService.getValue();this.params.filterParams.trimInput&&(i=oU.trimInput(i),this.floatingFilterInputService.setValue(i,!0)),this.params.parentFilterInstance(e=>{e&&e.onFloatingFilterChanged(this.getLastType()||null,i||null)})}setEditable(e){this.floatingFilterInputService.setEditable(e)}};K([ot("eFloatingFilterInputContainer")],oK.prototype,"eFloatingFilterInputContainer",2),K([eV],oK.prototype,"postConstruct",1);var o$=class extends tR{constructor(){super(...arguments),this.valueChangedListener=()=>{},this.numberInputActive=!0}setupGui(e){this.eFloatingFilterNumberInput=this.createManagedBean(new ox),this.eFloatingFilterTextInput=this.createManagedBean(new oO),this.eFloatingFilterTextInput.setDisabled(!0);let t=this.eFloatingFilterNumberInput.getGui(),i=this.eFloatingFilterTextInput.getGui();e.appendChild(t),e.appendChild(i),this.setupListeners(t,e=>this.valueChangedListener(e)),this.setupListeners(i,e=>this.valueChangedListener(e))}setEditable(e){this.numberInputActive=e,this.eFloatingFilterNumberInput.setDisplayed(this.numberInputActive),this.eFloatingFilterTextInput.setDisplayed(!this.numberInputActive)}setAutoComplete(e){this.eFloatingFilterNumberInput.setAutoComplete(e),this.eFloatingFilterTextInput.setAutoComplete(e)}getValue(){return this.getActiveInputElement().getValue()}setValue(e,t){this.getActiveInputElement().setValue(e,t)}getActiveInputElement(){return this.numberInputActive?this.eFloatingFilterNumberInput:this.eFloatingFilterTextInput}setValueChangedListener(e){this.valueChangedListener=e}setupListeners(e,t){this.addManagedListener(e,"input",t),this.addManagedListener(e,"keydown",t)}setParams(e){this.setAriaLabel(e.ariaLabel),void 0!==e.autoComplete&&this.setAutoComplete(e.autoComplete)}setAriaLabel(e){this.eFloatingFilterNumberInput.setInputAriaLabel(e),this.eFloatingFilterTextInput.setInputAriaLabel(e)}},oY=class extends oK{init(e){var t;super.init(e),this.filterModelFormatter=new o_(this.localeService,this.optionsFactory,null==(t=e.filterParams)?void 0:t.numberFormatter)}onParamsUpdated(e){this.refresh(e)}
63refresh(e){oV(e.filterParams)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),super.refresh(e),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory})}getDefaultFilterOptions(){return ok.DEFAULT_FILTER_OPTIONS}getFilterModelFormatter(){return this.filterModelFormatter}createFloatingFilterInputService(e){return(this.allowedCharPattern=oV(e.filterParams),this.allowedCharPattern)?this.createManagedBean(new oz({config:{allowedCharPattern:this.allowedCharPattern}})):this.createManagedBean(new o$)}},oj=class extends oK{init(e){super.init(e),this.filterModelFormatter=new oB(this.localeService,this.optionsFactory)}onParamsUpdated(e){this.refresh(e)}refresh(e){super.refresh(e),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory})}getDefaultFilterOptions(){return oU.DEFAULT_FILTER_OPTIONS}getFilterModelFormatter(){return this.filterModelFormatter}createFloatingFilterInputService(){return this.createManagedBean(new oz)}},oq=class e{constructor(e,t=!1){this.destroyFuncs=[],this.touching=!1,this.eventService=new e$,this.eElement=e,this.preventMouseClick=t;let i=this.onTouchStart.bind(this),s=this.onTouchMove.bind(this),o=this.onTouchEnd.bind(this);this.eElement.addEventListener("touchstart",i,{passive:!0}),this.eElement.addEventListener("touchmove",s,{passive:!0}),this.eElement.addEventListener("touchend",o,{passive:!1}),this.destroyFuncs.push(()=>{this.eElement.removeEventListener("touchstart",i,{passive:!0}),this.eElement.removeEventListener("touchmove",s,{passive:!0}),this.eElement.removeEventListener("touchend",o,{passive:!1})})}getActiveTouch(e){for(let t=0;t<e.length;t++)if(e[t].identifier===this.touchStart.identifier)return e[t];return null}addEventListener(e,t){this.eventService.addEventListener(e,t)}removeEventListener(e,t){this.eventService.removeEventListener(e,t)}onTouchStart(t){if(this.touching)return;this.touchStart=t.touches[0],this.touching=!0,this.moved=!1;let i=this.touchStart;window.setTimeout(()=>{let s=this.touchStart===i;if(this.touching&&s&&!this.moved){this.moved=!0;let i={type:e.EVENT_LONG_TAP,touchStart:this.touchStart,touchEvent:t};this.eventService.dispatchEvent(i)}},500)}onTouchMove(e){if(!this.touching)return;let t=this.getActiveTouch(e.touches);t&&(sY(t,this.touchStart,4)||(this.moved=!0))}onTouchEnd(t){if(this.touching){if(!this.moved){let t={type:e.EVENT_TAP,touchStart:this.touchStart};this.eventService.dispatchEvent(t),this.checkForDoubleTap()}this.preventMouseClick&&t.cancelable&&t.preventDefault(),this.touching=!1}}checkForDoubleTap(){let t=new Date().getTime();if(this.lastTapTime&&this.lastTapTime>0){if(t-this.lastTapTime>e.DOUBLE_TAP_MILLIS){let t={type:e.EVENT_DOUBLE_TAP,touchStart:this.touchStart};this.eventService.dispatchEvent(t),this.lastTapTime=null}else this.lastTapTime=t}else this.lastTapTime=t}destroy(){this.destroyFuncs.forEach(e=>e())}};oq.EVENT_TAP="tap",oq.EVENT_DOUBLE_TAP="doubleTap",oq.EVENT_LONG_TAP="longTap",oq.DOUBLE_TAP_MILLIS=500;var oQ=oq,oX=class e extends s9{constructor(t){super(),t||this.setTemplate(e.TEMPLATE)}attachCustomElements(e,t,i,s,o){this.eSortOrder=e,this.eSortAsc=t,this.eSortDesc=i,this.eSortMixed=s,this.eSortNone=o}setupSort(e,t=!1){this.column=e,this.suppressOrder=t,this.setupMultiSortIndicator(),(this.column.isSortable()||this.column.getColDef().showRowGroup)&&(this.addInIcon("sortAscending",this.eSortAsc,e),this.addInIcon("sortDescending",this.eSortDesc,e),this.addInIcon("sortUnSort",this.eSortNone,e),this.addManagedPropertyListener("unSortIcon",()=>this.updateIcons()),this.addManagedListener(this.eventService,tP.EVENT_NEW_COLUMNS_LOADED,()=>this.updateIcons()),this.addManagedListener(this.eventService,tP.EVENT_SORT_CHANGED,()=>this.onSortChanged()),this.addManagedListener(this.eventService,tP.EVENT_COLUMN_ROW_GROUP_CHANGED,()=>this.onSortChanged()),this.onSortChanged())}addInIcon(e,t,i){if(null==t)return;let s=sV(e,this.gos,i);s&&t.appendChild(s)}onSortChanged(){this.updateIcons(),this.suppressOrder||this.updateSortOrder()}updateIcons(){let e=this.sortController.getDisplaySortForColumn(this.column);if(this.eSortAsc&&i8(this.eSortAsc,"asc"===e,{skipAriaHidden:!0}
63),this.eSortDesc&&i8(this.eSortDesc,"desc"===e,{skipAriaHidden:!0}),this.eSortNone){let t=!this.column.getColDef().unSortIcon&&!this.gos.get("unSortIcon");i8(this.eSortNone,!t&&null==e,{skipAriaHidden:!0})}}setupMultiSortIndicator(){this.addInIcon("sortUnSort",this.eSortMixed,this.column);let e=this.column.getColDef().showRowGroup;this.gos.isColumnsSortingCoupledToGroup()&&e&&(this.addManagedListener(this.eventService,tP.EVENT_SORT_CHANGED,()=>this.updateMultiSortIndicator()),this.addManagedListener(this.eventService,tP.EVENT_COLUMN_ROW_GROUP_CHANGED,()=>this.updateMultiSortIndicator()),this.updateMultiSortIndicator())}updateMultiSortIndicator(){if(this.eSortMixed){let e="mixed"===this.sortController.getDisplaySortForColumn(this.column);i8(this.eSortMixed,e,{skipAriaHidden:!0})}}updateSortOrder(){var e;if(!this.eSortOrder)return;let t=this.sortController.getColumnsWithSortingOrdered(),i=null!=(e=this.sortController.getDisplaySortIndexForColumn(this.column))?e:-1,s=t.some(e=>{var t;return null!=(t=this.sortController.getDisplaySortIndexForColumn(e))&&t});i8(this.eSortOrder,i>=0&&s,{skipAriaHidden:!0}),i>=0?this.eSortOrder.textContent=(i+1).toString():sd(this.eSortOrder)}};oX.TEMPLATE=`<span class="ag-sort-indicator-container">
64            <span ref="eSortOrder" class="ag-sort-indicator-icon ag-sort-order ag-hidden" aria-hidden="true"></span>
65            <span ref="eSortAsc" class="ag-sort-indicator-icon ag-sort-ascending-icon ag-hidden" aria-hidden="true"></span>
66            <span ref="eSortDesc" class="ag-sort-indicator-icon ag-sort-descending-icon ag-hidden" aria-hidden="true"></span>
67            <span ref="eSortMixed" class="ag-sort-indicator-icon ag-sort-mixed-icon ag-hidden" aria-hidden="true"></span>
68            <span ref="eSortNone" class="ag-sort-indicator-icon ag-sort-none-icon ag-hidden" aria-hidden="true"></span>
69        </span>`,K([ot("eSortOrder")],oX.prototype,"eSortOrder",2),K([ot("eSortAsc")],oX.prototype,"eSortAsc",2),K([ot("eSortDesc")],oX.prototype,"eSortDesc",2),K([ot("eSortMixed")],oX.prototype,"eSortMixed",2),K([ot("eSortNone")],oX.prototype,"eSortNone",2),K([eB("columnModel")],oX.prototype,"columnModel",2),K([eB("sortController")],oX.prototype,"sortController",2);var oJ=oX,oZ=class e extends s9{constructor(){super(...arguments),this.lastMovingChanged=0}destroy(){super.destroy()}refresh(e){let t=this.params;return this.params=e,this.workOutTemplate()==this.currentTemplate&&this.workOutShowMenu()==this.currentShowMenu&&this.workOutSort()==this.currentSort&&this.shouldSuppressMenuHide()==this.currentSuppressMenuHide&&t.enableFilterButton==e.enableFilterButton&&t.enableFilterIcon==e.enableFilterIcon&&(this.setDisplayName(e),!0)}workOutTemplate(){var t;let i=null!=(t=this.params.template)?t:e.TEMPLATE;return i&&i.trim?i.trim():i}init(e){this.params=e,this.currentTemplate=this.workOutTemplate(),this.setTemplate(this.currentTemplate),this.setupTap(),this.setMenu(),this.setupSort(),this.setupFilterIcon(),this.setupFilterButton(),this.setDisplayName(e)}setDisplayName(e){if(this.currentDisplayName!=e.displayName){this.currentDisplayName=e.displayName;let t=tV(this.currentDisplayName,!0);this.eText&&(this.eText.textContent=t)}}addInIcon(e,t,i){if(null==t)return;let s=sV(e,this.gos,i);s&&t.appendChild(s)}setupTap(){let{gos:e}=this;if(e.get("suppressTouch"))return;let t=new oQ(this.getGui(),!0),i=this.shouldSuppressMenuHide(),s=i&&q(this.eMenu),o=s?new oQ(this.eMenu,!0):t;if(this.params.enableMenu&&this.addManagedListener(o,oQ[s?"EVENT_TAP":"EVENT_LONG_TAP"],e=>this.params.showColumnMenuAfterMouseClick(e.touchStart)),this.params.enableSorting&&this.addManagedListener(t,oQ.EVENT_TAP,e=>{var t,s;let o=e.touchStart.target;i&&((null==(t=this.eMenu)?void 0:t.contains(o))||(null==(s=this.eFilterButton)?void 0:s.contains(o)))||this.sortController.progressSort(this.params.column,!1,"uiColumnSorted")}),this.params.enableFilterButton){let e=new oQ(this.eFilterButton,!0);this.addManagedListener(e,"tap",()=>this.params.showFilter(this.eFilterButton)),this.addDestroyFunc(()=>e.destroy())}this.addDestroyFunc(()=>t.destroy()),s&&this.addDestroyFunc(()=>o.destroy())}workOutShowMenu(){return this.params.enableMenu&&this.menuService.isHeaderMenuButtonEnabled()}shouldSuppressMenuHide(){return this.menuService.isHeaderMenuButtonAlwaysShowEnabled()}
69setMenu(){if(!this.eMenu)return;if(this.currentShowMenu=this.workOutShowMenu(),!this.currentShowMenu){su(this.eMenu),this.eMenu=void 0;return}let e=this.menuService.isLegacyMenuEnabled();this.addInIcon(e?"menu":"menuAlt",this.eMenu,this.params.column),this.eMenu.classList.toggle("ag-header-menu-icon",!e),this.currentSuppressMenuHide=this.shouldSuppressMenuHide(),this.addManagedListener(this.eMenu,"click",()=>this.params.showColumnMenu(this.eMenu)),this.eMenu.classList.toggle("ag-header-menu-always-show",this.currentSuppressMenuHide)}onMenuKeyboardShortcut(e){var t,i,s,o;let{column:r}=this.params,n=this.menuService.isLegacyMenuEnabled();if(e&&!n){if(this.menuService.isFilterMenuInHeaderEnabled(r))return this.params.showFilter(null!=(i=null!=(t=this.eFilterButton)?t:this.eMenu)?i:this.getGui()),!0}else if(this.params.enableMenu)return this.params.showColumnMenu(null!=(o=null!=(s=this.eMenu)?s:this.eFilterButton)?o:this.getGui()),!0;return!1}workOutSort(){return this.params.enableSorting}setupSort(){if(this.currentSort=this.params.enableSorting,this.eSortIndicator||(this.eSortIndicator=this.context.createBean(new oJ(!0)),this.eSortIndicator.attachCustomElements(this.eSortOrder,this.eSortAsc,this.eSortDesc,this.eSortMixed,this.eSortNone)),this.eSortIndicator.setupSort(this.params.column),!this.currentSort)return;this.addManagedListener(this.params.column,eX.EVENT_MOVING_CHANGED,()=>{this.lastMovingChanged=new Date().getTime()}),this.eLabel&&this.addManagedListener(this.eLabel,"click",e=>{let t=this.params.column.isMoving(),i=new Date().getTime()-this.lastMovingChanged<50;if(!(t||i)){let t="ctrl"===this.gos.get("multiSortKey")?e.ctrlKey||e.metaKey:e.shiftKey;this.params.progressSort(t)}});let e=()=>{if(this.addOrRemoveCssClass("ag-header-cell-sorted-asc",this.params.column.isSortAscending()),this.addOrRemoveCssClass("ag-header-cell-sorted-desc",this.params.column.isSortDescending()),this.addOrRemoveCssClass("ag-header-cell-sorted-none",this.params.column.isSortNone()),this.params.column.getColDef().showRowGroup){let e=this.columnModel.getSourceColumnsForGroupColumn(this.params.column),t=null==e?void 0:e.every(e=>this.params.column.getSort()==e.getSort());this.addOrRemoveCssClass("ag-header-cell-sorted-mixed",!t)}};this.addManagedListener(this.eventService,tP.EVENT_SORT_CHANGED,e),this.addManagedListener(this.eventService,tP.EVENT_COLUMN_ROW_GROUP_CHANGED,e)}setupFilterIcon(){this.eFilter&&this.configureFilter(this.params.enableFilterIcon,this.eFilter,this.onFilterChangedIcon.bind(this))}setupFilterButton(){this.eFilterButton&&(this.configureFilter(this.params.enableFilterButton,this.eFilterButton,this.onFilterChangedButton.bind(this))?this.addManagedListener(this.eFilterButton,"click",()=>this.params.showFilter(this.eFilterButton)):this.eFilterButton=void 0)}configureFilter(e,t,i){if(!e)return su(t),!1;let{column:s}=this.params;return this.addInIcon("filter",t,s),this.addManagedListener(s,eX.EVENT_FILTER_CHANGED,i),i(),!0}onFilterChangedIcon(){let e=this.params.column.isFilterActive();i8(this.eFilter,e,{skipAriaHidden:!0})}onFilterChangedButton(){let e=this.params.column.isFilterActive();this.eFilterButton.classList.toggle("ag-filter-active",e)}getAnchorElementForMenu(e){var t,i,s,o;return e?null!=(i=null!=(t=this.eFilterButton)?t:this.eMenu)?i:this.getGui():null!=(o=null!=(s=this.eMenu)?s:this.eFilterButton)?o:this.getGui()}};oZ.TEMPLATE=`<div class="ag-cell-label-container" role="presentation">
70            <span ref="eMenu" class="ag-header-icon ag-header-cell-menu-button" aria-hidden="true"></span>
71            <span ref="eFilterButton" class="ag-header-icon ag-header-cell-filter-button" aria-hidden="true"></span>
72            <div ref="eLabel" class="ag-header-cell-label" role="presentation">
73                <span ref="eText" class="ag-header-cell-text"></span>
74                <span ref="eFilter" class="ag-header-icon ag-header-label-icon ag-filter-icon" aria-hidden="true"></span>
75                <ag-sort-indicator ref="eSortIndicator"></ag-sort-indicator>
76            </div>
77        </div>`,K([eB("sortController")],oZ.prototype,"sortController",2),K([eB("menuService")],oZ.prototype,"menuService",2),K([eB("columnModel")],oZ.prototype,"columnModel",2),K([ot("eFilter")],oZ.prototype,"eFilter",2),K([ot("eFilterButton")],oZ.prototype,"eFilterButton",2),K([ot("eSortIndicator")],oZ.prototype,"eSortIndicator",2),K([ot("eMenu")],oZ.prototype,"eMenu",2),K([ot("eLabel")],oZ.prototype,"eLabel",2),K([ot("eText")],oZ.prototype,"eText",2),K([ot("eSortOrder")],oZ.prototype,"eSortOrder",2),K([ot("eSortAsc")],oZ.prototype,"eSortAsc",2),K([ot("eSortDe
77sc")],oZ.prototype,"eSortDesc",2),K([ot("eSortMixed")],oZ.prototype,"eSortMixed",2),K([ot("eSortNone")],oZ.prototype,"eSortNone",2);var o0=class e extends s9{constructor(){super(e.TEMPLATE)}destroy(){super.destroy()}init(e){this.params=e,this.checkWarnings(),this.setupLabel(),this.addGroupExpandIcon(),this.setupExpandIcons()}checkWarnings(){this.params.template&&ew("A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)")}setupExpandIcons(){this.addInIcon("columnGroupOpened","agOpened"),this.addInIcon("columnGroupClosed","agClosed");let e=e=>{if(tm(e))return;let t=!this.params.columnGroup.isExpanded();this.columnModel.setColumnGroupOpened(this.params.columnGroup.getProvidedColumnGroup(),t,"uiColumnExpanded")};this.addTouchAndClickListeners(this.eCloseIcon,e),this.addTouchAndClickListeners(this.eOpenIcon,e);let t=e=>{tg(e)};this.addManagedListener(this.eCloseIcon,"dblclick",t),this.addManagedListener(this.eOpenIcon,"dblclick",t),this.addManagedListener(this.getGui(),"dblclick",e),this.updateIconVisibility();let i=this.params.columnGroup.getProvidedColumnGroup();this.addManagedListener(i,eZ.EVENT_EXPANDED_CHANGED,this.updateIconVisibility.bind(this)),this.addManagedListener(i,eZ.EVENT_EXPANDABLE_CHANGED,this.updateIconVisibility.bind(this))}addTouchAndClickListeners(e,t){let i=new oQ(e,!0);this.addManagedListener(i,oQ.EVENT_TAP,t),this.addDestroyFunc(()=>i.destroy()),this.addManagedListener(e,"click",t)}updateIconVisibility(){if(this.params.columnGroup.isExpandable()){let e=this.params.columnGroup.isExpanded();i8(this.eOpenIcon,e),i8(this.eCloseIcon,!e)}else i8(this.eOpenIcon,!1),i8(this.eCloseIcon,!1)}addInIcon(e,t){let i=sV(e,this.gos,null);i&&this.getRefElement(t).appendChild(i)}addGroupExpandIcon(){if(!this.params.columnGroup.isExpandable()){i8(this.eOpenIcon,!1),i8(this.eCloseIcon,!1);return}}setupLabel(){var e;let{displayName:t,columnGroup:i}=this.params;if(q(t)){let e=tV(t,!0);this.getRefElement("agLabel").textContent=e}this.addOrRemoveCssClass("ag-sticky-label",!(null==(e=i.getColGroupDef())?void 0:e.suppressStickyLabel))}};o0.TEMPLATE=`<div class="ag-header-group-cell-label" ref="agContainer" role="presentation">
78            <span ref="agLabel" class="ag-header-group-text" role="presentation"></span>
79            <span ref="agOpened" class="ag-header-icon ag-header-expand-icon ag-header-expand-icon-expanded"></span>
80            <span ref="agClosed" class="ag-header-icon ag-header-expand-icon ag-header-expand-icon-collapsed"></span>
81        </div>`,K([eB("columnModel")],o0.prototype,"columnModel",2),K([ot("agOpened")],o0.prototype,"eOpenIcon",2),K([ot("agClosed")],o0.prototype,"eCloseIcon",2);var o1=class extends s9{isPopup(){return!0}setParentComponent(e){e.addCssClass("ag-has-popup"),super.setParentComponent(e)}destroy(){let e=this.parentComponent;e&&e.isAlive()&&e.getGui().classList.remove("ag-has-popup"),super.destroy()}},o2=class e extends o1{constructor(){super(e.TEMPLATE)}init(e){this.params=e,this.focusAfterAttached=e.cellStartedEdit,this.eTextArea.setMaxLength(e.maxLength||200).setCols(e.cols||60).setRows(e.rows||10),q(e.value,!0)&&this.eTextArea.setValue(e.value.toString(),!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()}onKeyDown(e){let t=e.key;(t===sk.LEFT||t===sk.UP||t===sk.RIGHT||t===sk.DOWN||e.shiftKey&&t===sk.ENTER)&&e.stopPropagation()}afterGuiAttached(){let e=this.localeService.getLocaleTextFunc();this.eTextArea.setInputAriaLabel(e("ariaInputEditor","Input Editor")),this.focusAfterAttached&&this.eTextArea.getFocusableElement().focus()}getValue(){let e=this.eTextArea.getValue();return q(e)||q(this.params.value)?this.params.parseValue(e):this.params.value}};o2.TEMPLATE=`<div class="ag-large-text">
82            <ag-input-text-area ref="eTextArea" class="ag-large-text-input"></ag-input-text-area>
83        </div>`,K([ot("eTextArea")],o2.prototype,"eTextArea",2);var o3=o2,o5=class extends o1{constructor(){super(`<div class="ag-cell-edit-wrapper">
84                <ag-select class="ag-cell-editor" ref="eSelect"></ag-select>
85            </div>`),this.startedByEnter=!1}init(e){this.focusAfterAttached=e.cellStartedEdit;let{eSelect:t,valueService:i,gos:s}
85=this,{values:o,value:r,eventKey:n}=e;if(Q(o)){console.warn("AG Grid: no values found for select cellEditor");return}this.startedByEnter=null!=n&&n===sk.ENTER;let l=!1;o.forEach(s=>{let o={value:s},n=i.formatValue(e.column,null,s),a=null!=n;o.text=a?n:s,t.addOption(o),l=l||r===s}),l?t.setValue(e.value,!0):e.values.length&&t.setValue(e.values[0],!0);let{valueListGap:a,valueListMaxWidth:h,valueListMaxHeight:d}=e;null!=a&&t.setPickerGap(a),null!=d&&t.setPickerMaxHeight(d),null!=h&&t.setPickerMaxWidth(h),"fullRow"!==s.get("editType")&&this.addManagedListener(this.eSelect,oE.EVENT_ITEM_SELECTED,()=>e.stopEditing())}afterGuiAttached(){this.focusAfterAttached&&this.eSelect.getFocusableElement().focus(),this.startedByEnter&&setTimeout(()=>{this.isAlive()&&this.eSelect.showPicker()})}focusIn(){this.eSelect.getFocusableElement().focus()}getValue(){return this.eSelect.getValue()}isPopup(){return!1}};K([eB("valueService")],o5.prototype,"valueService",2),K([ot("eSelect")],o5.prototype,"eSelect",2);var o4=class extends o1{constructor(e){super(`
86            <div class="ag-cell-edit-wrapper">
87                ${e.getTemplate()}
88            </div>`),this.cellEditorInput=e}init(e){let t;this.params=e;let i=this.eInput;if(this.cellEditorInput.init(i,e),e.cellStartedEdit){this.focusAfterAttached=!0;let i=e.eventKey;i===sk.BACKSPACE||e.eventKey===sk.DELETE?t="":i&&1===i.length?t=i:(t=this.cellEditorInput.getStartValue(),i!==sk.F2&&(this.highlightAllOnFocus=!0))}else this.focusAfterAttached=!1,t=this.cellEditorInput.getStartValue();null!=t&&i.setStartValue(t),this.addManagedListener(i.getGui(),"keydown",e=>{let{key:t}=e;(t===sk.PAGE_UP||t===sk.PAGE_DOWN)&&e.preventDefault()})}afterGuiAttached(){var e,t;let i=this.localeService.getLocaleTextFunc(),s=this.eInput;if(s.setInputAriaLabel(i("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;iF()||s.getFocusableElement().focus();let o=s.getInputElement();this.highlightAllOnFocus?o.select():null==(t=(e=this.cellEditorInput).setCaret)||t.call(e)}focusIn(){let e=this.eInput,t=e.getFocusableElement(),i=e.getInputElement();t.focus(),i.select()}getValue(){return this.cellEditorInput.getValue()}isPopup(){return!1}};K([ot("eInput")],o4.prototype,"eInput",2);var o6=class{getTemplate(){return'<ag-input-text-field class="ag-cell-editor" ref="eInput"></ag-input-text-field>'}init(e,t){this.eInput=e,this.params=t,null!=t.maxLength&&e.setMaxLength(t.maxLength)}getValue(){let e=this.eInput.getValue();return q(e)||q(this.params.value)?this.params.parseValue(e):this.params.value}getStartValue(){return this.params.useFormatter||this.params.column.getColDef().refData?this.params.formatValue(this.params.value):this.params.value}setCaret(){let e=this.eInput.getValue(),t=q(e)&&e.length||0;t&&this.eInput.getInputElement().setSelectionRange(t,t)}},o8=class extends o4{constructor(){super(new o6)}},o7=class extends s9{constructor(){super(),this.refreshCount=0;let e=document.createElement("span"),t=document.createElement("span");t.setAttribute("class","ag-value-change-delta");let i=document.createElement("span");i.setAttribute("class","ag-value-change-value"),e.appendChild(t),e.appendChild(i),this.setTemplateFromElement(e)}init(e){this.eValue=this.queryForHtmlElement(".ag-value-change-value"),this.eDelta=this.queryForHtmlElement(".ag-value-change-delta"),this.refresh(e,!0)}showDelta(e,t){let i=Math.abs(t),s=e.formatValue(i),o=q(s)?s:i,r=t>=0;r?this.eDelta.textContent="↑"+o:this.eDelta.textContent="↓"+o,this.eDelta.classList.toggle("ag-value-change-delta-up",r),this.eDelta.classList.toggle("ag-value-change-delta-down",!r)}setTimerToRemoveDelta(){this.refreshCount++;let e=this.refreshCount;this.getFrameworkOverrides().wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.hideDeltaValue()},2e3)})}hideDeltaValue(){this.eValue.classList.remove("ag-value-change-value-highlight"),sd(this.eDelta)}refresh(e,t=!1){let i=e.value;if(i===this.lastValue||(q(e.valueFormatted)?this.eValue.textContent=e.valueFormatted:q(e.value)?this.eValue.textContent=i:sd(this.eValue),this.filterManager.isSuppressFlashingCellsBecauseFiltering()))return!1;if("number"==typeof i&&"number"==typeof this.lastValue){let t=i-this.lastValue;this.showDelta(e,t)}return this.lastValue&&this.eValue.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=i,!0}};K([eB("filterManager")],o7.prototype,"filterManager",2);var o9=class extends s9{constructor(){super(),this.refreshCount=0;let e=document.createElement("span"),t=document.createElement("span");t.setAttribute("class","ag-value-slide-current"),e.appendChild(t),this.setTemplateFromElement(e),this.eCurrent=this.queryForHtmlElement(".ag-value-slide-current")}init(e){this.refresh(e,!0)}addSlideAnimation(){this.refreshCount++;let e=this.refreshCount;this.ePrevious&&this.getGui().removeChild(this.ePrevious);let t=document.createElement("span");t.setAttribute("class","ag-value-slide-previous ag-value-slide-out"),this.ePrevious=t,this.ePrevious.textContent=this.eCurrent.textContent,this.getGui().insertBefore(this.ePrevious,this.eCurrent),this.getFrameworkOverrides().wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(()=>{e===this.refreshCount&&(this.getGui().removeChild(this.ePrevious),this.ePrevious=null)},3e3)})}refresh(e,t=!1){let i=e.value;return Q(i)&&(i=""),!(i===this.lastValue||this.filterManager.isSuppressFlashingCellsBecauseFiltering())&&
88(t||this.addSlideAnimation(),this.lastValue=i,q(e.valueFormatted)?this.eCurrent.textContent=e.valueFormatted:q(e.value)?this.eCurrent.textContent=i:sd(this.eCurrent),!0)}};K([eB("filterManager")],o9.prototype,"filterManager",2);var re=class e{constructor(t){this.rowIndex=null,this.key=null,this.childrenMapped={},this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=e.OBJECT_ID_SEQUENCE++,this.__autoHeights={},this.alreadyRendered=!1,this.highlighted=null,this.hovered=!1,this.selected=!1,this.beans=t}setData(e){this.setDataCommon(e,!1)}updateData(e){this.setDataCommon(e,!0)}setDataCommon(e,t){let i=this.data;this.data=e,this.beans.valueCache.onDataChanged(),this.updateDataOnDetailNode(),this.checkRowSelectable(),this.resetQuickFilterAggregateText();let s=this.createDataChangedEvent(e,i,t);this.dispatchLocalEvent(s)}updateDataOnDetailNode(){this.detailNode&&(this.detailNode.data=this.data)}createDataChangedEvent(t,i,s){return{type:e.EVENT_DATA_CHANGED,node:this,oldData:i,newData:t,update:s}}createLocalRowEvent(e){return{type:e,node:this}}getRowIndexString(){return"top"===this.rowPinned?"t-"+this.rowIndex:"bottom"===this.rowPinned?"b-"+this.rowIndex:this.rowIndex.toString()}createDaemonNode(){let t=new e(this.beans);return t.id=this.id,t.data=this.data,t.__daemon=!0,t.selected=this.selected,t.level=this.level,t}setDataAndId(e,t){let i=q(this.id)?this.createDaemonNode():null,s=this.data;this.data=e,this.updateDataOnDetailNode(),this.setId(t),this.checkRowSelectable(),this.beans.selectionService.syncInRowNode(this,i);let o=this.createDataChangedEvent(e,s,!1);this.dispatchLocalEvent(o)}checkRowSelectable(){let e=this.beans.gos.get("isRowSelectable");this.setRowSelectable(!e||e(this))}setRowSelectable(t,i){if(this.selectable!==t&&(this.selectable=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_SELECTABLE_CHANGED)),!i)){if(this.beans.gos.get("groupSelectsChildren")){let e=this.calculateSelectedFromChildren();this.setSelectedParams({newValue:null!=e&&e,source:"selectableChanged"});return}this.isSelected()&&!this.selectable&&this.setSelectedParams({newValue:!1,source:"selectableChanged"})}}setId(t){let i=this.beans.gos.getCallback("getRowId");if(i){if(this.data){let t=this.getGroupKeys(!0);this.id=i({data:this.data,parentKeys:t.length>0?t:void 0,level:this.level}),null!==this.id&&"string"==typeof this.id&&this.id.startsWith(e.ID_PREFIX_ROW_GROUP)&&console.error(`AG Grid: Row IDs cannot start with ${e.ID_PREFIX_ROW_GROUP}, this is a reserved prefix for AG Grid's row grouping feature.`),null!==this.id&&"string"!=typeof this.id&&(this.id=""+this.id)}else this.id=void 0}else this.id=t}getGroupKeys(e=!1){let t=[],i=this;for(e&&(i=i.parent);i&&i.level>=0;)t.push(i.key),i=i.parent;return t.reverse(),t}isPixelInRange(e){return!!(q(this.rowTop)&&q(this.rowHeight))&&e>=this.rowTop&&e<this.rowTop+this.rowHeight}setFirstChild(t){this.firstChild!==t&&(this.firstChild=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_FIRST_CHILD_CHANGED)))}setLastChild(t){this.lastChild!==t&&(this.lastChild=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_LAST_CHILD_CHANGED)))}setChildIndex(t){this.childIndex!==t&&(this.childIndex=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_CHILD_INDEX_CHANGED)))}setRowTop(t){this.oldRowTop=this.rowTop,this.rowTop!==t&&(this.rowTop=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_TOP_CHANGED)),this.setDisplayed(null!==t))}clearRowTopAndRowIndex(){this.oldRowTop=null,this.setRowTop(null),this.setRowIndex(null)}setDisplayed(t){this.displayed!==t&&(this.displayed=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_DISPLAYED_CHANGED)))}setDragging(t){this.dragging!==t&&(this.dragging=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_DRAGGING_CHANGED)))}setHighlighted(t){t!==this.highlighted&&(this.highlighted=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_HIGHLIGHT_CHANGED)))}setHovered(e){this.hovered!==e&&(this.hovered=e)}isHovered(){return this.hovered}setAllChildrenCount(t){this.allChildrenCount!==t&&(this.allChildrenCount=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_ALL_CHILDREN_COUNT_CHANGED)))}setMaster(t){this.master!==t&&(this.master&&!t&&(this.expanded=!1),this.master=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_MASTER_CHANGED)))}setGroup(t){this.group!==t&&(this.group&&!t&&(this.expanded=!1),this.group=t,this.updateHasChildren(),this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_GROUP_CHANGED)))}setRowHeight(t,i=!1){this.rowHeight=t,this.rowHeightEstimated=i,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_HEIGHT_CHANGED))}setRowAutoHeight(e,t){this.__autoHeights||(this.__autoHeights={}),this.__autoHeights[t.getId()]=e,null!=e&&(null==this.checkAutoHeightsDebounced&&(this.checkAutoHeightsDebounced=eP(this.checkAutoHeights.bind(this),1)),this.checkAutoHeightsDebounced())}checkAutoHeights(){let e=!1,t=!0,i=0,s=this.__autoHeights;if(null==s||(this.beans.columnModel.getAllDisplayedAutoHeightCols().forEac
88h(o=>{let r=s[o.getId()];if(null==r){if(this.beans.columnModel.isColSpanActive()){let t=[];switch(o.getPinned()){case"left":t=this.beans.columnModel.getDisplayedLeftColumnsForRow(this);break;case"right":t=this.beans.columnModel.getDisplayedRightColumnsForRow(this);break;case null:t=this.beans.columnModel.getViewportCenterColumnsForRow(this)}if(t.includes(o)){e=!0;return}r=-1}else{e=!0;return}}else t=!1;r>i&&(i=r)}),e)||((t||i<10)&&(i=this.beans.gos.getRowHeightForNode(this).height),i==this.rowHeight))return;this.setRowHeight(i);let o=this.beans.rowModel;o.onRowHeightChangedDebounced&&o.onRowHeightChangedDebounced()}setRowIndex(t){this.rowIndex!==t&&(this.rowIndex=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_ROW_INDEX_CHANGED)))}setUiLevel(t){this.uiLevel!==t&&(this.uiLevel=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_UI_LEVEL_CHANGED)))}setExpanded(t,i,s){if(this.expanded===t)return;this.expanded=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_EXPANDED_CHANGED));let o=Object.assign({},this.createGlobalRowEvent(tP.EVENT_ROW_GROUP_OPENED),{expanded:t,event:i||null});this.beans.rowNodeEventThrottle.dispatchExpanded(o,s),this.beans.rowRenderer.refreshCells({rowNodes:[this]})}createGlobalRowEvent(e){return this.beans.gos.addGridCommonParams({type:e,node:this,data:this.data,rowIndex:this.rowIndex,rowPinned:this.rowPinned})}dispatchLocalEvent(e){this.eventService&&this.eventService.dispatchEvent(e)}setDataValue(e,t,i){let s=(()=>{var t;return"string"!=typeof e?e:null!=(t=this.beans.columnModel.getGridColumn(e))?t:this.beans.columnModel.getPrimaryColumn(e)})(),o=this.getValueFromValueService(s);if(this.beans.gos.get("readOnlyEdit"))return this.dispatchEventForSaveValueReadOnly(s,o,t,i),!1;let r=this.beans.valueService.setValue(this,s,t,i);return this.dispatchCellChangedEvent(s,t,o),this.checkRowSelectable(),r}getValueFromValueService(e){var t,i;let s=this.leafGroup&&this.beans.columnModel.isPivotMode(),o=this.group&&this.expanded&&!this.footer&&!s,r=!1,n=null!=(t=this.beans.gos.get("groupTotalRow"))?t:this.beans.gos.get("groupIncludeFooter");r="function"!=typeof n?!!n:!!(null!=(i=this.beans.gos.getCallback("groupTotalRow"))?i:this.beans.gos.getCallback("groupIncludeFooter"))({node:this});let l=this.beans.gos.get("groupSuppressBlankHeader"),a=o&&r&&!l;return this.beans.valueService.getValue(e,this,!1,a)}dispatchEventForSaveValueReadOnly(e,t,i,s){let o=this.beans.gos.addGridCommonParams({type:tP.EVENT_CELL_EDIT_REQUEST,event:null,rowIndex:this.rowIndex,rowPinned:this.rowPinned,column:e,colDef:e.getColDef(),data:this.data,node:this,oldValue:t,newValue:i,value:i,source:s});this.beans.eventService.dispatchEvent(o)}setGroupValue(e,t){let i=this.beans.columnModel.getGridColumn(e);Q(this.groupData)&&(this.groupData={});let s=i.getColId(),o=this.groupData[s];o!==t&&(this.groupData[s]=t,this.dispatchCellChangedEvent(i,t,o))}setAggData(e){let t=this.aggData;if(this.aggData=e,this.eventService){let i=e=>{let i=this.aggData?this.aggData[e]:void 0,s=t?t[e]:void 0;if(i===s)return;let o=this.beans.columnModel.lookupGridColumn(e);o&&this.dispatchCellChangedEvent(o,i,s)};for(let e in this.aggData)i(e);for(let t in e)t in this.aggData||i(t)}}updateHasChildren(){let t=this.group&&!this.footer||this.childrenAfterGroup&&this.childrenAfterGroup.length>0;if(this.beans.gos.isRowModelType("serverSide")){let e=this.beans.gos.get("treeData"),i=this.beans.gos.get("isServerSideGroup");t=!this.stub&&!this.footer&&(e?!!i&&i(this.data):!!this.group)}t!==this.__hasChildren&&(this.__hasChildren=!!t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_HAS_CHILDREN_CHANGED)))}hasChildren(){return null==this.__hasChildren&&this.updateHasChildren(),this.__hasChildren}isEmptyRowGroupNode(){return this.group&&X(this.childrenAfterGroup)}dispatchCellChangedEvent(t,i,s){let o={type:e.EVENT_CELL_CHANGED,node:this,column:t,newValue:i,oldValue:s};this.dispatchLocalEvent(o)}resetQuickFilterAggregateText(){this.quickFilterAggregateText=null}isExpandable(){return!this.footer&&(this.beans.columnModel.isPivotMode()?this.hasChildren()&&!this.leafGroup:this.hasChildren()||
88!!this.master)}isSelected(){return this.footer?this.sibling.isSelected():this.selected}depthFirstSearch(e){this.childrenAfterGroup&&this.childrenAfterGroup.forEach(t=>t.depthFirstSearch(e)),e(this)}calculateSelectedFromChildren(){var e;let t=!1,i=!1,s=!1;if(!(null==(e=this.childrenAfterGroup)?void 0:e.length))return this.selectable?this.selected:null;for(let e=0;e<this.childrenAfterGroup.length;e++){let o=this.childrenAfterGroup[e],r=o.isSelected();if(!o.selectable){let e=o.calculateSelectedFromChildren();if(null===e)continue;r=e}switch(r){case!0:t=!0;break;case!1:i=!0;break;default:s=!0}}return s||t&&i?void 0:!!t||!i&&(this.selectable?this.selected:null)}setSelectedInitialValue(e){this.selected=e}selectThisNode(t,i,s="api"){let o=!this.selectable&&t,r=this.selected===t;if(o||r)return!1;this.selected=t,this.eventService&&this.dispatchLocalEvent(this.createLocalRowEvent(e.EVENT_ROW_SELECTED));let n=this.sibling;n&&n.footer&&n.eventService&&n.dispatchLocalEvent(n.createLocalRowEvent(e.EVENT_ROW_SELECTED));let l=W(B({},this.createGlobalRowEvent(tP.EVENT_ROW_SELECTED)),{event:i||null,source:s});return this.beans.eventService.dispatchEvent(l),!0}setSelected(e,t=!1,i="api"){if("boolean"==typeof i){console.warn("AG Grid: since version v30, rowNode.setSelected() property `suppressFinishActions` has been removed, please use `gridApi.setNodesSelected()` for bulk actions, and the event `source` property for ignoring events instead.");return}this.setSelectedParams({newValue:e,clearSelection:t,rangeSelect:!1,source:i})}setSelectedParams(e){return this.rowPinned?(console.warn("AG Grid: cannot select pinned rows"),0):void 0===this.id?(console.warn("AG Grid: cannot select node until id for node is known"),0):this.beans.selectionService.setNodesSelected(W(B({},e),{nodes:[this.footer?this.sibling:this]}))}isRowPinned(){return"top"===this.rowPinned||"bottom"===this.rowPinned}isParentOfNode(e){let t=this.parent;for(;t;){if(t===e)return!0;t=t.parent}return!1}addEventListener(e,t){var i,s;this.eventService||(this.eventService=new e$),this.beans.frameworkOverrides.shouldWrapOutgoing&&!this.frameworkEventListenerService&&(this.eventService.setFrameworkOverrides(this.beans.frameworkOverrides),this.frameworkEventListenerService=new eY(this.beans.frameworkOverrides));let o=null!=(s=null==(i=this.frameworkEventListenerService)?void 0:i.wrap(t))?s:t;this.eventService.addEventListener(e,o)}removeEventListener(e,t){var i,s;if(!this.eventService)return;let o=null!=(s=null==(i=this.frameworkEventListenerService)?void 0:i.unwrap(t))?s:t;this.eventService.removeEventListener(e,o),this.eventService.noRegisteredListenersExist()&&(this.eventService=null)}onMouseEnter(){this.dispatchLocalEvent(this.createLocalRowEvent(e.EVENT_MOUSE_ENTER))}onMouseLeave(){this.dispatchLocalEvent(this.createLocalRowEvent(e.EVENT_MOUSE_LEAVE))}getFirstChildOfFirstChild(e){let t=this,i=!0,s=!1,o=null;for(;i&&!s;){let r=t.parent;q(r)&&t.firstChild?r.rowGroupColumn===e&&(s=!0,o=r):i=!1,t=r}return s?o:null}isFullWidthCell(){if(this.detail)return!0;let e=this.beans.gos.getCallback("isFullWidthRow");return!!e&&e({rowNode:this})}getRoute(){if(null==this.key)return;let e=[],t=this;for(;null!=t.key;)e.push(t.key),t=t.parent;return e.reverse()}createFooter(){if(this.sibling)return;let t=new Set(["eventService","__objectId","sticky"]),i=new e(this.beans);Object.keys(this).forEach(e=>{t.has(e)||(i[e]=this[e])}),i.footer=!0,i.setRowTop(null),i.setRowIndex(null),i.oldRowTop=null,i.id="rowGroupFooter_"+this.id,i.sibling=this,this.sibling=i}destroyFooter(){this.sibling&&(this.sibling.setRowTop(null),this.sibling.setRowIndex(null),this.sibling=void 0)}};re.ID_PREFIX_ROW_GROUP="row-group-",re.ID_PREFIX_TOP_PINNED="t-",re.ID_PREFIX_BOTTOM_PINNED="b-",re.OBJECT_ID_SEQUENCE=0,re.EVENT_ROW_SELECTED="rowSelected",re.EVENT_DATA_CHANGED="dataChanged",re.EVENT_CELL_CHANGED="cellChanged",re.EVENT_ALL_CHILDREN_COUNT_CHANGED="allChildrenCountChanged",re.EVENT_MASTER_CHANGED="masterChanged",re.EVENT_GROUP_CHANGED="groupChanged",re.EVENT_MOUSE_ENTER="mouseEnter",re.EVENT_MOUSE_LEAVE="mouseLeave",re.EVENT_HEIGHT_CHANGED="heightChanged",re.EVENT_TOP_CHANGED="topChanged",re.EVENT_DISPLAYED_CHANGED="displayedChanged",re.EVENT_FIRST_CHILD_CHANGED="firstChildCh
88anged",re.EVENT_LAST_CHILD_CHANGED="lastChildChanged",re.EVENT_CHILD_INDEX_CHANGED="childIndexChanged",re.EVENT_ROW_INDEX_CHANGED="rowIndexChanged",re.EVENT_EXPANDED_CHANGED="expandedChanged",re.EVENT_HAS_CHILDREN_CHANGED="hasChildrenChanged",re.EVENT_SELECTABLE_CHANGED="selectableChanged",re.EVENT_UI_LEVEL_CHANGED="uiLevelChanged",re.EVENT_HIGHLIGHT_CHANGED="rowHighlightChanged",re.EVENT_DRAGGING_CHANGED="draggingChanged";var rt=re,ri=class extends s9{constructor(){super(`
89            <div class="ag-selection-checkbox" role="presentation">
90                <ag-checkbox role="presentation" ref="eCheckbox"></ag-checkbox>
91            </div>`)}postConstruct(){this.eCheckbox.setPassive(!0)}getCheckboxId(){return this.eCheckbox.getInputElement().id}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){let e=this.localeService.getLocaleTextFunc(),t=this.rowNode.isSelected(),i=iA(e,t),[s,o]=this.rowNode.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],r=e(s,o);this.eCheckbox.setValue(t,!0),this.eCheckbox.setInputAriaLabel(`${r} (${i})`)}onClicked(e,t,i){return this.rowNode.setSelectedParams({newValue:e,rangeSelect:i.shiftKey,groupSelectsFiltered:t,event:i,source:"checkboxSelected"})}init(e){if(this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListener(this.eCheckbox.getInputElement(),"dblclick",e=>{tg(e)}),this.addManagedListener(this.eCheckbox.getInputElement(),"click",e=>{tg(e);let t=this.gos.get("groupSelectsFiltered"),i=this.eCheckbox.getValue();this.shouldHandleIndeterminateState(i,t)?0===this.onClicked(!0,t,e||{})&&this.onClicked(!1,t,e):i?this.onClicked(!1,t,e):this.onClicked(!0,t,e||{})}),this.addManagedListener(this.rowNode,rt.EVENT_ROW_SELECTED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.rowNode,rt.EVENT_DATA_CHANGED,this.onDataChanged.bind(this)),this.addManagedListener(this.rowNode,rt.EVENT_SELECTABLE_CHANGED,this.onSelectableChanged.bind(this)),this.gos.get("isRowSelectable")||"function"==typeof this.getIsVisible()){let e=this.showOrHideSelect.bind(this);this.addManagedListener(this.eventService,tP.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.rowNode,rt.EVENT_DATA_CHANGED,e),this.addManagedListener(this.rowNode,rt.EVENT_CELL_CHANGED,e),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}shouldHandleIndeterminateState(e,t){return t&&(void 0===this.eCheckbox.getPreviousValue()||void 0===e)&&this.gos.isRowModelType("clientSide")}showOrHideSelect(){var e,t,i;let s=this.rowNode.selectable,o=this.getIsVisible();if(s){if("function"==typeof o){let t=null==(e=this.overrides)?void 0:e.callbackParams;if(this.column){let e=this.column.createColumnFunctionCallbackParams(this.rowNode);s=o(B(B({},t),e))}else s=o(W(B({},t),{node:this.rowNode,data:this.rowNode.data}))}else s=null!=o&&o}if(null==(t=this.column)?void 0:t.getColDef().showDisabledCheckboxes){this.eCheckbox.setDisabled(!s),this.setVisible(!0),this.setDisplayed(!0);return}if(null==(i=this.overrides)?void 0:i.removeHidden){this.setDisplayed(s);return}this.setVisible(s)}getIsVisible(){var e,t;return this.overrides?this.overrides.isVisible:null==(t=null==(e=this.column)?void 0:e.getColDef())?void 0:t.checkboxSelection}};K([ot("eCheckbox")],ri.prototype,"eCheckbox",2),K([eV],ri.prototype,"postConstruct",1);var rs=((n=rs||{})[n.Up=0]="Up",n[n.Down=1]="Down",n),ro=((l=ro||{})[l.Left=0]="Left",l[l.Right=1]="Right",l),rr=((a=rr||{})[a.ToolPanel=0]="ToolPanel",a[a.HeaderCell=1]="HeaderCell",a[a.RowDrag=2]="RowDrag",a[a.ChartPanel=3]="ChartPanel",a[a.AdvancedFilterBuilder=4]="AdvancedFilterBuilder",a),rn=class extends tR{constructor(){super(...arguments),this.dragSourceAndParamsList=[],this.dropTargets=[]}init(){this.ePinnedIcon=s_("columnMovePin",this.gos,null),this.eHideIcon=s_("columnMoveHide",this.gos,null),this.eMoveIcon=s_("columnMoveMove",this.gos,null),this.eLeftIcon=s_("columnMoveLeft",this.gos,null),this.eRightIcon=s_("columnMoveRight",this.gos,null),this.eGroupIcon=s_("columnMoveGroup",this.gos,null),this.eAggregateIcon=s_("columnMoveValue",this.gos,null),this.ePivotIcon=s_("columnMovePivot",this.gos,null),this.eDropNotAllowedIcon=s_("dropNotAllowed",this.gos,null)}addDragSource(e,t=!1){let i={eElement:e.eElement,dragStartPixels:e.dragStartPixels,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),includeTouch:t};this.dragSourceAndParamsList.push({params:i,dragSource:e}),this.dragService.addDragSource(i)}removeDragSource(e){let t=this.dragSourceAndParamsList.find(t=>t.dragSource===e);t&&(this.dragService.removeDragSource(t.params),te(this.dragSourceAndParamsList,t))}clearDragSourceParamsList(){this.dragSourceAndParamsList.forEach(e
91=>this.dragService.removeDragSource(e.params)),this.dragSourceAndParamsList.length=0,this.dropTargets.length=0}nudge(){this.dragging&&this.onDragging(this.eventLastTime,!0)}onDragStart(e,t){this.dragging=!0,this.dragSource=e,this.eventLastTime=t,this.dragItem=this.dragSource.getDragItem(),this.lastDropTarget=void 0,this.dragSource.onDragStarted&&this.dragSource.onDragStarted(),this.createGhost()}onDragStop(e){if(this.eventLastTime=null,this.dragging=!1,this.dragSource.onDragStopped&&this.dragSource.onDragStopped(),this.lastDropTarget&&this.lastDropTarget.onDragStop){let t=this.createDropTargetEvent(this.lastDropTarget,e,null,null,!1);this.lastDropTarget.onDragStop(t)}this.lastDropTarget=null,this.dragItem=null,this.removeGhost()}onDragging(e,t){var i,s,o,r;let n=this.getHorizontalDirection(e),l=this.getVerticalDirection(e);this.eventLastTime=e,this.positionGhost(e);let a=this.dropTargets.filter(t=>this.isMouseOnDropTarget(e,t)),h=this.findCurrentDropTarget(e,a);if(h!==this.lastDropTarget)this.leaveLastTargetIfExists(e,n,l,t),null!==this.lastDropTarget&&null===h&&(null==(s=(i=this.dragSource).onGridExit)||s.call(i,this.dragItem)),null===this.lastDropTarget&&null!==h&&(null==(r=(o=this.dragSource).onGridEnter)||r.call(o,this.dragItem)),this.enterDragTargetIfExists(h,e,n,l,t),this.lastDropTarget=h;else if(h&&h.onDragging){let i=this.createDropTargetEvent(h,e,n,l,t);h.onDragging(i)}}getAllContainersFromDropTarget(e){let t=e.getSecondaryContainers?e.getSecondaryContainers():null,i=[[e.getContainer()]];return t?i.concat(t):i}allContainersIntersect(e,t){for(let i of t){let t=i.getBoundingClientRect();if(0===t.width||0===t.height)return!1;let s=e.clientX>=t.left&&e.clientX<t.right,o=e.clientY>=t.top&&e.clientY<t.bottom;if(!s||!o)return!1}return!0}isMouseOnDropTarget(e,t){let i=this.getAllContainersFromDropTarget(t),s=!1;for(let t of i)if(this.allContainersIntersect(e,t)){s=!0;break}return(!t.targetContainsSource||!!t.getContainer().contains(this.dragSource.eElement))&&s&&t.isInterestedIn(this.dragSource.type,this.dragSource.eElement)}findCurrentDropTarget(e,t){let i=t.length;if(0===i)return null;if(1===i)return t[0];for(let i of this.gos.getRootNode().elementsFromPoint(e.clientX,e.clientY))for(let e of t)if(-1!==tl(this.getAllContainersFromDropTarget(e)).indexOf(i))return e;return null}enterDragTargetIfExists(e,t,i,s,o){if(e){if(e.onDragEnter){let r=this.createDropTargetEvent(e,t,i,s,o);e.onDragEnter(r)}this.setGhostIcon(e.getIconName?e.getIconName():null)}}leaveLastTargetIfExists(e,t,i,s){if(this.lastDropTarget){if(this.lastDropTarget.onDragLeave){let o=this.createDropTargetEvent(this.lastDropTarget,e,t,i,s);this.lastDropTarget.onDragLeave(o)}this.setGhostIcon(null)}}addDropTarget(e){this.dropTargets.push(e)}removeDropTarget(e){this.dropTargets=this.dropTargets.filter(t=>t.getContainer()!==e.getContainer())}hasExternalDropZones(){return this.dropTargets.some(e=>e.external)}findExternalZone(e){return this.dropTargets.filter(e=>e.external).find(t=>t.getContainer()===e.getContainer())||null}getHorizontalDirection(e){let t=this.eventLastTime&&this.eventLastTime.clientX,i=e.clientX;return t===i?null:t>i?0:1}getVerticalDirection(e){let t=this.eventLastTime&&this.eventLastTime.clientY,i=e.clientY;return t===i?null:t>i?0:1}createDropTargetEvent(e,t,i,s,o){let r=e.getContainer(),n=r.getBoundingClientRect(),{gridApi:l,columnApi:a,dragItem:h,dragSource:d}=this,u=t.clientX-n.left,c=t.clientY-n.top;return{event:t,x:u,y:c,vDirection:s,hDirection:i,dragSource:d,fromNudge:o,dragItem:h,api:l,columnApi:a,dropZoneTarget:r}}positionGhost(e){let t=this.eGhost;if(!t)return;let i=t.getBoundingClientRect().height,s=iV()-2,o=iH()-2,r=sn(t.offsetParent),{clientY:n,clientX:l}=e,a=n-r.top-i/2,h=l-r.left-10,d=this.gos.getDocument(),u=d.defaultView||window,c=u.pageYOffset||d.documentElement.scrollTop,p=u.pageXOffset||d.documentElement.scrollLeft;s>0&&h+t.clientWidth>s+p&&(h=s+p-t.clientWidth),h<0&&(h=0),o>0&&a+t.clientHeight>o+c&&(a=o+c-t.clientHeight),a<0&&(a=0),t.style.left=`${h}px`,t.style.top=`${a}px`}removeGhost(){this.eGhost&&this.eGhostParent&&this.eGhostParent.removeChild(this.eGhost),this.eGhost=null}createGhost(){this.eGhost=sg(rn.GHOST_TEMPLATE),this.mouseEventService.stampTopLevelGridCompWithGridInstance(this.eGhost);let{theme:e}=this.environment.getTheme();e&&this.eGhost.classList.add(e),this.eGhostIcon=this.eGhost.querySelector(".ag-dnd-ghost-icon"),this.setGhostIcon(null);let t=this.eGhost.querySelector(".ag-dnd-ghost-label"),i=this.dragSource.dragItemName;ey(i)&&(i=i()),t.innerHTML=tV(i)||"",this.eGhost.style.height="25px",this.eGhost.style.top="20px",this.eGhost.style.left="20px";let s=this.gos.getDocument(),o=null,r=null;try{o=s.fullscreenElement}catch(e){}finally{o||(o=this.gos.getRootNode());let e=o.querySelector("body");e?r=e:o instanceof ShadowRoot?r=o:o instanceof Document?r=null==o?void 0:o.documentElement:r=o}this.eGhostParent=r,this.eGhostParent?this.eGhostParent.appendChild(this.eGhost):console.warn("AG Grid: could not find document body, it is needed for dragging columns")}
91setGhostIcon(e,t=!1){sd(this.eGhostIcon);let i=null;switch(e||(e=this.dragSource.getDefaultIconName?this.dragSource.getDefaultIconName():rn.ICON_NOT_ALLOWED),e){case rn.ICON_PINNED:i=this.ePinnedIcon;break;case rn.ICON_MOVE:i=this.eMoveIcon;break;case rn.ICON_LEFT:i=this.eLeftIcon;break;case rn.ICON_RIGHT:i=this.eRightIcon;break;case rn.ICON_GROUP:i=this.eGroupIcon;break;case rn.ICON_AGGREGATE:i=this.eAggregateIcon;break;case rn.ICON_PIVOT:i=this.ePivotIcon;break;case rn.ICON_NOT_ALLOWED:i=this.eDropNotAllowedIcon;break;case rn.ICON_HIDE:i=this.eHideIcon}this.eGhostIcon.classList.toggle("ag-shake-left-to-right",t),!(i===this.eHideIcon&&this.gos.get("suppressDragLeaveHidesColumns"))&&i&&this.eGhostIcon.appendChild(i)}};rn.ICON_PINNED="pinned",rn.ICON_MOVE="move",rn.ICON_LEFT="left",rn.ICON_RIGHT="right",rn.ICON_GROUP="group",rn.ICON_AGGREGATE="aggregate",rn.ICON_PIVOT="pivot",rn.ICON_NOT_ALLOWED="notAllowed",rn.ICON_HIDE="hide",rn.GHOST_TEMPLATE=`<div class="ag-dnd-ghost ag-unselectable">
92            <span class="ag-dnd-ghost-icon ag-shake-left-to-right"></span>
93            <div class="ag-dnd-ghost-label"></div>
94        </div>`,K([eB("dragService")],rn.prototype,"dragService",2),K([eB("mouseEventService")],rn.prototype,"mouseEventService",2),K([eB("columnApi")],rn.prototype,"columnApi",2),K([eB("gridApi")],rn.prototype,"gridApi",2),K([eV],rn.prototype,"init",1),K([eH],rn.prototype,"clearDragSourceParamsList",1),rn=K([ek("dragAndDropService")],rn);var rl=class extends s9{constructor(e,t,i,s,o,r){super(),this.cellValueFn=e,this.rowNode=t,this.column=i,this.customGui=s,this.dragStartPixels=o,this.suppressVisibilityChange=r,this.dragSource=null}isCustomGui(){return null!=this.customGui}postConstruct(){if(this.customGui?this.setDragElement(this.customGui,this.dragStartPixels):(this.setTemplate('<div class="ag-drag-handle ag-row-drag" aria-hidden="true"></div>'),this.getGui().appendChild(sV("rowDrag",this.gos,null)),this.addDragSource()),this.checkCompatibility(),!this.suppressVisibilityChange){let e=this.gos.get("rowDragManaged")?new rd(this,this.beans,this.rowNode,this.column):new rh(this,this.beans,this.rowNode,this.column);this.createManagedBean(e,this.beans.context)}}setDragElement(e,t){this.setTemplateFromElement(e),this.addDragSource(t)}getSelectedNodes(){if(!this.gos.get("rowDragMultiRow"))return[this.rowNode];let e=this.beans.selectionService.getSelectedNodes();return -1!==e.indexOf(this.rowNode)?e:[this.rowNode]}checkCompatibility(){let e=this.gos.get("rowDragManaged");this.gos.get("treeData")&&e&&ew("If using row drag with tree data, you cannot have rowDragManaged=true")}getDragItem(){return{rowNode:this.rowNode,rowNodes:this.getSelectedNodes(),columns:this.column?[this.column]:void 0,defaultTextValue:this.cellValueFn()}}getRowDragText(e){if(e){let t=e.getColDef();if(t.rowDragText)return t.rowDragText}return this.gos.get("rowDragText")}addDragSource(e=4){this.dragSource&&this.removeDragSource();let t=this.localeService.getLocaleTextFunc();this.dragSource={type:2,eElement:this.getGui(),dragItemName:()=>{var e;let i=this.getDragItem(),s=(null==(e=i.rowNodes)?void 0:e.length)||1,o=this.getRowDragText(this.column);return o?o(i,s):1===s?this.cellValueFn():`${s} ${t("rowDragRows","rows")}`},getDragItem:()=>this.getDragItem(),dragStartPixels:e,dragSourceDomDataKey:this.gos.getDomDataKey()},this.beans.dragAndDropService.addDragSource(this.dragSource,!0)}removeDragSource(){this.dragSource&&this.beans.dragAndDropService.removeDragSource(this.dragSource),this.dragSource=null}};K([eB("beans")],rl.prototype,"beans",2),K([eV],rl.prototype,"postConstruct",1),K([eH],rl.prototype,"removeDragSource",1);var ra=class extends tR{constructor(e,t,i){super(),this.parent=e,this.rowNode=t,this.column=i}setDisplayedOrVisible(e){let t={skipAriaHidden:!0};if(e)this.parent.setDisplayed(!1,t);else{let e=!0,i=!1;this.column&&(e=this.column.isRowDrag(this.rowNode)||this.parent.isCustomGui(),i=ey(this.column.getColDef().rowDrag)),i?(this.parent.setDisplayed(!0,t),this.parent.setVisible(e,t)):(this.parent.setDisplayed(e,t),this.parent.setVisible(!0,t))}}},rh=class extends ra{constructor(e,t,i,s){super(e,i,s),this.beans=t}postConstruct(){this.addManagedPropertyListener("suppressRowDrag",this.onSuppressRowDrag.bind(this)),this.addManagedListener(this.rowNode,rt.EVENT_DATA_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,rt.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,rt.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,tP.EVENT_NEW_COLUMNS_LOADED,this.workOutVisibility.bind(this)),this.workOutVisibility()}onSuppressRowDrag(){this.workOutVisibility()}workOutVisibility(){let e=this.gos.get("suppressRowDrag");this.setDisplayedOrVisible(e)}};K([eV],rh.prototype,"postConstruct",1);var rd=class extends ra{constructor(e,t,i,s){super(e,i,s),this.beans=t}postConstruct(){this.addManagedListener(this.beans.eventService,tP.EVENT_SORT_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,tP.EVENT_FILTER_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,tP.EVENT_COLUMN_ROW_GROUP_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,tP.EVENT_NEW_COLUMNS_LOADED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,rt.EVENT_DATA_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,rt.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addManagedPropertyListener("suppressRowDrag",this.onSuppressRowDrag.bind(this)),this.workOutVisibility()}onSuppressRowDrag(){this.workOutVisibility()}workOutVisibility(){let e=this.beans.ctrlsService.getGridBodyCtrl().getRowDragFeature
94(),t=e&&e.shouldPreventRowMove(),i=this.gos.get("suppressRowDrag"),s=this.beans.dragAndDropService.hasExternalDropZones();this.setDisplayedOrVisible(t&&!s||i)}};K([eV],rd.prototype,"postConstruct",1);var ru=class extends tR{init(e,t,i,s,o,r,n){var l,a,h,d;this.params=n,this.eGui=t,this.eCheckbox=i,this.eExpanded=s,this.eContracted=o,this.comp=e,this.compClass=r;let{node:u,value:c,colDef:p}=n,g=this.isTopLevelFooter();if(!(!g&&(this.isEmbeddedRowMismatch()||u.footer&&this.gos.get("groupHideOpenParents")&&(p&&p.showRowGroup)!==(u.rowGroupColumn&&u.rowGroupColumn.getColId())))){if(this.setupShowingValueForOpenedParent(),this.findDisplayedGroupNode(),!g){let e=n.node.footer&&n.node.rowGroupIndex===this.columnModel.getRowGroupColumns().findIndex(e=>{var t;return e.getColId()===(null==(t=n.colDef)?void 0:t.showRowGroup)}),t="multipleColumns"!=this.gos.get("groupDisplayType")||this.gos.get("treeData")||this.gos.get("showOpenedGroup")&&!n.node.footer&&(!n.node.group||null!=n.node.rowGroupIndex&&n.node.rowGroupIndex>this.columnModel.getRowGroupColumns().findIndex(e=>{var t;return e.getColId()===(null==(t=n.colDef)?void 0:t.showRowGroup)})),i=!u.group&&((null==(l=this.params.colDef)?void 0:l.field)||(null==(a=this.params.colDef)?void 0:a.valueGetter)),s=this.isExpandable(),o=this.columnModel.isPivotMode()&&u.leafGroup&&(null==(h=u.rowGroupColumn)?void 0:h.getColId())===(null==(d=n.column)?void 0:d.getColDef().showRowGroup);if(!this.showingValueForOpenedParent&&!s&&!i&&!t&&!e&&!o)return}this.addExpandAndContract(),this.addFullWidthRowDraggerIfNeeded(),this.addCheckboxIfNeeded(),this.addValueElement(),this.setupIndent(),this.refreshAriaExpanded()}}getCellAriaRole(){var e,t;let i=null==(e=this.params.colDef)?void 0:e.cellAriaRole,s=null==(t=this.params.column)?void 0:t.getColDef().cellAriaRole;return i||s||"gridcell"}destroy(){super.destroy(),this.expandListener=null}refreshAriaExpanded(){let{node:e,eGridCell:t}=this.params;if(this.expandListener&&(this.expandListener=this.expandListener()),!this.isExpandable()){ic(t);return}let i=()=>{iu(t,!!e.expanded)};this.expandListener=this.addManagedListener(e,rt.EVENT_EXPANDED_CHANGED,i)||null,i()}isTopLevelFooter(){if(!this.gos.getGrandTotalRow()||null!=this.params.value||-1!=this.params.node.level)return!1;let e=this.params.colDef;if(null==e||!0===e.showRowGroup)return!0;let t=this.columnModel.getRowGroupColumns();return!t||0===t.length||t[0].getId()===e.showRowGroup}isEmbeddedRowMismatch(){if(!this.params.fullWidth||!this.gos.get("embedFullWidthRows"))return!1;let e="left"===this.params.pinned,t="right"===this.params.pinned,i=!e&&!t;return this.gos.get("enableRtl")?this.columnModel.isPinningLeft()?!t:!i:this.columnModel.isPinningLeft()?!e:!i}findDisplayedGroupNode(){let e=this.params.column,t=this.params.node;if(this.showingValueForOpenedParent){let i=t.parent;for(;null!=i;){if(i.rowGroupColumn&&e.isRowGroupDisplayed(i.rowGroupColumn.getId())){this.displayedGroupNode=i;break}i=i.parent}}Q(this.displayedGroupNode)&&(this.displayedGroupNode=t)}setupShowingValueForOpenedParent(){let e=this.params.node,t=this.params.column;if(!this.gos.get("groupHideOpenParents")||!e.groupData){this.showingValueForOpenedParent=!1;return}if(null!=e.rowGroupColumn){let i=e.rowGroupColumn.getId();if(t.isRowGroupDisplayed(i)){this.showingValueForOpenedParent=!1;return}}let i=null!=e.groupData[t.getId()];this.showingValueForOpenedParent=i}addValueElement(){this.displayedGroupNode.footer?this.addFooterValue():(this.addGroupValue(),this.addChildCount())}addGroupValue(){var e;let t=this.adjustParamsWithDetailsFromRelatedColumn(),i=this.getInnerCompDetails(t),{valueFormatted:s,value:o}=t,r=s;if(null==r){let t=this.displayedGroupNode.rowGroupColumn&&(null==(e=this.params.column)?void 0:e.isRowGroupDisplayed(this.displayedGroupNode.rowGroupColumn.getId()));r=""===this.displayedGroupNode.key&&this.displayedGroupNode.group&&t?this.localeService.getLocaleTextFunc()("blanks","(Blanks)"):null!=o?o:null}this.comp.setInnerRenderer(i,r)}adjustParamsWithDetailsFromRelatedColumn(){let e=this.displayedGroupNode.rowGroupColumn,t=this.params.column;if(!e||null!=t&&!t.isRowGroupDisplayed(e.getId()))return this.params;let i=this.params,{value:s,node:o}=this.params,r=this.valueService.formatValue(e,o,s);return W(B({},i),{valueFormatted:r})}addFooterValue(){let e=this.params.totalValueGetter;if(!e){let t=this.params.footerValueGetter;t&&(e=t,ew("As of v31.3, footerValueGetter is deprecated. Use `totalValueGetter` instead."))}let t="";if(e){let i=eh(this.params);i.value=this.params.value,"function"==typeof e?t=e(i):"string"==typeof e?t=this.expressionService.evaluate(e,i):console.warn("AG Grid: footerValueGetter should be either a function or a string (expression)")}else t=this.localeService.getLocaleTextFunc()("footerTotal","Total")+" "+(null!=this.params.value?this.params.value:"");
94let i=this.getInnerCompDetails(this.params);this.comp.setInnerRenderer(i,t)}getInnerCompDetails(e){if(e.fullWidth)return this.userComponentFactory.getFullWidthGroupRowInnerCellRenderer(this.gos.get("groupRowRendererParams"),e);let t=this.userComponentFactory.getInnerRendererDetails(e,e);if(t&&!(t&&t.componentClass==this.compClass))return t;let i=this.displayedGroupNode.rowGroupColumn,s=i?i.getColDef():void 0;if(!s)return;let o=this.userComponentFactory.getCellRendererDetails(s,e);return o&&!(o&&o.componentClass==this.compClass)?o:o&&o.componentClass==this.compClass&&s.cellRendererParams&&s.cellRendererParams.innerRenderer?this.userComponentFactory.getInnerRendererDetails(s.cellRendererParams,e):void 0}addChildCount(){this.params.suppressCount||(this.addManagedListener(this.displayedGroupNode,rt.EVENT_ALL_CHILDREN_COUNT_CHANGED,this.updateChildCount.bind(this)),this.updateChildCount())}updateChildCount(){let e=this.displayedGroupNode.allChildrenCount,t=this.isShowRowGroupForThisRow()&&null!=e&&e>=0?`(${e})`:"";this.comp.setChildCount(t)}isShowRowGroupForThisRow(){if(this.gos.get("treeData"))return!0;let e=this.displayedGroupNode.rowGroupColumn;if(!e)return!1;let t=this.params.column;return null==t||t.isRowGroupDisplayed(e.getId())}addExpandAndContract(){var e;let t=this.params,i=sV("groupExpanded",this.gos,null),s=sV("groupContracted",this.gos,null);i&&this.eExpanded.appendChild(i),s&&this.eContracted.appendChild(s);let o=t.eGridCell;!((null==(e=this.params.column)?void 0:e.isCellEditable(t.node))&&this.gos.get("enableGroupEdit"))&&this.isExpandable()&&!t.suppressDoubleClickExpand&&this.addManagedListener(o,"dblclick",this.onCellDblClicked.bind(this)),this.addManagedListener(this.eExpanded,"click",this.onExpandClicked.bind(this)),this.addManagedListener(this.eContracted,"click",this.onExpandClicked.bind(this)),this.addManagedListener(o,"keydown",this.onKeyDown.bind(this)),this.addManagedListener(t.node,rt.EVENT_EXPANDED_CHANGED,this.showExpandAndContractIcons.bind(this)),this.showExpandAndContractIcons();let r=this.onRowNodeIsExpandableChanged.bind(this);this.addManagedListener(this.displayedGroupNode,rt.EVENT_ALL_CHILDREN_COUNT_CHANGED,r),this.addManagedListener(this.displayedGroupNode,rt.EVENT_MASTER_CHANGED,r),this.addManagedListener(this.displayedGroupNode,rt.EVENT_GROUP_CHANGED,r),this.addManagedListener(this.displayedGroupNode,rt.EVENT_HAS_CHILDREN_CHANGED,r)}onExpandClicked(e){tm(e)||(tg(e),this.onExpandOrContract(e))}onExpandOrContract(e){let t=this.displayedGroupNode,i=!t.expanded;!i&&t.sticky&&this.scrollToStickyNode(t),t.setExpanded(i,e)}scrollToStickyNode(e){this.ctrlsService.getGridBodyCtrl().getScrollFeature().setVerticalScrollPosition(e.rowTop-e.stickyRowTop)}isExpandable(){if(this.showingValueForOpenedParent)return!0;let e=this.displayedGroupNode,t=this.columnModel.isPivotMode()&&e.leafGroup;if(!(e.isExpandable()&&!e.footer&&!t))return!1;let i=this.params.column;return null==i||"string"!=typeof i.getColDef().showRowGroup||this.isShowRowGroupForThisRow()}showExpandAndContractIcons(){let{params:e,displayedGroupNode:t,columnModel:i}=this,{node:s}=e,o=this.isExpandable();if(o){let e=!!this.showingValueForOpenedParent||s.expanded;this.comp.setExpandedDisplayed(e),this.comp.setContractedDisplayed(!e)}else this.comp.setExpandedDisplayed(!1),this.comp.setContractedDisplayed(!1);let r=i.isPivotMode(),n=r&&t.leafGroup,l=o&&!n,a=s.footer&&-1===s.level;this.comp.addOrRemoveCssClass("ag-cell-expandable",l),this.comp.addOrRemoveCssClass("ag-row-group",l),r?this.comp.addOrRemoveCssClass("ag-pivot-leaf-group",n):a||this.comp.addOrRemoveCssClass("ag-row-group-leaf-indent",!l)}onRowNodeIsExpandableChanged(){this.showExpandAndContractIcons(),this.setIndent(),this.refreshAriaExpanded()}setupIndent(){let e=this.params.node;this.params.suppressPadding||(this.addManagedListener(e,rt.EVENT_UI_LEVEL_CHANGED,this.setIndent.bind(this)),this.setIndent())}setIndent(){if(this.gos.get("groupHideOpenParents"))return;let e=this.params,t=e.node,i=!!e.colDef,s=this.gos.get("treeData"),o=!i||s||!0===e.colDef.showRowGroup?t.uiLevel:0;this.indentClass&&this.comp.addOrRemoveCssClass(this.indentClass,!1),this.indentClass="ag-row-group-indent-"+o,this.comp.addOrRemoveCssClass(this.indentClass,!0)}addFullWidthRowDraggerIfNeeded(){if(!this.params.fullWidth||!this.params.rowDrag)return;let e=new rl(()=>this.params.value,this.params.node);this.createManagedBean(e,this.context),this.eGui.insertAdjacentElement("afterbegin",e.getGui())}isUserWantsSelected(){let e=this.params.checkbox;return"function"==typeof e||!0===e}addCheckboxIfNeeded(){let e=this.displayedGroupNode,t=this.isUserWantsSelected()&&!e.footer&&!e.rowPinned&&!e.detail;if(t){let e=new ri;this.getContext().createBean(e),e.init({rowNode:this.params.node,column:this.params.column,overrides:{isVisible:this.params.checkbox,callbackParams:this.params,removeHidden:!0}}),this.eCheckbox.appendChild(e.getGui()),this.addDestroyFunc(()=>this.getContext().destroyBean(e))}this.comp.setCheckboxVisible(t)}onKeyDown(e){e.key!==sk.ENTER||this.params.suppressEnterExpand||this.params.column&&this.params.column.isCellEditable(this.params.node)||this.onExpandOrContract(e)}onCellDblClicked(e){!tm(e)&&(tf(this.eExpanded,e)||tf(this.eContracted,e)||this.onExpandOrContract(e))}};K([eB("expressionService")],ru.prototype,"expressionService",2),K([eB("valueService")],ru.prototype,"valueService",2),K([eB("columnModel")],ru.prototype,"columnModel",2),K([eB("userComponentFactory")],ru.prototype,"userComponentFactory",2),K([eB("ctrlsService")],ru.prototype,"ctrlsService",2);var rc=class e extends s9{constructor(){super(e.TEMPLATE)}init(e){let t=this.createManagedBean(new ru),i=!e.colDef,s=this.getGui();t.init({setInnerRenderer:(e,t)=>this.setRenderDetails(e,t),setChildCount:e=>this.eChildCount.textContent=e,addOrRemoveCssClass:(e,t)=>this.addOrRemoveCssClass(e,t),setContractedDisplayed:e=>i8(this.eContracted,e),setExpandedDisplayed:e=>i8(this.eExpanded,e),setCheckboxVisible:e=>this.eCheckbox.classList.toggle("ag-invisible",!e)},s,this.eCheckbox,this.eExpanded,this.eContracted,this.constructor,e),i&&t4(s,t.getCellAriaRole())}setRenderDetails(e,t){if(e){let t=e.newAgStackInstance();t&&t.then(e=>{if(!e)return;let t=()=>this.context.destroyBean(e);this.isAlive()?(this.eValue.appendChild(e.getGui()),this.addDestroyFunc(t)):t()})}else this.eValue.innerText=t}destroy(){this.getContext().destroyBean(this.innerCellRenderer),super.destroy()}refresh(){return!1}};rc.TEMPLATE=`<span class="ag-cell-wrapper">
95            <span class="ag-group-expanded" ref="eExpanded"></span>
96            <span class="ag-group-contracted" ref="eContracted"></span>
97            <span class="ag-group-checkbox ag-invisible" ref="eCheckbox"></span>
98            <span class="ag-group-value" ref="eValue"></span>
99            <span class="ag-group-child-count" ref="eChildCount"></span>
100        </span>`,K([ot("eExpanded")],rc.prototype,"eExpanded",2),K([ot("eContracted")],rc.prototype,"eContracted",2),K([ot("eCheckbox")],rc.prototype,"eCheckbox",2),K([ot("eValue")],rc.prototype,"eValue",2),K([ot("eChildCount")],rc.prototype,"eChildCount",2);var rp=rc,rg=class e extends s9{constructor(){super(e.TEMPLATE)}init(e){e.node.failedLoad?this.setupFailed():this.setupLoading()}setupFailed(){let e=this.localeService.getLocaleTextFunc();this.eLoadingText.innerText=e("loadingError","ERR")}setupLoading(){let e=sV("groupLoading",this.gos,null);e&&this.eLoadingIcon.appendChild(e);let t=this.localeService.getLocaleTextFunc();this.eLoadingText.innerText=t("loadingOoo","Loading")}refresh(e){return!1}destroy(){super.destroy()}};rg.TEMPLATE=`<div class="ag-loading">
101            <span class="ag-loading-icon" ref="eLoadingIcon"></span>
102            <span class="ag-loading-text" ref="eLoadingText"></span>
103        </div>`,K([ot("eLoadingIcon")],rg.prototype,"eLoadingIcon",2),K([ot("eLoadingText")],rg.prototype,"eLoadingText",2);var rm=class e extends s9{constructor(){super(e.TEMPLATE)}init(e){let t=`ag-cell-skeleton-renderer-${this.getCompId()}`;this.getGui().setAttribute("id",t),this.addDestroyFunc(()=>it(e.eParentOfValue)),it(e.eParentOfValue,t),e.node.failedLoad?this.setupFailed():this.setupLoading()}setupFailed(){let e=this.localeService.getLocaleTextFunc();this.getGui().innerText=e("loadingError","ERR");let t=e("ariaSkeletonCellLoadingFailed","Row failed to load");ie(this.getGui(),t)}setupLoading(){let e=this.gos.getDocument().createElement("div");e.classList.add("ag-skeleton-effect"),this.getGui().appendChild(e);let t=this.localeService.getLocaleTextFunc()("ariaSkeletonCellLoading","Row data is loading");ie(this.getGui(),t)}refresh(e){return!1}destroy(){super.destroy()}};rm.TEMPLATE='<div class="ag-skeleton-container"></div>';var rC=class e extends s9{constructor(){super()}destroy(){super.destroy()}init(t){let i=this.gos.get("overlayLoadingTemplate");if(this.setTemplate(null!=i?i:e.DEFAULT_LOADING_OVERLAY_TEMPLATE),!i){let e=this.localeService.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=e("loadingOoo","Loading...")})}}};rC.DEFAULT_LOADING_OVERLAY_TEMPLATE='<span aria-live="polite" aria-atomic="true" class="ag-overlay-loading-center"></span>';var rv=class e extends s9{constructor(){super()}destroy(){super.destroy()}init(t){let i=this.gos.get("overlayNoRowsTemplate");if(this.setTemplate(null!=i?i:e.DEFAULT_NO_ROWS_TEMPLATE),!i){let e=this.localeService.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=e("noRowsToShow","No Rows To Show")})}}};rv.DEFAULT_NO_ROWS_TEMPLATE='<span class="ag-overlay-no-rows-center"></span>';var rf=class extends o1{constructor(){super('<div class="ag-tooltip"></div>')}init(e){let{value:t}=e;this.getGui().textContent=tV(t,!0)}},rw=class{getTemplate(){return'<ag-input-number-field class="ag-cell-editor" ref="eInput"></ag-input-number-field>'}init(e,t){this.eInput=e,this.params=t,null!=t.max&&e.setMax(t.max),null!=t.min&&e.setMin(t.min),null!=t.precision&&e.setPrecision(t.precision),null!=t.step&&e.setStep(t.step);let i=e.getInputElement();t.preventStepping?e.addManagedListener(i,"keydown",this.preventStepping):t.showStepperButtons&&i.classList.add("ag-number-field-input-stepper")}preventStepping(e){(e.key===sk.UP||e.key===sk.DOWN)&&e.preventDefault()}getValue(){let e=this.eInput.getValue();if(!q(e)&&!q(this.params.value))return this.params.value;let t=this.params.parseValue(e);if(null==t)return t;if("string"==typeof t){if(""===t)return null;t=Number(t)}return isNaN(t)?null:t}getStartValue(){return this.params.value}},rE=class extends o4{constructor(){super(new rw)}},rS=class{getTemplate(){return'<ag-input-date-field class="ag-cell-editor" ref="eInput"></ag-input-date-field>'}init(e,t){this.eInput=e,this.params=t,null!=t.min&&e.setMin(t.min),null!=t.max&&e.setMax(t.max),null!=t.step&&e.setStep(t.step)}getValue(){let e=this.eInput.getDate();return q(e)||q(this.params.value)?null!=e?e:null:this.params.value}getStartValue(){let{value:e}=this.params;if(e instanceof Date)return iJ(e,!1)}},ry=class extends o4{constructor(){super(new rS)}},rR=class{constructor(e){this.getDataTypeService=e}getTemplate(){return'<ag-input-date-field class="ag-cell-editor" ref="eInput"></ag-input-date-field>'}init(e,t){this.eInput=e,this.params=t,null!=t.min&&e.setMin(t.min),null!=t.max&&e.setMax(t.max),null!=t.step&&e.setStep(t.step)}getValue(){let e=this.formatDate(this.eInput.getDate());return q(e)||q(this.params.value)?this.params.parseValue(null!=e?e:""):this.params.value}getStartValue(){var e,t;return iJ(null!=(t=this.parseDate(null!=(e=this.params.value)?e:void 0))?t:null,!1)}parseDate(e){return this.getDataTypeService().getDateParserFunction(this.params.column)(e)}formatDate(e){return this.getDataTypeService().getDateFormatterFunction(this.params.column)(e)}},rD=class extends o4{constructor(){super(new rR(()=>this.dataTypeService))}};K([eB("dataTypeService")],rD.prototype,"dataTypeService",2);var rT=class e extends s9{constructor(){super(e.TEMPLATE)}init(e){this.params=e,this.updateCheckbox(e);let t=this.eCheckbox.getInputElement();t.setAttribute("tabindex","-1"),is(t,"polite"),this.addManagedListener(t,"click",e=>{if(tg(e),this.eCheckbox.isDisabled())return;let t=this.eCheckbox.getValue();this.onCheckboxChanged(t)}),this.addManagedListener(t,"dblclick",e=>{tg(e)}),this.addManagedListener(this.params.eGridCell,"keydown",e=>{if(e.key===sk.SPACE&&!this.eCheckbox.isDisabled()){this.params.eGridCell===this.gos.getActiveDomElement()&&this.eCheckbox.toggle();let t=this.eCheckbox.getValue();this.onCheckboxChanged(t),e.preventDefault()}})}refresh(e){return this.params=e,this.updateCheckbox(e),!0}updateCheckbox(e){var t,i,s;let o;let r=!0;if(e.node.group&&e.column){let i=e.column.getColId();i.startsWith(tM)?o=null==e.value||""===e.value?void 0:"true"===e.value:e.node.aggData&&void 0!==e.node.aggData[i]?o=null!=(t=e.value)?t:void 0:r=!1}else o=null!=(i=e.value)?i:void 0;if(!r){this.eCheckbox.setDisplayed(!1);return}this.eCheckbox.setValue(o);let n=null!=e.disabled?e.disabled:!(null==(s=e.column)?void 0:s.isCellEditable(e.node));this.eCheckbox.setDisabled(n);let l=this.localeService.getLocaleTextFunc(),a=iA(l,o),h=n?a:`${l("ariaToggleCellValue","Press SPACE to toggle cell value")} (${a})`;this.eCheckbox.setInputAriaLabel(h)}
103onCheckboxChanged(e){let{column:t,node:i,rowIndex:s,value:o}=this.params,r={type:tP.EVENT_CELL_EDITING_STARTED,column:t,colDef:null==t?void 0:t.getColDef(),data:i.data,node:i,rowIndex:s,rowPinned:i.rowPinned,value:o};this.eventService.dispatchEvent(r);let n=this.params.node.setDataValue(this.params.column,e,"edit"),l={type:tP.EVENT_CELL_EDITING_STOPPED,column:t,colDef:null==t?void 0:t.getColDef(),data:i.data,node:i,rowIndex:s,rowPinned:i.rowPinned,value:o,oldValue:o,newValue:e,valueChanged:n};this.eventService.dispatchEvent(l)}};rT.TEMPLATE=`
104        <div class="ag-cell-wrapper ag-checkbox-cell" role="presentation">
105            <ag-checkbox role="presentation" ref="eCheckbox"></ag-checkbox>
106        </div>`,K([ot("eCheckbox")],rT.prototype,"eCheckbox",2);var rb=rT,rA=class extends o1{constructor(){super(`
107            <div class="ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit">
108                <ag-checkbox role="presentation" ref="eCheckbox"></ag-checkbox>
109            </div>`)}init(e){var t;this.params=e;let i=null!=(t=e.value)?t:void 0;this.eCheckbox.setValue(i),this.eCheckbox.getInputElement().setAttribute("tabindex","-1"),this.setAriaLabel(i),this.addManagedListener(this.eCheckbox,tP.EVENT_FIELD_VALUE_CHANGED,e=>this.setAriaLabel(e.selected))}getValue(){return this.eCheckbox.getValue()}focusIn(){this.eCheckbox.getFocusableElement().focus()}afterGuiAttached(){this.params.cellStartedEdit&&this.focusIn()}isPopup(){return!1}setAriaLabel(e){let t=this.localeService.getLocaleTextFunc(),i=iA(t,e),s=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eCheckbox.setInputAriaLabel(`${s} (${i})`)}};K([ot("eCheckbox")],rA.prototype,"eCheckbox",2);var rP=class extends s9{constructor(){super(),this.setTemplate("<div></div>")}init(e){var t;this.params=e,this.cssClassPrefix=null!=(t=this.params.cssClassPrefix)?t:"ag-menu-option",this.addIcon(),this.addName(),this.addShortcut(),this.addSubMenu()}configureDefaults(){return!0}addIcon(){if(this.params.isCompact)return;let e=sg(`<span ref="eIcon" class="${this.getClassName("part")} ${this.getClassName("icon")}" role="presentation"></span>`);this.params.checked?e.appendChild(sV("check",this.gos)):this.params.icon&&(sb(this.params.icon)?e.appendChild(this.params.icon):"string"==typeof this.params.icon?e.innerHTML=this.params.icon:console.warn("AG Grid: menu item icon must be DOM node or string")),this.getGui().appendChild(e)}addName(){let e=sg(`<span ref="eName" class="${this.getClassName("part")} ${this.getClassName("text")}">${this.params.name||""}</span>`);this.getGui().appendChild(e)}addShortcut(){if(this.params.isCompact)return;let e=sg(`<span ref="eShortcut" class="${this.getClassName("part")} ${this.getClassName("shortcut")}">${this.params.shortcut||""}</span>`);this.getGui().appendChild(e)}addSubMenu(){let e=sg(`<span ref="ePopupPointer" class="${this.getClassName("part")} ${this.getClassName("popup-pointer")}"></span>`),t=this.getGui();if(this.params.subMenu){let i=this.gos.get("enableRtl")?"smallLeft":"smallRight";iu(t,!1),e.appendChild(sV(i,this.gos))}t.appendChild(e)}getClassName(e){return`${this.cssClassPrefix}-${e}`}destroy(){super.destroy()}},rF=class extends tR{constructor(){super(...arguments),this.agGridDefaults={agDateInput:oG,agColumnHeader:oZ,agColumnGroupHeader:o0,agSortIndicator:oJ,agTextColumnFloatingFilter:oj,agNumberColumnFloatingFilter:oY,agDateColumnFloatingFilter:oI,agReadOnlyFloatingFilter:os,agAnimateShowChangeCellRenderer:o7,agAnimateSlideCellRenderer:o9,agGroupCellRenderer:rp,agGroupRowRenderer:rp,agLoadingCellRenderer:rg,agSkeletonCellRenderer:rm,agCheckboxCellRenderer:rb,agCellEditor:o8,agTextCellEditor:o8,agNumberCellEditor:rE,agDateCellEditor:ry,agDateStringCellEditor:rD,agSelectCellEditor:o5,agLargeTextCellEditor:o3,agCheckboxCellEditor:rA,agTextColumnFilter:oU,agNumberColumnFilter:ok,agDateColumnFilter:oM,agLoadingOverlay:rC,agNoRowsOverlay:rv,agTooltipComponent:rf,agMenuItem:rP},this.enterpriseAgDefaultCompsModule={agSetColumnFilter:"@ag-grid-enterprise/set-filter",agSetColumnFloatingFilter:"@ag-grid-enterprise/set-filter",agMultiColumnFilter:"@ag-grid-enterprise/multi-filter",agMultiColumnFloatingFilter:"@ag-grid-enterprise/multi-filter",agGroupColumnFilter:"@ag-grid-enterprise/row-grouping",agGroupColumnFloatingFilter:"@ag-grid-enterprise/row-grouping",agRichSelect:"@ag-grid-enterprise/rich-select",agRichSelectCellEditor:"@ag-grid-enterprise/rich-select",agDetailCellRenderer:"@ag-grid-enterprise/master-detail",agSparklineCellRenderer:"@ag-grid-enterprise/sparklines"},this.jsComps={}}init(){let e=this.gos.get("components");null!=e&&ea(e,(e,t)=>this.registerJsComponent(e,t))}registerDefaultComponent(e,t){if(this.agGridDefaults[e]){console.error("Trying to overwrite a default component. You should call registerComponent");return}this.agGridDefaults[e]=t}registerJsComponent(e,t){this.jsComps[e]=t}retrieve(e,t){let i=(e,t)=>({componentFromFramework:t,component:e}),s=this.getFrameworkOverrides().frameworkComponent(t,this.gos.get("components"));if(null!=s)return i(s,!0);let o=this.jsComps[t];if(o){let e=this.getFrameworkOverrides().isFrameworkComponent(o);return i(o,e)}let r=this.agGridDefaults[t];if(r)return i(r,!1);let n=this.enterpriseAgDefaultCompsModule[t];return n?eO.__assertRegistered(n,`AG Grid '${e}' component: ${t}`,this.context.getGridId()):ef(()=>{this.warnAboutMissingComponent(e,t)},"MissingComp"+t),null}warnAboutMissingComponent(e,t){let i=sG(t,[...Object.keys(this.agGridDefaults).filter(e=>!["agCellEditor","agGroupRowRenderer","agSortIndicator"].includes(e)),...Object.keys(this.jsComps)],!0,.8).values;console.warn(`AG Grid: Could not find '${t}' component. It was configured as "${e}: '${t}'" but it wasn't found in the list of registered components.`),i.length>0&&console.warn(`         Did you mean: [${i.slice(0,3)}]?`),console.warn(`If using a custom component check it has been registered as described 
109in: ${this.getFrameworkOverrides().getDocLink("components/")}`)}};K([eV],rF.prototype,"init",1),rF=K([ek("userComponentRegistry")],rF);var rL={propertyName:"dateComponent",cellRenderer:!1},rM={propertyName:"headerComponent",cellRenderer:!1},rN={propertyName:"headerGroupComponent",cellRenderer:!1},rI={propertyName:"cellRenderer",cellRenderer:!0},rG={propertyName:"loadingCellRenderer",cellRenderer:!0},rO={propertyName:"cellEditor",cellRenderer:!1},rx={propertyName:"innerRenderer",cellRenderer:!0},r_={propertyName:"loadingOverlayComponent",cellRenderer:!1},rV={propertyName:"noRowsOverlayComponent",cellRenderer:!1},rH={propertyName:"tooltipComponent",cellRenderer:!1},rk={propertyName:"filter",cellRenderer:!1},rB={propertyName:"floatingFilterComponent",cellRenderer:!1},rW={propertyName:"toolPanel",cellRenderer:!1},rU={propertyName:"statusPanel",cellRenderer:!1},rz={propertyName:"fullWidthCellRenderer",cellRenderer:!0},rK={propertyName:"loadingCellRenderer",cellRenderer:!0},r$={propertyName:"groupRowRenderer",cellRenderer:!0},rY={propertyName:"detailCellRenderer",cellRenderer:!0},rj={propertyName:"menuItem",cellRenderer:!1},rq=class{static getFloatingFilterType(e){return this.filterToFloatingFilterMapping[e]}};rq.filterToFloatingFilterMapping={set:"agSetColumnFloatingFilter",agSetColumnFilter:"agSetColumnFloatingFilter",multi:"agMultiColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",group:"agGroupColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",number:"agNumberColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",date:"agDateColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",text:"agTextColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"};var rQ=class extends tR{getHeaderCompDetails(e,t){return this.getCompDetails(e,rM,"agColumnHeader",t)}getHeaderGroupCompDetails(e){let t=e.columnGroup.getColGroupDef();return this.getCompDetails(t,rN,"agColumnGroupHeader",e)}getFullWidthCellRendererDetails(e){return this.getCompDetails(this.gridOptions,rz,null,e,!0)}getFullWidthLoadingCellRendererDetails(e){return this.getCompDetails(this.gridOptions,rK,"agLoadingCellRenderer",e,!0)}getFullWidthGroupCellRendererDetails(e){return this.getCompDetails(this.gridOptions,r$,"agGroupRowRenderer",e,!0)}getFullWidthDetailCellRendererDetails(e){return this.getCompDetails(this.gridOptions,rY,"agDetailCellRenderer",e,!0)}getInnerRendererDetails(e,t){return this.getCompDetails(e,rx,null,t)}getFullWidthGroupRowInnerCellRenderer(e,t){return this.getCompDetails(e,rx,null,t)}getCellRendererDetails(e,t){return this.getCompDetails(e,rI,null,t)}getLoadingCellRendererDetails(e,t){return this.getCompDetails(e,rG,"agSkeletonCellRenderer",t,!0)}getCellEditorDetails(e,t){return this.getCompDetails(e,rO,"agCellEditor",t,!0)}getFilterDetails(e,t,i){return this.getCompDetails(e,rk,i,t,!0)}getDateCompDetails(e){return this.getCompDetails(this.gridOptions,rL,"agDateInput",e,!0)}getLoadingOverlayCompDetails(e){return this.getCompDetails(this.gridOptions,r_,"agLoadingOverlay",e,!0)}getNoRowsOverlayCompDetails(e){return this.getCompDetails(this.gridOptions,rV,"agNoRowsOverlay",e,!0)}getTooltipCompDetails(e){return this.getCompDetails(e.colDef,rH,"agTooltipComponent",e,!0)}getSetFilterCellRendererDetails(e,t){return this.getCompDetails(e,rI,null,t)}getFloatingFilterCompDetails(e,t,i){return this.getCompDetails(e,rB,i,t)}getToolPanelCompDetails(e,t){return this.getCompDetails(e,rW,null,t,!0)}getStatusPanelCompDetails(e,t){return this.getCompDetails(e,rU,null,t,!0)}getMenuItemCompDetails(e,t){return this.getCompDetails(e,rj,"agMenuItem",t,!0)}getCompDetails(e,t,i,s,o=!1){let{propertyName:r,cellRenderer:n}=t,{compName:l,jsComp:a,fwComp:h,paramsFromSelector:d,popupFromSelector:u,popupPositionFromSelector:c}=this.getCompKeys(e,t,s),p=e=>{let t=this.userComponentRegistry.retrieve(r,e);t&&(a=t.componentFromFramework?void 0:t.component,h=t.componentFromFramework?t.component:void 0)};if(null!=l&&p(l),null==a&&null==h&&null!=i&&p(i),a&&n&&!this.agComponentUtils.doesImplementIComponent(a)&&(a=this.agComponentUtils.adaptFunction(r,a)),!a&&!h){o&&console.error(`AG Grid: Could not find component ${l}, did you forget to configure this component?`);return}
109let g=this.mergeParamsWithApplicationProvidedParams(e,t,s,d),m=null==a,C=a||h;return{componentFromFramework:m,componentClass:C,params:g,type:t,popupFromSelector:u,popupPositionFromSelector:c,newAgStackInstance:()=>this.newAgStackInstance(C,m,g,t)}}getCompKeys(e,t,i){let s,o,r,n,l,a;let{propertyName:h}=t;if(e){let t=e[h+"Selector"],d=t?t(i):null,u=e=>{"string"==typeof e?s=e:null!=e&&!0!==e&&(this.getFrameworkOverrides().isFrameworkComponent(e)?r=e:o=e)};d?(u(d.component),n=d.params,l=d.popup,a=d.popupPosition):u(e[h])}return{compName:s,jsComp:o,fwComp:r,paramsFromSelector:n,popupFromSelector:l,popupPositionFromSelector:a}}newAgStackInstance(e,t,i,s){let o;let r=s.propertyName;if(t){let t=this.componentMetadataProvider.retrieve(r);o=this.frameworkComponentWrapper.wrap(e,t.mandatoryMethodList,t.optionalMethodList,s)}else o=new e;let n=this.initComponent(o,i);return null==n?s1.resolve(o):n.then(()=>o)}mergeParamsWithApplicationProvidedParams(e,t,i,s=null){let o=this.gos.getGridCommonParams();ec(o,i);let r=e&&e[t.propertyName+"Params"];return"function"==typeof r?ec(o,r(i)):"object"==typeof r&&ec(o,r),ec(o,s),o}initComponent(e,t){if(this.context.createBean(e),null!=e.init)return e.init(t)}getDefaultFloatingFilterType(e,t){if(null==e)return null;let i=null,{compName:s,jsComp:o,fwComp:r}=this.getCompKeys(e,rk);return s?i=rq.getFloatingFilterType(s):null==o&&null==r&&!0===e.filter&&(i=t()),i}};K([eB("gridOptions")],rQ.prototype,"gridOptions",2),K([eB("agComponentUtils")],rQ.prototype,"agComponentUtils",2),K([eB("componentMetadataProvider")],rQ.prototype,"componentMetadataProvider",2),K([eB("userComponentRegistry")],rQ.prototype,"userComponentRegistry",2),K([eW("frameworkComponentWrapper")],rQ.prototype,"frameworkComponentWrapper",2),rQ=K([ek("userComponentFactory")],rQ);var rX=((h=rX||{})[h.SINGLE_SHEET=0]="SINGLE_SHEET",h[h.MULTI_SHEET=1]="MULTI_SHEET",h),rJ=((d=rJ||{})[d.Above=0]="Above",d[d.Below=1]="Below",d),rZ=class{constructor(e){this.tickingInterval=null,this.onScrollCallback=null,this.scrollContainer=e.scrollContainer,this.scrollHorizontally=-1!==e.scrollAxis.indexOf("x"),this.scrollVertically=-1!==e.scrollAxis.indexOf("y"),this.scrollByTick=null!=e.scrollByTick?e.scrollByTick:20,e.onScrollCallback&&(this.onScrollCallback=e.onScrollCallback),this.scrollVertically&&(this.getVerticalPosition=e.getVerticalPosition,this.setVerticalPosition=e.setVerticalPosition),this.scrollHorizontally&&(this.getHorizontalPosition=e.getHorizontalPosition,this.setHorizontalPosition=e.setHorizontalPosition),this.shouldSkipVerticalScroll=e.shouldSkipVerticalScroll||(()=>!1),this.shouldSkipHorizontalScroll=e.shouldSkipHorizontalScroll||(()=>!1)}check(e,t=!1){let i=t||this.shouldSkipVerticalScroll();if(i&&this.shouldSkipHorizontalScroll())return;let s=this.scrollContainer.getBoundingClientRect(),o=this.scrollByTick;this.tickLeft=e.clientX<s.left+o,this.tickRight=e.clientX>s.right-o,this.tickUp=e.clientY<s.top+o&&!i,this.tickDown=e.clientY>s.bottom-o&&!i,this.tickLeft||this.tickRight||this.tickUp||this.tickDown?this.ensureTickingStarted():this.ensureCleared()}ensureTickingStarted(){null===this.tickingInterval&&(this.tickingInterval=window.setInterval(this.doTick.bind(this),100),this.tickCount=0)}doTick(){let e;if(this.tickCount++,e=this.tickCount>20?200:this.tickCount>10?80:40,this.scrollVertically){let t=this.getVerticalPosition();this.tickUp&&this.setVerticalPosition(t-e),this.tickDown&&this.setVerticalPosition(t+e)}if(this.scrollHorizontally){let t=this.getHorizontalPosition();this.tickLeft&&this.setHorizontalPosition(t-e),this.tickRight&&this.setHorizontalPosition(t+e)}this.onScrollCallback&&this.onScrollCallback()}ensureCleared(){this.tickingInterval&&(window.clearInterval(this.tickingInterval),this.tickingInterval=null)}},r0=class extends tR{constructor(e){super(),this.eContainer=e}postConstruct(){this.gos.isRowModelType("clientSide")&&(this.clientSideRowModel=this.rowModel),this.ctrlsService.whenReady(e=>{let t=e.gridBodyCtrl;this.autoScrollService=new rZ({scrollContainer:t.getBodyViewportElement(),scrollAxis:"y",getVerticalPosition:()=>
109t.getScrollFeature().getVScrollPosition().top,setVerticalPosition:e=>t.getScrollFeature().setVerticalScrollPosition(e),onScrollCallback:()=>{this.onDragging(this.lastDraggingEvent)}})})}getContainer(){return this.eContainer}isInterestedIn(e){return 2===e}getIconName(){return this.gos.get("rowDragManaged")&&this.shouldPreventRowMove()?rn.ICON_NOT_ALLOWED:rn.ICON_MOVE}shouldPreventRowMove(){return!!(this.columnModel.getRowGroupColumns().length||this.filterManager.isAnyFilterPresent()||this.sortController.isSortActive())}getRowNodes(e){if(!this.isFromThisGrid(e))return e.dragItem.rowNodes||[];let t=e.dragItem.rowNode;if(this.gos.get("rowDragMultiRow")){let e=[...this.selectionService.getSelectedNodes()].sort((e,t)=>null==e.rowIndex||null==t.rowIndex?0:this.getRowIndexNumber(e)-this.getRowIndexNumber(t));if(-1!==e.indexOf(t))return e}return[t]}onDragEnter(e){e.dragItem.rowNodes=this.getRowNodes(e),this.dispatchGridEvent(tP.EVENT_ROW_DRAG_ENTER,e),this.getRowNodes(e).forEach(e=>{e.setDragging(!0)}),this.onEnterOrDragging(e)}onDragging(e){this.onEnterOrDragging(e)}isFromThisGrid(e){let{dragSourceDomDataKey:t}=e.dragSource;return t===this.gos.getDomDataKey()}isDropZoneWithinThisGrid(e){let t=this.ctrlsService.getGridBodyCtrl().getGui(),{dropZoneTarget:i}=e;return!t.contains(i)}onEnterOrDragging(e){this.dispatchGridEvent(tP.EVENT_ROW_DRAG_MOVE,e),this.lastDraggingEvent=e;let t=this.mouseEventService.getNormalisedPosition(e).y;this.gos.get("rowDragManaged")&&this.doManagedDrag(e,t),this.autoScrollService.check(e.event)}doManagedDrag(e,t){let i=this.isFromThisGrid(e),s=this.gos.get("rowDragManaged"),o=e.dragItem.rowNodes;!(s&&this.shouldPreventRowMove())&&(this.gos.get("suppressMoveWhenRowDragging")||!i?this.isDropZoneWithinThisGrid(e)||this.clientSideRowModel.highlightRowAtPixel(o[0],t):this.moveRows(o,t))}getRowIndexNumber(e){return parseInt(e5(e.getRowIndexString().split("-")),10)}moveRowAndClearHighlight(e){let t=this.clientSideRowModel.getLastHighlightedRowNode(),i=t&&1===t.highlighted,s=this.mouseEventService.getNormalisedPosition(e).y,o=e.dragItem.rowNodes,r=i?1:0;if(this.isFromThisGrid(e))o.forEach(e=>{e.rowTop<s&&(r-=1)}),this.moveRows(o,s,r);else{let e=this.gos.getCallback("getRowId"),t=this.clientSideRowModel.getRowIndexAtPixel(s)+1;0===this.clientSideRowModel.getHighlightPosition(s)&&t--,this.clientSideRowModel.updateRowData({add:o.map(e=>e.data).filter(t=>!this.clientSideRowModel.getRowNode(e?e({data:t,level:0}):t.id)),addIndex:t})}this.clearRowHighlight()}clearRowHighlight(){this.clientSideRowModel.highlightRowAtPixel(null)}moveRows(e,t,i=0){var s;this.clientSideRowModel.ensureRowsAtPixel(e,t,i)&&(this.focusService.clearFocusedCell(),null==(s=this.rangeService)||s.removeAllCellRanges())}addRowDropZone(e){if(!e.getContainer()){ew("addRowDropZone - A container target needs to be provided");return}if(this.dragAndDropService.findExternalZone(e)){console.warn("AG Grid: addRowDropZone - target already exists in the list of DropZones. Use `removeRowDropZone` before adding it again.");return}let t={getContainer:e.getContainer};e.fromGrid?t=e:(e.onDragEnter&&(t.onDragEnter=t=>{e.onDragEnter(this.draggingToRowDragEvent(tP.EVENT_ROW_DRAG_ENTER,t))}),e.onDragLeave&&(t.onDragLeave=t=>{e.onDragLeave(this.draggingToRowDragEvent(tP.EVENT_ROW_DRAG_LEAVE,t))}),e.onDragging&&(t.onDragging=t=>{e.onDragging(this.draggingToRowDragEvent(tP.EVENT_ROW_DRAG_MOVE,t))}),e.onDragStop&&(t.onDragStop=t=>{e.onDragStop(this.draggingToRowDragEvent(tP.EVENT_ROW_DRAG_END,t))})),this.dragAndDropService.addDropTarget(B({isInterestedIn:e=>2===e,getIconName:()=>rn.ICON_MOVE,external:!0},t))}getRowDropZone(e){let t=this.getContainer.bind(this),i=this.onDragEnter.bind(this),s=this.onDragLeave.bind(this),o=this.onDragging.bind(this),r=this.onDragStop.bind(this);return e?{getContainer:t,onDragEnter:e.onDragEnter?t=>{i(t),e.onDragEnter(this.draggingToRowDragEvent(tP.EVENT_ROW_DRAG_ENTER,t))}:i,onDragLeave:e.onDragLeave?t=>{s(t),e.onDragLeave(this.draggingToRowDragEvent(tP.EVENT_ROW_DRAG_LEAVE,t))}:s,onDragging:e.onDragging?t=>{o(t),e.onDragging(this.draggingToRowDragEvent(tP.EVENT_ROW_DRAG_MOVE,t))}:o,onDragStop:e.onDragStop?t=>{r(t),e.onDragStop(this.draggingToRowDragEvent(tP.EVENT_ROW_DRAG_END,t))}:r,fromGrid:!0}:{getContainer:t,onDragEnter:i,onDragLeave:s,onDragging:o,onDragStop:r,fromGrid:!0}}draggingToRowDragEvent(e,t){let i,s;let o=this.mouseEventService.getNormalisedPosition(t).y,r=o>this.paginationProxy.getCurrentPageHeight(),n=-1;switch(r||(n=this.rowModel.getRowIndexAtPixel(o),i=this.rowModel.getRow(n)),t.vDirection){case 1:s="down";break;case 0:s="up";break;default:s=null}return this.gos.addGridCommonParams({type:e,event:t.event,node:t.dragItem.rowNode,nodes:t.dragItem.rowNodes,overIndex:n,overNode:i,y:o,vDirection:s})}dispatchGridEvent(e,t){let i=this.draggingToRowDragEvent(e,t);this.eventService.dispatchEvent(i)}onDragLeave(e){this.dispatchGridEvent(tP.EVENT_ROW_DRAG_LEAVE,e),this.stopDragging(e),this.gos.get("rowDragManaged")&&this.clearRowHighlight()}onDragStop(e){this.dispatchGridEvent(tP.EVENT_ROW_DRAG_END,e),this.stopDragging(e),this.gos.get("rowDragManaged")&&(this.gos.get("suppressMoveWhenRowDragging")||!this.isFromThisGrid(e))&&!this.isDropZoneWithinThisGrid(e)&&this.moveRowAndClearHighlight(e)}stopDragging(e){this.autoScrollService.ensureCleared(),this.getRowNodes(e).forEach(e
109=>{e.setDragging(!1)})}};K([eB("dragAndDropService")],r0.prototype,"dragAndDropService",2),K([eB("rowModel")],r0.prototype,"rowModel",2),K([eB("paginationProxy")],r0.prototype,"paginationProxy",2),K([eB("columnModel")],r0.prototype,"columnModel",2),K([eB("focusService")],r0.prototype,"focusService",2),K([eB("sortController")],r0.prototype,"sortController",2),K([eB("filterManager")],r0.prototype,"filterManager",2),K([eB("selectionService")],r0.prototype,"selectionService",2),K([eB("mouseEventService")],r0.prototype,"mouseEventService",2),K([eB("ctrlsService")],r0.prototype,"ctrlsService",2),K([eW("rangeService")],r0.prototype,"rangeService",2),K([eV],r0.prototype,"postConstruct",1);var r1=class extends tR{constructor(){super(...arguments),this.dragEndFunctions=[],this.dragSources=[]}removeAllListeners(){this.dragSources.forEach(this.removeListener.bind(this)),this.dragSources.length=0}removeListener(e){let t=e.dragSource.eElement,i=e.mouseDownListener;if(t.removeEventListener("mousedown",i),e.touchEnabled){let i=e.touchStartListener;t.removeEventListener("touchstart",i,{passive:!0})}}removeDragSource(e){let t=this.dragSources.find(t=>t.dragSource===e);t&&(this.removeListener(t),te(this.dragSources,t))}isDragging(){return this.dragging}addDragSource(e){let t=this.onMouseDown.bind(this,e),{eElement:i,includeTouch:s,stopPropagationForTouch:o}=e;i.addEventListener("mousedown",t);let r=null,n=this.gos.get("suppressTouch");s&&!n&&(r=t=>{i6(t.target)||(t.cancelable&&(t.preventDefault(),o&&t.stopPropagation()),this.onTouchStart(e,t))},i.addEventListener("touchstart",r,{passive:!1})),this.dragSources.push({dragSource:e,mouseDownListener:t,touchStartListener:r,touchEnabled:!!s})}getStartTarget(){return this.startTarget}onTouchStart(e,t){this.currentDragParams=e,this.dragging=!1;let i=t.touches[0];this.touchLastTime=i,this.touchStart=i;let s=t=>this.onTouchUp(t,e.eElement),o=t.target,r=[{target:this.gos.getRootNode(),type:"touchmove",listener:e=>{e.cancelable&&e.preventDefault()},options:{passive:!1}},{target:o,type:"touchmove",listener:t=>this.onTouchMove(t,e.eElement),options:{passive:!0}},{target:o,type:"touchend",listener:s,options:{passive:!0}},{target:o,type:"touchcancel",listener:s,options:{passive:!0}}];this.addTemporaryEvents(r),0===e.dragStartPixels&&this.onCommonMove(i,this.touchStart,e.eElement)}onMouseDown(e,t){if(e.skipMouseEvent&&e.skipMouseEvent(t)||t._alreadyProcessedByDragService||(t._alreadyProcessedByDragService=!0,0!==t.button))return;this.shouldPreventMouseEvent(t)&&t.preventDefault(),this.currentDragParams=e,this.dragging=!1,this.mouseStartEvent=t,this.startTarget=t.target;let i=this.gos.getRootNode();this.addTemporaryEvents([{target:i,type:"mousemove",listener:t=>this.onMouseMove(t,e.eElement)},{target:i,type:"mouseup",listener:t=>this.onMouseUp(t,e.eElement)},{target:i,type:"contextmenu",listener:e=>e.preventDefault()}]),0===e.dragStartPixels&&this.onMouseMove(t,e.eElement)}addTemporaryEvents(e){e.forEach(e=>{let{target:t,type:i,listener:s,options:o}=e;t.addEventListener(i,s,o)}),this.dragEndFunctions.push(()=>{e.forEach(e=>{let{target:t,type:i,listener:s,options:o}=e;t.removeEventListener(i,s,o)})})}isEventNearStartEvent(e,t){let{dragStartPixels:i}=this.currentDragParams;return sY(e,t,q(i)?i:4)}getFirstActiveTouch(e){for(let t=0;t<e.length;t++)if(e[t].identifier===this.touchStart.identifier)return e[t];return null}onCommonMove(e,t,i){if(!this.dragging){if(!this.dragging&&this.isEventNearStartEvent(e,t))return;this.dragging=!0;let s={type:tP.EVENT_DRAG_STARTED,target:i};this.eventService.dispatchEvent(s),this.currentDragParams.onDragStart(t),this.currentDragParams.onDragging(t)}this.currentDragParams.onDragging(e)}onTouchMove(e,t){let i=this.getFirstActiveTouch(e.touches);i&&this.onCommonMove(i,this.touchStart,t)}onMouseMove(e,t){var i;iF()&&(null==(i=this.gos.getDocument().getSelection())||i.removeAllRanges()),this.shouldPreventMouseEvent(e)&&e.preventDefault(),this.onCommonMove(e,this.mouseStartEvent,t)}shouldPreventMouseEvent(e){let t=this.gos.get("enableCellTextSelection"),i="mousemove"===e.type;return t&&i&&e.cancelable&&this.mouseEventService.isEventFromThisGrid(e)&&!this.isOverFormFieldElement(e)}isOverFormFieldElement(e){let t=e.target,i=null==t?void 0:t.tagName.toLocaleLowerCase();return!!(null==i?void 0:i.match("^a$|textarea|input|select|button"))}onTouchUp(e,t){let i=this.getFirstActiveTouch(e.changedTouches);i||(i=this.touchLastTime),this.onUpCommon(i,t)}onMouseUp(e,t){this.onUpCommon(e,t)}
109onUpCommon(e,t){if(this.dragging){this.dragging=!1,this.currentDragParams.onDragStop(e);let i={type:tP.EVENT_DRAG_STOPPED,target:t};this.eventService.dispatchEvent(i)}this.mouseStartEvent=null,this.startTarget=null,this.touchStart=null,this.touchLastTime=null,this.currentDragParams=null,this.dragEndFunctions.forEach(e=>e()),this.dragEndFunctions.length=0}};K([eB("mouseEventService")],r1.prototype,"mouseEventService",2),K([eH],r1.prototype,"removeAllListeners",1),r1=K([ek("dragService")],r1);var r2="ag-list-item-hovered",r3=class extends tR{constructor(e,t,i){super(),this.comp=e,this.virtualList=t,this.params=i,this.currentDragValue=null,this.lastHoveredListItem=null}postConstruct(){this.addManagedListener(this.params.eventSource,this.params.listItemDragStartEvent,this.listItemDragStart.bind(this)),this.addManagedListener(this.params.eventSource,this.params.listItemDragEndEvent,this.listItemDragEnd.bind(this)),this.createDropTarget(),this.createAutoScrollService()}listItemDragStart(e){this.currentDragValue=this.params.getCurrentDragValue(e),this.moveBlocked=this.params.isMoveBlocked(this.currentDragValue)}listItemDragEnd(){window.setTimeout(()=>{this.currentDragValue=null,this.moveBlocked=!1},10)}createDropTarget(){this.dragAndDropService.addDropTarget({isInterestedIn:e=>e===this.params.dragSourceType,getIconName:()=>this.moveBlocked?rn.ICON_PINNED:rn.ICON_MOVE,getContainer:()=>this.comp.getGui(),onDragging:e=>this.onDragging(e),onDragStop:()=>this.onDragStop(),onDragLeave:()=>this.onDragLeave()})}createAutoScrollService(){let e=this.virtualList.getGui();this.autoScrollService=new rZ({scrollContainer:e,scrollAxis:"y",getVerticalPosition:()=>e.scrollTop,setVerticalPosition:t=>e.scrollTop=t})}onDragging(e){if(!this.currentDragValue||this.moveBlocked)return;let t=this.getListDragItem(e),i=this.virtualList.getComponentAt(t.rowIndex);if(!i)return;let s=i.getGui().parentElement;this.lastHoveredListItem&&this.lastHoveredListItem.rowIndex===t.rowIndex&&this.lastHoveredListItem.position===t.position||(this.autoScrollService.check(e.event),this.clearHoveredItems(),this.lastHoveredListItem=t,i3(s,r2),i3(s,`ag-item-highlight-${t.position}`))}getListDragItem(e){let t=this.virtualList.getGui(),i=parseFloat(window.getComputedStyle(t).paddingTop),s=this.virtualList.getRowHeight(),o=this.virtualList.getScrollTop(),r=Math.max(0,(e.y-i+o)/s),n=this.params.getNumRows(this.comp)-1,l=0|Math.min(n,r);return{rowIndex:l,position:Math.round(r)>r||r>n?"bottom":"top",component:this.virtualList.getComponentAt(l)}}onDragStop(){this.moveBlocked||(this.params.moveItem(this.currentDragValue,this.lastHoveredListItem),this.clearHoveredItems(),this.autoScrollService.ensureCleared())}onDragLeave(){this.clearHoveredItems(),this.autoScrollService.ensureCleared()}clearHoveredItems(){this.virtualList.getGui().querySelectorAll(`.${r2}`).forEach(e=>{[r2,"ag-item-highlight-top","ag-item-highlight-bottom"].forEach(t=>{e.classList.remove(t)})}),this.lastHoveredListItem=null}};function r5(e){return null!=e&&null!=e.getFrameworkComponentInstance?e.getFrameworkComponentInstance():e}K([eB("dragAndDropService")],r3.prototype,"dragAndDropService",2),K([eV],r3.prototype,"postConstruct",1);var r4=class{constructor(){this.detailGridInfoMap={},this.destroyCalled=!1}init(){switch(this.rowModel.getType()){case"clientSide":this.clientSideRowModel=this.rowModel;break;case"infinite":this.infiniteRowModel=this.rowModel;break;case"serverSide":this.serverSideRowModel=this.rowModel}this.ctrlsService.whenReady(e=>{this.gridBodyCtrl=e.gridBodyCtrl})}__getAlignedGridService(){return this.alignedGridsService}getGridId(){return this.context.getGridId()}addDetailGridInfo(e,t){this.detailGridInfoMap[e]=t}removeDetailGridInfo(e){delete this.detailGridInfoMap[e]}getDetailGridInfo(e){return this.detailGridInfoMap[e]}forEachDetailGridInfo(e){let t=0;ea(this.detailGridInfoMap,(i,s)=>{q(s)&&(e(s,t),t++)})}getDataAsCsv(e){if(eO.__assertRegistered("@ag-grid-community/csv-export","api.getDataAsCsv",this.context.getGridId()))return this.csvCreator.getDataAsCsv(e)}exportDataAsCsv(e){eO.__assertRegistered("@ag-grid-community/csv-export","a
109pi.exportDataAsCsv",this.context.getGridId())&&this.csvCreator.exportDataAsCsv(e)}assertNotExcelMultiSheet(e,t){return!!eO.__assertRegistered("@ag-grid-enterprise/excel-export","api."+e,this.context.getGridId())&&(1!==this.excelCreator.getFactoryMode()||(console.warn("AG Grid: The Excel Exporter is currently on Multi Sheet mode. End that operation by calling 'api.getMultipleSheetAsExcel()' or 'api.exportMultipleSheetsAsExcel()'"),!1))}getDataAsExcel(e){if(this.assertNotExcelMultiSheet("getDataAsExcel",e))return this.excelCreator.getDataAsExcel(e)}exportDataAsExcel(e){this.assertNotExcelMultiSheet("exportDataAsExcel",e)&&this.excelCreator.exportDataAsExcel(e)}getSheetDataForExcel(e){if(eO.__assertRegistered("@ag-grid-enterprise/excel-export","api.getSheetDataForExcel",this.context.getGridId()))return this.excelCreator.setFactoryMode(1),this.excelCreator.getSheetDataForExcel(e)}getMultipleSheetsAsExcel(e){if(eO.__assertRegistered("@ag-grid-enterprise/excel-export","api.getMultipleSheetsAsExcel",this.context.getGridId()))return this.excelCreator.getMultipleSheetsAsExcel(e)}exportMultipleSheetsAsExcel(e){eO.__assertRegistered("@ag-grid-enterprise/excel-export","api.exportMultipleSheetsAsExcel",this.context.getGridId())&&this.excelCreator.exportMultipleSheetsAsExcel(e)}setGridAriaProperty(e,t){if(!e)return;let i=this.ctrlsService.getGridBodyCtrl().getGui(),s=`aria-${e}`;null===t?i.removeAttribute(s):i.setAttribute(s,t)}logMissingRowModel(e,...t){console.error(`AG Grid: api.${e} can only be called when gridOptions.rowModelType is ${t.join(" or ")}`)}logDeprecation(e,t,i,s){ew(`Since ${e} api.${t} is deprecated. Please use ${i} instead. ${null!=s?s:""}`)}getPinnedTopRowCount(){return this.pinnedRowModel.getPinnedTopRowCount()}getPinnedBottomRowCount(){return this.pinnedRowModel.getPinnedBottomRowCount()}getPinnedTopRow(e){return this.pinnedRowModel.getPinnedTopRow(e)}getPinnedBottomRow(e){return this.pinnedRowModel.getPinnedBottomRow(e)}expireValueCache(){this.valueCache.expire()}getVerticalPixelRange(){return this.gridBodyCtrl.getScrollFeature().getVScrollPosition()}getHorizontalPixelRange(){return this.gridBodyCtrl.getScrollFeature().getHScrollPosition()}refreshCells(e={}){this.frameworkOverrides.wrapIncoming(()=>this.rowRenderer.refreshCells(e))}flashCells(e={}){let t=e=>ew(`Since v31.1 api.flashCells parameter '${e}Delay' is deprecated. Please use '${e}Duration' instead.`);q(e.fadeDelay)&&t("fade"),q(e.flashDelay)&&t("flash"),this.frameworkOverrides.wrapIncoming(()=>this.rowRenderer.flashCells(e))}redrawRows(e={}){let t=e?e.rowNodes:void 0;this.frameworkOverrides.wrapIncoming(()=>this.rowRenderer.redrawRows(t))}refreshHeader(){this.frameworkOverrides.wrapIncoming(()=>this.ctrlsService.getHeaderRowContainerCtrls().forEach(e=>e.refresh()))}isAnyFilterPresent(){return this.filterManager.isAnyFilterPresent()}isColumnFilterPresent(){return this.filterManager.isColumnFilterPresent()||this.filterManager.isAggregateFilterPresent()}isQuickFilterPresent(){return this.filterManager.isQuickFilterPresent()}getModel(){return ew("Since v31.1 getModel() is deprecated. Please use the appropriate grid API methods instead."),this.rowModel}setRowNodeExpanded(e,t,i,s){this.expansionService.setRowNodeExpanded(e,t,i,s)}onGroupExpandedOrCollapsed(){if(Q(this.clientSideRowModel)){this.logMissingRowModel("onGroupExpandedOrCollapsed","clientSide");return}this.expansionService.onGroupExpandedOrCollapsed()}refreshClientSideRowModel(e){if(Q(this.clientSideRowModel)){this.logMissingRowModel("refreshClientSideRowModel","clientSide");return}this.clientSideRowModel.refreshModel(e)}isAnimationFrameQueueEmpty(){return this.animationFrameService.isQueueEmpty()}flushAllAnimationFrames(){this.animationFrameService.flushAllFrames()}getRowNode(e){return this.rowModel.getRowNode(e)}getSizesForCurrentTheme(){return{rowHeight:this.gos.getRowHeightAsNumber(),headerHeight:this.columnModel.getHeaderHeight()}}expandAll(){this.clientSideRowModel||this.serverSideRowModel?this.expansionService.expandAll(!0):this.logMissingRowModel("expandAll","clientSide","serverSide")}collapseAll(){this.clientSideRowModel||this.serverSideRowModel?this.expansionService.expandAll(!1):this.logMissingRowModel("collapseAll","clientSide","serverSide")}addRenderedRowListener(e,t,i){this.rowRenderer.addRenderedRowListener(e,t,i)}getQuickFilter(){return this.gos.get("quickFilterText")}getAdvancedFilterModel(){return eO.__assertRegistered("@ag-grid-enterprise/advanced-filter","api.getAdvancedFilterModel",this.context.getGridId())?this.filterManager.getAdvancedFilterModel():null}setAdvancedFilterModel(e){this.filterManager.setAdvancedFilterModel(e)}showAdvancedFilterBuilder(){eO.__assertRegistered("@ag-grid-enterprise/advanced-filter","api.setAdvancedFilterModel",this.context.getGridId())&&this.filterManager.showAdvancedFilterBuilder("api")}setNodesSelected(e){if(!e.nodes.every(e=>e.rowPinned?(console.warn("AG Grid: cannot select pinned rows"),!1):void 0!==e.id||(console.warn("AG Grid: cannot select node until id for node is known"),!1)))return;let{nodes:t,source:i,newValue:s}=e;this.selectionService.setNodesSelected({nodes:t,source:null!=i?i:"api",newValue:s})}selectAll(e="apiSelectAll"){this.selectionService.selectAllRowNodes({source:e})}deselectAll(e="apiSelectAll"){this.selectionService.deselectAllRowNodes({source:e})}selectAllFiltered(e="apiSelectAllFiltered"){this.selectionService.selectAllRowNodes({source:e,justFiltered:!0})}deselectAllFiltered(e="apiSelectAllFiltered"){this.selectionService.deselectAllRowNodes({source:e,justFiltered:!0})}getServerSideSelectionState(){return Q(this.serverSideRowModel)?(this.logMissingRowModel("getServerSideSelectionState","serverSide"),null):this.selectionService.getSelectionState()}setServerSideSelectionState(e){if(Q(this.serverSideRowModel)){this.logMissingRowModel("setServerSideSelectionState","serverSide");return}this.selectionService.setSelectionState(e,"api")}selectAllOnCurrentPage(e="apiSelectAllCurrentPage"){this.selectionService.selectAllRowNodes({source:e,justCurrentPage:!0})}deselectAllOnCurrentPage(e="apiSelectAllCurrentPage"){this.selectionService.deselectAllRowNodes({source:e,justCurrentPage:!0})}showLoadingOverlay(){this.overlayService.showLoadingOverlay()}showNoRowsOverlay(){this.overlayService.showNoRowsOverlay()}hideOverlay(){this.overlayService.hideOverlay()}getSelectedNodes(){return this.selectionService.getSelectedNodes()}getSelectedRows(){return this.selectionService.getSelectedRows()}getBestCostNodeSelection(){if(Q(this.clientSideRowModel)){this.logMissingRowModel("getBestCostNodeSelection","clientSide");return}
109return this.selectionService.getBestCostNodeSelection()}getRenderedNodes(){return this.rowRenderer.getRenderedNodes()}ensureColumnVisible(e,t="auto"){this.frameworkOverrides.wrapIncoming(()=>this.gridBodyCtrl.getScrollFeature().ensureColumnVisible(e,t),"ensureVisible")}ensureIndexVisible(e,t){this.frameworkOverrides.wrapIncoming(()=>this.gridBodyCtrl.getScrollFeature().ensureIndexVisible(e,t),"ensureVisible")}ensureNodeVisible(e,t=null){this.frameworkOverrides.wrapIncoming(()=>this.gridBodyCtrl.getScrollFeature().ensureNodeVisible(e,t),"ensureVisible")}forEachLeafNode(e){if(Q(this.clientSideRowModel)){this.logMissingRowModel("forEachLeafNode","clientSide");return}this.clientSideRowModel.forEachLeafNode(e)}forEachNode(e,t){this.rowModel.forEachNode(e,t)}forEachNodeAfterFilter(e){if(Q(this.clientSideRowModel)){this.logMissingRowModel("forEachNodeAfterFilter","clientSide");return}this.clientSideRowModel.forEachNodeAfterFilter(e)}forEachNodeAfterFilterAndSort(e){if(Q(this.clientSideRowModel)){this.logMissingRowModel("forEachNodeAfterFilterAndSort","clientSide");return}this.clientSideRowModel.forEachNodeAfterFilterAndSort(e)}getFilterInstance(e,t){return ew("'getFilterInstance' is deprecated. To get/set individual filter models, use 'getColumnFilterModel' or 'setColumnFilterModel' instead. To get hold of the filter instance, use 'getColumnFilterInstance' which returns the instance asynchronously."),this.filterManager.getFilterInstance(e,t)}getColumnFilterInstance(e){return this.filterManager.getColumnFilterInstance(e)}destroyFilter(e){let t=this.columnModel.getPrimaryColumn(e);if(t)return this.filterManager.destroyFilter(t,"api")}getStatusPanel(e){if(eO.__assertRegistered("@ag-grid-enterprise/status-bar","api.getStatusPanel",this.context.getGridId()))return r5(this.statusBarService.getStatusPanel(e))}getColumnDef(e){let t=this.columnModel.getPrimaryColumn(e);return t?t.getColDef():null}getColumnDefs(){return this.columnModel.getColumnDefs()}onFilterChanged(e="api"){this.filterManager.onFilterChanged({source:e})}onSortChanged(){this.sortController.onSortChanged("api")}setFilterModel(e){this.frameworkOverrides.wrapIncoming(()=>this.filterManager.setFilterModel(e))}getFilterModel(){return this.filterManager.getFilterModel()}getColumnFilterModel(e){return this.filterManager.getColumnFilterModel(e)}setColumnFilterModel(e,t){return this.filterManager.setColumnFilterModel(e,t)}getFocusedCell(){return this.focusService.getFocusedCell()}clearFocusedCell(){return this.focusService.clearFocusedCell()}setFocusedCell(e,t,i){this.focusService.setFocusedCell({rowIndex:e,column:t,rowPinned:i,forceBrowserFocus:!0})}addRowDropZone(e){this.gridBodyCtrl.getRowDragFeature().addRowDropZone(e)}removeRowDropZone(e){let t=this.dragAndDropService.findExternalZone(e);t&&this.dragAndDropService.removeDropTarget(t)}getRowDropZoneParams(e){return this.gridBodyCtrl.getRowDragFeature().getRowDropZone(e)}assertSideBarLoaded(e){return eO.__assertRegistered("@ag-grid-enterprise/side-bar","api."+e,this.context.getGridId())}isSideBarVisible(){return this.assertSideBarLoaded("isSideBarVisible")&&this.sideBarService.getSideBarComp().isDisplayed()}setSideBarVisible(e){this.assertSideBarLoaded("setSideBarVisible")&&this.sideBarService.getSideBarComp().setDisplayed(e)}setSideBarPosition(e){this.assertSideBarLoaded("setSideBarPosition")&&this.sideBarService.getSideBarComp().setSideBarPosition(e)}openToolPanel(e){this.assertSideBarLoaded("openToolPanel")&&this.sideBarService.getSideBarComp().openToolPanel(e,"api")}closeToolPanel(){this.assertSideBarLoaded("closeToolPanel")&&this.sideBarService.getSideBarComp().close("api")}getOpenedToolPanel(){return this.assertSideBarLoaded("getOpenedToolPanel")?this.sideBarService.getSideBarComp().openedItem():null}refreshToolPanel(){this.assertSideBarLoaded("refreshToolPanel")&&this.sideBarService.getSideBarComp().refresh()}isToolPanelShowing(){return this.assertSideBarLoaded("isToolPanelShowing")&&this.sideBarService.getSideBarComp().isToolPanelShowing()}getToolPanelInstance(e){if(this.assertSideBarLoaded("getToolPanelInstance"))return r5(this.sideBarService.getSideBarComp().getToolPanelInstance(e))}getSideBar(){if(this.assertSideBarLoaded("getSideBar"))return this.sideBarService.getSideBarComp().getDef()}resetRowHeights(){if(q(this.clientSideRowModel)){if(this.columnModel.isAutoRowHeightActive()){console.warn("AG Grid: calling gridApi.resetRowHeights() makes no sense when using Auto Row Height.");return}this.clientSideRowModel.resetRowHeights()}}setRowCount(e,t){if(this.serverSideRowModel){if(this.columnModel.isRowGroupEmpty()){this.serverSideRowModel.setRowCount(e,t);return}console.error("AG Grid: setRowCount cannot be used while using row grouping.");return}if(this.infiniteRowModel){this.infiniteRowModel.setRowCount(e,t);return}
109this.logMissingRowModel("setRowCount","infinite","serverSide")}onRowHeightChanged(){this.clientSideRowModel?this.clientSideRowModel.onRowHeightChanged():this.serverSideRowModel&&this.serverSideRowModel.onRowHeightChanged()}getValue(e,t){return this.logDeprecation("31.3","getValue","getCellValue"),this.getCellValue({colKey:e,rowNode:t})}getCellValue(e){var t;let{colKey:i,rowNode:s,useFormatter:o}=e,r=null!=(t=this.columnModel.getPrimaryColumn(i))?t:this.columnModel.getGridColumn(i);if(Q(r))return null;let n=this.valueService.getValue(r,s);if(o){let e=this.valueService.formatValue(r,s,n);return null!=e?e:tV(n,!0)}return n}addEventListener(e,t){this.apiEventService.addEventListener(e,t)}addGlobalListener(e){this.apiEventService.addGlobalListener(e)}removeEventListener(e,t){this.apiEventService.removeEventListener(e,t)}removeGlobalListener(e){this.apiEventService.removeGlobalListener(e)}dispatchEvent(e){this.eventService.dispatchEvent(e)}destroy(){var e;let t=`See ${this.frameworkOverrides.getDocLink("grid-lifecycle/#grid-pre-destroyed")}`;if(this.destroyCalled)return;let i={type:tP.EVENT_GRID_PRE_DESTROYED,state:this.getState()};this.dispatchEvent(i),this.destroyCalled=!0,null==(e=this.ctrlsService.get("gridCtrl"))||e.destroyGridUi(),this.context.destroy(),this.detailGridInfoMap={},eg(this,["isDestroyed"],t)}isDestroyed(){return this.destroyCalled}resetQuickFilter(){this.filterManager.resetQuickFilterCache()}getCellRanges(){return this.rangeService?this.rangeService.getCellRanges():(eO.__assertRegistered("@ag-grid-enterprise/range-selection","api.getCellRanges",this.context.getGridId()),null)}addCellRange(e){if(this.rangeService){this.rangeService.addCellRange(e);return}eO.__assertRegistered("@ag-grid-enterprise/range-selection","api.addCellRange",this.context.getGridId())}clearRangeSelection(){this.rangeService&&this.rangeService.removeAllCellRanges(),eO.__assertRegistered("@ag-grid-enterprise/range-selection","gridApi.clearRangeSelection",this.context.getGridId())}undoCellEditing(){this.undoRedoService.undo("api")}redoCellEditing(){this.undoRedoService.redo("api")}getCurrentUndoSize(){return this.undoRedoService.getCurrentUndoStackSize()}getCurrentRedoSize(){return this.undoRedoService.getCurrentRedoStackSize()}assertChart(e,t){if(eO.__assertRegistered("@ag-grid-enterprise/charts","api."+e,this.context.getGridId()))return this.frameworkOverrides.wrapIncoming(()=>t())}getChartModels(){return this.assertChart("getChartModels",()=>this.chartService.getChartModels())}getChartRef(e){return this.assertChart("getChartRef",()=>this.chartService.getChartRef(e))}getChartImageDataURL(e){return this.assertChart("getChartImageDataURL",()=>this.chartService.getChartImageDataURL(e))}downloadChart(e){return this.assertChart("downloadChart",()=>this.chartService.downloadChart(e))}openChartToolPanel(e){return this.assertChart("openChartToolPanel",()=>this.chartService.openChartToolPanel(e))}closeChartToolPanel(e){return this.assertChart("closeChartToolPanel",()=>this.chartService.closeChartToolPanel(e.chartId))}createRangeChart(e){return this.assertChart("createRangeChart",()=>this.chartService.createRangeChart(e))}createPivotChart(e){return this.assertChart("createPivotChart",()=>this.chartService.createPivotChart(e))}createCrossFilterChart(e){return this.assertChart("createCrossFilterChart",()=>this.chartService.createCrossFilterChart(e))}updateChart(e){return this.assertChart("updateChart",()=>this.chartService.updateChart(e))}restoreChart(e,t){return this.assertChart("restoreChart",()=>this.chartService.restoreChart(e,t))}assertClipboard(e,t){eO.__assertRegistered("@ag-grid-enterprise/clipboard","api"+e,this.context.getGridId())&&t()}copyToClipboard(e){this.assertClipboard("copyToClipboard",()=>this.clipboardService.copyToClipboard(e))}cutToClipboard(e){this.assertClipboard("cutToClipboard",()=>this.clipboardService.cutToClipboard(e))}copySelectedRowsToClipboard(e){this.assertClipboard("copySelectedRowsToClipboard",()=>this.clipboardService.copySelectedRowsToClipboard(e))}copySelectedRangeToClipboard(e){this.assertClipboard("copySelectedRangeToClipboard",()=>this.clipboardService.copySelectedRangeToClipboard(e))}copySelectedRangeDown(){this.assertClipboard("copySelectedRangeDown",()=>this.clipboardService.copyRangeDown())}pasteFromClipboard(){this.assertClipboard("pasteFromClipboard",()=>this.clipboardService.pasteFromClipboard())}showColumnMenuAfterButtonClick(e,t){ew("'showColumnMenuAfterButtonClick' is deprecated. Use 'IHeaderParams.showColumnMenu' within a header component, or 'api.showColumnMenu' elsewhere.");let i=this.columnModel.getGridColumn(e);this.menuService.showColumnMenu({column:i,buttonElement:t,positionBy:"button"})}showColumnMenuAfterMouseClick(e,t){ew("'showColumnMenuAfterMouseClick' is deprecated. Use 'IHeaderParams.showColumnMenuAfterMouseClick' within a header component, or 'api.showColumnMenu' elsewhere.");let i=this.columnModel.getGridColumn(e);if(i||(i=this.columnModel.getPrimaryColumn(e)),!i){console.error(`AG Grid: column '${e}' not found`);return}this.menuService.showColumnMenu({column:i,mouseEvent:t,positionBy:"mouse"})}showContextMenu(e){let{rowNode:t,column:i,value:s,x:o,y:r}=e||{},{x:n,y:l}=this.menuService.getContextMenuPosition(t,i);null!=o&&(n=o),null!=r&&(l=r),this.menuService.showContextMenu({mouseEvent:ne
109w MouseEvent("mousedown",{clientX:n,clientY:l}),rowNode:t,column:i,value:s})}showColumnChooser(e){this.menuService.showColumnChooser({chooserParams:e})}showColumnFilter(e){let t=this.columnModel.getGridColumn(e);if(!t){console.error(`AG Grid: column '${e}' not found`);return}this.menuService.showFilterMenu({column:t,containerType:"columnFilter",positionBy:"auto"})}showColumnMenu(e){let t=this.columnModel.getGridColumn(e);if(!t){console.error(`AG Grid: column '${e}' not found`);return}this.menuService.showColumnMenu({column:t,positionBy:"auto"})}hidePopupMenu(){this.menuService.hidePopupMenu()}hideColumnChooser(){this.menuService.hideColumnChooser()}tabToNextCell(e){return this.navigationService.tabToNextCell(!1,e)}tabToPreviousCell(e){return this.navigationService.tabToNextCell(!0,e)}getCellRendererInstances(e={}){return this.rowRenderer.getCellRendererInstances(e).map(r5)}getCellEditorInstances(e={}){return this.rowRenderer.getCellEditorInstances(e).map(r5)}getEditingCells(){return this.rowRenderer.getEditingCells()}stopEditing(e=!1){this.rowRenderer.stopEditing(e)}startEditingCell(e){let t=this.columnModel.getGridColumn(e.colKey);if(!t){console.warn(`AG Grid: no column found for ${e.colKey}`);return}let i={rowIndex:e.rowIndex,rowPinned:e.rowPinned||null,column:t};null==e.rowPinned&&this.ensureIndexVisible(e.rowIndex),this.ensureColumnVisible(e.colKey);let s=this.navigationService.getCellByPosition(i);s&&(this.focusService.isCellFocused(i)||this.focusService.setFocusedCell(i),s.startRowOrCellEdit(e.key))}addAggFunc(e,t){this.logDeprecation("v31.1","addAggFunc(key, func)","addAggFuncs({ key: func })"),this.aggFuncService&&this.aggFuncService.addAggFuncs({key:t})}addAggFuncs(e){this.aggFuncService&&this.aggFuncService.addAggFuncs(e)}clearAggFuncs(){this.aggFuncService&&this.aggFuncService.clear()}applyServerSideTransaction(e){if(!this.serverSideTransactionManager){this.logMissingRowModel("applyServerSideTransaction","serverSide");return}return this.serverSideTransactionManager.applyTransaction(e)}applyServerSideTransactionAsync(e,t){if(!this.serverSideTransactionManager){this.logMissingRowModel("applyServerSideTransactionAsync","serverSide");return}return this.serverSideTransactionManager.applyTransactionAsync(e,t)}applyServerSideRowData(e){var t,i;let s=null!=(t=e.startRow)?t:0,o=null!=(i=e.route)?i:[];if(s<0){console.warn(`AG Grid: invalid value ${e.startRow} for startRow, the value should be >= 0`);return}this.serverSideRowModel?this.serverSideRowModel.applyRowData(e.successParams,s,o):this.logMissingRowModel("setServerSideDatasource","serverSide")}retryServerSideLoads(){if(!this.serverSideRowModel){this.logMissingRowModel("retryServerSideLoads","serverSide");return}this.serverSideRowModel.retryLoads()}flushServerSideAsyncTransactions(){if(!this.serverSideTransactionManager){this.logMissingRowModel("flushServerSideAsyncTransactions","serverSide");return}return this.serverSideTransactionManager.flushAsyncTransactions()}applyTransaction(e){if(!this.clientSideRowModel){this.logMissingRowModel("applyTransaction","clientSide");return}return this.frameworkOverrides.wrapIncoming(()=>this.clientSideRowModel.updateRowData(e))}applyTransactionAsync(e,t){if(!this.clientSideRowModel){this.logMissingRowModel("applyTransactionAsync","clientSide");return}this.frameworkOverrides.wrapIncoming(()=>this.clientSideRowModel.batchUpdateRowData(e,t))}flushAsyncTransactions(){if(!this.clientSideRowModel){this.logMissingRowModel("flushAsyncTransactions","clientSide");return}this.frameworkOverrides.wrapIncoming(()=>this.clientSideRowModel.flushAsyncTransactions())}refreshInfiniteCache(){this.infiniteRowModel?this.infiniteRowModel.refreshCache():this.logMissingRowModel("refreshInfiniteCache","infinite")}purgeInfiniteCache(){this.infiniteRowModel?this.infiniteRowModel.purgeCache():this.logMissingRowModel("purgeInfiniteCache","infinite")}refreshServerSide(e){if(!this.serverSideRowModel){this.logMissingRowModel("refreshServerSide","serverSide");return}this.serverSideRowModel.refreshStore(e)}getServerSideGroupLevelState(){return this.serverSideRowModel?this.serverSideRowModel.getStoreState():(this.logMissingRowModel("getServerSideGroupLevelState","serverSide"),[])}getInfiniteRowCount(){if(this.infiniteRowModel)return this.infiniteRowModel.getRowCount();
109this.logMissingRowModel("getInfiniteRowCount","infinite")}isLastRowIndexKnown(){if(this.infiniteRowModel)return this.infiniteRowModel.isLastRowIndexKnown();this.logMissingRowModel("isLastRowIndexKnown","infinite")}getCacheBlockState(){return this.rowNodeBlockLoader.getBlockState()}getFirstDisplayedRow(){return this.logDeprecation("v31.1","getFirstDisplayedRow","getFirstDisplayedRowIndex"),this.getFirstDisplayedRowIndex()}getFirstDisplayedRowIndex(){return this.rowRenderer.getFirstVirtualRenderedRow()}getLastDisplayedRow(){return this.logDeprecation("v31.1","getLastDisplayedRow","getLastDisplayedRowIndex"),this.getLastDisplayedRowIndex()}getLastDisplayedRowIndex(){return this.rowRenderer.getLastVirtualRenderedRow()}getDisplayedRowAtIndex(e){return this.rowModel.getRow(e)}getDisplayedRowCount(){return this.rowModel.getRowCount()}paginationIsLastPageFound(){return this.paginationProxy.isLastPageFound()}paginationGetPageSize(){return this.paginationProxy.getPageSize()}paginationGetCurrentPage(){return this.paginationProxy.getCurrentPage()}paginationGetTotalPages(){return this.paginationProxy.getTotalPages()}paginationGetRowCount(){return this.paginationProxy.getMasterRowCount()}paginationGoToNextPage(){this.paginationProxy.goToNextPage()}paginationGoToPreviousPage(){this.paginationProxy.goToPreviousPage()}paginationGoToFirstPage(){this.paginationProxy.goToFirstPage()}paginationGoToLastPage(){this.paginationProxy.goToLastPage()}paginationGoToPage(e){this.paginationProxy.goToPage(e)}sizeColumnsToFit(e){"number"==typeof e?this.columnModel.sizeColumnsToFit(e,"api"):this.gridBodyCtrl.sizeColumnsToFit(e)}setColumnGroupOpened(e,t){this.columnModel.setColumnGroupOpened(e,t,"api")}getColumnGroup(e,t){return this.columnModel.getColumnGroup(e,t)}getProvidedColumnGroup(e){return this.columnModel.getProvidedColumnGroup(e)}getDisplayNameForColumn(e,t){return this.columnModel.getDisplayNameForColumn(e,t)||""}getDisplayNameForColumnGroup(e,t){return this.columnModel.getDisplayNameForColumnGroup(e,t)||""}getColumn(e){return this.columnModel.getPrimaryColumn(e)}getColumns(){return this.columnModel.getAllPrimaryColumns()}applyColumnState(e){return this.columnModel.applyColumnState(e,"api")}getColumnState(){return this.columnModel.getColumnState()}resetColumnState(){this.columnModel.resetColumnState("api")}getColumnGroupState(){return this.columnModel.getColumnGroupState()}setColumnGroupState(e){this.columnModel.setColumnGroupState(e,"api")}resetColumnGroupState(){this.columnModel.resetColumnGroupState("api")}isPinning(){return this.columnModel.isPinningLeft()||this.columnModel.isPinningRight()}isPinningLeft(){return this.columnModel.isPinningLeft()}isPinningRight(){return this.columnModel.isPinningRight()}getDisplayedColAfter(e){return this.columnModel.getDisplayedColAfter(e)}getDisplayedColBefore(e){return this.columnModel.getDisplayedColBefore(e)}setColumnVisible(e,t){this.logDeprecation("v31.1","setColumnVisible(key,visible)","setColumnsVisible([key],visible)"),this.columnModel.setColumnsVisible([e],t,"api")}setColumnsVisible(e,t){this.columnModel.setColumnsVisible(e,t,"api")}setColumnPinned(e,t){this.logDeprecation("v31.1","setColumnPinned(key,pinned)","setColumnsPinned([key],pinned)"),this.columnModel.setColumnsPinned([e],t,"api")}setColumnsPinned(e,t){this.columnModel.setColumnsPinned(e,t,"api")}getAllGridColumns(){return this.columnModel.getAllGridColumns()}getDisplayedLeftColumns(){return this.columnModel.getDisplayedLeftColumns()}getDisplayedCenterColumns(){return this.columnModel.getDisplayedCenterColumns()}getDisplayedRightColumns(){return this.columnModel.getDisplayedRightColumns()}getAllDisplayedColumns(){return this.columnModel.getAllDisplayedColumns()}getAllDisplayedVirtualColumns(){return this.columnModel.getViewportColumns()}moveColumn(e,t){this.logDeprecation("v31.1","moveColumn(key, toIndex)","moveColumns([key], toIndex)"),this.columnModel.moveColumns([e],t,"api")}moveColumnByIndex(e,t){this.columnModel.moveColumnByIndex(e,t,"api")}moveColumns(e,t){this.columnModel.moveColumns(e,t,"api")}moveRowGroupColumn(e,t){this.columnModel.moveRowGroupColumn(e,t,"api")}
109setColumnAggFunc(e,t){this.columnModel.setColumnAggFunc(e,t,"api")}setColumnWidth(e,t,i=!0,s="api"){this.logDeprecation("v31.1","setColumnWidth(col, width)","setColumnWidths([{key: col, newWidth: width}])"),this.columnModel.setColumnWidths([{key:e,newWidth:t}],!1,i,s)}setColumnWidths(e,t=!0,i="api"){this.columnModel.setColumnWidths(e,!1,t,i)}isPivotMode(){return this.columnModel.isPivotMode()}getPivotResultColumn(e,t){return this.columnModel.getSecondaryPivotColumn(e,t)}setValueColumns(e){this.columnModel.setValueColumns(e,"api")}getValueColumns(){return this.columnModel.getValueColumns()}removeValueColumn(e){this.logDeprecation("v31.1","removeValueColumn(colKey)","removeValueColumns([colKey])"),this.columnModel.removeValueColumns([e],"api")}removeValueColumns(e){this.columnModel.removeValueColumns(e,"api")}addValueColumn(e){this.logDeprecation("v31.1","addValueColumn(colKey)","addValueColumns([colKey])"),this.columnModel.addValueColumns([e],"api")}addValueColumns(e){this.columnModel.addValueColumns(e,"api")}setRowGroupColumns(e){this.columnModel.setRowGroupColumns(e,"api")}removeRowGroupColumn(e){this.logDeprecation("v31.1","removeRowGroupColumn(colKey)","removeRowGroupColumns([colKey])"),this.columnModel.removeRowGroupColumns([e],"api")}removeRowGroupColumns(e){this.columnModel.removeRowGroupColumns(e,"api")}addRowGroupColumn(e){this.logDeprecation("v31.1","addRowGroupColumn(colKey)","addRowGroupColumns([colKey])"),this.columnModel.addRowGroupColumns([e],"api")}addRowGroupColumns(e){this.columnModel.addRowGroupColumns(e,"api")}getRowGroupColumns(){return this.columnModel.getRowGroupColumns()}setPivotColumns(e){this.columnModel.setPivotColumns(e,"api")}removePivotColumn(e){this.logDeprecation("v31.1","removePivotColumn(colKey)","removePivotColumns([colKey])"),this.columnModel.removePivotColumns([e],"api")}removePivotColumns(e){this.columnModel.removePivotColumns(e,"api")}addPivotColumn(e){this.logDeprecation("v31.1","addPivotColumn(colKey)","addPivotColumns([colKey])"),this.columnModel.addPivotColumns([e],"api")}addPivotColumns(e){this.columnModel.addPivotColumns(e,"api")}getPivotColumns(){return this.columnModel.getPivotColumns()}getLeftDisplayedColumnGroups(){return this.columnModel.getDisplayedTreeLeft()}getCenterDisplayedColumnGroups(){return this.columnModel.getDisplayedTreeCentre()}getRightDisplayedColumnGroups(){return this.columnModel.getDisplayedTreeRight()}getAllDisplayedColumnGroups(){return this.columnModel.getAllDisplayedTrees()}autoSizeColumn(e,t){return this.logDeprecation("v31.1","autoSizeColumn(key, skipHeader)","autoSizeColumns([key], skipHeader)"),this.columnModel.autoSizeColumns({columns:[e],skipHeader:t,source:"api"})}autoSizeColumns(e,t){this.columnModel.autoSizeColumns({columns:e,skipHeader:t,source:"api"})}autoSizeAllColumns(e){this.columnModel.autoSizeAllColumns("api",e)}setPivotResultColumns(e){this.columnModel.setSecondaryColumns(e,"api")}getPivotResultColumns(){return this.columnModel.getSecondaryColumns()}getState(){return this.stateService.getState()}getGridOption(e){return this.gos.get(e)}setGridOption(e,t){this.updateGridOptions({[e]:t})}updateGridOptions(e){this.gos.updateGridOptions({options:e})}__internalUpdateGridOptions(e,t){this.gos.updateGridOptions({options:e,force:t,source:"gridOptionsUpdated"})}deprecatedUpdateGridOption(e,t){ew(`set${e.charAt(0).toUpperCase()}${e.slice(1,e.length)} is deprecated. Please use 'api.setGridOption('${e}', newValue)' or 'api.updateGridOptions({ ${e}: newValue })' instead.`),this.setGridOption(e,t)}setPivotMode(e){this.deprecatedUpdateGridOption("pivotMode",e)}setPinnedTopRowData(e){this.deprecatedUpdateGridOption("pinnedTopRowData",e)}setPinnedBottomRowData(e){this.deprecatedUpdateGridOption("pinnedBottomRowData",e)}setPopupParent(e){this.deprecatedUpdateGridOption("popupParent",e)}setSuppressModelUpdateAfterUpdateTransaction(e){this.deprecatedUpdateGridOption("suppressModelUpdateAfterUpdateTransaction",e)}setDataTypeDefinitions(e){this.deprecatedUpdateGridOption("dataTypeDefinitions",e)}setPagination(e){this.deprecatedUpdateGridOption("pagination",e)}paginationSetPageSize(e){this.deprecatedUpdateGridOption("paginationPageSize",e)}setSideBar(e){this.deprecatedUpdateGridOption("sideBar",e)}setSuppressClipboardPaste(e){this.deprecatedUpdateGridOption("suppressClipboardPaste",e)}setGroupRemoveSingleChildren(e){this.deprecatedUpdateGridOption("groupRemoveSingleChildren",e)}setGroupRemoveLowestSingleChildren(e){this.deprecatedUpdateGridOption("groupRemoveLowestSingleChildren",e)}setGroupDisplayType(e){this.deprecatedUpdateGridOption("groupDisplayType",e)}setGroupIncludeFooter(e){this.deprecatedUpdateGridOption("groupIncludeFooter",e)}setGroupIncludeTotalFooter(e){this.deprecatedUpdateGridOption("groupIncludeTotalFooter",e)}setRowClass(e){this.deprecatedUpdateGridOption("rowClass",e)}setDeltaSort(e){this.deprecatedUpdateGridOption("deltaSort",e)}setSuppressRowDrag(e){this.deprecatedUpdateGridOption("suppressRowDrag",e)}setSuppressMoveWhenRowDragging(e){this.deprecatedUpdateGridOption("suppressMoveWhenRowDragging",e)}setSuppressRowClickSelection(e){this.deprecatedUpdateGridOption("suppressRowClickSelection",e)}setEnableAdvancedFilter(e){this.deprecatedUpdateGridOption("enableAdvancedFilter",e)}setIncludeHiddenColumnsInAdvancedFilter(e){this.deprecatedUpdateGridOption("includeHiddenColumnsInAdvancedFilter",e)}setAdvancedFilterParent(e){this.deprecatedUpdateGridOption("advancedFilterParent",e)}setAdvancedFilterBuilderParams(e){this.deprecatedUpdateGridOption("advancedFilterBuilderParams",e)}setQuickFilter(e){ew("setQuickFilter is deprecated. Please use 'api.setGridOption('quickFilterText', newValue)' or 'api.updateGridOptions({ quickFilterText: newValue })' instead."),this.gos.updateGridOptions({options:{quickFilterText:e}})}setExcludeHiddenColumnsFromQuickFilter(e){this.deprecatedUpdateGridOption("includeHiddenColumnsInQuickFilter",!e)}setIncludeHiddenColumnsInQuickFilter(e){this.deprecatedUpdateGridOption("includeHiddenColumnsInQuickFilter",e)}setQuickFilterParser(e){this.deprecatedUpdateGridOption("quickFilterParser",e)}setQuickFilterMatcher(e){this.deprecatedUpdateGridOption("quickFilterMatcher",e)}setAlwaysShowHorizontalScroll(e){this.deprecatedUpdateGridOption("alwaysShowHorizontalScroll",e)}setAlwaysShowVerticalScroll(e){this.deprecatedUpdateGridOption("alwaysShowVerticalScroll",e)}setFunctionsReadOnly(e){this.deprecatedUpdateGridOption("functionsReadOnly",e)}setColumnDefs(e,t="api"){ew("setColumnDefs is deprecated. Please use 'api.setGridOption('columnDefs', newValue)' or 'api.updateGridOptions({ columnDefs: newValue })' instead."),this.gos.updateGridOptions({options:{columnDefs:e},source:t})}setAutoGroupColumnDef(e,t="api"){ew("setAutoGroupColumnDef is deprecated. Please use 'api.setGridOption('autoGroupColumnDef', newValue)' or 'api.updateGridOptions({ autoGroupColumnDef: newValue })' instead."),this.gos.updateGridOptions({options:{autoGroupColumnDef:e},source:t})}setDefaultColDef(e,t="api"){ew("setDefaultColDef is deprecated. Please use 'api.setGridOption('defaultColDef', newValue)' or 'api.updateGridOptions({ defaultColDef: newValue })' instead."),this.gos.updateGridOptions({options:{defaultColDef:e},source:t})}setColumnTypes(e,t="api"){ew("setColumnTypes is deprecated. Please use 'api.setGridOption('columnTypes', newValue)' or 'api.updateGridOptions({ columnTypes: newValue })' instead."),this.gos.updateGridOptions({options:{columnTypes:e},source:t})}setTreeData(e){this.deprecatedUpdateGridOption("treeData",e)}setServerSideDatasource(e){this.deprecatedUpdateGridOption("serverSideDatasource",e)}setCacheBlockSize(e){this.deprecatedUpdateGridOption("cacheBlockSize",e)}setDatasource(e){this.deprecatedUpdateGridOption("datasource",e)}setViewportDatasource(e){this.deprecatedUpdateGridOption("viewportDatasource",e)}setRowData(e){this.deprecatedUpdateGridOption("rowData",e)}setEnableCellTextSelection(e){this.deprecatedUpdateGridOption("enableCellTextSelection",e)}setHeaderHeight(e){this.deprecatedUpdateGridOption("headerHeight",e)}setDomLayout(e){this.deprecatedUpdateGridOption("domLayout",e)}setFillHandleDirection(e){this.deprecatedUpdateGridOption("fillHandleDirection",e)}setGroupHeaderHeight(e){this.deprecatedUpdateGridOption("groupHeaderHeight",e)}setFloatingFiltersHeight(e){this.deprecatedUpdateGridOption("floatingFiltersHeight",e)}setPivotHeaderHeight(e){this.deprecatedUpdateGridOption("pivotHeaderHeight",e)}setPivotGroupHeaderHeight(e){this.deprecatedUpdateGridOption("pivotGroupHeaderHeight",e)}setAnimateRows(e){this.deprecatedUpdateGridOption("animateRows",e)}setIsExternalFilterPresent(e){this.deprecatedUpdateGridOption("isExternalFilterPresent",e)}setDoesExternalFilterPass(e){this.deprecatedUpdateGridOption("doesExternalFilterPass",e)}setNavigateToNextCell(e){this.deprecatedUpdateGridOption("navigateToNextCell",e)}setTabToNextCell(e){this.deprecatedUpdateGridOption("tabToNextCell",e)}setTabToNextHeader(e){this.deprecatedUpdateGridOption("tabToNextHeader",e)}setNavigateToNextHeader(e){this.deprecatedUpdateGridOption("navigateToNextHeader",e)}setRowGroupPanelShow(e){this.deprecatedUpdateGridOption("rowGroupPanelShow",e)}setGetGroupRowAgg(e){this.deprecatedUpdateGridOption("getGroupRowAgg",e)}setGetBusinessKeyForNode(e){this.deprecatedUpdateGridOption("getBusinessKeyForNode",e)}setGetChildCount(e){this.deprecatedUpdateGridOption("getChildCount",e)}setProcessRowPostCreate(e){this.deprecatedUpdateGridOption("processRowPostCreate",e)}setGetRowId(e){ew("getRowId is a static property and can no longer be updated.")}setGetRowClass(e){this.deprecatedUpdateGridOption("getRowClass",e)}setIsFullWidthRow(e){this.deprecatedUpdateGridOption("isFullWidthRow",e)}setIsRowSelectable(e){this.deprecatedUpdateGridOption("isRowSelectable",e)}setIsRowMaster(e){this.deprecatedUpdateGridOption("isRowMaster",e)}setPostSortRows(e){this.deprecatedUpdateGridOption("postSortRows",e)}setGetDocument(e){this.deprecatedUpdateGridOption("getDocument",e)}setGetContextMenuItems(e){this.deprecatedUpdateGridOption("getContextMenuItems",e)}setGetMainMenuItems(e){this.deprecatedUpdateGridOption("getMainMenuItems",e)}setProcessCellForClipboard(e){this.deprecatedUpdateGridOption("processCellForClipboard",e)}setSendToClipboard(e){this.deprecatedUpdateGridOption("sendToClipboard",e)}setProcessCellFromClipboard(e){this.deprecatedUpdateGridOption("processCellFromClipboard",e)}setProcessPivotResultColDef(e){this.deprecatedUpdateGridOption("processPivotResultColDef",e)}setProcessPivotResultColGroupDef(e){this.deprecatedUpdateGridOption("processPivotResultColGroupDef",e)}setPostProcessPopup(e){this.deprecatedUpdateGridOption("postProcessPopup",e)}setInitialGroupOrderComparator(e){this.deprecatedUpdateGridOption("initialGroupOrderComparator",e)}
109setGetChartToolbarItems(e){this.deprecatedUpdateGridOption("getChartToolbarItems",e)}setPaginationNumberFormatter(e){this.deprecatedUpdateGridOption("paginationNumberFormatter",e)}setGetServerSideGroupLevelParams(e){this.deprecatedUpdateGridOption("getServerSideGroupLevelParams",e)}setIsServerSideGroupOpenByDefault(e){this.deprecatedUpdateGridOption("isServerSideGroupOpenByDefault",e)}setIsApplyServerSideTransaction(e){this.deprecatedUpdateGridOption("isApplyServerSideTransaction",e)}setIsServerSideGroup(e){this.deprecatedUpdateGridOption("isServerSideGroup",e)}setGetServerSideGroupKey(e){this.deprecatedUpdateGridOption("getServerSideGroupKey",e)}setGetRowStyle(e){this.deprecatedUpdateGridOption("getRowStyle",e)}setGetRowHeight(e){this.deprecatedUpdateGridOption("getRowHeight",e)}};K([eB("rowRenderer")],r4.prototype,"rowRenderer",2),K([eB("navigationService")],r4.prototype,"navigationService",2),K([eB("filterManager")],r4.prototype,"filterManager",2),K([eB("columnModel")],r4.prototype,"columnModel",2),K([eB("selectionService")],r4.prototype,"selectionService",2),K([eB("gridOptionsService")],r4.prototype,"gos",2),K([eB("valueService")],r4.prototype,"valueService",2),K([eB("alignedGridsService")],r4.prototype,"alignedGridsService",2),K([eB("eventService")],r4.prototype,"eventService",2),K([eB("pinnedRowModel")],r4.prototype,"pinnedRowModel",2),K([eB("context")],r4.prototype,"context",2),K([eB("rowModel")],r4.prototype,"rowModel",2),K([eB("sortController")],r4.prototype,"sortController",2),K([eB("paginationProxy")],r4.prototype,"paginationProxy",2),K([eB("focusService")],r4.prototype,"focusService",2),K([eB("dragAndDropService")],r4.prototype,"dragAndDropService",2),K([eB("menuService")],r4.prototype,"menuService",2),K([eB("valueCache")],r4.prototype,"valueCache",2),K([eB("animationFrameService")],r4.prototype,"animationFrameService",2),K([eB("ctrlsService")],r4.prototype,"ctrlsService",2),K([eB("overlayService")],r4.prototype,"overlayService",2),K([eB("stateService")],r4.prototype,"stateService",2),K([eB("expansionService")],r4.prototype,"expansionService",2),K([eB("apiEventService")],r4.prototype,"apiEventService",2),K([eB("frameworkOverrides")],r4.prototype,"frameworkOverrides",2),K([eB("undoRedoService")],r4.prototype,"undoRedoService",2),K([eB("rowNodeBlockLoader")],r4.prototype,"rowNodeBlockLoader",2),K([eW("csvCreator")],r4.prototype,"csvCreator",2),K([eW("excelCreator")],r4.prototype,"excelCreator",2),K([eW("rangeService")],r4.prototype,"rangeService",2),K([eW("clipboardService")],r4.prototype,"clipboardService",2),K([eW("aggFuncService")],r4.prototype,"aggFuncService",2),K([eW("statusBarService")],r4.prototype,"statusBarService",2),K([eW("chartService")],r4.prototype,"chartService",2),K([eW("ssrmTransactionManager")],r4.prototype,"serverSideTransactionManager",2),K([eW("sideBarService")],r4.prototype,"sideBarService",2),K([eV],r4.prototype,"init",1),r4=K([ek("gridApi")],r4);var r6=class extends tR{constructor(){super(...arguments),this.quickFilter=null,this.quickFilterParts=null}postConstruct(){this.addManagedListener(this.eventService,tP.EVENT_COLUMN_PIVOT_MODE_CHANGED,()=>this.resetQuickFilterCache()),this.addManagedListener(this.eventService,tP.EVENT_NEW_COLUMNS_LOADED,()=>this.resetQuickFilterCache()),this.addManagedListener(this.eventService,tP.EVENT_COLUMN_ROW_GROUP_CHANGED,()=>this.resetQuickFilterCache()),this.addManagedListener(this.eventService,tP.EVENT_COLUMN_VISIBLE,()=>{this.gos.get("includeHiddenColumnsInQuickFilter")||this.resetQuickFilterCache()}),this.addManagedPropertyListener("quickFilterText",e=>this.setQuickFilter(e.currentValue)),this.addManagedPropertyListeners(["includeHiddenColumnsInQuickFilter","applyQuickFilterBeforePivotOrAgg"],()=>this.onQuickFilterColumnConfigChanged()),this.quickFilter=this.parseQuickFilter(this.gos.get("quickFilterText")),this.parser=this.gos.get("quickFilterParser"),this.matcher=this.gos.get("quickFilterMatcher"),this.setQuickFilterParts(),this.addManagedPropertyListeners(["quickFilterMatcher","quickFilterParser"],()=>this.setQuickFilterParserAndMatcher())}isQuickFilterPresent(){return null!==this.quickFilter}doesRowPassQuickFilter(e){let t=this.gos.get("cacheQuickFilter");return this.matcher?this.doesRowPassQuickFilterMatcher(t,e):this.quickFilterParts.every(i=>t?this.doesRowPassQuickFilterCache(e,i):this.doesRowPassQuickFilterNoCache(e,i))}resetQuickFilterCache(){this.rowModel.forEachNode(e=>e.quickFilterAggregateText=null)}setQuickFilterParts(){let{quickFilter:e,parser:t}=this;e?this.quickFilterParts=t?t(e):e.split(" "):this.quickFilterParts=null}parseQuickFilter(e){return q(e)?this.gos.isRowModelType("clientSide")?e.toUpperCase():(console.warn("AG Grid - Quick filtering only works with the Client-Side Row Model"),null):null}setQuickFilter(e){if(null!=e&&"string"!=typeof e){console.warn(`AG Grid - Grid option quickFilterText only supports string inputs, received: ${typeof e}`);return}let t=this.parseQuickFilter(e);this.quickFilter!==t&&(this.quickFilter=t,this.setQuickFilterParts(),this.dispatchEvent({type:r6.EVENT_QUICK_FILTER_CHANGED}))}setQuickFilterParserAndMatcher(){let e=this.gos.get("quickFilterParser"),t=this.gos.get("quickFilterMatcher"),i=e!==this.parser||t!==this.matcher;this.parser=e,this.matcher=t,i&&(this.setQuickFilterParts(),this.dispatchEvent({type:r6.EVENT_QUICK_FILTER_CHANGED}))}onQuickFilterColumnConfigChanged(){this.columnModel.refreshQuickFilterColumns(),this.resetQuickFilterCache(),this.isQuickFilterPresent()&&this.dispatchEvent({type:r6.EVENT_QUICK_FILTER_CHANGED})}doesRowPassQuickFilterNoCache(e,t){return this.columnModel.getAllColumnsForQuickFilter().some(i=>{let s=this.getQuickFilterTextForColumn(i,e);return q(s)&&s.indexOf(t)>=0})}doesRowPassQuickFilterCache(e,t){return this.checkGenerateQuickFilterAggregateText(e),e.quickFilterAggregateText.indexOf(t)>=0}doesRowPassQuickFilterMatcher(e,t){let i;e?(this.checkGenerateQuickFilterAggregateText(t),i=t.quickFilterAggregateText):i=this.getQuickFilterAggregateText(t);let{quickFilterParts:s,matcher:o}=this;return o(s,i)}checkGenerateQuickFilterAggregateText(e){e.quickFilterAggregateText||(e.quickFilterAggregateText=this.getQuickFilterAggregateText(e))}getQuickFilterTextForColumn(e,t){let i=this.valueService.getValue(e,t,!0),s=e.getColDef();if(s.getQuickFilterText){let o=this.gos.addGridCommonParams({value:i,node:t,data:t.data,column:e,colDef:s});i=s.getQuickFilterText(o)}return q(i)?i.toString().toUpperCase():null}getQuickFilterAggregateText(e){let t=[];
109return this.columnModel.getAllColumnsForQuickFilter().forEach(i=>{let s=this.getQuickFilterTextForColumn(i,e);q(s)&&t.push(s)}),t.join(r6.QUICK_FILTER_SEPARATOR)}};r6.EVENT_QUICK_FILTER_CHANGED="quickFilterChanged",r6.QUICK_FILTER_SEPARATOR="\n",K([eB("valueService")],r6.prototype,"valueService",2),K([eB("columnModel")],r6.prototype,"columnModel",2),K([eB("rowModel")],r6.prototype,"rowModel",2),K([eV],r6.prototype,"postConstruct",1),r6=K([ek("quickFilterService")],r6);var r8=class extends tR{constructor(){super(...arguments),this.allColumnFilters=new Map,this.allColumnListeners=new Map,this.activeAggregateFilters=[],this.activeColumnFilters=[],this.processingFilterChange=!1,this.filterModelUpdateQueue=[],this.columnFilterModelUpdateQueue=[],this.advancedFilterModelUpdateQueue=[]}init(){var e,t,i;this.addManagedListener(this.eventService,tP.EVENT_GRID_COLUMNS_CHANGED,()=>this.onColumnsChanged()),this.addManagedListener(this.eventService,tP.EVENT_COLUMN_VALUE_CHANGED,()=>this.refreshFiltersForAggregations()),this.addManagedListener(this.eventService,tP.EVENT_COLUMN_PIVOT_CHANGED,()=>this.refreshFiltersForAggregations()),this.addManagedListener(this.eventService,tP.EVENT_COLUMN_PIVOT_MODE_CHANGED,()=>this.refreshFiltersForAggregations()),this.addManagedListener(this.eventService,tP.EVENT_NEW_COLUMNS_LOADED,()=>this.updateAdvancedFilterColumns()),this.addManagedListener(this.eventService,tP.EVENT_COLUMN_VISIBLE,()=>this.updateAdvancedFilterColumns()),this.addManagedListener(this.eventService,tP.EVENT_ROW_DATA_UPDATED,()=>this.onNewRowsLoaded("rowDataUpdated")),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.addManagedPropertyListeners(["isExternalFilterPresent","doesExternalFilterPass"],()=>{this.onFilterChanged({source:"api"})}),this.updateAggFiltering(),this.addManagedPropertyListener("groupAggFiltering",()=>{this.updateAggFiltering(),this.onFilterChanged()}),this.addManagedPropertyListener("advancedFilterModel",e=>this.setAdvancedFilterModel(e.currentValue)),this.addManagedListener(this.eventService,tP.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,({enabled:e})=>this.onAdvancedFilterEnabledChanged(e)),this.addManagedListener(this.eventService,tP.EVENT_DATA_TYPES_INFERRED,()=>this.processFilterModelUpdateQueue()),this.addManagedListener(this.quickFilterService,r6.EVENT_QUICK_FILTER_CHANGED,(
109)=>this.onFilterChanged({source:"quickFilter"})),this.initialFilterModel=B({},null!=(i=null==(t=null==(e=this.gos.get("initialState"))?void 0:e.filter)?void 0:t.filterModel)?i:{})}isExternalFilterPresentCallback(){let e=this.gos.getCallback("isExternalFilterPresent");return"function"==typeof e&&e({})}doesExternalFilterPass(e){let t=this.gos.get("doesExternalFilterPass");return"function"==typeof t&&t(e)}setFilterModel(e,t="api"){if(this.isAdvancedFilterEnabled()){this.warnAdvancedFilters();return}if(this.dataTypeService.isPendingInference()){this.filterModelUpdateQueue.push({model:e,source:t});return}let i=[],s=this.getFilterModel();if(e){let t=sX(Object.keys(e));this.allColumnFilters.forEach((s,o)=>{let r=e[o];i.push(this.setModelOnFilterWrapper(s.filterPromise,r)),t.delete(o)}),t.forEach(t=>{let s=this.columnModel.getPrimaryColumn(t)||this.columnModel.getGridColumn(t);if(!s){console.warn("AG Grid: setFilterModel() - no column found for colId: "+t);return}if(!s.isFilterAllowed()){console.warn("AG Grid: setFilterModel() - unable to fully apply model, filtering disabled for colId: "+t);return}let o=this.getOrCreateFilterWrapper(s,"NO_UI");if(!o){console.warn("AG-Grid: setFilterModel() - unable to fully apply model, unable to create filter for colId: "+t);return}i.push(this.setModelOnFilterWrapper(o.filterPromise,e[t]))})}else this.allColumnFilters.forEach(e=>{i.push(this.setModelOnFilterWrapper(e.filterPromise,null))});s1.all(i).then(()=>{let e=this.getFilterModel(),i=[];this.allColumnFilters.forEach((t,o)=>{let r=s?s[o]:null,n=e?e[o]:null;sJ.jsonEquals(r,n)||i.push(t.column)}),i.length>0&&this.onFilterChanged({columns:i,source:t})})}setModelOnFilterWrapper(e,t){return new s1(i=>{e.then(e=>{"function"!=typeof e.setModel&&(console.warn("AG Grid: filter missing setModel method, which is needed for setFilterModel"),i()),(e.setModel(t)||s1.resolve()).then(()=>i())})})}getFilterModel(){let e={};return this.allColumnFilters.forEach((t,i)=>{let s=this.getModelFromFilterWrapper(t);q(s)&&(e[i]=s)}),e}getModelFromFilterWrapper(e){var t;let i=e.filterPromise.resolveNow(null,e=>e);return null==i?null!=(t=this.initialFilterModel[e.column.getColId()])?t:null:"function"!=typeof i.getModel?(console.warn("AG Grid: filter API missing getModel method, which is needed for getFilterModel"),null):i.getModel()}isColumnFilterPresent(){return this.activeColumnFilters.length>0}isAggregateFilterPresent(){return!!this.activeAggregateFilters.length}isExternalFilterPresent(){return this.externalFilterPresent}isChildFilterPresent(){return this.isColumnFilterPresent()||this.isQuickFilterPresent()||this.isExternalFilterPresent()||this.isAdvancedFilterPresent()}isAdvancedFilterPresent(){return this.isAdvancedFilterEnabled()&&this.advancedFilterService.isFilterPresent()}onAdvancedFilterEnabledChanged(e){var t;e?this.allColumnFilters.size&&(this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"advancedFilterEnabled")),this.onFilterChanged({source:"advancedFilter"})):(null==(t=this.advancedFilterService)?void 0:t.isFilterPresent())&&(this.advancedFilterService.setModel(null),this.onFilterChanged({source:"advancedFilter"}))}isAdvancedFilterEnabled(){var e;return!!(null==(e=this.advancedFilterService)?void 0:e.isEnabled())}isAdvancedFilterHeaderActive(){return this.isAdvancedFilterEnabled()&&this.advancedFilterService.isHeaderActive()}doAggregateFiltersPass(e,t){return this.doColumnFiltersPass(e,t,!0)}updateActiveFilters(){this.activeColumnFilters.length=0,this.activeAggregateFilters.length=0;let e=e=>!!e&&(e.isFilterActive?e.isFilterActive():(console.warn("AG Grid: Filter is missing isFilterActive() method"),!1)),t=!!this.gos.getGroupAggFiltering(),i=e=>{if(!e.isPrimary())return!0;let i=!this.columnModel.isPivotActive();return!!e.isValueActive()&&!!i&&(!!this.columnModel.isPivotMode()||t)};this.allColumnFilters.forEach(t=>{if(t.filterPromise.resolveNow(!1,e)){let e=t.filterPromise.resolveNow(null,e=>e);i(t.column)?this.activeAggregateFilters.push(e):this.activeColumnFilters.push(e)}})}updateFilterFlagInColumns(e,t){this.allColumnFilters.forEach(i=>{let s=i.filterPromise.resolveNow(!1,e=>e.isFilterActive());i.column.setFilterActive(s,e,t)})}isAnyFilterPresent(){return this.isQuickFilterPresent()||this.isColumnFilterPresent()||this.isAggregateFilterPresent()||this.isExternalFilterPresent()||this.isAdvancedFilterPresent()}doColumnFiltersPass(e,t,i){let{data:s,aggData:o}=e,r=i?this.activeAggregateFilters:this.activeColumnFilters,n=i?o:s;for(let i=0;i<r.length;i++){let s=r[i];if(null!=s&&s!==t){if("function"!=typeof s.doesFilterPass)throw Error("Filter is missing method doesFilterPass");if(!s.doesFilterPass({node:e,data:n}))return!1}}return!0}resetQuickFilterCache(){this.quickFilterService.resetQuickFilterCache()}refreshFiltersForAggregations(){this.gos.getGroupAggFiltering()&&this.onFilterChanged()}callOnFilterChangedOutsideRenderCycle(e){let t=()=>this.onFilterChanged(e);this.rowRenderer.isRefreshInProgress()?setTimeout(t,0):t()}onFilterChanged(e={}){let{source:t,filterInstance:i,additionalEventAttributes:s,columns:o}=e;this.updateDependantFilters(),this.updateActiveFilters(),this.updateFilterFlagInColumns("filterChanged",s),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.allColumnFilters.forEac
109h(e=>{e.filterPromise&&e.filterPromise.then(e=>{e&&e!==i&&e.onAnyFilterChanged&&e.onAnyFilterChanged()})});let r={source:t,type:tP.EVENT_FILTER_CHANGED,columns:o||[]};s&&ec(r,s),this.processingFilterChange=!0,this.eventService.dispatchEvent(r),this.processingFilterChange=!1}isSuppressFlashingCellsBecauseFiltering(){var e;return!(null!=(e=this.gos.get("allowShowChangeAfterFilter"))&&e)&&this.processingFilterChange}isQuickFilterPresent(){return this.quickFilterService.isQuickFilterPresent()}updateAggFiltering(){this.aggFiltering=!!this.gos.getGroupAggFiltering()}isAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&this.shouldApplyQuickFilterAfterAgg()}isNonAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&!this.shouldApplyQuickFilterAfterAgg()}shouldApplyQuickFilterAfterAgg(){return(this.aggFiltering||this.columnModel.isPivotMode())&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")}doesRowPassOtherFilters(e,t){return this.doesRowPassFilter({rowNode:t,filterInstanceToSkip:e})}doesRowPassAggregateFilters(e){return!(this.isAggregateQuickFilterPresent()&&!this.quickFilterService.doesRowPassQuickFilter(e.rowNode)||this.isAggregateFilterPresent()&&!this.doAggregateFiltersPass(e.rowNode,e.filterInstanceToSkip))}doesRowPassFilter(e){return!(this.isNonAggregateQuickFilterPresent()&&!this.quickFilterService.doesRowPassQuickFilter(e.rowNode)||this.isExternalFilterPresent()&&!this.doesExternalFilterPass(e.rowNode)||this.isColumnFilterPresent()&&!this.doColumnFiltersPass(e.rowNode,e.filterInstanceToSkip)||this.isAdvancedFilterPresent()&&!this.advancedFilterService.doesFilterPass(e.rowNode))}onNewRowsLoaded(e){this.allColumnFilters.forEach(e=>{e.filterPromise.then(e=>{e.onNewRowsLoaded&&e.onNewRowsLoaded()})}),this.updateFilterFlagInColumns(e,{afterDataChange:!0}),this.updateActiveFilters()}createValueGetter(e){return({node:t})=>this.valueService.getValue(e,t,!0)}createGetValue(e){return(t,i)=>{let s=i?this.columnModel.getGridColumn(i):e;return s?this.valueService.getValue(s,t,!0):void 0}}getFilterComponent(e,t,i=!0){var s;if(i)return(null==(s=this.getOrCreateFilterWrapper(e,t))?void 0:s.filterPromise)||null;let o=this.cachedFilter(e);return o?o.filterPromise:null}isFilterActive(e){let t=this.cachedFilter(e);return!!t&&t.filterPromise.resolveNow(!1,e=>e.isFilterActive())}getOrCreateFilterWrapper(e,t){if(!e.isFilterAllowed())return null;let i=this.cachedFilter(e);return i||(i=this.createFilterWrapper(e,t),this.setColumnFilterWrapper(e,i)),i}cachedFilter(e){return this.allColumnFilters.get(e.getColId())}getDefaultFilter(e){let t;if(eO.__isRegistered("@ag-grid-enterprise/set-filter",this.context.getGridId()))t="agSetColumnFilter";else{let i=this.dataTypeService.getBaseDataType(e);t="number"===i?"agNumberColumnFilter":"date"===i||"dateString"===i?"agDateColumnFilter":"agTextColumnFilter"}return t}getDefaultFloatingFilter(e){let t;if(eO.__isRegistered("@ag-grid-enterprise/set-filter",this.context.getGridId()))t="agSetColumnFloatingFilter";else{let i=this.dataTypeService.getBaseDataType(e);t="number"===i?"agNumberColumnFloatingFilter":"date"===i||"dateString"===i?"agDateColumnFloatingFilter":"agTextColumnFloatingFilter"}return t}createFilterInstance(e){let t;let i=this.getDefaultFilter(e),s=e.getColDef(),o=W(B({},this.createFilterParams(e,s)),{filterModifiedCallback:()=>this.filterModifiedCallbackFactory(t,e)(),filterChangedCallback:i=>this.filterChangedCallbackFactory(t,e)(i),doesRowPassOtherFilter:e=>this.doesRowPassOtherFilters(t,e)}),r=this.userComponentFactory.getFilterDetails(s,o,i);return r?{filterPromise:()=>{let e=r.newAgStackInstance();return e&&e.then(e=>t=e),e},compDetails:r}:{filterPromise:null,compDetails:null}}createFilterParams(e,t){return this.gos.addGridCommonParams({column:e,colDef:eh(t),rowModel:this.rowModel,filterChangedCallback:()=>{},filterModifiedCallback:()=>{},valueGetter:this.createValueGetter(e),getValue:this.createGetValue(e),doesRowPassOtherFilter:()=>!0})}createFilterWrapper(e,t){var i;let s={column:e,filterPromise:null,compiledElement:null,compDetails:null}
109,{filterPromise:o,compDetails:r}=this.createFilterInstance(e);return s.filterPromise=null!=(i=null==o?void 0:o())?i:null,s.compDetails=r,s}onColumnsChanged(){let e=[];this.allColumnFilters.forEach((t,i)=>{let s;(s=t.column.isPrimary()?this.columnModel.getPrimaryColumn(i):this.columnModel.getGridColumn(i))&&s===t.column||(e.push(t.column),this.disposeFilterWrapper(t,"columnChanged"),this.disposeColumnListener(i))}),e.length>0?this.onFilterChanged({columns:e,source:"api"}):this.updateDependantFilters()}updateDependantFilters(){let e=this.columnModel.getGroupAutoColumns();null==e||e.forEach(e=>{"agGroupColumnFilter"===e.getColDef().filter&&this.getOrCreateFilterWrapper(e,"NO_UI")})}isFilterAllowed(e){var t,i;if(this.isAdvancedFilterEnabled()||!e.isFilterAllowed())return!1;let s=this.allColumnFilters.get(e.getColId());return null==(i=null==(t=null==s?void 0:s.filterPromise)?void 0:t.resolveNow(!0,e=>"function"!=typeof(null==e?void 0:e.isFilterAllowed)||(null==e?void 0:e.isFilterAllowed())))||i}getFloatingFilterCompDetails(e,t){let i=t=>{let i=this.getFilterComponent(e,"NO_UI");null!=i&&i.then(e=>{t(r5(e))})},s=e.getColDef(),o=W(B({},this.createFilterParams(e,s)),{filterChangedCallback:()=>i(t=>this.filterChangedCallbackFactory(t,e)())}),r=this.userComponentFactory.mergeParamsWithApplicationProvidedParams(s,rk,o),n=this.userComponentFactory.getDefaultFloatingFilterType(s,()=>this.getDefaultFloatingFilter(e));return null==n&&(n="agReadOnlyFloatingFilter"),this.userComponentFactory.getFloatingFilterCompDetails(s,{column:e,filterParams:r,currentParentModel:()=>this.getCurrentFloatingFilterParentModel(e),parentFilterInstance:i,showParentFilter:t,suppressFilterButton:!1},n)}getCurrentFloatingFilterParentModel(e){let t=this.getFilterComponent(e,"NO_UI",!1);return t?t.resolveNow(null,e=>e&&e.getModel()):null}destroyFilter(e,t="api"){let i=e.getColId(),s=this.allColumnFilters.get(i);this.disposeColumnListener(i),delete this.initialFilterModel[i],s&&(this.disposeFilterWrapper(s,t),this.onFilterChanged({columns:[e],source:"api"}))}disposeColumnListener(e){let t=this.allColumnListeners.get(e);t&&(this.allColumnListeners.delete(e),t())}disposeFilterWrapper(e,t){e.filterPromise.then(i=>{this.getContext().destroyBean(i),e.column.setFilterActive(!1,"filterDestroyed"),this.allColumnFilters.delete(e.column.getColId());let s={type:tP.EVENT_FILTER_DESTROYED,source:t,column:e.column};this.eventService.dispatchEvent(s)})}filterModifiedCallbackFactory(e,t){return()=>{let i={type:tP.EVENT_FILTER_MODIFIED,column:t,filterInstance:e};this.eventService.dispatchEvent(i)}}filterChangedCallbackFactory(e,t){return i=>{var s;let o=null!=(s=null==i?void 0:i.source)?s:"api";this.callOnFilterChangedOutsideRenderCycle({filter:e,additionalEventAttributes:i,columns:[t],source:o})}}checkDestroyFilter(e){let t=this.allColumnFilters.get(e);if(!t)return;let i=t.column,{compDetails:s}=i.isFilterAllowed()?this.createFilterInstance(i):{compDetails:null};if(this.areFilterCompsDifferent(t.compDetails,s)){this.destroyFilter(i,"paramsUpdated");return}let o=i.getColDef().filterParams;if(!t.filterPromise){this.destroyFilter(i,"paramsUpdated");return}t.filterPromise.then(e=>{!1===(null==e||!e.refresh||e.refresh(B(W(B({},this.createFilterParams(i,i.getColDef())),{filterModifiedCallback:this.filterModifiedCallbackFactory(e,i),filterChangedCallback:this.filterChangedCallbackFactory(e,i),doesRowPassOtherFilter:t=>this.doesRowPassOtherFilters(e,t)}),o)))&&this.destroyFilter(i,"paramsUpdated")})}setColumnFilterWrapper(e,t){let i=e.getColId();this.allColumnFilters.set(i,t),this.allColumnListeners.set(i,this.addManagedListener(e,eX.EVENT_COL_DEF_CHANGED,(
109)=>this.checkDestroyFilter(i)))}areFilterCompsDifferent(e,t){if(!t||!e)return!0;let{componentClass:i}=e,{componentClass:s}=t;return!(i===s||(null==i?void 0:i.render)&&(null==s?void 0:s.render)&&i.render===s.render)}getAdvancedFilterModel(){return this.isAdvancedFilterEnabled()?this.advancedFilterService.getModel():null}setAdvancedFilterModel(e){if(this.isAdvancedFilterEnabled()){if(this.dataTypeService.isPendingInference()){this.advancedFilterModelUpdateQueue.push(e);return}this.advancedFilterService.setModel(null!=e?e:null),this.onFilterChanged({source:"advancedFilter"})}}showAdvancedFilterBuilder(e){this.isAdvancedFilterEnabled()&&this.advancedFilterService.getCtrl().toggleFilterBuilder(e,!0)}updateAdvancedFilterColumns(){this.isAdvancedFilterEnabled()&&this.advancedFilterService.updateValidity()&&this.onFilterChanged({source:"advancedFilter"})}hasFloatingFilters(){return!this.isAdvancedFilterEnabled()&&this.columnModel.getAllGridColumns().some(e=>e.getColDef().floatingFilter)}getFilterInstance(e,t){if(this.isAdvancedFilterEnabled()){this.warnAdvancedFilters();return}let i=this.getFilterInstanceImpl(e,e=>{t&&t(r5(e))});return r5(i)}getColumnFilterInstance(e){return new Promise(t=>{this.getFilterInstance(e,e=>{t(e)})})}getFilterInstanceImpl(e,t){let i=this.columnModel.getPrimaryColumn(e);if(!i)return;let s=this.getFilterComponent(i,"NO_UI"),o=s&&s.resolveNow(null,e=>e);return o?setTimeout(t,0,o):s&&s.then(e=>{t(e)}),o}warnAdvancedFilters(){ew("Column Filter API methods have been disabled as Advanced Filters are enabled.")}setupAdvancedFilterHeaderComp(e){var t;null==(t=this.advancedFilterService)||t.getCtrl().setupHeaderComp(e)}getHeaderRowCount(){return this.isAdvancedFilterHeaderActive()?1:0}getHeaderHeight(){return this.isAdvancedFilterHeaderActive()?this.advancedFilterService.getCtrl().getHeaderHeight():0}processFilterModelUpdateQueue(){this.filterModelUpdateQueue.forEach(({model:e,source:t})=>this.setFilterModel(e,t)),this.filterModelUpdateQueue=[],this.columnFilterModelUpdateQueue.forEach(({key:e,model:t,resolve:i})=>{this.setColumnFilterModel(e,t).then(()=>i())}),this.columnFilterModelUpdateQueue=[],this.advancedFilterModelUpdateQueue.forEach(e=>this.setAdvancedFilterModel(e)),this.advancedFilterModelUpdateQueue=[]}getColumnFilterModel(e){let t=this.getFilterWrapper(e);return t?this.getModelFromFilterWrapper(t):null}setColumnFilterModel(e,t){let i;if(this.isAdvancedFilterEnabled())return this.warnAdvancedFilters(),Promise.resolve();if(this.dataTypeService.isPendingInference()){let i=()=>{},s=new Promise(e=>{i=e});return this.columnFilterModelUpdateQueue.push({key:e,model:t,resolve:i}),s}let s=this.columnModel.getPrimaryColumn(e),o=s?this.getOrCreateFilterWrapper(s,"NO_UI"):null;return o?(i=this.setModelOnFilterWrapper(o.filterPromise,t),new Promise(e=>{i.then(t=>e(t))})):Promise.resolve()}getFilterWrapper(e){var t;let i=this.columnModel.getPrimaryColumn(e);return i&&null!=(t=this.cachedFilter(i))?t:null}destroy(){super.destroy(),this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"gridDestroyed")),this.allColumnListeners.clear()}};K([eB("valueService")],r8.prototype,"valueService",2),K([eB("columnModel")],r8.prototype,"columnModel",2),K([eB("rowModel")],r8.prototype,"rowModel",2),K([eB("userComponentFactory")],r8.prototype,"userComponentFactory",2),K([eB("rowRenderer")],r8.prototype,"rowRenderer",2),K([eB("dataTypeService")],r8.prototype,"dataTypeService",2),K([eB("quickFilterService")],r8.prototype,"quickFilterService",2),K([eW("advancedFilterService")],r8.prototype,"advancedFilterService",2),K([eV],r8.prototype,"init",1),r8=K([ek("filterManager")],r8);var r7=class extends s9{constructor(e,t){super('<div class="ag-filter"></div>'),this.column=e,this.source=t,this.filterWrapper=null}postConstruct(){this.createFilter(!0),this.addManagedListener(this.eventService,tP.EVENT_FILTER_DESTROYED,this.onFilterDestroyed.bind(this))}hasFilter(){return!!this.filterWrapper}getFilter(){var e,t;return null!=(t=null==(e=this.filterWrapper)?void 0:e.filterPromise)?t:null}afterInit(){var e,t,i;return null!=(i=null==(t=null==(e=this.filterWrapper)?void 0:e.filterPromise)?void 0:t.then(()=>{}))?i:s1.resolve()}afterGuiAttached(e){var t,i;null==(i=null==(t=this.filterWrapper)?void 0:t.filterPromise)||i.then(t=>{var i;null==(i=null==t?void 0:t.afterGuiAttached)||i.call(t,e)})}afterGuiDetached(){var e,t;null==(t=null==(e=this.filterWrapper)?void 0:e.filterPromise)||t.then(e=>{var t;null==(t=null==e?void 0:e.afterGuiDetached)||t.call(e)})}createFilter(e){var t;let{column:i,source:s}=this;this.filterWrapper=this.filterManager.getOrCreateFilterWrapper(i,s),(null==(t=this.filterWrapper)?void 0:t.filterPromise)&&this.filterWrapper.filterPromise.then(t=>{let o=t.getGui();if(q(o)||console.warn(`AG Grid: getGui method from filter returned ${o}, it should be a DOM element or an HTML template string.`),"string"==typeof o&&(o=sg(o)),this.appendChild(o),e){let e={type:tP.EVENT_FILTER_OPENED,column:i,source:s,eGui:this.getGui()};this.eventService.dispatchEvent(e)}})}onFilterDestroyed(e){("api"===e.source||"paramsUpdated"===e.source)&&e.column.getId()===this.column.getId()&&this.columnModel.getPrimaryColumn(this.column)&&(sd(this.getGui()),this.createFilter())}destroy(){this.filterWrapper=null,super.destroy()}};K([eB("filterManager")],r7.prototype,"filterManager",2),K([eB("columnModel")],r7.prototype,"columnModel",2),K([eV],r7.prototype,"postConstruct",1);var r9=class extends s9{constructor(e,t){super(e),this.ctrl=t}getCtrl(){return this.ctrl}},ne=class e extends r9{constructor(t){super(e.TEMPLATE,t)}postConstruct(){let e=this.getGui();
109this.ctrl.setComp({addOrRemoveCssClass:(e,t)=>this.addOrRemoveCssClass(e,t),addOrRemoveBodyCssClass:(e,t)=>this.eFloatingFilterBody.classList.toggle(e,t),setButtonWrapperDisplayed:e=>i8(this.eButtonWrapper,e),setCompDetails:e=>this.setCompDetails(e),getFloatingFilterComp:()=>this.compPromise,setWidth:t=>e.style.width=t,setMenuIcon:e=>this.eButtonShowMainFilter.appendChild(e)},e,this.eButtonShowMainFilter,this.eFloatingFilterBody)}setCompDetails(e){if(!e){this.destroyFloatingFilterComp(),this.compPromise=null;return}this.compPromise=e.newAgStackInstance(),this.compPromise.then(e=>this.afterCompCreated(e))}destroyFloatingFilterComp(){this.floatingFilterComp&&(this.eFloatingFilterBody.removeChild(this.floatingFilterComp.getGui()),this.floatingFilterComp=this.destroyBean(this.floatingFilterComp))}afterCompCreated(e){if(e){if(!this.isAlive()){this.destroyBean(e);return}this.destroyFloatingFilterComp(),this.floatingFilterComp=e,this.eFloatingFilterBody.appendChild(e.getGui()),e.afterGuiAttached&&e.afterGuiAttached()}}};ne.TEMPLATE=`<div class="ag-header-cell ag-floating-filter" role="gridcell">
110            <div ref="eFloatingFilterBody" role="presentation"></div>
111            <div class="ag-floating-filter-button ag-hidden" ref="eButtonWrapper" role="presentation">
112                <button type="button" class="ag-button ag-floating-filter-button-button" ref="eButtonShowMainFilter" tabindex="-1"></button>
113            </div>
114        </div>`,K([ot("eFloatingFilterBody")],ne.prototype,"eFloatingFilterBody",2),K([ot("eButtonWrapper")],ne.prototype,"eButtonWrapper",2),K([ot("eButtonShowMainFilter")],ne.prototype,"eButtonShowMainFilter",2),K([eV],ne.prototype,"postConstruct",1),K([eH],ne.prototype,"destroyFloatingFilterComp",1);var nt=ne,ni=((u=ni||{}).AUTO_HEIGHT="ag-layout-auto-height",u.NORMAL="ag-layout-normal",u.PRINT="ag-layout-print",u),ns=class extends tR{constructor(e){super(),this.view=e}postConstruct(){this.addManagedPropertyListener("domLayout",this.updateLayoutClasses.bind(this)),this.updateLayoutClasses()}updateLayoutClasses(){let e=this.getDomLayout(),t={autoHeight:"autoHeight"===e,normal:"normal"===e,print:"print"===e},i=t.autoHeight?"ag-layout-auto-height":t.print?"ag-layout-print":"ag-layout-normal";this.view.updateLayoutClasses(i,t)}getDomLayout(){var e;let t=null!=(e=this.gos.get("domLayout"))?e:"normal";return -1===["normal","print","autoHeight"].indexOf(t)?(ew(`${t} is not valid for DOM Layout, valid values are 'normal', 'autoHeight', 'print'.`),"normal"):t}};K([eV],ns.prototype,"postConstruct",1);var no=class extends tR{constructor(e){super(),this.lastScrollSource=[null,null],this.scrollLeft=-1,this.nextScrollTop=-1,this.scrollTop=-1,this.lastOffsetHeight=-1,this.lastScrollTop=-1,this.eBodyViewport=e,this.resetLastHScrollDebounced=eP(()=>this.lastScrollSource[1]=null,500),this.resetLastVScrollDebounced=eP(()=>this.lastScrollSource[0]=null,500)}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.addManagedListener(this.eventService,tP.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onDisplayedColumnsWidthChanged.bind(this)),this.ctrlsService.whenReady(e=>{this.centerRowsCtrl=e.center,this.onDisplayedColumnsWidthChanged(),this.addScrollListener()})}addScrollListener(){let{fakeHScrollComp:e,fakeVScrollComp:t}=this.ctrlsService.getParams();this.addManagedListener(this.centerRowsCtrl.getViewportElement(),"scroll",this.onHScroll.bind(this)),e.onScrollCallback(this.onFakeHScroll.bind(this));let i=this.gos.get("debounceVerticalScrollbar"),s=i?eP(this.onVScroll.bind(this),100):this.onVScroll.bind(this),o=i?eP(this.onFakeVScroll.bind(this),100):this.onFakeVScroll.bind(this);this.addManagedListener(this.eBodyViewport,"scroll",s),t.onScrollCallback(o)}onDisplayedColumnsWidthChanged(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()}horizontallyScrollHeaderCenterAndFloatingCenter(e){if(null==this.centerRowsCtrl)return;void 0===e&&(e=this.centerRowsCtrl.getCenterViewportScrollLeft());let t=this.enableRtl?e:-e,{topCenter:i,stickyTopCenter:s,stickyBottomCenter:o,centerHeader:r,bottomCenter:n,fakeHScrollComp:l}=this.ctrlsService.getParams();r.setHorizontalScroll(-t),n.setContainerTranslateX(t),i.setContainerTranslateX(t),s.setContainerTranslateX(t),o.setContainerTranslateX(t);let a=this.centerRowsCtrl.getViewportElement(),h=0===this.lastScrollSource[1];e=Math.abs(e),h?l.setScrollPosition(e):sh(a,e,this.enableRtl)}isControllingScroll(e,t){return null==this.lastScrollSource[t]?(this.lastScrollSource[t]=e,!0):this.lastScrollSource[t]===e}onFakeHScroll(){this.isControllingScroll(1,1)&&this.onHScrollCommon(1)}onHScroll(){this.isControllingScroll(0,1)&&this.onHScrollCommon(0)}onHScrollCommon(e){let t;let i=this.centerRowsCtrl.getViewportElement(),{scrollLeft:s}=i;this.shouldBlockScrollUpdate(1,s,!0)||(t=0===e?sa(i,this.enableRtl):this.ctrlsService.get("fakeHScrollComp").getScrollPosition(),this.doHorizontalScroll(Math.round(t)),this.resetLastHScrollDebounced())}onFakeVScroll(){this.isControllingScroll(1,0)&&this.onVScrollCommon(1)}onVScroll(){this.isControllingScroll(0,0)&&this.onVScrollCommon(0)}onVScrollCommon(e){let t;t=0===e?this.eBodyViewport.scrollTop:this.ctrlsService.get("fakeVScrollComp").getScrollPosition(),this.shouldBlockScrollUpdate(0,t,!0)||(this.animationFrameService.setScrollTop(t),this.nextScrollTop=t,0===e?this.ctrlsService.get("fakeVScrollComp").setScrollPosition(t):this.eBodyViewport.scrollTop=t,this.gos.get("suppressAnimationFrame")?this.scrollGridIfNeeded():this.animationFrameService.schedule(),this.resetLastVScrollDebounced())}doHorizontalScroll(e){let t=this.ctrlsService.get("fakeHScrollComp").getScrollPosition();(this.scrollLeft!==e||e!==t)&&(this.scrollLeft=e,this.fireScrollEvent(1),this.horizontallyScrollHeaderCenterAndFloating
114Center(e),this.centerRowsCtrl.onHorizontalViewportChanged(!0))}fireScrollEvent(e){let t={type:tP.EVENT_BODY_SCROLL,direction:1===e?"horizontal":"vertical",left:this.scrollLeft,top:this.scrollTop};this.eventService.dispatchEvent(t),window.clearTimeout(this.scrollTimer),this.scrollTimer=void 0,this.scrollTimer=window.setTimeout(()=>{let e=W(B({},t),{type:tP.EVENT_BODY_SCROLL_END});this.eventService.dispatchEvent(e)},100)}shouldBlockScrollUpdate(e,t,i=!1){return(!i||!!iG())&&(0===e?this.shouldBlockVerticalScroll(t):this.shouldBlockHorizontalScroll(t))}shouldBlockVerticalScroll(e){let t=si(this.eBodyViewport),{scrollHeight:i}=this.eBodyViewport;return e<0||e+t>i}shouldBlockHorizontalScroll(e){let t=this.centerRowsCtrl.getCenterWidth(),{scrollWidth:i}=this.centerRowsCtrl.getViewportElement();if(this.enableRtl&&sl()){if(e>0)return!0}else if(e<0)return!0;return Math.abs(e)+t>i}redrawRowsAfterScroll(){this.fireScrollEvent(0)}checkScrollLeft(){this.scrollLeft!==this.centerRowsCtrl.getCenterViewportScrollLeft()&&this.onHScrollCommon(0)}scrollGridIfNeeded(){let e=this.scrollTop!=this.nextScrollTop;return e&&(this.scrollTop=this.nextScrollTop,this.redrawRowsAfterScroll()),e}setHorizontalScrollPosition(e,t=!1){let i=this.centerRowsCtrl.getViewportElement().scrollWidth-this.centerRowsCtrl.getCenterWidth();!t&&this.shouldBlockScrollUpdate(1,e)&&(e=this.enableRtl&&sl()?e>0?0:i:Math.min(Math.max(e,0),i)),sh(this.centerRowsCtrl.getViewportElement(),Math.abs(e),this.enableRtl),this.doHorizontalScroll(e)}setVerticalScrollPosition(e){this.eBodyViewport.scrollTop=e}getVScrollPosition(){return this.lastScrollTop=this.eBodyViewport.scrollTop,this.lastOffsetHeight=this.eBodyViewport.offsetHeight,{top:this.lastScrollTop,bottom:this.lastScrollTop+this.lastOffsetHeight}}getApproximateVScollPosition(){return this.lastScrollTop>=0&&this.lastOffsetHeight>=0?{top:this.scrollTop,bottom:this.scrollTop+this.lastOffsetHeight}:this.getVScrollPosition()}getHScrollPosition(){return this.centerRowsCtrl.getHScrollPosition()}isHorizontalScrollShowing(){return this.centerRowsCtrl.isHorizontalScrollShowing()}scrollHorizontally(e){let t=this.centerRowsCtrl.getViewportElement().scrollLeft;return this.setHorizontalScrollPosition(t+e),this.centerRowsCtrl.getViewportElement().scrollLeft-t}scrollToTop(){this.eBodyViewport.scrollTop=0}ensureNodeVisible(e,t=null){let i=this.rowModel.getRowCount(),s=-1;for(let t=0;t<i;t++){let i=this.rowModel.getRow(t);if("function"==typeof e){if(i&&e(i)){s=t;break}}else if(e===i||e===i.data){s=t;break}}s>=0&&this.ensureIndexVisible(s,t)}ensureIndexVisible(e,t){if(this.gos.isDomLayout("print"))return;let i=this.paginationProxy.getRowCount();if("number"!=typeof e||e<0||e>=i){console.warn("AG Grid: Invalid row index for ensureIndexVisible: "+e);return}let s=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.getFrameworkOverrides().wrapIncoming(()=>{let i;s||this.paginationProxy.goToPageWithIndex(e);let o=this.ctrlsService.getGridBodyCtrl(),r=o.getStickyTopHeight(),n=o.getStickyBottomHeight(),l=this.paginationProxy.getRow(e);do{let e=l.rowTop,s=l.rowHeight,o=this.paginationProxy.getPixelOffset(),a=l.rowTop-o,h=a+l.rowHeight,d=this.getVScrollPosition(),u=this.heightScaler.getDivStretchOffset(),c=d.top+u,p=d.bottom+u,g=p-c,m=this.heightScaler.getScrollPositionForPixel(a),C=this.heightScaler.getScrollPositionForPixel(h-g),v=Math.min((m+C)/2,a),f=c+r>a,w=p-n<h,E=null;"top"===t?E=m:"bottom"===t?E=C:"middle"===t?E=v:f?E=m-r:w&&(E=C+n),null!==E&&(this.setVerticalScrollPosition(E),this.rowRenderer.redraw({afterScroll:!0})),i=e!==l.rowTop||s!==l.rowHeight}while(i);this.animationFrameService.flushAllFrames()})}ensureColumnVisible(e,t="auto"){let i=this.columnModel.getGridColumn(e);if(!i||i.isPinned()||!this.columnModel.isColumnDisplayed(i))return;let s=this.getPositionedHorizontalScroll(i,t);this.getFrameworkOverrides().wrapIncoming(()=>{null!==s&&this.centerRowsCtrl.setCenterViewportScrollLeft(s),this.centerRowsCtrl.onHorizontalViewportChanged(),this.animationFrameService.flushAllFrames()})}setScrollPosition(e,t){this.getFrameworkOverrides().wrapIncoming(()=>{this.centerRowsCtrl.setCenterViewportScrollLeft(t),this.setVerticalScrollPosition(e),this.rowRenderer.redraw({afterScroll:!0}),this.animationFrameService.flushAllFrames()})}
114getPositionedHorizontalScroll(e,t){let{columnBeforeStart:i,columnAfterEnd:s}=this.isColumnOutsideViewport(e),o=this.centerRowsCtrl.getCenterWidth()<e.getActualWidth(),r=this.centerRowsCtrl.getCenterWidth(),n=this.enableRtl,l=(n?i:s)||o,a=n?s:i;"auto"!==t&&(l="start"===t,a="end"===t);let h="middle"===t;if(l||a||h){let{colLeft:t,colMiddle:i,colRight:s}=this.getColumnBounds(e);return h?i-r/2:l?n?s:t:n?t-r:s-r}return null}isColumnOutsideViewport(e){let{start:t,end:i}=this.getViewportBounds(),{colLeft:s,colRight:o}=this.getColumnBounds(e),r=this.enableRtl;return{columnBeforeStart:r?t>o:i<o,columnAfterEnd:r?i<s:t>s}}getColumnBounds(e){let t=this.enableRtl,i=this.columnModel.getBodyContainerWidth(),s=e.getActualWidth(),o=e.getLeft(),r=t?-1:1,n=t?i-o:o;return{colLeft:n,colMiddle:n+s/2*r,colRight:n+s*r}}getViewportBounds(){let e=this.centerRowsCtrl.getCenterWidth(),t=this.centerRowsCtrl.getCenterViewportScrollLeft();return{start:t,end:e+t,width:e}}};K([eB("ctrlsService")],no.prototype,"ctrlsService",2),K([eB("animationFrameService")],no.prototype,"animationFrameService",2),K([eB("paginationProxy")],no.prototype,"paginationProxy",2),K([eB("rowModel")],no.prototype,"rowModel",2),K([eB("rowContainerHeightService")],no.prototype,"heightScaler",2),K([eB("rowRenderer")],no.prototype,"rowRenderer",2),K([eB("columnModel")],no.prototype,"columnModel",2),K([eV],no.prototype,"postConstruct",1);var nr=((c=nr||{}).ANIMATION_ON="ag-row-animation",c.ANIMATION_OFF="ag-row-no-animation",c),nn="ag-force-vertical-scroll",nl=class extends tR{constructor(){super(...arguments),this.stickyTopHeight=0,this.stickyBottomHeight=0}getScrollFeature(){return this.bodyScrollFeature}getBodyViewportElement(){return this.eBodyViewport}setComp(e,t,i,s,o,r,n){this.comp=e,this.eGridBody=t,this.eBodyViewport=i,this.eTop=s,this.eBottom=o,this.eStickyTop=r,this.eStickyBottom=n,this.setCellTextSelection(this.gos.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",e=>this.setCellTextSelection(e.currentValue)),this.createManagedBean(new ns(this.comp)),this.bodyScrollFeature=this.createManagedBean(new no(this.eBodyViewport)),this.addRowDragListener(),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([s,i,o,r,n]),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.filterManager.setupAdvancedFilterHeaderComp(s),this.ctrlsService.register("gridBodyCtrl",this)}getComp(){return this.comp}addEventListeners(){this.addManagedListener(this.eventService,tP.EVENT_GRID_COLUMNS_CHANGED,this.onGridColumnsChanged.bind(this)),this.addManagedListener(this.eventService,tP.EVENT_SCROLL_VISIBILITY_CHANGED,this.onScrollVisibilityChanged.bind(this)),this.addManagedListener(this.eventService,tP.EVENT_PINNED_ROW_DATA_CHANGED,this.onPinnedRowDataChanged.bind(this)),this.addManagedListener(this.eventService,tP.EVENT_HEADER_HEIGHT_CHANGED,this.onHeaderHeightChanged.bind(this))}addFocusListeners(e){e.forEach(e=>{this.addManagedListener(e,"focusin",t=>{let{target:i}=t,s=se(i,"ag-root",e);e.classList.toggle("ag-has-focus",!s)}),this.addManagedListener(e,"focusout",t=>{let{target:i,relatedTarget:s}=t,o=e.contains(s),r=se(s,"ag-root",e);se(i,"ag-root",e)||o&&!r||e.classList.remove("ag-has-focus")})})}setColumnMovingCss(e){this.comp.setColumnMovingCss("ag-column-moving",e)}setCellTextSelection(e=!1){this.comp.setCellSelectableCss("ag-selectable",e)}onScrollVisibilityChanged(){let e=this.scrollVisibleService.isVerticalScrollShowing();this.setVerticalScrollPaddingVisible(e),this.setStickyWidth(e),this.setStickyBottomOffsetBottom();let t=e&&this.gos.getScrollbarWidth()||0,i=iW()?16:0,s=`calc(100% + ${t+i}px)`;this.animationFrameService.requestAnimationFrame(()=>this.comp.setBodyViewportWidth(s))}onGridColumnsChanged(){let e=this.columnModel.getAllGridColumns();this.comp.setColumnCount(e.length)}disableBrowserDragging(){this.addManagedListener(this.eGridBody,"dragstart",e=>{if(e.target instanceof HTMLImageElement)return e.preventDefault(),!1})}addStopEditingWhenGridLosesFocus(){if(!this.gos.get("stopEditingWhenCellsLoseFocus"))return;let e=e=>{let i=e.relatedTarget;if(null===ix(i)){this.rowRenderer.stopEditing();return}let s=t.some(e=>e.contains(i))&&this.mouseEventService.isElementInThisGrid(i);if(!s){let e=this.popupService;s=e.getActivePopups().some(e=>e.contains(i))||e.isElementWithinCustomPopup(i)}s||this.rowRenderer.stopEditing()},t=[this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop,this.eStickyBottom];t.forEach(t=>this.addManagedListener(t,"focusout",e))}updateRowCount(){let e=this.headerNavigationService.getHeaderRowCount()+this.filterManager.getHeaderRowCount(),t=this.rowModel.isLastRowIndexKnown()?this.rowModel.getRowCount():-1;this.comp.setRowCount(-1===t?-1:e+t)}registerBodyViewportResizeListener(e){this.comp.registerBodyViewportResizeListener(e)}setVerticalScrollPaddingVisible(e){this.comp.setPinnedTopBottomOverflowY(e?"scroll":"hidden")}isVerticalScrollShowing(){let e=this.gos.get("alwaysShowVerticalScroll"),t=this.gos.isDomLayout("normal");return this.comp.setAlwaysVerticalScrollClass(e?nn:null,e),e||t&&sE(this.eBodyViewport)}setupRowAnimationCssClass(){let e=()=>{let e=this.gos.isAnimateRows()&&!this.rowContainerHeightService.isStretching();this.comp.setRowAnimationCssOnBodyViewport(e?"ag-row-animation":"ag-row-no-animation",e)};e(),this.addManagedListener(this.eventService,tP.EVENT_HEIGHT_SCALE_CHANGED,e),this.addManagedPropertyListener("animateRows",e)}getGridBodyElement(){return this.eGridBody}addBodyViewportListener(){let e=this.onBodyViewportContextMenu.bind(this);this.addManagedListener(this.eBodyViewport,"contextmenu",e),this.mockContextMenuForIPad(e),this.addManagedListener(this.eBodyViewport,"wheel",this.onBodyViewportWheel.bind(this)),this.addManagedListener(this.eStickyTop,"wheel",this.onStickyWheel.bind(this)),this.addManagedListener(this.eStickyBottom,"wheel",this.onStickyWheel.bind(this)),this.addFullWidthContainerWheelListener()}addFullWidthContainerWheelListener(){let e=this.eBodyViewport.querySelector(".ag-full-width-container"),t=this.eBodyViewport.querySelector(".ag-center-cols-viewport");e&&t&&this.addManagedListener(e,"wheel",e=>this.onFullWidthContainerWheel(e,t))}onFullWidthContainerWheel(e,t){!(!e.deltaX||Math.abs(e.deltaY)>Math.abs(e.deltaX))&&this.mouseEventService.isEventFromThisGrid(e)&&(e.preventDefault(),t.scrollBy({left:e.deltaX}))}onBodyViewportContextMenu(e,t,i){if(!e&&!i)return;this.gos.get("preventDefaultOnContextMenu")&&(e||i).preventDefault();let{target:s}=e||t;
114(s===this.eBodyViewport||s===this.ctrlsService.get("center").getViewportElement())&&this.menuService.showContextMenu({mouseEvent:e,touchEvent:i,value:null,anchorToElement:this.eGridBody})}mockContextMenuForIPad(e){if(!iG())return;let t=new oQ(this.eBodyViewport);this.addManagedListener(t,oQ.EVENT_LONG_TAP,t=>{e(void 0,t.touchStart,t.touchEvent)}),this.addDestroyFunc(()=>t.destroy())}onBodyViewportWheel(e){this.gos.get("suppressScrollWhenPopupsAreOpen")&&this.popupService.hasAnchoredPopup()&&e.preventDefault()}onStickyWheel(e){e.preventDefault(),e.offsetY&&this.scrollVertically(e.deltaY)}getGui(){return this.eGridBody}scrollVertically(e){let t=this.eBodyViewport.scrollTop;return this.bodyScrollFeature.setVerticalScrollPosition(t+e),this.eBodyViewport.scrollTop-t}addRowDragListener(){this.rowDragFeature=this.createManagedBean(new r0(this.eBodyViewport)),this.dragAndDropService.addDropTarget(this.rowDragFeature)}getRowDragFeature(){return this.rowDragFeature}onPinnedRowDataChanged(){this.setFloatingHeights()}setFloatingHeights(){let{pinnedRowModel:e}=this,t=e.getPinnedTopTotalHeight(),i=e.getPinnedBottomTotalHeight();this.comp.setTopHeight(t),this.comp.setBottomHeight(i),this.comp.setTopDisplay(t?"inherit":"none"),this.comp.setBottomDisplay(i?"inherit":"none"),this.setStickyTopOffsetTop(),this.setStickyBottomOffsetBottom()}setStickyTopHeight(e=0){this.comp.setStickyTopHeight(`${e}px`),this.stickyTopHeight=e}getStickyTopHeight(){return this.stickyTopHeight}setStickyBottomHeight(e=0){this.comp.setStickyBottomHeight(`${e}px`),this.stickyBottomHeight=e}getStickyBottomHeight(){return this.stickyBottomHeight}setStickyWidth(e){if(e){let e=this.gos.getScrollbarWidth();this.comp.setStickyTopWidth(`calc(100% - ${e}px)`),this.comp.setStickyBottomWidth(`calc(100% - ${e}px)`)}else this.comp.setStickyTopWidth("100%"),this.comp.setStickyBottomWidth("100%")}onHeaderHeightChanged(){this.setStickyTopOffsetTop()}setStickyTopOffsetTop(){let e=this.ctrlsService.get("gridHeaderCtrl").getHeaderHeight()+this.filterManager.getHeaderHeight(),t=this.pinnedRowModel.getPinnedTopTotalHeight(),i=0;e>0&&(i+=e),t>0&&(i+=t),i>0&&(i+=1),this.comp.setStickyTopTop(`${i}px`)}setStickyBottomOffsetBottom(){let e=this.pinnedRowModel.getPinnedBottomTotalHeight(),t=this.scrollVisibleService.isHorizontalScrollShowing()&&this.gos.getScrollbarWidth()||0;this.comp.setStickyBottomBottom(`${e+t}px`)}sizeColumnsToFit(e,t){let i=this.isVerticalScrollShowing()?this.gos.getScrollbarWidth():0,s=ss(this.eGridBody)-i;if(s>0){this.columnModel.sizeColumnsToFit(s,"sizeColumnsToFit",!1,e);return}void 0===t?window.setTimeout(()=>{this.sizeColumnsToFit(e,100)},0):100===t?window.setTimeout(()=>{this.sizeColumnsToFit(e,500)},100):500===t?window.setTimeout(()=>{this.sizeColumnsToFit(e,-1)},500):console.warn("AG Grid: tried to call sizeColumnsToFit() but the grid is coming back with zero width, maybe the grid is not visible yet on the screen?")}addScrollEventListener(e){this.eBodyViewport.addEventListener("scroll",e,{passive:!0})}removeScrollEventListener(e){this.eBodyViewport.removeEventListener("scroll",e)}};K([eB("animationFrameService")],nl.prototype,"animationFrameService",2),K([eB("rowContainerHeightService")],nl.prototype,"rowContainerHeightService",2),K([eB("ctrlsService")],nl.prototype,"ctrlsService",2),K([eB("columnModel")],nl.prototype,"columnModel",2),K([eB("scrollVisibleService")],nl.prototype,"scrollVisibleService",2),K([eB("menuService")],nl.prototype,"menuService",2),K([eB("headerNavigationService")],nl.prototype,"headerNavigationService",2),K([eB("dragAndDropService")],nl.prototype,"dragAndDropService",2),K([eB("pinnedRowModel")],nl.prototype,"pinnedRowModel",2),K([eB("rowRenderer")],nl.prototype,"rowRenderer",2),K([eB("popupService")],nl.prototype,"popupService",2),K([eB("mouseEventService")],nl.prototype,"mouseEventService",2),K([eB("rowModel")],nl.prototype,"rowModel",2),K([eB("filterManager")],nl.prototype,"filterManager",2);var na=((p=na||{})[p.FILL=0]="FILL",p[p.RANGE=1]="RANGE",p),nh=((g=nh||{})[g.VALUE=0]="VALUE",g[g.DIMENSION=1]="DIMENSION",g),nd="ag-cell-range-selected",nu=class{constructor(e,t){this.beans=e,this.rangeService=e.rangeService,this.selectionHandleFactory=e.selectionHandleFactory,this.cellCtrl=t}setComp(e,t){this.cellComp=e,this.eGui=t,this.onRangeSelectionChanged()}onRangeSelectionChanged(){this.cellComp&&(this.rangeCount=this.rangeService.getCellRangeCount(this.cellCtrl.getCellPosition()),this.hasChartRange=this.getHasChartRange(),this.cellComp.addOrRemoveCssClass(nd,0!==this.rangeCount),this.cellComp.addOrRemoveCssClass(`${nd}-1`,1===this.rangeCount),this.cellComp.addOrRemoveCssClass(`${nd}-2`,2===this.rangeCount),this.cellComp.addOrRemoveCssClass(`${nd}-3`,3===this.rangeCount),this.cellComp.addOrRemoveCssClass(`${nd}-4`,this.rangeCount>=4),this.cellComp.addOrRemoveCssClass("ag-cell-range-chart",this.hasChartRange),iD(this.eGui,this.rangeCount>0||void 0),this.cellComp.addOrRemoveCssClass("ag-cell-range-single-cell",this.isSingleCell()),this.updateRangeBorders(),this.refreshHandle())}updateRangeBorders(){let e=this.getRangeBorders(),t=this.isSingleCell(),i=!t&&e.top,s=!t&&e.right,o=!t&&e.bottom,r=!t&&e.left;this.cellComp.addOrRemoveCssClass("ag-cell-range-top",i),this.cellComp.addOrRemoveCssClass("ag-cell-range-right",s),this.cellComp.addOrRemoveCssClass("ag-cell-range-bottom",o),this.cellComp.addOrRemoveCssClass("ag-cell-range-left",r)}isSingleCell(){let{rangeService:e}=this.beans;return 1===this.rangeCount&&!!e&&!e.isMoreThanOneCell()}getHasChartRange(){let{rangeService:e}=this.beans;if(!this.rangeCount||!e)return!1;let t=e.getCellRanges();return t.length>0&&t.every(e=>tn([1,0],e.type))}updateRangeBordersIfRangeCount(){this.rangeCount>0&&(this.updateRangeBorders(),this.refreshHandle())}getRangeBorders(){let e,t;let i=this.beans.gos.get("enableRtl"),s=!1,o=!1,r=!1,n=!1,l=this.cellCtrl.getCellPosition().column,a=this.beans.columnModel;i?(e=a.getDisplayedColAfter(l),t=a.getDisplayedColBefore(l)):(e=a.getDisplayedColBefore(l),t=a.getDisplayedColAfter(l));let h=this.rangeService.getCellRanges().filter(e=>this.rangeService.isCellInSpecificRange(this.cellCtrl.getCellPosition(),e));e||(n=!0),t||(o=!0);for(let i=0;i<h.length&&(!s||!o||!r||!n);i++){let l=h[i],a=this.rangeService.getRangeStartRow(l),d=this.rangeService.getRangeEndRow(l);!s&&this.beans.rowPositionUtils.sameRow(a,this.cellCtrl.getCellPosition())&&(s=!0),!r&&this.beans.rowPositionUtils.sameRow(d,this.cellCtrl.getCellPosition())&&(r=!0),!n&&e&&0>l.columns.indexOf(e)&&(n=!0),!o&&t&&0>l.columns.indexOf(t)&&(o=!0)}
114return{top:s,right:o,bottom:r,left:n}}refreshHandle(){if(this.beans.context.isDestroyed())return;let e=this.shouldHaveSelectionHandle();this.selectionHandle&&!e&&(this.selectionHandle=this.beans.context.destroyBean(this.selectionHandle)),e&&this.addSelectionHandle(),this.cellComp.addOrRemoveCssClass("ag-cell-range-handle",!!this.selectionHandle)}shouldHaveSelectionHandle(){let e=this.beans.gos,t=this.rangeService.getCellRanges(),i=t.length;if(this.rangeCount<1||i<1)return!1;let s=e5(t),o=this.cellCtrl.getCellPosition(),r=e.get("enableFillHandle")&&!this.cellCtrl.isSuppressFillHandle(),n=e.get("enableRangeHandle"),l=1===i&&!this.cellCtrl.isEditing()&&(r||n);if(this.hasChartRange){let e=1===t[0].type&&this.rangeService.isCellInSpecificRange(o,t[0]);this.cellComp.addOrRemoveCssClass("ag-cell-range-chart-category",e),l=0===s.type}return l&&null!=s.endRow&&this.rangeService.isContiguousRange(s)&&this.rangeService.isBottomRightCell(s,o)}addSelectionHandle(){let e=this.beans.gos,t=e5(this.rangeService.getCellRanges()).type,i=e.get("enableFillHandle")&&Q(t)?0:1;this.selectionHandle&&this.selectionHandle.getType()!==i&&(this.selectionHandle=this.beans.context.destroyBean(this.selectionHandle)),this.selectionHandle||(this.selectionHandle=this.selectionHandleFactory.createSelectionHandle(i)),this.selectionHandle.refresh(this.cellCtrl)}destroy(){this.beans.context.destroyBean(this.selectionHandle)}},nc=class extends tR{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.column=e.getColumn(),this.rowNode=e.getRowNode()}setupRowSpan(){this.rowSpan=this.column.getRowSpan(this.rowNode),this.addManagedListener(this.beans.eventService,tP.EVENT_NEW_COLUMNS_LOADED,()=>this.onNewColumnsLoaded())}setComp(e){this.eGui=e,this.setupColSpan(),this.setupRowSpan(),this.onLeftChanged(),this.onWidthChanged(),this.applyRowSpan()}onNewColumnsLoaded(){let e=this.column.getRowSpan(this.rowNode);this.rowSpan!==e&&(this.rowSpan=e,this.applyRowSpan(!0))}onDisplayColumnsChanged(){let e=this.getColSpanningList();e4(this.colsSpanning,e)||(this.colsSpanning=e,this.onWidthChanged(),this.onLeftChanged())}setupColSpan(){null!=this.column.getColDef().colSpan&&(this.colsSpanning=this.getColSpanningList(),this.addManagedListener(this.beans.eventService,tP.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayColumnsChanged.bind(this)),this.addManagedListener(this.beans.eventService,tP.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onWidthChanged.bind(this)))}onWidthChanged(){if(!this.eGui)return;let e=this.getCellWidth();this.eGui.style.width=`${e}px`}getCellWidth(){return this.colsSpanning?this.colsSpanning.reduce((e,t)=>e+t.getActualWidth(),0):this.column.getActualWidth()}getColSpanningList(){let e=this.column.getColSpan(this.rowNode),t=[];if(1===e)t.push(this.column);else{let i=this.column,s=this.column.getPinned();for(let o=0;i&&o<e&&(t.push(i),!(!(i=this.beans.columnModel.getDisplayedColAfter(i))||Q(i))&&s===i.getPinned());o++);}return t}onLeftChanged(){if(!this.eGui)return;let e=this.modifyLeftForPrintLayout(this.getCellLeft());this.eGui.style.left=e+"px"}getCellLeft(){return(this.beans.gos.get("enableRtl")&&this.colsSpanning?e5(this.colsSpanning):this.column).getLeft()}modifyLeftForPrintLayout(e){if(!this.cellCtrl.isPrintLayout()||"left"===this.column.getPinned())return e;let t=this.beans.columnModel.getDisplayedColumnsLeftWidth();return"right"===this.column.getPinned()?t+this.beans.columnModel.getBodyContainerWidth()+(e||0):t+(e||0)}applyRowSpan(e){if(1===this.rowSpan&&!e)return;let t=this.beans.gos.getRowHeightAsNumber()*this.rowSpan;this.eGui.style.height=`${t}px`,this.eGui.style.zIndex="1"}destroy(){super.destroy()}},np=class extends tR{constructor(e,t){super(),this.staticClasses=[],this.cellCtrl=e,this.beans=t,this.column=e.getColumn(),this.rowNode=e.getRowNode()}setComp(e){this.cellComp=e,this.applyUserStyles(),this.applyCellClassRules(),this.applyClassesFromColDef()}applyCellClassRules(){let e=this.column.getColDef(),{cellClassRules:t}=e,i=this.beans.gos.addGridCommonParams({value:this.cellCtrl.getValue(),data:this.rowNode.data,node:this.rowNode,colDef:e,column:this.column,rowIndex:this.rowNode.rowIndex});this.beans.stylingService.processClassRules(t===this.cellClassRules?void 0:this.cellClassRules,t,i,e=>this.cellComp.addOrRemoveCssClass(e,!0),e=>this.cellComp.addOrRemoveCssClass(e,!1)),this.cellClassRules=t}applyUserStyles(){let e;let t=this.column.getColDef();if(t.cellStyle){if("function"==typeof t.cellStyle){let i=this.beans.gos.addGridCommonParams({column:this.column,value:this.cellCtrl.getValue(),colDef:t,data:this.rowNode.data,node:this.rowNode,rowIndex:this.rowNode.rowIndex});e=(0,t.cellStyle)(i)}else e=t.cellStyle;e&&this.cellComp.setUserStyles(e)}}applyClassesFromColDef(){let e=this.column.getColDef(),t=this.beans.gos.addGridCommonParams({value:this.cellCtrl.getValue(),data:this.rowNode.data,node:this.rowNode,column:this.column,colDef:e,rowIndex:this.rowNode.rowIndex});
114this.staticClasses.length&&this.staticClasses.forEach(e=>this.cellComp.addOrRemoveCssClass(e,!1)),this.staticClasses=this.beans.stylingService.getStaticCellClasses(e,t),this.staticClasses.length&&this.staticClasses.forEach(e=>this.cellComp.addOrRemoveCssClass(e,!0))}destroy(){super.destroy()}},ng=class{postConstruct(){this.gos.isRowModelType("clientSide")&&(this.clientSideRowModel=this.rowModel),this.gos.isRowModelType("serverSide")&&(this.serverSideRowModel=this.rowModel)}};K([eB("resizeObserverService")],ng.prototype,"resizeObserverService",2),K([eB("paginationProxy")],ng.prototype,"paginationProxy",2),K([eB("context")],ng.prototype,"context",2),K([eB("gridOptionsService")],ng.prototype,"gos",2),K([eB("environment")],ng.prototype,"environment",2),K([eB("rowRenderer")],ng.prototype,"rowRenderer",2),K([eB("valueService")],ng.prototype,"valueService",2),K([eB("eventService")],ng.prototype,"eventService",2),K([eB("columnModel")],ng.prototype,"columnModel",2),K([eB("headerNavigationService")],ng.prototype,"headerNavigationService",2),K([eB("navigationService")],ng.prototype,"navigationService",2),K([eB("columnAnimationService")],ng.prototype,"columnAnimationService",2),K([eB("focusService")],ng.prototype,"focusService",2),K([eB("popupService")],ng.prototype,"popupService",2),K([eB("stylingService")],ng.prototype,"stylingService",2),K([eB("columnHoverService")],ng.prototype,"columnHoverService",2),K([eB("userComponentFactory")],ng.prototype,"userComponentFactory",2),K([eB("userComponentRegistry")],ng.prototype,"userComponentRegistry",2),K([eB("animationFrameService")],ng.prototype,"animationFrameService",2),K([eB("dragService")],ng.prototype,"dragService",2),K([eB("dragAndDropService")],ng.prototype,"dragAndDropService",2),K([eB("sortController")],ng.prototype,"sortController",2),K([eB("filterManager")],ng.prototype,"filterManager",2),K([eB("rowContainerHeightService")],ng.prototype,"rowContainerHeightService",2),K([eB("frameworkOverrides")],ng.prototype,"frameworkOverrides",2),K([eB("cellPositionUtils")],ng.prototype,"cellPositionUtils",2),K([eB("rowPositionUtils")],ng.prototype,"rowPositionUtils",2),K([eB("selectionService")],ng.prototype,"selectionService",2),K([eB("rowCssClassCalculator")],ng.prototype,"rowCssClassCalculator",2),K([eB("rowModel")],ng.prototype,"rowModel",2),K([eB("ctrlsService")],ng.prototype,"ctrlsService",2),K([eB("ctrlsFactory")],ng.prototype,"ctrlsFactory",2),K([eB("agStackComponentsRegistry")],ng.prototype,"agStackComponentsRegistry",2),K([eB("valueCache")],ng.prototype,"valueCache",2),K([eB("rowNodeEventThrottle")],ng.prototype,"rowNodeEventThrottle",2),K([eB("localeService")],ng.prototype,"localeService",2),K([eB("syncService")],ng.prototype,"syncService",2),K([eB("ariaAnnouncementService")],ng.prototype,"ariaAnnouncementService",2),K([eW("rangeService")],ng.prototype,"rangeService",2),K([eW("selectionHandleFactory")],ng.prototype,"selectionHandleFactory",2),K([eV],ng.prototype,"postConstruct",1),ng=K([ek("beans")],ng);var nm=class extends ng{constructor(e,t,i){super(),this.cellCtrl=e,this.beans=t,this.column=i}onMouseEvent(e,t){if(!tm(t))switch(e){case"click":this.onCellClicked(t);break;case"mousedown":case"touchstart":this.onMouseDown(t);break;case"dblclick":this.onCellDoubleClicked(t);break;case"mouseout":this.onMouseOut(t);break;case"mouseover":this.onMouseOver(t)}}onCellClicked(e){if(this.isDoubleClickOnIPad()){this.onCellDoubleClicked(e),e.preventDefault();return}let{eventService:t,rangeService:i,gos:s}=this.beans,o=e.ctrlKey||e.metaKey;i&&o&&i.getCellRangeCount(this.cellCtrl.getCellPosition())>1&&i.intersectLastRange(!0);let r=this.cellCtrl.createEvent(e,tP.EVENT_CELL_CLICKED);t.dispatchEvent(r);let n=this.column.getColDef();n.onCellClicked&&window.setTimeout(()=>{this.beans.frameworkOverrides.wrapOutgoing(()=>{n.onCellClicked(r)})},0),(s.get("singleClickEdit")||n.singleClickEdit)&&!s.get("suppressClickEdit")&&!(e.shiftKey&&(null==i?void 0:i.getCellRanges().length)!=0)&&this.cellCtrl.startRowOrCellEdit()}isDoubleClickOnIPad(){if(!iG()||tC("dblclick"))return!1;let e=new Date().getTime(),t=e-this.lastIPadMouseClickEvent<200;return this.lastIPadMouseClickEvent=e,t}onCellDoubleClicked(e){let t=this.column.getColDef(),i=this.cellCtrl.createEvent(e,tP.EVENT_CELL_DOUBLE_CLICKED);this.beans.eventService.dispatchEvent(i),"function"==typeof t.onCellDoubleClicked&&window.setTimeout(()=>{this.beans.frameworkOverrides.wrapOutgoing(()=>{t.onCellDoubleClicked(i)})},0),this.beans.gos.get("singleClickEdit")||this.beans.gos.get("suppressClickEdit")||this.cellCtrl.
114startRowOrCellEdit(null,e)}onMouseDown(e){let{ctrlKey:t,metaKey:i,shiftKey:s}=e,o=e.target,{cellCtrl:r,beans:n}=this,{eventService:l,rangeService:a,focusService:h}=n;if(this.isRightClickInExistingRange(e))return;let d=a&&0!=a.getCellRanges().length;if(!s||!d){let e=iF()&&!r.isEditing()&&!i6(o);r.focusCell(e)}if(s&&d&&!h.isCellFocused(r.getCellPosition())){e.preventDefault();let t=h.getFocusedCell();if(t){let{column:e,rowIndex:i,rowPinned:s}=t,o=n.rowRenderer.getRowByPosition({rowIndex:i,rowPinned:s}),r=null==o?void 0:o.getCellCtrl(e);(null==r?void 0:r.isEditing())&&r.stopEditing(),h.setFocusedCell({column:e,rowIndex:i,rowPinned:s,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}}if(!this.containsWidget(o)){if(a){let e=this.cellCtrl.getCellPosition();s?a.extendLatestRangeToCell(e):a.setRangeToCell(e,t||i)}l.dispatchEvent(this.cellCtrl.createEvent(e,tP.EVENT_CELL_MOUSE_DOWN))}}isRightClickInExistingRange(e){let{rangeService:t}=this.beans;if(t){let i=t.isCellInAnyRange(this.cellCtrl.getCellPosition()),s=2===e.button||e.ctrlKey&&this.beans.gos.get("allowContextMenuWithControlKey");if(i&&s)return!0}return!1}containsWidget(e){return se(e,"ag-selection-checkbox",3)}onMouseOut(e){if(this.mouseStayingInsideCell(e))return;let t=this.cellCtrl.createEvent(e,tP.EVENT_CELL_MOUSE_OUT);this.beans.eventService.dispatchEvent(t),this.beans.columnHoverService.clearMouseOver()}onMouseOver(e){if(this.mouseStayingInsideCell(e))return;let t=this.cellCtrl.createEvent(e,tP.EVENT_CELL_MOUSE_OVER);this.beans.eventService.dispatchEvent(t),this.beans.columnHoverService.setMouseOver([this.column])}mouseStayingInsideCell(e){if(!e.target||!e.relatedTarget)return!1;let t=this.cellCtrl.getGui(),i=t.contains(e.target),s=t.contains(e.relatedTarget);return i&&s}destroy(){}},nC=class extends tR{constructor(e,t,i,s,o){super(),this.cellCtrl=e,this.beans=t,this.rowNode=s,this.rowCtrl=o}setComp(e){this.eGui=e}onKeyDown(e){let t=e.key;switch(t){case sk.ENTER:this.onEnterKeyDown(e);break;case sk.F2:this.onF2KeyDown(e);break;case sk.ESCAPE:this.onEscapeKeyDown(e);break;case sk.TAB:this.onTabKeyDown(e);break;case sk.BACKSPACE:case sk.DELETE:this.onBackspaceOrDeleteKeyDown(t,e);break;case sk.DOWN:case sk.UP:case sk.RIGHT:case sk.LEFT:this.onNavigationKeyDown(e,t)}}onNavigationKeyDown(e,t){this.cellCtrl.isEditing()||(e.shiftKey&&this.cellCtrl.isRangeSelectionEnabled()?this.onShiftRangeSelect(e):this.beans.navigationService.navigateToNextCell(e,t,this.cellCtrl.getCellPosition(),!0),e.preventDefault())}onShiftRangeSelect(e){if(!this.beans.rangeService)return;let t=this.beans.rangeService.extendLatestRangeInDirection(e);t&&this.beans.navigationService.ensureCellVisible(t)}onTabKeyDown(e){this.beans.navigationService.onTabKeyDown(this.cellCtrl,e)}onBackspaceOrDeleteKeyDown(e,t){var i;let{cellCtrl:s,beans:o,rowNode:r}=this,{gos:n,rangeService:l,eventService:a}=o;if(!s.isEditing()){if(a.dispatchEvent({type:tP.EVENT_KEY_SHORTCUT_CHANGED_CELL_START}),sK(e,n.get("enableCellEditingOnBackspace"))){if(l&&n.get("enableRangeSelection"))l.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"});else if(s.isCellEditable()){let e=s.getColumn(),t=null!=(i=this.beans.valueService.parseValue(e,r,"",r.getValueFromValueService(e)))?i:null;r.setDataValue(e,t,"cellClear")}}else s.startRowOrCellEdit(e,t);a.dispatchEvent({type:tP.EVENT_KEY_SHORTCUT_CHANGED_CELL_END})}}onEnterKeyDown(e){if(this.cellCtrl.isEditing()||this.rowCtrl.isEditing())this.cellCtrl.stopEditingAndFocus(!1,e.shiftKey);else if(this.beans.gos.get("enterNavigatesVertically")){let t=e.shiftKey?sk.UP:sk.DOWN;this.beans.navigationService.navigateToNextCell(null,t,this.cellCtrl.getCellPosition(),!1)}else this.cellCtrl.startRowOrCellEdit(sk.ENTER,e),this.cellCtrl.isEditing()&&e.preventDefault()}onF2KeyDown(e){this.cellCtrl.isEditing()||this.cellCtrl.startRowOrCellEdit(sk.F2,e)}onEscapeKeyDown(e){this.cellCtrl.isEditing()&&(this.cellCtrl.stopRowOrCellEdit(!0),this.cellCtrl.focusCell(!0))}processCharacter(e){if(e.target!==this.eGui||this.cellCtrl.isEditing())return;let t=e.key;
114" "===t?this.onSpaceKeyDown(e):(this.cellCtrl.startRowOrCellEdit(t,e),e.preventDefault())}onSpaceKeyDown(e){let{gos:t}=this.beans;if(!this.cellCtrl.isEditing()&&t.isRowSelection()){let i=this.rowNode.isSelected(),s=!i;if(s||!t.get("suppressRowDeselection")){let t=this.beans.gos.get("groupSelectsFiltered"),o=this.rowNode.setSelectedParams({newValue:s,rangeSelect:e.shiftKey,groupSelectsFiltered:t,event:e,source:"spaceKey"});void 0===i&&0===o&&this.rowNode.setSelectedParams({newValue:!1,rangeSelect:e.shiftKey,groupSelectsFiltered:t,event:e,source:"spaceKey"})}}e.preventDefault()}destroy(){super.destroy()}},nv=class extends s9{constructor(e,t,i){super('<div class="ag-drag-handle ag-row-drag" draggable="true"></div>'),this.rowNode=e,this.column=t,this.eCell=i}postConstruct(){this.getGui().appendChild(sV("rowDrag",this.gos,null)),this.addGuiEventListener("mousedown",e=>{e.stopPropagation()}),this.addDragSource(),this.checkVisibility()}addDragSource(){this.addGuiEventListener("dragstart",this.onDragStart.bind(this))}onDragStart(e){let t=this.column.getColDef().dndSourceOnRowDrag;e.dataTransfer.setDragImage(this.eCell,0,0),t?t(this.gos.addGridCommonParams({rowNode:this.rowNode,dragEvent:e})):(()=>{try{let t=JSON.stringify(this.rowNode.data);e.dataTransfer.setData("application/json",t),e.dataTransfer.setData("text/plain",t)}catch(e){}})()}checkVisibility(){let e=this.column.isDndSource(this.rowNode);this.setDisplayed(e)}};K([eV],nv.prototype,"postConstruct",1);var nf=class{static getHeaderClassesFromColDef(e,t,i,s){return Q(e)?[]:this.getColumnClassesFromCollDef(e.headerClass,e,t,i,s)}static getToolPanelClassesFromColDef(e,t,i,s){return Q(e)?[]:this.getColumnClassesFromCollDef(e.toolPanelClass,e,t,i,s)}static refreshFirstAndLastStyles(e,t,i){e.addOrRemoveCssClass("ag-column-first",i.isColumnAtEdge(t,"first")),e.addOrRemoveCssClass("ag-column-last",i.isColumnAtEdge(t,"last"))}static getClassParams(e,t,i,s){return t.addGridCommonParams({colDef:e,column:i,columnGroup:s})}static getColumnClassesFromCollDef(e,t,i,s,o){let r;return Q(e)?[]:"string"==typeof(r="function"==typeof e?e(this.getClassParams(t,i,s,o)):e)?[r]:Array.isArray(r)?[...r]:[]}},nw=0,nE=class e extends tR{constructor(e,t,i,s){super(),this.cellRangeFeature=null,this.cellPositionFeature=null,this.cellCustomStyleFeature=null,this.tooltipFeature=null,this.cellMouseListenerFeature=null,this.cellKeyboardListenerFeature=null,this.suppressRefreshCell=!1,this.onCellCompAttachedFuncs=[],this.column=e,this.rowNode=t,this.beans=i,this.rowCtrl=s,this.instanceId=e.getId()+"-"+nw++,this.colIdSanitised=tV(this.column.getId()),i.gos.get("suppressCellFocus")||(this.tabIndex=-1),this.createCellPosition(),this.addFeatures(),this.updateAndFormatValue(!1)}shouldRestoreFocus(){return this.beans.focusService.shouldRestoreFocus(this.cellPosition)}addFeatures(){this.cellPositionFeature=new nc(this,this.beans),this.addDestroyFunc(()=>{var e;null==(e=this.cellPositionFeature)||e.destroy(),this.cellPositionFeature=null}),this.cellCustomStyleFeature=new np(this,this.beans),this.addDestroyFunc(()=>{var e;null==(e=this.cellCustomStyleFeature)||e.destroy(),this.cellCustomStyleFeature=null}),this.cellMouseListenerFeature=new nm(this,this.beans,this.column),this.addDestroyFunc(()=>{var e;null==(e=this.cellMouseListenerFeature)||e.destroy(),this.cellMouseListenerFeature=null}),this.cellKeyboardListenerFeature=new nC(this,this.beans,this.column,this.rowNode,this.rowCtrl),this.addDestroyFunc(()=>{var e;null==(e=this.cellKeyboardListenerFeature)||e.destroy(),this.cellKeyboardListenerFeature=null}),this.column.isTooltipEnabled()&&(this.enableTooltipFeature(),this.addDestroyFunc(()=>{this.disableTooltipFeature()})),this.beans.rangeService&&this.beans.gos.get("enableRangeSelection")&&(this.cellRangeFeature=new nu(this.beans,this),this.addDestroyFunc(()=>{var e;null==(e=this.cellRangeFeature)||e.destroy(),this.cellRangeFeature=null}))}enableTooltipFeature(e,t){let i="whenTruncated"===this.beans.gos.get("tooltipShowMode");t||!i||this.isCellRenderer()||(t=()=>{let e=this.getGui(),t=0===e.children.length?e:e.querySelector(".ag-cell-value");return!t||t.scrollWidth>t.clientWidth}
114);let s={getColumn:()=>this.column,getColDef:()=>this.column.getColDef(),getRowIndex:()=>this.cellPosition.rowIndex,getRowNode:()=>this.rowNode,getGui:()=>this.getGui(),getLocation:()=>"cell",getTooltipValue:null!=e?()=>e:()=>{let e=this.column.getColDef(),t=this.rowNode.data;if(e.tooltipField&&q(t))return ep(t,e.tooltipField,this.column.isTooltipFieldContainsDots());let i=e.tooltipValueGetter;return i?i(this.beans.gos.addGridCommonParams({location:"cell",colDef:this.column.getColDef(),column:this.column,rowIndex:this.cellPosition.rowIndex,node:this.rowNode,data:this.rowNode.data,value:this.value,valueFormatted:this.valueFormatted})):null},getValueFormatted:()=>this.valueFormatted,shouldDisplayTooltip:t};this.tooltipFeature=new s6(s,this.beans)}disableTooltipFeature(){this.tooltipFeature&&(this.tooltipFeature.destroy(),this.tooltipFeature=null)}setComp(e,t,i,s,o){var r,n,l,a;this.cellComp=e,this.eGui=t,this.printLayout=s,this.addDomData(),this.onCellFocused(this.focusEventToRestore),this.applyStaticCssClasses(),this.setWrapText(),this.onFirstRightPinnedChanged(),this.onLastLeftPinnedChanged(),this.onColumnHover(),this.setupControlComps(),this.setupAutoHeight(i),this.refreshFirstAndLastStyles(),this.refreshAriaColIndex(),null==(r=this.cellPositionFeature)||r.setComp(t),null==(n=this.cellCustomStyleFeature)||n.setComp(e),null==(l=this.tooltipFeature)||l.refreshToolTip(),null==(a=this.cellKeyboardListenerFeature)||a.setComp(this.eGui),this.cellRangeFeature&&this.cellRangeFeature.setComp(e,t),o&&this.isCellEditable()?this.startEditing():this.showValue(),this.onCellCompAttachedFuncs.length&&(this.onCellCompAttachedFuncs.forEach(e=>e()),this.onCellCompAttachedFuncs=[])}setupAutoHeight(e){if(this.isAutoHeight=this.column.isAutoHeight(),!this.isAutoHeight||!e)return;let t=e.parentElement,i=this.beans.gos.getRowHeightForNode(this.rowNode).height,s=o=>{if(this.editing||!this.isAlive())return;let{paddingTop:r,paddingBottom:n,borderBottomWidth:l,borderTopWidth:a}=st(t),h=e.offsetHeight+(r+n+l+a);if(o<5){let t=this.beans.gos.getDocument(),i=!t||!t.contains(e),r=0==h;if(i||r){window.setTimeout(()=>s(o+1),0);return}}let d=Math.max(h,i);this.rowNode.setRowAutoHeight(d,this.column)},o=()=>s(0);o();let r=this.beans.resizeObserverService.observeResize(e,o);this.addDestroyFunc(()=>{r(),this.rowNode.setRowAutoHeight(void 0,this.column)})}getCellAriaRole(){var e;return null!=(e=this.column.getColDef().cellAriaRole)?e:"gridcell"}getInstanceId(){return this.instanceId}getColumnIdSanitised(){return this.colIdSanitised}getTabIndex(){return this.tabIndex}isCellRenderer(){let e=this.column.getColDef();return null!=e.cellRenderer||null!=e.cellRendererSelector}getValueToDisplay(){var e;return null!=(e=this.valueFormatted)?e:this.value}showValue(e=!1){var t;let i;let s=this.getValueToDisplay();if(this.rowNode.stub){let e=this.createCellRendererParams();i=this.beans.userComponentFactory.getLoadingCellRendererDetails(this.column.getColDef(),e)}else if(this.isCellRenderer()){let e=this.createCellRendererParams();i=this.beans.userComponentFactory.getCellRendererDetails(this.column.getColDef(),e)}this.cellComp.setRenderDetails(i,s,e),null==(t=this.cellRangeFeature)||t.refreshHandle()}setupControlComps(){let e=this.column.getColDef();this.includeSelection=this.isIncludeControl(e.checkboxSelection),this.includeRowDrag=this.isIncludeControl(e.rowDrag),this.includeDndSource=this.isIncludeControl(e.dndSource),this.cellComp.setIncludeSelection(this.includeSelection),this.cellComp.setIncludeDndSource(this.includeDndSource),this.cellComp.setIncludeRowDrag(this.includeRowDrag)}isForceWrapper(){return this.beans.gos.get("enableCellTextSelection")||this.column.isAutoHeight()}isIncludeControl(e){return!(null!=this.rowNode.rowPinned)&&("function"==typeof e||!0===e)}refreshShouldDestroy(){let e=this.column.getColDef(),t=this.includeSelection!=this.isIncludeControl(e.checkboxSelection),i=this.includeRowDrag!=this.isIncludeControl(e.rowDrag),s=this.includeDndSource!=this.isIncludeControl(e.dndSource),o=this.isAutoHeight!=this.column.isAutoHeight();return t||i||s||o}startEditing(e=null,t=!1,i=null){if(!this.isCellEditable()||this.editing)return;if(!this.cellComp){this.onCellCompAttachedFuncs.push(()=>{this.startEditing(e,t,i)});return}let s=this.createCellEditorParams(e,t),o=this.column.getColDef(),r=this.beans.userComponentFactory.getCellEditorDetails(o,s);
114this.editCompDetails=r;let n=(null==r?void 0:r.popupFromSelector)!=null?r.popupFromSelector:!!o.cellEditorPopup,l=(null==r?void 0:r.popupPositionFromSelector)!=null?r.popupPositionFromSelector:o.cellEditorPopupPosition;this.setEditing(!0),this.cellComp.setEditDetails(r,n,l,this.beans.gos.get("reactiveCustomComponents"));let a=this.createEvent(i,tP.EVENT_CELL_EDITING_STARTED);this.beans.eventService.dispatchEvent(a)}setEditing(e){var t;this.editing!==e&&(this.editing=e,null==(t=this.cellRangeFeature)||t.refreshHandle())}stopRowOrCellEdit(e=!1){"fullRow"===this.beans.gos.get("editType")?this.rowCtrl.stopEditing(e):this.stopEditing(e)}onPopupEditorClosed(){this.isEditing()&&this.stopEditingAndFocus()}takeValueFromCellEditor(e){let t={newValueExists:!1};if(e)return t;let i=this.cellComp.getCellEditor();return!i||i.isCancelAfterEnd&&i.isCancelAfterEnd()?t:{newValue:i.getValue(),newValueExists:!0}}saveNewValue(e,t){if(t===e)return!1;this.suppressRefreshCell=!0;let i=this.rowNode.setDataValue(this.column,t,"edit");return this.suppressRefreshCell=!1,i}stopEditing(e=!1){if(!this.editing)return!1;let{newValue:t,newValueExists:i}=this.takeValueFromCellEditor(e),s=this.rowNode.getValueFromValueService(this.column),o=!1;return i&&(o=this.saveNewValue(s,t)),this.setEditing(!1),this.cellComp.setEditDetails(),this.editCompDetails=void 0,this.updateAndFormatValue(!1),this.refreshCell({forceRefresh:!0,suppressFlash:!0}),this.dispatchEditingStoppedEvent(s,t,!e&&!!o),o}dispatchEditingStoppedEvent(e,t,i){let s=W(B({},this.createEvent(null,tP.EVENT_CELL_EDITING_STOPPED)),{oldValue:e,newValue:t,valueChanged:i});this.beans.eventService.dispatchEvent(s)}createCellEditorParams(e,t){return this.beans.gos.addGridCommonParams({value:this.rowNode.getValueFromValueService(this.column),eventKey:e,column:this.column,colDef:this.column.getColDef(),rowIndex:this.getCellPosition().rowIndex,node:this.rowNode,data:this.rowNode.data,cellStartedEdit:t,onKeyDown:this.onKeyDown.bind(this),stopEditing:this.stopEditingAndFocus.bind(this),eGridCell:this.getGui(),parseValue:this.parseValue.bind(this),formatValue:this.formatValue.bind(this)})}createCellRendererParams(){return this.beans.gos.addGridCommonParams({value:this.value,valueFormatted:this.valueFormatted,getValue:()=>this.rowNode.getValueFromValueService(this.column),setValue:e=>this.beans.valueService.setValue(this.rowNode,this.column,e),formatValue:this.formatValue.bind(this),data:this.rowNode.data,node:this.rowNode,pinned:this.column.getPinned(),colDef:this.column.getColDef(),column:this.column,rowIndex:this.getCellPosition().rowIndex,refreshCell:this.refreshCell.bind(this),eGridCell:this.getGui(),eParentOfValue:this.cellComp.getParentOfValue(),registerRowDragger:(e,t,i,s)=>this.registerRowDragger(e,t,s),setTooltip:(e,t)=>{var i;this.tooltipFeature&&this.disableTooltipFeature(),this.enableTooltipFeature(e,t),null==(i=this.tooltipFeature)||i.refreshToolTip()}})}parseValue(e){return this.beans.valueService.parseValue(this.column,this.rowNode,e,this.getValue())}setFocusOutOnEditor(){if(!this.editing)return;let e=this.cellComp.getCellEditor();e&&e.focusOut&&e.focusOut()}setFocusInOnEditor(){if(!this.editing)return;let e=this.cellComp.getCellEditor();e&&e.focusIn?e.focusIn():this.focusCell(!0)}onCellChanged(e){e.column===this.column&&this.refreshCell({})}refreshOrDestroyCell(e){var t;this.refreshShouldDestroy()?null==(t=this.rowCtrl)||t.recreateCell(this):this.refreshCell(e)}refreshCell(e){var t,i,s,o;if(this.suppressRefreshCell||this.editing)return;let r=this.column.getColDef(),n=null!=e&&!!e.newData,l=null!=e&&!!e.suppressFlash||!!r.suppressCellFlash,a=null==r.field&&null==r.valueGetter&&null==r.showRowGroup,h=e&&e.forceRefresh||a||n,d=!!this.cellComp,u=this.updateAndFormatValue(d);if(d){if(h||u){this.showValue(n);let e=this.beans.filterManager.isSuppressFlashingCellsBecauseFiltering();!l&&!e&&(this.beans.gos.get("enableCellChangeFlash")||r.enableCellChangeFlash)&&this.flashCell(),null==(t=this.cellCustomStyleFeature)||t.applyUserStyles(),null==(i=this.cellCustomStyleFeature)||i.applyClassesFromColDef()}null==(s=this.tooltipFeature)||s.refreshToolTip(),null==(o=this.cellCustomStyleFeature)||o.applyCellClassRules()}}stopEditingAndFocus(e=!1,t=!1){this.stopRowOrCellEdit(),this.focusCell(!0),e||this.navigateAfterEdit(t)}navigateAfterEdit(e){if(this.beans.gos.get("enterNavigatesVerticallyAfterEdit")){let t=e?sk.UP:sk.DOW
114N;this.beans.navigationService.navigateToNextCell(null,t,this.getCellPosition(),!1)}}flashCell(e){var t,i;let s=null!=(t=null==e?void 0:e.flashDuration)?t:null==e?void 0:e.flashDelay,o=null!=(i=null==e?void 0:e.fadeDuration)?i:null==e?void 0:e.fadeDelay;this.animateCell("data-changed",s,o)}animateCell(e,t,i){if(!this.cellComp)return;let s=`ag-cell-${e}`,o=`ag-cell-${e}-animation`,{gos:r}=this.beans;t||(t=r.get("cellFlashDuration")),q(i)||(i=r.get("cellFadeDuration")),this.cellComp.addOrRemoveCssClass(s,!0),this.cellComp.addOrRemoveCssClass(o,!1),this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{this.isAlive()&&(this.cellComp.addOrRemoveCssClass(s,!1),this.cellComp.addOrRemoveCssClass(o,!0),this.eGui.style.transition=`background-color ${i}ms`,window.setTimeout(()=>{this.isAlive()&&(this.cellComp.addOrRemoveCssClass(o,!1),this.eGui.style.transition="")},i))},t)})}onFlashCells(e){if(!this.cellComp)return;let t=this.beans.cellPositionUtils.createId(this.getCellPosition());e.cells[t]&&this.animateCell("highlight")}isCellEditable(){return this.column.isCellEditable(this.rowNode)}isSuppressFillHandle(){return this.column.isSuppressFillHandle()}formatValue(e){var t;return null!=(t=this.callValueFormatter(e))?t:e}callValueFormatter(e){return this.beans.valueService.formatValue(this.column,this.rowNode,e)}updateAndFormatValue(e){let t=this.value,i=this.valueFormatted;return this.value=this.rowNode.getValueFromValueService(this.column),this.valueFormatted=this.callValueFormatter(this.value),!e||!this.valuesAreEqual(t,this.value)||this.valueFormatted!=i}valuesAreEqual(e,t){let i=this.column.getColDef();return i.equals?i.equals(e,t):e===t}getComp(){return this.cellComp}getValue(){return this.value}addDomData(){let t=this.getGui();this.beans.gos.setDomData(t,e.DOM_DATA_KEY_CELL_CTRL,this),this.addDestroyFunc(()=>this.beans.gos.setDomData(t,e.DOM_DATA_KEY_CELL_CTRL,null))}createEvent(e,t){return this.beans.gos.addGridCommonParams({type:t,node:this.rowNode,data:this.rowNode.data,value:this.value,column:this.column,colDef:this.column.getColDef(),rowPinned:this.rowNode.rowPinned,event:e,rowIndex:this.rowNode.rowIndex})}processCharacter(e){var t;null==(t=this.cellKeyboardListenerFeature)||t.processCharacter(e)}onKeyDown(e){var t;null==(t=this.cellKeyboardListenerFeature)||t.onKeyDown(e)}onMouseEvent(e,t){var i;null==(i=this.cellMouseListenerFeature)||i.onMouseEvent(e,t)}getGui(){return this.eGui}getColSpanningList(){return this.cellPositionFeature.getColSpanningList()}onLeftChanged(){var e;this.cellComp&&(null==(e=this.cellPositionFeature)||e.onLeftChanged())}onDisplayedColumnsChanged(){this.eGui&&(this.refreshAriaColIndex(),this.refreshFirstAndLastStyles())}refreshFirstAndLastStyles(){let{cellComp:e,column:t,beans:i}=this;nf.refreshFirstAndLastStyles(e,t,i.columnModel)}refreshAriaColIndex(){let e=this.beans.columnModel.getAriaColumnIndex(this.column);iE(this.getGui(),e)}isSuppressNavigable(){return this.column.isSuppressNavigable(this.rowNode)}onWidthChanged(){var e;return null==(e=this.cellPositionFeature)?void 0:e.onWidthChanged()}getColumn(){return this.column}getRowNode(){return this.rowNode}isPrintLayout(){return this.printLayout}getCellPosition(){return this.cellPosition}isEditing(){return this.editing}startRowOrCellEdit(e,t=null){if(!this.cellComp){this.onCellCompAttachedFuncs.push(()=>{this.startRowOrCellEdit(e,t)});return}"fullRow"===this.beans.gos.get("editType")?this.rowCtrl.startRowEditing(e,this):this.startEditing(e,!0,t)}getRowCtrl(){return this.rowCtrl}getRowPosition(){return{rowIndex:this.cellPosition.rowIndex,rowPinned:this.cellPosition.rowPinned}}updateRangeBordersIfRangeCount(){this.cellComp&&this.cellRangeFeature&&this.cellRangeFeature.updateRangeBordersIfRangeCount()}onRangeSelectionChanged(){this.cellComp&&this.cellRangeFeature&&this.cellRangeFeature.onRangeSelectionChanged()}isRangeSelectionEnabled(){return null!=this.cellRangeFeature}focusCell(e=!1){this.beans.focusService.setFocusedCell({rowIndex:this.getCellPosition().rowIndex,column:this.column,rowPinned:this.rowNode.rowPinned,forceBrowserFocus:e})}onRowIndexChanged(){this.createCellPosition(),this.onCellFocused(),this.cellRangeFeature&&this.cellRangeFeature.onRangeSelectionChanged()}onFirstRightPinnedChanged(){if(!this.cellComp)return;let e=this.column.isFirstRightPinned();this.cellComp.addOrRemoveCssClass("ag-cell-first-right-pinned",e)}onLastLeftPinnedChanged(){if(!this.cellComp)return;let e=this.column.isLastLeftPinned();this.cellComp.addOrRemoveCssClass("ag-cell-last-left-pinned",e)}onCellFocused(e){if(this.beans.gos.get("suppressCellFocus"))return;let t=this.beans.focusService.isCellFocused(this.cellPosition);if(!this.cellComp){t&&(null==e?void 0:e.forceBrowserFocus)&&(this.focusEventToRestore=e);return}this.focusEventToRestore=void 0,this.cellComp.addOrRemoveCssClass("ag-cell-focus",t),t&&e&&e.forceBrowserFocus&&this.cellComp.getFocusableElement().focus({preventScroll:!!e.preventScrollOnBrowserFocus});let i="fullRow"===this.beans.gos.get("editType");t||i||!this.editing||this.stopRowOrCellEdit(),t&&this.rowCtrl.announceDescription()}createCellPosition(){this.cellPosition={rowIndex:this.rowNode.rowIndex,rowPinned:j(this.rowNode.rowPinned),column:this.column}}
114applyStaticCssClasses(){this.cellComp.addOrRemoveCssClass("ag-cell",!0),this.cellComp.addOrRemoveCssClass("ag-cell-not-inline-editing",!0);let e=!0==this.column.isAutoHeight();this.cellComp.addOrRemoveCssClass("ag-cell-auto-height",e),this.cellComp.addOrRemoveCssClass("ag-cell-normal-height",!e)}onColumnHover(){if(!this.cellComp||!this.beans.gos.get("columnHoverHighlight"))return;let e=this.beans.columnHoverService.isHovered(this.column);this.cellComp.addOrRemoveCssClass("ag-column-hover",e)}onColDefChanged(){if(this.cellComp){if(this.column.isTooltipEnabled()?(this.disableTooltipFeature(),this.enableTooltipFeature()):this.disableTooltipFeature(),this.setWrapText(),this.editing){let e=this.getCellEditor();if(null==e?void 0:e.refresh){let{eventKey:t,cellStartedEdit:i}=this.editCompDetails.params,s=this.createCellEditorParams(t,i),o=this.column.getColDef(),r=this.beans.userComponentFactory.getCellEditorDetails(o,s);e.refresh(r.params)}}else this.refreshOrDestroyCell({forceRefresh:!0,suppressFlash:!0})}}setWrapText(){let e=!0==this.column.getColDef().wrapText;this.cellComp.addOrRemoveCssClass("ag-cell-wrap-text",e)}dispatchCellContextMenuEvent(e){let t=this.column.getColDef(),i=this.createEvent(e,tP.EVENT_CELL_CONTEXT_MENU);this.beans.eventService.dispatchEvent(i),t.onCellContextMenu&&window.setTimeout(()=>{this.beans.frameworkOverrides.wrapOutgoing(()=>{t.onCellContextMenu(i)})},0)}getCellRenderer(){return this.cellComp?this.cellComp.getCellRenderer():null}getCellEditor(){return this.cellComp?this.cellComp.getCellEditor():null}destroy(){this.onCellCompAttachedFuncs=[],super.destroy()}createSelectionCheckbox(){let e=new ri;return this.beans.context.createBean(e),e.init({rowNode:this.rowNode,column:this.column}),e}createDndSource(){let e=new nv(this.rowNode,this.column,this.eGui);return this.beans.context.createBean(e),e}registerRowDragger(e,t,i){if(this.customRowDragComp){this.customRowDragComp.setDragElement(e,t);return}let s=this.createRowDragComp(e,t,i);s&&(this.customRowDragComp=s,this.addDestroyFunc(()=>{this.beans.context.destroyBean(s),this.customRowDragComp=null}))}createRowDragComp(e,t,i){let s=this.beans.gos.get("pagination"),o=this.beans.gos.get("rowDragManaged"),r=this.beans.gos.isRowModelType("clientSide");if(o){if(!r){ew("managed row dragging is only allowed in the Client Side Row Model");return}if(s){ew("managed row dragging is not possible when doing pagination");return}}let n=new rl(()=>this.value,this.rowNode,this.column,e,t,i);return this.beans.context.createBean(n),n}};nE.DOM_DATA_KEY_CELL_CTRL="cellCtrl";var nS=nE,ny=0,nR=class e extends tR{constructor(e,t,i,s,o){super(),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.businessKeySanitised=null,this.beans=t,this.gos=t.gos,this.rowNode=e,this.paginationPage=t.paginationProxy.getCurrentPage(),this.useAnimationFrameForCreate=s,this.printLayout=o,this.suppressRowTransform=this.gos.get("suppressRowTransform"),this.instanceId=e.id+"-"+ny++,this.rowId=tV(e.id),this.initRowBusinessKey(),this.rowFocused=t.focusService.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.rowLevel=t.rowCssClassCalculator.calculateRowLevel(this.rowNode),this.setRowType(),this.setAnimateFlags(i),this.rowStyles=this.processStylesFromGridOptions(),this.isFullWidth()&&!this.gos.get("suppressCellFocus")&&(this.tabIndex=-1),this.addListeners()}initRowBusinessKey(){this.businessKeyForNodeFunc=this.gos.get("getBusinessKeyForNode"),this.updateRowBusinessKey()}updateRowBusinessKey(){if("function"!=typeof this.businessKeyForNodeFunc)return;let e=this.businessKeyForNodeFunc(this.rowNode);this.businessKeySanitised=tV(e)}getRowId(){return this.rowId}getRowStyles(){return this.rowStyles}getTabIndex(){return this.tabIndex}isSticky(){return this.rowNode.sticky}getInstanceId(){return this.instanceId}setComp(e,t,i){let s={rowComp:e,element:t,containerType:i};this.allRowGuis.push(s),"left"===i?this.leftGui=s:"right"===i?this.rightGui=s:"fullWidth"===i?this.fullWidthGui=s:this.centerGui=s,this.initialiseRowComp(s),"FullWidthLoading"===this.rowType||this.rowNode.rowPinned||this.beans.rowRenderer.dispatchFirstDataRenderedEvent()}unsetComp(e){switch(this.allRowGuis=this.allRowGuis.filter(t=>t.containerType!==e),e){case"left":this.leftGui=void 0;break;case"right":this.rightGui=void 0;break;case"fullWidth":this.fullWidthGui=void 0;break;case"center":this.centerGui=void 0}}isCacheable(){return"FullWidthDetail"===this.rowType&&this.gos.get("keepDetailRows")}setCached(e){let t=e?"none":"";
114this.allRowGuis.forEach(e=>e.element.style.display=t)}initialiseRowComp(t){let i=this.gos;this.listenOnDomOrder(t),this.beans.columnModel.wasAutoRowHeightEverActive()&&this.rowNode.checkAutoHeights(),this.onRowHeightChanged(t),this.updateRowIndexes(t),this.setFocusedClasses(t),this.setStylesFromGridOptions(!1,t),i.isRowSelection()&&this.rowNode.selectable&&this.onRowSelected(t),this.updateColumnLists(!this.useAnimationFrameForCreate);let s=t.rowComp;this.getInitialRowClasses(t.containerType).forEach(e=>s.addOrRemoveCssClass(e,!0)),this.executeSlideAndFadeAnimations(t),this.rowNode.group&&iu(t.element,!0==this.rowNode.expanded),this.setRowCompRowId(s),this.setRowCompRowBusinessKey(s),i.setDomData(t.element,e.DOM_DATA_KEY_ROW_CTRL,this),this.addDestroyFunc(()=>i.setDomData(t.element,e.DOM_DATA_KEY_ROW_CTRL,null)),this.useAnimationFrameForCreate?this.beans.animationFrameService.createTask(this.addHoverFunctionality.bind(this,t.element),this.rowNode.rowIndex,"createTasksP2"):this.addHoverFunctionality(t.element),this.isFullWidth()&&this.setupFullWidth(t),i.get("rowDragEntireRow")&&this.addRowDraggerToRow(t),this.useAnimationFrameForCreate&&this.beans.animationFrameService.addDestroyTask(()=>{this.isAlive()&&t.rowComp.addOrRemoveCssClass("ag-after-created",!0)}),this.executeProcessRowPostCreateFunc()}setRowCompRowBusinessKey(e){null!=this.businessKeySanitised&&e.setRowBusinessKey(this.businessKeySanitised)}getBusinessKey(){return this.businessKeySanitised}setRowCompRowId(e){this.rowId=tV(this.rowNode.id),null!=this.rowId&&e.setRowId(this.rowId)}executeSlideAndFadeAnimations(e){let{containerType:t}=e;this.slideInAnimation[t]&&(eb(()=>{this.onTopChanged()}),this.slideInAnimation[t]=!1),this.fadeInAnimation[t]&&(eb(()=>{e.rowComp.addOrRemoveCssClass("ag-opacity-zero",!1)}),this.fadeInAnimation[t]=!1)}addRowDraggerToRow(e){if(this.gos.get("enableRangeSelection")){ew("Setting `rowDragEntireRow: true` in the gridOptions doesn't work with `enableRangeSelection: true`");return}let t=this.beans.localeService.getLocaleTextFunc(),i=new rl(()=>`1 ${t("rowDragRow","row")}`,this.rowNode,void 0,e.element,void 0,!0),s=this.createBean(i,this.beans.context);this.rowDragComps.push(s)}setupFullWidth(e){let t=this.getPinnedForContainer(e.containerType);if("FullWidthDetail"==this.rowType&&!eO.__assertRegistered("@ag-grid-enterprise/master-detail","cell renderer 'agDetailCellRenderer' (for master detail)",this.beans.context.getGridId()))return;let i=this.createFullWidthCompDetails(e.element,t);e.rowComp.showFullWidth(i)}isPrintLayout(){return this.printLayout}getFullWidthCellRenderers(){var e,t;return this.gos.get("embedFullWidthRows")?this.allRowGuis.map(e=>{var t;return null==(t=null==e?void 0:e.rowComp)?void 0:t.getFullWidthCellRenderer()}):[null==(t=null==(e=this.fullWidthGui)?void 0:e.rowComp)?void 0:t.getFullWidthCellRenderer()]}getCellElement(e){let t=this.getCellCtrl(e);return t?t.getGui():null}executeProcessRowPostCreateFunc(){let e=this.gos.getCallback("processRowPostCreate");e&&this.areAllContainersReady()&&e({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)})}areAllContainersReady(){let e=!!this.leftGui||!this.beans.columnModel.isPinningLeft(),t=!!this.centerGui,i=!!this.rightGui||!this.beans.columnModel.isPinningRight();return e&&t&&i}setRowType(){let e=this.rowNode.stub&&!this.gos.get("suppressServerSideFullWidthLoadingRow"),t=this.rowNode.isFullWidthCell(),i=this.gos.get("masterDetail")&&this.rowNode.detail,s=this.beans.columnModel.isPivotMode(),o=!!this.rowNode.group&&!this.rowNode.footer&&this.gos.isGroupUseEntireRow(s);e?this.rowType="FullWidthLoading":i?this.rowType="FullWidthDetail":t?this.rowType="FullWidth":o?this.rowType="FullWidthGroup":this.rowType="Normal"}updateColumnLists(e=!1,t=!1){if(!this.isFullWidth()){if(e||this.gos.get("suppressAnimationFrame")||this.printLayout){this.updateColumnListsImpl(t);return}this.updateColumnListsPending||(this.beans.animationFrameService.createTask(()=>{this.active&&this.updateColumnListsImpl(!0)},this.rowNode.rowIndex,"createTasksP1"),this.updateColumnListsPending=!0)}}createCellCtrls(e,t,i=null){let s={list:[],map:{}},o=(e,t)=>{s.list.push(t),s.map[e]=t};return t.forEach(t=>{let i=t.getInstanceId(),s=e.map[i];s||(s=new nS(t,this.rowNode,this.beans,this)),o(i,s)}
114),e.list.forEach(e=>{if(null==s.map[e.getColumn().getInstanceId()]){if(!this.isCellEligibleToBeRemoved(e,i)){o(e.getColumn().getInstanceId(),e);return}e.destroy()}}),s}updateColumnListsImpl(e){this.updateColumnListsPending=!1,this.createAllCellCtrls(),this.setCellCtrls(e)}setCellCtrls(e){this.allRowGuis.forEach(t=>{let i=this.getCellCtrlsForContainer(t.containerType);t.rowComp.setCellCtrls(i,e)})}getCellCtrlsForContainer(e){switch(e){case"left":return this.leftCellCtrls.list;case"right":return this.rightCellCtrls.list;case"fullWidth":return[];case"center":return this.centerCellCtrls.list;default:throw Error(`Unhandled case: ${e}`)}}createAllCellCtrls(){let e=this.beans.columnModel;if(this.printLayout)this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,e.getAllDisplayedColumns()),this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}};else{let t=e.getViewportCenterColumnsForRow(this.rowNode);this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,t);let i=e.getDisplayedLeftColumnsForRow(this.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,i,"left");let s=e.getDisplayedRightColumnsForRow(this.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,s,"right")}}isCellEligibleToBeRemoved(e,t){if(e.getColumn().getPinned()!=t)return!0;let i=e.isEditing(),s=this.beans.focusService.isCellFocused(e.getCellPosition());if(i||s){let t=e.getColumn();return!(this.beans.columnModel.getAllDisplayedColumns().indexOf(t)>=0)}return!0}getDomOrder(){return this.gos.get("ensureDomOrder")||this.gos.isDomLayout("print")}listenOnDomOrder(e){let t=()=>{e.rowComp.setDomOrder(this.getDomOrder())};this.addManagedPropertyListener("domLayout",t),this.addManagedPropertyListener("ensureDomOrder",t)}setAnimateFlags(e){if(this.isSticky()||!e)return;let t=q(this.rowNode.oldRowTop),i=this.beans.columnModel.isPinningLeft(),s=this.beans.columnModel.isPinningRight();if(t){if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){this.slideInAnimation.fullWidth=!0;return}this.slideInAnimation.center=!0,this.slideInAnimation.left=i,this.slideInAnimation.right=s}else{if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){this.fadeInAnimation.fullWidth=!0;return}this.fadeInAnimation.center=!0,this.fadeInAnimation.left=i,this.fadeInAnimation.right=s}}isEditing(){return this.editingRow}isFullWidth(){return"Normal"!==this.rowType}refreshFullWidth(){let e=(e,t)=>!e||e.rowComp.refreshFullWidth(()=>this.createFullWidthCompDetails(e.element,t).params),t=e(this.fullWidthGui,null),i=e(this.centerGui,null),s=e(this.leftGui,"left"),o=e(this.rightGui,"right");return t&&i&&s&&o}addListeners(){this.addManagedListener(this.rowNode,rt.EVENT_HEIGHT_CHANGED,()=>this.onRowHeightChanged()),this.addManagedListener(this.rowNode,rt.EVENT_ROW_SELECTED,()=>this.onRowSelected()),this.addManagedListener(this.rowNode,rt.EVENT_ROW_INDEX_CHANGED,this.onRowIndexChanged.bind(this)),this.addManagedListener(this.rowNode,rt.EVENT_TOP_CHANGED,this.onTopChanged.bind(this)),this.addManagedListener(this.rowNode,rt.EVENT_EXPANDED_CHANGED,this.updateExpandedCss.bind(this)),this.addManagedListener(this.rowNode,rt.EVENT_HAS_CHILDREN_CHANGED,this.updateExpandedCss.bind(this)),this.rowNode.detail&&this.addManagedListener(this.rowNode.parent,rt.EVENT_DATA_CHANGED,this.onRowNodeDataChanged.bind(this)),this.addManagedListener(this.rowNode,rt.EVENT_DATA_CHANGED,this.onRowNodeDataChanged.bind(this)),this.addManagedListener(this.rowNode,rt.EVENT_CELL_CHANGED,this.postProcessCss.bind(this)),this.addManagedListener(this.rowNode,rt.EVENT_HIGHLIGHT_CHANGED,this.onRowNodeHighlightChanged.bind(this)),this.addManagedListener(this.rowNode,rt.EVENT_DRAGGING_CHANGED,this.postProcessRowDragging.bind(this)),this.addManagedListener(this.rowNode,rt.EVENT_UI_LEVEL_CHANGED,this.onUiLevelChanged.bind(this));let e=this.beans.eventService;this.addManagedListener(e,tP.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED,this.onPaginationPixelOffsetChanged.bind(this)),this.addManagedListener(e,tP.EVENT_HEIGHT_SCALE_CHANGED,this.onTopChanged.bind(this)),this.addManagedListener(e,tP.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(e,tP.EVENT_VIRTUAL_COLUMNS_CHANGED,this.onVirtualColumnsChanged.bind(this)),this.addManagedListener(e,tP.EVENT_CELL_FOCUSED,this.onCellFocusChanged.bind(this)),this.addManagedListener(e,tP.EVENT_CELL_FOCUS_CLEARED,this.onCellFocusChanged.bind(this)),this.addManagedListener(e,tP.EVENT_PAGINATION_CHANGED,this.onPaginationChanged.bind(this)),this.addManagedListener(e,tP.EVENT_MODEL_UPDATED,this.refreshFirstAndLastRowStyles.bind(this)),this.addManagedListener(e,tP.EVENT_COLUMN_MOVED,this.updateColumnLists.bind(this)),this.addDestroyFunc(()=>{this.destroyBeans(this.rowDragComps,this.beans.context),this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature,this.beans.context))}),this.addManagedPropertyListeners(["rowDragEntireRow"],()=>
114{if(this.gos.get("rowDragEntireRow")){this.allRowGuis.forEach(e=>{this.addRowDraggerToRow(e)});return}this.destroyBeans(this.rowDragComps,this.beans.context),this.rowDragComps=[]}),this.addListenersForCellComps()}addListenersForCellComps(){this.addManagedListener(this.rowNode,rt.EVENT_ROW_INDEX_CHANGED,()=>{this.getAllCellCtrls().forEach(e=>e.onRowIndexChanged())}),this.addManagedListener(this.rowNode,rt.EVENT_CELL_CHANGED,e=>{this.getAllCellCtrls().forEach(t=>t.onCellChanged(e))})}onRowNodeDataChanged(e){if(this.isFullWidth()!==!!this.rowNode.isFullWidthCell()){this.beans.rowRenderer.redrawRow(this.rowNode);return}if(this.isFullWidth()){this.refreshFullWidth()||this.beans.rowRenderer.redrawRow(this.rowNode);return}this.getAllCellCtrls().forEach(t=>t.refreshCell({suppressFlash:!e.update,newData:!e.update})),this.allRowGuis.forEach(e=>{this.setRowCompRowId(e.rowComp),this.updateRowBusinessKey(),this.setRowCompRowBusinessKey(e.rowComp)}),this.onRowSelected(),this.postProcessCss()}postProcessCss(){this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.postProcessRowDragging()}onRowNodeHighlightChanged(){let e=this.rowNode.highlighted;this.allRowGuis.forEach(t=>{t.rowComp.addOrRemoveCssClass("ag-row-highlight-above",0===e),t.rowComp.addOrRemoveCssClass("ag-row-highlight-below",1===e)})}postProcessRowDragging(){let e=this.rowNode.dragging;this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass("ag-row-dragging",e))}updateExpandedCss(){let e=this.rowNode.isExpandable(),t=!0==this.rowNode.expanded;this.allRowGuis.forEach(i=>{i.rowComp.addOrRemoveCssClass("ag-row-group",e),i.rowComp.addOrRemoveCssClass("ag-row-group-expanded",e&&t),i.rowComp.addOrRemoveCssClass("ag-row-group-contracted",e&&!t),iu(i.element,e&&t)})}onDisplayedColumnsChanged(){this.updateColumnLists(!0),this.beans.columnModel.wasAutoRowHeightEverActive()&&this.rowNode.checkAutoHeights()}onVirtualColumnsChanged(){this.updateColumnLists(!1,!0)}getRowPosition(){return{rowPinned:j(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}}onKeyboardNavigate(e){let t=this.allRowGuis.find(t=>t.element.contains(e.target));if((t?t.element:null)!==e.target)return;let i=this.rowNode,s=this.beans.focusService.getFocusedCell(),o={rowIndex:i.rowIndex,rowPinned:i.rowPinned,column:s&&s.column};this.beans.navigationService.navigateToNextCell(e,e.key,o,!0),e.preventDefault()}onTabKeyDown(e){if(e.defaultPrevented||tm(e))return;let t=this.allRowGuis.find(t=>t.element.contains(e.target)),i=t?t.element:null,s=i===e.target,o=null;s||(o=this.beans.focusService.findNextFocusableElement(i,!1,e.shiftKey)),(this.isFullWidth()&&s||!o)&&this.beans.navigationService.onTabKeyDown(this,e)}getFullWidthElement(){return this.fullWidthGui?this.fullWidthGui.element:null}getRowYPosition(){var e;let t=null==(e=this.allRowGuis.find(e=>sp(e.element)))?void 0:e.element;return t?t.getBoundingClientRect().top:0}onFullWidthRowFocused(e){var t;let i=this.rowNode,s=!!e&&this.isFullWidth()&&e.rowIndex===i.rowIndex&&e.rowPinned==i.rowPinned,o=this.fullWidthGui?this.fullWidthGui.element:null==(t=this.centerGui)?void 0:t.element;o&&(o.classList.toggle("ag-full-width-focus",s),s&&o.focus({preventScroll:!0}))}recreateCell(e){this.centerCellCtrls=this.removeCellCtrl(this.centerCellCtrls,e),this.leftCellCtrls=this.removeCellCtrl(this.leftCellCtrls,e),this.rightCellCtrls=this.removeCellCtrl(this.rightCellCtrls,e),e.destroy(),this.updateColumnLists()}removeCellCtrl(e,t){let i={list:[],map:{}};return e.list.forEach(e=>{e!==t&&(i.list.push(e),i.map[e.getColumn().getInstanceId()]=e)}),i}onMouseEvent(e,t){switch(e){case"dblclick":this.onRowDblClick(t);break;case"click":this.onRowClick(t);break;case"touchstart":case"mousedown":this.onRowMouseDown(t)}}createRowEvent(e,t){return this.gos.addGridCommonParams({type:e,node:this.rowNode,data:this.rowNode.data,rowIndex:this.rowNode.rowIndex,rowPinned:this.rowNode.rowPinned,event:t})}createRowEventWithSource(e,t){let i=this.createRowEvent(e,t);return i.source=this,i}onRowDblClick(e){if(tm(e))return;let t=this.createRowEventWithSource(tP.EVENT_ROW_DOUBLE_CLICKED,e);this.beans.eventService.dispatchEvent(t)}onRowMouseDown(e){if(this.lastMouseDownOnDragger=se(e.target,"ag-row-drag",3),!this.isFullWidth())return;let t=this.rowNode,i=this.beans.columnModel;this.beans.rangeService&&this.beans.rangeService.removeAllCellRanges(),this.beans.focusService.setFocusedCell({rowIndex:t.rowIndex,column:i.getAllDisplayedColumns()[0],rowPinned:t.rowPinned,forceBrowserFocus:!0})}onRowClick(e){if(tm(e)||this.lastMouseDownOnDragger)return;let t=this.createRowEventWithSource(tP.EVENT_ROW_CLICKED,e);this.beans.eventService.dispatchEvent(t);let i=e.ctrlKey||e.metaKey,s=e.shiftKey;if(this.gos.get("groupSelectsChildren")&&this.rowNode.group||this.isRowSelectionBlocked()||this.gos.get("suppressRowClickSelection"))return;let o=this.gos.get("rowMultiSelectWithClick"),r=!this.gos.get("suppressRowDeselection"),n="rowClicked";this.rowNode.isSelected()?o?this.rowNode.setSelectedParams({newValue:!1,event:e,source:n}):i?r&&this.rowNode.setSelectedParams({newValue:!1,event:e,source:n}):this.rowNode.setSelectedParams({newValue:!0,clearSelection:!s,rangeSelect:s,event:e,source:n}):this.rowNode.setSelectedParams({newValue:!0,clearSelection:!o&&!i,rangeSelect:s,event:e,source:n})}isRowSelectionBlocked(){return!this.rowNode.selectable||!!this.rowNode.rowPinned||!this.gos.isRowSelection()}setupDetailRowAutoHeight(e){if("FullWidthDetail"!==this.rowType||!this.gos.get("detailRowAutoHeight"))return;let t=()=>{let t=e.clientHeight;null!=t&&t>0&&window.setTimeout(()=>{this.rowNode.setRowHeight(t),this.beans.clientSideRowModel?this.beans.clientSideRowModel.onRowHeightChanged():this.beans.serverSideRowModel&&this.beans.serverSideRowModel.onRowHeightChanged()},0)},i=this.beans.resizeObserverService.observeResize(e,t);this.addDestroyFunc(i),t()}
114createFullWidthCompDetails(e,t){let i=this.gos.addGridCommonParams({fullWidth:!0,data:this.rowNode.data,node:this.rowNode,value:this.rowNode.key,valueFormatted:this.rowNode.key,rowIndex:this.rowNode.rowIndex,eGridCell:e,eParentOfValue:e,pinned:t,addRenderedRowListener:this.addEventListener.bind(this),registerRowDragger:(e,t,i,s)=>this.addFullWidthRowDragging(e,t,i,s),setTooltip:(e,t)=>this.refreshRowTooltip(e,t)});switch(this.rowType){case"FullWidthDetail":return this.beans.userComponentFactory.getFullWidthDetailCellRendererDetails(i);case"FullWidthGroup":return this.beans.userComponentFactory.getFullWidthGroupCellRendererDetails(i);case"FullWidthLoading":return this.beans.userComponentFactory.getFullWidthLoadingCellRendererDetails(i);default:return this.beans.userComponentFactory.getFullWidthCellRendererDetails(i)}}refreshRowTooltip(e,t){this.fullWidthGui&&(this.tooltipFeature&&this.destroyBean(this.tooltipFeature,this.beans.context),this.tooltipFeature=this.createBean(new s6({getGui:()=>this.fullWidthGui.element,getTooltipValue:()=>e,getLocation:()=>
114"fullWidthRow",shouldDisplayTooltip:t},this.beans)))}addFullWidthRowDragging(e,t,i="",s){if(!this.isFullWidth())return;let o=new rl(()=>i,this.rowNode,void 0,e,t,s);this.createBean(o,this.beans.context),this.addDestroyFunc(()=>{this.destroyBean(o,this.beans.context)})}onUiLevelChanged(){let e=this.beans.rowCssClassCalculator.calculateRowLevel(this.rowNode);if(this.rowLevel!=e){let t="ag-row-level-"+e,i="ag-row-level-"+this.rowLevel;this.allRowGuis.forEach(e=>{e.rowComp.addOrRemoveCssClass(t,!0),e.rowComp.addOrRemoveCssClass(i,!1)})}this.rowLevel=e}isFirstRowOnPage(){return this.rowNode.rowIndex===this.beans.paginationProxy.getPageFirstRow()}isLastRowOnPage(){return this.rowNode.rowIndex===this.beans.paginationProxy.getPageLastRow()}refreshFirstAndLastRowStyles(){let e=this.isFirstRowOnPage(),t=this.isLastRowOnPage();this.firstRowOnPage!==e&&(this.firstRowOnPage=e,this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass("ag-row-first",e))),this.lastRowOnPage!==t&&(this.lastRowOnPage=t,this.allRowGuis.forEach(e=>e.rowComp.addOrRemoveCssClass("ag-row-last",t)))}stopEditing(e=!1){if(this.stoppingRowEdit)return;let t=this.getAllCellCtrls(),i=this.editingRow;this.stoppingRowEdit=!0;let s=!1;for(let o of t){let t=o.stopEditing(e);i&&!e&&!s&&t&&(s=!0)}if(s){let e=this.createRowEvent(tP.EVENT_ROW_VALUE_CHANGED);this.beans.eventService.dispatchEvent(e)}i&&this.setEditingRow(!1),this.stoppingRowEdit=!1}setInlineEditingCss(e){this.allRowGuis.forEach(t=>{t.rowComp.addOrRemoveCssClass("ag-row-inline-editing",e),t.rowComp.addOrRemoveCssClass("ag-row-not-inline-editing",!e)})}setEditingRow(e){this.editingRow=e,this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass("ag-row-editing",e));let t=e?this.createRowEvent(tP.EVENT_ROW_EDITING_STARTED):this.createRowEvent(tP.EVENT_ROW_EDITING_STOPPED);this.beans.eventService.dispatchEvent(t)}startRowEditing(e=null,t=null,i=null){!this.editingRow&&this.getAllCellCtrls().reduce((s,o)=>{let r=o===t;return r?o.startEditing(e,r,i):o.startEditing(null,r,i),!!s||o.isEditing()},!1)&&this.setEditingRow(!0)}getAllCellCtrls(){return 0===this.leftCellCtrls.list.length&&0===this.rightCellCtrls.list.length?this.centerCellCtrls.list:[...this.centerCellCtrls.list,...this.leftCellCtrls.list,...this.rightCellCtrls.list]}postProcessClassesFromGridOptions(){let e=this.beans.rowCssClassCalculator.processClassesFromGridOptions(this.rowNode);e&&e.length&&e.forEach(e=>{this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass(e,!0))})}postProcessRowClassRules(){this.beans.rowCssClassCalculator.processRowClassRules(this.rowNode,e=>{this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass(e,!0))},e=>{this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass(e,!1))})}setStylesFromGridOptions(e,t){e&&(this.rowStyles=this.processStylesFromGridOptions()),this.forEachGui(t,e=>e.rowComp.setUserStyles(this.rowStyles))}getPinnedForContainer(e){return"left"===e?"left":"right"===e?"right":null}getInitialRowClasses(e){let t=this.getPinnedForContainer(e),i={rowNode:this.rowNode,rowFocused:this.rowFocused,fadeRowIn:this.fadeInAnimation[e],rowIsEven:this.rowNode.rowIndex%2==0,rowLevel:this.rowLevel,fullWidthRow:this.isFullWidth(),firstRowOnPage:this.isFirstRowOnPage(),lastRowOnPage:this.isLastRowOnPage(),printLayout:this.printLayout,expandable:this.rowNode.isExpandable(),pinned:t};return this.beans.rowCssClassCalculator.getInitialRowClasses(i)}processStylesFromGridOptions(){let e;let t=this.gos.get("rowStyle");if(t&&"function"==typeof t){console.warn("AG Grid: rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead");return}let i=this.gos.getCallback("getRowStyle");return(i&&(e=i({data:this.rowNode.data,node:this.rowNode,rowIndex:this.rowNode.rowIndex})),e||t)?Object.assign({},t,e):this.emptyStyle}onRowSelected(e){let t=!!this.rowNode.isSelected();this.forEachGui(e,e=>{e.rowComp.addOrRemoveCssClass("ag-row-selected",t),iD(e.element,t),e.element.contains(this.beans.gos.getActiveDomElement())&&(e===this.centerGui||e===this.fullWidthGui)&&this.announceDescription()})}announceDescription(){if(this.isRowSelectionBlocked())return;let e=this.rowNode.isSelected();if(e&&this.beans.gos.get("suppressRowDeselection"))return;let t=this.beans.localeService.getLocaleTextFunc()(e?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${e?"deselect":"select"} this row.`);this.beans.ariaAnnouncementService.announceValue(t)}addHoverFunctionality(e){this.active&&(this.addManagedListener(e,"mouseenter",()=>this.rowNode.onMouseEnter()),this.addManagedListener(e,"mouseleave",()=>this.rowNode.onMouseLeave()),this.addManagedListener(this.rowNode,rt.EVENT_MOUSE_ENTER,()=>{this.beans.dragService.isDragging()||this.gos.get("suppressRowHoverHighlight")||(e.classList.add("ag-row-hover"),this.rowNode.setHovered(!0))}),this.addManagedListener(this.rowNode,rt.EVENT_MOUSE_LEAVE,()=>{e.classList.remove("ag-row-hover"),this.rowNode.setHovered(!1)}))}roundRowTopToBounds(e){let t=this.beans.ctrlsService.getGridBodyCtrl().getScrollFeature
114().getApproximateVScollPosition();return Math.min(Math.max(this.applyPaginationOffset(t.top,!0)-100,e),this.applyPaginationOffset(t.bottom,!0)+100)}getFrameworkOverrides(){return this.beans.frameworkOverrides}forEachGui(e,t){e?t(e):this.allRowGuis.forEach(t)}onRowHeightChanged(e){if(null==this.rowNode.rowHeight)return;let t=this.rowNode.rowHeight,i=this.beans.environment.getDefaultRowHeight(),s=this.gos.isGetRowHeightFunction()?this.gos.getRowHeightForNode(this.rowNode).height:void 0,o=s?`${Math.min(i,s)-2}px`:void 0;this.forEachGui(e,e=>{e.element.style.height=`${t}px`,o&&e.element.style.setProperty("--ag-line-height",o)})}addEventListener(e,t){super.addEventListener(e,t)}removeEventListener(e,t){super.removeEventListener(e,t)}destroyFirstPass(e=!1){if(this.active=!1,!e&&this.gos.isAnimateRows()&&!this.isSticky()){if(null!=this.rowNode.rowTop){let e=this.roundRowTopToBounds(this.rowNode.rowTop);this.setRowTop(e)}else this.allRowGuis.forEach(e=>e.rowComp.addOrRemoveCssClass("ag-opacity-zero",!0))}this.rowNode.setHovered(!1);let t=this.createRowEvent(tP.EVENT_VIRTUAL_ROW_REMOVED);this.dispatchEvent(t),this.beans.eventService.dispatchEvent(t),super.destroy()}destroySecondPass(){this.allRowGuis.length=0,this.stopEditing();let e=e=>(e.list.forEach(e=>e.destroy()),{list:[],map:{}});this.centerCellCtrls=e(this.centerCellCtrls),this.leftCellCtrls=e(this.leftCellCtrls),this.rightCellCtrls=e(this.rightCellCtrls)}setFocusedClasses(e){this.forEachGui(e,e=>{e.rowComp.addOrRemoveCssClass("ag-row-focus",this.rowFocused),e.rowComp.addOrRemoveCssClass("ag-row-no-focus",!this.rowFocused)})}onCellFocusChanged(){let e=this.beans.focusService.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);e!==this.rowFocused&&(this.rowFocused=e,this.setFocusedClasses()),!e&&this.editingRow&&this.stopEditing(!1)}onPaginationChanged(){let e=this.beans.paginationProxy.getCurrentPage();this.paginationPage!==e&&(this.paginationPage=e,this.onTopChanged()),this.refreshFirstAndLastRowStyles()}onTopChanged(){this.setRowTop(this.rowNode.rowTop)}onPaginationPixelOffsetChanged(){this.onTopChanged()}applyPaginationOffset(e,t=!1){return this.rowNode.isRowPinned()||this.rowNode.sticky?e:e+this.beans.paginationProxy.getPixelOffset()*(t?1:-1)}setRowTop(e){if(!this.printLayout&&q(e)){let t=this.applyPaginationOffset(e),i=this.rowNode.isRowPinned()||this.rowNode.sticky?t:this.beans.rowContainerHeightService.getRealPixelPosition(t),s=`${i}px`;this.setRowTopStyle(s)}}getInitialRowTop(e){return this.suppressRowTransform?this.getInitialRowTopShared(e):void 0}getInitialTransform(e){return this.suppressRowTransform?void 0:`translateY(${this.getInitialRowTopShared(e)})`}getInitialRowTopShared(e){let t;if(this.printLayout)return"";if(this.isSticky())t=this.rowNode.stickyRowTop;else{let i=this.slideInAnimation[e]?this.roundRowTopToBounds(this.rowNode.oldRowTop):this.rowNode.rowTop,s=this.applyPaginationOffset(i);t=this.rowNode.isRowPinned()?s:this.beans.rowContainerHeightService.getRealPixelPosition(s)}return t+"px"}setRowTopStyle(e){this.allRowGuis.forEach(t=>this.suppressRowTransform?t.rowComp.setTop(e):t.rowComp.setTransform(`translateY(${e})`))}getRowNode(){return this.rowNode}getCellCtrl(e){let t=null;return this.getAllCellCtrls().forEach(i=>{i.getColumn()==e&&(t=i)}),null!=t||this.getAllCellCtrls().forEach(i=>{i.getColSpanningList().indexOf(e)>=0&&(t=i)}),t}onRowIndexChanged(){null!=this.rowNode.rowIndex&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())}getRowIndex(){return this.rowNode.getRowIndexString()}updateRowIndexes(e){let t=this.rowNode.getRowIndexString(),i=this.beans.headerNavigationService.getHeaderRowCount()+this.beans.filterManager.getHeaderRowCount(),s=this.rowNode.rowIndex%2==0,o=i+this.rowNode.rowIndex+1;this.forEachGui(e,e=>{e.rowComp.setRowIndex(t),e.rowComp.addOrRemoveCssClass("ag-row-even",s),e.rowComp.addOrRemoveCssClass("ag-row-odd",!s),iv(e.element,o)})}};nR.DOM_DATA_KEY_ROW_CTRL="renderedRow";var nD=nR,nT=class extends tR{constructor(e){super(),this.element=e}postConstruct(){this.addKeyboardListeners(),this.addMouseListeners(),this.mockContextMenuForIPad()}addKeyboardListeners(){let e="keydown",t=this.processKeyboardEvent.bind(this,e);this.addManagedListener(this.element,e,t)}addMouseListeners(){["dblclick","contextmenu","mouseover","mouseout","click",tC("touchstart")?"touchstart":"mousedown"].forEach(e
114=>{let t=this.processMouseEvent.bind(this,e);this.addManagedListener(this.element,e,t)})}processMouseEvent(e,t){if(!this.mouseEventService.isEventFromThisGrid(t)||tm(t))return;let i=this.getRowForEvent(t),s=this.mouseEventService.getRenderedCellForEvent(t);"contextmenu"===e?this.handleContextMenuMouseEvent(t,void 0,i,s):(s&&s.onMouseEvent(e,t),i&&i.onMouseEvent(e,t))}mockContextMenuForIPad(){if(!iG())return;let e=new oQ(this.element);this.addManagedListener(e,oQ.EVENT_LONG_TAP,e=>{let t=this.getRowForEvent(e.touchEvent),i=this.mouseEventService.getRenderedCellForEvent(e.touchEvent);this.handleContextMenuMouseEvent(void 0,e.touchEvent,t,i)}),this.addDestroyFunc(()=>e.destroy())}getRowForEvent(e){let t=e.target;for(;t;){let e=this.gos.getDomData(t,nD.DOM_DATA_KEY_ROW_CTRL);if(e)return e;t=t.parentElement}return null}handleContextMenuMouseEvent(e,t,i,s){let o=i?i.getRowNode():null,r=s?s.getColumn():null,n=null;if(r){let i=e||t;s.dispatchCellContextMenuEvent(null!=i?i:null),n=this.valueService.getValue(r,o)}let l=this.ctrlsService.getGridBodyCtrl(),a=s?s.getGui():l.getGridBodyElement();this.menuService.showContextMenu({mouseEvent:e,touchEvent:t,rowNode:o,column:r,value:n,anchorToElement:a})}getControlsForEventTarget(e){return{cellCtrl:tv(this.gos,e,nS.DOM_DATA_KEY_CELL_CTRL),rowCtrl:tv(this.gos,e,nD.DOM_DATA_KEY_ROW_CTRL)}}processKeyboardEvent(e,t){let{cellCtrl:i,rowCtrl:s}=this.getControlsForEventTarget(t.target);!t.defaultPrevented&&(i?this.processCellKeyboardEvent(i,e,t):s&&s.isFullWidth()&&this.processFullWidthRowKeyboardEvent(s,e,t))}processCellKeyboardEvent(e,t,i){let s=e.getRowNode(),o=e.getColumn(),r=e.isEditing();if(!sW(this.gos,i,s,o,r)&&"keydown"===t&&(!r&&this.navigationService.handlePageScrollingKey(i)||e.onKeyDown(i),this.doGridOperations(i,e.isEditing()),sB(i)&&e.processCharacter(i)),"keydown"===t){let t=e.createEvent(i,tP.EVENT_CELL_KEY_DOWN);this.eventService.dispatchEvent(t)}}processFullWidthRowKeyboardEvent(e,t,i){let s=e.getRowNode(),o=this.focusService.getFocusedCell(),r=o&&o.column;if(!sW(this.gos,i,s,r,!1)){let s=i.key;if("keydown"===t)switch(s){case sk.PAGE_HOME:case sk.PAGE_END:case sk.PAGE_UP:case sk.PAGE_DOWN:this.navigationService.handlePageScrollingKey(i,!0);break;case sk.UP:case sk.DOWN:e.onKeyboardNavigate(i);break;case sk.TAB:e.onTabKeyDown(i)}}if("keydown"===t){let t=e.createRowEvent(tP.EVENT_CELL_KEY_DOWN,i);this.eventService.dispatchEvent(t)}}doGridOperations(e,t){if(!e.ctrlKey&&!e.metaKey||t||!this.mouseEventService.isEventFromThisGrid(e))return;let i=sz(e);return i===sk.A?this.onCtrlAndA(e):i===sk.C?this.onCtrlAndC(e):i===sk.D?this.onCtrlAndD(e):i===sk.V?this.onCtrlAndV(e):i===sk.X?this.onCtrlAndX(e):i===sk.Y?this.onCtrlAndY():i===sk.Z?this.onCtrlAndZ(e):void 0}onCtrlAndA(e){let{pinnedRowModel:t,paginationProxy:i,rangeService:s}=this;if(s&&i.isRowsToRender()){let e,i;let[o,r]=[t.isEmpty("top"),t.isEmpty("bottom")];r?(e=null,i=this.paginationProxy.getRowCount()-1):(e="bottom",i=t.getPinnedBottomRowData().length-1);let n=this.columnModel.getAllDisplayedColumns();if(X(n))return;s.setCellRange({rowStartIndex:0,rowStartPinned:o?null:"top",rowEndIndex:i,rowEndPinned:e,columnStart:n[0],columnEnd:e5(n)})}e.preventDefault()}onCtrlAndC(e){if(!this.clipboardService||this.gos.get("enableCellTextSelection"))return;let{cellCtrl:t,rowCtrl:i}=this.getControlsForEventTarget(e.target);(null==t?void 0:t.isEditing())||(null==i?void 0:i.isEditing())||(e.preventDefault(),this.clipboardService.copyToClipboard())}onCtrlAndX(e){if(!this.clipboardService||this.gos.get("enableCellTextSelection")||this.gos.get("suppressCutToClipboard"))return;let{cellCtrl:t,rowCtrl:i}=this.getControlsForEventTarget(e.target);(null==t?void 0:t.isEditing())||(null==i?void 0:i.isEditing())||(e.preventDefault(),this.clipboardService.cutToClipboard(void 0,"ui"))}onCtrlAndV(e){let{cellCtrl:t,rowCtrl:i}=this.getControlsForEventTarget(e.target);(null==t?void 0:t.isEditing())||(null==i?void 0:i.isEditing())||!this.clipboardService||this.gos.get("suppressClipboardPaste")||this.clipboardService.pasteFromClipboard()}onCtrlAndD(e){this.clipboardService&&!this.gos.get("suppressClipboardPaste")&&this.clipboardService.copyRangeDown(),e.preventDefault()}onCtrlAndZ(e){this.gos.get("undoRedoCellEditing")&&(e.preventDefault(),e.shiftKey?this.undoRedoService.redo("ui"):this.undoRedoService.undo("ui"))}onCtrlAndY(){this.undoRedoService.redo("ui")}
114};K([eB("mouseEventService")],nT.prototype,"mouseEventService",2),K([eB("valueService")],nT.prototype,"valueService",2),K([eB("menuService")],nT.prototype,"menuService",2),K([eB("ctrlsService")],nT.prototype,"ctrlsService",2),K([eB("navigationService")],nT.prototype,"navigationService",2),K([eB("focusService")],nT.prototype,"focusService",2),K([eB("undoRedoService")],nT.prototype,"undoRedoService",2),K([eB("columnModel")],nT.prototype,"columnModel",2),K([eB("paginationProxy")],nT.prototype,"paginationProxy",2),K([eB("pinnedRowModel")],nT.prototype,"pinnedRowModel",2),K([eW("rangeService")],nT.prototype,"rangeService",2),K([eW("clipboardService")],nT.prototype,"clipboardService",2),K([eV],nT.prototype,"postConstruct",1);var nb=class extends tR{constructor(e){super(),this.centerContainerCtrl=e}postConstruct(){this.ctrlsService.whenReady(e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.listenForResize()}),this.addManagedListener(this.eventService,tP.EVENT_SCROLLBAR_WIDTH_CHANGED,this.onScrollbarWidthChanged.bind(this)),this.addManagedPropertyListeners(["alwaysShowHorizontalScroll","alwaysShowVerticalScroll"],()=>{this.checkViewportAndScrolls()})}listenForResize(){let e=()=>this.onCenterViewportResized();this.centerContainerCtrl.registerViewportResizeListener(e),this.gridBodyCtrl.registerBodyViewportResizeListener(e)}onScrollbarWidthChanged(){this.checkViewportAndScrolls()}onCenterViewportResized(){if(this.centerContainerCtrl.isViewportInTheDOMTree()){this.keepPinnedColumnsNarrowerThanViewport(),this.checkViewportAndScrolls();let e=this.centerContainerCtrl.getCenterWidth();e!==this.centerWidth&&(this.centerWidth=e,this.columnModel.refreshFlexedColumns({viewportWidth:this.centerWidth,updateBodyWidths:!0,fireResizedEvent:!0}))}else this.bodyHeight=0}keepPinnedColumnsNarrowerThanViewport(){let e=ss(this.gridBodyCtrl.getBodyViewportElement());if(e<=50)return;let t=this.getPinnedColumnsOverflowingViewport(e-50),i=this.gos.getCallback("processUnpinnedColumns");t.length&&(i&&(t=i({columns:t,viewportWidth:e})),this.columnModel.setColumnsPinned(t,null,"viewportSizeFeature"))}getPinnedColumnsOverflowingViewport(e){let t=this.pinnedWidthService.getPinnedRightWidth()+this.pinnedWidthService.getPinnedLeftWidth();if(t<e)return[];let i=[...this.columnModel.getDisplayedLeftColumns()],s=[...this.columnModel.getDisplayedRightColumns()],o=0,r=0,n=[],l=t-0-e;for(;(r<i.length||o<s.length)&&l>0;){if(o<s.length){let e=s[o++];l-=e.getActualWidth(),n.push(e)}if(r<i.length&&l>0){let e=i[r++];l-=e.getActualWidth(),n.push(e)}}return n}checkViewportAndScrolls(){this.updateScrollVisibleService(),this.checkBodyHeight(),this.onHorizontalViewportChanged(),this.gridBodyCtrl.getScrollFeature().checkScrollLeft()}getBodyHeight(){return this.bodyHeight}checkBodyHeight(){let e=si(this.gridBodyCtrl.getBodyViewportElement());if(this.bodyHeight!==e){this.bodyHeight=e;let t={type:tP.EVENT_BODY_HEIGHT_CHANGED};this.eventService.dispatchEvent(t)}}updateScrollVisibleService(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)}updateScrollVisibleServiceImpl(){let e={horizontalScrollShowing:this.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleService.setScrollsVisible(e)}isHorizontalScrollShowing(){return this.centerContainerCtrl.isHorizontalScrollShowing()}onHorizontalViewportChanged(){let e=this.centerContainerCtrl.getCenterWidth(),t=this.centerContainerCtrl.getViewportScrollLeft();this.columnModel.setViewportPosition(e,t)}};K([eB("ctrlsService")],nb.prototype,"ctrlsService",2),K([eB("pinnedWidthService")],nb.prototype,"pinnedWidthService",2),K([eB("columnModel")],nb.prototype,"columnModel",2),K([eB("scrollVisibleService")],nb.prototype,"scrollVisibleService",2),K([eV],nb.prototype,"postConstruct",1);var nA=class extends tR{constructor(e){super(),this.element=e}postConstruct(){this.addManagedListener(this.eventService,tP.EVENT_LEFT_PINNED_WIDTH_CHANGED,this.onPinnedLeftWidthChanged.bind(this))}onPinnedLeftWidthChanged(){let e=this.pinnedWidthService.getPinnedLeftWidth();i8(this.element,e>0),sy(this.element,e)}getWidth(){return this.pinnedWidthService.getPinnedLeftWidth()}};K([eB("pinnedWidthService")],nA.prototype,"pinnedWidthService",2),K([eV],nA.prototype,"postConstruct",1);var nP=class extends tR{constructor(e){super(),this.element=e}postConstruct(){this.addManagedListener(this.eventService,tP.EVENT_RIGHT_PINNED_WIDTH_CHANGED,this.onPinnedRightWidthChanged.bind(this))}onPinnedRightWidthChanged(){let e=this.pinnedWidthService.getPinnedRightWidth();i8(this.element,e>0),sy(this.element,e)}getWidth(){return this.pinnedWidthService.getPinnedRightWidth()}};K([eB("pinnedWidthService")],nP.prototype,"pinnedWidthService",2),K([eV],nP.prototype,"postConstruct",1);var nF=class extends tR{constructor(e,t){super(),this.eContainer=e,this.eViewport=t}postConstruct(){this.addManagedListener(this.eventService,tP.EVENT_ROW_CONTAINER_HEIGHT_CHANGED,this.onHeightChanged.bind(this))}onHeightChanged(){let e=this.maxDivHeightScaler.getUiContainerHeight(),t=null!=e?`${e}px`:"";this.eContainer.style.height=t,this.eViewport&&(this.eViewport.style.height=t)}};K([eB("rowContainerHeightService")],nF.prototype,"maxDivHeightScaler",2),K([eV],nF.prototype,"postConstruct",1);var nL=class extends tR{constructor(e){super(),this.eContainer=e}postConstruct(){this.rangeService&&(this.params={eElement:this.eContainer,onDragStart:this.rangeService.onDragStart.bind(this.rangeService),onDragStop:this.rangeService.onDragStop.bind(this.rangeService),onDragging:this.rangeService.onDragging.bind(this.rangeService)},this.addManagedPropertyListener("enableRangeSelection",e=>
114{if(e.currentValue){this.enableFeature();return}this.disableFeature()}),this.addDestroyFunc(()=>this.disableFeature()),this.gos.get("enableRangeSelection")&&this.enableFeature())}enableFeature(){this.dragService.addDragSource(this.params)}disableFeature(){this.dragService.removeDragSource(this.params)}};K([eB("dragService")],nL.prototype,"dragService",2),K([eW("rangeService")],nL.prototype,"rangeService",2),K([eV],nL.prototype,"postConstruct",1);var nM=class extends tR{constructor(e,t=!1){super(),this.callback=e,this.addSpacer=t}postConstruct(){let e=this.setWidth.bind(this);this.addManagedPropertyListener("domLayout",e),this.addManagedListener(this.eventService,tP.EVENT_COLUMN_CONTAINER_WIDTH_CHANGED,e),this.addManagedListener(this.eventService,tP.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,tP.EVENT_LEFT_PINNED_WIDTH_CHANGED,e),this.addSpacer&&(this.addManagedListener(this.eventService,tP.EVENT_RIGHT_PINNED_WIDTH_CHANGED,e),this.addManagedListener(this.eventService,tP.EVENT_SCROLL_VISIBILITY_CHANGED,e),this.addManagedListener(this.eventService,tP.EVENT_SCROLLBAR_WIDTH_CHANGED,e)),this.setWidth()}setWidth(){let e;let{columnModel:t}=this,i=this.gos.isDomLayout("print"),s=t.getBodyContainerWidth(),o=t.getDisplayedColumnsLeftWidth(),r=t.getDisplayedColumnsRightWidth();i?e=s+o+r:(e=s,this.addSpacer&&0===(this.gos.get("enableRtl")?o:r)&&this.scrollVisibleService.isVerticalScrollShowing()&&(e+=this.gos.getScrollbarWidth())),this.callback(e)}};K([eB("columnModel")],nM.prototype,"columnModel",2),K([eB("scrollVisibleService")],nM.prototype,"scrollVisibleService",2),K([eV],nM.prototype,"postConstruct",1);var nN=((m=nN||{}).LEFT="left",m.RIGHT="right",m.CENTER="center",m.FULL_WIDTH="fullWidth",m.TOP_LEFT="topLeft",m.TOP_RIGHT="topRight",m.TOP_CENTER="topCenter",m.TOP_FULL_WIDTH="topFullWidth",m.STICKY_TOP_LEFT="stickyTopLeft",m.STICKY_TOP_RIGHT="stickyTopRight",m.STICKY_TOP_CENTER="stickyTopCenter",m.STICKY_TOP_FULL_WIDTH="stickyTopFullWidth",m.STICKY_BOTTOM_LEFT="stickyBottomLeft",m.STICKY_BOTTOM_RIGHT="stickyBottomRight",m.STICKY_BOTTOM_CENTER="stickyBottomCenter",m.STICKY_BOTTOM_FULL_WIDTH="stickyBottomFullWidth",m.BOTTOM_LEFT="bottomLeft",m.BOTTOM_RIGHT="bottomRight",m.BOTTOM_CENTER="bottomCenter",m.BOTTOM_FULL_WIDTH="bottomFullWidth",m),nI=((C=nI||{}).LEFT="left",C.RIGHT="right",C.CENTER="center",C.FULL_WIDTH="fullWidth",C);function nG(e){switch(e){case"center":case"topCenter":case"stickyTopCenter":case"bottomCenter":case"stickyBottomCenter":return"center";case"left":case"topLeft":case"stickyTopLeft":case"bottomLeft":case"stickyBottomLeft":return"left";case"right":case"topRight":case"stickyTopRight":case"bottomRight":case"stickyBottomRight":return"right";case"fullWidth":case"topFullWidth":case"stickyTopFullWidth":case"bottomFullWidth":case"stickyBottomFullWidth":return"fullWidth";default:throw Error("Invalid Row Container Type")}}var nO=tW([["center","ag-center-cols-container"],["left","ag-pinned-left-cols-container"],["right","ag-pinned-right-cols-container"],["fullWidth","ag-full-width-container"],["topCenter","ag-floating-top-container"],["topLeft","ag-pinned-left-floating-top"],["topRight","ag-pinned-right-floating-top"],["topFullWidth","ag-floating-top-full-width-container"],["stickyTopCenter","ag-sticky-top-container"],["stickyTopLeft","ag-pinned-left-sticky-top"],["stickyTopRight","ag-pinned-right-sticky-top"],["stickyTopFullWidth","ag-sticky-top-full-width-container"],["stickyBottomCenter","ag-sticky-bottom-container"],["stickyBottomLeft","ag-pinned-left-sticky-bottom"],["stickyBottomRight","ag-pinned-right-sticky-bottom"],["stickyBottomFullWidth","ag-sticky-bottom-full-width-container"],["bottomCenter","ag-floating-bottom-container"],["bottomLeft","ag-pinned-left-floating-bottom"],["bottomRight","ag-pinned-right-floating-bottom"],["bottomFullWidth","ag-floating-bottom-full-width-container"]]),nx=tW([["center","ag-center-cols-viewport"],["topCenter","ag-floating-top-viewport"],["stickyTopCenter","ag-sticky-top-viewport"],["bottomCenter","ag-floating-bottom-viewport"],["stickyBottomCenter","ag-sticky-bottom-viewport"]]),n_=class e extends tR{constructor(e){super(),this.visible=!0,this.EMPTY_CTRLS=[],this.name=e,this.isFullWithContainer="topFullWidth"===this.name||"stickyTopFullWidth"===this.name||"stickyBottomFullWidth"===this.name||"bottomFullWidth"===this.name||"fullWidth"===this.name}
114static getRowContainerCssClasses(e){return{container:nO.get(e),viewport:nx.get(e)}}static getPinned(e){switch(e){case"bottomLeft":case"topLeft":case"stickyTopLeft":case"stickyBottomLeft":case"left":return"left";case"bottomRight":case"topRight":case"stickyTopRight":case"stickyBottomRight":case"right":return"right";default:return null}}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.forContainers(["center"],()=>this.viewportSizeFeature=this.createManagedBean(new nb(this)))}registerWithCtrlsService(){switch(this.name){case"fullWidth":case"topFullWidth":case"stickyTopFullWidth":case"bottomFullWidth":case"stickyBottomFullWidth":return;default:this.ctrlsService.register(this.name,this)}}forContainers(e,t){e.indexOf(this.name)>=0&&t()}getContainerElement(){return this.eContainer}getViewportSizeFeature(){return this.viewportSizeFeature}setComp(e,t,i){this.comp=e,this.eContainer=t,this.eViewport=i,this.createManagedBean(new nT(this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder(),this.stopHScrollOnPinnedRows(),this.forContainers(["left","bottomLeft","topLeft","stickyTopLeft","stickyBottomLeft"],()=>{this.pinnedWidthFeature=this.createManagedBean(new nA(this.eContainer)),this.addManagedListener(this.eventService,tP.EVENT_LEFT_PINNED_WIDTH_CHANGED,()=>this.onPinnedWidthChanged())}),this.forContainers(["right","bottomRight","topRight","stickyTopRight","stickyBottomRight"],()=>{this.pinnedWidthFeature=this.createManagedBean(new nP(this.eContainer)),this.addManagedListener(this.eventService,tP.EVENT_RIGHT_PINNED_WIDTH_CHANGED,()=>this.onPinnedWidthChanged())}),this.forContainers(["center","left","right","fullWidth"],()=>this.createManagedBean(new nF(this.eContainer,"center"===this.name?i:void 0))),this.forContainers(["topCenter","topLeft","topRight","bottomCenter","bottomLeft","bottomRight","center","left","right","stickyTopCenter","stickyTopLeft","stickyTopRight","stickyBottomCenter","stickyBottomLeft","stickyBottomRight"],()=>this.createManagedBean(new nL(this.eContainer))),this.forContainers(["center","topCenter","stickyTopCenter","bottomCenter","stickyBottomCenter"],()=>this.createManagedBean(new nM(e=>this.comp.setContainerWidth(`${e}px`)))),this.addListeners(),this.registerWithCtrlsService()}addListeners(){this.addManagedListener(this.eventService,tP.EVENT_DISPLAYED_COLUMNS_CHANGED,()=>this.onDisplayedColumnsChanged()),this.addManagedListener(this.eventService,tP.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,()=>this.onDisplayedColumnsWidthChanged()),this.addManagedListener(this.eventService,tP.EVENT_DISPLAYED_ROWS_CHANGED,e=>this.onDisplayedRowsChanged(e.afterScroll)),this.onDisplayedColumnsChanged(),this.onDisplayedColumnsWidthChanged(),this.onDisplayedRowsChanged()}listenOnDomOrder(){if(["stickyTopCenter","stickyTopLeft","stickyTopRight","stickyTopFullWidth","stickyBottomCenter","stickyBottomLeft","stickyBottomRight","stickyBottomFullWidth"].indexOf(this.name)>=0){this.comp.setDomOrder(!0);return}let e=()=>{let e=this.gos.get("ensureDomOrder"),t=this.gos.isDomLayout("print");this.comp.setDomOrder(e||t)};this.addManagedPropertyListener("domLayout",e),e()}stopHScrollOnPinnedRows(){this.forContainers(["topCenter","stickyTopCenter","bottomCenter","stickyBottomCenter"],()=>{this.addManagedListener(this.eViewport,"scroll",()=>this.eViewport.scrollLeft=0)})}onDisplayedColumnsChanged(){this.forContainers(["center"],()=>this.onHorizontalViewportChanged())}onDisplayedColumnsWidthChanged(){this.forContainers(["center"],()=>this.onHorizontalViewportChanged())}addPreventScrollWhileDragging(){let e=e=>{this.dragService.isDragging()&&e.cancelable&&e.preventDefault()};this.eContainer.addEventListener("touchmove",e,{passive:!1}),this.addDestroyFunc(()=>this.eContainer.removeEventListener("touchmove",e))}onHorizontalViewportChanged(e=!1){let t=this.getCenterWidth(),i=this.getCenterViewportScrollLeft();this.columnModel.setViewportPosition(t,i,e)}getCenterWidth(){return ss(this.eViewport)}getCenterViewportScrollLeft(){return sa(this.eViewport,this.enableRtl)}registerViewportResizeListener(e){let t=this.resizeObserverService.observeResize(this.eViewport,e);this.addDestroyFunc(()=>t())}isViewportInTheDOMTree(){return sc(this.eViewport)}getViewportScrollLeft(){return sa(this.eViewport,this.enableRtl)}
114isHorizontalScrollShowing(){return this.gos.get("alwaysShowHorizontalScroll")||sw(this.eViewport)}getViewportElement(){return this.eViewport}setContainerTranslateX(e){this.eContainer.style.transform=`translateX(${e}px)`}getHScrollPosition(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}}setCenterViewportScrollLeft(e){sh(this.eViewport,e,this.enableRtl)}isContainerVisible(){return!e.getPinned(this.name)||!!this.pinnedWidthFeature&&this.pinnedWidthFeature.getWidth()>0}onPinnedWidthChanged(){let e=this.isContainerVisible();this.visible!=e&&(this.visible=e,this.onDisplayedRowsChanged())}onDisplayedRowsChanged(e=!1){let t=this.getRowCtrls();if(!this.visible||0===t.length){this.comp.setRowCtrls({rowCtrls:this.EMPTY_CTRLS});return}let i=this.gos.isDomLayout("print"),s=this.gos.get("embedFullWidthRows")||i,o=t.filter(e=>{let t=e.isFullWidth();return this.isFullWithContainer?!s&&t:s||!t});this.comp.setRowCtrls({rowCtrls:o,useFlushSync:e})}getRowCtrls(){switch(this.name){case"topCenter":case"topLeft":case"topRight":case"topFullWidth":return this.rowRenderer.getTopRowCtrls();case"stickyTopCenter":case"stickyTopLeft":case"stickyTopRight":case"stickyTopFullWidth":return this.rowRenderer.getStickyTopRowCtrls();case"stickyBottomCenter":case"stickyBottomLeft":case"stickyBottomRight":case"stickyBottomFullWidth":return this.rowRenderer.getStickyBottomRowCtrls();case"bottomCenter":case"bottomLeft":case"bottomRight":case"bottomFullWidth":return this.rowRenderer.getBottomRowCtrls();default:return this.rowRenderer.getCentreRowCtrls()}}};K([eB("dragService")],n_.prototype,"dragService",2),K([eB("ctrlsService")],n_.prototype,"ctrlsService",2),K([eB("columnModel")],n_.prototype,"columnModel",2),K([eB("resizeObserverService")],n_.prototype,"resizeObserverService",2),K([eB("rowRenderer")],n_.prototype,"rowRenderer",2),K([eV],n_.prototype,"postConstruct",1);var nV=n_,nH=`<div class="ag-root ag-unselectable" role="treegrid">
115        <ag-header-root ref="gridHeader"></ag-header-root>
116        <div class="ag-floating-top" ref="eTop" role="presentation">
117            <ag-row-container ref="topLeftContainer" name="topLeft"></ag-row-container>
118            <ag-row-container ref="topCenterContainer" name="topCenter"></ag-row-container>
119            <ag-row-container ref="topRightContainer" name="topRight"></ag-row-container>
120            <ag-row-container ref="topFullWidthContainer" name="topFullWidth"></ag-row-container>
121        </div>
122        <div class="ag-body" ref="eBody" role="presentation">
123            <div class="ag-body-viewport" ref="eBodyViewport" role="presentation">
124                <ag-row-container ref="leftContainer" name="left"></ag-row-container>
125                <ag-row-container ref="centerContainer" name="center"></ag-row-container>
126                <ag-row-container ref="rightContainer" name="right"></ag-row-container>
127                <ag-row-container ref="fullWidthContainer" name="fullWidth"></ag-row-container>
128            </div>
129            <ag-fake-vertical-scroll></ag-fake-vertical-scroll>
130        </div>
131        <div class="ag-sticky-top" ref="eStickyTop" role="presentation">
132            <ag-row-container ref="stickyTopLeftContainer" name="stickyTopLeft"></ag-row-container>
133            <ag-row-container ref="stickyTopCenterContainer" name="stickyTopCenter"></ag-row-container>
134            <ag-row-container ref="stickyTopRightContainer" name="stickyTopRight"></ag-row-container>
135            <ag-row-container ref="stickyTopFullWidthContainer" name="stickyTopFullWidth"></ag-row-container>
136        </div>
137        <div class="ag-sticky-bottom" ref="eStickyBottom" role="presentation">
138            <ag-row-container ref="stickyBottomLeftContainer" name="stickyBottomLeft"></ag-row-container>
139            <ag-row-container ref="stickyBottomCenterContainer" name="stickyBottomCenter"></ag-row-container>
140            <ag-row-container ref="stickyBottomRightContainer" name="stickyBottomRight"></ag-row-container>
141            <ag-row-container ref="stickyBottomFullWidthContainer" name="stickyBottomFullWidth"></ag-row-container>
142        </div>
143        <div class="ag-floating-bottom" ref="eBottom" role="presentation">
144            <ag-row-container ref="bottomLeftContainer" name="bottomLeft"></ag-row-container>
145            <ag-row-container ref="bottomCenterContainer" name="bottomCenter"></ag-row-container>
146            <ag-row-container ref="bottomRightContainer" name="bottomRight"></ag-row-container>
147            <ag-row-container ref="bottomFullWidthContainer" name="bottomFullWidth"></ag-row-container>
148        </div>
149        <ag-fake-horizontal-scroll></ag-fake-horizontal-scroll>
150        <ag-overlay-wrapper></ag-overlay-wrapper>
151    </div>`,nk=class extends s9{constructor(){super(nH)}init(){let e=(e,t)=>
151{let i=`${e}px`;t.style.minHeight=i,t.style.height=i};this.ctrl=this.createManagedBean(new nl),this.ctrl.setComp({setRowAnimationCssOnBodyViewport:(e,t)=>this.setRowAnimationCssOnBodyViewport(e,t),setColumnCount:e=>iw(this.getGui(),e),setRowCount:e=>iC(this.getGui(),e),setTopHeight:t=>e(t,this.eTop),setBottomHeight:t=>e(t,this.eBottom),setTopDisplay:e=>this.eTop.style.display=e,setBottomDisplay:e=>this.eBottom.style.display=e,setStickyTopHeight:e=>this.eStickyTop.style.height=e,setStickyTopTop:e=>this.eStickyTop.style.top=e,setStickyTopWidth:e=>this.eStickyTop.style.width=e,setStickyBottomHeight:e=>this.eStickyBottom.style.height=e,setStickyBottomBottom:e=>this.eStickyBottom.style.bottom=e,setStickyBottomWidth:e=>this.eStickyBottom.style.width=e,setColumnMovingCss:(e,t)=>this.addOrRemoveCssClass(e,t),updateLayoutClasses:(e,t)=>{[this.eBodyViewport.classList,this.eBody.classList].forEach(e=>{e.toggle("ag-layout-auto-height",t.autoHeight),e.toggle("ag-layout-normal",t.normal),e.toggle("ag-layout-print",t.print)}),this.addOrRemoveCssClass("ag-layout-auto-height",t.autoHeight),this.addOrRemoveCssClass("ag-layout-normal",t.normal),this.addOrRemoveCssClass("ag-layout-print",t.print)},setAlwaysVerticalScrollClass:(e,t)=>this.eBodyViewport.classList.toggle(nn,t),registerBodyViewportResizeListener:e=>{let t=this.resizeObserverService.observeResize(this.eBodyViewport,e);this.addDestroyFunc(()=>t())},setPinnedTopBottomOverflowY:e=>this.eTop.style.overflowY=this.eBottom.style.overflowY=e,setCellSelectableCss:(e,t)=>{[this.eTop,this.eBodyViewport,this.eBottom].forEach(i=>i.classList.toggle(e,t))},setBodyViewportWidth:e=>this.eBodyViewport.style.width=e},this.getGui(),this.eBodyViewport,this.eTop,this.eBottom,this.eStickyTop,this.eStickyBottom),(this.rangeService&&this.gos.get("enableRangeSelection")||"multiple"===this.gos.get("rowSelection"))&&im(this.getGui(),!0)}setRowAnimationCssOnBodyViewport(e,t){let i=this.eBodyViewport.classList;i.toggle("ag-row-animation",t),i.toggle("ag-row-no-animation",!t)}getFloatingTopBottom(){return[this.eTop,this.eBottom]}};K([eB("resizeObserverService")],nk.prototype,"resizeObserverService",2),K([eW("rangeService")],nk.prototype,"rangeService",2),K([ot("eBodyViewport")],nk.prototype,"eBodyViewport",2),K([ot("eStickyTop")],nk.prototype,"eStickyTop",2),K([ot("eStickyBottom")],nk.prototype,"eStickyBottom",2),K([ot("eTop")],nk.prototype,"eTop",2),K([ot("eBottom")],nk.prototype,"eBottom",2),K([ot("gridHeader")],nk.prototype,"headerRootComp",2),K([ot("eBody")],nk.prototype,"eBody",2),K([eV],nk.prototype,"init",1);var nB=class extends tR{postConstruct(){this.addManagedListener(this.eventService,tP.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,tP.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onDisplayedColumnsWidthChanged.bind(this))}onDisplayedColumnsChanged(){this.update()}onDisplayedColumnsWidthChanged(){this.update()}update(){this.columnAnimationService.isActive()?this.columnAnimationService.executeLaterVMTurn(()=>{this.columnAnimationService.executeLaterVMTurn(()=>this.updateImpl())}):this.updateImpl()}updateImpl(){let e=this.ctrlsService.get("center");if(!e||this.columnAnimationService.isActive())return;let t={horizontalScrollShowing:e.isHorizontalScrollShowing(),verticalScrollShowing:this.isVerticalScrollShowing()};this.setScrollsVisible(t)}setScrollsVisible(e){if(this.horizontalScrollShowing!==e.horizontalScrollShowing||this.verticalScrollShowing!==e.verticalScrollShowing){this.horizontalScrollShowing=e.horizontalScrollShowing,this.verticalScrollShowing=e.verticalScrollShowing;let t={type:tP.EVENT_SCROLL_VISIBILITY_CHANGED};this.eventService.dispatchEvent(t)}}isHorizontalScrollShowing(){return this.horizontalScrollShowing}isVerticalScrollShowing(){return this.verticalScrollShowing}};K([eB("ctrlsService")],nB.prototype,"ctrlsService",2),K([eB("columnAnimationService")],nB.prototype,"columnAnimationService",2),K([eV],nB.prototype,"postConstruct",1),nB=K([ek("scrollVisibleService")],nB);var nW=class extends tR{constructor(){super(...arguments),this.gridInstanceId=nW.gridInstanceSequence.next()}stampTopLevelGridCompWithGridInstance(e){e[nW.GRID_DOM_KEY]=this.gridInstanceId}getRenderedCellForEvent(e){return tv(this.gos,e.target,nS.DOM_DATA_KEY_CELL_CTRL)}isEventFromThisGrid(e){return this.isElementInThisGrid(e.target)}isElementInThisGrid(e){let t=e;for(;t;){let e=t[nW.GRID_DOM_KEY];if(q(e))return e===this.gridInstanceId;t=t.parentElement}return!1}getCellPositionForEvent(e){let t=this.getRenderedCellForEvent(e);return t?t.getCellPosition():null}getNormalisedPosition(e){let t,i;let s=this.gos.isDomLayout("normal");if(null!=e.clientX||null!=e.clientY?(t=e.clientX,i=e.clientY):(t=e.x,i=e.y),s){let e=this.ctrlsService.getGridBodyCtrl(),s=e.getScrollFeature
151().getVScrollPosition();t+=e.getScrollFeature().getHScrollPosition().left,i+=s.top}return{x:t,y:i}}};nW.gridInstanceSequence=new sZ,nW.GRID_DOM_KEY="__ag_grid_instance",K([eB("ctrlsService")],nW.prototype,"ctrlsService",2),nW=K([ek("mouseEventService")],nW);var nU=class extends tR{constructor(){super(),this.onPageDown=eF(this.onPageDown,100),this.onPageUp=eF(this.onPageUp,100)}postConstruct(){this.ctrlsService.whenReady(e=>{this.gridBodyCon=e.gridBodyCtrl})}handlePageScrollingKey(e,t=!1){let i=e.key,s=e.altKey,o=e.ctrlKey||e.metaKey,r=!!this.rangeService&&e.shiftKey,n=this.mouseEventService.getCellPositionForEvent(e),l=!1;switch(i){case sk.PAGE_HOME:case sk.PAGE_END:o||s||(this.onHomeOrEndKey(i),l=!0);break;case sk.LEFT:case sk.RIGHT:case sk.UP:case sk.DOWN:if(!n)return!1;!o||s||r||(this.onCtrlUpDownLeftRight(i,n),l=!0);break;case sk.PAGE_DOWN:case sk.PAGE_UP:o||s||(l=this.handlePageUpDown(i,n,t))}return l&&e.preventDefault(),l}handlePageUpDown(e,t,i){return i&&(t=this.focusService.getFocusedCell()),!!t&&(e===sk.PAGE_UP?this.onPageUp(t):this.onPageDown(t),!0)}navigateTo(e){var t;let{scrollIndex:i,scrollType:s,scrollColumn:o,focusIndex:r,focusColumn:n}=e;q(o)&&!o.isPinned()&&this.gridBodyCon.getScrollFeature().ensureColumnVisible(o),q(i)&&this.gridBodyCon.getScrollFeature().ensureIndexVisible(i,s),e.isAsync||this.gridBodyCon.getScrollFeature().ensureIndexVisible(r),this.focusService.setFocusedCell({rowIndex:r,column:n,rowPinned:null,forceBrowserFocus:!0}),null==(t=this.rangeService)||t.setRangeToCell({rowIndex:r,rowPinned:null,column:n})}onPageDown(e){let t=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition(),i=this.getViewportHeight(),s=this.paginationProxy.getPixelOffset(),o=t.top+i,r=this.paginationProxy.getRowIndexAtPixel(o+s);this.columnModel.isAutoRowHeightActive()?this.navigateToNextPageWithAutoHeight(e,r):this.navigateToNextPage(e,r)}onPageUp(e){let t=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition(),i=this.paginationProxy.getPixelOffset(),s=t.top,o=this.paginationProxy.getRowIndexAtPixel(s+i);this.columnModel.isAutoRowHeightActive()?this.navigateToNextPageWithAutoHeight(e,o,!0):this.navigateToNextPage(e,o,!0)}navigateToNextPage(e,t,i=!1){let s;let o=this.getViewportHeight(),r=this.paginationProxy.getPageFirstRow(),n=this.paginationProxy.getPageLastRow(),l=this.paginationProxy.getPixelOffset(),a=this.paginationProxy.getRow(e.rowIndex),h=i?(null==a?void 0:a.rowHeight)-o-l:o-l,d=(null==a?void 0:a.rowTop)+h,u=this.paginationProxy.getRowIndexAtPixel(d+l);u===e.rowIndex&&(t=u=e.rowIndex+(i?-1:1)),i?(s="bottom",u<r&&(u=r),t<r&&(t=r)):(s="top",u>n&&(u=n),t>n&&(t=n)),this.isRowTallerThanView(u)&&(t=u,s="top"),this.navigateTo({scrollIndex:t,scrollType:s,scrollColumn:null,focusIndex:u,focusColumn:e.column})}navigateToNextPageWithAutoHeight(e,t,i=!1){this.navigateTo({scrollIndex:t,scrollType:i?"bottom":"top",scrollColumn:null,focusIndex:t,focusColumn:e.column}),setTimeout(()=>{let s=this.getNextFocusIndexForAutoHeight(e,i);this.navigateTo({scrollIndex:t,scrollType:i?"bottom":"top",scrollColumn:null,focusIndex:s,focusColumn:e.column,isAsync:!0})},50)}getNextFocusIndexForAutoHeight(e,t=!1){var i;let s=t?-1:1,o=this.getViewportHeight(),r=this.paginationProxy.getPageLastRow(),n=0,l=e.rowIndex;for(;l>=0&&l<=r;){let e=this.paginationProxy.getRow(l);if(e){let t=null!=(i=e.rowHeight)?i:0;if(n+t>o)break;n+=t}l+=s}return Math.max(0,Math.min(l,r))}getViewportHeight(){let{gridBodyCtrl:e,center:t}=this.ctrlsService.getParams(),i=e.getScrollFeature().getVScrollPosition(),s=this.gos.getScrollbarWidth(),o=i.bottom-i.top;return t.isHorizontalScrollShowing()&&(o-=s),o}isRowTallerThanView(e){let t=this.paginationProxy.getRow(e);if(!t)return!1;let i=t.rowHeight;return"number"==typeof i&&i>this.getViewportHeight()}onCtrlUpDownLeftRight(e,t){let{rowIndex:i,column:s}=this.cellNavigationService.getNextCellToFocus(e,t,!0);this.navigateTo({scrollIndex:i,scrollType:null,scrollColumn:s,focusIndex:i,focusColumn:s})}onHomeOrEndKey(e){let t=e===sk.PAGE_HOME,i=this.columnModel.getAllDisplayedColumns(),s=t?i[0]:e5(i),o=t?this.paginationProxy.getPageFirstRow():this.paginationProxy.getPageLastRow();
151this.navigateTo({scrollIndex:o,scrollType:null,scrollColumn:s,focusIndex:o,focusColumn:s})}onTabKeyDown(e,t){let i=t.shiftKey,s=this.tabToNextCellCommon(e,i,t);if(!1!==s){s&&t.preventDefault();return}if(i){let{rowIndex:i,rowPinned:s}=e.getRowPosition();(s?0===i:i===this.paginationProxy.getPageFirstRow())&&(0===this.gos.get("headerHeight")||this.gos.get("suppressHeaderFocus")?this.focusService.focusNextGridCoreContainer(!0,!0):(t.preventDefault(),this.focusService.focusPreviousFromFirstCell(t)))}else e instanceof nS&&e.focusCell(!0),this.focusService.focusNextGridCoreContainer(i)&&t.preventDefault()}tabToNextCell(e,t){let i=this.focusService.getFocusedCell();if(!i)return!1;let s=this.getCellByPosition(i);return!!(s||(s=this.rowRenderer.getRowByPosition(i))&&s.isFullWidth())&&!!this.tabToNextCellCommon(s,e,t)}tabToNextCellCommon(e,t,i){let s,o=e.isEditing();if(!o&&e instanceof nS){let t=e.getRowCtrl();t&&(o=t.isEditing())}return null===(s=o?"fullRow"===this.gos.get("editType")?this.moveToNextEditingRow(e,t,i):this.moveToNextEditingCell(e,t,i):this.moveToNextCellNotEditing(e,t))?s:s||!!this.focusService.getFocusedHeader()}moveToNextEditingCell(e,t,i=null){let s=e.getCellPosition();e.getGui().focus(),e.stopEditing();let o=this.findNextCellToFocusOn(s,t,!0);return!1===o?null:null!=o&&(o.startEditing(null,!0,i),o.focusCell(!1),!0)}moveToNextEditingRow(e,t,i=null){let s=e.getCellPosition(),o=this.findNextCellToFocusOn(s,t,!0);if(!1===o)return null;if(null==o)return!1;let r=o.getCellPosition(),n=this.isCellEditable(s),l=this.isCellEditable(r),a=r&&s.rowIndex===r.rowIndex&&s.rowPinned===r.rowPinned;return n&&e.setFocusOutOnEditor(),a||(e.getRowCtrl().stopEditing(),o.getRowCtrl().startRowEditing(void 0,void 0,i)),l?(o.setFocusInOnEditor(),o.focusCell()):o.focusCell(!0),!0}moveToNextCellNotEditing(e,t){let i;let s=this.columnModel.getAllDisplayedColumns();i=e instanceof nD?W(B({},e.getRowPosition()),{column:t?s[0]:e5(s)}):e.getCellPosition();let o=this.findNextCellToFocusOn(i,t,!1);if(!1===o)return null;if(o instanceof nS)o.focusCell(!0);else if(o)return this.tryToFocusFullWidthRow(o.getRowPosition(),t);return q(o)}findNextCellToFocusOn(e,t,i){var s;let o=e;for(;;){e!==o&&(e=o),t||(o=this.getLastCellOfColSpan(o)),o=this.cellNavigationService.getNextTabbedCell(o,t);let r=this.gos.getCallback("tabToNextCell");if(q(r)){let s=r({backwards:t,editing:i,previousCellPosition:e,nextCellPosition:o||null});if(!0===s||null===s)null===s&&ew("Returning `null` from tabToNextCell is deprecated. Return `true` to stay on the current cell, or `false` to let the browser handle the tab behaviour."),o=e;else{if(!1===s)return!1;s.floating&&(ew("tabToNextCellFunc return type should have attributes: rowIndex, rowPinned, column. However you had 'floating', maybe you meant 'rowPinned'?"),s.rowPinned=s.floating),o={rowIndex:s.rowIndex,column:s.column,rowPinned:s.rowPinned}}}if(!o)return null;if(o.rowIndex<0){let e=this.headerNavigationService.getHeaderRowCount();return this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:e+o.rowIndex,column:o.column},fromCell:!0}),null}let n="fullRow"===this.gos.get("editType");if(i&&!n&&!this.isCellEditable(o))continue;this.ensureCellVisible(o);let l=this.getCellByPosition(o);if(!l){let e=this.rowRenderer.getRowByPosition(o);if(!e||!e.isFullWidth()||i)continue;return e}if(!l.isSuppressNavigable())return null==(s=this.rangeService)||s.setRangeToCell(o),l}}isCellEditable(e){let t=this.lookupRowNodeForCell(e);return!!t&&e.column.isCellEditable(t)}getCellByPosition(e){let t=this.rowRenderer.getRowByPosition(e);return t?t.getCellCtrl(e.column):null}lookupRowNodeForCell(e){return"top"===e.rowPinned?this.pinnedRowModel.getPinnedTopRow(e.rowIndex):"bottom"===e.rowPinned?this.pinnedRowModel.getPinnedBottomRow(e.rowIndex):this.paginationProxy.getRow(e.rowIndex)}navigateToNextCell(e,t,i,s){let o=i,r=!1;for(;o&&(o===i||!this.isValidNavigateCell(o));)this.gos.get("enableRtl")?t===sk.LEFT&&(o=this.getLastCellOfColSpan(o)):t===sk.RIGHT&&(o=this.getLastCellOfColSpan(o)),r=Q(o=this.cellNavigationService.getNextCellToFocus(t,o));if(r&&e&&e.key===sk.UP&&(o={rowIndex:-1,rowPinned:null,column:i.column}),s){let s=this.gos.getCallback("navigateToNextCell");if(q(s)){let r=s({key:t,previousCellPosition:i,nextCellPosition:o||null,event:e});q(r)?(r.floating&&(ew("tabToNextCellFunc return type should have attributes: rowIndex, rowPinned, column. However you had 'floating', maybe you meant 'rowPinned'?"),r.rowPinned=r.floating),o={rowPinned:r.rowPinned,rowIndex:r.rowIndex,column:r.column}):o=null}}if(!o)return;if(o.rowIndex<0){let t=this.headerNavigationService.getHeaderRowCount();this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:t+o.rowIndex,column:i.column},event:e||void 0,fromCell:!0});return}let n=this.getNormalisedPosition(o);n?this.focusPosition(n):this.tryToFocusFullWidthRow(o)}getNormalisedPosition(e){this.ensureCellVisible(e);let t=this.getCellByPosition(e);return t?(e=t.getCellPosition(),this.ensureCellVisible(e),e):null}tryToFocusFullWidthRow(e,t=!1){let i=this.columnModel.getAllDisplayedColumns(),s=this.rowRenderer.getRowByPosition(e);if(!s||!s.isFullWidth())return!1;let o=this.focusService.getFocusedCell(),r={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(t?e5(i):i[0])};this.focusPosition(r);let n=null!=o&&this.rowPositionUtils.before(r,o),l={type:tP.EVENT_FULL_WIDTH_ROW_FOCUSED,rowIndex:r.rowIndex,rowPinned:r.rowPinned,column:r.column,isFullWidthCell:!0,floating:r.rowPinned,fromBelow:n};return this.eventService.dispatchEvent(l),!0}focusPosition(e){var t;this.focusService.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0}),null==(t=this.rangeService)||t.setRangeToCell(e)}isValidNavigateCell(e){return!!this.rowPositionUtils.getRowNode(e)}getLastCellOfColSpan(e){let t=this.getCellByPosition(e);if(!t)return e;
151let i=t.getColSpanningList();return 1===i.length?e:{rowIndex:e.rowIndex,column:e5(i),rowPinned:e.rowPinned}}ensureCellVisible(e){let t=this.gos.isGroupRowsSticky(),i=this.rowModel.getRow(e.rowIndex);!(t&&(null==i?void 0:i.sticky))&&Q(e.rowPinned)&&this.gridBodyCon.getScrollFeature().ensureIndexVisible(e.rowIndex),e.column.isPinned()||this.gridBodyCon.getScrollFeature().ensureColumnVisible(e.column)}};K([eB("mouseEventService")],nU.prototype,"mouseEventService",2),K([eB("paginationProxy")],nU.prototype,"paginationProxy",2),K([eB("focusService")],nU.prototype,"focusService",2),K([eB("columnModel")],nU.prototype,"columnModel",2),K([eB("rowModel")],nU.prototype,"rowModel",2),K([eB("ctrlsService")],nU.prototype,"ctrlsService",2),K([eB("rowRenderer")],nU.prototype,"rowRenderer",2),K([eB("headerNavigationService")],nU.prototype,"headerNavigationService",2),K([eB("rowPositionUtils")],nU.prototype,"rowPositionUtils",2),K([eB("cellNavigationService")],nU.prototype,"cellNavigationService",2),K([eB("pinnedRowModel")],nU.prototype,"pinnedRowModel",2),K([eW("rangeService")],nU.prototype,"rangeService",2),K([eV],nU.prototype,"postConstruct",1),nU=K([ek("navigationService")],nU);var nz=class e extends o1{constructor(e){super('<div class="ag-popup-editor" tabindex="-1"/>'),this.params=e}postConstruct(){this.gos.setDomData(this.getGui(),e.DOM_KEY_POPUP_EDITOR_WRAPPER,!0),this.addKeyDownListener()}addKeyDownListener(){let e=this.getGui(),t=this.params;this.addManagedListener(e,"keydown",e=>{sW(this.gos,e,t.node,t.column,!0)||t.onKeyDown(e)})}};nz.DOM_KEY_POPUP_EDITOR_WRAPPER="popupEditorWrapper",K([eV],nz.prototype,"postConstruct",1);var nK=nz,n$=class extends s9{constructor(e,t,i,s,o){super(),this.rendererVersion=0,this.editorVersion=0,this.beans=e,this.column=t.getColumn(),this.rowNode=t.getRowNode(),this.rowCtrl=t.getRowCtrl(),this.eRow=s,this.cellCtrl=t;let r=document.createElement("div");r.setAttribute("comp-id",`${this.getCompId()}`),this.setTemplateFromElement(r);let n=this.getGui();this.forceWrapper=t.isForceWrapper(),this.refreshWrapper(!1);let l=(e,t)=>{null!=t&&""!=t?n.setAttribute(e,t):n.removeAttribute(e)};t4(n,t.getCellAriaRole()),l("col-id",t.getColumnIdSanitised());let a=t.getTabIndex();void 0!==a&&l("tabindex",a.toString()),t.setComp({addOrRemoveCssClass:(e,t)=>this.addOrRemoveCssClass(e,t),setUserStyles:e=>sf(n,e),getFocusableElement:()=>this.getFocusableElement(),setIncludeSelection:e=>this.includeSelection=e,setIncludeRowDrag:e=>this.includeRowDrag=e,setIncludeDndSource:e=>this.includeDndSource=e,setRenderDetails:(e,t,i)=>this.setRenderDetails(e,t,i),setEditDetails:(e,t,i)=>this.setEditDetails(e,t,i),getCellEditor:()=>this.cellEditor||null,getCellRenderer:()=>this.cellRenderer||null,getParentOfValue:()=>this.getParentOfValue()},this.getGui(),this.eCellWrapper,i,o)}getParentOfValue(){return this.eCellValue?this.eCellValue:this.eCellWrapper?this.eCellWrapper:this.getGui()}setRenderDetails(e,t,i){if(this.cellEditor&&!this.cellEditorPopupWrapper)return;this.firstRender=null==this.firstRender;let s=this.refreshWrapper(!1);this.refreshEditStyles(!1),e?!(i||s)&&this.refreshCellRenderer(e)||(this.destroyRenderer(),this.createCellRendererInstance(e)):(this.destroyRenderer(),this.insertValueWithoutCellRenderer(t))}setEditDetails(e,t,i){e?this.createCellEditorInstance(e,t,i):this.destroyEditor()}removeControls(){this.checkboxSelectionComp=this.beans.context.destroyBean(this.checkboxSelectionComp),this.dndSourceComp=this.beans.context.destroyBean(this.dndSourceComp),this.rowDraggingComp=this.beans.context.destroyBean(this.rowDraggingComp)}refreshWrapper(e){let t=this.includeRowDrag||this.includeDndSource||this.includeSelection,i=t||this.forceWrapper,s=i&&null==this.eCellWrapper;if(s){let e=document.createElement("div");e.setAttribute("role","presentation"),e.setAttribute("class","ag-cell-wrapper"),this.eCellWrapper=e,this.getGui().appendChild(this.eCellWrapper)}let o=!i&&null!=this.eCellWrapper;o&&(su(this.eCellWrapper),this.eCellWrapper=void 0),this.addOrRemoveCssClass("ag-cell-value",!i);let r=!e&&i,n=r&&null==this.eCellValue;if(n){let e=document.createElement("span");e.setAttribute("role","presentation"),e.setAttribute("class","ag-cell-value"),this.eCellValue=e,this.eCellWrapper.appendChild(this.eCellValue)}let l=!r&&null!=this.eCellValue;l&&(su(this.eCellValue),this.eCellValue=void 0);let a=s||o||n||l;
151return a&&this.removeControls(),!e&&t&&this.addControls(),a}addControls(){this.includeRowDrag&&null==this.rowDraggingComp&&(this.rowDraggingComp=this.cellCtrl.createRowDragComp(),this.rowDraggingComp&&this.eCellWrapper.insertBefore(this.rowDraggingComp.getGui(),this.eCellValue)),this.includeDndSource&&null==this.dndSourceComp&&(this.dndSourceComp=this.cellCtrl.createDndSource(),this.eCellWrapper.insertBefore(this.dndSourceComp.getGui(),this.eCellValue)),this.includeSelection&&null==this.checkboxSelectionComp&&(this.checkboxSelectionComp=this.cellCtrl.createSelectionCheckbox(),this.eCellWrapper.insertBefore(this.checkboxSelectionComp.getGui(),this.eCellValue))}createCellEditorInstance(e,t,i){let s=this.editorVersion,o=e.newAgStackInstance();if(!o)return;let{params:r}=e;o.then(e=>this.afterCellEditorCreated(s,e,r,t,i)),Q(this.cellEditor)&&r.cellStartedEdit&&this.cellCtrl.focusCell(!0)}insertValueWithoutCellRenderer(e){let t=this.getParentOfValue();sd(t);let i=null!=e?tV(e,!0):null;null!=i&&(t.textContent=i)}destroyEditorAndRenderer(){this.destroyRenderer(),this.destroyEditor()}destroyRenderer(){let{context:e}=this.beans;this.cellRenderer=e.destroyBean(this.cellRenderer),su(this.cellRendererGui),this.cellRendererGui=null,this.rendererVersion++}destroyEditor(){let{context:e}=this.beans;this.hideEditorPopup&&this.hideEditorPopup(),this.hideEditorPopup=void 0,this.cellEditor=e.destroyBean(this.cellEditor),this.cellEditorPopupWrapper=e.destroyBean(this.cellEditorPopupWrapper),su(this.cellEditorGui),this.cellEditorGui=null,this.editorVersion++}refreshCellRenderer(e){if(null==this.cellRenderer||null==this.cellRenderer.refresh||this.cellRendererClass!==e.componentClass)return!1;let t=this.cellRenderer.refresh(e.params);return!0===t||void 0===t}createCellRendererInstance(e){let t=this.beans.gos.get("suppressAnimationFrame"),i=this.rendererVersion,{componentClass:s}=e,o=()=>{if(this.rendererVersion!==i||!this.isAlive())return;let t=e.newAgStackInstance(),o=this.afterCellRendererCreated.bind(this,i,s);t&&t.then(o)};!t&&this.firstRender?this.beans.animationFrameService.createTask(o,this.rowNode.rowIndex,"createTasksP2"):o()}getCtrl(){return this.cellCtrl}getRowCtrl(){return this.rowCtrl}getCellRenderer(){return this.cellRenderer}getCellEditor(){return this.cellEditor}afterCellRendererCreated(e,t,i){if(!this.isAlive()||e!==this.rendererVersion){this.beans.context.destroyBean(i);return}if(this.cellRenderer=i,this.cellRendererClass=t,this.cellRendererGui=this.cellRenderer.getGui(),null!=this.cellRendererGui){let e=this.getParentOfValue();sd(e),e.appendChild(this.cellRendererGui)}}afterCellEditorCreated(e,t,i,s,o){if(e!==this.editorVersion){this.beans.context.destroyBean(t);return}if(t.isCancelBeforeStart&&t.isCancelBeforeStart()){this.beans.context.destroyBean(t),this.cellCtrl.stopEditing(!0);return}if(!t.getGui){console.warn(`AG Grid: cellEditor for column ${this.column.getId()} is missing getGui() method`),this.beans.context.destroyBean(t);return}this.cellEditor=t,this.cellEditorGui=t.getGui();let r=s||void 0!==t.isPopup&&t.isPopup();r?this.addPopupCellEditor(i,o):this.addInCellEditor(),this.refreshEditStyles(!0,r),t.afterGuiAttached&&t.afterGuiAttached()}refreshEditStyles(e,t){var i;this.addOrRemoveCssClass("ag-cell-inline-editing",e&&!t),this.addOrRemoveCssClass("ag-cell-popup-editing",e&&!!t),this.addOrRemoveCssClass("ag-cell-not-inline-editing",!e||!!t),null==(i=this.rowCtrl)||i.setInlineEditingCss(e)}addInCellEditor(){let e=this.getGui();e.contains(this.beans.gos.getActiveDomElement())&&e.focus(),this.destroyRenderer(),this.refreshWrapper(!0),this.clearParentOfValue(),this.cellEditorGui&&this.getParentOfValue().appendChild(this.cellEditorGui)}addPopupCellEditor(e,t){"fullRow"===this.beans.gos.get("editType")&&console.warn("AG Grid: popup cellEditor does not work with fullRowEdit - you cannot use them both - either turn off fullRowEdit, or stop using popup editors.");let i=this.cellEditor;this.cellEditorPopupWrapper=this.beans.context.createBean(new nK(e));let s=this.cellEditorPopupWrapper.getGui();this.cellEditorGui&&s.appendChild(this.cellEditorGui);let o=this.beans.popupService,r=this.beans.gos.get("stopEditingWhenCellsLoseFocus"),n=null!=t?t:i.getPopupPosition?i.getPopupPosition():"over",l=this.beans.gos.get("enableRtl"),a={ePopup:s,column:this.column,rowNode:this.rowNode,type:"popupCellEditor",eventSource:this.getGui(),position:n,alignSide:l?"right":"left",keepWithinBounds:!0},h=o.positionPopupByComponent.bind(o,a),d=this.beans.localeService.getLocaleTextFunc(),u=o.addPopup({modal:r,eChild:s,closeOnEsc:!0,closedCallback:()=>{this.cellCtrl.onPopupEditorClosed()},anchorToElement:this.getGui(),positionCallback:h,ariaLabel:d("ariaLabelCellEditor","Cell Editor")});u&&(this.hideEditorPopup=u.hideFunc)}detach(){this.eRow.removeChild(this.getGui())}
151destroy(){this.cellCtrl.stopEditing(),this.destroyEditorAndRenderer(),this.removeControls(),super.destroy()}clearParentOfValue(){let e=this.getGui();e.contains(this.beans.gos.getActiveDomElement())&&iO()&&e.focus({preventScroll:!0}),sd(this.getParentOfValue())}},nY=class extends s9{constructor(e,t,i){super(),this.cellComps={},this.beans=t,this.rowCtrl=e;let s=document.createElement("div");s.setAttribute("comp-id",`${this.getCompId()}`),s.setAttribute("style",this.getInitialStyle(i)),this.setTemplateFromElement(s);let o=this.getGui(),r=o.style;this.domOrder=this.rowCtrl.getDomOrder(),t4(o,"row");let n=this.rowCtrl.getTabIndex();null!=n&&o.setAttribute("tabindex",n.toString()),e.setComp({setDomOrder:e=>this.domOrder=e,setCellCtrls:e=>this.setCellCtrls(e),showFullWidth:e=>this.showFullWidth(e),getFullWidthCellRenderer:()=>this.getFullWidthCellRenderer(),addOrRemoveCssClass:(e,t)=>this.addOrRemoveCssClass(e,t),setUserStyles:e=>sf(o,e),setTop:e=>r.top=e,setTransform:e=>r.transform=e,setRowIndex:e=>o.setAttribute("row-index",e),setRowId:e=>o.setAttribute("row-id",e),setRowBusinessKey:e=>o.setAttribute("row-business-key",e),refreshFullWidth:e=>this.refreshFullWidth(e)},this.getGui(),i),this.addDestroyFunc(()=>{e.unsetComp(i)})}getInitialStyle(e){let t=this.rowCtrl.getInitialTransform(e);return t?`transform: ${t}`:`top: ${this.rowCtrl.getInitialRowTop(e)}`}showFullWidth(e){let t=e.newAgStackInstance();t&&t.then(e=>{if(this.isAlive()){let t=e.getGui();this.getGui().appendChild(t),this.rowCtrl.setupDetailRowAutoHeight(t),this.setFullWidthRowComp(e)}else this.beans.context.destroyBean(e)})}setCellCtrls(e){let t=Object.assign({},this.cellComps);e.forEach(e=>{let i=e.getInstanceId();null==this.cellComps[i]?this.newCellComp(e):t[i]=null});let i=eu(t).filter(e=>null!=e);this.destroyCells(i),this.ensureDomOrder(e)}ensureDomOrder(e){if(!this.domOrder)return;let t=[];e.forEach(e=>{let i=this.cellComps[e.getInstanceId()];i&&t.push(i.getGui())}),sC(this.getGui(),t)}newCellComp(e){let t=new n$(this.beans,e,this.rowCtrl.isPrintLayout(),this.getGui(),this.rowCtrl.isEditing());this.cellComps[e.getInstanceId()]=t,this.getGui().appendChild(t.getGui())}destroy(){super.destroy(),this.destroyAllCells()}destroyAllCells(){let e=eu(this.cellComps).filter(e=>null!=e);this.destroyCells(e)}setFullWidthRowComp(e){this.fullWidthCellRenderer&&console.error("AG Grid - should not be setting fullWidthRowComponent twice"),this.fullWidthCellRenderer=e,this.addDestroyFunc(()=>{this.fullWidthCellRenderer=this.beans.context.destroyBean(this.fullWidthCellRenderer)})}getFullWidthCellRenderer(){return this.fullWidthCellRenderer}destroyCells(e){e.forEach(e=>{if(!e)return;let t=e.getCtrl().getInstanceId();this.cellComps[t]===e&&(e.detach(),e.destroy(),this.cellComps[t]=null)})}refreshFullWidth(e){let{fullWidthCellRenderer:t}=this;if(!t||!t.refresh)return!1;let i=e();return t.refresh(i)}},nj=class extends s9{constructor(){super(function(){let e=s9.elementGettingCreated.getAttribute("name"),t=nV.getRowContainerCssClasses(e);return"center"===e||"topCenter"===e||"stickyTopCenter"===e||"bottomCenter"===e||"stickyBottomCenter"===e?`<div class="${t.viewport}" ref="eViewport" role="presentation">
152                <div class="${t.container}" ref="eContainer"></div>
153            </div>`:`<div class="${t.container}" ref="eContainer"></div>`}()),this.rowComps={},this.name=s9.elementGettingCreated.getAttribute("name"),this.type=nG(this.name)}postConstruct(){this.createManagedBean(new nV(this.name)).setComp({setViewportHeight:e=>this.eViewport.style.height=e,setRowCtrls:({rowCtrls:e})=>this.setRowCtrls(e),setDomOrder:e=>{this.domOrder=e},setContainerWidth:e=>this.eContainer.style.width=e},this.eContainer,this.eViewport)}preDestroy(){this.setRowCtrls([])}setRowCtrls(e){let t=B({},this.rowComps);this.rowComps={},this.lastPlacedElement=null,e.forEach(e=>{let i=e.getInstanceId(),s=t[i];if(s)this.rowComps[i]=s,delete t[i],this.ensureDomOrder(s.getGui());else{if(!e.getRowNode().displayed)return;let t=new nY(e,this.beans,this.type);this.rowComps[i]=t,this.appendRow(t.getGui())}}
153),eu(t).forEach(e=>{this.eContainer.removeChild(e.getGui()),e.destroy()}),t4(this.eContainer,"rowgroup")}appendRow(e){this.domOrder?sv(this.eContainer,e,this.lastPlacedElement):this.eContainer.appendChild(e),this.lastPlacedElement=e}ensureDomOrder(e){this.domOrder&&(sm(this.eContainer,e,this.lastPlacedElement),this.lastPlacedElement=e)}};K([eB("beans")],nj.prototype,"beans",2),K([ot("eViewport")],nj.prototype,"eViewport",2),K([ot("eContainer")],nj.prototype,"eContainer",2),K([eV],nj.prototype,"postConstruct",1),K([eH],nj.prototype,"preDestroy",1);var nq=class{constructor(e){this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[],this.pinned=e}onDragEnter(e){if(this.clearColumnsList(),this.gos.get("functionsReadOnly"))return;let t=e.dragItem.columns;t&&t.forEach(e=>{!(!e.isPrimary()||e.isAnyFunctionActive())&&(e.isAllowValue()?this.columnsToAggregate.push(e):e.isAllowRowGroup()?this.columnsToGroup.push(e):e.isAllowPivot()&&this.columnsToPivot.push(e))})}getIconName(){return this.columnsToAggregate.length+this.columnsToGroup.length+this.columnsToPivot.length>0?this.pinned?rn.ICON_PINNED:rn.ICON_MOVE:null}onDragLeave(e){this.clearColumnsList()}clearColumnsList(){this.columnsToAggregate.length=0,this.columnsToGroup.length=0,this.columnsToPivot.length=0}onDragging(e){}onDragStop(e){this.columnsToAggregate.length>0&&this.columnModel.addValueColumns(this.columnsToAggregate,"toolPanelDragAndDrop"),this.columnsToGroup.length>0&&this.columnModel.addRowGroupColumns(this.columnsToGroup,"toolPanelDragAndDrop"),this.columnsToPivot.length>0&&this.columnModel.addPivotColumns(this.columnsToPivot,"toolPanelDragAndDrop")}};K([eB("columnModel")],nq.prototype,"columnModel",2),K([eB("gridOptionsService")],nq.prototype,"gos",2);var nQ=class{static attemptMoveColumns(e){let{isFromHeader:t,hDirection:i,xPosition:s,fromEnter:o,fakeEvent:r,pinned:n,gos:l,columnModel:a}=e,h=1===i,{allMovingColumns:d}=e;if(t){let e=[];d.forEach(t=>{var i;let s=null,o=t.getParent();for(;null!=o&&1===o.getDisplayedLeafColumns().length;)s=o,o=o.getParent();null!=s?((null==(i=s.getColGroupDef())?void 0:i.marryChildren)?s.getProvidedColumnGroup().getLeafColumns():s.getLeafColumns()).forEach(t=>{e.includes(t)||e.push(t)}):e.includes(t)||e.push(t)}),d=e}let u=d.slice();a.sortColumnsLikeGridColumns(u);let c=this.calculateValidMoves({movingCols:u,draggingRight:h,xPosition:s,pinned:n,gos:l,columnModel:a}),p=this.calculateOldIndex(u,a);if(0===c.length)return;let g=c[0],m=null!==p&&!o;if(t&&(m=null!==p),m&&!r&&(0===i&&g>=p||h&&g<=p))return;let C=a.getAllDisplayedColumns(),v=[],f=null;for(let e=0;e<c.length;e++){let t=c[e],i=a.getProposedColumnOrder(u,t);if(!a.doesOrderPassRules(i))continue;let s=i.filter(e=>C.includes(e));if(null===f)f=s;else if(!e4(s,f))break;let o=this.groupFragCount(i);v.push({move:t,fragCount:o})}if(0!==v.length)return v.sort((e,t)=>e.fragCount-t.fragCount),this.moveColumns(d,v[0].move,"uiColumnMoved",!1,a)}static moveColumns(e,t,i,s,o){return o.moveColumns(e,t,i,s),s?null:{columns:e,toIndex:t}}static calculateOldIndex(e,t){let i=t.getAllGridColumns(),s=e8(e.map(e=>i.indexOf(e))),o=s[0];return e5(s)-o!=s.length-1?null:o}static groupFragCount(e){function t(e){let t=[],i=e.getOriginalParent();for(;null!=i;)t.push(i),i=i.getOriginalParent();return t}let i=0;for(let s=0;s<e.length-1;
153s++){let o=t(e[s]),r=t(e[s+1]);[o,r]=o.length>r.length?[o,r]:[r,o],o.forEach(e=>{-1===r.indexOf(e)&&i++})}return i}static getDisplayedColumns(e,t){switch(t){case"left":return e.getDisplayedLeftColumns();case"right":return e.getDisplayedRightColumns();default:return e.getDisplayedCenterColumns()}}static calculateValidMoves(e){let t;let{movingCols:i,draggingRight:s,xPosition:o,pinned:r,gos:n,columnModel:l}=e;if(n.get("suppressMovableColumns")||i.some(e=>e.getColDef().suppressMovable))return[];let a=this.getDisplayedColumns(l,r),h=l.getAllGridColumns(),d=a.filter(e=>tn(i,e)),u=a.filter(e=>!tn(i,e)),c=h.filter(e=>!tn(i,e)),p=0,g=o;if(s){let e=0;d.forEach(t=>e+=t.getActualWidth()),g-=e}if(g>0){for(let e=0;e<u.length&&!((g-=u[e].getActualWidth())<0);e++)p++;s&&p++}if(p>0){let e=u[p-1];t=c.indexOf(e)+1}else -1===(t=c.indexOf(u[0]))&&(t=0);let m=[t],C=(e,t)=>e-t;if(s){let e=t+1,i=h.length-1;for(;e<=i;)m.push(e),e++;m.sort(C)}else{let e=t,i=h.length-1,s=h[e];for(;e<=i&&0>a.indexOf(s);)e++,m.push(e),s=h[e];for(e=t-1;e>=0;)m.push(e),e--;m.sort(C).reverse()}return m}static normaliseX(e,t,i,s,o){let r=o.getHeaderRowContainerCtrl(t).getViewport();return i&&(e-=r.getBoundingClientRect().left),s.get("enableRtl")&&(e=r.clientWidth-e),null==t&&(e+=o.get("center").getCenterViewportScrollLeft()),e}},nX=class{constructor(e){this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.pinned=e,this.isCenterContainer=!q(e)}init(){this.ctrlsService.whenReady(e=>{this.gridBodyCon=e.gridBodyCtrl})}getIconName(){return this.pinned?rn.ICON_PINNED:rn.ICON_MOVE}onDragEnter(e){let t=e.dragItem.columns;if(0===e.dragSource.type)this.setColumnsVisible(t,!0,"uiColumnDragged");else{let i=e.dragItem.visibleState,s=(t||[]).filter(e=>i[e.getId()]);this.setColumnsVisible(s,!0,"uiColumnDragged")}this.setColumnsPinned(t,this.pinned,"uiColumnDragged"),this.onDragging(e,!0,!0)}onDragLeave(){this.ensureIntervalCleared(),this.lastMovedInfo=null}setColumnsVisible(e,t,i){if(e){let s=e.filter(e=>!e.getColDef().lockVisible);this.columnModel.setColumnsVisible(s,t,i)}}setColumnsPinned(e,t,i){if(e){let s=e.filter(e=>!e.getColDef().lockPinned);this.columnModel.setColumnsPinned(s,t,i)}}onDragStop(){this.onDragging(this.lastDraggingEvent,!1,!0,!0),this.ensureIntervalCleared(),this.lastMovedInfo=null}checkCenterForScrolling(e){if(this.isCenterContainer){let t=this.ctrlsService.get("center"),i=t.getCenterViewportScrollLeft(),s=i+t.getCenterWidth();this.gos.get("enableRtl")?(this.needToMoveRight=e<i+50,this.needToMoveLeft=e>s-50):(this.needToMoveLeft=e<i+50,this.needToMoveRight=e>s-50),this.needToMoveLeft||this.needToMoveRight?this.ensureIntervalStarted():this.ensureIntervalCleared()}}onDragging(e=this.lastDraggingEvent,t=!1,i=!1,s=!1){var o;if(s){if(this.lastMovedInfo){let{columns:e,toIndex:t}=this.lastMovedInfo;nQ.moveColumns(e,t,"uiColumnMoved",!0,this.columnModel)}return}if(this.lastDraggingEvent=e,Q(e.hDirection))return;let r=nQ.normaliseX(e.x,this.pinned,!1,this.gos,this.ctrlsService);t||this.checkCenterForScrolling(r);let n=this.normaliseDirection(e.hDirection),l=e.dragSource.type,a=(null==(o=e.dragSource.getDragItem().columns)?void 0:o.filter(e=>!e.getColDef().lockPinned||e.getPinned()==this.pinned))||[],h=nQ.attemptMoveColumns({allMovingColumns:a,isFromHeader:1===l,hDirection:n,xPosition:r,pinned:this.pinned,fromEnter:t,fakeEvent:i,gos:this.gos,columnModel:this.columnModel});h&&(this.lastMovedInfo=h)}normaliseDirection(e){if(!this.gos.get("enableRtl"))return e;switch(e){case 0:return 1;case 1:return 0;default:console.error(`AG Grid: Unknown direction ${e}`)}}ensureIntervalStarted(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),100),this.needToMoveLeft?this.dragAndDropService.setGhostIcon(rn.ICON_LEFT,!0):this.dragAndDropService.setGhostIcon(rn.ICON_RIGHT,!0))}ensureIntervalCleared(){this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.dragAndDropService.setGhostIcon(rn.ICON_MOVE))}moveInterval(){let e;this.intervalCount++,(e=10+5*this.intervalCount)>100&&(e=100);
153let t=null,i=this.gridBodyCon.getScrollFeature();if(this.needToMoveLeft?t=i.scrollHorizontally(-e):this.needToMoveRight&&(t=i.scrollHorizontally(e)),0!==t)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{this.failedMoveAttempts++;let e=this.lastDraggingEvent.dragItem.columns.filter(e=>!e.getColDef().lockPinned);if(e.length>0&&(this.dragAndDropService.setGhostIcon(rn.ICON_PINNED),this.failedMoveAttempts>7)){let t=this.needToMoveLeft?"left":"right";this.setColumnsPinned(e,t,"uiColumnDragged"),this.dragAndDropService.nudge()}}}};K([eB("columnModel")],nX.prototype,"columnModel",2),K([eB("dragAndDropService")],nX.prototype,"dragAndDropService",2),K([eB("gridOptionsService")],nX.prototype,"gos",2),K([eB("ctrlsService")],nX.prototype,"ctrlsService",2),K([eV],nX.prototype,"init",1);var nJ=class extends tR{constructor(e,t){super(),this.pinned=e,this.eContainer=t}postConstruct(){this.ctrlsService.whenReady(e=>{switch(this.pinned){case"left":this.eSecondaryContainers=[[e.gridBodyCtrl.getBodyViewportElement(),e.left.getContainerElement()],[e.bottomLeft.getContainerElement()],[e.topLeft.getContainerElement()]];break;case"right":this.eSecondaryContainers=[[e.gridBodyCtrl.getBodyViewportElement(),e.right.getContainerElement()],[e.bottomRight.getContainerElement()],[e.topRight.getContainerElement()]];break;default:this.eSecondaryContainers=[[e.gridBodyCtrl.getBodyViewportElement(),e.center.getViewportElement()],[e.bottomCenter.getViewportElement()],[e.topCenter.getViewportElement()]]}})}isInterestedIn(e){return 1===e||0===e&&this.gos.get("allowDragFromColumnsToolPanel")}getSecondaryContainers(){return this.eSecondaryContainers}getContainer(){return this.eContainer}init(){this.moveColumnFeature=this.createManagedBean(new nX(this.pinned)),this.bodyDropPivotTarget=this.createManagedBean(new nq(this.pinned)),this.dragAndDropService.addDropTarget(this)}getIconName(){return this.currentDropListener.getIconName()}isDropColumnInPivotMode(e){return this.columnModel.isPivotMode()&&0===e.dragSource.type}onDragEnter(e){this.currentDropListener=this.isDropColumnInPivotMode(e)?this.bodyDropPivotTarget:this.moveColumnFeature,this.currentDropListener.onDragEnter(e)}onDragLeave(e){this.currentDropListener.onDragLeave(e)}onDragging(e){this.currentDropListener.onDragging(e)}onDragStop(e){this.currentDropListener.onDragStop(e)}};K([eB("dragAndDropService")],nJ.prototype,"dragAndDropService",2),K([eB("columnModel")],nJ.prototype,"columnModel",2),K([eB("ctrlsService")],nJ.prototype,"ctrlsService",2),K([eV],nJ.prototype,"postConstruct",1),K([eV],nJ.prototype,"init",1);var nZ=class e extends r9{constructor(t){super(e.TEMPLATE,t),this.headerCompVersion=0,this.column=t.getColumnGroupChild(),this.pinned=t.getPinned()}postConstruct(){var e,t;let i=this.getGui();e="col-id",null!=(t=this.column.getColId())&&""!=t?i.setAttribute(e,t):i.removeAttribute(e),this.ctrl.
153setComp({setWidth:e=>i.style.width=e,addOrRemoveCssClass:(e,t)=>this.addOrRemoveCssClass(e,t),setAriaSort:e=>e?iy(i,e):iR(i),setUserCompDetails:e=>this.setUserCompDetails(e),getUserCompInstance:()=>this.headerComp},this.getGui(),this.eResize,this.eHeaderCompWrapper);let s=this.ctrl.getSelectAllGui();this.eResize.insertAdjacentElement("afterend",s)}destroyHeaderComp(){this.headerComp&&(this.eHeaderCompWrapper.removeChild(this.headerCompGui),this.headerComp=this.destroyBean(this.headerComp),this.headerCompGui=void 0)}setUserCompDetails(e){this.headerCompVersion++;let t=this.headerCompVersion;e.newAgStackInstance().then(e=>this.afterCompCreated(t,e))}afterCompCreated(e,t){if(e!=this.headerCompVersion||!this.isAlive()){this.destroyBean(t);return}this.destroyHeaderComp(),this.headerComp=t,this.headerCompGui=t.getGui(),this.eHeaderCompWrapper.appendChild(this.headerCompGui),this.ctrl.setDragSource(this.getGui())}};nZ.TEMPLATE=`<div class="ag-header-cell" role="columnheader">
154            <div ref="eResize" class="ag-header-cell-resize" role="presentation"></div>
155            <div ref="eHeaderCompWrapper" class="ag-header-cell-comp-wrapper" role="presentation"></div>
156        </div>`,K([ot("eResize")],nZ.prototype,"eResize",2),K([ot("eHeaderCompWrapper")],nZ.prototype,"eHeaderCompWrapper",2),K([eV],nZ.prototype,"postConstruct",1),K([eH],nZ.prototype,"destroyHeaderComp",1);var n0=class e extends r9{constructor(t){super(e.TEMPLATE,t)}postConstruct(){let e=this.getGui(),t=(t,i)=>void 0!=i?e.setAttribute(t,i):e.removeAttribute(t);e.setAttribute("col-id",this.ctrl.getColId()),this.ctrl.setComp({addOrRemoveCssClass:(e,t)=>this.addOrRemoveCssClass(e,t),setResizableDisplayed:e=>i8(this.eResize,e),setWidth:t=>e.style.width=t,setAriaExpanded:e=>t("aria-expanded",e),setUserCompDetails:e=>this.setUserCompDetails(e),getUserCompInstance:()=>this.headerGroupComp},e,this.eResize)}setUserCompDetails(e){e.newAgStackInstance().then(e=>this.afterHeaderCompCreated(e))}afterHeaderCompCreated(e){let t=()=>this.destroyBean(e);if(!this.isAlive()){t();return}let i=this.getGui(),s=e.getGui();i.appendChild(s),this.addDestroyFunc(t),this.headerGroupComp=e,this.ctrl.setDragSource(i)}};n0.TEMPLATE=`<div class="ag-header-group-cell" role="columnheader">
157            <div ref="eResize" class="ag-header-cell-resize" role="presentation"></div>
158        </div>`,K([ot("eResize")],n0.prototype,"eResize",2),K([eV],n0.prototype,"postConstruct",1);var n1=((v=n1||{}).COLUMN_GROUP="group",v.COLUMN="column",v.FLOATING_FILTER="filter",v),n2=class extends s9{constructor(e){super(),this.headerComps={},this.ctrl=e,this.setTemplate(`<div class="${this.ctrl.getHeaderRowClass()}" role="row"></div>`)}init(){iv(this.getGui(),this.ctrl.getAriaRowIndex()),this.ctrl.setComp({setHeight:e=>this.getGui().style.height=e,setTop:e=>this.getGui().style.top=e,setHeaderCtrls:(e,t)=>this.setHeaderCtrls(e,t),setWidth:e=>this.getGui().style.width=e})}destroyHeaderCtrls(){this.setHeaderCtrls([],!1)}setHeaderCtrls(e,t){if(!this.isAlive())return;let i=this.headerComps;if(this.headerComps={},e.forEach(e=>{let t=e.getInstanceId(),s=i[t];delete i[t],null==s&&(s=this.createHeaderComp(e),this.getGui().appendChild(s.getGui())),this.headerComps[t]=s}),ea(i,(e,t)=>{this.getGui().removeChild(t.getGui()),this.destroyBean(t)}),t){let e=eu(this.headerComps);e.sort((e,t)=>e.getCtrl().getColumnGroupChild().getLeft()-t.getCtrl().getColumnGroupChild().getLeft());let t=e.map(e=>e.getGui());sC(this.getGui(),t)}}createHeaderComp(e){let t;switch(this.ctrl.getType()){case"group":t=new n0(e);break;case"filter":t=new nt(e);break;default:t=new nZ(e)}return this.createBean(t),t.setParentComponent(this),t}};K([eV],n2.prototype,"init",1),K([eH],n2.prototype,"destroyHeaderCtrls",1);var n3=0,n5=class e extends tR{constructor(e,t,i){super(),this.resizeToggleTimeout=0,this.resizeMultiplier=1,this.resizeFeature=null,this.lastFocusEvent=null,this.dragSource=null,this.columnGroupChild=e,this.parentRowCtrl=i,this.beans=t,this.instanceId=e.getUniqueId()+"-"+n3++}postConstruct(){this.addManagedPropertyListeners(["suppressHeaderFocus"],()=>this.refreshTabIndex())}shouldStopEventPropagation(e){let{headerRowIndex:t,column:i}=this.focusService.getFocusedHeader();return sU(this.gos,e,t,i)}getWrapperHasFocus(){return this.gos.getActiveDomElement()===this.eGui}setGui(e){this.eGui=e,this.addDomData(),this.addManagedListener(this.beans.eventService,tP.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.onDisplayedColumnsChanged(),this.refreshTabIndex()}onDisplayedColumnsChanged(){this.comp&&this.column&&(this.refreshFirstAndLastStyles(),this.refreshAriaColIndex())}refreshFirstAndLastStyles(){let{comp:e,column:t,beans:i}=this;nf.refreshFirstAndLastStyles(e,t,i.columnModel)}refreshAriaColIndex(){let{beans:e,column:t}=this,i=e.columnModel.getAriaColumnIndex(t);iE(this.eGui,i)}addResizeAndMoveKeyboardListeners(){this.resizeFeature&&(this.addManagedListener(this.eGui,"keydown",this.onGuiKeyDown.bind(this)),this.addManagedListener(this.eGui,"keyup",this.onGuiKeyUp.bind(this)))}refreshTabIndex(){this.gos.get("suppressHeaderFocus")?this.eGui.removeAttribute("tabindex"):this.eGui.setAttribute("tabindex","-1")}onGuiKeyDown(e){var t;let i=this.gos.getActiveDomElement(),s=e.key===sk.LEFT||e.key===sk.RIGHT;if(this.isResizing&&(e.preventDefault(),e.stopImmediatePropagation()),i!==this.eGui||!e.shiftKey&&!e.altKey||((this.isResizing||s)&&(e.preventDefault(),e.stopImmediatePropagation()),!s))return;let o=ro[e.key===sk.LEFT!==this.gos.get("enableRtl")?"Left":"Right"];if(e.altKey){this.isResizing=!0,this.resizeMultiplier+=1;let i=this.getViewportAdjustedResizeDiff(e);this.resizeHeader(i,e.shiftKey),null==(t=this.resizeFeature)||t.toggleColumnResizing(!0)}else this.moveHeader(o)}getViewportAdjustedResizeDiff(e){let t=this.getResizeDiff(e);if(this.column.getPinned()){let e=this.pinnedWidthService.getPinnedLeftWidth(),i=this.pinnedWidthService.getPinnedRightWidth(),s=ss(this.ctrlsService.getGridBodyCtrl().getBodyViewportElement())-50;if(e+i+t>
158s){if(!(s>e+i))return 0;t=s-e-i}}return t}getResizeDiff(e){let t=e.key===sk.LEFT!==this.gos.get("enableRtl"),i=this.column.getPinned(),s=this.gos.get("enableRtl");return i&&s!==("right"===i)&&(t=!t),(t?-1:1)*this.resizeMultiplier}onGuiKeyUp(){this.isResizing&&(this.resizeToggleTimeout&&(window.clearTimeout(this.resizeToggleTimeout),this.resizeToggleTimeout=0),this.isResizing=!1,this.resizeMultiplier=1,this.resizeToggleTimeout=setTimeout(()=>{var e;null==(e=this.resizeFeature)||e.toggleColumnResizing(!1)},150))}handleKeyDown(e){let t=this.getWrapperHasFocus();switch(e.key){case sk.PAGE_DOWN:case sk.PAGE_UP:case sk.PAGE_HOME:case sk.PAGE_END:t&&e.preventDefault()}}addDomData(){let t=e.DOM_DATA_KEY_HEADER_CTRL;this.gos.setDomData(this.eGui,t,this),this.addDestroyFunc(()=>this.gos.setDomData(this.eGui,t,null))}getGui(){return this.eGui}focus(e){return!!this.eGui&&(this.lastFocusEvent=e||null,this.eGui.focus(),!0)}getRowIndex(){return this.parentRowCtrl.getRowIndex()}getParentRowCtrl(){return this.parentRowCtrl}getPinned(){return this.parentRowCtrl.getPinned()}getInstanceId(){return this.instanceId}getColumnGroupChild(){return this.columnGroupChild}removeDragSource(){this.dragSource&&(this.dragAndDropService.removeDragSource(this.dragSource),this.dragSource=null)}handleContextMenuMouseEvent(e,t,i){let s=null!=e?e:t;this.gos.get("preventDefaultOnContextMenu")&&s.preventDefault();let o=i instanceof eX?i:void 0;this.menuService.isHeaderContextMenuEnabled(o)&&this.menuService.showHeaderContextMenu(o,e,t),this.dispatchColumnMouseEvent(tP.EVENT_COLUMN_HEADER_CONTEXT_MENU,i)}dispatchColumnMouseEvent(e,t){this.eventService.dispatchEvent({type:e,column:t})}destroy(){super.destroy(),this.removeDragSource(),this.comp=null,this.column=null,this.resizeFeature=null,this.lastFocusEvent=null,this.columnGroupChild=null,this.parentRowCtrl=null,this.eGui=null}};n5.DOM_DATA_KEY_HEADER_CTRL="headerCtrl",K([eB("pinnedWidthService")],n5.prototype,"pinnedWidthService",2),K([eB("focusService")],n5.prototype,"focusService",2),K([eB("userComponentFactory")],n5.prototype,"userComponentFactory",2),K([eB("ctrlsService")],n5.prototype,"ctrlsService",2),K([eB("dragAndDropService")],n5.prototype,"dragAndDropService",2),K([eB("menuService")],n5.prototype,"menuService",2),K([eV],n5.prototype,"postConstruct",1);var n4=n5,n6=class extends tR{constructor(e,t,i,s){super(),this.columnOrGroup=e,this.eCell=t,this.ariaEl=this.eCell.querySelector("[role=columnheader]")||this.eCell,this.colsSpanning=s,this.beans=i}setColsSpanning(e){this.colsSpanning=e,this.onLeftChanged()}getColumnOrGroup(){return this.beans.gos.get("enableRtl")&&this.colsSpanning?e5(this.colsSpanning):this.columnOrGroup}postConstruct(){this.addManagedListener(this.columnOrGroup,eX.EVENT_LEFT_CHANGED,this.onLeftChanged.bind(this)),this.setLeftFirstTime(),this.addManagedListener(this.eventService,tP.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onLeftChanged.bind(this)),this.addManagedPropertyListener("domLayout",this.onLeftChanged.bind(this))}setLeftFirstTime(){let e=this.beans.gos.get("suppressColumnMoveAnimation"),t=q(this.columnOrGroup.getOldLeft());this.beans.columnAnimationService.isActive()&&t&&!e?this.animateInLeft():this.onLeftChanged()}animateInLeft(){let e=this.getColumnOrGroup(),t=e.getLeft(),i=e.getOldLeft(),s=this.modifyLeftForPrintLayout(e,i),o=this.modifyLeftForPrintLayout(e,t);this.setLeft(s),this.actualLeft=o,this.beans.columnAnimationService.executeNextVMTurn(()=>{this.actualLeft===o&&this.setLeft(o)})}onLeftChanged(){let e=this.getColumnOrGroup(),t=e.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(e,t),this.setLeft(this.actualLeft)}modifyLeftForPrintLayout(e,t){if(!this.beans.gos.isDomLayout("print")||"left"===e.getPinned())return t;let i=this.beans.columnModel.getDisplayedColumnsLeftWidth();return"right"===e.getPinned()?i+this.beans.columnModel.getBodyContainerWidth()+t:i+t}setLeft(e){if(q(e)&&(this.eCell.style.left=`${e}px`),this.columnOrGroup instanceof eX)this.columnOrGroup;else{let e=this.columnOrGroup.getLeafColumns();if(!e.length)return;e.length>1&&iS(this.ariaEl,e.length),e[0]}}};K([eV],n6.prototype,"postConstruct",1);var n8=class extends tR{constructor(e,t){super(),this.columns=e,this.element=t}postConstruct(){this.gos.get("columnHoverHighlight")&&this.addMouseHoverListeners()}addMouseHoverListeners(){this.addManagedListener(this.element,"mouseout",this.onMouseOut.bind(this)),this.addManagedListener(this.element,"mouseover",this.onMouseOver.bind(this))}onMouseOut(){this.columnHoverService.clearMouseOver()}onMouseOver(){this.columnHoverService.setMouseOver(this.columns)}};K([eB("columnHoverService")],n8.prototype,"columnHoverService",2),K([eV],n8.prototype,"postConstruct",1);var n7=class extends n4{constructor(e,t,i){super(e,t,i),this.iconCreated=!1,this.column=e}setComp(e,t,i,s){this.comp=e,this.eButtonShowMainFilter=i,this.eFloatingFilterBody=s,this.setGui(t),this.setupActive(),this.setupWidth(),this.setupLeft(),this.setupHover(),this.setupFocus(),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(),this.setupUi(),this.addManagedListener(this.eButtonShowMainFilter,"click",this.showParentFilter.bind(this)),this.setupFilterChangedListener(),this.addManagedListener(this.column,eX.EVENT_COL_DEF_CHANGED,this.onColDefChanged.bind(this))}resizeHeader(){}moveHeader(){}setupActive(){let e=this.column.getColDef(),t=!!e.filter,i=!!e.floatingFilter;this.active=t&&i}setupUi(){if(this.comp.setButtonWrapperDisplayed(!this.suppressFilterButton&&this.active),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-full-body",this.suppressFilterButton),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-body",!this.suppressFilterButton),!this.active||this.iconCreated)return;let e=sV("filter",this.gos,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}setupFocus(){this.createManagedBean(new oa(this.eGui,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))}setupAria(){let e=this.localeService.getLocaleTextFunc();ie(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))}onTabKeyDown(e){if(this.gos.getActiveDomElement()===this.eGui)return;let t=this.focusService.findNextFocusableElement(this.eGui,null,e.shiftKey);if(t){this.beans.headerNavigationService.scrollToColumn(this.column),e.preventDefault(),t.focus();return}let i=this.findNextColumnWithFloatingFilter(e.shiftKey);i&&this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:this.getParentRowCtrl().getRowIndex(),column:i},event:e})&&e.preventDefault()}findNextColumnWithFloatingFilter(e){let t=this.beans.columnModel,i=this.column;do if(!(i=e?t.getDisplayedColBefore(i):t.getDisplayedColAfter(i)))break;while(!i.getColDef().filter||!i.getColDef().floatingFilter);return i}handleKeyDown(e){super.handleKeyDown(e);let t=this.getWrapperHasFocus();switch(e.key){case sk.UP:case sk.DOWN:t||e.preventDefault();case sk.LEFT:case sk.RIGHT:if(t)return;e.stopPropagation();case sk.ENTER:t&&this.focusService.focusInto(this.eGui)&&e.preventDefault();break;case sk.ESCAPE:t||this.eGui.focus()}}onFocusIn(e){if(this.eGui.contains(e.relatedTarget))return;let t=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),i=!!e.relatedTarget&&se(e.relatedTarget,"ag-floating-filter");if(t&&i&&e.target===this.eGui){let e=this.lastFocusEvent,t=!!(e&&e.key===sk.TAB);if(e&&t){let t=e.shiftKey;this.focusService.focusInto(this.eGui,t)}}let s=this.getRowIndex();this.beans.focusService.setFocusedHeader(s,this.column)}setupHover(){this.createManagedBean(new n8([this.column],this.eGui));let e=()=>{if(!this.gos.get("columnHoverHighlight"))return;let e=this.beans.columnHoverService.isHovered(this.column);this.comp.addOrRemoveCssClass("ag-column-hover",e)};this.addManagedListener(this.eventService,tP.EVENT_COLUMN_HOVER_CHANGED,e),e()}setupLeft(){let e=new n6(this.column,this.eGui,this.beans);this.createManagedBean(e)}setupFilterButton(){this.suppressFilterButton=!this.menuService.isFloatingFilterButtonEnabled(this.column),this.highlightFilterButtonWhenActive=!this.menuService.isLegacyMenuEnabled()}setupUserComp(){if(!this.active)return;
158let e=this.beans.filterManager.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter());e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setCompDetails(e)}showParentFilter(){let e=this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter;this.menuService.showFilterMenu({column:this.column,buttonElement:e,containerType:"floatingFilter",positionBy:"button"})}setupSyncWithFilter(){if(!this.active)return;let{filterManager:e}=this.beans,t=t=>{if((null==t?void 0:t.source)==="filterDestroyed"&&this.context.isDestroyed())return;let i=this.comp.getFloatingFilterComp();i&&i.then(i=>{var s;if(i){let o=e.getCurrentFloatingFilterParentModel(this.column);i.onParentModelChanged(o,t?this.gos.addGridCommonParams({columns:null!=(s=t.columns)?s:[],type:tP.EVENT_FILTER_CHANGED,source:"api"===t.source?"api":"columnFilter"}):null)}})};this.destroySyncListener=this.addManagedListener(this.column,eX.EVENT_FILTER_CHANGED,t),e.isFilterActive(this.column)&&t(null)}setupWidth(){let e=()=>{let e=`${this.column.getActualWidth()}px`;this.comp.setWidth(e)};this.addManagedListener(this.column,eX.EVENT_WIDTH_CHANGED,e),e()}setupFilterChangedListener(){this.active&&(this.destroyFilterChangedListener=this.addManagedListener(this.column,eX.EVENT_FILTER_CHANGED,this.updateFilterButton.bind(this)),this.updateFilterButton())}updateFilterButton(){if(!this.suppressFilterButton&&this.comp){let e=this.beans.filterManager.isFilterAllowed(this.column);this.comp.setButtonWrapperDisplayed(e),this.highlightFilterButtonWhenActive&&e&&this.eButtonShowMainFilter.classList.toggle("ag-filter-active",this.column.isFilterActive())}}onColDefChanged(){var e,t;let i=this.active;this.setupActive();let s=!i&&this.active;i&&!this.active&&(null==(e=this.destroySyncListener)||e.call(this),null==(t=this.destroyFilterChangedListener)||t.call(this));let o=this.active?this.beans.filterManager.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter()):null,r=this.comp.getFloatingFilterComp();r&&o?r.then(e=>{var t;!e||this.beans.filterManager.areFilterCompsDifferent(null!=(t=this.userCompDetails)?t:null,o)?this.updateCompDetails(o,s):this.updateFloatingFilterParams(o)}):this.updateCompDetails(o,s)}updateCompDetails(e,t){this.isAlive()&&(this.setCompDetails(e),this.setupFilterButton(),this.setupUi(),t&&(this.setupSyncWithFilter(),this.setupFilterChangedListener()))}updateFloatingFilterParams(e){var t;if(!e)return;let i=e.params;null==(t=this.comp.getFloatingFilterComp())||t.then(e=>{let t=!1;(null==e?void 0:e.refresh)&&"function"==typeof e.refresh&&null!==e.refresh(i)&&(t=!0),!t&&(null==e?void 0:e.onParamsUpdated)&&"function"==typeof e.onParamsUpdated&&null!==e.onParamsUpdated(i)&&ew("Custom floating filter method 'onParamsUpdated' is deprecated. Use 'refresh' instead.")})}destroy(){super.destroy(),this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.destroySyncListener=null,this.destroyFilterChangedListener=null}},n9=class extends tR{constructor(e,t,i,s,o){super(),this.pinned=e,this.column=t,this.eResize=i,this.comp=s,this.ctrl=o}postConstruct(){let e,t;let i=[],s=()=>{if(i8(this.eResize,e),!e)return;let s=this.horizontalResizeService.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});if(i.push(s),t){let e=this.gos.get("skipHeaderOnAutoSize"),t=()=>{this.columnModel.autoSizeColumn(this.column,"uiColumnResized",e)};this.eResize.addEventListener("dblclick",t);let s=new oQ(this.eResize);s.addEventListener(oQ.EVENT_DOUBLE_TAP,t),i.push(()=>{this.eResize.removeEventListener("dblclick",t),s.removeEventListener(oQ.EVENT_DOUBLE_TAP,t),s.destroy()})}},o=()=>{i.forEach(e=>e()),i.length=0},r=()=>{let i=this.column.isResizable(),r=!this.gos.get("suppressAutoSize")&&!this.column.getColDef().suppressAutoSize;(i!==e||r!==t)&&(e=i,t=r,o(),s())};r(),this.addDestroyFunc(o),this.ctrl.addRefreshFunction(r)}onResizing(e,t){let{column:i,lastResizeAmount:s,resizeStartWidth:o}=this,r=this.normaliseResizeAmount(t);if(!(this.column.getPinned()&&this.pinnedWidthService.getPinnedLeftWidth()+this.pinnedWidthService.getPinnedRightWidth()+(r-s)>ss(this.ctrlsService.getGridBodyCtrl().getBodyViewportElement())-50))this.lastResizeAmount=r,this.columnModel.setColumnWidths([{key:i,newWidth:o+r}],this.resizeWithShiftKey,e,"uiColumnResized"),e&&this.toggleColumnResizing(!1)}onResizeStart(e){this.resizeStartWidth=this.column.getActualWidth(),this.lastResizeAmount=0,this.resizeWithShiftKey=e,this.toggleColumnResizing(!0)}toggleColumnResizing(e){this.comp.addOrRemoveCssClass("ag-column-resizing",e)}normaliseResizeAmount(e){let t=e,i="left"!==this.pinned,s="right"===this.pinned;
158return this.gos.get("enableRtl")?i&&(t*=-1):s&&(t*=-1),t}};K([eB("horizontalResizeService")],n9.prototype,"horizontalResizeService",2),K([eB("pinnedWidthService")],n9.prototype,"pinnedWidthService",2),K([eB("ctrlsService")],n9.prototype,"ctrlsService",2),K([eB("columnModel")],n9.prototype,"columnModel",2),K([eV],n9.prototype,"postConstruct",1);var le=class extends tR{constructor(e){super(),this.cbSelectAllVisible=!1,this.processingEventFromCheckbox=!1,this.column=e}onSpaceKeyDown(e){let t=this.cbSelectAll;t.isDisplayed()&&!t.getGui().contains(this.gos.getActiveDomElement())&&(e.preventDefault(),t.setValue(!t.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(e){this.headerCellCtrl=e,this.cbSelectAll=this.createManagedBean(new oy),this.cbSelectAll.addCssClass("ag-header-select-all"),t4(this.cbSelectAll.getGui(),"presentation"),this.showOrHideSelectAll(),this.addManagedListener(this.eventService,tP.EVENT_NEW_COLUMNS_LOADED,this.onNewColumnsLoaded.bind(this)),this.addManagedListener(this.eventService,tP.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,tP.EVENT_SELECTION_CHANGED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.eventService,tP.EVENT_PAGINATION_CHANGED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.eventService,tP.EVENT_MODEL_UPDATED,this.onModelChanged.bind(this)),this.addManagedListener(this.cbSelectAll,tP.EVENT_FIELD_VALUE_CHANGED,this.onCbSelectAll.bind(this)),ih(this.cbSelectAll.getGui(),!0),this.cbSelectAll.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()}onNewColumnsLoaded(){this.showOrHideSelectAll()}onDisplayedColumnsChanged(){this.isAlive()&&this.showOrHideSelectAll()}showOrHideSelectAll(){this.cbSelectAllVisible=this.isCheckboxSelection(),this.cbSelectAll.setDisplayed(this.cbSelectAllVisible,{skipAriaHidden:!0}),this.cbSelectAllVisible&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel()}onModelChanged(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()}onSelectionChanged(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()}updateStateOfCheckbox(){if(this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;let e=this.selectionService.getSelectAllState(this.isFilteredOnly(),this.isCurrentPageOnly());this.cbSelectAll.setValue(e);let t=this.selectionService.hasNodesToSelect(this.isFilteredOnly(),this.isCurrentPageOnly());this.cbSelectAll.setDisabled(!t),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(){let e=this.localeService.getLocaleTextFunc(),t=this.cbSelectAll.getValue()?e("ariaChecked","checked"):e("ariaUnchecked","unchecked"),i=e("ariaRowSelectAll","Press Space to toggle all rows selection");this.cbSelectAllVisible?this.headerCellCtrl.setAriaDescriptionProperty("selectAll",`${i} (${t})`):this.headerCellCtrl.setAriaDescriptionProperty("selectAll",null),this.cbSelectAll.setInputAriaLabel(`${i} (${t})`),this.headerCellCtrl.announceAriaDescription()}checkSelectionType(e){return"multiple"===this.gos.get("rowSelection")||(console.warn(`AG Grid: ${e} is only available if using 'multiple' rowSelection.`),!1)}checkRightRowModelType(e){let t=this.rowModel.getType();return"clientSide"===t||"serverSide"===t||(console.warn(`AG Grid: ${e} is only available if using 'clientSide' or 'serverSide' rowModelType, you are using ${t}.`),!1)}onCbSelectAll(){if(this.processingEventFromCheckbox||!this.cbSelectAllVisible)return;let e=this.cbSelectAll.getValue(),t=this.isFilteredOnly(),i=this.isCurrentPageOnly(),s="uiSelectAll";i?s="uiSelectAllCurrentPage":t&&(s="uiSelectAllFiltered");let o={source:s,justFiltered:t,justCurrentPage:i};e?this.selectionService.selectAllRowNodes(o):this.selectionService.deselectAllRowNodes(o)}isCheckboxSelection(){let e=this.column.getColDef().headerCheckboxSelection;return"function"==typeof e&&(e=e(this.gos.addGridCommonParams({column:this.column,colDef:this.column.getColDef()}))),!!e&&this.checkRightRowModelType("headerCheckboxSelection")&&this.checkSelectionType("headerCheckboxSelection")}isFilteredOnly(){return!!this.column.getColDef().headerCheckboxSelectionFilteredOnly}isCurrentPageOnly(){return!!this.column.getColDef().headerCheckboxSelectionCurrentPageOnly}};K([eB("rowModel")],le.prototype,"rowModel",2),K([eB("selectionService")],le.prototype,"selectionService",2);var lt=class extends n4{constructor(e,t,i){super(e,t,i),this.refreshFunctions=[],this.userHeaderClasses=new Set,this.ariaDescriptionProperties=new Map,this.column=e}setComp(e,t,i,s){this.comp=e,this.setGui(t),this.updateState(),this.setupWidth(),this.setupMovingCss(),this.setupMenuClass(),this.setupSortableClass(),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight(s),this.addColumnHoverListener(),this.setupFilterClass(),this.setupClasse
158sFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(),this.setupSelectAll(),this.setupUserComp(),this.refreshAria(),this.resizeFeature=this.createManagedBean(new n9(this.getPinned(),this.column,i,e,this)),this.createManagedBean(new n8([this.column],t)),this.createManagedBean(new n6(this.column,t,this.beans)),this.createManagedBean(new oa(t,{shouldStopEventPropagation:e=>this.shouldStopEventPropagation(e),onTabKeyDown:()=>null,handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addResizeAndMoveKeyboardListeners(),this.addManagedPropertyListeners(["suppressMovableColumns","suppressMenuHide","suppressAggFuncInHeader"],this.refresh.bind(this)),this.addManagedListener(this.column,eX.EVENT_COL_DEF_CHANGED,this.refresh.bind(this)),this.addManagedListener(this.eventService,tP.EVENT_COLUMN_VALUE_CHANGED,this.onColumnValueChanged.bind(this)),this.addManagedListener(this.eventService,tP.EVENT_COLUMN_ROW_GROUP_CHANGED,this.onColumnRowGroupChanged.bind(this)),this.addManagedListener(this.eventService,tP.EVENT_COLUMN_PIVOT_CHANGED,this.onColumnPivotChanged.bind(this)),this.addManagedListener(this.eventService,tP.EVENT_HEADER_HEIGHT_CHANGED,this.onHeaderHeightChanged.bind(this))}resizeHeader(e,t){var i,s;if(!this.column.isResizable())return;let o=Math.min(Math.max(this.column.getActualWidth()+e,null!=(i=this.column.getMinWidth())?i:0),null!=(s=this.column.getMaxWidth())?s:Number.MAX_SAFE_INTEGER);this.beans.columnModel.setColumnWidths([{key:this.column,newWidth:o}],t,!0,"uiColumnResized")}moveHeader(e){let{eGui:t,column:i,gos:s,ctrlsService:o}=this,r=this.getPinned(),n=t.getBoundingClientRect().left,l=i.getActualWidth(),a=0===e!==s.get("enableRtl"),h=nQ.normaliseX(a?n-20:n+l+20,r,!0,s,o);nQ.attemptMoveColumns({allMovingColumns:[i],isFromHeader:!0,hDirection:e,xPosition:h,pinned:r,fromEnter:!1,fakeEvent:!1,gos:s,columnModel:this.beans.columnModel}),o.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(i,"auto")}setupUserComp(){let e=this.lookupUserCompDetails();this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setUserCompDetails(e)}lookupUserCompDetails(){let e=this.createParams(),t=this.column.getColDef();return this.userComponentFactory.getHeaderCompDetails(t,e)}createParams(){return this.gos.addGridCommonParams({column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,enableFilterButton:this.openFilterEnabled&&this.menuService.isHeaderFilterButtonEnabled(this.column),enableFilterIcon:!this.openFilterEnabled||this.menuService.isLegacyMenuEnabled(),showColumnMenu:e=>{this.menuService.showColumnMenu({column:this.column,buttonElement:e,positionBy:"button"})},showColumnMenuAfterMouseClick:e=>{this.menuService.showColumnMenu({column:this.column,mouseEvent:e,positionBy:"mouse"})},showFilter:e=>{this.menuService.showFilterMenu({column:this.column,buttonElement:e,containerType:"columnFilter",positionBy:"button"})},progressSort:e=>{this.beans.sortController.progressSort(this.column,!!e,"uiColumnSorted")},setSort:(e,t)=>{this.beans.sortController.setSortForColumn(this.column,e,!!t,"uiColumnSorted")},eGridHeader:this.getGui(),setTooltip:(e,t)=>{this.setupTooltip(e,t)}})}setupSelectAll(){this.selectAllFeature=this.createManagedBean(new le(this.column)),this.selectAllFeature.setComp(this)}getSelectAllGui(){return this.selectAllFeature.getCheckboxGui()}handleKeyDown(e){super.handleKeyDown(e),e.key===sk.SPACE&&this.selectAllFeature.onSpaceKeyDown(e),e.key===sk.ENTER&&this.onEnterKeyDown(e),e.key===sk.DOWN&&e.altKey&&this.showMenuOnKeyPress(e,!1)}onEnterKeyDown(e){if(e.ctrlKey||e.metaKey)this.showMenuOnKeyPress(e,!0);else if(this.sortable){let t=e.shiftKey;this.beans.sortController.progressSort(this.column,t,"uiColumnSorted")}}showMenuOnKeyPress(e,t){let i=this.comp.getUserCompInstance();i&&i instanceof oZ&&i.onMenuKeyboardShortcut(t)&&e.preventDefault()}onFocusIn(e){if(!this.getGui().contains(e.relatedTarget)){let e=this.getRowIndex();this.focusService.setFocusedHeader(e,this.column),this.announceAriaDescription()}this.focusService.isKeyboardMode()&&this.setActiveHeader(!0)}onFocusOut(e){this.getGui().contains(e.relatedTarget)||this.setActiveHeader(!1)}setupTooltip(e,t){this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature));let i="whenTruncated"===this.gos.get("tooltipShowMode"),s=this.eGui,o=this.column.getColDef();t||!i||o.headerComponent||(t=()=>{let e=s.querySelector(".ag-header-cell-text");return!e||e.scrollWidth>e.clientWidth}
158);let r={getColumn:()=>this.column,getColDef:()=>this.column.getColDef(),getGui:()=>s,getLocation:()=>"header",getTooltipValue:()=>null!=e?e:this.column.getColDef().headerTooltip,shouldDisplayTooltip:t},n=this.createManagedBean(new s6(r));this.refreshFunctions.push(()=>n.refreshToolTip())}setupClassesFromColDef(){let e=()=>{let e=this.column.getColDef(),t=nf.getHeaderClassesFromColDef(e,this.gos,this.column,null),i=this.userHeaderClasses;this.userHeaderClasses=new Set(t),t.forEach(e=>{i.has(e)?i.delete(e):this.comp.addOrRemoveCssClass(e,!0)}),i.forEach(e=>this.comp.addOrRemoveCssClass(e,!1))};this.refreshFunctions.push(e),e()}setDragSource(e){if(this.dragSourceElement=e,this.removeDragSource(),!e||!this.draggable)return;let{column:t,beans:i,displayName:s,dragAndDropService:o,gos:r}=this,{columnModel:n}=i,l=!this.gos.get("suppressDragLeaveHidesColumns"),a=this.dragSource={type:1,eElement:e,getDefaultIconName:()=>l?rn.ICON_HIDE:rn.ICON_NOT_ALLOWED,getDragItem:()=>this.createDragItem(t),dragItemName:s,onDragStarted:()=>{l=!r.get("suppressDragLeaveHidesColumns"),t.setMoving(!0,"uiColumnMoved")},onDragStopped:()=>t.setMoving(!1,"uiColumnMoved"),onGridEnter:e=>{var t;if(l){let i=(null==(t=null==e?void 0:e.columns)?void 0:t.filter(e=>!e.getColDef().lockVisible))||[];n.setColumnsVisible(i,!0,"uiColumnMoved")}},onGridExit:e=>{var t;if(l){let i=(null==(t=null==e?void 0:e.columns)?void 0:t.filter(e=>!e.getColDef().lockVisible))||[];n.setColumnsVisible(i,!1,"uiColumnMoved")}}};o.addDragSource(a,!0)}createDragItem(e){let t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t}}updateState(){this.menuEnabled=this.menuService.isColumnMenuInHeaderEnabled(this.column),this.openFilterEnabled=this.menuService.isFilterMenuInHeaderEnabled(this.column),this.sortable=this.column.isSortable(),this.displayName=this.calculateDisplayName(),this.draggable=this.workOutDraggable()}addRefreshFunction(e){this.refreshFunctions.push(e)}refresh(){this.updateState(),this.refreshHeaderComp(),this.refreshAria(),this.refreshFunctions.forEach(e=>e())}refreshHeaderComp(){let e=this.lookupUserCompDetails();null!=this.comp.getUserCompInstance()&&this.userCompDetails.componentClass==e.componentClass&&this.attemptHeaderCompRefresh(e.params)?this.setDragSource(this.dragSourceElement):this.setCompDetails(e)}attemptHeaderCompRefresh(e){let t=this.comp.getUserCompInstance();return!!t&&!!t.refresh&&t.refresh(e)}calculateDisplayName(){return this.beans.columnModel.getDisplayNameForColumn(this.column,"header",!0)}checkDisplayName(){this.displayName!==this.calculateDisplayName()&&this.refresh()}workOutDraggable(){let e=this.column.getColDef();return!!(!this.gos.get("suppressMovableColumns")&&!e.suppressMovable&&!e.lockPosition)||!!e.enableRowGroup||!!e.enablePivot}onColumnRowGroupChanged(){this.checkDisplayName()}onColumnPivotChanged(){this.checkDisplayName()}onColumnValueChanged(){this.checkDisplayName()}setupWidth(){let e=()=>{let e=this.column.getActualWidth();this.comp.setWidth(`${e}px`)};this.addManagedListener(this.column,eX.EVENT_WIDTH_CHANGED,e),e()}setupMovingCss(){let e=()=>{this.comp.addOrRemoveCssClass("ag-header-cell-moving",this.column.isMoving())};this.addManagedListener(this.column,eX.EVENT_MOVING_CHANGED,e),e()}setupMenuClass(){let e=()=>{this.comp.addOrRemoveCssClass("ag-column-menu-visible",this.column.isMenuVisible())};this.addManagedListener(this.column,eX.EVENT_MENU_VISIBLE_CHANGED,e),e()}setupSortableClass(){let e=()=>{this.comp.addOrRemoveCssClass("ag-header-cell-sortable",!!this.sortable)};e(),this.addRefreshFunction(e),this.addManagedListener(this.eventService,eX.EVENT_SORT_CHANGED,this.refreshAriaSort.bind(this))}setupFilterClass(){let e=()=>{let e=this.column.isFilterActive();this.comp.addOrRemoveCssClass("ag-header-cell-filtered",e),this.refreshAria()};this.addManagedListener(this.column,eX.EVENT_FILTER_ACTIVE_CHANGED,e),e()}setupWrapTextClass(){let e=()=>{let e=!!this.column.getColDef().wrapHeaderText;this.comp.addOrRemoveCssClass("ag-header-cell-wrap-text",e)};e(),this.addRefreshFunction(e)}onDisplayedColumnsChanged(){super.onDisplayedColumnsChanged(),this.isAlive()&&this.onHeaderHeight
158Changed()}onHeaderHeightChanged(){this.refreshSpanHeaderHeight()}refreshSpanHeaderHeight(){let{eGui:e,column:t,comp:i,beans:s}=this;if(!t.isSpanHeaderHeight()){e.style.removeProperty("top"),e.style.removeProperty("height"),i.addOrRemoveCssClass("ag-header-span-height",!1),i.addOrRemoveCssClass("ag-header-span-total",!1);return}let{numberOfParents:o,isSpanningTotal:r}=this.column.getColumnGroupPaddingInfo();i.addOrRemoveCssClass("ag-header-span-height",o>0);let{columnModel:n}=s,l=n.getColumnHeaderRowHeight();if(0===o){i.addOrRemoveCssClass("ag-header-span-total",!1),e.style.setProperty("top","0px"),e.style.setProperty("height",`${l}px`);return}i.addOrRemoveCssClass("ag-header-span-total",r);let a=o*(n.isPivotMode()?n.getPivotGroupHeaderHeight():n.getGroupHeaderHeight());e.style.setProperty("top",`${-a}px`),e.style.setProperty("height",`${l+a}px`)}setupAutoHeight(e){let t;let{columnModel:i,resizeObserverService:s}=this.beans,o=t=>{if(!this.isAlive())return;let{paddingTop:s,paddingBottom:r,borderBottomWidth:n,borderTopWidth:l}=st(this.getGui()),a=e.offsetHeight+(s+r+n+l);if(t<5){let i=this.beans.gos.getDocument(),s=!i||!i.contains(e),r=0==a;if(s||r){window.setTimeout(()=>o(t+1),0);return}}i.setColumnHeaderHeight(this.column,a)},r=!1,n=()=>{let e=this.column.isAutoHeaderHeight();e&&!r&&l(),!e&&r&&a()},l=()=>{r=!0,o(0),this.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!0),t=s.observeResize(e,()=>o(0))},a=()=>{r=!1,t&&t(),this.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!1),t=void 0};n(),this.addDestroyFunc(()=>a()),this.addManagedListener(this.column,eX.EVENT_WIDTH_CHANGED,()=>r&&o(0)),this.addManagedListener(this.eventService,eX.EVENT_SORT_CHANGED,()=>{r&&window.setTimeout(()=>o(0))}),this.addRefreshFunction(n)}refreshAriaSort(){if(this.sortable){let e=this.localeService.getLocaleTextFunc(),t=this.beans.sortController.getDisplaySortForColumn(this.column)||null;this.comp.setAriaSort(t6(t)),this.setAriaDescriptionProperty("sort",e("ariaSortableColumn","Press ENTER to sort"))}else this.comp.setAriaSort(),this.setAriaDescriptionProperty("sort",null)}refreshAriaMenu(){if(this.menuEnabled){let e=this.localeService.getLocaleTextFunc();this.setAriaDescriptionProperty("menu",e("ariaMenuColumn","Press ALT DOWN to open column menu"))}else this.setAriaDescriptionProperty("menu",null)}refreshAriaFilterButton(){if(this.openFilterEnabled&&!this.menuService.isLegacyMenuEnabled()){let e=this.localeService.getLocaleTextFunc();this.setAriaDescriptionProperty("filterButton",e("ariaFilterColumn","Press CTRL ENTER to open filter"))}else this.setAriaDescriptionProperty("filterButton",null)}refreshAriaFiltered(){let e=this.localeService.getLocaleTextFunc();this.column.isFilterActive()?this.setAriaDescriptionProperty("filter",e("ariaColumnFiltered","Column Filtered")):this.setAriaDescriptionProperty("filter",null)}setAriaDescriptionProperty(e,t){null!=t?this.ariaDescriptionProperties.set(e,t):this.ariaDescriptionProperties.delete(e)}announceAriaDescription(){if(!this.eGui.contains(this.beans.gos.getActiveDomElement()))return;let e=Array.from(this.ariaDescriptionProperties.keys()).sort((e,t)=>"filter"===e?-1:t.charCodeAt(0)-e.charCodeAt(0)).map(e=>this.ariaDescriptionProperties.get(e)).join(". ");this.beans.ariaAnnouncementService.announceValue(e)}refreshAria(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFilterButton(),this.refreshAriaFiltered()}addColumnHoverListener(){let e=()=>{if(!this.gos.get("columnHoverHighlight"))return;let e=this.beans.columnHoverService.isHovered(this.column);this.comp.addOrRemoveCssClass("ag-column-hover",e)};this.addManagedListener(this.eventService,tP.EVENT_COLUMN_HOVER_CHANGED,e),e()}getColId(){return this.column.getColId()}addActiveHeaderMouseListeners(){let e=e=>this.handleMouseOverChange("mouseenter"===e.type);this.addManagedListener(this.getGui(),"mouseenter",e),this.addManagedListener(this.getGui(),"mouseleave",e),this.addManagedListener(this.getGui(),"click",()=>this.dispatchColumnMouseEvent(tP.EVENT_COLUMN_HEADER_CLICKED,this.column)),this.addManagedListener(this.getGui(),"contextmenu",e=>this.handleContextMenuMouseEvent(e,void 0,this.column))}handleMouseOverChange(e){this.setActiveHeader(e);let t={type:e?tP.EVENT_COLUMN_HEADER_MOUSE_OVER:tP.EVENT_COLUMN_HEADER_MOUSE_LEAVE,column:this.column};this.eventService.dispatchEvent(t)}setActiveHeader(e){this.comp.addOrRemoveCssClass("ag-header-active",e)}getAnchorElementForMenu(e){let t=this.comp.getUserCompInstance();return t instanceof oZ?t.getAnchorElementForMenu(e):this.getGui()}destroy(){super.destroy(),this.refreshFunctions=null,this.selectAllFeature=null,this.dragSourceElement=null,this.userCompDetail
158s=null,this.userHeaderClasses=null,this.ariaDescriptionProperties=null}},li=class extends tR{constructor(e,t,i,s){super(),this.eResize=t,this.comp=e,this.pinned=i,this.columnGroup=s}postConstruct(){if(!this.columnGroup.isResizable()){this.comp.setResizableDisplayed(!1);return}let e=this.horizontalResizeService.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});if(this.addDestroyFunc(e),!this.gos.get("suppressAutoSize")){let e=this.gos.get("skipHeaderOnAutoSize");this.eResize.addEventListener("dblclick",()=>{let t=[];this.columnGroup.getDisplayedLeafColumns().forEach(e=>{e.getColDef().suppressAutoSize||t.push(e.getColId())}),t.length>0&&this.columnModel.autoSizeColumns({columns:t,skipHeader:e,stopAtGroup:this.columnGroup,source:"uiColumnResized"}),this.resizeLeafColumnsToFit("uiColumnResized")})}}onResizeStart(e){let t=this.getInitialValues(e);this.storeLocalValues(t),this.toggleColumnResizing(!0)}onResizing(e,t,i="uiColumnResized"){let s=this.normaliseDragChange(t),o=this.resizeStartWidth+s;this.resizeColumnsFromLocalValues(o,i,e)}getInitialValues(e){let t=this.getColumnsToResize(),i=this.getInitialSizeOfColumns(t),s=this.getSizeRatiosOfColumns(t,i),o={columnsToResize:t,resizeStartWidth:i,resizeRatios:s},r=null;if(e&&(r=this.columnModel.getDisplayedGroupAtDirection(this.columnGroup,"After")),r){let e=r.getDisplayedLeafColumns(),t=o.groupAfterColumns=e.filter(e=>e.isResizable()),i=o.groupAfterStartWidth=this.getInitialSizeOfColumns(t);o.groupAfterRatios=this.getSizeRatiosOfColumns(t,i)}else o.groupAfterColumns=void 0,o.groupAfterStartWidth=void 0,o.groupAfterRatios=void 0;return o}storeLocalValues(e){let{columnsToResize:t,resizeStartWidth:i,resizeRatios:s,groupAfterColumns:o,groupAfterStartWidth:r,groupAfterRatios:n}=e;this.resizeCols=t,this.resizeStartWidth=i,this.resizeRatios=s,this.resizeTakeFromCols=o,this.resizeTakeFromStartWidth=r,this.resizeTakeFromRatios=n}clearLocalValues(){this.resizeCols=void 0,this.resizeRatios=void 0,this.resizeTakeFromCols=void 0,this.resizeTakeFromRatios=void 0}resizeLeafColumnsToFit(e){let t=this.autoWidthCalculator.getPreferredWidthForColumnGroup(this.columnGroup),i=this.getInitialValues();t>i.resizeStartWidth&&this.resizeColumns(i,t,e,!0)}resizeColumnsFromLocalValues(e,t,i=!0){var s,o,r;if(!this.resizeCols||!this.resizeRatios)return;let n={columnsToResize:this.resizeCols,resizeStartWidth:this.resizeStartWidth,resizeRatios:this.resizeRatios,groupAfterColumns:null!=(s=this.resizeTakeFromCols)?s:void 0,groupAfterStartWidth:null!=(o=this.resizeTakeFromStartWidth)?o:void 0,groupAfterRatios:null!=(r=this.resizeTakeFromRatios)?r:void 0};this.resizeColumns(n,e,t,i)}resizeColumns(e,t,i,s=!0){let{columnsToResize:o,resizeStartWidth:r,resizeRatios:n,groupAfterColumns:l,groupAfterStartWidth:a,groupAfterRatios:h}=e,d=[];if(d.push({columns:o,ratios:n,width:t}),l){let e=t-r;d.push({columns:l,ratios:h,width:a-e})}this.columnModel.resizeColumnSets({resizeSets:d,finished:s,source:i}),s&&this.toggleColumnResizing(!1)}toggleColumnResizing(e){this.comp.addOrRemoveCssClass("ag-column-resizing",e)}getColumnsToResize(){return this.columnGroup.getDisplayedLeafColumns().filter(e=>e.isResizable())}getInitialSizeOfColumns(e){return e.reduce((e,t)=>e+t.getActualWidth(),0)}getSizeRatiosOfColumns(e,t){return e.map(e=>e.getActualWidth()/t)}normaliseDragChange(e){let t=e;return this.gos.get("enableRtl")?"left"!==this.pinned&&(t*=-1):"right"===this.pinned&&(t*=-1),t}destroy(){super.destroy(),this.clearLocalValues()}};K([eB("horizontalResizeService")],li.prototype,"horizontalResizeService",2),K([eB("autoWidthCalculator")],li.prototype,"autoWidthCalculator",2),K([eB("columnModel")],li.prototype,"columnModel",2),K([eV],li.prototype,"postConstruct",1);var ls=class extends tR{constructor(e,t){super(),this.removeChildListenersFuncs=[],this.columnGroup=t,this.comp=e}postConstruct(){this.addListenersToChildrenColumns(),this.addManagedListener(this.columnGroup,tA.EVENT_DISPLAYED_CHILDREN_CHANGED,this.onDisplayedChildrenChanged.bind(this)),this.onWidthChanged(),this.addDestroyFunc(this.removeListenersOnChildrenColumns.bind(this))}addListenersToChildrenColumns(){this.removeListenersOnChildrenColumns();let e=this.onWidthChanged.bind(this);
158this.columnGroup.getLeafColumns().forEach(t=>{t.addEventListener("widthChanged",e),t.addEventListener("visibleChanged",e),this.removeChildListenersFuncs.push(()=>{t.removeEventListener("widthChanged",e),t.removeEventListener("visibleChanged",e)})})}removeListenersOnChildrenColumns(){this.removeChildListenersFuncs.forEach(e=>e()),this.removeChildListenersFuncs=[]}onDisplayedChildrenChanged(){this.addListenersToChildrenColumns(),this.onWidthChanged()}onWidthChanged(){let e=this.columnGroup.getActualWidth();this.comp.setWidth(`${e}px`),this.comp.addOrRemoveCssClass("ag-hidden",0===e)}};K([eV],ls.prototype,"postConstruct",1);var lo=class extends n4{constructor(e,t,i){super(e,t,i),this.onSuppressColMoveChange=()=>{if(!this.isAlive()||this.isSuppressMoving())this.removeDragSource();else if(!this.dragSource){let e=this.getGui();this.setDragSource(e)}},this.column=e}setComp(e,t,i){this.comp=e,this.setGui(t),this.displayName=this.beans.columnModel.getDisplayNameForColumnGroup(this.column,"header"),this.addClasses(),this.setupMovingCss(),this.setupExpandable(),this.setupTooltip(),this.addDestroyFunc(()=>{this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature))}),this.setupUserComp(),this.addHeaderMouseListeners();let s=this.getParentRowCtrl().getPinned(),o=this.column.getProvidedColumnGroup().getLeafColumns();this.createManagedBean(new n8(o,t)),this.createManagedBean(new n6(this.column,t,this.beans)),this.createManagedBean(new ls(e,this.column)),this.resizeFeature=this.createManagedBean(new li(e,i,s,this.column)),this.createManagedBean(new oa(t,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:()=>void 0,handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addManagedPropertyListener(tP.EVENT_SUPPRESS_COLUMN_MOVE_CHANGED,this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners()}resizeHeader(e,t){if(!this.resizeFeature)return;let i=this.resizeFeature.getInitialValues(t);this.resizeFeature.resizeColumns(i,i.resizeStartWidth+e,"uiColumnResized",!0)}moveHeader(e){let{beans:t,eGui:i,column:s,gos:o,ctrlsService:r}=this,n=o.get("enableRtl"),l=0===e,a=this.getPinned(),h=i.getBoundingClientRect(),d=h.left,u=h.width,c=nQ.normaliseX(l!==n?d-20:d+u+20,a,!0,o,r),p=s.getGroupId(),g=this.focusService.getFocusedHeader();nQ.attemptMoveColumns({allMovingColumns:this.column.getLeafColumns(),isFromHeader:!0,hDirection:e,xPosition:c,pinned:a,fromEnter:!1,fakeEvent:!1,gos:o,columnModel:t.columnModel});let m=s.getDisplayedLeafColumns(),C=l?m[0]:e5(m);this.ctrlsService.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(C,"auto"),!this.isAlive()&&g&&this.restoreFocus(p,s,g)}restoreFocus(e,t,i){let s=t.getLeafColumns();if(!s.length)return;let o=s[0].getParent();if(!o)return;let r=this.findGroupWidthId(o,e);r&&this.focusService.focusHeaderPosition({headerPosition:W(B({},i),{column:r})})}findGroupWidthId(e,t){for(;e;){if(e.getGroupId()===t)return e;e=e.getParent()}return null}resizeLeafColumnsToFit(e){this.resizeFeature&&this.resizeFeature.resizeLeafColumnsToFit(e)}setupUserComp(){let e=this.gos.addGridCommonParams({displayName:this.displayName,columnGroup:this.column,setExpanded:e=>{this.beans.columnModel.setColumnGroupOpened(this.column.getProvidedColumnGroup(),e,"gridInitializing")},setTooltip:(e,t)=>{this.setupTooltip(e,t)}}),t=this.userComponentFactory.getHeaderGroupCompDetails(e);this.comp.setUserCompDetails(t)}addHeaderMouseListeners(){let e=e=>this.handleMouseOverChange("mouseenter"===e.type);this.addManagedListener(this.getGui(),"mouseenter",e),this.addManagedListener(this.getGui(),"mouseleave",e),this.addManagedListener(this.getGui(),"click",()=>this.dispatchColumnMouseEvent(tP.EVENT_COLUMN_HEADER_CLICKED,this.column.getProvidedColumnGroup())),this.addManagedListener(this.getGui(),"contextmenu",e=>this.handleContextMenuMouseEvent(e,void 0,this.column.getProvidedColumnGroup()))}handleMouseOverChange(e){let t={type:e?tP.EVENT_COLUMN_HEADER_MOUSE_OVER:tP.EVENT_COLUMN_HEADER_MOUSE_LEAVE,column:this.column.getProvidedColumnGroup()};this.eventService.dispatchEvent(t)}setupTooltip(e,t){this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature));let i=this.column.getColGroupDef(),s="whenTruncated"===this.gos.get("tooltipShowMode"),o=this.eGui;t||!s||(null==i?void 0:i.headerGroupComponent)||(t=()=>{let e=o.querySelector(".ag-header-group-text");return!e||e.scrollWidth>e.clientWidth}
158);let r={getColumn:()=>this.column,getGui:()=>o,getLocation:()=>"headerGroup",getTooltipValue:()=>null!=e?e:i&&i.headerTooltip,shouldDisplayTooltip:t};i&&(r.getColDef=()=>i),this.createBean(new s6(r))}setupExpandable(){let e=this.column.getProvidedColumnGroup();this.refreshExpanded(),this.addManagedListener(e,eZ.EVENT_EXPANDABLE_CHANGED,this.refreshExpanded.bind(this)),this.addManagedListener(e,eZ.EVENT_EXPANDED_CHANGED,this.refreshExpanded.bind(this))}refreshExpanded(){let e=this.column;this.expandable=e.isExpandable();let t=e.isExpanded();this.expandable?this.comp.setAriaExpanded(t?"true":"false"):this.comp.setAriaExpanded(void 0)}getColId(){return this.column.getUniqueId()}addClasses(){let e=this.column.getColGroupDef(),t=nf.getHeaderClassesFromColDef(e,this.gos,null,this.column);this.column.isPadding()?(t.push("ag-header-group-cell-no-group"),this.column.getLeafColumns().every(e=>e.isSpanHeaderHeight())&&t.push("ag-header-span-height")):t.push("ag-header-group-cell-with-group"),t.forEach(e=>this.comp.addOrRemoveCssClass(e,!0))}setupMovingCss(){let e=this.column.getProvidedColumnGroup().getLeafColumns(),t=()=>this.comp.addOrRemoveCssClass("ag-header-cell-moving",this.column.isMoving());e.forEach(e=>{this.addManagedListener(e,eX.EVENT_MOVING_CHANGED,t)}),t()}onFocusIn(e){if(!this.eGui.contains(e.relatedTarget)){let e=this.getRowIndex();this.beans.focusService.setFocusedHeader(e,this.column)}}handleKeyDown(e){super.handleKeyDown(e);let t=this.getWrapperHasFocus();if(this.expandable&&t&&e.key===sk.ENTER){let e=this.column,t=!e.isExpanded();this.beans.columnModel.setColumnGroupOpened(e.getProvidedColumnGroup(),t,"uiColumnExpanded")}}setDragSource(e){if(!this.isAlive()||this.isSuppressMoving()||(this.removeDragSource(),!e))return;let{beans:t,column:i,displayName:s,gos:o,dragAndDropService:r}=this,{columnModel:n}=t,l=i.getProvidedColumnGroup().getLeafColumns(),a=!o.get("suppressDragLeaveHidesColumns"),h=this.dragSource={type:1,eElement:e,getDefaultIconName:()=>a?rn.ICON_HIDE:rn.ICON_NOT_ALLOWED,dragItemName:s,getDragItem:()=>this.getDragItemForGroup(i),onDragStarted:()=>{a=!o.get("suppressDragLeaveHidesColumns"),l.forEach(e=>e.setMoving(!0,"uiColumnDragged"))},onDragStopped:()=>l.forEach(e=>e.setMoving(!1,"uiColumnDragged")),onGridEnter:e=>{var t;if(a){let i=(null==(t=null==e?void 0:e.columns)?void 0:t.filter(e=>!e.getColDef().lockVisible))||[];n.setColumnsVisible(i,!0,"uiColumnMoved")}},onGridExit:e=>{var t;if(a){let i=(null==(t=null==e?void 0:e.columns)?void 0:t.filter(e=>!e.getColDef().lockVisible))||[];n.setColumnsVisible(i,!1,"uiColumnMoved")}}};r.addDragSource(h,!0)}getDragItemForGroup(e){let t=e.getProvidedColumnGroup().getLeafColumns(),i={};t.forEach(e=>i[e.getId()]=e.isVisible());let s=[];return this.beans.columnModel.getAllDisplayedColumns().forEach(e=>{t.indexOf(e)>=0&&(s.push(e),te(t,e))}),t.forEach(e=>s.push(e)),{columns:s,visibleState:i}}isSuppressMoving(){let e=!1;return this.column.getLeafColumns().forEach(t=>{(t.getColDef().suppressMovable||t.getColDef().lockPosition)&&(e=!0)}),e||this.gos.get("suppressMovableColumns")}},lr=0,ln=class extends tR{constructor(e,t,i){super(),this.instanceId=lr++,this.rowIndex=e,this.pinned=t,this.type=i,this.headerRowClass=`ag-header-row ${"group"==i?"ag-header-row-column-group":"filter"==i?"ag-header-row-column-filter":"ag-header-row-column"}`}postConstruct(){this.isPrintLayout=this.gos.isDomLayout("print"),this.isEnsureDomOrder=this.gos.get("ensureDomOrder")}getInstanceId(){return this.instanceId}setComp(e,t=!0){this.comp=e,t&&(this.onRowHeightChanged(),this.onVirtualColumnsChanged()),this.setWidth(),this.addEventListeners()}getHeaderRowClass(){return this.headerRowClass}getAriaRowIndex(){return this.rowIndex+1}addEventListeners(){this.addManagedListener(this.eventService,tP.EVENT_COLUMN_RESIZED,this.onColumnResized.bind(this)),this.addManagedListener(this.eventService,tP.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,tP.EVENT_VIRTUAL_COLUMNS_CHANGED,e=>this.onVirtualColumnsChanged(e.afterScroll)),this.addManagedListener(this.eventService,tP.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,this.onRowHeightChanged.bind(this)),this.addManagedListener(this.eventService,tP.EVENT_GRID_STYLES_CHANGED,this.onRowHeightChanged.bind(this)),this.addManagedListener(this.eventService,tP.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("domLayout",this.onDisplayedColumnsChanged.bind(this)),this.addManagedPropertyListener("ensureDomOrder",e=>this.isEnsureDomOrder=e.currentValue),this.addManagedPropertyListener("headerHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("pivotHeaderHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("groupHeaderHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("pivotGroupHeaderHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("floatingFiltersHeight",this.onRowHeightChanged.bind(this))}getHeaderCellCtrl(e){if(this.headerCellCtrls)return eo(this.headerCellCtrls).find(t=>t.getColumnGroupChild()===e)}onDisplayedColumnsChanged(){this.isPrintLayout=this.gos.isDomLayout("print"),this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()}getType(){return this.type}onColumnResized(){this.setWidth()}setWidth(){let e=this.getWidthForRow();this.comp.setWidth(`${e}px`)}getWidthForRow(){let{columnModel:e}=this.beans;return this.isPrintLayout?null!=this.pinned?0:e.getContainerWidth("right")+e.getContainerWidth("left")+e.getContainerWidth(null):e.getContainerWidth(this.pinned)}onRowHeightChanged(){var{topOffset:e,rowHeight:t}=this.getTopAndHeight();this.comp.setTop(e+"px"),this.comp.setHeight(t+"px")}getTopAndHeight(){let{columnModel:e,filterManager:t}=this.beans,i=e.getHeaderRowCount(),s=[],o=0;t.hasFloatingFilters()&&(i++,o=1);let r=e.getColumnGroupHeaderRowHeight(),n=e.getColumnHeaderRowHeight(),l=i-(1+o);for(let e=0;e<l;e++)s.push(r);s.push(n);for(let t=0;t<o;t++)s.push(e.getFloatingFiltersHeight());let a=0;for(let e=0;e<this.rowIndex;e++)a+=s[e];return{topOffset:a,rowHeight:s[this.rowIndex]}}getPinned(){return this.pinned}getRowIndex(){return this.rowIndex}onVirtualColumnsChanged(e=!1){let t=this.getHeaderCtrls(),i=this.isEnsureDomOrder||this.isPrintLayout;this.comp.setHeaderCtrls(t,i,e)}getHeaderCtrls(){let e=this.headerCellCtrls;for(let t of(this.headerCellCtrls=new Map,this.getColumnsInViewport()))this.recycleAndCreateHeaderCtrls(t,e);let t=e=>{let{focusService:t,columnModel:i}=this.beans;return!!t.isHeaderWrapperFocused(e)&&i.isDisplayed(e.getColumnGroupChild())};if(e)for(let[i,s]of e)t(s)?this.headerCellCtrls.set(i,s):this.destroyBean(s);return Array.from(this.headerCellCtrls.values())}recycleAndCreateHeaderCtrls(e,t){let i;if(!this.headerCellCtrls||e.isEmptyGroup())return;let s=e.getUniqueId();if(t&&(i=t.get(s),t.delete(s)),i&&i.getColumnGroupChild()!=e&&(this.destroyBean(i),i=void 0),null==i)switch(this.type){case"filter":i=this.createBean(new n7(e,this.beans,this));break;case"group":i=this.createBean(new lo(e,this.beans,this));break;default:i=this.createBean(new lt(e,this.beans,this))}this.headerCellCtrls.set(s,i)}getColumnsInViewport(){return this.isPrintLayout?this.getColumnsInViewportPrintLayout():this.getColumnsInViewportNormalLayout()}getColumnsInViewportPrintLayout(){if(null!=this.pinned)return[];let e=[],t=this.getActualDepth(),{columnModel:i}=this.beans;return["left",null,"right"].forEach(s=>{let o=i.getVirtualHeaderGroupRow(s,t);e=e.concat(o)}),e}getActualDepth(){return"filter"==this.type?this.rowIndex-1:this.rowIndex}getColumnsInViewportNormalLayout(){return this.beans.columnModel.getVirtualHeaderGroupRow(this.pinned,this.getActualDepth())}focusHeader(e,t){if(!this.headerCellCtrls)return!1;let i=Array.from(this.headerCellCtrls.values()).find(t=>t.getColumnGroupChild()==e);return!!i&&i.focus(t)}
158destroy(){this.headerCellCtrls&&this.headerCellCtrls.forEach(e=>{this.destroyBean(e)}),this.headerCellCtrls=void 0,super.destroy()}};K([eB("beans")],ln.prototype,"beans",2),K([eV],ln.prototype,"postConstruct",1);var ll=class extends tR{constructor(e){super(),this.hidden=!1,this.includeFloatingFilter=!1,this.groupsRowCtrls=[],this.pinned=e}setComp(e,t){this.comp=e,this.eViewport=t,this.setupCenterWidth(),this.setupPinnedWidth(),this.setupDragAndDrop(this.eViewport),this.addManagedListener(this.eventService,tP.EVENT_GRID_COLUMNS_CHANGED,this.onGridColumnsChanged.bind(this)),this.addManagedListener(this.eventService,tP.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,tP.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.ctrlsService.registerHeaderContainer(this,this.pinned),this.columnModel.isReady()&&this.refresh()}setupDragAndDrop(e){let t=new nJ(this.pinned,e);this.createManagedBean(t)}refresh(e=!1){let t=new sZ,i=this.focusService.getFocusHeaderToUseAfterRefresh();(()=>{let e=this.columnModel.getHeaderRowCount()-1;this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls);for(let i=0;i<e;i++){let e=this.createBean(new ln(t.next(),this.pinned,"group"));this.groupsRowCtrls.push(e)}})(),(()=>{let i=t.next(),s=!this.hidden&&(null==this.columnsRowCtrl||!e||this.columnsRowCtrl.getRowIndex()!==i);(s||this.hidden)&&(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl)),s&&(this.columnsRowCtrl=this.createBean(new ln(i,this.pinned,"column")))})(),(()=>{this.includeFloatingFilter=this.filterManager.hasFloatingFilters()&&!this.hidden;let i=()=>{this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)};if(!this.includeFloatingFilter){i();return}let s=t.next();if(this.filtersRowCtrl){let t=this.filtersRowCtrl.getRowIndex()!==s;(!e||t)&&i()}this.filtersRowCtrl||(this.filtersRowCtrl=this.createBean(new ln(s,this.pinned,"filter")))})();let s=this.getAllCtrls();this.comp.setCtrls(s),this.restoreFocusOnHeader(i)}restoreFocusOnHeader(e){null!=e&&e.column.getPinned()==this.pinned&&this.focusService.focusHeaderPosition({headerPosition:e})}getAllCtrls(){let e=[...this.groupsRowCtrls];return this.columnsRowCtrl&&e.push(this.columnsRowCtrl),this.filtersRowCtrl&&e.push(this.filtersRowCtrl),e}onGridColumnsChanged(){this.refresh(!0)}onDisplayedColumnsChanged(){let e=this.filterManager.hasFloatingFilters()&&!this.hidden;this.includeFloatingFilter!==e&&this.refresh(!0)}setupCenterWidth(){null==this.pinned&&this.createManagedBean(new nM(e=>this.comp.setCenterWidth(`${e}px`),!0))}setHorizontalScroll(e){this.comp.setViewportScrollLeft(e)}setupPinnedWidth(){if(null==this.pinned)return;let e="left"===this.pinned,t="right"===this.pinned;this.hidden=!0;let i=()=>{let i=e?this.pinnedWidthService.getPinnedLeftWidth():this.pinnedWidthService.getPinnedRightWidth();if(null==i)return;let s=0==i,o=this.hidden!==s,r=this.gos.get("enableRtl"),n=this.gos.getScrollbarWidth(),l=this.scrollVisibleService.isVerticalScrollShowing()&&(r&&e||!r&&t);this.comp.setPinnedContainerWidth(`${l?i+n:i}px`),this.comp.setDisplayed(!s),o&&(this.hidden=s,this.refresh())};this.addManagedListener(this.eventService,tP.EVENT_LEFT_PINNED_WIDTH_CHANGED,i),this.addManagedListener(this.eventService,tP.EVENT_RIGHT_PINNED_WIDTH_CHANGED,i),this.addManagedListener(this.eventService,tP.EVENT_SCROLL_VISIBILITY_CHANGED,i),this.addManagedListener(this.eventService,tP.EVENT_SCROLLBAR_WIDTH_CHANGED,i)}getHeaderCtrlForColumn(e){if(e instanceof eX){if(!this.columnsRowCtrl)return;return this.columnsRowCtrl.getHeaderCellCtrl(e)}if(0!==this.groupsRowCtrls.length)for(let t=0;t<this.groupsRowCtrls.length;t++){let i=this.groupsRowCtrls[t].getHeaderCellCtrl(e);if(i)return i}}getHtmlElementForColumnHeader(e){let t=this.getHeaderCtrlForColumn(e);return t?t.getGui():null}getRowType(e){let t=this.getAllCtrls()[e];return t?t.getType():void 0}focusHeader(e,t,i){let s=this.getAllCtrls()[e];return!!s&&s.focusHeader(t,i)}getViewport(){return this.eViewport}getRowCount(){return this.groupsRowCtrls.length+(this.columnsRowCtrl?1:0)+(this.filtersRowCtrl?1:0)}destroy(){this.filtersRowCtrl&&(this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)),this.columnsRowCtrl&&(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl)),this.groupsRowCtrls&&this.groupsRowCtrls.length&&(this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls)),super.destroy()}};K([eB("ctrlsService")],ll.prototype,"ctrlsService",2),K([eB("scrollVisibleService")],ll.prototype,"scrollVisibleService",2),K([eB("pinnedWidthService")],ll.prototype,"pinnedWidthService",2),K([eB("columnModel")],ll.prototype,"columnModel",2),K([eB("focusService")],ll.prototype,"focusService",2),K([eB("filterManager")],ll.prototype,"filterManager",2);var la=class e extends s9{constructor(e){super(),this.headerRowComps={},this.rowCompsList=[],this.pinned=e}init(){this.selectAndSetTemplate(),this.createManagedBean(new ll(this.pinned)).setComp({setDisplayed:e=>this.setDisplayed(e),setCtrls:e=>this.setCtrls(e),setCenterWidth:e=>this.eCenterContainer.style.width=e,setViewportScrollLeft:e=>this.getGui().scrollLeft=e,setPinnedContainerWidth:e=>{let t=this.getGui();t.style.width=e,t.style.maxWidth=e,t.style.minWidth=e}},this.getGui())}selectAndSetTemplate(){let t="left"==this.pinned,i="right"==this.pinned,s=t?e.PINNED_LE
158FT_TEMPLATE:i?e.PINNED_RIGHT_TEMPLATE:e.CENTER_TEMPLATE;this.setTemplate(s),this.eRowContainer=this.eCenterContainer?this.eCenterContainer:this.getGui()}destroyRowComps(){this.setCtrls([])}destroyRowComp(e){this.destroyBean(e),this.eRowContainer.removeChild(e.getGui())}setCtrls(e){let t;let i=this.headerRowComps;this.headerRowComps={},this.rowCompsList=[];let s=e=>{let i=e.getGui();i.parentElement!=this.eRowContainer&&this.eRowContainer.appendChild(i),t&&sm(this.eRowContainer,i,t),t=i};e.forEach(e=>{let t=e.getInstanceId(),o=i[t];delete i[t];let r=o||this.createBean(new n2(e));this.headerRowComps[t]=r,this.rowCompsList.push(r),s(r)}),eu(i).forEach(e=>this.destroyRowComp(e))}};la.PINNED_LEFT_TEMPLATE='<div class="ag-pinned-left-header" role="rowgroup"></div>',la.PINNED_RIGHT_TEMPLATE='<div class="ag-pinned-right-header" role="rowgroup"></div>',la.CENTER_TEMPLATE=`<div class="ag-header-viewport" role="presentation">
159            <div class="ag-header-container" ref="eCenterContainer" role="rowgroup"></div>
160        </div>`,K([ot("eCenterContainer")],la.prototype,"eCenterContainer",2),K([eV],la.prototype,"init",1),K([eH],la.prototype,"destroyRowComps",1);var lh=la,ld=((f=ld||{})[f.UP=0]="UP",f[f.DOWN=1]="DOWN",f[f.LEFT=2]="LEFT",f[f.RIGHT=3]="RIGHT",f),lu=class extends tR{constructor(){super(...arguments),this.currentHeaderRowWithoutSpan=-1}postConstruct(){this.ctrlsService.whenReady(e=>{this.gridBodyCon=e.gridBodyCtrl});let e=this.gos.getDocument();this.addManagedListener(e,"mousedown",()=>this.setCurrentHeaderRowWithoutSpan(-1))}getHeaderRowCount(){let e=this.ctrlsService.getHeaderRowContainerCtrl();return e?e.getRowCount():0}navigateVertically(e,t,i){if(t||(t=this.focusService.getFocusedHeader()),!t)return!1;let{headerRowIndex:s,column:o}=t,r=this.getHeaderRowCount(),{headerRowIndex:n,column:l,headerRowIndexWithoutSpan:a}=0===e?this.headerPositionUtils.getColumnVisibleParent(o,s):this.headerPositionUtils.getColumnVisibleChild(o,s),h=!1;return n<0&&(n=0,l=o,h=!0),n>=r?(n=-1,this.setCurrentHeaderRowWithoutSpan(-1)):void 0!==a&&(this.currentHeaderRowWithoutSpan=a),(!!h||!!l)&&this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:n,column:l},allowUserOverride:!0,event:i})}setCurrentHeaderRowWithoutSpan(e){this.currentHeaderRowWithoutSpan=e}navigateHorizontally(e,t=!1,i){let s,o;let r=this.focusService.getFocusedHeader(),n=this.gos.get("enableRtl");if(-1!==this.currentHeaderRowWithoutSpan?r.headerRowIndex=this.currentHeaderRowWithoutSpan:this.currentHeaderRowWithoutSpan=r.headerRowIndex,o=2===e!==n?"Before":"After",(s=this.headerPositionUtils.findHeader(r,o))||!t)return this.focusService.focusHeaderPosition({headerPosition:s,direction:o,fromTab:t,allowUserOverride:!0,event:i});if(t){let e=this.gos.getCallback("tabToNextHeader");if(e)return this.focusService.focusHeaderPositionFromUserFunc({userFunc:e,headerPosition:s,direction:o})}return this.focusNextHeaderRow(r,o,i)}focusNextHeaderRow(e,t,i){let s;let o=e.headerRowIndex,r=null;if("Before"===t?o>0&&(s=o-1,this.currentHeaderRowWithoutSpan-=1,r=this.headerPositionUtils.findColAtEdgeForHeaderRow(s,"end")):(s=o+1,this.currentHeaderRowWithoutSpan<this.getHeaderRowCount()?this.currentHeaderRowWithoutSpan+=1:this.setCurrentHeaderRowWithoutSpan(-1),r=this.headerPositionUtils.findColAtEdgeForHeaderRow(s,"start")),!r)return!1;let{column:n,headerRowIndex:l}=this.headerPositionUtils.getHeaderIndexToFocus(r.column,null==r?void 0:r.headerRowIndex);return this.focusService.focusHeaderPosition({headerPosition:{column:n,headerRowIndex:l},direction:t,fromTab:!0,allowUserOverride:!0,event:i})}scrollToColumn(e,t="After"){let i;if(!e.getPinned()){if(e instanceof tA){let s=e.getDisplayedLeafColumns();i="Before"===t?e5(s):s[0]}else i=e;this.gridBodyCon.getScrollFeature().ensureColumnVisible(i)}}};K([eB("focusService")],lu.prototype,"focusService",2),K([eB("headerPositionUtils")],lu.prototype,"headerPositionUtils",2),K([eB("ctrlsService")],lu.prototype,"ctrlsService",2),K([eV],lu.prototype,"postConstruct",1),lu=K([ek("headerNavigationService")],lu);var lc=class extends tR{setComp(e,t,i){this.comp=e,this.eGui=t,this.createManagedBean(new oa(i,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedListener(this.eventService,tP.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.onPivotModeChanged.bind(this)),this.addManagedListener(this.eventService,tP.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.onPivotModeChanged(),this.setupHeaderHeight();let s=this.onHeaderContextMenu.bind(this);this.addManagedListener(this.eGui,"contextmenu",s),this.mockContextMenuForIPad(s),this.ctrlsService.register("gridHeaderCtrl",this)}setupHeaderHeight(){let e=this.setHeaderHeight.bind(this);e(),this.addManagedPropertyListener("headerHeight",e),this.addManagedPropertyListener("pivotHeaderHeight",e),this.addManagedPropertyListener("groupHeaderHeight",e),this.addManagedPropertyListener("pivotGroupHeaderHeight",e),this.addManagedPropertyListener("floatingFiltersHeight",e),this.addManagedListener(this.eventService,tP.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,tP.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,e),this.addManagedListener(this.eventService,tP.EVENT_GRID_STYLES_CHANGED,e),this.addManagedListener(this.eventService,tP.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,e)}getHeaderHeight(){return this.headerHeight}setHeaderHeight(){let e;let{columnModel:t}=this,i=0,s=t.getHeaderRowCount();this.filterManager.hasFloatingFilters()&&(s++,i=1);let o=this.columnModel.getColumnGroupHeaderRowHeight(),r=this.columnModel.getColumnHeaderRowHeight(),n=s-(1+i);if(e=i*t.getFloatingFiltersHeight()+n*o+r,this.headerHeight===e)return;this.headerHeight=e;let l=`${e+1}px`;this.comp.setHeightAndMinHeight(l),this.eventService.dispatchEvent({type:tP.EVENT_HEADER_HEIGHT_CHANGED})}onPivotModeChanged(){let e=this.columnModel.isPivotMode();this.comp.addOrRemoveCssClass("ag-pivot-on",e),this.comp.addOrRemoveCssClass("ag-pivot-off",!e)}onDisplayedColumnsChanged(){let e=this.columnModel.getAllDisplayedColumns().some(e=>e.isSpanHeaderHeight());this.comp.addOrRemoveCssClass("ag-header-allow-overflow",e)}onTabKeyDown(e){let t=this.gos.get("enableRtl"),i=e.shiftKey!==t?2:3;(this.headerNavigationService.navigateHorizontally(i,!0,e)||this.focusService.focusNextGridCoreContainer(e.shiftKey))&&e.preventDefault()}handleKeyDown(e){let t=null;switch(e.key){case sk.LEFT:t=2;case sk.RIGHT:q(t)||(t=3),this.headerNavigationService.navigateHorizontally(t,!1,e);break;case sk.UP:t=0;case sk.DOWN:q(t)||(t=1),this.headerNavigationService.navigateVertically(t,null,e)&&e.preventDefault();break;default:return}}onFocusOut(e){let{relatedTarget:t}=e;!(!t&&this.eGui.contains(this.gos.getActiveDomElement()))&&(this.eGui.contains(t)||this.focusService.clearFocusedHeader())}onHeaderContextMenu(e,t,i){if(!e&&!i||!this.menuService.isHeaderContextMenuEnabled())return;let{target:s}=null!=e?e:t;(s===this.eGui||s===this.ctrlsService.getHeaderRowContainerCtrl().getViewport())&&this.menuService.showHeaderContextMenu(void 0,e,i)}mockContextMenuForIPad(e){if(!iG())return;let t=new oQ(this.eGui);this.addManagedListener(t,oQ.EVENT_LONG_TAP,t=>{e(void 0,t.touchStart,t.touchEvent)}),this.addDestroyFunc(()=>t.destroy())}};K([eB("headerNavigationService")],lc.prototype,"headerNavigationService",2),K([eB("focusService")],lc.prototype,"focusService",2),K([eB("columnModel")],lc.prototype,"columnModel",2),K([eB("ctrlsService")],lc.prototype,"ctrlsService",2),K([eB("filterManager")],lc.prototype,"filterManager",2),K([eB("menuService")],lc.prototype,"menuService",2);var lp=class e extends s9{constructor(){super(e.TEMPLATE)}postConstruct(){this.createManagedBean(new lc).setComp({addOrRemoveCssClass:(e,t)=>this.addOrRemoveCssClass(e,t),setHeightAndMinHeight:e=>{this.getGui().style.height=e,this.getGui().style.minHeight=e}},this.getGui(),this.getFocusableElement());let e=e=>{this.createManagedBean(e),this.appendChild(e)};e(new lh("left")),e(new lh(null)),e(new lh("right"))}};lp.TEMPLATE='<div class="ag-header" role="presentation"/>',K([eV],lp.prototype,"postConstruct",1);var lg=lp,lm=class extends tR{addResizeBar(e){let t={dragStartPixels:e.dragStartPixels||0,eElement:e.eResizeBar,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this,e),onDragging:this.onDragging.bind(this,e),includeTouch:!0,stopPropagationForTouch:!0};return this.dragService.addDragSource(t),()=>this.dragService.removeDragSource(t)}onDragStart(e,t){this.dragStartX=t.clientX,this.setResizeIcons();let i=t instanceof MouseEvent&&!0===t.shiftKey;e.onResizeStart(i)}setResizeIcons(){let e=this.ctrlsService.get("gridCtrl");
160e.setResizeCursor(!0),e.disableUserSelect(!0)}onDragStop(e,t){e.onResizeEnd(this.resizeAmount),this.resetIcons()}resetIcons(){let e=this.ctrlsService.get("gridCtrl");e.setResizeCursor(!1),e.disableUserSelect(!1)}onDragging(e,t){this.resizeAmount=t.clientX-this.dragStartX,e.onResizing(this.resizeAmount)}};K([eB("dragService")],lm.prototype,"dragService",2),K([eB("ctrlsService")],lm.prototype,"ctrlsService",2),lm=K([ek("horizontalResizeService")],lm);var lC=class extends tR{hideActiveMenu(){this.hidePopup&&this.hidePopup()}showMenuAfterMouseEvent(e,t,i){this.showPopup(e,s=>{this.popupService.positionPopupUnderMouseEvent({column:e,type:i,mouseEvent:t,ePopup:s})},i,t.target,this.menuService.isLegacyMenuEnabled())}showMenuAfterButtonClick(e,t,i){let s=-1,o="left",r=this.menuService.isLegacyMenuEnabled();!r&&this.gos.get("enableRtl")&&(s=1,o="right");let n=r?void 0:4*s,l=r?void 0:4;this.showPopup(e,s=>{this.popupService.positionPopupByComponent({type:i,eventSource:t,ePopup:s,nudgeX:n,nudgeY:l,alignSide:o,keepWithinBounds:!0,position:"under",column:e})},i,t,r)}showPopup(e,t,i,s,o){let r;let n=e?this.createBean(new r7(e,"COLUMN_MENU")):void 0;if(this.activeMenu=n,!(null==n?void 0:n.hasFilter())||!e)throw Error("AG Grid - unable to show popup filter, filter instantiation failed");let l=document.createElement("div");t4(l,"presentation"),l.classList.add("ag-menu"),o||l.classList.add("ag-filter-menu"),this.tabListener=this.addManagedListener(l,"keydown",e=>this.trapFocusWithin(e,l)),l.appendChild(null==n?void 0:n.getGui());let a=()=>null==n?void 0:n.afterGuiDetached(),h=this.menuService.isColumnMenuAnchoringEnabled()?null!=s?s:this.ctrlsService.getGridBodyCtrl().getGui():void 0,d=this.localeService.getLocaleTextFunc(),u=o&&"columnFilter"!==i?d("ariaLabelColumnMenu","Column Menu"):d("ariaLabelColumnFilter","Column Filter"),c=this.popupService.addPopup({modal:!0,eChild:l,closeOnEsc:!0,closedCallback:t=>{e.setMenuVisible(!1,"contextMenu");let o=t instanceof KeyboardEvent;if(this.tabListener&&(this.tabListener=this.tabListener()),o&&s&&sp(s)){let e=this.focusService.findTabbableParent(s);e&&e.focus()}a(),this.destroyBean(this.activeMenu),this.dispatchVisibleChangedEvent(!1,i,e)},positionCallback:()=>t(l),anchorToElement:h,ariaLabel:u});c&&(this.hidePopup=r=c.hideFunc),n.afterInit().then(()=>{t(l),n.afterGuiAttached({container:i,hidePopup:r})}),e.setMenuVisible(!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,i,e)}trapFocusWithin(e,t){e.key!==sk.TAB||e.defaultPrevented||this.focusService.findNextFocusableElement(t,!1,e.shiftKey)||(e.preventDefault(),this.focusService.focusInto(t,e.shiftKey))}dispatchVisibleChangedEvent(e,t,i){let s={type:tP.EVENT_COLUMN_MENU_VISIBLE_CHANGED,visible:e,switchingTab:!1,key:t,column:null!=i?i:null};this.eventService.dispatchEvent(s)}isMenuEnabled(e){var t;return e.isFilterAllowed()&&(null!=(t=e.getColDef().menuTabs)?t:["filterMenuTab"]).includes("filterMenuTab")}showMenuAfterContextMenuEvent(){}destroy(){this.destroyBean(this.activeMenu),super.destroy()}};K([eB("filterManager")],lC.prototype,"filterManager",2),K([eB("popupService")],lC.prototype,"popupService",2),K([eB("focusService")],lC.prototype,"focusService",2),K([eB("ctrlsService")],lC.prototype,"ctrlsService",2),K([eB("menuService")],lC.prototype,"menuService",2),lC=K([ek("filterMenuFactory")],lC);var lv=((w=lv||{}).TAB_GUARD="ag-tab-guard",w.TAB_GUARD_TOP="ag-tab-guard-top",w.TAB_GUARD_BOTTOM="ag-tab-guard-bottom",w),lf=class extends tR{constructor(e){super(),this.skipTabGuardFocus=!1,this.forcingFocusOut=!1;let{comp:t,eTopGuard:i,eBottomGuard:s,focusTrapActive:o,forceFocusOutWhenTabGuardsAreEmpty:r,focusInnerElement:n,onFocusIn:l,onFocusOut:a,shouldStopEventPropagation:h,onTabKeyDown:d,handleKeyDown:u,eFocusableElement:c}=e;this.comp=t,this.eTopGuard=i,this.eBottomGuard=s,this.providedFocusInnerElement=n,this.eFocusableElement=c,this.focusTrapActive=!!o,this.forceFocusOutWhenTabGuardsAreEmpty=!!r,this.providedFocusIn=l,this.providedFocusOut=a,this.providedShouldStopEventPropagation=h,this.providedOnTabKeyDown=d,this.providedHandleKeyDown=u}postConstruct(){this.createManagedBean(new oa(this.eFocusableElement,{shouldStopEventPropagation:()=>this.shouldStopEventPropagation(),onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e),onFocusIn:e=>this.onFocusIn(e),onFocusOut:e=>this.onFocusOut(e)})),this.activateTabGuards(),[this.eTopGuard,this.eBottomGuard].forEac
160h(e=>this.addManagedListener(e,"focus",this.onFocus.bind(this)))}handleKeyDown(e){this.providedHandleKeyDown&&this.providedHandleKeyDown(e)}tabGuardsAreActive(){return!!this.eTopGuard&&this.eTopGuard.hasAttribute("tabIndex")}shouldStopEventPropagation(){return!!this.providedShouldStopEventPropagation&&this.providedShouldStopEventPropagation()}activateTabGuards(){if(this.forcingFocusOut)return;let e=this.gos.get("tabIndex");this.comp.setTabIndex(e.toString())}deactivateTabGuards(){this.comp.setTabIndex()}onFocus(e){if(this.skipTabGuardFocus){this.skipTabGuardFocus=!1;return}if(this.forceFocusOutWhenTabGuardsAreEmpty&&0===this.focusService.findFocusableElements(this.eFocusableElement,".ag-tab-guard").length){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}let t=e.target===this.eBottomGuard;this.providedFocusInnerElement?this.providedFocusInnerElement(t):this.focusInnerElement(t)}findNextElementOutsideAndFocus(e){let t,i;let s=this.gos.getDocument(),o=this.focusService.findFocusableElements(s.body,null,!0),r=o.indexOf(e?this.eTopGuard:this.eBottomGuard);if(-1===r)return;e?(t=0,i=r):(t=r+1,i=o.length);let n=o.slice(t,i),l=this.gos.get("tabIndex");n.sort((e,t)=>{let i=parseInt(e.getAttribute("tabindex")||"0"),s=parseInt(t.getAttribute("tabindex")||"0");return s===l?1:i===l?-1:0===i?1:0===s?-1:i-s}),n[e?n.length-1:0].focus()}onFocusIn(e){this.focusTrapActive||(this.providedFocusIn&&this.providedFocusIn(e),this.deactivateTabGuards())}onFocusOut(e){!this.focusTrapActive&&(this.providedFocusOut&&this.providedFocusOut(e),this.eFocusableElement.contains(e.relatedTarget)||this.activateTabGuards())}onTabKeyDown(e){if(this.providedOnTabKeyDown){this.providedOnTabKeyDown(e);return}if(this.focusTrapActive||e.defaultPrevented)return;let t=this.tabGuardsAreActive();t&&this.deactivateTabGuards();let i=this.getNextFocusableElement(e.shiftKey);t&&setTimeout(()=>this.activateTabGuards(),0),i&&(i.focus(),e.preventDefault())}focusInnerElement(e=!1){let t=this.focusService.findFocusableElements(this.eFocusableElement);this.tabGuardsAreActive()&&(t.splice(0,1),t.splice(t.length-1,1)),t.length&&t[e?t.length-1:0].focus({preventScroll:!0})}getNextFocusableElement(e){return this.focusService.findNextFocusableElement(this.eFocusableElement,!1,e)}forceFocusOutOfContainer(e=!1){if(this.forcingFocusOut)return;let t=e?this.eTopGuard:this.eBottomGuard;this.activateTabGuards(),this.skipTabGuardFocus=!0,this.forcingFocusOut=!0,t.focus(),window.setTimeout(()=>{this.forcingFocusOut=!1,this.activateTabGuards()})}isTabGuard(e){return e===this.eTopGuard||e===this.eBottomGuard}};K([eB("focusService")],lf.prototype,"focusService",2),K([eV],lf.prototype,"postConstruct",1);var lw=class extends s9{initialiseTabGuard(e){this.eTopGuard=this.createTabGuard("top"),this.eBottomGuard=this.createTabGuard("bottom"),this.eFocusableElement=this.getFocusableElement();let t=[this.eTopGuard,this.eBottomGuard];this.addTabGuards(this.eTopGuard,this.eBottomGuard),this.tabGuardCtrl=this.createManagedBean(new lf({comp:{setTabIndex:e=>{t.forEach(t=>null!=e?t.setAttribute("tabindex",e):t.removeAttribute("tabindex"))}},focusTrapActive:!!e.focusTrapActive,eTopGuard:this.eTopGuard,eBottomGuard:this.eBottomGuard,eFocusableElement:this.eFocusableElement,onFocusIn:e.onFocusIn,onFocusOut:e.onFocusOut,focusInnerElement:e.focusInnerElement,handleKeyDown:e.handleKeyDown,onTabKeyDown:e.onTabKeyDown,shouldStopEventPropagation:e.shouldStopEventPropagation,forceFocusOutWhenTabGuardsAreEmpty:e.forceFocusOutWhenTabGuardsAreEmpty}))}createTabGuard(e){let t=document.createElement("div");return t.classList.add("ag-tab-guard","top"===e?"ag-tab-guard-top":"ag-tab-guard-bottom"),t4(t,"presentation"),t}addTabGuards(e,t){this.eFocusableElement.insertAdjacentElement("afterbegin",e),this.eFocusableElement.insertAdjacentElement("beforeend",t)}removeAllChildrenExceptTabGuards(){let e=[this.eTopGuard,this.eBottomGuard];sd(this.getFocusableElement()),this.addTabGuards(...e)}forceFocusOutOfContainer(e=!1){this.tabGuardCtrl.forceFocusOutOfContainer(e)}appendChild(e,t){sb(e)||(e=e.getGui());let{eBottomGuard:i}=this;i?i.insertAdjacentElement("beforebegin",e):super.appendChild(e,t)}},lE=class e extends lw{constructor(t){super(e.getTemplate(t.cssClass)),this.items=[],this.tabbedItemScrollMap=new Map,this.params=t}postConstruct(){this.setupHeader(),this.params.items&&this.params.items.forEac
160h(e=>this.addItem(e)),this.initialiseTabGuard({onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),focusInnerElement:this.focusInnerElement.bind(this),focusTrapActive:!0}),this.addDestroyFunc(()=>{var e,t,i;return null==(i=null==(t=null==(e=this.activeItem)?void 0:e.tabbedItem)?void 0:t.afterDetachedCallback)?void 0:i.call(t)})}static getTemplate(e){return`<div class="ag-tabs ${e}">
161            <div ref="eHeader"></div>
162            <div ref="eBody" role="presentation" class="ag-tabs-body ${e?`${e}-body`:""}"></div>
163        </div>`}setupHeader(){let{enableCloseButton:e,cssClass:t}=this.params,i=(e,i)=>{e.classList.add(`ag-tabs-${i}`),t&&e.classList.add(`${t}-${i}`)};e?(this.setupCloseButton(i),this.eTabHeader=this.gos.getDocument().createElement("div"),i(this.eHeader,"header-wrapper"),t4(this.eHeader,"presentation"),this.eHeader.appendChild(this.eTabHeader)):this.eTabHeader=this.eHeader,t4(this.eTabHeader,"tablist"),i(this.eTabHeader,"header")}setupCloseButton(e){let t=this.gos.getDocument(),i=t.createElement("button");e(i,"close-button");let s=sV("close",this.gos,void 0,!0);ie(i,this.params.closeButtonAriaLabel),i.appendChild(s),this.addManagedListener(i,"click",()=>{var e,t;return null==(t=(e=this.params).onCloseClicked)?void 0:t.call(e)});let o=t.createElement("div");e(o,"close-button-wrapper"),t4(o,"presentation"),o.appendChild(i),this.eHeader.appendChild(o),this.eCloseButton=i}handleKeyDown(e){switch(e.key){case sk.RIGHT:case sk.LEFT:if(!this.eTabHeader.contains(this.gos.getActiveDomElement()))return;let t=e.key===sk.RIGHT,i=this.gos.get("enableRtl"),s=this.items.indexOf(this.activeItem),o=t!==i?Math.min(s+1,this.items.length-1):Math.max(s-1,0);if(s===o)return;e.preventDefault();let r=this.items[o];this.showItemWrapper(r),r.eHeaderButton.focus();break;case sk.UP:case sk.DOWN:e.stopPropagation()}}onTabKeyDown(e){var t,i,s,o;if(e.defaultPrevented)return;let{focusService:r,eHeader:n,eBody:l,activeItem:a,params:h}=this,{suppressTrapFocus:d,enableCloseButton:u}=h,c=this.gos.getActiveDomElement(),p=e.target,g=e.shiftKey;if(n.contains(c)){e.preventDefault(),u&&g&&!(null==(t=this.eCloseButton)?void 0:t.contains(c))?null==(i=this.eCloseButton)||i.focus():d&&g?null==(s=this.focusService.findFocusableElementBeforeTabGuard(this.gos.getDocument().body,p))||s.focus():this.focusBody(e.shiftKey);return}let m=null;if(!r.isTargetUnderManagedComponent(l,p)||(g&&(m=this.focusService.findFocusableElementBeforeTabGuard(l,p)),m||d||(m=a.eHeaderButton)),!m&&l.contains(c)&&!(m=r.findNextFocusableElement(l,!1,g))){e.preventDefault(),d&&!g?this.forceFocusOutOfContainer(g):u&&!g?null==(o=this.eCloseButton)||o.focus():this.focusHeader();return}m&&(e.preventDefault(),m.focus())}focusInnerElement(e){e?this.focusHeader():this.focusBody(!0)}focusHeader(e){this.activeItem.eHeaderButton.focus({preventScroll:e})}focusBody(e){this.focusService.focusInto(this.eBody,e)}setAfterAttachedParams(e){this.afterAttachedParams=e}showFirstItem(){this.items.length>0&&this.showItemWrapper(this.items[0])}addItem(e){let t=document.createElement("span");t4(t,"tab"),t.setAttribute("tabindex","-1"),t.appendChild(e.title),t.classList.add("ag-tab"),this.eTabHeader.appendChild(t),ie(t,e.titleLabel);let i={tabbedItem:e,eHeaderButton:t};this.items.push(i),t.addEventListener("click",this.showItemWrapper.bind(this,i))}showItem(e){let t=this.items.find(t=>t.tabbedItem===e);t&&this.showItemWrapper(t)}showItemWrapper(e){var t,i,s,o,r,n;let{tabbedItem:l,eHeaderButton:a}=e;if(null==(i=(t=this.params).onItemClicked)||i.call(t,{item:l}),this.activeItem===e){null==(o=(s=this.params).onActiveItemClicked)||o.call(s);return}this.lastScrollListener&&(this.lastScrollListener=this.lastScrollListener()),sd(this.eBody),l.bodyPromise.then(e=>{this.eBody.appendChild(e);let t=!this.focusService.isKeyboardMode();if(this.params.suppressFocusBodyOnOpen||this.focusService.focusInto(this.eBody,!1,t),l.afterAttachedCallback&&l.afterAttachedCallback(this.afterAttachedParams),this.params.keepScrollPosition){let t=l.getScrollableContainer&&l.getScrollableContainer()||e;this.lastScrollListener=this.addManagedListener(t,"scroll",()=>{this.tabbedItemScrollMap.set(l.name,t.scrollTop)});let i=this.tabbedItemScrollMap.get(l.name);void 0!==i&&setTimeout(()=>{t.scrollTop=i},0)}}),this.activeItem&&(this.activeItem.eHeaderButton.classList.remove("ag-tab-selected"),null==(n=(r=this.activeItem.tabbedItem).afterDetachedCallback)||n.call(r)),a.classList.add("ag-tab-selected"),this.activeItem=e}};K([eB("focusService")],lE.prototype,"focusService",2),K([ot("eHeader")],lE.prototype,"eHeader",2),K([ot("eBody")],lE.prototype,"eBody",2),K([eV],lE.prototype,"postConstruct",1);var lS=lE,ly=class extends tR{constructor(){super(...arguments),this.polyfillFunctions=[]}
163observeResize(e,t){let i=this.gos.getWindow(),s=()=>{var i,s;let o=null!=(i=null==e?void 0:e.clientWidth)?i:0,r=null!=(s=null==e?void 0:e.clientHeight)?s:0,n=!0,l=()=>{var i,s;if(n){let n=null!=(i=null==e?void 0:e.clientWidth)?i:0,a=null!=(s=null==e?void 0:e.clientHeight)?s:0;(n!==o||a!==r)&&(o=n,r=a,t()),this.doNextPolyfillTurn(l)}};return l(),()=>n=!1},o=this.gos.get("suppressBrowserResizeObserver");return i.ResizeObserver&&!o?(()=>{let s=new i.ResizeObserver(t);return s.observe(e),()=>s.disconnect()})():this.getFrameworkOverrides().wrapIncoming(()=>s(),"resize-observer")}doNextPolyfillTurn(e){this.polyfillFunctions.push(e),this.schedulePolyfill()}schedulePolyfill(){this.polyfillScheduled||(this.polyfillScheduled=!0,window.setTimeout(()=>{let e=this.polyfillFunctions;this.polyfillScheduled=!1,this.polyfillFunctions=[],e.forEach(e=>e())},50))}};ly=K([ek("resizeObserverService")],ly);var lR=class extends tR{constructor(){super(...arguments),this.createTasksP1={list:[],sorted:!1},this.createTasksP2={list:[],sorted:!1},this.destroyTasks=[],this.ticking=!1,this.scrollGoingDown=!0,this.lastPage=0,this.lastScrollTop=0,this.taskCount=0,this.cancelledTasks=new Set}setScrollTop(e){let t=this.gos.get("pagination");if(this.scrollGoingDown=e>=this.lastScrollTop,t&&0===e){let e=this.paginationProxy.getCurrentPage();e!==this.lastPage&&(this.lastPage=e,this.scrollGoingDown=!0)}this.lastScrollTop=e}init(){this.useAnimationFrame=!this.gos.get("suppressAnimationFrame")}isOn(){return this.useAnimationFrame}verifyAnimationFrameOn(e){!1===this.useAnimationFrame&&console.warn(`AG Grid: AnimationFrameService.${e} called but animation frames are off`)}createTask(e,t,i){this.verifyAnimationFrameOn(i);let s={task:e,index:t,createOrder:++this.taskCount};this.addTaskToList(this[i],s),this.schedule()}cancelTask(e){this.cancelledTasks.add(e)}addTaskToList(e,t){e.list.push(t),e.sorted=!1}sortTaskList(e){if(e.sorted)return;let t=this.scrollGoingDown?1:-1;e.list.sort((e,i)=>e.index!==i.index?t*(i.index-e.index):i.createOrder-e.createOrder),e.sorted=!0}addDestroyTask(e){this.verifyAnimationFrameOn("createTasksP3"),this.destroyTasks.push(e),this.schedule()}executeFrame(e){this.verifyAnimationFrameOn("executeFrame");let t=this.createTasksP1,i=t.list,s=this.createTasksP2,o=s.list,r=this.destroyTasks,n=new Date().getTime(),l=new Date().getTime()-n,a=e<=0,h=this.ctrlsService.getGridBodyCtrl();for(;a||l<e;){if(!h.getScrollFeature().scrollGridIfNeeded()){let e;if(i.length)this.sortTaskList(t),e=i.pop().task;else if(o.length)this.sortTaskList(s),e=o.pop().task;else if(r.length)e=r.pop();else{this.cancelledTasks.clear();break}this.cancelledTasks.has(e)||e()}l=new Date().getTime()-n}i.length||o.length||r.length?this.requestFrame():this.stopTicking()}stopTicking(){this.ticking=!1}flushAllFrames(){this.useAnimationFrame&&this.executeFrame(-1)}schedule(){this.useAnimationFrame&&(this.ticking||(this.ticking=!0,this.requestFrame()))}requestFrame(){let e=this.executeFrame.bind(this,60);this.requestAnimationFrame(e)}requestAnimationFrame(e){let t=this.gos.getWindow();t.requestAnimationFrame?t.requestAnimationFrame(e):t.webkitRequestAnimationFrame?t.webkitRequestAnimationFrame(e):t.setTimeout(e,0)}isQueueEmpty(){return!this.ticking}debounce(e){let t=!1;return()=>{if(!this.isOn()){window.setTimeout(e,0);return}t||(t=!0,this.addDestroyTask(()=>{t=!1,e()}))}}};K([eB("ctrlsService")],lR.prototype,"ctrlsService",2),K([eB("paginationProxy")],lR.prototype,"paginationProxy",2),K([eV],lR.prototype,"init",1),lR=K([ek("animationFrameService")],lR);var lD=((E=lD||{}).EVERYTHING="group",E.FILTER="filter",E.SORT="sort",E.MAP="map",E.AGGREGATE="aggregate",E.FILTER_AGGREGATES="filter_aggregates",E.PIVOT="pivot",E.NOTHING="nothing",E),lT=class extends tR{postConstruct(){this.isClientSideRowModel="clientSide"===this.rowModel.getType()}expandRows(e){if(!this.isClientSideRowModel)return;let t=new Set(e);this.rowModel.forEachNode(e=>{e.id&&t.has(e.id)&&(e.expanded=!0)}),this.onGroupExpandedOrCollapsed()}getExpandedRows(){let e=[];return this.rowModel.forEachNode(({expanded:t,id:i})=>{t&&i&&e.push(i)}),e}expandAll(e){this.isClientSideRowModel&&this.rowModel.expandOrCollapseAll(e)}setRowNodeExpanded(e,t,i,s){e&&(i&&e.parent&&-1!==e.parent.level&&this.setRowNodeExpanded(e.parent,t,i,s),e.setExpanded(t,void 0,s))}onGroupExpandedOrCollapsed(){this.isClientSideRowModel&&this.rowModel.refreshModel({step:"map"})}};K([eB("rowModel")],lT.prototype,"rowModel",2),K([eV],lT.prototype,"postConstruct",1),lT=K([ek("expansionService")],lT);var lb=class extends tR{postConstruct(){var e;this.activeMenuFactory=null!=(e=this.enterpriseMenuFactory)?e:this.filterMenuFactory}showColumnMenu(e){this.showColumnMenuCommon(this.activeMenuFactory,e,"columnMenu")}showFilterMenu(e){let t=this.enterpriseMenuFactory&&this.isLegacyMenuEnabled()?this.enterpriseMenuFactory:this.filterMenuFactory;this.showColumnMenuCommon(t,e,e.containerType,!0)}showHeaderContextMenu(e,t,i){this.activeMenuFactory.showMenuAfterContextMenuEvent(e,t,i)}getContextMenuPosition(e,t){let i=this.getRowCtrl(e),s=this.getCellGui(i,t);if(!s)return i?{x:0,y:i.getRowYPosition()}:{x:0,y:0};let o=s.getBoundingClientRect();return{x:o.x+o.width/2,y:o.y+o.height/2}}showContextMenu(e){var t,i,s;
163let{column:o,rowNode:r}=e,{anchorToElement:n,value:l}=e;r&&o&&null==l&&(l=r.getValueFromValueService(o)),null==n&&(n=this.getContextMenuAnchorElement(r,o)),null==(s=this.contextMenuFactory)||s.onContextMenu(null!=(t=e.mouseEvent)?t:null,null!=(i=e.touchEvent)?i:null,null!=r?r:null,null!=o?o:null,l,n)}showColumnChooser(e){var t;null==(t=this.columnChooserFactory)||t.showColumnChooser(e)}hidePopupMenu(){var e;null==(e=this.contextMenuFactory)||e.hideActiveMenu(),this.activeMenuFactory.hideActiveMenu()}hideColumnChooser(){var e;null==(e=this.columnChooserFactory)||e.hideActiveColumnChooser()}isColumnMenuInHeaderEnabled(e){let{suppressMenu:t,suppressHeaderMenuButton:i}=e.getColDef();return!(null!=i?i:t)&&this.activeMenuFactory.isMenuEnabled(e)&&(this.isLegacyMenuEnabled()||!!this.enterpriseMenuFactory)}isFilterMenuInHeaderEnabled(e){return!e.getColDef().suppressHeaderFilterButton&&this.filterManager.isFilterAllowed(e)}isHeaderContextMenuEnabled(e){return!(null==e?void 0:e.getColDef().suppressHeaderContextMenu)&&"new"===this.getColumnMenuType()}isHeaderMenuButtonAlwaysShowEnabled(){return this.isSuppressMenuHide()}isHeaderMenuButtonEnabled(){let e=!this.isSuppressMenuHide();return!(iG()&&e)}isHeaderFilterButtonEnabled(e){return this.isFilterMenuInHeaderEnabled(e)&&!this.isLegacyMenuEnabled()&&!this.isFloatingFilterButtonDisplayed(e)}isFilterMenuItemEnabled(e){return this.filterManager.isFilterAllowed(e)&&!this.isLegacyMenuEnabled()&&!this.isFilterMenuInHeaderEnabled(e)&&!this.isFloatingFilterButtonDisplayed(e)}isColumnMenuAnchoringEnabled(){return!this.isLegacyMenuEnabled()}areAdditionalColumnMenuItemsEnabled(){return"new"===this.getColumnMenuType()}isLegacyMenuEnabled(){return"legacy"===this.getColumnMenuType()}isFloatingFilterButtonEnabled(e){var t;let i=e.getColDef(),s=null==(t=i.floatingFilterComponentParams)?void 0:t.suppressFilterButton;return null!=s&&ew("As of v31.1, 'colDef.floatingFilterComponentParams.suppressFilterButton' is deprecated. Use 'colDef.suppressFloatingFilterButton' instead."),null==i.suppressFloatingFilterButton?!s:!i.suppressFloatingFilterButton}getColumnMenuType(){var e;return null!=(e=this.gos.get("columnMenu"))?e:"legacy"}isFloatingFilterButtonDisplayed(e){return!!e.getColDef().floatingFilter&&this.isFloatingFilterButtonEnabled(e)}isSuppressMenuHide(){let e=this.gos.get("suppressMenuHide");return this.isLegacyMenuEnabled()?e:!this.gos.exists("suppressMenuHide")||e}showColumnMenuCommon(e,t,i,s){let{column:o,positionBy:r}=t;if("button"===r){let{buttonElement:r}=t;e.showMenuAfterButtonClick(o,r,i,s)}else if("mouse"===r){let{mouseEvent:r}=t;e.showMenuAfterMouseEvent(o,r,i,s)}else o&&(this.ctrlsService.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(o,"auto"),this.animationFrameService.requestAnimationFrame(()=>{let t=this.ctrlsService.getHeaderRowContainerCtrl(o.getPinned()).getHeaderCtrlForColumn(o);e.showMenuAfterButtonClick(o,t.getAnchorElementForMenu(s),i,!0)}))}getRowCtrl(e){let{rowIndex:t,rowPinned:i}=e||{};if(null!=t)return this.rowRenderer.getRowByPosition({rowIndex:t,rowPinned:i})||void 0}getCellGui(e,t){if(!e||!t)return;let i=e.getCellCtrl(t);return(null==i?void 0:i.getGui())||void 0}getContextMenuAnchorElement(e,t){let i=this.ctrlsService.getGridBodyCtrl().getGridBodyElement(),s=this.getRowCtrl(e);return s?this.getCellGui(s,t)||(s.isFullWidth()?s.getFullWidthElement():i):i}};K([eB("filterMenuFactory")],lb.prototype,"filterMenuFactory",2),K([eB("ctrlsService")],lb.prototype,"ctrlsService",2),K([eB("animationFrameService")],lb.prototype,"animationFrameService",2),K([eB("filterManager")],lb.prototype,"filterManager",2),K([eB("rowRenderer")],lb.prototype,"rowRenderer",2),K([eW("columnChooserFactory")],lb.prototype,"columnChooserFactory",2),K([eW("contextMenuFactory")],lb.prototype,"contextMenuFactory",2),K([eW("enterpriseMenuFactory")],lb.prototype,"enterpriseMenuFactory",2),K([eV],lb.prototype,"postConstruct",1),lb=K([ek("menuService")],lb);var lA=class extends tR{postConstruct(){this.ctrlsService.whenReady(e=>{this.centerRowContainerCtrl=e.center})}getPreferredWidthForColumn(e,t){let i=this.getHeaderCellForColumn(e);if(!i)return -1;let s=this.rowRenderer.getAllCellsForColumn(e);return t||s.push(i),this.addElementsToContainerAndGetWidth(s)}getPreferredWidthForColumnGroup(e){let t=this.getHeaderCellForColumn(e);return t?this.addElementsToContainerAndGetWidth([t]):-1}addElementsToContainerAndGetWidth(e){let t=document.createElement("form");t.style.position="fixed";let i=this.centerRowContainerCtrl.getContainerElement();
163e.forEach(e=>this.cloneItemIntoDummy(e,t)),i.appendChild(t);let s=t.offsetWidth;return i.removeChild(t),s+this.getAutoSizePadding()}getAutoSizePadding(){return this.gos.get("autoSizePadding")}getHeaderCellForColumn(e){let t=null;return this.ctrlsService.getHeaderRowContainerCtrls().forEach(i=>{let s=i.getHtmlElementForColumnHeader(e);null!=s&&(t=s)}),t}cloneItemIntoDummy(e,t){let i=e.cloneNode(!0);i.style.width="",i.style.position="static",i.style.left="";let s=document.createElement("div"),o=s.classList;["ag-header-cell","ag-header-group-cell"].some(e=>i.classList.contains(e))?(o.add("ag-header","ag-header-row"),s.style.position="static"):o.add("ag-row");let r=e.parentElement;for(;r;){if(["ag-header-row","ag-row"].some(e=>r.classList.contains(e))){for(let e=0;e<r.classList.length;e++){let t=r.classList[e];"ag-row-position-absolute"!=t&&o.add(t)}break}r=r.parentElement}s.appendChild(i),t.appendChild(s)}};K([eB("rowRenderer")],lA.prototype,"rowRenderer",2),K([eB("ctrlsService")],lA.prototype,"ctrlsService",2),K([eB("rowCssClassCalculator")],lA.prototype,"rowCssClassCalculator",2),K([eV],lA.prototype,"postConstruct",1),lA=K([ek("autoWidthCalculator")],lA);var lP=class extends tR{constructor(e,t){super(),this.createRowCon=e,this.destroyRowCtrls=t,this.stickyTopRowCtrls=[],this.stickyBottomRowCtrls=[],this.topContainerHeight=0,this.bottomContainerHeight=0}postConstruct(){this.isClientSide="clientSide"===this.rowModel.getType(),this.ctrlsService.whenReady(e=>{this.gridBodyCtrl=e.gridBodyCtrl})}getStickyTopRowCtrls(){return this.stickyTopRowCtrls}getStickyBottomRowCtrls(){return this.stickyBottomRowCtrls}getLastPixelOfGroup(e){return this.isClientSide?this.getClientSideLastPixelOfGroup(e):this.getServerSideLastPixelOfGroup(e)}getFirstPixelOfGroup(e){return e.footer?e.sibling.rowTop+e.sibling.rowHeight-1:e.hasChildren()?e.rowTop-1:0}getServerSideLastPixelOfGroup(e){var t,i,s,o;if(this.isClientSide)throw Error("This func should only be called in server side row model.");if(e.isExpandable()||e.footer){if(e.master)return e.detailNode.rowTop+e.detailNode.rowHeight;if(!e.sibling||1===Math.abs(e.sibling.rowIndex-e.rowIndex)){let r=null==(t=e.childStore)?void 0:t.getStoreBounds();return e.footer&&(r=null==(i=e.sibling.childStore)?void 0:i.getStoreBounds()),(null!=(s=null==r?void 0:r.heightPx)?s:0)+(null!=(o=null==r?void 0:r.topPx)?o:0)}return e.footer?e.rowTop+e.rowHeight:e.sibling.rowTop+e.sibling.rowHeight}return Number.MAX_SAFE_INTEGER}getClientSideLastPixelOfGroup(e){if(!this.isClientSide)throw Error("This func should only be called in client side row model.");if(e.isExpandable()||e.footer){let t=e.footer&&0===e.rowIndex,i=!e.sibling||1===Math.abs(e.sibling.rowIndex-e.rowIndex);if(t||i){let t=e.footer?e.sibling:e;for(;t.isExpandable()&&t.expanded;)if(t.master)t=t.detailNode;else if(t.childrenAfterSort){if(0===t.childrenAfterSort.length)break;t=e5(t.childrenAfterSort)}return t.rowTop+t.rowHeight}return e.footer?e.rowTop+e.rowHeight:e.sibling.rowTop+e.sibling.rowHeight}return Number.MAX_SAFE_INTEGER}updateStickyRows(e){let t="top"===e,i=0;if(!this.canRowsBeSticky())return this.refreshNodesAndContainerHeight(e,new Set,i);let s=t?this.rowRenderer.getFirstVisibleVerticalPixel():this.rowRenderer.getLastVisibleVerticalPixel(),o=new Set,r=e=>{if(o.add(e),t){let t=this.getLastPixelOfGroup(e),o=s+i+e.rowHeight;t<o?e.stickyRowTop=i+(t-o):e.stickyRowTop=i}else{let t=this.getFirstPixelOfGroup(e),o=s-(i+e.rowHeight);t>o?e.stickyRowTop=i-(t-o):e.stickyRowTop=i}i=0,o.forEach(e=>{let t=e.stickyRowTop+e.rowHeight;i<t&&(i=t)})},n=this.areFooterRowsStickySuppressed(),l=this.gos.get("suppressGroupRowsSticky"),a=e=>!!e.displayed&&(e.footer?!0!==n&&("grand"!==n||-1!==e.level)&&("group"!==n||!(e.level>-1))&&!o.has(e):!!e.isExpandable()&&!0!==l&&!o.has(e)&&e.expanded);for(let e=0;e<100;e++){let e=s+i;t||(e=s-i);let o=this.rowModel.getRowIndexAtPixel(e),n=this.rowModel.getRow(o);if(null==n)break;let l=this.getStickyAncestors(n).find(e=>(t?e.rowIndex<o:e.rowIndex>o)&&a(e));if(l){r(l);continue}if((t?n.rowTop<e:n.rowTop+n.rowHeight>e)&&a(n)){r(n);continue}break}
163return t||o.forEach(e=>{e.stickyRowTop=i-(e.stickyRowTop+e.rowHeight)}),this.refreshNodesAndContainerHeight(e,o,i)}areFooterRowsStickySuppressed(){let e=this.gos.get("suppressStickyTotalRow");if(!0===e)return!0;let t=!!this.gos.get("groupIncludeFooter")||"group"===e,i=!!this.gos.get("groupIncludeTotalFooter")||"grand"===e;return!!t&&!!i||(i?"grand":!!t&&"group")}canRowsBeSticky(){let e=this.gos.isGroupRowsSticky(),t=this.areFooterRowsStickySuppressed(),i=this.gos.get("suppressGroupRowsSticky");return e&&(!t||!i)}getStickyAncestors(e){let t=[],i=e.footer?e.sibling:e.parent;for(;i;)i.sibling&&t.push(i.sibling),t.push(i),i=i.parent;return t.reverse()}checkStickyRows(){let e=this.updateStickyRows("top"),t=this.updateStickyRows("bottom");return e||t}destroyStickyCtrls(){this.refreshNodesAndContainerHeight("top",new Set,0),this.refreshNodesAndContainerHeight("bottom",new Set,0)}refreshStickyNode(e){let t=new Set;if(this.stickyTopRowCtrls.some(t=>t.getRowNode()===e)){for(let i=0;i<this.stickyTopRowCtrls.length;i++){let s=this.stickyTopRowCtrls[i].getRowNode();s!==e&&t.add(s)}this.refreshNodesAndContainerHeight("top",t,this.topContainerHeight)&&this.checkStickyRows();return}for(let i=0;i<this.stickyBottomRowCtrls.length;i++){let s=this.stickyBottomRowCtrls[i].getRowNode();s!==e&&t.add(s)}this.refreshNodesAndContainerHeight("bottom",t,this.bottomContainerHeight)&&this.checkStickyRows()}refreshNodesAndContainerHeight(e,t,i){let s="top"===e,o=s?this.stickyTopRowCtrls:this.stickyBottomRowCtrls,r={},n=[];for(let e=0;e<o.length;e++){let i=o[e].getRowNode();if(!t.has(i)){r[i.id]=o[e],i.sticky=!1;continue}n.push(o[e])}let l=new Set;for(let e=0;e<n.length;e++)l.add(n[e].getRowNode());let a=[];t.forEach(e=>{l.has(e)||(e.sticky=!0,a.push(this.createRowCon(e,!1,!1)))});let h=!!a.length||n.length!==o.length;s?this.topContainerHeight!==i&&(this.topContainerHeight=i,this.gridBodyCtrl.setStickyTopHeight(i),h=!0):this.bottomContainerHeight!==i&&(this.bottomContainerHeight=i,this.gridBodyCtrl.setStickyBottomHeight(i),h=!0),this.destroyRowCtrls(r,!1);let d=[...n,...a];return d.sort((e,t)=>t.getRowNode().rowIndex-e.getRowNode().rowIndex),s||d.reverse(),d.forEach(e=>e.setRowTop(e.getRowNode().stickyRowTop)),!!h&&(s?this.stickyTopRowCtrls=d:this.stickyBottomRowCtrls=d,!0)}};K([eB("rowModel")],lP.prototype,"rowModel",2),K([eB("rowRenderer")],lP.prototype,"rowRenderer",2),K([eB("ctrlsService")],lP.prototype,"ctrlsService",2),K([eV],lP.prototype,"postConstruct",1);var lF=class extends tR{constructor(){super(...arguments),this.destroyFuncsForColumnListeners=[],this.rowCtrlsByRowIndex={},this.zombieRowCtrls={},this.allRowCtrls=[],this.topRowCtrls=[],this.bottomRowCtrls=[],this.refreshInProgress=!1,this.dataFirstRenderedFired=!1,this.setupRangeSelectionListeners=()=>{let e=()=>{this.getAllCellCtrls().forEach(e=>e.onRangeSelectionChanged())},t=()=>{this.getAllCellCtrls().forEach(e=>e.updateRangeBordersIfRangeCount())},i=()=>{this.eventService.addEventListener(tP.EVENT_RANGE_SELECTION_CHANGED,e),this.eventService.addEventListener(tP.EVENT_COLUMN_MOVED,t),this.eventService.addEventListener(tP.EVENT_COLUMN_PINNED,t),this.eventService.addEventListener(tP.EVENT_COLUMN_VISIBLE,t)},s=()=>{this.eventService.removeEventListener(tP.EVENT_RANGE_SELECTION_CHANGED,e),this.eventService.removeEventListener(tP.EVENT_COLUMN_MOVED,t),this.eventService.removeEventListener(tP.EVENT_COLUMN_PINNED,t),this.eventService.removeEventListener(tP.EVENT_COLUMN_VISIBLE,t)};this.addDestroyFunc(()=>s()),this.addManagedPropertyListener("enableRangeSelection",e=>{e.currentValue?i():s()}),this.gos.get("enableRangeSelection")&&i()}}postConstruct(){this.ctrlsService.whenReady(e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.initialise()})}initialise(){if(this.addManagedListener(this.eventService,tP.EVENT_PAGINATION_CHANGED,this.onPageLoaded.bind(this)),this.addManagedListener(this.eventService,tP.EVENT_PINNED_ROW_DATA_CHANGED,this.onPinnedRowDataChanged.bind(this)),this.addManagedListener(this.eventService,tP.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,tP.EVENT_BODY_SCROLL,this.onBodyScroll.bind(this)),this.addManagedListener(this.eventService,tP.EVENT_BODY_HEIGHT_CHANGED,this.redraw.bind(this)),this.addManagedPropertyListeners(["domL
163ayout","embedFullWidthRows"],()=>this.onDomLayoutChanged()),this.addManagedPropertyListeners(["suppressMaxRenderedRowRestriction","rowBuffer"],()=>this.redraw()),this.addManagedPropertyListeners(["suppressCellFocus","getBusinessKeyForNode","fullWidthCellRenderer","fullWidthCellRendererParams","rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules","suppressStickyTotalRow","groupRowRenderer","groupRowRendererParams","loadingCellRenderer","loadingCellRendererParams","detailCellRenderer","detailCellRendererParams","enableRangeSelection","enableCellTextSelection"],()=>this.redrawRows()),this.gos.isGroupRowsSticky()){let e=this.rowModel.getType();("clientSide"===e||"serverSide"===e)&&(this.stickyRowFeature=this.createManagedBean(new lP(this.createRowCon.bind(this),this.destroyRowCtrls.bind(this))))}this.registerCellEventListeners(),this.initialiseCache(),this.printLayout=this.gos.isDomLayout("print"),this.embedFullWidthRows=this.printLayout||this.gos.get("embedFullWidthRows"),this.redrawAfterModelUpdate()}initialiseCache(){if(this.gos.get("keepDetailRows")){let e=this.getKeepDetailRowsCount();this.cachedRowCtrls=new lL(null!=e?e:3)}}getKeepDetailRowsCount(){return this.gos.get("keepDetailRowsCount")}getStickyTopRowCtrls(){return this.stickyRowFeature?this.stickyRowFeature.getStickyTopRowCtrls():[]}getStickyBottomRowCtrls(){return this.stickyRowFeature?this.stickyRowFeature.getStickyBottomRowCtrls():[]}updateAllRowCtrls(){let e=eu(this.rowCtrlsByRowIndex),t=eu(this.zombieRowCtrls),i=this.cachedRowCtrls?this.cachedRowCtrls.getEntries():[];t.length>0||i.length>0?this.allRowCtrls=[...e,...t,...i]:this.allRowCtrls=e}onCellFocusChanged(e){this.getAllCellCtrls().forEach(t=>t.onCellFocused(e)),this.getFullWidthRowCtrls().forEach(t=>t.onFullWidthRowFocused(e))}registerCellEventListeners(){this.addManagedListener(this.eventService,tP.EVENT_CELL_FOCUSED,e=>{this.onCellFocusChanged(e)}),this.addManagedListener(this.eventService,tP.EVENT_CELL_FOCUS_CLEARED,()=>{this.onCellFocusChanged()}),this.addManagedListener(this.eventService,tP.EVENT_FLASH_CELLS,e=>{this.getAllCellCtrls().forEach(t=>t.onFlashCells(e))}),this.addManagedListener(this.eventService,tP.EVENT_COLUMN_HOVER_CHANGED,()=>{this.getAllCellCtrls().forEach(e=>e.onColumnHover())}),this.addManagedListener(this.eventService,tP.EVENT_DISPLAYED_COLUMNS_CHANGED,()=>{this.getAllCellCtrls().forEach(e=>e.onDisplayedColumnsChanged())}),this.addManagedListener(this.eventService,tP.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,()=>{this.printLayout&&this.getAllCellCtrls().forEach(e=>e.onLeftChanged())}),this.setupRangeSelectionListeners(),this.refreshListenersToColumnsForCellComps(),this.addManagedListener(this.eventService,tP.EVENT_GRID_COLUMNS_CHANGED,this.refreshListenersToColumnsForCellComps.bind(this)),this.addDestroyFunc(this.removeGridColumnListeners.bind(this))}removeGridColumnListeners(){this.destroyFuncsForColumnListeners.forEach(e=>e()),this.destroyFuncsForColumnListeners.length=0}refreshListenersToColumnsForCellComps(){this.removeGridColumnListeners(),this.columnModel.getAllGridColumns().forEach(e=>{let t=t=>{this.getAllCellCtrls().forEach(i=>{i.getColumn()===e&&t(i)})},i=()=>{t(e=>e.onLeftChanged())},s=()=>{t(e=>e.onWidthChanged())},o=()=>{t(e=>e.onFirstRightPinnedChanged())},r=()=>{t(e=>e.onLastLeftPinnedChanged())},n=()=>{t(e=>e.onColDefChanged())};e.addEventListener("leftChanged",i),e.addEventListener("widthChanged",s),e.addEventListener("firstRightPinnedChanged",o),e.addEventListener("lastLeftPinnedChanged",r),e.addEventListener("colDefChanged",n),this.destroyFuncsForColumnListeners.push(()=>{e.removeEventListener("leftChanged",i),e.removeEventListener("widthChanged",s),e.removeEventListener("firstRightPinnedChanged",o),e.removeEventListener("lastLeftPinnedChanged",r),e.removeEventListener("colDefChanged",n)})})}onDomLayoutChanged(){let e=this.gos.isDomLayout("print"),t=e||this.gos.get("embedFullWidthRows"),i=t!==this.embedFullWidthRows||this.printLayout!==e;this.printLayout=e,this.embedFullWidthRows=t,i&&this.redrawAfterModelUpdate({domLayoutChanged:!0})}
163datasourceChanged(){this.firstRenderedRow=0,this.lastRenderedRow=-1;let e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e)}onPageLoaded(e){let t={recycleRows:e.keepRenderedRows,animate:e.animate,newData:e.newData,newPage:e.newPage,onlyBody:!0};this.redrawAfterModelUpdate(t)}getAllCellsForColumn(e){let t=[];return this.getAllRowCtrls().forEach(i=>{let s=i.getCellElement(e);s&&t.push(s)}),t}refreshFloatingRowComps(){this.refreshFloatingRows(this.topRowCtrls,this.pinnedRowModel.getPinnedTopRowData()),this.refreshFloatingRows(this.bottomRowCtrls,this.pinnedRowModel.getPinnedBottomRowData())}getTopRowCtrls(){return this.topRowCtrls}getCentreRowCtrls(){return this.allRowCtrls}getBottomRowCtrls(){return this.bottomRowCtrls}refreshFloatingRows(e,t){e.forEach(e=>{e.destroyFirstPass(),e.destroySecondPass()}),e.length=0,t&&t.forEach(t=>{let i=new nD(t,this.beans,!1,!1,this.printLayout);e.push(i)})}onPinnedRowDataChanged(){this.redrawAfterModelUpdate({recycleRows:!0})}redrawRow(e,t=!1){var i;if(e.sticky)this.stickyRowFeature.refreshStickyNode(e);else if(null==(i=this.cachedRowCtrls)?void 0:i.has(e)){this.cachedRowCtrls.removeRow(e);return}else{let t=t=>{let i=t[e.rowIndex];i&&i.getRowNode()===e&&(i.destroyFirstPass(),i.destroySecondPass(),t[e.rowIndex]=this.createRowCon(e,!1,!1))};switch(e.rowPinned){case"top":t(this.topRowCtrls);break;case"bottom":t(this.bottomRowCtrls);break;default:t(this.rowCtrlsByRowIndex),this.updateAllRowCtrls()}}t||this.dispatchDisplayedRowsChanged(!1)}redrawRows(e){if(null!=e){null==e||e.forEach(e=>this.redrawRow(e,!0)),this.dispatchDisplayedRowsChanged(!1);return}this.redrawAfterModelUpdate()}getCellToRestoreFocusToAfterRefresh(e){let t=(null==e?void 0:e.suppressKeepFocus)?null:this.focusService.getFocusCellToUseAfterRefresh();if(null==t)return null;let i=this.gos.getActiveDomElement(),s=this.gos.getDomData(i,nS.DOM_DATA_KEY_CELL_CTRL),o=this.gos.getDomData(i,nD.DOM_DATA_KEY_ROW_CTRL);return s||o?t:null}redrawAfterModelUpdate(e={}){this.getLockOnRefresh();let t=this.getCellToRestoreFocusToAfterRefresh(e);this.updateContainerHeights(),this.scrollToTopIfNewData(e);let i=!e.domLayoutChanged&&!!e.recycleRows,s=e.animate&&this.gos.isAnimateRows(),o=i?this.getRowsToRecycle():null;i||this.removeAllRowComps(),this.workOutFirstAndLastRowsToRender(),this.stickyRowFeature&&this.stickyRowFeature.checkStickyRows(),this.recycleRows(o,s),this.gridBodyCtrl.updateRowCount(),e.onlyBody||this.refreshFloatingRowComps(),this.dispatchDisplayedRowsChanged(),null!=t&&this.restoreFocusedCell(t),this.releaseLockOnRefresh()}scrollToTopIfNewData(e){let t=e.newData||e.newPage,i=this.gos.get("suppressScrollOnNewData");t&&!i&&this.gridBodyCtrl.getScrollFeature().scrollToTop()}updateContainerHeights(){if(this.printLayout){this.rowContainerHeightService.setModelHeight(null);return}let e=this.paginationProxy.getCurrentPageHeight();0===e&&(e=1),this.rowContainerHeightService.setModelHeight(e)}getLockOnRefresh(){if(this.refreshInProgress)throw Error("AG Grid: cannot get grid to draw rows when it is in the middle of drawing rows. Your code probably called a grid API method while the grid was in the render stage. To overcome this, put the API call into a timeout, e.g. instead of api.redrawRows(), call setTimeout(function() { api.redrawRows(); }
163, 0). To see what part of your code that caused the refresh check this stacktrace.");this.refreshInProgress=!0}releaseLockOnRefresh(){this.refreshInProgress=!1}isRefreshInProgress(){return this.refreshInProgress}restoreFocusedCell(e){e&&(this.focusService.setRestoreFocusedCell(e),this.onCellFocusChanged(this.beans.gos.addGridCommonParams({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,type:"mock"})))}stopEditing(e=!1){this.getAllRowCtrls().forEach(t=>{t.stopEditing(e)})}getAllCellCtrls(){let e=[],t=this.getAllRowCtrls(),i=t.length;for(let s=0;s<i;s++){let i=t[s].getAllCellCtrls(),o=i.length;for(let t=0;t<o;t++)e.push(i[t])}return e}getAllRowCtrls(){let e=this.stickyRowFeature&&this.stickyRowFeature.getStickyTopRowCtrls()||[],t=this.stickyRowFeature&&this.stickyRowFeature.getStickyBottomRowCtrls()||[],i=[...this.topRowCtrls,...this.bottomRowCtrls,...e,...t];for(let e in this.rowCtrlsByRowIndex)i.push(this.rowCtrlsByRowIndex[e]);return i}addRenderedRowListener(e,t,i){let s=this.rowCtrlsByRowIndex[t];s&&s.addEventListener(e,i)}flashCells(e={}){this.getCellCtrls(e.rowNodes,e.columns).forEach(t=>t.flashCell(e))}refreshCells(e={}){let t={forceRefresh:e.force,newData:!1,suppressFlash:e.suppressFlash};this.getCellCtrls(e.rowNodes,e.columns).forEach(e=>e.refreshOrDestroyCell(t)),e.rowNodes&&(this.getRowCtrls(e.rowNodes).forEach(e=>{e.isFullWidth()&&(e.refreshFullWidth()||this.redrawRow(e.getRowNode(),!0))}),this.dispatchDisplayedRowsChanged(!1))}getCellRendererInstances(e){var t;let i=this.getCellCtrls(e.rowNodes,e.columns).map(e=>e.getCellRenderer()).filter(e=>null!=e);if(null==(t=e.columns)?void 0:t.length)return i;let s=[],o=this.mapRowNodes(e.rowNodes);return this.getAllRowCtrls().forEach(e=>{if(o&&!this.isRowInMap(e.getRowNode(),o)||!e.isFullWidth())return;let t=e.getFullWidthCellRenderers();for(let e=0;e<t.length;e++){let i=t[e];null!=i&&s.push(i)}}),[...s,...i]}getCellEditorInstances(e){let t=[];return this.getCellCtrls(e.rowNodes,e.columns).forEach(e=>{let i=e.getCellEditor();i&&t.push(i)}),t}getEditingCells(){let e=[];return this.getAllCellCtrls().forEach(t=>{if(t.isEditing()){let i=t.getCellPosition();e.push(i)}}),e}mapRowNodes(e){if(!e)return;let t={top:{},bottom:{},normal:{}};return e.forEach(e=>{let i=e.id;switch(e.rowPinned){case"top":t.top[i]=e;break;case"bottom":t.bottom[i]=e;break;default:t.normal[i]=e}}),t}isRowInMap(e,t){let i=e.id;switch(e.rowPinned){case"top":return null!=t.top[i];case"bottom":return null!=t.bottom[i];default:return null!=t.normal[i]}}getRowCtrls(e){let t=this.mapRowNodes(e),i=this.getAllRowCtrls();return e&&t?i.filter(e=>{let i=e.getRowNode();return this.isRowInMap(i,t)}):i}getCellCtrls(e,t){let i;q(t)&&(i={},t.forEach(e=>{let t=this.columnModel.getGridColumn(e);q(t)&&(i[t.getId()]=!0)}));let s=[];return this.getRowCtrls(e).forEach(e=>{e.getAllCellCtrls().forEach(e=>{let t=e.getColumn().getId();(!i||i[t])&&s.push(e)})}),s}destroy(){this.removeAllRowComps(),super.destroy()}removeAllRowComps(){let e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e),this.stickyRowFeature&&this.stickyRowFeature.destroyStickyCtrls()}getRowsToRecycle(){let e=[];ea(this.rowCtrlsByRowIndex,(t,i)=>{null==i.getRowNode().id&&e.push(t)}),this.removeRowCtrls(e);let t={};return ea(this.rowCtrlsByRowIndex,(e,i)=>{t[i.getRowNode().id]=i}),this.rowCtrlsByRowIndex={},t}removeRowCtrls(e,t=!1){e.forEach(e=>{let i=this.rowCtrlsByRowIndex[e];i&&(i.destroyFirstPass(t),i.destroySecondPass()),delete this.rowCtrlsByRowIndex[e]})}onBodyScroll(e){"vertical"===e.direction&&this.redraw({afterScroll:!0})}redraw(e={}){let t;let{afterScroll:i}=e;this.stickyRowFeature&&iO()&&(t=this.getCellToRestoreFocusToAfterRefresh()||void 0);let s=this.firstRenderedRow,o=this.lastRenderedRow;this.workOutFirstAndLastRowsToRender();let r=!1;this.stickyRowFeature&&(r=this.stickyRowFeature.checkStickyRows());let n=this.firstRenderedRow!==s||this.lastRenderedRow!==o;if((!i||r||n)&&(this.getLockOnRefresh(),this.recycleRows(null,!1,i),this.releaseLockOnRefresh(),this.dispatchDisplayedRowsChanged(i&&!r),null!=t)){let e=this.getCellToRestoreFocusToAfterRefresh();null!=t&&null==e&&(this.animationFrameService.flushAllFrames(),this.restoreFocusedCell(t))}}removeRowCompsNotToDraw(e,t){let i={};
163e.forEach(e=>i[e]=!0);let s=Object.keys(this.rowCtrlsByRowIndex).filter(e=>!i[e]);this.removeRowCtrls(s,t)}calculateIndexesToDraw(e){let t=i$(this.firstRenderedRow,this.lastRenderedRow),i=(e,i)=>{let s=i.getRowNode().rowIndex;null!=s&&(s<this.firstRenderedRow||s>this.lastRenderedRow)&&this.doNotUnVirtualiseRow(i)&&t.push(s)};ea(this.rowCtrlsByRowIndex,i),ea(e,i),t.sort((e,t)=>e-t);let s=[];for(let e=0;e<t.length;e++){let i=t[e],o=this.paginationProxy.getRow(i);o&&!o.sticky&&s.push(i)}return s}recycleRows(e,t=!1,i=!1){let s=this.calculateIndexesToDraw(e);(this.printLayout||i)&&(t=!1),this.removeRowCompsNotToDraw(s,!t);let o=[];s.forEach(s=>{let r=this.createOrUpdateRowCtrl(s,e,t,i);q(r)&&o.push(r)}),e&&(!i||this.gos.get("suppressAnimationFrame")||this.printLayout?this.destroyRowCtrls(e,t):this.beans.animationFrameService.addDestroyTask(()=>{this.destroyRowCtrls(e,t),this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()})),this.updateAllRowCtrls()}dispatchDisplayedRowsChanged(e=!1){let t={type:tP.EVENT_DISPLAYED_ROWS_CHANGED,afterScroll:e};this.eventService.dispatchEvent(t)}onDisplayedColumnsChanged(){let e=this.columnModel.isPinningLeft(),t=this.columnModel.isPinningRight();(this.pinningLeft!==e||t!==this.pinningRight)&&(this.pinningLeft=e,this.pinningRight=t,this.embedFullWidthRows&&this.redrawFullWidthEmbeddedRows())}redrawFullWidthEmbeddedRows(){let e=[];this.getFullWidthRowCtrls().forEach(t=>{let i=t.getRowNode().rowIndex;e.push(i.toString())}),this.refreshFloatingRowComps(),this.removeRowCtrls(e),this.redraw({afterScroll:!0})}getFullWidthRowCtrls(e){let t=this.mapRowNodes(e);return this.getAllRowCtrls().filter(e=>{if(!e.isFullWidth())return!1;let i=e.getRowNode();return!!(null==t||this.isRowInMap(i,t))})}createOrUpdateRowCtrl(e,t,i,s){let o;let r=this.rowCtrlsByRowIndex[e];if(!r&&q(o=this.paginationProxy.getRow(e))&&q(t)&&t[o.id]&&o.alreadyRendered&&(r=t[o.id],t[o.id]=null),!r){if(o||(o=this.paginationProxy.getRow(e)),!q(o))return;r=this.createRowCon(o,i,s)}return o&&(o.alreadyRendered=!0),this.rowCtrlsByRowIndex[e]=r,r}destroyRowCtrls(e,t){let i=[];ea(e,(e,s)=>{if(s){if(this.cachedRowCtrls&&s.isCacheable()){this.cachedRowCtrls.addRow(s);return}s.destroyFirstPass(!t),t?(this.zombieRowCtrls[s.getInstanceId()]=s,i.push(()=>{s.destroySecondPass(),delete this.zombieRowCtrls[s.getInstanceId()]})):s.destroySecondPass()}}),t&&(i.push(()=>{this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()}),eR(i))}getRowBuffer(){return this.gos.get("rowBuffer")}getRowBufferInPixels(){return this.getRowBuffer()*this.gos.getRowHeightAsNumber()}workOutFirstAndLastRowsToRender(){let e,t;if(this.rowContainerHeightService.updateOffset(),this.paginationProxy.isRowsToRender()){if(this.printLayout)this.environment.refreshRowHeightVariable(),e=this.paginationProxy.getPageFirstRow(),t=this.paginationProxy.getPageLastRow();else{let i,s;let o=this.getRowBufferInPixels(),r=this.ctrlsService.getGridBodyCtrl(),n=this.gos.get("suppressRowVirtualisation"),l=!1;do{let e=this.paginationProxy.getPixelOffset(),{pageFirstPixel:t,pageLastPixel:a}=this.paginationProxy.getCurrentPagePixelRange(),h=this.rowContainerHeightService.getDivStretchOffset(),d=r.getScrollFeature().getVScrollPosition(),u=d.top,c=d.bottom;n?(i=t+h,s=a+h):(i=Math.max(u+e-o,t)+h,s=Math.min(c+e+o,a)+h),this.firstVisibleVPixel=Math.max(u+e,t)+h,this.lastVisibleVPixel=Math.min(c+e,a)+h,l=this.ensureAllRowsInRangeHaveHeightsCalculated(i,s)}while(l);let a=this.paginationProxy.getRowIndexAtPixel(i),h=this.paginationProxy.getRowIndexAtPixel(s),d=this.paginationProxy.getPageFirstRow(),u=this.paginationProxy.getPageLastRow();a<d&&(a=d),h>u&&(h=u),e=a,t=h}}else e=0,t=-1;let i=this.gos.isDomLayout("normal"),s=this.gos.get("suppressMaxRenderedRowRestriction"),o=Math.max(this.getRowBuffer(),500);i&&!s&&t-e>o&&(t=e+o);let r=e!==this.firstRenderedRow,n=t!==this.lastRenderedRow;if(r||n){this.firstRenderedRow=e,this.lastRenderedRow=t;let i={type:tP.EVENT_VIEWPORT_CHANGED,firstRow:e,lastRow:t};this.eventService.dispatchEvent(i)}}dispatchFirstDataRenderedEvent(){if(this.dataFirstRenderedFired)return;this.dataFirstRenderedFired=!0;
163let e={type:tP.EVENT_FIRST_DATA_RENDERED,firstRow:this.firstRenderedRow,lastRow:this.lastRenderedRow};window.requestAnimationFrame(()=>{this.beans.eventService.dispatchEvent(e)})}ensureAllRowsInRangeHaveHeightsCalculated(e,t){let i=this.paginationProxy.ensureRowHeightsValid(e,t,-1,-1);return i&&this.updateContainerHeights(),i}getFirstVisibleVerticalPixel(){return this.firstVisibleVPixel}getLastVisibleVerticalPixel(){return this.lastVisibleVPixel}getFirstVirtualRenderedRow(){return this.firstRenderedRow}getLastVirtualRenderedRow(){return this.lastRenderedRow}doNotUnVirtualiseRow(e){let t=e.getRowNode(),i=this.focusService.isRowNodeFocused(t),s=e.isEditing(),o=t.detail;return(!!i||!!s||!!o)&&!!this.paginationProxy.isRowPresent(t)}createRowCon(e,t,i){let s=this.cachedRowCtrls?this.cachedRowCtrls.getRow(e):null;if(s)return s;let o=this.gos.get("suppressAnimationFrame"),r=i&&!o&&!this.printLayout;return new nD(e,this.beans,t,r,this.printLayout)}getRenderedNodes(){return Object.values(this.rowCtrlsByRowIndex).map(e=>e.getRowNode())}getRowByPosition(e){let t;let{rowIndex:i}=e;switch(e.rowPinned){case"top":t=this.topRowCtrls[i];break;case"bottom":t=this.bottomRowCtrls[i];break;default:(t=this.rowCtrlsByRowIndex[i])||(t=this.getStickyTopRowCtrls().find(e=>e.getRowNode().rowIndex===i)||null)||(t=this.getStickyBottomRowCtrls().find(e=>e.getRowNode().rowIndex===i)||null)}return t}isRangeInRenderedViewport(e,t){if(null==e||null==t)return!1;let i=e>this.lastRenderedRow;return!(t<this.firstRenderedRow)&&!i}};K([eB("animationFrameService")],lF.prototype,"animationFrameService",2),K([eB("paginationProxy")],lF.prototype,"paginationProxy",2),K([eB("columnModel")],lF.prototype,"columnModel",2),K([eB("pinnedRowModel")],lF.prototype,"pinnedRowModel",2),K([eB("rowModel")],lF.prototype,"rowModel",2),K([eB("focusService")],lF.prototype,"focusService",2),K([eB("beans")],lF.prototype,"beans",2),K([eB("rowContainerHeightService")],lF.prototype,"rowContainerHeightService",2),K([eB("ctrlsService")],lF.prototype,"ctrlsService",2),K([eV],lF.prototype,"postConstruct",1),lF=K([ek("rowRenderer")],lF);var lL=class{constructor(e){this.entriesMap={},this.entriesList=[],this.maxCount=e}addRow(e){if(this.entriesMap[e.getRowNode().id]=e,this.entriesList.push(e),e.setCached(!0),this.entriesList.length>this.maxCount){let e=this.entriesList[0];e.destroyFirstPass(),e.destroySecondPass(),this.removeFromCache(e)}}getRow(e){if(null==e||null==e.id)return null;let t=this.entriesMap[e.id];return t?(this.removeFromCache(t),t.setCached(!1),t.getRowNode()!=e?null:t):null}has(e){return null!=this.entriesMap[e.id]}removeRow(e){let t=e.id,i=this.entriesMap[t];delete this.entriesMap[t],te(this.entriesList,i)}removeFromCache(e){let t=e.getRowNode().id;delete this.entriesMap[t],te(this.entriesList,e)}getEntries(){return this.entriesList}},lM=class extends tR{init(){this.setPinnedTopRowData(),this.setPinnedBottomRowData(),this.addManagedPropertyListener("pinnedTopRowData",()=>this.setPinnedTopRowData()),this.addManagedPropertyListener("pinnedBottomRowData",()=>this.setPinnedBottomRowData())}isEmpty(e){return X("top"===e?this.pinnedTopRows:this.pinnedBottomRows)}isRowsToRender(e){return!this.isEmpty(e)}getRowAtPixel(e,t){let i="top"===t?this.pinnedTopRows:this.pinnedBottomRows;if(X(i))return 0;for(let t=0;t<i.length;t++){let s=i[t];if(s.rowTop+s.rowHeight-1>=e)return t}return i.length-1}setPinnedTopRowData(){let e=this.gos.get("pinnedTopRowData");this.pinnedTopRows=this.createNodesFromData(e,!0);let t={type:tP.EVENT_PINNED_ROW_DATA_CHANGED};this.eventService.dispatchEvent(t)}setPinnedBottomRowData(){let e=this.gos.get("pinnedBottomRowData");this.pinnedBottomRows=this.createNodesFromData(e,!1);let t={type:tP.EVENT_PINNED_ROW_DATA_CHANGED};this.eventService.dispatchEvent(t)}createNodesFromData(e,t){let i=[];if(e){let s=0;e.forEach((e,o)=>{let r=new rt(this.beans);r.data=e;let n=t?rt.ID_PREFIX_TOP_PINNED:rt.ID_PREFIX_BOTTOM_PINNED;r.id=n+o,r.rowPinned=t?"top":"bottom",r.setRowTop(s),r.setRowHeight(this.gos.getRowHeightForNode(r).height),r.setRowIndex(o),s+=r.rowHeight,i.push(r)})}return i}getPinnedTopRowData(){return this.pinnedTopRows}getPinnedBottomRowData(){return this.pinnedBottomRows}getPinnedTopTotalHeight(){return this.getTotalHeight(this.pinnedTopRows)}getPinnedTopRowCount(){return this.pinnedTopRows?this.pinnedTopRows.length:0}getPinnedBottomRowCount(){return this.pinnedBottomRows?this.pinnedBottomRows.length:0}getPinnedTopRow(e){return this.pinnedTopRows[e]}getPinnedBottomRow(e){return this.pinnedBottomRows[e]}forEachPinnedTopRow(e){X(this.pinnedTopRows)||this.pinnedTopRows.forEach(e)}forEachPinnedBottomRow(e){X(this.pinnedBottomRows)||this.pinnedBottomRows.forEach(e)}getPinnedBottomTotalHeight(){return this.getTotalHeight(this.pinnedBottomRows)}getTotalHeight(e){if(!e||0===e.length)return 0;let t=e5(e);return t.rowTop+t.rowHeight}};K([eB("beans")],lM.prototype,"beans",2),K([eV],lM.prototype,"init",1),lM=K([ek("pinnedRowModel")],lM);var lN=((S=lN||{}).Applied="Applied",S.StoreNotFound="StoreNotFound",S.StoreLoading="StoreLoading",S.StoreWaitingToLoad="StoreWaitingToLoad",S.StoreLoadingFailed="StoreLoadingFailed",S.StoreWrongType="StoreWrongType",S.Cancelled="Cancelled",S.StoreNotStarted="StoreNotStarted",S),lI=class{constructor(e,t){this.active=!0,this.nodeIdsToColumns={},this.mapToItems={},this.keepingColumns=e,this.pathRoot={rowNode:t,children:null},this.mapToItems[t.id]=this.pathRoot}setInactive(){this.active=!1}isActive(){return this.active}depthFirstSearchChangedPath(e,t){if(e.children)for(let i=0;i<e.children.length;i++)this.depthFirstSearchChangedPath(e.children[i],t);t(e.rowNode)}depthFirstSearchEverything(e,t,i){if(e.childrenAfterGroup)for(let s=0;s<e.childrenAfterGroup.length;s++){let o=e.childrenAfterGroup[s];
163o.childrenAfterGroup?this.depthFirstSearchEverything(e.childrenAfterGroup[s],t,i):i&&t(o)}t(e)}forEachChangedNodeDepthFirst(e,t=!1,i=!1){this.active&&!i?this.depthFirstSearchChangedPath(this.pathRoot,e):this.depthFirstSearchEverything(this.pathRoot.rowNode,e,t)}executeFromRootNode(e){e(this.pathRoot.rowNode)}createPathItems(e){let t=e,i=0;for(;!this.mapToItems[t.id];){let e={rowNode:t,children:null};this.mapToItems[t.id]=e,i++,t=t.parent}return i}populateColumnsMap(e,t){if(!this.keepingColumns||!t)return;let i=e;for(;i;)this.nodeIdsToColumns[i.id]||(this.nodeIdsToColumns[i.id]={}),t.forEach(e=>this.nodeIdsToColumns[i.id][e.getId()]=!0),i=i.parent}linkPathItems(e,t){let i=e;for(let e=0;e<t;e++){let e=this.mapToItems[i.id],t=this.mapToItems[i.parent.id];t.children||(t.children=[]),t.children.push(e),i=i.parent}}addParentNode(e,t){if(!e||e.isRowPinned())return;let i=this.createPathItems(e);this.linkPathItems(e,i),this.populateColumnsMap(e,t)}canSkip(e){return this.active&&!this.mapToItems[e.id]}getValueColumnsForNode(e,t){if(!this.keepingColumns)return t;let i=this.nodeIdsToColumns[e.id];return t.filter(e=>i[e.getId()])}getNotValueColumnsForNode(e,t){if(!this.keepingColumns)return null;let i=this.nodeIdsToColumns[e.id];return t.filter(e=>!i[e.getId()])}},lG=class e extends tR{constructor(t){super(),this.state=e.STATE_WAITING_TO_LOAD,this.version=0,this.id=t}getId(){return this.id}load(){this.state=e.STATE_LOADING,this.loadFromDatasource()}getVersion(){return this.version}setStateWaitingToLoad(){this.version++,this.state=e.STATE_WAITING_TO_LOAD}getState(){return this.state}pageLoadFailed(t){this.isRequestMostRecentAndLive(t)&&(this.state=e.STATE_FAILED,this.processServerFail()),this.dispatchLoadCompleted(!1)}success(e,t){this.successCommon(e,t)}pageLoaded(e,t,i){this.successCommon(e,{rowData:t,rowCount:i})}isRequestMostRecentAndLive(e){let t=e===this.version,i=this.isAlive();return t&&i}successCommon(t,i){this.dispatchLoadCompleted(),this.isRequestMostRecentAndLive(t)&&(this.state=e.STATE_LOADED,this.processServerResult(i))}dispatchLoadCompleted(t=!0){let i={type:e.EVENT_LOAD_COMPLETE,success:t,block:this};this.dispatchEvent(i)}};lG.EVENT_LOAD_COMPLETE="loadComplete",lG.STATE_WAITING_TO_LOAD="needsLoading",lG.STATE_LOADING="loading",lG.STATE_LOADED="loaded",lG.STATE_FAILED="failed";var lO=lG,lx=class extends tR{constructor(){super(...arguments),this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=this.getMaxConcurrentDatasourceRequests();let e=this.gos.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=sJ.debounce(this.performCheckBlocksToLoad.bind(this),e))}setBeans(e){this.logger=e.create("RowNodeBlockLoader")}getMaxConcurrentDatasourceRequests(){let e=this.gos.get("maxConcurrentDatasourceRequests");return null==e?2:e<=0?void 0:e}addBlock(e){this.blocks.push(e),e.addEventListener(lO.EVENT_LOAD_COMPLETE,this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){sJ.removeFromArray(this.blocks,e)}destroy(){super.destroy(),this.active=!1}loadComplete(){this.activeBlockLoadsCount--,this.checkBlockToLoad(),this.dispatchEvent({type:lx.BLOCK_LOADED_EVENT}),0==this.activeBlockLoadsCount&&this.dispatchEvent({type:lx.BLOCK_LOADER_FINISHED_EVENT})}checkBlockToLoad(){this.checkBlockToLoadDebounce?this.checkBlockToLoadDebounce():this.performCheckBlocksToLoad()}performCheckBlocksToLoad(){if(!this.active)return;if(this.printCacheStatus(),null!=this.maxConcurrentRequests&&this.activeBlockLoadsCount>=this.maxConcurrentRequests){this.logger.log("checkBlockToLoad: max loads exceeded");return}let e=this.getAvailableLoadingCount(),t=this.blocks.filter(e=>e.getState()===lO.STATE_WAITING_TO_LOAD).slice(0,e);this.registerLoads(t.length),t.forEach(e=>e.load()),this.printCacheStatus()}getBlockState(){if(this.gos.isRowModelType("serverSide"))return this.rowModel.getBlockStates();let e={};return this.blocks.forEach(t=>{let{id:i,state:s}=t.getBlockStateJson();e[i]=s}),e}printCacheStatus(){this.logger.isLogging()&&this.logger.log(`printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}isLoading(){return this.activeBlockLoadsCount>0}registerLoads(e){this.activeBlockLoadsCount+=e}getAvailableLoadingCount(){return void 0!==this.maxConcurrentRequests?this.maxConcurrentRequests-this.activeBlockLoadsCount:void 0}};lx.BLOCK_LOADED_EVENT="blockLoaded",lx.BLOCK_LOADER_FINISHED_EVENT="blockLoaderFinis
163hed",K([eB("rowModel")],lx.prototype,"rowModel",2),K([eV],lx.prototype,"postConstruct",1),K([$(0,ez("loggerFactory"))],lx.prototype,"setBeans",1),lx=K([ek("rowNodeBlockLoader")],lx);var l_=class extends tR{constructor(){super(...arguments),this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=0,this.pixelOffset=0,this.masterRowCount=0}postConstruct(){this.active=this.gos.get("pagination"),this.pageSizeFromGridOptions=this.gos.get("paginationPageSize"),this.paginateChildRows=this.isPaginateChildRows(),this.addManagedListener(this.eventService,tP.EVENT_MODEL_UPDATED,this.onModelUpdated.bind(this)),this.addManagedPropertyListener("pagination",this.onPaginationGridOptionChanged.bind(this)),this.addManagedPropertyListener("paginationPageSize",this.onPageSizeGridOptionChanged.bind(this)),this.onModelUpdated()}ensureRowHeightsValid(e,t,i,s){let o=this.rowModel.ensureRowHeightsValid(e,t,this.getPageFirstRow(),this.getPageLastRow());return o&&this.calculatePages(),o}isPaginateChildRows(){return!!(this.gos.get("groupRemoveSingleChildren")||this.gos.get("groupRemoveLowestSingleChildren"))||this.gos.get("paginateChildRows")}onModelUpdated(e){this.calculatePages();let t={type:tP.EVENT_PAGINATION_CHANGED,animate:!!e&&e.animate,newData:!!e&&e.newData,newPage:!!e&&e.newPage,newPageSize:!!e&&e.newPageSize,keepRenderedRows:!!e&&e.keepRenderedRows};this.eventService.dispatchEvent(t)}onPaginationGridOptionChanged(){this.active=this.gos.get("pagination"),this.calculatePages();let e={type:tP.EVENT_PAGINATION_CHANGED,animate:!1,newData:!1,newPage:!1,newPageSize:!1,keepRenderedRows:!0};this.eventService.dispatchEvent(e)}onPageSizeGridOptionChanged(){this.setPageSize(this.gos.get("paginationPageSize"),"gridOptions")}goToPage(e){if(!this.active||this.currentPage===e||"number"!=typeof this.currentPage)return;this.currentPage=e,this.calculatePages();let t={type:tP.EVENT_PAGINATION_CHANGED,animate:!1,newData:!1,newPage:!0,newPageSize:!1,keepRenderedRows:!1};this.eventService.dispatchEvent(t)}getPixelOffset(){return this.pixelOffset}getRow(e){return this.rowModel.getRow(e)}getRowNode(e){return this.rowModel.getRowNode(e)}getRowIndexAtPixel(e){return this.rowModel.getRowIndexAtPixel(e)}getCurrentPageHeight(){return Q(this.topRowBounds)||Q(this.bottomRowBounds)?0:Math.max(this.bottomRowBounds.rowTop+this.bottomRowBounds.rowHeight-this.topRowBounds.rowTop,0)}getCurrentPagePixelRange(){return{pageFirstPixel:this.topRowBounds?this.topRowBounds.rowTop:0,pageLastPixel:this.bottomRowBounds?this.bottomRowBounds.rowTop+this.bottomRowBounds.rowHeight:0}}isRowPresent(e){return!!this.rowModel.isRowPresent(e)&&e.rowIndex>=this.topDisplayedRowIndex&&e.rowIndex<=this.bottomDisplayedRowIndex}isEmpty(){return this.rowModel.isEmpty()}isRowsToRender(){return this.rowModel.isRowsToRender()}forEachNode(e){return this.rowModel.forEachNode(e)}forEachNodeOnPage(e){let t=this.getPageFirstRow(),i=this.getPageLastRow();for(let s=t;s<=i;s++){let t=this.getRow(s);t&&e(t)}}getType(){return this.rowModel.getType()}getRowBounds(e){let t=this.rowModel.getRowBounds(e);return t.rowIndex=e,t}getPageFirstRow(){return this.topRowBounds?this.topRowBounds.rowIndex:-1}getPageLastRow(){return this.bottomRowBounds?this.bottomRowBounds.rowIndex:-1}getRowCount(){return this.rowModel.getRowCount()}getPageForIndex(e){return Math.floor(e/this.pageSize)}goToPageWithIndex(e){if(!this.active)return;let t=this.getPageForIndex(e);this.goToPage(t)}isRowInPage(e){return!this.active||this.getPageForIndex(e.rowIndex)===this.currentPage}isLastPageFound(){return this.rowModel.isLastRowIndexKnown()}getCurrentPage(){return this.currentPage}goToNextPage(){this.goToPage(this.currentPage+1)}goToPreviousPage(){this.goToPage(this.currentPage-1)}goToFirstPage(){this.goToPage(0)}goToLastPage(){let e=Math.floor(this.rowModel.getRowCount()/this.pageSize);this.goToPage(e)}getPageSize(){return this.pageSize}getTotalPages(){return this.totalPages}setPage(e){this.currentPage=e}get pageSize(){return q(this.pageSizeAutoCalculated)?this.pageSizeAutoCalculated:q(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:q(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:q(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:this.defaultPageSize}unsetAutoCalculatedPageSize(){if(void 0===this.pageSizeAutoCalculated)return;let e=this.pageSizeAutoCalculated;if(this.pageSizeAutoCalculated=void 0,this.pageSize===e)return;this.calculatePages();let t={type:tP.EVENT_PAGINATION_CHANGED,animate:!1,newData:!1,newPage:!1,newPageSize:!0,keepRenderedRows:!1};this.eventService.dispatchEvent(t)}setPageSize(e,t){let i=this.pageSize;switch(t){case"autoCalculated":this.pageSizeAutoCalculated=e;break;case"pageSizeSelector":this.pageSizeFromPageSizeSelector=e,0!==this.currentPage&&this.goToFirstPage();break;case"initialState":this.pageSizeFromInitialState=e;break;case"gridOptions":this.pageSizeFromGridOptions=e,this.pageSizeFromInitialState=void 0,this.pageSizeFromPageSizeSelector=void 0,0!==this.currentPage&&this.goToFirstPage()}if(i!==this.pageSize){this.calculatePages();let e={type:tP.EVENT_PAGINATION_CHANGED,animate:!1,newData:!1,newPage:!1,newPageSize:!0,keepRenderedRows:!0};this.eventService.dispatchEvent(e)}}calculatePages(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.topRowBounds=this.rowModel.getRowBounds(this.topDisplayedRowIndex),this.topRowBounds&&(this.topRowBounds.rowIndex=this.topDisplayedRowIndex),this.bottomRowBounds=this.rowModel.getRowBounds(this.bottomDis
163playedRowIndex),this.bottomRowBounds&&(this.bottomRowBounds.rowIndex=this.bottomDisplayedRowIndex),this.setPixelOffset(q(this.topRowBounds)?this.topRowBounds.rowTop:0)}setPixelOffset(e){this.pixelOffset!==e&&(this.pixelOffset=e,this.eventService.dispatchEvent({type:tP.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED}))}setZeroRows(){this.masterRowCount=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=-1,this.currentPage=0,this.totalPages=0}adjustCurrentPageIfInvalid(){this.currentPage>=this.totalPages&&(this.currentPage=this.totalPages-1),(!isFinite(this.currentPage)||isNaN(this.currentPage)||this.currentPage<0)&&(this.currentPage=0)}calculatePagesMasterRowsOnly(){if(this.masterRowCount=this.rowModel.getTopLevelRowCount(),this.masterRowCount<=0){this.setZeroRows();return}let e=this.masterRowCount-1;this.totalPages=Math.floor(e/this.pageSize)+1,this.adjustCurrentPageIfInvalid();let t=this.pageSize*this.currentPage,i=this.pageSize*(this.currentPage+1)-1;if(i>e&&(i=e),this.topDisplayedRowIndex=this.rowModel.getTopLevelRowDisplayedIndex(t),i===e)this.bottomDisplayedRowIndex=this.rowModel.getRowCount()-1;else{let e=this.rowModel.getTopLevelRowDisplayedIndex(i+1);this.bottomDisplayedRowIndex=e-1}}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){if(this.masterRowCount=this.rowModel.getRowCount(),0===this.masterRowCount){this.setZeroRows();return}let e=this.masterRowCount-1;this.totalPages=Math.floor(e/this.pageSize)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=this.pageSize*this.currentPage,this.bottomDisplayedRowIndex=this.pageSize*(this.currentPage+1)-1,this.bottomDisplayedRowIndex>e&&(this.bottomDisplayedRowIndex=e)}calculatedPagesNotActive(){this.setPageSize(void 0,"autoCalculated"),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.rowModel.getRowCount()-1}};K([eB("rowModel")],l_.prototype,"rowModel",2),K([eV],l_.prototype,"postConstruct",1),l_=K([ek("paginationProxy")],l_);var lV=class extends tR{processAllCellClasses(e,t,i,s){this.processClassRules(void 0,e.cellClassRules,t,i,s),this.processStaticCellClasses(e,t,i)}processClassRules(e,t,i,s,o){if(null==t&&null==e)return;let r={},n={},l=(e,t)=>{e.split(" ").forEach(e=>{""!=e.trim()&&t(e)})};if(t){let e=Object.keys(t);for(let s=0;s<e.length;s++){let o;let a=e[s],h=t[a];"string"==typeof h?o=this.expressionService.evaluate(h,i):"function"==typeof h&&(o=h(i)),l(a,e=>{o?r[e]=!0:n[e]=!0})}}e&&o&&Object.keys(e).forEach(e=>l(e,e=>{r[e]||(n[e]=!0)})),o&&Object.keys(n).forEach(o),Object.keys(r).forEach(s)}getStaticCellClasses(e,t){let i;let{cellClass:s}=e;return s?("string"==typeof(i="function"==typeof s?s(t):s)&&(i=[i]),i||[]):[]}processStaticCellClasses(e,t,i){this.getStaticCellClasses(e,t).forEach(e=>{i(e)})}};K([eB("expressionService")],lV.prototype,"expressionService",2),lV=K([ek("stylingService")],lV);var lH=class extends oy{constructor(e){super(e,"ag-toggle-button")}setValue(e,t){return super.setValue(e,t),this.addOrRemoveCssClass("ag-selected",this.getValue()),this}},lk=class extends oS{constructor(e){super(e,"ag-text-area",null,"textarea")}setValue(e,t){let i=super.setValue(e,t);return this.eInput.value=e,i}setCols(e){return this.eInput.cols=e,this}setRows(e){return this.eInput.rows=e,this}},lB=class extends oO{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct(),this.addManagedListener(this.eInput,"wheel",this.onWheel.bind(this));let e=iF();this.addManagedListener(this.eInput,"mousedown",()=>{this.isDisabled()||e||this.eInput.focus()}),this.eInput.step="any"}onWheel(e){this.gos.getActiveDomElement()===this.eInput&&e.preventDefault()}setMin(e){var t;let i=e instanceof Date?null!=(t=iJ(null!=e?e:null,!1))?t:void 0:e;return this.min===i||(this.min=i,sF(this.eInput,"min",i)),this}setMax(e){var t;let i=e instanceof Date?null!=(t=iJ(null!=e?e:null,!1))?t:void 0:e;return this.max===i||(this.max=i,sF(this.eInput,"max",i)),this}setStep(e){return this.step===e||(this.step=e,sF(this.eInput,"step",e)),this}getDate(){var e;if(this.eInput.validity.valid)return null!=(e=i1(this.getValue()))?e:void 0}setDate(e,t){this.setValue(iJ(null!=e?e:null,!1),t)}},lW=class extends oS{constructor(e){super(e,"ag-range-field","range")}
163postConstruct(){super.postConstruct();let{min:e,max:t,step:i}=this.config;null!=e&&this.setMinValue(e),null!=t&&this.setMaxValue(t),this.setStep(i||1)}addInputListeners(){this.addManagedListener(this.eInput,"input",e=>{let t=e.target.value;this.setValue(t)})}setMinValue(e){return this.min=e,this.eInput.setAttribute("min",e.toString()),this}setMaxValue(e){return this.max=e,this.eInput.setAttribute("max",e.toString()),this}setStep(e){return this.eInput.setAttribute("step",e.toString()),this}setValue(e,t){null!=this.min&&(e=Math.max(parseFloat(e),this.min).toString()),null!=this.max&&(e=Math.min(parseFloat(e),this.max).toString());let i=super.setValue(e,t);return this.eInput.value=e,i}},lU=class extends s9{constructor(e,t){super('<div class="ag-rich-select-row" role="presentation"></div>'),this.params=e,this.wrapperEl=t}postConstruct(){this.addManagedListener(this.getGui(),"click",this.onClick.bind(this))}setState(e){let t="";this.params.valueFormatter&&(t=this.params.valueFormatter(e)),this.populateWithRenderer(e,t)||this.populateWithoutRenderer(e,t),this.value=e}highlightString(e){let{parsedValue:t}=this;if(this.params.cellRenderer||!q(t))return;let i=q(e);if(i){let s=null==t?void 0:t.toLocaleLowerCase().indexOf(e.toLocaleLowerCase());if(s>=0){let i=s+e.length,o=tV(t.slice(0,s),!0),r=tV(t.slice(s,i),!0),n=tV(t.slice(i));this.renderValueWithoutRenderer(`${o}<span class="ag-rich-select-row-text-highlight">${r}</span>${n}`)}else i=!1}i||this.renderValueWithoutRenderer(t)}updateHighlighted(e){var t;let i=this.getGui(),s=`ag-rich-select-row-${this.getCompId()}`;null==(t=i.parentElement)||t.setAttribute("id",s),e&&(id(this.getParentComponent().getAriaElement(),s),this.wrapperEl.setAttribute("data-active-option",s)),iD(i.parentElement,e),this.addOrRemoveCssClass("ag-rich-select-row-selected",e)}populateWithoutRenderer(e,t){let i=this.gos.getDocument(),s=this.getGui(),o=i.createElement("span");o.style.overflow="hidden",o.style.textOverflow="ellipsis";let r=tV(q(t)?t:e,!0);this.parsedValue=q(r)?r:null,s.appendChild(o),this.renderValueWithoutRenderer(r),this.setTooltip({newTooltipText:this.parsedValue,shouldDisplayTooltip:()=>o.scrollWidth>o.clientWidth})}renderValueWithoutRenderer(e){let t=this.getGui().querySelector("span");t&&(t.innerHTML=q(e)?e:"&nbsp;")}populateWithRenderer(e,t){let i,s;return this.params.cellRenderer&&(s=this.userComponentFactory.getCellRendererDetails(this.params,{value:e,valueFormatted:t,setTooltip:(e,t)=>{this.setTooltip({newTooltipText:e,shouldDisplayTooltip:t})}})),s&&(i=s.newAgStackInstance()),i&&sM(i,this.getGui()),!!i&&(i.then(e=>{this.addDestroyFunc(()=>{this.getContext().destroyBean(e)})}),!0)}onClick(){let e=this.getParentComponent(),t={type:tP.EVENT_FIELD_PICKER_VALUE_SELECTED,fromEnterKey:!1,value:this.value};null==e||e.dispatchEvent(t)}};K([eB("userComponentFactory")],lU.prototype,"userComponentFactory",2),K([eV],lU.prototype,"postConstruct",1);var lz=class e extends lw{constructor(t){super(e.getTemplate((null==t?void 0:t.cssIdentifier)||"default")),this.renderedRows=new Map,this.rowHeight=20,this.pageSize=-1,this.isScrolling=!1,this.isHeightFromTheme=!0;let{cssIdentifier:i="default",ariaRole:s="listbox",listName:o}=t||{};this.cssIdentifier=i,this.ariaRole=s,this.listName=o}postConstruct(){this.addScrollListener(),this.rowHeight=this.getItemHeight(),this.addResizeObserver(),this.initialiseTabGuard({onFocusIn:e=>this.onFocusIn(e),onFocusOut:e=>this.onFocusOut(e),focusInnerElement:e=>this.focusInnerElement(e),onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e)}),this.setAriaProperties(),this.addManagedListener(this.eventService,tP.EVENT_GRID_STYLES_CHANGED,this.onGridStylesChanged.bind(this))}onGridStylesChanged(){this.rowHeight=this.getItemHeight(),this.refresh()}setAriaProperties(){let e=this.localeService.getLocaleTextFunc()("ariaDefaultListName",this.listName||"List"),t=this.eContainer;t4(t,this.ariaRole),ie(t,e)}addResizeObserver(){let e=this.resizeObserverService.observeResize(this.getGui(),()=>this.animationFrameService.requestAnimationFrame(()=>this.drawVirtualRows()));this.addDestroyFunc(e)}focusInnerElement(e){this.focusRow(e?this.model.getRowCount()-1:0)}onFocusIn(e){let t=e.target;t.classList.contains("ag-virtual-list-item")&&(this.lastFocusedRowIndex=t7(t)-1)}onFocusOut(e){this.getFocusableElement().contains(e.relatedTarget)||(this.lastFocusedRowIndex=null)}handleKeyDown(e){switch(e.key){case sk.UP:case sk.DOWN:this.navigate(e.key===sk.UP)&&e.preventDefault();break;case sk.PAGE_HOME:case sk.PAGE_END:case sk.PAGE_UP:case sk.PAGE_DOWN:null!==this.navigateToPage(e.key)&&e.preventDefault()}}onTabKeyDown(e){this.navigate(e.shiftKey)?e.preventDefault():(tg(e),this.forceFocusOutOfContainer(e.shiftKey))}navigate(e){if(null==this.lastFocusedRowIndex)return!1;let t=this.lastFocusedRowIndex+(e?-1:1);return!(t<0||t>=this.model.getRowCount())&&(this.focusRow(t),!0)}navigateToPage(e,t="focused"){let i=!1;"focused"===t&&(t=this.getLastFocusedRow(),i=!0);let s=this.model.getRowCount()-1,o=-1;return(e===sk.PAGE_HOME?o=0:e===sk.PAGE_END?o=s:e===sk.PAGE_DOWN?o=Math.min(t+this.pageSize,s):e===sk.PAGE_UP&&(o=Math.max(t-this.pageSize,0)),-1===o)?null:(i?this.focusRow(o):this.ensureIndexVisible(o),o)}getLastFocusedRow(){return this.lastFocusedRowIndex}focusRow(e){this.isScrolling||(this.isScrolling=!0,this.ensureIndexVisible(e),this.animationFrameService.requestAnimationFrame(()=>{if(this.isScrolling=!1,!this.isAlive())return;let t=this.renderedRows.get(e);t&&t.eDiv.focus()}))}getComponentAt(e){let t=this.renderedRows.get(e);return t&&t.rowComponent}forEachRenderedRow(e){this.renderedRows.forEach((t,i)=>e(t.rowComponent,i))}static getTemplate(e){return`<div class="ag-virtual-list-viewport ag-${e}-virtual-list-viewport" role="presentation">
164                <div class="ag-virtual-list-container ag-${e}-virtual-list-container" ref="eContainer"></div>
165            </div>`}getItemHeight(){return this.isHeightFromTheme?this.environment.getListItemHeight():this.rowHeight}ensureIndexVisible(e,t=!0){let i=this.model.getRowCount();if("number"!=typeof e||e<0||e>
165=i)return console.warn("AG Grid: invalid row index for ensureIndexVisible: "+e),!1;let s=e*this.rowHeight,o=s+this.rowHeight,r=this.getGui(),n=r.scrollTop,l=r.offsetHeight,a=t?0:this.rowHeight;return n>s+a?(r.scrollTop=s,!0):n+l<o-a&&(r.scrollTop=o-l,!0)}setComponentCreator(e){this.componentCreator=e}setComponentUpdater(e){this.componentUpdater=e}getRowHeight(){return this.rowHeight}getScrollTop(){return this.getGui().scrollTop}setRowHeight(e){this.isHeightFromTheme=!1,this.rowHeight=e,this.refresh()}refresh(e){if(null==this.model||!this.isAlive())return;let t=this.model.getRowCount();this.eContainer.style.height=`${t*this.rowHeight}px`,eL(()=>this.eContainer.clientHeight>=t*this.rowHeight,()=>{this.isAlive()&&(this.canSoftRefresh(e)?this.drawVirtualRows(!0):(this.clearVirtualRows(),this.drawVirtualRows()))})}canSoftRefresh(e){return!!(e&&this.renderedRows.size&&"function"==typeof this.model.areRowsEqual&&this.componentUpdater)}clearVirtualRows(){this.renderedRows.forEach((e,t)=>this.removeRow(t))}drawVirtualRows(e){if(!this.isAlive()||!this.model)return;let t=this.getGui(),i=t.scrollTop,s=i+t.offsetHeight,o=Math.floor(i/this.rowHeight),r=Math.floor(s/this.rowHeight);this.pageSize=Math.floor((s-i)/this.rowHeight),this.ensureRowsRendered(o,r,e)}ensureRowsRendered(e,t,i){this.renderedRows.forEach((i,s)=>{(s<e||s>t)&&s!==this.lastFocusedRowIndex&&this.removeRow(s)}),i&&this.refreshRows();for(let i=e;i<=t;i++)!this.renderedRows.has(i)&&i<this.model.getRowCount()&&this.insertRow(i)}insertRow(e){let t=this.model.getRow(e),i=document.createElement("div");i.classList.add("ag-virtual-list-item",`ag-${this.cssIdentifier}-virtual-list-item`),t4(i,"tree"===this.ariaRole?"treeitem":"option"),ip(i,this.model.getRowCount()),ig(i,e+1),i.setAttribute("tabindex","-1"),i.style.height=`${this.rowHeight}px`,i.style.top=`${this.rowHeight*e}px`;let s=this.componentCreator(t,i);s.addGuiEventListener("focusin",()=>this.lastFocusedRowIndex=e),i.appendChild(s.getGui()),this.renderedRows.has(e-1)?this.renderedRows.get(e-1).eDiv.insertAdjacentElement("afterend",i):this.renderedRows.has(e+1)?this.renderedRows.get(e+1).eDiv.insertAdjacentElement("beforebegin",i):this.eContainer.appendChild(i),this.renderedRows.set(e,{rowComponent:s,eDiv:i,value:t})}removeRow(e){let t=this.renderedRows.get(e);this.eContainer.removeChild(t.eDiv),this.destroyBean(t.rowComponent),this.renderedRows.delete(e)}refreshRows(){let e=this.model.getRowCount();this.renderedRows.forEach((t,i)=>{var s,o;if(i>=e)this.removeRow(i);else{let e=this.model.getRow(i);(null==(o=(s=this.model).areRowsEqual)?void 0:o.call(s,t.value,e))?this.componentUpdater(e,t.rowComponent):this.removeRow(i)}})}addScrollListener(){this.addGuiEventListener("scroll",()=>this.drawVirtualRows(),{passive:!0})}setModel(e){this.model=e}getAriaElement(){return this.eContainer}destroy(){this.isAlive()&&(this.clearVirtualRows(),super.destroy())}};K([eB("resizeObserverService")],lz.prototype,"resizeObserverService",2),K([eB("animationFrameService")],lz.prototype,"animationFrameService",2),K([ot("eContainer")],lz.prototype,"eContainer",2),K([eV],lz.prototype,"postConstruct",1);var lK=lz,l$=`
166    <div class="ag-picker-field" role="presentation">
167        <div ref="eLabel"></div>
168            <div ref="eWrapper" class="ag-wrapper ag-picker-field-wrapper ag-rich-select-value ag-picker-collapsed">
169            <div ref="eDisplayField" class="ag-picker-field-display"></div>
170            <ag-input-text-field ref="eInput" class="ag-rich-select-field-input"></ag-input-text-field>
171            <div ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></div>
172        </div>
173    </div>`,lY=class extends ov{constructor(e){var t,i;super(W(B({pickerAriaLabelKey:"ariaLabelRichSelectField",pickerAriaLabelValue:"Rich Select Field",pickerType:"ag-list",className:"ag-rich-select",pickerIcon:"smallDown",ariaRole:"combobox",template:null!=(t=null==e?void 0:e.template)?t:l$,modalPicker:!1},e),{maxPickerHeight:null!=(i=null==e?void 0:e.maxPickerHeight)?i:"calc(var(--ag-row-height) * 6.5)"})),this.searchString="",this.highlightedItem=-1,this.lastRowHovered=-1,this.searchStringCreator=null;let{cellRowHeight:s,value:o,valueList:r,searchStringCreator:n}=e||{};null!=s&&(this.cellRowHeight=s),void 0!==o&&(this.value=o),null!=r&&(this.values=r),n&&(this.searchStringCreator=n)}
173postConstruct(){super.postConstruct(),this.createLoadingElement(),this.createListComponent();let{allowTyping:e,placeholder:t}=this.config;e?(this.eInput.setAutoComplete(!1).setInputPlaceholder(t),this.eDisplayField.classList.add("ag-hidden")):this.eInput.setDisplayed(!1),this.eWrapper.tabIndex=this.gos.get("tabIndex");let{searchDebounceDelay:i=300}=this.config;this.clearSearchString=eP(this.clearSearchString,i),this.renderSelectedValue(),e&&(this.eInput.onValueChange(e=>this.searchTextFromString(e)),this.addManagedListener(this.eWrapper,"focus",this.onWrapperFocus.bind(this))),this.addManagedListener(this.eWrapper,"focusout",this.onWrapperFocusOut.bind(this))}createLoadingElement(){let e=this.gos.getDocument(),t=this.localeService.getLocaleTextFunc(),i=e.createElement("div");i.classList.add("ag-loading-text"),i.innerText=t("loadingOoo","Loading..."),this.eLoading=i}createListComponent(){this.listComponent=this.createBean(new lK({cssIdentifier:"rich-select"})),this.listComponent.setComponentCreator(this.createRowComponent.bind(this)),this.listComponent.setComponentUpdater((e,t)=>{}),this.listComponent.setParentComponent(this),this.addManagedListener(this.listComponent,tP.EVENT_FIELD_PICKER_VALUE_SELECTED,e=>{this.onListValueSelected(e.value,e.fromEnterKey)});let{cellRowHeight:e}=this;e&&this.listComponent.setRowHeight(e);let t=this.listComponent.getGui(),i=this.listComponent.getAriaElement();this.addManagedListener(t,"mousemove",this.onPickerMouseMove.bind(this)),this.addManagedListener(t,"mousedown",e=>e.preventDefault()),t.classList.add("ag-rich-select-list");let s=`ag-rich-select-list-${this.listComponent.getCompId()}`;i.setAttribute("id",s),ie(i,this.localeService.getLocaleTextFunc()(this.config.pickerAriaLabelKey,this.config.pickerAriaLabelValue)),ib(this.eWrapper,i)}renderSelectedValue(){let e,t;let{value:i,eDisplayField:s,config:o}=this,{allowTyping:r,initialInputValue:n}=this.config,l=this.config.valueFormatter?this.config.valueFormatter(i):i;if(r){this.eInput.setValue(null!=n?n:l);return}if(o.cellRenderer&&(e=this.userComponentFactory.getCellRendererDetails(this.config,{value:i,valueFormatted:l})),e&&(t=e.newAgStackInstance()),t)sd(s),sM(t,s),t.then(e=>{this.addDestroyFunc(()=>this.getContext().destroyBean(e))});else{if(q(this.value))s.innerText=l,s.classList.remove("ag-display-as-placeholder");else{let{placeholder:e}=o;q(e)?(s.innerHTML=`${tV(e)}`,s.classList.add("ag-display-as-placeholder")):sd(s)}this.setTooltip({newTooltipText:null!=l?l:null,shouldDisplayTooltip:()=>this.eDisplayField.scrollWidth>this.eDisplayField.clientWidth})}}getCurrentValueIndex(){let{currentList:e,value:t}=this;if(null==t||!e)return -1;for(let i=0;i<e.length;i++)if(e[i]===t)return i;return -1}highlightFilterMatch(){var e;null==(e=this.listComponent)||e.forEachRenderedRow((e,t)=>{e.highlightString(this.searchString)})}highlightSelectedValue(e){var t;null==e&&(e=this.getCurrentValueIndex()),this.highlightedItem=e,null==(t=this.listComponent)||t.forEachRenderedRow((t,i)=>{let s=-1!==e&&this.highlightedItem===i;t.updateHighlighted(s)})}setRowHeight(e){e!==this.cellRowHeight&&(this.cellRowHeight=e),this.listComponent&&this.listComponent.setRowHeight(e)}createPickerComponent(){let{values:e}=this;return e&&this.setValueList({valueList:e}),this.listComponent}setSearchStringCreator(e){this.searchStringCreator=e}setValueList(e){let{valueList:t,refresh:i}=e;this.listComponent&&this.currentList!==t&&(this.currentList=t,this.listComponent.setModel({getRowCount:()=>t.length,getRow:e=>t[e],areRowsEqual:(e,t)=>e===t}),i&&(this.values?this.listComponent.refresh(!0):(this.values=t,this.isPickerDisplayed&&this.showCurrentValueInPicker())))}showPicker(){super.showPicker(),this.showCurrentValueInPicker(),this.displayOrHidePicker()}showCurrentValueInPicker(){var e,t;if(!this.listComponent)return;if(!this.currentList){this.isPickerDisplayed&&this.eLoading&&this.listComponent.appendChild(this.eLoading);return}(null==(e=this.eLoading)?void 0:e.offsetParent)&&(null==(t=this.eLoading.parentElement)||t.removeChild(this.eLoading));let i=this.getCurrentValueIndex();-1!==i?(this.listComponent.refresh(),this.listComponent.ensureIndexVisible(i),this.listComponent.refresh(!0),this.highlightSelectedValue(i)):this.listComponent.refresh()}beforeHidePicker(){this.highlightedItem=-1,super.beforeHidePicker()}onWrapperFocus(){if(!this.eInput)return;let e=this.eInput.getFocusableElement();e.focus(),e.select()}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}buildSearchStringFromKeyboardEvent(e){let{key:t}=e;if(t===sk.BACKSPACE)this.searchString=this.searchString.slice(0,-1),t="";else if(!sB(e))return;e.preventDefault(),this.searchTextFromCharacter(t)}searchTextFromCharacter(e){this.searchString+=e,this.runSearch(),this.clearSearchString()}searchTextFromString(e){null==e&&(e=""),this.searchString=e,this.runSearch()}buildSearchStrings(e){let t;let{valueFormatter:i=e=>e}=this.config;return"number"==typeof e[0]||"string"==typeof e[0]?t=e.map(e=>i(e)):"object"==typeof e[0]&&this.searchStringCreator&&(t=this.searchStringCreator(e)),t}getSuggestionsAndFilteredValues(e,t){let i=[],s=[];if(!e.length)return{suggestions:i,filteredValues:s};let{searchType:o="fuzzy",filterList:r}=this.config;if("fuzzy"===o){let e=sG(this.searchString,t,!0);i=e.values;let o=e.indices;if(r&&o.length)for(let e=0;e<o.length;e++)s.push(this.values[o[e]])}else i=t.filter((e,t)=>
173{let i=e.toLocaleLowerCase(),n=this.searchString.toLocaleLowerCase(),l="match"===o?i.startsWith(n):-1!==i.indexOf(n);return r&&l&&s.push(this.values[t]),l});return{suggestions:i,filteredValues:s}}filterListModel(e){let{filterList:t}=this.config;t&&(this.setValueList({valueList:e,refresh:!0}),this.alignPickerToComponent())}runSearch(){var e,t;let{values:i}=this,s=this.buildSearchStrings(i);if(!s){this.highlightSelectedValue(-1);return}let{suggestions:o,filteredValues:r}=this.getSuggestionsAndFilteredValues(this.searchString,s),{filterList:n,highlightMatch:l,searchType:a="fuzzy"}=this.config,h=r.length,d=!!(n&&""!==this.searchString);if(this.filterListModel(d?r:i),o.length){let e=d?0:s.indexOf(o[0]);this.selectListItem(e)}else if(this.highlightSelectedValue(-1),!d||h)null==(e=this.listComponent)||e.ensureIndexVisible(0);else if(d){this.getAriaElement().removeAttribute("data-active-option");let e=null==(t=this.listComponent)?void 0:t.getAriaElement();e&&id(e,null)}l&&"fuzzy"!==a&&this.highlightFilterMatch(),this.displayOrHidePicker()}displayOrHidePicker(){var e;let t=null==(e=this.listComponent)?void 0:e.getGui(),i=!!this.currentList&&0===this.currentList.length;null==t||t.classList.toggle("ag-hidden",i)}clearSearchString(){this.searchString=""}selectListItem(e,t){this.isPickerDisplayed&&this.currentList&&this.listComponent&&!(e<0)&&!(e>=this.currentList.length)&&(this.listComponent.ensureIndexVisible(e,!t)&&!t&&this.listComponent.refresh(!0),this.highlightSelectedValue(e))}setValue(e,t,i){let s=this.currentList?this.currentList.indexOf(e):-1;return -1===s?this:(this.value=e,i||this.selectListItem(s),this.renderSelectedValue(),super.setValue(e,t))}createRowComponent(e){let t=new lU(this.config,this.eWrapper);t.setParentComponent(this.listComponent),this.getContext().createBean(t),t.setState(e);let{highlightMatch:i,searchType:s="fuzzy"}=this.config;return i&&"fuzzy"!==s&&t.highlightString(this.searchString),t}getRowForMouseEvent(e){let{listComponent:t}=this;if(!t)return -1;let i=(null==t?void 0:t.getGui()).getBoundingClientRect(),s=t.getScrollTop();return Math.floor((e.clientY-i.top+s)/t.getRowHeight())}onPickerMouseMove(e){if(!this.listComponent)return;let t=this.getRowForMouseEvent(e);-1!==t&&t!=this.lastRowHovered&&(this.lastRowHovered=t,this.selectListItem(t,!0))}onNavigationKeyDown(e,t){e.preventDefault();let i=t===sk.DOWN;if(!this.isPickerDisplayed&&i){this.showPicker();return}let s=this.highlightedItem;this.selectListItem(-1===s?0:s+(i?1:-1))}onPageNavigation(e){var t;if(!this.isPickerDisplayed)return;let i=null==(t=this.listComponent)?void 0:t.navigateToPage(e,this.highlightedItem);null!=i&&this.animationFrameService.requestAnimationFrame(()=>{if(!this.isAlive())return null;this.highlightSelectedValue(i)})}onEnterKeyDown(e){this.isPickerDisplayed&&(e.preventDefault(),this.currentList&&this.onListValueSelected(this.currentList[this.highlightedItem],!0))}onTabKeyDown(){this.isPickerDisplayed&&this.currentList&&this.setValue(this.currentList[this.highlightedItem],!1,!0)}onListValueSelected(e,t){this.setValue(e,!1,!0),this.dispatchPickerEvent(e,t),this.hidePicker()}dispatchPickerEvent(e,t){let i={type:tP.EVENT_FIELD_PICKER_VALUE_SELECTED,fromEnterKey:t,value:e};this.dispatchEvent(i)}getFocusableElement(){let{allowTyping:e}=this.config;return e?this.eInput.getFocusableElement():super.getFocusableElement()}onKeyDown(e){let t=e.key,{allowTyping:i}=this.config;switch(t){case sk.LEFT:case sk.RIGHT:i||e.preventDefault();break;case sk.PAGE_HOME:case sk.PAGE_END:if(i){e.preventDefault();let i=this.eInput.getInputElement(),s=t===sk.PAGE_HOME?0:i.value.length;i.setSelectionRange(s,s);break}case sk.PAGE_UP:case sk.PAGE_DOWN:e.preventDefault(),this.onPageNavigation(t);break;case sk.DOWN:case sk.UP:this.onNavigationKeyDown(e,t);break;case sk.ESCAPE:this.isPickerDisplayed&&(sp(this.listComponent.getGui())&&(e.preventDefault(),tg(e)),this.hidePicker());break;case sk.ENTER:this.onEnterKeyDown(e);break;case sk.TAB:this.onTabKeyDown();break;default:i||this.buildSearchStringFromKeyboardEvent(e)}}destroy(){this.listComponent&&(this.destroyBean(this.listComponent),this.listComponent=void 0),this.eLoading=void 0,super.destroy()}};K([eB("userComponentFactory")],lY.prototype,"userComponentFactory",2),K([eB("animationFrameService")],lY.prototype,"animationFrameService",2),K([ot("eInput")],lY.prototype,"eInput",2);var lj=class e extends og{constructor(t){super(t,e.TEMPLATE),this.labelAlignment="top"}init(){this.eSlider.addCssClass("ag-slider-field");let{minValue:e,maxValue:t,textFieldWidth:i,step:s,value:o,onValueChange:r}=this.config;null!=e&&this.setMinValue(e),null!=t&&this.setMaxValue(t),null!=i&&this.setTextFieldWidth(i),null!=s&&this.setStep(s),null!=o&&this.setValue(o),null!=r&&this.onValueChange(r)}onValueChange(e){let t=tP.EVENT_FIELD_VALUE_CHANGED;return this.addManagedListener(this.eText,t,()=>{let t=parseFloat(this.eText.getValue());this.eSlider.setValue(t.toString(),!0),e(t||0)}),this.addManagedListener(this.eSlider,t,()=>{let t=this.eSlider.getValue();this.eText.setValue(t,!0),e(parseFloat(t))}),this}setSliderWidth(e){return this.eSlider.setWidth(e),this}setTextFieldWidth(e){return this.eText.setWidth(e),this}setMinValue(e){return this.eSlider.setMinValue(e),this.eText.setMin(e),this}setMaxValue(e){return this.eSlider.setMaxValue(e),this.eText.setMax(e),this}getValue(){return this.eText.getValue()}setValue(e,t){return this.getValue()===e||(this.eText.setValue(e,!0),this.eSlider.setValue(e,!0),t||this.dispatchEvent({type:tP.EVENT_FIELD_VALUE_CHANGED})),this}setStep(e){return this.eSlider.setStep(e),this.eText.setStep(e),this}};lj.TEMPLATE=`<div class="ag-slider">
174            <label ref="eLabel"></label>
175            <div class="ag-wrapper ag-slider-wrapper">
176                <ag-input-range ref="eSlider"></ag-input-range>
177                <ag-input-number-field ref="eText"></ag-input-number-field>
178            </div>
179        </div>`,K([ot("eLabel")],lj.prototype,"eLabel",2),K([ot("eSlider")],lj.prototype,"eSlider",2),K([ot("eText")],lj.prototype,"eText",2),K([eV],lj.prototype,"init",1);var lq=lj,lQ=class e extends s9{constructor(t={}){super(e.getTemplate(t)),this.params=t,this.suppressEnabledCheckbox=!0,this.suppressToggleExpandOnEnableChange=!1;let{enabled:i,items:s,suppressEnabledCheckbox:o,expanded:r,suppressToggleExpandOnEnableChange:n,useToggle:l}=t;this.cssIdentifier=t.cssIdentifier||"default",this.enabled=null==i||i,this.items=s||[],this.useToggle=null!=l&&l,this.alignItems=t.alignItems||"center",this.expanded=null==r||r,null!=o&&(this.suppressEnabledCheckbox=o),null!=n&&(this.suppressToggleExpandOnEnableChange=n)}static getTemplate(e){let t=e.cssIdentifier||"default",i=e.direction||"vertical";return`
180            <div class="ag-group ag-${t}-group" role="presentation">
181                <div ref="eToolbar" class="ag-group-toolbar ag-${t}-group-toolbar">
182                    <ag-checkbox ref="cbGroupEnabled"></ag-checkbox>
183                </div>
184                <div ref="eContainer" class="ag-group-container ag-group-container-${i} ag-${t}-group-container"></div>
185            </div>
186        `}postConstruct(){if(this.setupTitleBar(),this.items.length){let e=this.items;this.items=[],this.addItems(e)}let e=this.localeService.getLocaleTextFunc();this.cbGroupEnabled.setLabel(e("enabled","Enabled")),this.enabled&&this.setEnabled(this.enabled,void 0,!0),this.setAlignItems(this.alignItems);let{onEnableChange:t,suppressOpenCloseIcons:i}=this.params;this.hideEnabledCheckbox(this.suppressEnabledCheckbox),this.hideOpenCloseIcons(null!=i&&i),this.refreshChildDisplay(),i8(this.eContainer,this.expanded),this.cbGroupEnabled.onValueChange(e=>{this.setEnabled(e,!0,this.suppressToggleExpandOnEnableChange),this.dispatchEnableChangeEvent(e)}),null!=t&&this.onEnableChange(t)}refreshChildDisplay(){var e;i8(this.eToolbar,this.expanded&&!this.suppressEnabledCheckbox),null==(e=this.eTitleBar)||e.refreshOnExpand(this.expanded)}isExpanded(){return this.expanded}setAlignItems(e){this.alignItems!==e&&this.removeCssClass(`ag-group-item-alignment-${this.alignItems}`),this.alignItems=e;let t=`ag-group-item-alignment-${this.alignItems}`;return this.addCssClass(t),this}toggleGroupExpand(t){var i;let s=!1;if((null==(i=this.eTitleBar)?void 0:i.isSuppressCollapse())&&!this.useToggle)t=!0,s=!0;else if(t=null!=t?t:!this.expanded,this.expanded===t)return this;return this.expanded=t,this.refreshChildDisplay(),i8(this.eContainer,t),s||this.dispatchEvent({type:t?e.EVENT_EXPANDED:e.EVENT_COLLAPSED}),this}addItems(e){e.forEach(e=>this.addItem(e))}prependItem(e){this.insertItem(e,!0)}addItem(e){this.insertItem(e,!1)}insertItem(e,t){let i=this.eContainer,s=e instanceof s9?e.getGui():e;s.classList.add("ag-group-item",`ag-${this.cssIdentifier}-group-item`),t?(i.insertAdjacentElement("afterbegin",s),this.items.unshift(s)):(i.appendChild(s),this.items.push(s))}hideItem(e,t){i8(this.items[t],!e)}getItemIndex(e){let t=e instanceof s9?e.getGui():e;return this.items.indexOf(t)}setTitle(e){var t;return null==(t=this.eTitleBar)||t.setTitle(e),this}addTitleBarWidget(e){var t;return null==(t=this.eTitleBar)||t.addWidget(e),this}addCssClassToTitleBar(e){var t;null==(t=this.eTitleBar)||t.addCssClass(e)}
186dispatchEnableChangeEvent(t){let i={type:e.EVENT_ENABLE_CHANGE,enabled:t};this.dispatchEvent(i)}setEnabled(e,t,i){var s;return this.enabled=e,this.refreshDisabledStyles(),i||this.toggleGroupExpand(e),t||(this.cbGroupEnabled.setValue(e),null==(s=this.eToggle)||s.setValue(e)),this}isEnabled(){return this.enabled}onEnableChange(t){return this.addManagedListener(this,e.EVENT_ENABLE_CHANGE,e=>t(e.enabled)),this}hideEnabledCheckbox(e){return this.suppressEnabledCheckbox=e,this.refreshChildDisplay(),this.refreshDisabledStyles(),this}hideOpenCloseIcons(e){var t;return null==(t=this.eTitleBar)||t.hideOpenCloseIcons(e),this}refreshDisabledStyles(){var e;let t=!this.enabled;this.eContainer.classList.toggle("ag-disabled",t),null==(e=this.eTitleBar)||e.refreshDisabledStyles(this.suppressEnabledCheckbox&&t),this.eContainer.classList.toggle("ag-disabled-group-container",t)}setupTitleBar(){let e=this.useToggle?this.createToggleTitleBar():this.createDefaultTitleBar();this.eToolbar.insertAdjacentElement("beforebegin",e.getGui())}createDefaultTitleBar(){let e=this.createManagedBean(new l0(this.params));return this.eTitleBar=e,e.refreshOnExpand(this.expanded),this.addManagedListener(e,l0.EVENT_EXPAND_CHANGED,e=>this.toggleGroupExpand(e.expanded)),e}createToggleTitleBar(){var e;let t=this.createManagedBean(new lH({value:this.enabled,label:this.params.title,labelAlignment:"left",labelWidth:"flex",onValueChange:e=>{this.setEnabled(e,!0),this.dispatchEnableChangeEvent(e)}}));return t.addCssClass("ag-group-title-bar"),t.addCssClass(`ag-${null!=(e=this.params.cssIdentifier)?e:"default"}-group-title-bar ag-unselectable`),this.eToggle=t,this.toggleGroupExpand(this.enabled),t}};lQ.EVENT_EXPANDED="expanded",lQ.EVENT_COLLAPSED="collapsed",lQ.EVENT_ENABLE_CHANGE="enableChange",K([ot("eToolbar")],lQ.prototype,"eToolbar",2),K([ot("cbGroupEnabled")],lQ.prototype,"cbGroupEnabled",2),K([ot("eContainer")],lQ.prototype,"eContainer",2),K([eV],lQ.prototype,"postConstruct",1);var lX=lQ,lJ="ag-disabled-group-title-bar",lZ=class e extends s9{constructor(t={}){super(e.getTemplate(t)),this.suppressOpenCloseIcons=!1;let{title:i,suppressOpenCloseIcons:s}=t;i&&i.length>0&&(this.title=i),null!=s&&(this.suppressOpenCloseIcons=s)}static getTemplate(e){var t;let i=null!=(t=e.cssIdentifier)?t:"default";return`
187            <div class="ag-group-title-bar ag-${i}-group-title-bar ag-unselectable" role="button">
188                <span class="ag-group-title-bar-icon ag-${i}-group-title-bar-icon" ref="eGroupOpenedIcon" role="presentation"></span>
189                <span class="ag-group-title-bar-icon ag-${i}-group-title-bar-icon" ref="eGroupClosedIcon" role="presentation"></span>
190                <span ref="eTitle" class="ag-group-title ag-${i}-group-title"></span>
191            </div>
192        `}postConstruct(){this.setTitle(this.title),this.hideOpenCloseIcons(this.suppressOpenCloseIcons),this.setupExpandContract()}setupExpandContract(){this.eGroupClosedIcon.appendChild(s_("columnSelectClosed",this.gos,null)),this.eGroupOpenedIcon.appendChild(s_("columnSelectOpen",this.gos,null)),this.addManagedListener(this.getGui(),"click",()=>this.dispatchExpandChanged()),this.addManagedListener(this.getGui(),"keydown",e=>{switch(e.key){case sk.ENTER:case sk.SPACE:e.preventDefault(),this.dispatchExpandChanged();break;case sk.RIGHT:case sk.LEFT:e.preventDefault(),this.dispatchExpandChanged(e.key===sk.RIGHT)}})}refreshOnExpand(e){this.refreshAriaStatus(e),this.refreshOpenCloseIcons(e)}refreshAriaStatus(e){this.suppressOpenCloseIcons||iu(this.getGui(),e)}refreshOpenCloseIcons(e){let t=!this.suppressOpenCloseIcons;i8(this.eGroupOpenedIcon,t&&e),i8(this.eGroupClosedIcon,t&&!e)}isSuppressCollapse(){return this.suppressOpenCloseIcons}dispatchExpandChanged(t){let i={type:e.EVENT_EXPAND_CHANGED,expanded:t};this.dispatchEvent(i)}setTitle(e){let t=this.getGui(),i=!!e&&e.length>0;e=i?e:void 0,this.eTitle.textContent=null!=e?e:"",i8(t,i),e!==this.title&&(this.title=e);let s=t.classList.contains(lJ);return this.refreshDisabledStyles(s),this}addWidget(e){return this.getGui().appendChild(e),this}hideOpenCloseIcons(e){return this.suppressOpenCloseIcons=e,e&&this.dispatchExpandC
192hanged(!0),this}refreshDisabledStyles(e){let t=this.getGui();e?(t.classList.add(lJ),t.removeAttribute("tabindex")):(t.classList.remove(lJ),"string"==typeof this.title?t.setAttribute("tabindex","0"):t.removeAttribute("tabindex"))}};lZ.EVENT_EXPAND_CHANGED="expandedChanged",K([ot("eGroupOpenedIcon")],lZ.prototype,"eGroupOpenedIcon",2),K([ot("eGroupClosedIcon")],lZ.prototype,"eGroupClosedIcon",2),K([ot("eTitle")],lZ.prototype,"eTitle",2),K([eV],lZ.prototype,"postConstruct",1);var l0=lZ,l1=class extends lw{constructor(e=0,t){super('<div class="ag-menu-list" role="tree"></div>'),this.level=e,this.menuItems=[],this.params=null!=t?t:{column:null,node:null,value:null}}postConstruct(){this.initialiseTabGuard({onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e),onFocusIn:e=>this.handleFocusIn(e),onFocusOut:e=>this.handleFocusOut(e)})}onTabKeyDown(e){let t=this.getParentComponent(),i=t&&t.getGui();i&&i.classList.contains("ag-focus-managed")||e.preventDefault(),e.shiftKey&&this.closeIfIsChild(e)}handleKeyDown(e){switch(e.key){case sk.UP:case sk.RIGHT:case sk.DOWN:case sk.LEFT:e.preventDefault(),this.handleNavKey(e.key);break;case sk.ESCAPE:this.closeIfIsChild()&&tg(e)}}handleFocusIn(e){var t,i;let s=e.relatedTarget;!this.tabGuardCtrl.isTabGuard(s)&&(this.getGui().contains(s)||(null==(i=null==(t=this.activeMenuItem)?void 0:t.getSubMenuGui())?void 0:i.contains(s)))||(this.activeMenuItem?this.activeMenuItem.activate():this.activateFirstItem())}handleFocusOut(e){var t;let i=e.relatedTarget;!(!this.activeMenuItem||this.getGui().contains(i)||(null==(t=this.activeMenuItem.getSubMenuGui())?void 0:t.contains(i)))&&(this.activeMenuItem.isSubMenuOpening()||this.activeMenuItem.deactivate())}clearActiveItem(){this.activeMenuItem&&(this.activeMenuItem.deactivate(),this.activeMenuItem=null)}addMenuItems(e){null!=e&&s1.all(e.map(e=>"separator"===e?s1.resolve({eGui:this.createSeparator()}):"string"==typeof e?(console.warn(`AG Grid: unrecognised menu item ${e}`),s1.resolve({eGui:null})):this.addItem(e))).then(e=>{e.forEach(e=>{(null==e?void 0:e.eGui)&&(this.appendChild(e.eGui),e.comp&&this.menuItems.push(e.comp))})})}addItem(e){let t=this.createManagedBean(new l5);return t.init({menuItemDef:e,isAnotherSubMenuOpen:()=>this.menuItems.some(e=>e.isSubMenuOpen()),level:this.level,contextParams:this.params}).then(()=>(t.setParentComponent(this),this.addManagedListener(t,l5.EVENT_CLOSE_MENU,e=>{this.dispatchEvent(e)}),this.addManagedListener(t,l5.EVENT_MENU_ITEM_ACTIVATED,e=>{this.activeMenuItem&&this.activeMenuItem!==e.menuItem&&this.activeMenuItem.deactivate(),this.activeMenuItem=e.menuItem}),{comp:t,eGui:t.getGui()}))}activateFirstItem(){let e=this.menuItems.filter(e=>!e.isDisabled())[0];e&&e.activate()}createSeparator(){return sg(`
193            <div class="ag-menu-separator" aria-hidden="true">
194                <div class="ag-menu-separator-part"></div>
195                <div class="ag-menu-separator-part"></div>
196                <div class="ag-menu-separator-part"></div>
197                <div class="ag-menu-separator-part"></div>
198            </div>`)}handleNavKey(e){switch(e){case sk.UP:case sk.DOWN:let t=this.findNextItem(e===sk.UP);t&&t!==this.activeMenuItem&&t.activate();return}e===(this.gos.get("enableRtl")?sk.RIGHT:sk.LEFT)?this.closeIfIsChild():this.openChild()}closeIfIsChild(e){let t=this.getParentComponent();return!!t&&t instanceof l5&&(e&&e.preventDefault(),t.closeSubMenu(),t.getGui().focus(),!0)}openChild(){this.activeMenuItem&&this.activeMenuItem.openSubMenu(!0)}findNextItem(e){let t;let i=this.menuItems.filter(e=>!e.isDisabled());if(!i.length)return;if(!this.activeMenuItem)return e?e5(i):i[0];e&&i.reverse();let s=!1;for(let e=0;e<i.length;e++){let o=i[e];if(!s){o===this.activeMenuItem&&(s=!0);continue}t=o;break}return s&&!t?i[0]:t||this.activeMenuItem}destroy(){this.clearActiveItem(),super.destroy()}};K([eB("focusService")],l1.prototype,"focusService",2),K([eV],l1.prototype,"postConstruct",1);var l2=class extends lw{constructor(e){super(),this.wrappedComponent=e,this.setTemplateFromElement(e.getGui())}postConstruct(){this.initialiseTabGuard({onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e)})}handleKeyDown(e){e.key===sk.ESCAPE&&this.closePanel()}onTabKeyDown(e){e.defaultPrevented||(this.closePanel(),e.preventDefault())}closePanel(){let e=this.parentComponent;e.closeSubMenu(),setTimeout(()=>
198e.getGui().focus(),0)}};K([eV],l2.prototype,"postConstruct",1);var l3=class e extends tR{constructor(){super(...arguments),this.isActive=!1,this.subMenuIsOpen=!1,this.subMenuIsOpening=!1,this.suppressRootStyles=!0,this.suppressAria=!0,this.suppressFocus=!0}init(e){var t,i;let{menuItemDef:s,isAnotherSubMenuOpen:o,level:r,childComponent:n,contextParams:l}=e;return this.params=e.menuItemDef,this.level=r,this.isAnotherSubMenuOpen=o,this.childComponent=n,this.contextParams=l,this.cssClassPrefix=null!=(i=null==(t=this.params.menuItemParams)?void 0:t.cssClassPrefix)?i:"ag-menu-option",this.userComponentFactory.getMenuItemCompDetails(this.params,W(B({},s),{level:r,isAnotherSubMenuOpen:o,openSubMenu:e=>this.openSubMenu(e),closeSubMenu:()=>this.closeSubMenu(),closeMenu:e=>this.closeMenu(e),updateTooltip:(e,t)=>this.refreshTooltip(e,t),onItemActivated:()=>this.onItemActivated()})).newAgStackInstance().then(e=>{var t;this.menuItemComp=e;let i=null==(t=e.configureDefaults)?void 0:t.call(e);i&&this.configureDefaults(!0===i?void 0:i)})}addListeners(e,t){(null==t?void 0:t.suppressClick)||this.addManagedListener(e,"click",e=>this.onItemSelected(e)),(null==t?void 0:t.suppressKeyboardSelect)||this.addManagedListener(e,"keydown",e=>{(e.key===sk.ENTER||e.key===sk.SPACE)&&(e.preventDefault(),this.onItemSelected(e))}),(null==t?void 0:t.suppressMouseDown)||this.addManagedListener(e,"mousedown",e=>{e.stopPropagation(),e.preventDefault()}),(null==t?void 0:t.suppressMouseOver)||(this.addManagedListener(e,"mouseenter",()=>this.onMouseEnter()),this.addManagedListener(e,"mouseleave",()=>this.onMouseLeave()))}isDisabled(){return!!this.params.disabled}openSubMenu(t=!1){var i,s;let o;if(this.closeSubMenu(),!this.params.subMenu)return;this.subMenuIsOpening=!0;
198let r=sg('<div class="ag-menu" role="presentation"></div>');this.eSubMenuGui=r;let n=()=>{this.subMenuIsOpening=!1};if(this.childComponent){let e=this.createBean(new l2(this.childComponent));e.setParentComponent(this);let t=e.getGui(),i="mouseenter",s=()=>this.cancelDeactivate();t.addEventListener(i,s),o=()=>t.removeEventListener(i,s),r.appendChild(t),this.childComponent.afterGuiAttached&&(n=()=>{this.childComponent.afterGuiAttached(),this.subMenuIsOpening=!1})}else if(this.params.subMenu){let i=this.createBean(new l1(this.level+1,this.contextParams));i.setParentComponent(this),i.addMenuItems(this.params.subMenu),r.appendChild(i.getGui()),this.addManagedListener(i,e.EVENT_CLOSE_MENU,e=>this.dispatchEvent(e)),i.addGuiEventListener("mouseenter",()=>this.cancelDeactivate()),o=()=>this.destroyBean(i),t&&(n=()=>{i.activateFirstItem(),this.subMenuIsOpening=!1})}let l=this.popupService.positionPopupForMenu.bind(this.popupService,{eventSource:this.eGui,ePopup:r}),a=this.localeService.getLocaleTextFunc(),h=this.popupService.addPopup({modal:!0,eChild:r,positionCallback:l,anchorToElement:this.eGui,ariaLabel:a("ariaLabelSubMenu","SubMenu"),afterGuiAttached:n});this.subMenuIsOpen=!0,this.setAriaExpanded(!0),this.hideSubMenu=()=>{var e,t;h&&h.hideFunc(),this.subMenuIsOpen=!1,this.setAriaExpanded(!1),o(),null==(t=(e=this.menuItemComp).setExpanded)||t.call(e,!1),this.eSubMenuGui=void 0},null==(s=(i=this.menuItemComp).setExpanded)||s.call(i,!0)}setAriaExpanded(e){this.suppressAria||iu(this.eGui,e)}closeSubMenu(){this.hideSubMenu&&(this.hideSubMenu(),this.hideSubMenu=null,this.setAriaExpanded(!1))}isSubMenuOpen(){return this.subMenuIsOpen}isSubMenuOpening(){return this.subMenuIsOpening}activate(e){var t,i;this.cancelActivate(),this.params.disabled||(this.isActive=!0,this.suppressRootStyles||this.eGui.classList.add(`${this.cssClassPrefix}-active`),null==(i=(t=this.menuItemComp).setActive)||i.call(t,!0),this.suppressFocus||this.eGui.focus({preventScroll:!0}),e&&this.params.subMenu&&window.setTimeout(()=>{this.isAlive()&&this.isActive&&this.openSubMenu()},300),this.onItemActivated())}deactivate(){var e,t;this.cancelDeactivate(),this.suppressRootStyles||this.eGui.classList.remove(`${this.cssClassPrefix}-active`),null==(t=(e=this.menuItemComp).setActive)||t.call(e,!1),this.isActive=!1,this.subMenuIsOpen&&this.hideSubMenu()}getGui(){return this.menuItemComp.getGui()}getParentComponent(){return this.parentComponent}setParentComponent(e){this.parentComponent=e}getSubMenuGui(){return this.eSubMenuGui}onItemSelected(e){var t,i;null==(i=(t=this.menuItemComp).select)||i.call(t),this.params.action?this.getFrameworkOverrides().wrapOutgoing(()=>this.params.action(this.gos.addGridCommonParams(B({},this.contextParams)))):this.openSubMenu(e&&"keydown"===e.type),this.params.subMenu&&!this.params.action||this.params.suppressCloseOnSelect||this.closeMenu(e)}closeMenu(t){let i={type:e.EVENT_CLOSE_MENU};t&&(t instanceof MouseEvent?i.mouseEvent=t:i.keyboardEvent=t),this.dispatchEvent(i)}onItemActivated(){let t={type:e.EVENT_MENU_ITEM_ACTIVATED,menuItem:this};this.dispatchEvent(t)}cancelActivate(){this.activateTimeoutId&&(window.clearTimeout(this.activateTimeoutId),this.activateTimeoutId=0)}cancelDeactivate(){this.deactivateTimeoutId&&(window.clearTimeout(this.deactivateTimeoutId),this.deactivateTimeoutId=0)}onMouseEnter(){this.cancelDeactivate(),this.isAnotherSubMenuOpen()?this.activateTimeoutId=window.setTimeout(()=>this.activate(!0),e.ACTIVATION_DELAY):this.activate(!0)}onMouseLeave(){this.cancelActivate(),this.isSubMenuOpen()?this.deactivateTimeoutId=window.setTimeout(()=>this.deactivate(),e.ACTIVATION_DELAY):this.deactivate()}configureDefaults(e){var t,i,s;if(!this.menuItemComp){setTimeout(()=>this.configureDefaults(e));return}let o=this.menuItemComp.getGui(),r=null==(i=(t=this.menuItemComp).getRootElement)?void 0:i.call(t);r&&((null==e?void 0:e.suppressRootStyles)||o.classList.add("ag-menu-option-custom"),o=r),this.eGui=o,this.suppressRootStyles=!!(null==e?void 0:e.suppressRootStyles),!this.suppressRootStyles&&(o.classList.add(this.cssClassPrefix),null==(s=this.params.cssClasse
198s)||s.forEach(e=>o.classList.add(e)),this.params.disabled&&o.classList.add(`${this.cssClassPrefix}-disabled`)),(null==e?void 0:e.suppressTooltip)||this.refreshTooltip(this.params.tooltip),this.suppressAria=!!(null==e?void 0:e.suppressAria),!this.suppressAria&&(t4(o,"treeitem"),il(o,this.level+1),this.params.disabled&&ia(o,!0)),(null==e?void 0:e.suppressTabIndex)||o.setAttribute("tabindex","-1"),this.params.disabled||this.addListeners(o,e),this.suppressFocus=!!(null==e?void 0:e.suppressFocus)}refreshTooltip(e,t){this.tooltip=e,this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),e&&this.menuItemComp&&(this.tooltipFeature=this.createBean(new s6({getGui:()=>this.getGui(),getTooltipValue:()=>this.tooltip,getLocation:()=>"menu",shouldDisplayTooltip:t})))}destroy(){this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),super.destroy()}};l3.EVENT_CLOSE_MENU="closeMenu",l3.EVENT_MENU_ITEM_ACTIVATED="menuItemActivated",l3.ACTIVATION_DELAY=80,K([eB("popupService")],l3.prototype,"popupService",2),K([eB("userComponentFactory")],l3.prototype,"userComponentFactory",2);var l5=l3,l4=class e extends s9{constructor(t){super(e.getTemplate(t)),this.config=t,this.closable=!0}static getTemplate(e){let t=e.cssIdentifier||"default";return`<div class="ag-panel ag-${t}-panel" tabindex="-1">
199            <div ref="eTitleBar" class="ag-panel-title-bar ag-${t}-panel-title-bar ag-unselectable">
200                <span ref="eTitle" class="ag-panel-title-bar-title ag-${t}-panel-title-bar-title"></span>
201                <div ref="eTitleBarButtons" class="ag-panel-title-bar-buttons ag-${t}-panel-title-bar-buttons"></div>
202            </div>
203            <div ref="eContentWrapper" class="ag-panel-content-wrapper ag-${t}-panel-content-wrapper"></div>
204        </div>`}postConstruct(){let{component:e,closable:t,hideTitleBar:i,title:s,minWidth:o=250,width:r,minHeight:n=250,height:l,centered:a,popup:h,x:d,y:u}=this.config;this.positionableFeature=new ou(this.getGui(),{minWidth:o,width:r,minHeight:n,height:l,centered:a,x:d,y:u,popup:h,calculateTopBuffer:()=>this.positionableFeature.getHeight()-this.getBodyHeight()}),this.createManagedBean(this.positionableFeature);let c=this.getGui();e&&this.setBodyComponent(e),i?i8(this.eTitleBar,!1):(s&&this.setTitle(s),this.setClosable(null!=t?t:this.closable)),this.addManagedListener(this.eTitleBar,"mousedown",e=>{if(c.contains(e.relatedTarget)||c.contains(this.gos.getActiveDomElement())||this.eTitleBarButtons.contains(e.target)){e.preventDefault();return}let t=this.eContentWrapper.querySelector("button, [href], input, select, textarea, [tabindex]");t&&t.focus()}),h&&this.positionableFeature.isPositioned()||(this.renderComponent&&this.renderComponent(),this.positionableFeature.initialisePosition(),this.eContentWrapper.style.height="0")}renderComponent(){let e=this.getGui();e.focus(),this.close=()=>{e.parentElement.removeChild(e),this.destroy()}}getHeight(){return this.positionableFeature.getHeight()}setHeight(e){this.positionableFeature.setHeight(e)}getWidth(){return this.positionableFeature.getWidth()}setWidth(e){this.positionableFeature.setWidth(e)}setClosable(t){if(t!==this.closable&&(this.closable=t),t){let t=this.closeButtonComp=new s9(e.CLOSE_BTN_TEMPLATE);this.getContext().createBean(t);let i=t.getGui(),s=sV("close",this.gos);s.classList.add("ag-panel-title-bar-button-icon"),i.appendChild(s),this.addTitleBarButton(t),t.addManagedListener(i,"click",this.onBtClose.bind(this))}else if(this.closeButtonComp){let e=this.closeButtonComp.getGui();e.parentElement.removeChild(e),this.closeButtonComp=this.destroyBean(this.closeButtonComp)}}setBodyComponent(e){e.setParentComponent(this),this.eContentWrapper.appendChild(e.getGui())}addTitleBarButton(e,t){let i=this.eTitleBarButtons,s=i.children,o=s.length;null==t&&(t=o),t=Math.max(0,Math.min(t,o)),e.addCssClass("ag-panel-title-bar-button");let r=e.getGui();0===t?i.insertAdjacentElement("afterbegin",r):t===o?i.insertAdjacentElement("beforeend",r):s[t-1].insertAdjacentElement("afterend",r),e.setParentComponent(this)}getBodyHeight(){return si(this.eContentWrapper)}getBodyWidth(){return ss(this.eContentWrapper)}setTitle(e){this.eTitle.innerText=e}onBtClose(){this.close()}destroy(){this.closeButtonComp&&(this.closeButtonComp=this.destroyBean(this.closeButtonComp));let e=this.getGui();e&&sp(e)&&this.close(),super.destroy()}};l4.CLOSE_BTN_TEMPLATE='<div class="ag-button"></div>',K([ot("eContentWrapper")],l4.prototype,"eContentWrapper",2),K([ot("eTitleBar")],l4.prototype,"eTitleBar",2),K([ot("eTitleBarButtons")],l4.prototype,"eTitleBarButtons",2),K([ot("eTitle")],l4.prototype,"eTitle",2),K([eV],l4.prototype,"postConstruct",1);var l6=l4,l8=class extends l6{constructor(e){super(W(B({},e),{popup:!0})),this.isMaximizable=!1,this.isMaximized=!1,this.maximizeListeners=[],this.resizeListenerDestroy=null,this.lastPosition={x:0,y:0,width:0,height:0}}postConstruct(){let e=this.getGui(),{movable:t,resizable:i,maximizable:s}=this.config;this.addCssClass("ag-dialog"),super.postConstruct(),this.addManagedListener(e,"focusin",t=>{this.popupService.bringPopupToFront(e)}),t&&this.setMovable(t),s&&this.setMaximizable(s),i&&this.setResizable(i)}renderComponent(){let e=this.getGui(),{alwaysOnTop:t,modal:i,title:s,afterGuiAttached:o}=this.config,r=this.localeService.getLocaleTextFunc(),n=this.popupService.addPopup({modal:i,eChild:e,closeOnEsc:!0,closedCallback:this.onClosed.bind(this),alwaysOnTop:t,ariaLabel:s||r("ariaLabelDialog","Dialog"),afterGuiAttached:o});n&&(this.close=n.hideFunc)}onClosed(e){var t,i;this.destroy(),null==(i=(t=this.config).closedCallback)||i.call(t,e)}toggleMaximize(){let e=this.positionableFeature.getPosition();if(this.isMaximized){let{x:e,y:t,width:i,height:s}=this.lastPosition;this.setWidth(i),this.setHeight(s),this.positionableFeature.offsetElement(e,t)}else this.lastPosition.width=this.getWidth(),this.lastPosition.height=this.getHeight(),this.lastPosition.x=e.x,this.lastPosition.y=e.y,this.positionableFeature.offsetElement(0,0),this.setHeight("100%"),this.setWidth("100%");this.isMaximized=!this.isMaximized,this.refreshMaximizeIcon()}refreshMaximizeIcon(){i8(this.maximizeIcon,!this.isMaximized),i8(this.minimizeIcon,this.isMaximized)}clearMaximizebleListeners(){this.maximizeListeners.length&&(this.maximizeListeners.forEac
204h(e=>e()),this.maximizeListeners.length=0),this.resizeListenerDestroy&&(this.resizeListenerDestroy(),this.resizeListenerDestroy=null)}destroy(){this.maximizeButtonComp=this.destroyBean(this.maximizeButtonComp),this.clearMaximizebleListeners(),super.destroy()}setResizable(e){this.positionableFeature.setResizable(e)}setMovable(e){this.positionableFeature.setMovable(e,this.eTitleBar)}setMaximizable(e){if(!e){this.clearMaximizebleListeners(),this.maximizeButtonComp&&(this.destroyBean(this.maximizeButtonComp),this.maximizeButtonComp=this.maximizeIcon=this.minimizeIcon=void 0);return}let t=this.eTitleBar;if(!t||e===this.isMaximizable)return;let i=this.buildMaximizeAndMinimizeElements();this.refreshMaximizeIcon(),i.addManagedListener(i.getGui(),"click",this.toggleMaximize.bind(this)),this.addTitleBarButton(i,0),this.maximizeListeners.push(this.addManagedListener(t,"dblclick",this.toggleMaximize.bind(this))),this.resizeListenerDestroy=this.addManagedListener(this,"resize",()=>{this.isMaximized=!1,this.refreshMaximizeIcon()})}buildMaximizeAndMinimizeElements(){let e=this.maximizeButtonComp=this.createBean(new s9('<div class="ag-dialog-button"></span>')),t=e.getGui();return this.maximizeIcon=sV("maximize",this.gos),t.appendChild(this.maximizeIcon),this.maximizeIcon.classList.add("ag-panel-title-bar-button-icon"),this.minimizeIcon=sV("minimize",this.gos),t.appendChild(this.minimizeIcon),this.minimizeIcon.classList.add("ag-panel-title-bar-button-icon"),e}};K([eB("popupService")],l8.prototype,"popupService",2);var l7=0,l9=class extends tR{constructor(){super(...arguments),this.popupList=[]}postConstruct(){this.ctrlsService.whenReady(e=>{this.gridCtrl=e.gridCtrl}),this.addManagedListener(this.eventService,tP.EVENT_GRID_STYLES_CHANGED,this.handleThemeChange.bind(this))}getPopupParent(){return this.gos.get("popupParent")||this.gridCtrl.getGui()}positionPopupForMenu(e){let t;let{eventSource:i,ePopup:s}=e,o=this.getPopupIndex(s);-1!==o&&(this.popupList[o].alignedToElement=i);let r=i.getBoundingClientRect(),n=this.getParentRect(),l=this.keepXYWithinBounds(s,r.top-n.top,0),a=s.clientWidth>0?s.clientWidth:200;s.style.minWidth=`${a}px`;let h=n.right-n.left-a;function d(){return r.right-n.left-2}function u(){return r.left-n.left-a}this.gos.get("enableRtl")?((t=u())<0&&(t=d(),this.setAlignedStyles(s,"left")),t>h&&(t=0,this.setAlignedStyles(s,"right"))):((t=d())>h&&(t=u(),this.setAlignedStyles(s,"right")),t<0&&(t=0,this.setAlignedStyles(s,"left"))),s.style.left=`${t}px`,s.style.top=`${l}px`}positionPopupUnderMouseEvent(e){let{ePopup:t,nudgeX:i,nudgeY:s,skipObserver:o}=e;this.positionPopup({ePopup:t,nudgeX:i,nudgeY:s,keepWithinBounds:!0,skipObserver:o,updatePosition:()=>this.calculatePointerAlign(e.mouseEvent),postProcessCallback:()=>this.callPostProcessPopup(e.type,e.ePopup,null,e.mouseEvent,e.column,e.rowNode)})}calculatePointerAlign(e){let t=this.getParentRect();return{x:e.clientX-t.left,y:e.clientY-t.top}}positionPopupByComponent(e){let{ePopup:t,nudgeX:i,nudgeY:s,keepWithinBounds:o,eventSource:r,alignSide:n="left",position:l="over",column:a,rowNode:h,type:d}=e,u=r.getBoundingClientRect(),c=this.getParentRect(),p=this.getPopupIndex(t);-1!==p&&(this.popupList[p].alignedToElement=r),this.positionPopup({ePopup:t,nudgeX:i,nudgeY:s,keepWithinBounds:o,updatePosition:()=>{let i,o=u.left-c.left;return"right"===n&&(o-=t.offsetWidth-u.width),"over"===l?(i=u.top-c.top,this.setAlignedStyles(t,"over")):(this.setAlignedStyles(t,"under"),i="under"===this.shouldRenderUnderOrAbove(t,u,c,e.nudgeY||0)?u.top-c.top+u.height:u.top-t.offsetHeight-2*(s||0)-c.top),{x:o,y:i}},postProcessCallback:()=>this.callPostProcessPopup(d,t,r,null,a,h)})}shouldRenderUnderOrAbove(e,t,i,s){let o=i.bottom-t.bottom,r=t.top-i.top,n=e.offsetHeight+s;return o>n?"under":r>n||r>o?"above":"under"}setAlignedStyles(e,t){let i=this.getPopupIndex(e);if(-1===i)return;let{alignedToElement:s}=this.popupList[i];s&&(["right","left","over","above","under"].forEach(t=>{s.classList.remove(`ag-has-popup-positioned-${t}`),e.classList.remove(`ag-popup-positioned-${t}`)}),t&&(s.classList.add(`ag-has-popup-positioned-${t}`),e.classList.add(`ag-popup-positioned-${t}`)))}callPostProcessPopup(e,t,i,s,o,r){let n=this.gos.getCallback("postProcessPopup");n&&n({column:o,rowNode:r,ePopup:t,type:e,eventSource:i,mouseEvent:s})}positionPopup(e){let{ePopup:t,keepWithinBounds:i,nudgeX:s,nudgeY:o,skipObserver:r,updatePosition:n}=e,l={width:0,height:0},a=(r=!1)=>{let{x:a,y:h}=n();(!r||t.clientWidth!==l.width||t.clientHeight!==l.height)&&(l.width=t.clientWidth,l.height=t.clientHeight,s&&(a+=s),o&&(h+=o),i&&(a=this.keepXYWithinBounds(t,a,1),h=this.keepXYWithinBounds(t,h,0)),t.style.left=`${a}px`,t.style.top=`${h}px`,e.postProcessCallback&&e.postProcessCallback())};if(a(),!r){let e=this.resizeObserverService.observeResize(t,()=>a(!0));setTimeout(()=>e(),l9.WAIT_FOR_POPUP_CONTENT_RESIZE)}}getActivePopups(){return this.popupList.map(e=>e.element)}getPopupList(){return this.popupList}getParentRect(){let e=this.gos.getDocument(),t=this.getPopupParent();return t===e.body?t=e.documentElement:"static"===getComputedStyle(t).position&&(t=t.offsetParent),sn(t)}keepXYWithinBounds(e,t,i){let s=0===i,o=s?"top":"left",r=this.gos.getDocument(),n=r.documentElement,l=this.getPopupParent(),a=l.getBoundingClientRect(),h=r.documentElement.getBoundingClientRect(),d=l===r.body,u=e[s?"offsetHeight":"offsetWidth"],c=s?so:sr,p=d?c(n)+n[s?"scrollTop":"scrollLeft"]:l[s?"clientHeight":"clientWidth"];return d&&(p-=Math.abs(h[o]-a[o])),Math.min(Math.max(t,0),Math.abs(p-u))}addPopup(e){let t=this.gos.getDocument(),{eChild:i,ariaLabel:s,alwaysOnTop:o,positionCallback:r,anchorToElement:n}=e;if(!t)return console.warn("AG Grid: could not find the document, document is empty"),{hideFunc:()=>{}};let l=this.getPopupIndex(i);if(-1!==l)return{hideFunc:this.popupList[l].hideFunc};this.initialisePopupPosition(i);let a=this.createPopupWrapper(i,s,!!o),h=this.addEventListenersToPopup(W(B({},e),{wrapperEl:a}));return r&&r(),this.addPopupToPopupList(i,a,h,n),{hideFunc:h}}initialisePopupPosition(e){let t=this.getPopupParent().getBoundingClientRect();q(e.style.top)||(e.style.top=`${-1*t.top}
204px`),q(e.style.left)||(e.style.left=`${-1*t.left}px`)}createPopupWrapper(e,t,i){let s=this.getPopupParent(),o=document.createElement("div"),{allThemes:r}=this.environment.getTheme();return r.length&&o.classList.add(...r),o.classList.add("ag-popup"),e.classList.add(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||t4(e,"dialog"),ie(e,t),o.appendChild(e),s.appendChild(o),i?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),o}handleThemeChange(){let{allThemes:e}=this.environment.getTheme();for(let t of this.popupList){for(let e of Array.from(t.wrapper.classList))e.startsWith("ag-theme-")&&t.wrapper.classList.remove(e);e.length&&t.wrapper.classList.add(...e)}}addEventListenersToPopup(e){let t=this.gos.getDocument(),i=this.getPopupParent(),{wrapperEl:s,eChild:o,closedCallback:r,afterGuiAttached:n,closeOnEsc:l,modal:a}=e,h=!1,d=e=>{s.contains(this.gos.getActiveDomElement())&&(e.key!==sk.ESCAPE||tm(e)||p({keyboardEvent:e}))},u=e=>p({mouseEvent:e}),c=e=>p({touchEvent:e}),p=(e={})=>{let{mouseEvent:n,touchEvent:l,keyboardEvent:a,forceHide:p}=e;!p&&(this.isEventFromCurrentPopup({mouseEvent:n,touchEvent:l},o)||h)||(h=!0,i.removeChild(s),t.removeEventListener("keydown",d),t.removeEventListener("mousedown",u),t.removeEventListener("touchstart",c),t.removeEventListener("contextmenu",u),this.eventService.removeEventListener(tP.EVENT_DRAG_STARTED,u),r&&r(n||l||a),this.removePopupFromPopupList(o))};return n&&n({hidePopup:p}),window.setTimeout(()=>{l&&t.addEventListener("keydown",d),a&&(t.addEventListener("mousedown",u),this.eventService.addEventListener(tP.EVENT_DRAG_STARTED,u),t.addEventListener("touchstart",c),t.addEventListener("contextmenu",u))},0),p}addPopupToPopupList(e,t,i,s){this.popupList.push({element:e,wrapper:t,hideFunc:i,instanceId:l7++,isAnchored:!!s}),s&&this.setPopupPositionRelatedToElement(e,s)}getPopupIndex(e){return this.popupList.findIndex(t=>t.element===e)}setPopupPositionRelatedToElement(e,t){let i=this.getPopupIndex(e);if(-1===i)return;let s=this.popupList[i];if(s.stopAnchoringPromise&&s.stopAnchoringPromise.then(e=>e&&e()),s.stopAnchoringPromise=void 0,s.isAnchored=!1,!t)return;let o=this.keepPopupPositionedRelativeTo({element:t,ePopup:e,hidePopup:s.hideFunc});return s.stopAnchoringPromise=o,s.isAnchored=!0,o}removePopupFromPopupList(e){this.setAlignedStyles(e,null),this.setPopupPositionRelatedToElement(e,null),this.popupList=this.popupList.filter(t=>t.element!==e)}keepPopupPositionedRelativeTo(e){let t=this.getPopupParent(),i=t.getBoundingClientRect(),{element:s,ePopup:o}=e,r=s.getBoundingClientRect(),n=i.top-r.top,l=i.left-r.left,a=n,h=l,d=o.style.top,u=parseInt(d.substring(0,d.length-1),10),c=o.style.left,p=parseInt(c.substring(0,c.length-1),10);return new s1(i=>{this.getFrameworkOverrides().setInterval(()=>{let i=t.getBoundingClientRect(),r=s.getBoundingClientRect();if(0==r.top&&0==r.left&&0==r.height&&0==r.width){e.hidePopup();return}let d=i.top-r.top;if(d!=a){let e=this.keepXYWithinBounds(o,u+n-d,0);o.style.top=`${e}px`}a=d;let c=i.left-r.left;if(c!=h){let e=this.keepXYWithinBounds(o,p+l-c,1);o.style.left=`${e}px`}h=c},200).then(e=>{i(()=>{null!=e&&window.clearInterval(e)})})})}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isEventFromCurrentPopup(e,t){let{mouseEvent:i,touchEvent:s}=e,o=i||s;if(!o)return!1;let r=this.getPopupIndex(t);if(-1===r)return!1;for(let e=r;e<this.popupList.length;e++)if(tf(this.popupList[e].element,o))return!0;return this.isElementWithinCustomPopup(o.target)}isElementWithinCustomPopup(e){let t=this.gos.getDocument();for(;e&&e!==t.body;){if(e.classList.contains("ag-custom-component-popup")||null===e.parentElement)return!0;e=e.parentElement}return!1}getWrapper(e){for(;!e.classList.contains("ag-popup")&&e.parentElement;)e=e.parentElement;return e.classList.contains("ag-popup")?e:null}setAlwaysOnTop(e,t){let i=this.getWrapper(e);i&&(i.classList.toggle("ag-always-on-top",!!t),t&&this.bringPopupToFront(i))}bringPopupToFront(e){let t=this.getPopupParent(),i=Array.prototype.slice.call(t.querySelectorAll(".ag-popup")),s=i.length,o=Array.prototype.slice.call(t.querySelectorAll(".ag-popup.ag-always-on-top")),r=o.length,n=this.getWrapper(e);if(!n||s<=1||!t.contains(e))return;let l=i.indexOf(n),a=n.querySelectorAll("div"),h=[];
204for(a.forEach(e=>{0!==e.scrollTop&&h.push([e,e.scrollTop])}),r?n.classList.contains("ag-always-on-top")?l!==s-1&&e5(o).insertAdjacentElement("afterend",n):l!==s-r-1&&o[0].insertAdjacentElement("beforebegin",n):l!==s-1&&e5(i).insertAdjacentElement("afterend",n);h.length;){let e=h.pop();e[0].scrollTop=e[1]}}};l9.WAIT_FOR_POPUP_CONTENT_RESIZE=200,K([eB("focusService")],l9.prototype,"focusService",2),K([eB("ctrlsService")],l9.prototype,"ctrlsService",2),K([eB("resizeObserverService")],l9.prototype,"resizeObserverService",2),K([eV],l9.prototype,"postConstruct",1),l9=K([ek("popupService")],l9);var ae=class extends s9{constructor(){super(`
205        <div class="ag-autocomplete-row" role="presentation">
206            <div class="ag-autocomplete-row-label"></div>
207        </div>`),this.hasHighlighting=!1}setState(e,t){this.value=e,this.render(),this.updateSelected(t)}updateSelected(e){this.addOrRemoveCssClass("ag-autocomplete-row-selected",e)}setSearchString(e){var t;let i=!1;if(q(e)){let s=null==(t=this.value)?void 0:t.toLocaleLowerCase().indexOf(e.toLocaleLowerCase());if(s>=0){i=!0,this.hasHighlighting=!0;let t=s+e.length,o=tV(this.value.slice(0,s)),r=tV(this.value.slice(s,t)),n=tV(this.value.slice(t));this.getGui().lastElementChild.innerHTML=`${o}<b>${r}</b>${n}`}}!i&&this.hasHighlighting&&(this.hasHighlighting=!1,this.render())}render(){var e;this.getGui().lastElementChild.innerHTML=null!=(e=tV(this.value))?e:"&nbsp;"}},at=class e extends o1{constructor(t){super(e.TEMPLATE),this.params=t,this.searchString=""}destroy(){super.destroy()}init(){this.autocompleteEntries=this.params.autocompleteEntries,this.virtualList=this.createManagedBean(new lK({cssIdentifier:"autocomplete"})),this.virtualList.setComponentCreator(this.createRowComponent.bind(this)),this.eList.appendChild(this.virtualList.getGui()),this.virtualList.setModel({getRowCount:()=>this.autocompleteEntries.length,getRow:e=>this.autocompleteEntries[e]});let e=this.virtualList.getGui();this.addManagedListener(e,"click",()=>this.params.onConfirmed()),this.addManagedListener(e,"mousemove",this.onMouseMove.bind(this)),this.addManagedListener(e,"mousedown",e=>e.preventDefault()),this.setSelectedValue(0)}onNavigationKeyDown(e,t){e.preventDefault();let i=this.autocompleteEntries.indexOf(this.selectedValue),s=t===sk.UP?i-1:i+1;this.checkSetSelectedValue(s)}setSearch(e){this.searchString=e,q(e)?this.runSearch():(this.autocompleteEntries=this.params.autocompleteEntries,this.virtualList.refresh(),this.checkSetSelectedValue(0)),this.updateSearchInList()}runContainsSearch(e,t){let i;let s=!1,o=e.toLocaleLowerCase(),r=t.filter(e=>{let t=e.toLocaleLowerCase().indexOf(o),r=0===t,n=t>=0;return n&&(!i||!s&&r||s===r&&e.length<i.length)&&(i=e,s=r),n});return!i&&r.length&&(i=r[0]),{topMatch:i,allMatches:r}}runSearch(){var e,t;let i,s;let{autocompleteEntries:o}=this.params,r=o.map(e=>{var t;return null!=(t=e.displayValue)?t:e.key});if(this.params.useFuzzySearch)s=(i=sG(this.searchString,r,!0).values).length?i[0]:void 0;else{let e=this.runContainsSearch(this.searchString,r);i=e.allMatches,s=e.topMatch}let n=o.filter(({key:e,displayValue:t})=>i.includes(null!=t?t:e));if(!n.length&&this.selectedValue&&(null==(t=null==(e=this.params)?void 0:e.forceLastSelection)?void 0:t.call(e,this.selectedValue,this.searchString))&&(n=[this.selectedValue]),this.autocompleteEntries=n,this.virtualList.refresh(),!s)return;let l=i.indexOf(s);this.checkSetSelectedValue(l)}updateSearchInList(){this.virtualList.forEachRenderedRow(e=>e.setSearchString(this.searchString))}checkSetSelectedValue(e){e>=0&&e<this.autocompleteEntries.length&&this.setSelectedValue(e)}setSelectedValue(e){let t=this.autocompleteEntries[e];this.selectedValue!==t&&(this.selectedValue=t,this.virtualList.ensureIndexVisible(e),this.virtualList.forEachRenderedRow((t,i)=>{t.updateSelected(e===i)}))}createRowComponent(e){var t;let i=new ae;return this.getContext().createBean(i),i.setState(null!=(t=e.displayValue)?t:e.key,e===this.selectedValue),i}onMouseMove(e){let t=this.virtualList.getGui().getBoundingClientRect(),i=this.virtualList.getScrollTop(),s=Math.floor((e.clientY-t.top+i)/this.virtualList.getRowHeight());this.checkSetSelectedValue(s)}afterGuiAttached(){this.virtualList.refresh()}getSelectedValue(){var e;return this.autocompleteEntries.length&&null!=(e=this.selectedValue)?e:null}};at.TEMPLATE=`<div class="ag-autocomplete-list-popup">
208            <div ref="eList" class="ag-autocomplete-list"></div>
209        <div>`,K([ot("eList")],at.prototype,"eList",2),K([eV],at.prototype,"init",1);var ai=class e extends s9{constructor(){super(`
210            <div class="ag-autocomplete" role="presentation">
211                <ag-input-text-field ref="eAutocompleteInput"></ag-input-text-field>
212            </div>`),this.isListOpen=!1,this.lastPosition=0,this.valid=!0}postConstruct(){this.eAutocompleteInput.onValueChange(e=>this.onValueChanged(e)),this.eAutocompleteInput.getInputElement().setAttribute("autocomplete","off"),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.addGuiEventListener("click",this.updatePositionAndList.bind(this)),this.addDestroyFunc(()=>{this.destroyBean(this.autocompleteList)}),this.addGuiEventListener("focusout",()=>this.onFocusOut())}onValueChanged(e){let t=j(e);
212this.updateValue(t),this.updateAutocompleteList(t)}updateValue(t){this.updateLastPosition(),this.dispatchEvent({type:e.EVENT_VALUE_CHANGED,value:t}),this.validate(t)}updateAutocompleteList(e){var t,i,s,o;let r=null!=(i=null==(t=this.listGenerator)?void 0:t.call(this,e,this.lastPosition))?i:{enabled:!1};if((!r.type||r.type!==(null==(s=this.autocompleteListParams)?void 0:s.type))&&this.isListOpen&&this.closeList(),this.autocompleteListParams=r,null==(o=this.autocompleteListParams)?void 0:o.enabled){this.isListOpen||this.openList();let{searchString:e}=this.autocompleteListParams;this.autocompleteList.setSearch(null!=e?e:"")}else this.isListOpen&&this.closeList()}onKeyDown(e){let t=e.key;switch(this.updateLastPosition(),t){case sk.ENTER:this.onEnterKeyDown(e);break;case sk.TAB:this.onTabKeyDown(e);break;case sk.DOWN:case sk.UP:this.onUpDownKeyDown(e,t);break;case sk.LEFT:case sk.RIGHT:case sk.PAGE_HOME:case sk.PAGE_END:setTimeout(()=>{this.updatePositionAndList()});break;case sk.ESCAPE:this.onEscapeKeyDown(e);break;case sk.SPACE:e.ctrlKey&&!this.isListOpen&&(e.preventDefault(),this.forceOpenList())}}confirmSelection(){var t;let i=null==(t=this.autocompleteList)?void 0:t.getSelectedValue();i&&(this.closeList(),this.dispatchEvent({type:e.EVENT_OPTION_SELECTED,value:this.getValue(),position:this.lastPosition,updateEntry:i,autocompleteType:this.autocompleteListParams.type}))}onTabKeyDown(e){this.isListOpen&&(e.preventDefault(),e.stopPropagation(),this.confirmSelection())}onEnterKeyDown(e){e.preventDefault(),this.isListOpen?this.confirmSelection():this.onCompleted()}onUpDownKeyDown(e,t){var i;e.preventDefault(),this.isListOpen?null==(i=this.autocompleteList)||i.onNavigationKeyDown(e,t):this.forceOpenList()}onEscapeKeyDown(e){this.isListOpen&&(e.preventDefault(),e.stopPropagation(),this.closeList(),this.setCaret(this.lastPosition,!0))}onFocusOut(){this.isListOpen&&this.closeList()}updatePositionAndList(){var e;this.updateLastPosition(),this.updateAutocompleteList(null!=(e=this.eAutocompleteInput.getValue())?e:null)}setCaret(e,t){let i=this.gos.getDocument(),s=this.gos.getActiveDomElement();t&&(!s||s===i.body)&&this.eAutocompleteInput.getFocusableElement().focus();let o=this.eAutocompleteInput.getInputElement();o.setSelectionRange(e,e),e===o.value.length&&(o.scrollLeft=o.scrollWidth)}forceOpenList(){this.onValueChanged(this.eAutocompleteInput.getValue())}updateLastPosition(){var e;this.lastPosition=null!=(e=this.eAutocompleteInput.getInputElement().selectionStart)?e:0}validate(t){var i;this.validator&&(this.validationMessage=this.validator(t),this.eAutocompleteInput.getInputElement().setCustomValidity(null!=(i=this.validationMessage)?i:""),this.valid=!this.validationMessage,this.dispatchEvent({type:e.EVENT_VALID_CHANGED,isValid:this.valid,validationMessage:this.validationMessage}))}openList(){this.isListOpen=!0,this.autocompleteList=this.createBean(new at({autocompleteEntries:this.autocompleteListParams.entries,onConfirmed:()=>this.confirmSelection(),forceLastSelection:this.forceLastSelection}));let e=this.autocompleteList.getGui(),t={ePopup:e,type:"autocomplete",eventSource:this.getGui(),position:"under",alignSide:this.gos.get("enableRtl")?"right":"left",keepWithinBounds:!0},i=this.popupService.addPopup({eChild:e,anchorToElement:this.getGui(),positionCallback:()=>this.popupService.positionPopupByComponent(t),ariaLabel:this.listAriaLabel});this.hidePopup=i.hideFunc,this.autocompleteList.afterGuiAttached()}closeList(){this.isListOpen=!1,this.hidePopup(),this.destroyBean(this.autocompleteList),this.autocompleteList=null}onCompleted(){this.isListOpen&&this.closeList(),this.dispatchEvent({type:e.EVENT_VALUE_CONFIRMED,value:this.getValue(),isValid:this.isValid()})}getValue(){return j(this.eAutocompleteInput.getValue())}setInputPlaceholder(e){return this.eAutocompleteInput.setInputPlaceholder(e),this}setInputAriaLabel(e){return this.eAutocompleteInput.setInputAriaLabel(e),this}setListAriaLabel(e){return this.listAriaLabel=e,this}setListGenerator(e){return this.listGenerator=e,this}setValidator(e){return this.validator=e,this}isValid(){return this.valid}setValue(e){let{value:t,position:i,silent:s,updateListOnlyIfOpen:o,restoreFocus:r}=e;this.eAutocompleteInput.setValue(t,!0),this.setCaret(null!=i?i:this.lastPosition,r),s||this.updateV
212alue(t),(!o||this.isListOpen)&&this.updateAutocompleteList(t)}setForceLastSelection(e){return this.forceLastSelection=e,this}setInputDisabled(e){return this.eAutocompleteInput.setDisabled(e),this}};ai.EVENT_VALUE_CHANGED="eventValueChanged",ai.EVENT_VALUE_CONFIRMED="eventValueConfirmed",ai.EVENT_OPTION_SELECTED="eventOptionSelected",ai.EVENT_VALID_CHANGED="eventValidChanged",K([eB("popupService")],ai.prototype,"popupService",2),K([ot("eAutocompleteInput")],ai.prototype,"eAutocompleteInput",2),K([eV],ai.prototype,"postConstruct",1);var as=ai,ao=class e extends s9{constructor(e,t,i,s){super(),this.dragSourceDropTarget=e,this.ghost=t,this.horizontal=i,this.template=s}init(){var t;this.setTemplate(null!=(t=this.template)?t:e.TEMPLATE);let i=this.getGui();this.addElementClasses(i),this.addElementClasses(this.eDragHandle,"drag-handle"),this.addElementClasses(this.eText,"text"),this.addElementClasses(this.eButton,"button"),this.eDragHandle.appendChild(sV("columnDrag",this.gos)),this.eButton.appendChild(sV("cancel",this.gos)),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 e=this.localeService.getLocaleTextFunc(),t=[this.getAriaDisplayName()];this.addAdditionalAriaInstructions(t,e),ie(this.getGui(),t.join(". "))}addAdditionalAriaInstructions(e,t){if(this.isRemovable()){let i=t("ariaDropZoneColumnComponentDescription","Press DELETE to remove");e.push(i)}}setupTooltip(){let e=()=>{let e=this.getTooltip();this.setTooltip({newTooltipText:e})};e(),this.addManagedListener(this.eventService,tP.EVENT_NEW_COLUMNS_LOADED,e)}getDragSourceId(){}getDefaultIconName(){return rn.ICON_NOT_ALLOWED}addDragSource(){let{dragAndDropService:e,eDragHandle:t}=this,i=this.createGetDragItem(),s=this.getDefaultIconName(),o={type:this.getDragSourceType(),sourceId:this.getDragSourceId(),eElement:t,getDefaultIconName:()=>s,getDragItem:i,dragItemName:this.getDisplayName()};e.addDragSource(o,!0),this.addDestroyFunc(()=>e.removeDragSource(o))}setupComponents(){this.setTextValue(),this.setupRemove(),this.ghost&&this.addCssClass("ag-column-drop-cell-ghost")}isRemovable(){return!0}refreshRemove(){i8(this.eButton,this.isRemovable())}setupRemove(){this.refreshRemove();let t={type:e.EVENT_COLUMN_REMOVE};this.addGuiEventListener("keydown",e=>this.onKeyDown(e)),this.addManagedListener(this.eButton,"click",e=>{this.dispatchEvent(t),e.stopPropagation()});let i=new oQ(this.eButton);this.addManagedListener(i,oQ.EVENT_TAP,()=>{this.dispatchEvent(t)}),this.addDestroyFunc(i.destroy.bind(i))}onKeyDown(t){t.key===sk.DELETE&&this.isRemovable()&&(t.preventDefault(),this.dispatchEvent({type:e.EVENT_COLUMN_REMOVE}))}getDisplayValue(){return this.getDisplayName()}setTextValue(){let e=tV(this.getDisplayValue());this.eText.innerHTML=e}addElementClasses(e,t){t=t?`-${t}`:"";let i=this.horizontal?"horizontal":"vertical";e.classList.add(`ag-column-drop-cell${t}`,`ag-column-drop-${i}-cell${t}`)}destroy(){super.destroy(),this.dragSourceDropTarget=null}};ao.EVENT_COLUMN_REMOVE="columnRemove",ao.TEMPLATE=`<span role="option">
213          <span ref="eDragHandle" class="ag-drag-handle ag-column-drop-cell-drag-handle" role="presentation"></span>
214          <span ref="eText" class="ag-column-drop-cell-text" aria-hidden="true"></span>
215          <span ref="eButton" class="ag-column-drop-cell-button" role="presentation"></span>
216        </span>`,K([eB("dragAndDropService")],ao.prototype,"dragAndDropService",2),K([ot("eText")],ao.prototype,"eText",2),K([ot("eDragHandle")],ao.prototype,"eDragHandle",2),K([ot("eButton")],ao.prototype,"eButton",2),K([eV],ao.prototype,"init",1);var ar=ao,an=class e extends s9{constructor(t){super('<div class="ag-unselectable" role="presentation"></div>'),this.horizontal=t,this.state=e.STATE_NOT_DRAGGING,this.guiDestroyFunctions=[],this.childPillComponents=[],this.resizeEnabled=!1,this.addElementClasses(this.getGui()),this.ePillDropList=document.createElement("div"),this.addElementClasses(this.ePillDropList,"list"),t4(this.ePillDropList,"listbox")}isHorizontal(){return this.horizontal}
216toggleResizable(e){this.positionableFeature.setResizable(!!e&&{bottom:!0}),this.resizeEnabled=e}isSourceEventFromTarget(e){let{dropZoneTarget:t,dragSource:i}=e;return t.contains(i.eElement)}destroy(){this.destroyGui(),super.destroy()}destroyGui(){this.guiDestroyFunctions.forEach(e=>e()),this.guiDestroyFunctions.length=0,this.childPillComponents.length=0,sd(this.getGui()),sd(this.ePillDropList)}init(e){this.params=null!=e?e:{},this.createManagedBean(new oa(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.setupDropTarget(),this.positionableFeature=new ou(this.getGui(),{minHeight:100}),this.createManagedBean(this.positionableFeature),this.refreshGui(),ie(this.ePillDropList,this.getAriaLabel())}handleKeyDown(e){let t=!this.horizontal,i=e.key===sk.DOWN,s=e.key===sk.UP;if(!t){let t=this.gos.get("enableRtl");i=!t&&e.key===sk.RIGHT||t&&e.key===sk.LEFT,s=!t&&e.key===sk.LEFT||t&&e.key===sk.RIGHT}if(!i&&!s)return;let o=this.focusService.findNextFocusableElement(this.getFocusableElement(),!1,s);o&&(e.preventDefault(),o.focus())}addElementClasses(e,t){t=t?`-${t}`:"";let i=this.horizontal?"horizontal":"vertical";e.classList.add(`ag-column-drop${t}`,`ag-column-drop-${i}${t}`)}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),isInterestedIn:this.isInterestedIn.bind(this)},this.dragAndDropService.addDropTarget(this.dropTarget)}minimumAllowedNewInsertIndex(){return 0}checkInsertIndex(e){let t=this.getNewInsertIndex(e);if(t<0)return!1;let i=Math.max(this.minimumAllowedNewInsertIndex(),t),s=i!==this.insertIndex;return s&&(this.insertIndex=i),s}getNewInsertIndex(e){let t=e.event,i=this.horizontal?t.clientX:t.clientY,s=this.childPillComponents.map(e=>e.getGui().getBoundingClientRect()),o=s.findIndex(e=>this.horizontal?e.right>i&&e.left<i:e.top<i&&e.bottom>i);if(-1===o){let e=this.gos.get("enableRtl");return s.every(e=>i>(this.horizontal?e.right:e.bottom))?e&&this.horizontal?0:this.childPillComponents.length:s.every(e=>i<(this.horizontal?e.left:e.top))?e&&this.horizontal?this.childPillComponents.length:0:this.insertIndex}return this.insertIndex<=o?o+1:o}checkDragStartedBySelf(t){this.state===e.STATE_NOT_DRAGGING&&(this.state=e.STATE_REARRANGE_ITEMS,this.potentialDndItems=this.getItems(t.dragSource.getDragItem()),this.refreshGui(),this.checkInsertIndex(t),this.refreshGui())}onDragging(e){this.checkDragStartedBySelf(e),this.checkInsertIndex(e)&&this.refreshGui()}handleDragEnterEnd(e){}onDragEnter(t){let i=this.getItems(t.dragSource.getDragItem());this.state=e.STATE_NEW_ITEMS_IN;let s=i.filter(e=>this.isItemDroppable(e,t)),o=s.every(e=>-1!==this.childPillComponents.map(e=>e.getItem()).indexOf(e));if(0!==s.length){if(this.potentialDndItems=s,o){this.state=e.STATE_NOT_DRAGGING;return}this.handleDragEnterEnd(t),this.checkInsertIndex(t),this.refreshGui()}}isPotentialDndItems(){return e3(this.potentialDndItems)}handleDragLeaveEnd(e){}onDragLeave(t){if(this.state===e.STATE_REARRANGE_ITEMS){let e=this.getItems(t.dragSource.getDragItem());this.removeItems(e)}this.isPotentialDndItems()&&(this.handleDragLeaveEnd(t),this.potentialDndItems=[],this.refreshGui()),this.state=e.STATE_NOT_DRAGGING}refreshOnDragStop(){return!0}onDragStop(){if(this.isPotentialDndItems()){let t=!1;this.state===e.STATE_NEW_ITEMS_IN?(this.addItems(this.potentialDndItems),t=!0):t=this.rearrangeItems(this.potentialDndItems),this.potentialDndItems=[],(this.refreshOnDragStop()||!t)&&this.refreshGui()}this.state=e.STATE_NOT_DRAGGING}removeItems(e){let t=this.getExistingItems().filter(t=>!tn(e,t));this.updateItems(t)}addItems(e){if(!e)return;let t=this.getExistingItems().slice(),i=e.filter(e=>0>t.indexOf(e));to(t,i,this.insertIndex),this.updateItems(t)}addItem(e){this.insertIndex=this.getExistingItems().length,this.addItems([e]),this.refreshGui()}rearrangeItems(e){let t=this.getNonGhostItems().slice();return to(t,e,this.insertIndex),!e4(t,this.getExistingItems())&&(this.updateItems(t),!0)}refreshGui(){let e=this.ePillDropList.scrollTop,t=this.resizeEnabled,i=this.getFocusedItem(),s=this.focusService.findNextFocusableElement();s||(s=this.focusService.findNextFocusableElement(void 0,!1,!0)),this.toggleResizable(!1),this.destroyGui(),this.addIconAndTitleToGui(),this.addEmptyMessageToGui(),this.addItemsToGui(),this.isHorizontal()||(this.ePillDropList.scrollTop=e),t&&this.toggleResizable(t),this.focusService.isKeyboardMode()&&this.restoreFocus(i,s)}getFocusedItem(){let e=this.getGui(),t=this.gos.getActiveDomElement();return e.contains(t)?Array.from(e.querySelectorAll(".ag-column-drop-cell")).indexOf(t):-1}restoreFocus(e,t){let i=Array.from(this.getGui().querySelectorAll(".ag-column-drop-cell"));if(-1===e)return;
2160===i.length&&t.focus();let s=Math.min(i.length-1,e),o=i[s];o&&o.focus()}focusList(e){let t=e?this.childPillComponents.length-1:0;this.restoreFocus(t,this.getFocusableElement())}getNonGhostItems(){let e=this.getExistingItems();return this.isPotentialDndItems()?e.filter(e=>!tn(this.potentialDndItems,e)):e}addItemsToGui(){let e=this.getNonGhostItems().map(e=>this.createItemComponent(e,!1));if(this.isPotentialDndItems()){let t=this.potentialDndItems.map(e=>this.createItemComponent(e,!0));this.insertIndex>=e.length?e.push(...t):e.splice(this.insertIndex,0,...t)}this.appendChild(this.ePillDropList),e.forEach((e,t)=>{t>0&&this.addArrow(this.ePillDropList),this.ePillDropList.appendChild(e.getGui())}),this.addAriaLabelsToComponents()}addAriaLabelsToComponents(){this.childPillComponents.forEach((e,t)=>{let i=e.getGui();ig(i,t+1),ip(i,this.childPillComponents.length)})}createItemComponent(e,t){let i=this.createPillComponent(e,this.dropTarget,t,this.horizontal);return i.addEventListener(ar.EVENT_COLUMN_REMOVE,this.removeItems.bind(this,[e])),this.context.createBean(i),this.guiDestroyFunctions.push(()=>this.destroyBean(i)),t||this.childPillComponents.push(i),i}addIconAndTitleToGui(){let{title:e,icon:t}=this.params;if(!e||!t)return;let i=document.createElement("div");if(ih(i,!0),this.addElementClasses(i,"title-bar"),this.addElementClasses(t,"icon"),this.addOrRemoveCssClass("ag-column-drop-empty",this.isExistingItemsEmpty()),i.appendChild(t),!this.horizontal){let t=document.createElement("span");this.addElementClasses(t,"title"),t.innerHTML=e,i.appendChild(t)}this.appendChild(i)}isExistingItemsEmpty(){return 0===this.getExistingItems().length}addEmptyMessageToGui(){let{emptyMessage:e}=this.params;if(!e||!this.isExistingItemsEmpty()||this.isPotentialDndItems())return;let t=document.createElement("span");t.innerHTML=e,this.addElementClasses(t,"empty-message"),this.ePillDropList.appendChild(t)}addArrow(e){if(this.horizontal){let t=sV(this.gos.get("enableRtl")?"smallLeft":"smallRight",this.gos);this.addElementClasses(t,"cell-separator"),e.appendChild(t)}}};an.STATE_NOT_DRAGGING="notDragging",an.STATE_NEW_ITEMS_IN="newItemsIn",an.STATE_REARRANGE_ITEMS="rearrangeItems",K([eB("focusService")],an.prototype,"focusService",2),K([eB("dragAndDropService")],an.prototype,"dragAndDropService",2);var al=an,aa=["touchstart","touchend","touchmove","touchcancel"],ah=class{constructor(e="javascript"){this.frameworkName=e,this.renderingEngine="vanilla",this.wrapIncoming=e=>e(),this.wrapOutgoing=e=>e()}setInterval(e,t){return new s1(i=>{i(window.setInterval(e,t))})}addEventListener(e,t,i,s){let o=tn(aa,t);e.addEventListener(t,i,{capture:!!s,passive:o})}get shouldWrapOutgoing(){return!1}frameworkComponent(e){return null}isFrameworkComponent(e){return!1}getDocLink(e){let t="solid"===this.frameworkName?"react":this.frameworkName;return`https://www.ag-grid.com/${t}-data-grid${e?`/${e}`:""}`}},ad=class extends tR{getNextCellToFocus(e,t,i=!1){return i?this.getNextCellToFocusWithCtrlPressed(e,t):this.getNextCellToFocusWithoutCtrlPressed(e,t)}getNextCellToFocusWithCtrlPressed(e,t){let i,s;let o=e===sk.UP,r=e===sk.DOWN,n=e===sk.LEFT;if(o||r)s=o?this.paginationProxy.getPageFirstRow():this.paginationProxy.getPageLastRow(),i=t.column;else{let e=this.columnModel.getAllDisplayedColumns(),o=this.gos.get("enableRtl");s=t.rowIndex,i=n!==o?e[0]:e5(e)}return{rowIndex:s,rowPinned:null,column:i}}getNextCellToFocusWithoutCtrlPressed(e,t){let i=t,s=!1;for(;!s;){switch(e){case sk.UP:i=this.getCellAbove(i);break;case sk.DOWN:i=this.getCellBelow(i);break;case sk.RIGHT:i=this.gos.get("enableRtl")?this.getCellToLeft(i):this.getCellToRight(i);break;case sk.LEFT:i=this.gos.get("enableRtl")?this.getCellToRight(i):this.getCellToLeft(i);break;default:i=null,console.warn("AG Grid: unknown key for navigation "+e)}s=!i||this.isCellGoodToFocusOn(i)}return i}isCellGoodToFocusOn(e){let t;let i=e.column;switch(e.rowPinned){case"top":t=this.pinnedRowModel.getPinnedTopRow(e.rowIndex);break;case"bottom":t=this.pinnedRowModel.getPinnedBottomRow(e.rowIndex);break;default:t=this.rowModel.getRow(e.rowIndex)}return!!t&&!i.isSuppressNavigable(t)}getCellToLeft(e){if(!e)return null;let t=this.columnModel.getDisplayedColBefore(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellToRight(e){if(!e)return null;let t=this.columnModel.getDisplayedColAfter(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getRowBelow(e){let t=e.rowIndex,i=e.rowPinned;if(this.isLastRowInContainer(e))switch(i){case"bottom":return null;case"top":if(this.rowModel.isRowsToRender())return{rowIndex:this.paginationProxy.getPageFirstRow(),rowPinned:null};if(this.pinnedRowModel.isRowsToRender("bottom"))return{rowIndex:0,rowPinned:"bottom"};return null;default:if(this.pinnedRowModel.isRowsToRender("bottom"))return{rowIndex:0,rowPinned:"bottom"};return null}let s=this.rowModel.getRow(e.rowIndex);return this.getNextStickyPosition(s)||{rowIndex:t+1,rowPinned:i}}getNextStickyPosition(e,t){if(!this.gos.isGroupRowsSticky()||!e||!e.sticky)return;let i=this.rowRenderer.getStickyTopRowCtrls().some(t=>t.getRowNode().rowIndex===e.rowIndex),s=[],o=(s=i?[...this.rowRenderer.getStickyTopRowCtrls()].sort((e,t)=>
216e.getRowNode().rowIndex-t.getRowNode().rowIndex):[...this.rowRenderer.getStickyBottomRowCtrls()].sort((e,t)=>t.getRowNode().rowIndex-e.getRowNode().rowIndex)).findIndex(t=>t.getRowNode().rowIndex===e.rowIndex),r=s[o+(t?-1:1)];if(r)return{rowIndex:r.getRowNode().rowIndex,rowPinned:null}}getCellBelow(e){if(!e)return null;let t=this.getRowBelow(e);return t?{rowIndex:t.rowIndex,column:e.column,rowPinned:t.rowPinned}:null}isLastRowInContainer(e){let t=e.rowPinned,i=e.rowIndex;return"top"===t?this.pinnedRowModel.getPinnedTopRowData().length-1<=i:"bottom"===t?this.pinnedRowModel.getPinnedBottomRowData().length-1<=i:this.paginationProxy.getPageLastRow()<=i}getRowAbove(e){let t=e.rowIndex,i=e.rowPinned;if(i?0===t:t===this.paginationProxy.getPageFirstRow())return"top"===i?null:i&&this.rowModel.isRowsToRender()?this.getLastBodyCell():this.pinnedRowModel.isRowsToRender("top")?this.getLastFloatingTopRow():null;let s=this.rowModel.getRow(e.rowIndex);return this.getNextStickyPosition(s,!0)||{rowIndex:t-1,rowPinned:i}}getCellAbove(e){if(!e)return null;let t=this.getRowAbove({rowIndex:e.rowIndex,rowPinned:e.rowPinned});return t?{rowIndex:t.rowIndex,column:e.column,rowPinned:t.rowPinned}:null}getLastBodyCell(){return{rowIndex:this.paginationProxy.getPageLastRow(),rowPinned:null}}getLastFloatingTopRow(){return{rowIndex:this.pinnedRowModel.getPinnedTopRowData().length-1,rowPinned:"top"}}getNextTabbedCell(e,t){return t?this.getNextTabbedCellBackwards(e):this.getNextTabbedCellForwards(e)}getNextTabbedCellForwards(e){let t=this.columnModel.getAllDisplayedColumns(),i=e.rowIndex,s=e.rowPinned,o=this.columnModel.getDisplayedColAfter(e.column);if(!o){o=t[0];let r=this.getRowBelow(e);if(Q(r)||!r.rowPinned&&!this.paginationProxy.isRowInPage(r))return null;i=r?r.rowIndex:null,s=r?r.rowPinned:null}return{rowIndex:i,column:o,rowPinned:s}}getNextTabbedCellBackwards(e){let t=this.columnModel.getAllDisplayedColumns(),i=e.rowIndex,s=e.rowPinned,o=this.columnModel.getDisplayedColBefore(e.column);if(!o){o=e5(t);let r=this.getRowAbove({rowIndex:e.rowIndex,rowPinned:e.rowPinned});if(Q(r)||!r.rowPinned&&!this.paginationProxy.isRowInPage(r))return null;i=r?r.rowIndex:null,s=r?r.rowPinned:null}return{rowIndex:i,column:o,rowPinned:s}}};K([eB("columnModel")],ad.prototype,"columnModel",2),K([eB("rowModel")],ad.prototype,"rowModel",2),K([eB("rowRenderer")],ad.prototype,"rowRenderer",2),K([eB("pinnedRowModel")],ad.prototype,"pinnedRowModel",2),K([eB("paginationProxy")],ad.prototype,"paginationProxy",2),ad=K([ek("cellNavigationService")],ad);var au=class extends tR{constructor(){super(...arguments),this.consuming=!1}setBeans(e){this.logger=e.create("AlignedGridsService")}getAlignedGridApis(){var e;let t=null!=(e=this.gos.get("alignedGrids"))?e:[],i="function"==typeof t;"function"==typeof t&&(t=t());let s=()=>`See ${this.getFrameworkOverrides().getDocLink("aligned-grids")}`;return t.map(e=>{var t;
216if(!e){eE("alignedGrids contains an undefined option."),i||eE(`You may want to configure via a callback to avoid setup race conditions:
217                     "alignedGrids: () => [linkedGrid]"`),eE(s());return}return e instanceof r4?e:"current"in e?null==(t=e.current)?void 0:t.api:(e.api||eE(`alignedGrids - No api found on the linked grid. If you are passing gridOptions to alignedGrids since v31 this is no longer valid. ${s()}`),e.api)}).filter(e=>!!e&&!e.isDestroyed())}init(){this.addManagedListener(this.eventService,tP.EVENT_COLUMN_MOVED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,tP.EVENT_COLUMN_VISIBLE,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,tP.EVENT_COLUMN_PINNED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,tP.EVENT_COLUMN_GROUP_OPENED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,tP.EVENT_COLUMN_RESIZED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,tP.EVENT_BODY_SCROLL,this.fireScrollEvent.bind(this))}fireEvent(e){this.consuming||this.getAlignedGridApis().forEach(t=>{t.isDestroyed()||e(t.__getAlignedGridService())})}onEvent(e){this.consuming=!0,e(),this.consuming=!1}fireColumnEvent(e){this.fireEvent(t=>{t.onColumnEvent(e)})}fireScrollEvent(e){"horizontal"===e.direction&&this.fireEvent(t=>{t.onScrollEvent(e)})}onScrollEvent(e){this.onEvent(()=>{this.ctrlsService.getGridBodyCtrl().getScrollFeature().setHorizontalScrollPosition(e.left,!0)})}getMasterColumns(e){let t=[];return e.columns?e.columns.forEach(e=>{t.push(e)}):e.column&&t.push(e.column),t}getColumnIds(e){let t=[];return e.columns?e.columns.forEach(e=>{t.push(e.getColId())}):e.column&&t.push(e.column.getColId()),t}onColumnEvent(e){this.onEvent(()=>{switch(e.type){case tP.EVENT_COLUMN_MOVED:case tP.EVENT_COLUMN_VISIBLE:case tP.EVENT_COLUMN_PINNED:case tP.EVENT_COLUMN_RESIZED:this.processColumnEvent(e);break;case tP.EVENT_COLUMN_GROUP_OPENED:this.processGroupOpenedEvent(e);break;case tP.EVENT_COLUMN_PIVOT_CHANGED:console.warn("AG Grid: pivoting is not supported with aligned grids. You can only use one of these features at a time in a grid.")}})}processGroupOpenedEvent(e){e.columnGroups.forEach(t=>{let i=null;if(t){let e=t.getGroupId();i=this.columnModel.getProvidedColumnGroup(e)}(!t||i)&&(this.logger.log("onColumnEvent-> processing "+e+" expanded = "+t.isExpanded()),this.columnModel.setColumnGroupOpened(i,t.isExpanded(),"alignedGridChanged"))})}processColumnEvent(e){var t;let i=e.column,s=null;if(i&&(s=this.columnModel.getPrimaryColumn(i.getColId())),i&&!s)return;let o=this.getMasterColumns(e);switch(e.type){case tP.EVENT_COLUMN_MOVED:{let t=e.api.getColumnState().map(e=>({colId:e.colId}));this.columnModel.applyColumnState({state:t,applyOrder:!0},"alignedGridChanged"),this.logger.log(`onColumnEvent-> processing ${e.type} toIndex = ${e.toIndex}`)}break;case tP.EVENT_COLUMN_VISIBLE:{let t=e.api.getColumnState().map(e=>({colId:e.colId,hide:e.hide}));this.columnModel.applyColumnState({state:t},"alignedGridChanged"),this.logger.log(`onColumnEvent-> processing ${e.type} visible = ${e.visible}`)}break;case tP.EVENT_COLUMN_PINNED:{let t=e.api.getColumnState().map(e=>({colId:e.colId,pinned:e.pinned}));this.columnModel.applyColumnState({state:t},"alignedGridChanged"),this.logger.log(`onColumnEvent-> processing ${e.type} pinned = ${e.pinned}`)}break;case tP.EVENT_COLUMN_RESIZED:let r={};o.forEach(t=>{this.logger.log(`onColumnEvent-> processing ${e.type} actualWidth = ${t.getActualWidth()}`),r[t.getId()]={key:t.getColId(),newWidth:t.getActualWidth()}}),null==(t=e.flexColumns)||t.forEach(e=>{r[e.getId()]&&delete r[e.getId()]}),this.columnModel.setColumnWidths(Object.values(r),!1,e.finished,"alignedGridChanged")}let n=this.ctrlsService.getGridBodyCtrl().isVerticalScrollShowing();this.getAlignedGridApis().forEach(e=>{e.setGridOption("alwaysShowVerticalScroll",n)})}};K([eB("columnModel")],au.prototype,"columnModel",2),K([eB("ctrlsService")],au.prototype,"ctrlsService",2),K([$(0,ez("loggerFactory"))],au.prototype,"setBeans",1),K([eV],au.prototype,"init",1),au=K([ek("alignedGridsService")],au);var ac=class extends tR{constructor(){super(...arguments),this.selectedNodes=new Map,this.lastRowNode=null}init(){this.rowSelection=this.gos.get("rowSelection"),this.groupSelectsChildren=this.gos.get("groupSelectsChildren"),this.addManagedPropertyListeners(["groupSelectsChildren","rowSelection"],()=>{this.groupSelectsChildren=this.gos.get("groupSelectsChildren"),this.rowSelection=this.gos.get("rowSelection"),this.deselectAllRowNodes({source:"api"})}),this.addManagedListener(this.eventService,tP.EVENT_ROW_SELECTED,this.onRowSelected.bind(this))}destroy(){super.destroy(),this.resetNodes(),this.lastRowNode=null}isMultiselect(){return"multiple"===this.rowSelection}setNodesSelected(e){var t;let{newValue:i,clearSelection:s,suppressFinishActions:o,rangeSelect:r,no
217des:n,event:l,source:a="api"}=e;if(0===n.length)return 0;if(n.length>1&&!this.isMultiselect())return console.warn("AG Grid: cannot multi select while rowSelection='single'"),0;let h=this.groupSelectsChildren&&!0===e.groupSelectsFiltered,d=n.map(e=>e.footer?e.sibling:e);if(r){if(n.length>1)return console.warn("AG Grid: cannot range select while selecting multiple rows"),0;let e=null;if("checkboxSelected"===a&&!1===i&&this.lastRowNode&&(this.lastRowNode.id?e=this.lastRowNode:this.lastRowNode=null),null==e&&(e=this.getLastSelectedNode()),e){let t=d[0];if(t!==e&&this.isMultiselect())return this.selectRange(t,e,i,a)}}this.lastRowNode=i?null:d[0];let u=0;for(let e=0;e<d.length;e++){let s=d[e];!(h&&s.group)&&s.selectThisNode(i,l,a)&&u++,this.groupSelectsChildren&&(null==(t=s.childrenAfterGroup)?void 0:t.length)&&(u+=this.selectChildren(s,i,h,a))}if(!o&&(i&&(s||!this.isMultiselect())&&(u+=this.clearOtherNodes(d[0],a)),u>0)){this.updateGroupsFromChildrenSelections(a);let e={type:tP.EVENT_SELECTION_CHANGED,source:a};this.eventService.dispatchEvent(e)}return u}selectRange(e,t,i=!0,s){let o=this.rowModel.getNodesInRangeForSelection(e,t),r=0;o.forEach(e=>{(!e.group||!this.groupSelectsChildren)&&e.selectThisNode(i,void 0,s)&&r++}),this.updateGroupsFromChildrenSelections(s);let n={type:tP.EVENT_SELECTION_CHANGED,source:s};return this.eventService.dispatchEvent(n),r}selectChildren(e,t,i,s){let o=i?e.childrenAfterAggFilter:e.childrenAfterGroup;return Q(o)?0:this.setNodesSelected({newValue:t,clearSelection:!1,suppressFinishActions:!0,groupSelectsFiltered:i,source:s,nodes:o})}getLastSelectedNode(){let e=Array.from(this.selectedNodes.keys());return 0==e.length?null:this.selectedNodes.get(e5(e))||null}getSelectedNodes(){let e=[];return this.selectedNodes.forEach(t=>{t&&e.push(t)}),e}getSelectedRows(){let e=[];return this.selectedNodes.forEach(t=>{t&&t.data&&e.push(t.data)}),e}getSelectionCount(){return this.selectedNodes.size}filterFromSelection(e){let t=new Map;this.selectedNodes.forEach((i,s)=>{i&&e(i)&&t.set(s,i)}),this.selectedNodes=t}updateGroupsFromChildrenSelections(e,t){if(!this.groupSelectsChildren||"clientSide"!==this.rowModel.getType())return!1;let i=this.rowModel.getRootNode();t||(t=new lI(!0,i)).setInactive();let s=!1;return t.forEachChangedNodeDepthFirst(t=>{if(t!==i){let i=t.calculateSelectedFromChildren();s=t.selectThisNode(null!==i&&i,void 0,e)||s}}),s}clearOtherNodes(e,t){let i=new Map,s=0;return this.selectedNodes.forEach(o=>{if(o&&o.id!==e.id){let e=this.selectedNodes.get(o.id);s+=e.setSelectedParams({newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:t}),this.groupSelectsChildren&&o.parent&&i.set(o.parent.id,o.parent)}}
217),i.forEach(e=>{let i=e.calculateSelectedFromChildren();e.selectThisNode(null!==i&&i,void 0,t)}),s}onRowSelected(e){let t=e.node;this.groupSelectsChildren&&t.group||(t.isSelected()?this.selectedNodes.set(t.id,t):this.selectedNodes.delete(t.id))}syncInRowNode(e,t){this.syncInOldRowNode(e,t),this.syncInNewRowNode(e)}syncInOldRowNode(e,t){if(q(t)&&e.id!==t.id&&t){let i=t.id;this.selectedNodes.get(i)==e&&this.selectedNodes.set(t.id,t)}}syncInNewRowNode(e){this.selectedNodes.has(e.id)?(e.setSelectedInitialValue(!0),this.selectedNodes.set(e.id,e)):e.setSelectedInitialValue(!1)}reset(e){let t=this.getSelectionCount();if(this.resetNodes(),t){let t={type:tP.EVENT_SELECTION_CHANGED,source:e};this.eventService.dispatchEvent(t)}}resetNodes(){var e;null==(e=this.selectedNodes)||e.clear()}getBestCostNodeSelection(){if("clientSide"!==this.rowModel.getType())return;let e=this.rowModel.getTopLevelNodes();if(null===e)return;let t=[];return!function e(i){for(let s=0,o=i.length;s<o;s++){let o=i[s];o.isSelected()?t.push(o):o.group&&o.children&&e(o.children)}}(e),t}isEmpty(){let e=0;return this.selectedNodes.forEach(t=>{t&&e++}),0===e}deselectAllRowNodes(e){let t=e=>e.selectThisNode(!1,void 0,s),i="clientSide"===this.rowModel.getType(),{source:s,justFiltered:o,justCurrentPage:r}=e;if(r||o){if(!i){console.error("AG Grid: selecting just filtered only works when gridOptions.rowModelType='clientSide'");return}this.getNodesToSelect(o,r).forEach(t)}else this.selectedNodes.forEach(e=>{e&&t(e)}),this.reset(s);i&&this.groupSelectsChildren&&this.updateGroupsFromChildrenSelections(s);let n={type:tP.EVENT_SELECTION_CHANGED,source:s};this.eventService.dispatchEvent(n)}getSelectedCounts(e,t){let i=0,s=0;return this.getNodesToSelect(e,t).forEach(e=>{(!this.groupSelectsChildren||!e.group)&&(e.isSelected()?i++:e.selectable&&s++)}),{selectedCount:i,notSelectedCount:s}}getSelectAllState(e,t){let{selectedCount:i,notSelectedCount:s}=this.getSelectedCounts(e,t);return(0!==i||0!==s)&&(i>0&&s>0?null:i>0)}hasNodesToSelect(e=!1,t=!1){return this.getNodesToSelect(e,t).filter(e=>e.selectable).length>0}getNodesToSelect(e=!1,t=!1){if("clientSide"!==this.rowModel.getType())throw Error(`selectAll only available when rowModelType='clientSide', ie not ${this.rowModel.getType()}`);let i=[];if(t)return this.paginationProxy.forEachNodeOnPage(e=>{if(!e.group){i.push(e);return}if(!e.expanded){let t=e=>{var s;i.push(e),(null==(s=e.childrenAfterFilter)?void 0:s.length)&&e.childrenAfterFilter.forEach(t)};t(e);return}this.groupSelectsChildren||i.push(e)}),i;let s=this.rowModel;return e?s.forEachNodeAfterFilter(e=>{i.push(e)}):s.forEachNode(e=>{i.push(e)}),i}selectAllRowNodes(e){if("clientSide"!==this.rowModel.getType())throw Error(`selectAll only available when rowModelType='clientSide', ie not ${this.rowModel.getType()}`);let{source:t,justFiltered:i,justCurrentPage:s}=e;this.getNodesToSelect(i,s).forEach(e=>e.selectThisNode(!0,void 0,t)),"clientSide"===this.rowModel.getType()&&this.groupSelectsChildren&&this.updateGroupsFromChildrenSelections(t);let o={type:tP.EVENT_SELECTION_CHANGED,source:t};this.eventService.dispatchEvent(o)}getSelectionState(){let e=[];return this.selectedNodes.forEach(t=>{(null==t?void 0:t.id)&&e.push(t.id)}),e.length?e:null}setSelectionState(e,t){if(!Array.isArray(e))return;let i=new Set(e),s=[];this.rowModel.forEachNode(e=>{i.has(e.id)&&s.push(e)}),this.setNodesSelected({newValue:!0,nodes:s,source:t})}};K([eB("rowModel")],ac.prototype,"rowModel",2),K([eB("paginationProxy")],ac.prototype,"paginationProxy",2),K([eV],ac.prototype,"init",1),ac=K([ek("selectionService")],ac);var ap=class{constructor(e){this.viaApi=(e,...t)=>(ew(`Since v31, 'columnApi.${e}' is deprecated and moved to 'api.${e}'.`),this.api[e](...t)),this.api=e}sizeColumnsToFit(e){this.viaApi("sizeColumnsToFit",e)}setColumnGroupOpened(e,t){this.viaApi("setColumnGroupOpened",e,t)}getColumnGroup(e,t){return this.viaApi("getColumnGroup",e,t)}getProvidedColumnGroup(e){return this.viaApi("getProvidedColumnGroup",e)}getDisplayNameForColumn(e,t){return this.viaApi("getDisplayNameForColumn",e,t)}getDisplayNameForColumnGroup(e,t){return this.viaApi("getDisplayNameForColumnGroup",e,t)}getColumn(e){return this.viaApi("getColumn",e)}getColumns(){return this.viaApi("getColumns")}applyColumnState(e){return this.viaApi("applyColumnState",e)}getColumnState(){return this.viaApi("getColumnState")}resetColumnState(){this.viaApi("resetColumnState")}getColumnGroupState(){return this.viaApi("getColumnGroupState")}setColumnGroupState(e){this.viaApi("setColumnGroupState",e)}resetColumnGroupState(){this.viaApi("resetColumnGroupState")}isPinning(){return this.viaApi("isPinning")}isPinningLeft(){return this.viaApi("isPinningLeft")}isPinningRight(){return this.viaApi("isPinningRight")}getDisplayedColAfter(e){return this.viaApi("getDisplayedColAfter",e)}getDisplayedColBefore(e){return this.viaApi("getDisplayedColBefore",e)}setColumnVisible(e,t){this.viaApi("setColumnVisible",e,t)}setColumnsVisible(e,t){this.viaApi("setColumnsVisible",e,t)}setColumnPinned(e,t){this.viaApi("setColumnPinned",e,t)}setColumnsPinned(e,t){this.viaApi("setColumnsPinned",e,t)}getAllGridColumns(){return this.viaApi("getAllGridColumns")}getDisplayedLeftColumns(){return this.viaApi("getDisplayedLeftColumns")}getDisplayedCenterColumns(){return this.viaApi("getDisplayedCenterColumns")}getDisplayedRightColumns(){return this.viaApi("getDisplayedRightColumns")}getAllDisplayedColumns(){return this.viaApi("getAllDisplayedColumns")}getAllDisplayedVirtualColumns(){return this.viaApi("getAllDisplayedVirtualColumns")}moveColumn(e,t){this.viaApi("moveColumn",e,t)}moveColumnByIndex(e,t){this.viaApi("moveColumnByIndex",e,t)}moveColumns(e,t){this.viaApi("moveColumns",e,t)}moveRowGroupColumn(e,t){this.viaApi("moveRowGroupColumn",e,t)}
217setColumnAggFunc(e,t){this.viaApi("setColumnAggFunc",e,t)}setColumnWidth(e,t,i=!0,s){this.viaApi("setColumnWidth",e,t,i,s)}setColumnWidths(e,t=!0,i){this.viaApi("setColumnWidths",e,t,i)}setPivotMode(e){this.viaApi("setPivotMode",e)}isPivotMode(){return this.viaApi("isPivotMode")}getPivotResultColumn(e,t){return this.viaApi("getPivotResultColumn",e,t)}setValueColumns(e){this.viaApi("setValueColumns",e)}getValueColumns(){return this.viaApi("getValueColumns")}removeValueColumn(e){this.viaApi("removeValueColumn",e)}removeValueColumns(e){this.viaApi("removeValueColumns",e)}addValueColumn(e){this.viaApi("addValueColumn",e)}addValueColumns(e){this.viaApi("addValueColumns",e)}setRowGroupColumns(e){this.viaApi("setRowGroupColumns",e)}removeRowGroupColumn(e){this.viaApi("removeRowGroupColumn",e)}removeRowGroupColumns(e){this.viaApi("removeRowGroupColumns",e)}addRowGroupColumn(e){this.viaApi("addRowGroupColumn",e)}addRowGroupColumns(e){this.viaApi("addRowGroupColumns",e)}getRowGroupColumns(){return this.viaApi("getRowGroupColumns")}setPivotColumns(e){this.viaApi("setPivotColumns",e)}removePivotColumn(e){this.viaApi("removePivotColumn",e)}removePivotColumns(e){this.viaApi("removePivotColumns",e)}addPivotColumn(e){this.viaApi("addPivotColumn",e)}addPivotColumns(e){this.viaApi("addPivotColumns",e)}getPivotColumns(){return this.viaApi("getPivotColumns")}getLeftDisplayedColumnGroups(){return this.viaApi("getLeftDisplayedColumnGroups")}getCenterDisplayedColumnGroups(){return this.viaApi("getCenterDisplayedColumnGroups")}getRightDisplayedColumnGroups(){return this.viaApi("getRightDisplayedColumnGroups")}getAllDisplayedColumnGroups(){return this.viaApi("getAllDisplayedColumnGroups")}autoSizeColumn(e,t){return this.viaApi("autoSizeColumn",e,t)}autoSizeColumns(e,t){this.viaApi("autoSizeColumns",e,t)}autoSizeAllColumns(e){this.viaApi("autoSizeAllColumns",e)}setPivotResultColumns(e){this.viaApi("setPivotResultColumns",e)}getPivotResultColumns(){return this.viaApi("getPivotResultColumns")}};K([eB("gridApi")],ap.prototype,"api",2),ap=K([ek("columnApi")],ap);var ag=class extends tR{constructor(){super(...arguments),this.initialised=!1,this.isSsrm=!1}init(){this.isSsrm=this.gos.isRowModelType("serverSide"),this.cellExpressions=this.gos.get("enableCellExpressions"),this.isTreeData=this.gos.get("treeData"),this.initialised=!0;let e=e=>this.callColumnCellValueChangedHandler(e),t=this.gos.useAsyncEvents();this.eventService.addEventListener(tP.EVENT_CELL_VALUE_CHANGED,e,t),this.addDestroyFunc(()=>this.eventService.removeEventListener(tP.EVENT_CELL_VALUE_CHANGED,e,t)),this.addManagedPropertyListener("treeData",e=>this.isTreeData=e.currentValue)}getValue(e,t,i=!1,s=!1){let o;if(this.initialised||this.init(),!t)return;let r=e.getColDef(),n=r.field,l=e.getColId(),a=t.data,h=t.groupData&&void 0!==t.groupData[l],d=!s&&t.aggData&&void 0!==t.aggData[l],u=this.isSsrm&&s&&!!e.getColDef().aggFunc,c=this.isSsrm&&t.footer&&t.field&&(!0===e.getColDef().showRowGroup||e.getColDef().showRowGroup===t.field);if(i&&r.filterValueGetter?o=this.executeFilterValueGetter(r.filterValueGetter,a,e,t):this.isTreeData&&d?o=t.aggData[l]:this.isTreeData&&r.valueGetter?o=this.executeValueGetter(r.valueGetter,a,e,t):this.isTreeData&&n&&a?o=ep(a,n,e.isFieldContainsDots()):h?o=t.groupData[l]:d?o=t.aggData[l]:r.valueGetter?o=this.executeValueGetter(r.valueGetter,a,e,t):c?o=ep(a,t.field,e.isFieldContainsDots()):n&&a&&!u&&(o=ep(a,n,e.isFieldContainsDots())),this.cellExpressions&&"string"==typeof o&&0===o.indexOf("=")){let i=o.substring(1);o=this.executeValueGetter(i,a,e,t)}if(null==o){let i=this.getOpenedGroup(t,e);if(null!=i)return i}return o}parseValue(e,t,i,s){let o=e.getColDef(),r=this.gos.addGridCommonParams({node:t,data:null==t?void 0:t.data,oldValue:s,newValue:i,colDef:o,column:e}),n=o.valueParser;return q(n)?"function"==typeof n?n(r):this.expressionService.evaluate(n,r):i}formatValue(e,t,i,s,o=!0){let r,n=null,l=e.getColDef();if(s?r=s:o&&(r=l.valueFormatter),r){let s=this.gos.addGridCommonParams({value:i,node:t,data:t?t.data:null,colDef:l,column:e});n="function"==typeof r?r(s):this.expressionService.evaluate(r,s)}else if(l.refData)return l.refData[i]||"";return null==n&&Array.isArray(i)&&(n=i.join(", ")),n}getOpenedGroup(e,t){if(!this.gos.get("showOpenedGroup")||!t.getColDef().showRowGroup)return;let i=t.getColDef().showRowGroup,s=e.parent;for(;null!=s;){if(s.rowGroupColumn&&(!0===i||i===s.rowGroupColumn.getColId()))return s.key;s=s.parent}}setValue(e,t,i,s){let o;let r=this.columnModel.getPrimaryColumn(t);if(!e||!r)return!1;Q(e.data)&&(e.data={});let{field:n,valueSetter:l}=r.getColDef();if(Q(n)&&Q(l))return console.warn("AG Grid: you need either field or valueSetter set on colDef for editing to work"),!1;if(!this.dataTypeService.checkType(r,i))return console.warn("AG Grid: Data type of the new value does not match the cell data type of the column"),!1;let a=this.gos.addGridCommonParams({node:e,data:e.data,oldValue:this.getValue(r,e),newValue:i,colDef:r.getColDef(),column:r});if(a.newValue=i,void 0===(o=q(l)?"function"==typeof l?l(a):this.expressionService.evaluate(l,a):this.setValueUsingField(e.data,n,i,r.isFieldContainsDots()))&&(o=!0),!o)return!1;e.resetQuickFilterAggregateText(),this.valueCache.onDataChanged(),a.newValue=this.getValue(r,e);let h={type:tP.EVENT_CELL_VALUE_CHANGED,event:null,rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:a.column,api:a.api,columnApi:a.columnApi,colDef:a.colDef,context:a.context,data:e.data,node:e,oldValue:a.oldValue,newValue:a.newValue,value:a.newValue,
217source:s};return this.eventService.dispatchEvent(h),!0}callColumnCellValueChangedHandler(e){let t=e.colDef.onCellValueChanged;"function"==typeof t&&this.getFrameworkOverrides().wrapOutgoing(()=>{t({node:e.node,data:e.data,oldValue:e.oldValue,newValue:e.newValue,colDef:e.colDef,column:e.column,api:e.api,columnApi:e.columnApi,context:e.context})})}setValueUsingField(e,t,i,s){if(!t)return!1;let o=!1;if(s){let s=t.split("."),r=e;for(;s.length>0&&r;){let e=s.shift();0===s.length?(o=r[e]===i)||(r[e]=i):r=r[e]}}else(o=e[t]===i)||(e[t]=i);return!o}executeFilterValueGetter(e,t,i,s){let o=this.gos.addGridCommonParams({data:t,node:s,column:i,colDef:i.getColDef(),getValue:this.getValueCallback.bind(this,s)});return"function"==typeof e?e(o):this.expressionService.evaluate(e,o)}executeValueGetter(e,t,i,s){let o;let r=i.getColId(),n=this.valueCache.getValue(s,r);if(void 0!==n)return n;let l=this.gos.addGridCommonParams({data:t,node:s,column:i,colDef:i.getColDef(),getValue:this.getValueCallback.bind(this,s)});return o="function"==typeof e?e(l):this.expressionService.evaluate(e,l),this.valueCache.setValue(s,r,o),o}getValueCallback(e,t){let i=this.columnModel.getPrimaryColumn(t);return i?this.getValue(i,e):null}getKeyForNode(e,t){let i=this.getValue(e,t),s=e.getColDef().keyCreator,o=i;return s&&(o=s(this.gos.addGridCommonParams({value:i,colDef:e.getColDef(),column:e,node:t,data:t.data}))),"string"==typeof o||null==o||"[object Object]"===(o=String(o))&&ew("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 (se AG Grid docs) or b) to toString() on the object to return a key"),o}};K([eB("expressionService")],ag.prototype,"expressionService",2),K([eB("columnModel")],ag.prototype,"columnModel",2),K([eB("valueCache")],ag.prototype,"valueCache",2),K([eB("dataTypeService")],ag.prototype,"dataTypeService",2),K([eV],ag.prototype,"init",1),ag=K([ek("valueService")],ag);var am=class extends tR{constructor(){super(...arguments),this.expressionToFunctionCache={}}setBeans(e){this.logger=e.create("ExpressionService")}evaluate(e,t){if("string"==typeof e)return this.evaluateExpression(e,t);console.error("AG Grid: value should be either a string or a function",e)}evaluateExpression(e,t){try{return this.createExpressionFunction(e)(t.value,t.context,t.oldValue,t.newValue,t.value,t.node,t.data,t.colDef,t.rowIndex,t.api,t.columnApi,t.getValue,t.column,t.columnGroup)}catch(i){return console.log("Processing of the expression failed"),console.log("Expression = "+e),console.log("Params =",t),console.log("Exception = "+i),null}}createExpressionFunction(e){if(this.expressionToFunctionCache[e])return this.expressionToFunctionCache[e];let t=Function("x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, columnApi, getValue, column, columnGroup",this.createFunctionBody(e));return this.expressionToFunctionCache[e]=t,t}createFunctionBody(e){return e.indexOf("return")>=0?e:"return "+e+";"}};K([$(0,ez("loggerFactory"))],am.prototype,"setBeans",1),am=K([ek("expressionService")],am);var aC=class extends tR{setBeans(e){this.logging=e.get("debug")}create(e){return new av(e,this.isLogging.bind(this))}isLogging(){return this.logging}};K([$(0,ez("gridOptionsService"))],aC.prototype,"setBeans",1),aC=K([ek("loggerFactory")],aC);var av=class{constructor(e,t){this.name=e,this.isLoggingFunc=t}isLogging(){return this.isLoggingFunc()}log(e){this.isLoggingFunc()&&console.log("AG Grid."+this.name+": "+e)}},af=class extends tR{setComp(e,t,i){this.view=e,this.eGridHostDiv=t,this.eGui=i,this.eGui.setAttribute("grid-id",this.context.getGridId()),this.dragAndDropService.addDropTarget({getContainer:()=>this.eGui,isInterestedIn:e=>1===e||0===e,getIconName:()=>rn.ICON_NOT_ALLOWED}),this.mouseEventService.stampTopLevelGridCompWithGridInstance(t),this.createManagedBean(new ns(this.view)),this.addRtlSupport();let s=this.resizeObserverService.observeResize(this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc(()=>s()),this.ctrlsService.register("gridCtrl",this)}isDetailGrid(){var e;let t=this.focusService.findTabbableParent(this.getGui());return(null==(e=null==t?void 0:t.getAttribute("row-id"))?void 0:e.startsWith("detail"))||!1}showDropZones(){return eO.__isRegistered("@ag-grid-enterprise/row-grouping",this.context.getGridId())}showSideBar(){return eO.__isRegistered("@ag-grid-enterprise/side-bar",this.context.getGridId())}showStatusBar(){return eO.__isRegistered("@ag-grid-enterprise/status-bar",this.context.getGridId())}showWatermark(){return eO.__isRegistered("@ag-grid-enterprise/core",this.context.getGridId())}onGridSizeChanged(){let e={type:tP.EVENT_GRID_SIZE_CHANGED,clientWidth:this.eGridHostDiv.clientWidth,clientHeight:this.eGridHostDiv.clientHeight};this.eventService.dispatchEvent(e)}
217addRtlSupport(){let e=this.gos.get("enableRtl")?"ag-rtl":"ag-ltr";this.view.setRtlClass(e)}destroyGridUi(){this.view.destroyGridUi()}getGui(){return this.eGui}setResizeCursor(e){this.view.setCursor(e?"ew-resize":null)}disableUserSelect(e){this.view.setUserSelect(e?"none":null)}focusNextInnerContainer(e){let t=this.view.getFocusableContainers(),i=this.gos.getActiveDomElement(),s=t.findIndex(e=>e.contains(i))+(e?-1:1);return!(s<=0)&&!(s>=t.length)&&this.focusService.focusInto(t[s])}focusInnerElement(e){let t=this.view.getFocusableContainers(),i=this.columnModel.getAllDisplayedColumns();if(e){if(t.length>1)return this.focusService.focusInto(e5(t),!0);let e=e5(i);if(this.focusService.focusGridView(e,!0))return!0}if(0===this.gos.get("headerHeight")||this.gos.get("suppressHeaderFocus")){if(this.focusService.focusGridView(i[0]))return!0;for(let e=1;e<t.length;e++)if(this.focusService.focusInto(t[e]))return!0;return!1}return this.focusService.focusFirstHeader()}forceFocusOutOfContainer(e=!1){this.view.forceFocusOutOfContainer(e)}};K([eB("focusService")],af.prototype,"focusService",2),K([eB("resizeObserverService")],af.prototype,"resizeObserverService",2),K([eB("columnModel")],af.prototype,"columnModel",2),K([eB("ctrlsService")],af.prototype,"ctrlsService",2),K([eB("mouseEventService")],af.prototype,"mouseEventService",2),K([eB("dragAndDropService")],af.prototype,"dragAndDropService",2);var aw=class extends lw{constructor(e){super(),this.eGridDiv=e}postConstruct(){this.logger=this.loggerFactory.create("GridComp");let e={destroyGridUi:()=>this.destroyBean(this),setRtlClass:e=>this.addCssClass(e),forceFocusOutOfContainer:this.forceFocusOutOfContainer.bind(this),updateLayoutClasses:this.updateLayoutClasses.bind(this),getFocusableContainers:this.getFocusableContainers.bind(this),setUserSelect:e=>{this.getGui().style.userSelect=null!=e?e:"",this.getGui().style.webkitUserSelect=null!=e?e:""},setCursor:e=>{this.getGui().style.cursor=null!=e?e:""}};this.ctrl=this.createManagedBean(new af);let t=this.createTemplate();
217this.setTemplate(t),this.ctrl.setComp(e,this.eGridDiv,this.getGui()),this.insertGridIntoDom(),this.initialiseTabGuard({onTabKeyDown:()=>void 0,focusInnerElement:e=>this.ctrl.focusInnerElement(e),forceFocusOutWhenTabGuardsAreEmpty:!0})}insertGridIntoDom(){let e=this.getGui();this.eGridDiv.appendChild(e),this.addDestroyFunc(()=>{this.eGridDiv.removeChild(e),this.logger.log("Grid removed from DOM")})}updateLayoutClasses(e,t){let i=this.eRootWrapperBody.classList;i.toggle("ag-layout-auto-height",t.autoHeight),i.toggle("ag-layout-normal",t.normal),i.toggle("ag-layout-print",t.print),this.addOrRemoveCssClass("ag-layout-auto-height",t.autoHeight),this.addOrRemoveCssClass("ag-layout-normal",t.normal),this.addOrRemoveCssClass("ag-layout-print",t.print)}createTemplate(){let e=this.ctrl.showDropZones()?"<ag-grid-header-drop-zones></ag-grid-header-drop-zones>":"",t=this.ctrl.showSideBar()?'<ag-side-bar ref="sideBar"></ag-side-bar>':"",i=this.ctrl.showStatusBar()?'<ag-status-bar ref="statusBar"></ag-status-bar>':"",s=this.ctrl.showWatermark()?"<ag-watermark></ag-watermark>":"";return`<div class="ag-root-wrapper" role="presentation">
218                ${e}
219                <div class="ag-root-wrapper-body" ref="rootWrapperBody" role="presentation">
220                    <ag-grid-body ref="gridBody"></ag-grid-body>
221                    ${t}
222                </div>
223                ${i}
224                <ag-pagination></ag-pagination>
225                ${s}
226            </div>`}getFocusableElement(){return this.eRootWrapperBody}getFocusableContainers(){let e=[this.gridBodyComp.getGui()];return this.sideBarComp&&e.push(this.sideBarComp.getGui()),e.filter(e=>sp(e))}};K([eB("loggerFactory")],aw.prototype,"loggerFactory",2),K([ot("gridBody")],aw.prototype,"gridBodyComp",2),K([ot("sideBar")],aw.prototype,"sideBarComp",2),K([ot("rootWrapperBody")],aw.prototype,"eRootWrapperBody",2),K([eV],aw.prototype,"postConstruct",1);var aE=class extends tR{progressSort(e,t,i){let s=this.getNextSortDirection(e);this.setSortForColumn(e,s,t,i)}setSortForColumn(e,t,i,s){"asc"!==t&&"desc"!==t&&(t=null);let o=this.gos.isColumnsSortingCoupledToGroup(),r=[e];if(o&&e.getColDef().showRowGroup){let t=this.columnModel.getSourceColumnsForGroupColumn(e),i=null==t?void 0:t.filter(e=>e.isSortable());i&&(r=[e,...i])}r.forEach(e=>e.setSort(t,s));let n=(i||this.gos.get("alwaysMultiSort"))&&!this.gos.get("suppressMultiSort"),l=[];if(!n){let e=this.clearSortBarTheseColumns(r,s);l.push(...e)}this.updateSortIndex(e),l.push(...r),this.dispatchSortChangedEvents(s,l)}updateSortIndex(e){let t=this.gos.isColumnsSortingCoupledToGroup(),i=this.columnModel.getGroupDisplayColumnForGroup(e.getId()),s=t&&i||e,o=this.getColumnsWithSortingOrdered();this.columnModel.getPrimaryAndSecondaryAndAutoColumns().forEach(e=>e.setSortIndex(null));let r=o.filter(e=>(!t||!e.getColDef().showRowGroup)&&e!==s);(s.getSort()?[...r,s]:r).forEach((e,t)=>{e.setSortIndex(t)})}onSortChanged(e,t){this.dispatchSortChangedEvents(e,t)}isSortActive(){let e=this.columnModel.getPrimaryAndSecondaryAndAutoColumns().filter(e=>!!e.getSort());return e&&e.length>0}dispatchSortChangedEvents(e,t){let i={type:tP.EVENT_SORT_CHANGED,source:e};t&&(i.columns=t),this.eventService.dispatchEvent(i)}clearSortBarTheseColumns(e,t){let i=[];return this.columnModel.getPrimaryAndSecondaryAndAutoColumns().forEach(s=>{e.includes(s)||(s.getSort()&&i.push(s),s.setSort(void 0,t))}),i}getNextSortDirection(e){let t,i;if(!Array.isArray(t=e.getColDef().sortingOrder?e.getColDef().sortingOrder:this.gos.get("sortingOrder")?this.gos.get("sortingOrder"):aE.DEFAULT_SORTING_ORDER)||t.length<=0)return console.warn(`AG Grid: sortingOrder must be an array with at least one element, currently it's ${t}`),null;let s=t.indexOf(e.getSort()),o=s==t.length-1;return(i=s<0||o?t[0]:t[s+1],0>aE.DEFAULT_SORTING_ORDER.indexOf(i))?(console.warn("AG Grid: invalid sort type "+i),null):i}getIndexedSortMap(){let e=this.columnModel.getPrimaryAndSecondaryAndAutoColumns().filter(e=>!!e.getSort());if(this.columnModel.isPivotMode()){let t=this.gos.isColumnsSortingCoupledToGroup();e=e.filter(e=>{let i=!!e.getAggFunc(),s=!e.isPrimary(),o=t?this.columnModel.getGroupDisplayColumnForGroup(e.getId()):e.getColDef().showRowGroup;return i||s||o})}let t=this.columnModel.getRowGroupColumns().filter(e=>!!e.getSort()),i={};e.forEach((e,t)=>i[e.getId()]=t),e.sort((e,t)=>
226{let s=e.getSortIndex(),o=t.getSortIndex();return null!=s&&null!=o?s-o:null==s&&null==o?i[e.getId()]>i[t.getId()]?1:-1:null==o?-1:1});let s=this.gos.isColumnsSortingCoupledToGroup()&&!!t.length;s&&(e=[...new Set(e.map(e=>{var t;return null!=(t=this.columnModel.getGroupDisplayColumnForGroup(e.getId()))?t:e}))]);let o=new Map;return e.forEach((e,t)=>o.set(e,t)),s&&t.forEach(e=>{let t=this.columnModel.getGroupDisplayColumnForGroup(e.getId());o.set(e,o.get(t))}),o}getColumnsWithSortingOrdered(){return[...this.getIndexedSortMap().entries()].sort(([e,t],[i,s])=>t-s).map(([e])=>e)}getSortModel(){return this.getColumnsWithSortingOrdered().filter(e=>e.getSort()).map(e=>({sort:e.getSort(),colId:e.getId()}))}getSortOptions(){return this.getColumnsWithSortingOrdered().filter(e=>e.getSort()).map(e=>({sort:e.getSort(),column:e}))}canColumnDisplayMixedSort(e){let t=this.gos.isColumnsSortingCoupledToGroup(),i=!!e.getColDef().showRowGroup;return t&&i}getDisplaySortForColumn(e){let t=this.columnModel.getSourceColumnsForGroupColumn(e);if(!this.canColumnDisplayMixedSort(e)||!(null==t?void 0:t.length))return e.getSort();let i=null!=e.getColDef().field||e.getColDef().valueGetter?[e,...t]:t,s=i[0].getSort();return i.every(e=>e.getSort()==s)?s:"mixed"}getDisplaySortIndexForColumn(e){return this.getIndexedSortMap().get(e)}};aE.DEFAULT_SORTING_ORDER=["asc","desc",null],K([eB("columnModel")],aE.prototype,"columnModel",2),aE=K([ek("sortController")],aE);var aS=class extends tR{static addKeyboardModeEvents(e){this.instanceCount>0||(e.addEventListener("keydown",aS.toggleKeyboardMode),e.addEventListener("mousedown",aS.toggleKeyboardMode))}static removeKeyboardModeEvents(e){this.instanceCount>0||(e.addEventListener("keydown",aS.toggleKeyboardMode),e.addEventListener("mousedown",aS.toggleKeyboardMode))}static toggleKeyboardMode(e){let t=aS.keyboardModeActive,i="keydown"===e.type;i&&(e.ctrlKey||e.metaKey||e.altKey)||t===i||(aS.keyboardModeActive=i)}static unregisterGridCompController(e){aS.removeKeyboardModeEvents(e)}init(){let e=this.clearFocusedCell.bind(this);this.addManagedListener(this.eventService,tP.EVENT_COLUMN_PIVOT_MODE_CHANGED,e),this.addManagedListener(this.eventService,tP.EVENT_NEW_COLUMNS_LOADED,this.onColumnEverythingChanged.bind(this)),this.addManagedListener(this.eventService,tP.EVENT_COLUMN_GROUP_OPENED,e),this.addManagedListener(this.eventService,tP.EVENT_COLUMN_ROW_GROUP_CHANGED,e),this.registerKeyboardFocusEvents(),this.ctrlsService.whenReady(e=>{this.gridCtrl=e.gridCtrl})}registerKeyboardFocusEvents(){let e=this.gos.getDocument();aS.addKeyboardModeEvents(e),aS.instanceCount++,this.addDestroyFunc(()=>{aS.instanceCount--,aS.unregisterGridCompController(e)})}onColumnEverythingChanged(){if(!this.focusedCellPosition)return;let e=this.focusedCellPosition.column,t=this.columnModel.getGridColumn(e.getId());e!==t&&this.clearFocusedCell()}isKeyboardMode(){return aS.keyboardModeActive}getFocusCellToUseAfterRefresh(){return this.gos.get("suppressFocusAfterRefresh")||!this.focusedCellPosition||this.isDomDataMissingInHierarchy(this.gos.getActiveDomElement(),nD.DOM_DATA_KEY_ROW_CTRL)?null:this.focusedCellPosition}getFocusHeaderToUseAfterRefresh(){return this.gos.get("suppressFocusAfterRefresh")||!this.focusedHeaderPosition||this.isDomDataMissingInHierarchy(this.gos.getActiveDomElement(),n4.DOM_DATA_KEY_HEADER_CTRL)?null:this.focusedHeaderPosition}isDomDataMissingInHierarchy(e,t){let i=e;for(;i;){if(this.gos.getDomData(i,t))return!1;i=i.parentNode}return!0}getFocusedCell(){return this.focusedCellPosition}shouldRestoreFocus(e){return!!this.isCellRestoreFocused(e)&&(setTimeout(()=>{this.restoredFocusedCellPosition=null},0),!0)}isCellRestoreFocused(e){return null!=this.restoredFocusedCellPosition&&this.cellPositionUtils.equals(e,this.restoredFocusedCellPosition)}setRestoreFocusedCell(e){"react"===this.getFrameworkOverrides().renderingEngine&&(this.restoredFocusedCellPosition=e)}getFocusEventParams(){let{rowIndex:e,rowPinned:t,column:i}=this.focusedCellPosition,s={rowIndex:e,rowPinned:t,column:i,isFullWidthCell:!1},o=this.rowRenderer.getRowByPosition({rowIndex:e,rowPinned:t});return o&&(s.isFullWidthCell=o.isFullWidth()),s}clearFocusedCell(){if(this.restoredFocusedCellPosition=null,null==this.focusedCellPosition)return;let e=B({type:tP.EVENT_CELL_FOCUS_CLEARED}
226,this.getFocusEventParams());this.focusedCellPosition=null,this.eventService.dispatchEvent(e)}setFocusedCell(e){let{column:t,rowIndex:i,rowPinned:s,forceBrowserFocus:o=!1,preventScrollOnBrowserFocus:r=!1}=e,n=this.columnModel.getGridColumn(t);if(!n){this.focusedCellPosition=null;return}this.focusedCellPosition=n?{rowIndex:i,rowPinned:j(s),column:n}:null;let l=W(B({type:tP.EVENT_CELL_FOCUSED},this.getFocusEventParams()),{forceBrowserFocus:o,preventScrollOnBrowserFocus:r,floating:null});this.eventService.dispatchEvent(l)}isCellFocused(e){return null!=this.focusedCellPosition&&this.cellPositionUtils.equals(e,this.focusedCellPosition)}isRowNodeFocused(e){return this.isRowFocused(e.rowIndex,e.rowPinned)}isHeaderWrapperFocused(e){if(null==this.focusedHeaderPosition)return!1;let t=e.getColumnGroupChild(),i=e.getRowIndex(),s=e.getPinned(),{column:o,headerRowIndex:r}=this.focusedHeaderPosition;return t===o&&i===r&&s==o.getPinned()}clearFocusedHeader(){this.focusedHeaderPosition=null}getFocusedHeader(){return this.focusedHeaderPosition}setFocusedHeader(e,t){this.focusedHeaderPosition={headerRowIndex:e,column:t}}focusHeaderPosition(e){if(this.gos.get("suppressHeaderFocus"))return!1;let{direction:t,fromTab:i,allowUserOverride:s,event:o,fromCell:r,rowWithoutSpanValue:n}=e,{headerPosition:l}=e;if(r&&this.filterManager.isAdvancedFilterHeaderActive())return this.focusAdvancedFilter(l);if(s){let e=this.getFocusedHeader(),s=this.headerNavigationService.getHeaderRowCount();if(i){let i=this.gos.getCallback("tabToNextHeader");i&&(l=this.getHeaderPositionFromUserFunc({userFunc:i,direction:t,currentPosition:e,headerPosition:l,headerRowCount:s}))}else{let t=this.gos.getCallback("navigateToNextHeader");t&&o&&(l=t({key:o.key,previousHeaderPosition:e,nextHeaderPosition:l,headerRowCount:s,event:o}))}}return!!l&&this.focusProvidedHeaderPosition({headerPosition:l,direction:t,event:o,fromCell:r,rowWithoutSpanValue:n})}focusHeaderPositionFromUserFunc(e){if(this.gos.get("suppressHeaderFocus"))return!1;let{userFunc:t,headerPosition:i,direction:s,event:o}=e,r=this.getFocusedHeader(),n=this.headerNavigationService.getHeaderRowCount(),l=this.getHeaderPositionFromUserFunc({userFunc:t,direction:s,currentPosition:r,headerPosition:i,headerRowCount:n});return!!l&&this.focusProvidedHeaderPosition({headerPosition:l,direction:s,event:o})}getHeaderPositionFromUserFunc(e){let{userFunc:t,direction:i,currentPosition:s,headerPosition:o,headerRowCount:r}=e,n=t({backwards:"Before"===i,previousHeaderPosition:s,nextHeaderPosition:o,headerRowCount:r});return!0===n||null===n?(null===n&&ew("Returning `null` from tabToNextHeader is deprecated. Return `true` to stay on the current header, or `false` to let the browser handle the tab behaviour."),s):!1===n?null:n}focusProvidedHeaderPosition(e){let{headerPosition:t,direction:i,fromCell:s,rowWithoutSpanValue:o,event:r}=e;if(-1===t.headerRowIndex)return this.filterManager.isAdvancedFilterHeaderActive()?this.focusAdvancedFilter(t):this.focusGridView(t.column);this.headerNavigationService.scrollToColumn(t.column,i);let n=this.ctrlsService.getHeaderRowContainerCtrl(t.column.getPinned()).focusHeader(t.headerRowIndex,t.column,r);return n&&(null!=o||s)&&this.headerNavigationService.setCurrentHeaderRowWithoutSpan(null!=o?o:-1),n}focusFirstHeader(){let e=this.columnModel.getAllDisplayedColumns()[0];if(!e)return!1;e.getParent()&&(e=this.columnModel.getColumnGroupAtLevel(e,0));let t=this.headerPositionUtils.getHeaderIndexToFocus(e,0);return this.focusHeaderPosition({headerPosition:t,rowWithoutSpanValue:0})}focusLastHeader(e){let t=this.headerNavigationService.getHeaderRowCount()-1,i=e5(this.columnModel.getAllDisplayedColumns());return this.focusHeaderPosition({headerPosition:{headerRowIndex:t,column:i},rowWithoutSpanValue:-1,event:e})}focusPreviousFromFirstCell(e){return this.filterManager.isAdvancedFilterHeaderActive()?this.focusAdvancedFilter(null):this.focusLastHeader(e)}isAnyCellFocused(){return!!this.focusedCellPosition}isRowFocused(e,t){return null!=this.focusedCellPosition&&this.focusedCellPosition.rowIndex===e&&this.focusedCellPosition.rowPinned===j(t)}findFocusableElements(e,t,i=!1){let s=i4;t&&(s+=", "+t),i&&(s+=', [tabindex="-1"]');let o=Array.prototype.slice.apply(e.querySelectorAll(i5)).filter(e=>sp(e)),r=Array.prototype.slice.apply(e.querySelectorAll(s));return r.length?o.filter(e=>-1===r.indexOf(e)):o}focusInto(e,t=!1,i=!1){let s=this.findFocusableElements(e,null,i),o=t?e5(s):s[0];return!!o&&(o.focus({preventScroll:!0}),!0)}findFocusableElementBeforeTabGuard(e,t){if(!t)return null;let i=this.findFocusableElements(e),s=i.indexOf(t);if(-1===s)return null;let o=-1;for(let e=s-1;e>=0;e--)if(i[e].classList.contains("ag-tab-guard-top")){o=e;break}return o<=0?null:i[o-1]}findNextFocusableElement(e=this.eGridDiv,t,i){let s=this.findFocusableElements(e,t?':not([tabindex="-1"])':null),o=this.gos.getActiveDomElement(),r=(t?s.findIndex(e=>e.contains(o)):s.indexOf(o))+(i?-1:1);return r<0||r>=s.length?null:s[r]}isTargetUnderManagedComponent(e,t){if(!t)return!1;let i=e.querySelectorAll(`.${oa.FOCUS_MANAGED_CLASS}`);if(!i.length)return!1;for(let e=0;e<i.length;e++)if(i[e].contains(t))return!0;return!1}
226findTabbableParent(e,t=5){let i=0;for(;e&&null===ix(e)&&++i<=t;)e=e.parentElement;return null===ix(e)?null:e}focusGridView(e,t){var i;if(this.gos.get("suppressCellFocus"))return t?this.gos.get("suppressHeaderFocus")?this.focusNextGridCoreContainer(!0,!0):this.focusLastHeader():this.focusNextGridCoreContainer(!1);let s=t?this.rowPositionUtils.getLastRow():this.rowPositionUtils.getFirstRow();if(!s)return!1;let{rowIndex:o,rowPinned:r}=s,n=this.getFocusedHeader();return!e&&n&&(e=n.column),null!=o&&!!e&&(this.navigationService.ensureCellVisible({rowIndex:o,column:e,rowPinned:r}),this.setFocusedCell({rowIndex:o,column:e,rowPinned:j(r),forceBrowserFocus:!0}),null==(i=this.rangeService)||i.setRangeToCell({rowIndex:o,rowPinned:r,column:e}),!0)}focusNextGridCoreContainer(e,t=!1){return!!(!t&&this.gridCtrl.focusNextInnerContainer(e))||(!t&&(e||this.gridCtrl.isDetailGrid())||this.gridCtrl.forceFocusOutOfContainer(e),!1)}focusAdvancedFilter(e){var t,i;return this.advancedFilterFocusColumn=null==e?void 0:e.column,null!=(i=null==(t=this.advancedFilterService)?void 0:t.getCtrl().focusHeaderComp())&&i}focusNextFromAdvancedFilter(e,t){var i,s;let o=null!=(s=t?void 0:this.advancedFilterFocusColumn)?s:null==(i=this.columnModel.getAllDisplayedColumns())?void 0:i[0];return e?this.focusHeaderPosition({headerPosition:{column:o,headerRowIndex:this.headerNavigationService.getHeaderRowCount()-1}}):this.focusGridView(o)}clearAdvancedFilterColumn(){this.advancedFilterFocusColumn=void 0}};aS.keyboardModeActive=!1,aS.instanceCount=0,K([eB("eGridDiv")],aS.prototype,"eGridDiv",2),K([eB("columnModel")],aS.prototype,"columnModel",2),K([eB("headerNavigationService")],aS.prototype,"headerNavigationService",2),K([eB("headerPositionUtils")],aS.prototype,"headerPositionUtils",2),K([eB("rowRenderer")],aS.prototype,"rowRenderer",2),K([eB("rowPositionUtils")],aS.prototype,"rowPositionUtils",2),K([eB("cellPositionUtils")],aS.prototype,"cellPositionUtils",2),K([eB("navigationService")],aS.prototype,"navigationService",2),K([eB("ctrlsService")],aS.prototype,"ctrlsService",2),K([eB("filterManager")],aS.prototype,"filterManager",2),K([eW("rangeService")],aS.prototype,"rangeService",2),K([eW("advancedFilterService")],aS.prototype,"advancedFilterService",2),K([eV],aS.prototype,"init",1),aS=K([ek("focusService")],aS);var ay=class extends tR{setMouseOver(e){this.selectedColumns=e;let t={type:tP.EVENT_COLUMN_HOVER_CHANGED};this.eventService.dispatchEvent(t)}clearMouseOver(){this.selectedColumns=null;let e={type:tP.EVENT_COLUMN_HOVER_CHANGED};this.eventService.dispatchEvent(e)}isHovered(e){return!!this.selectedColumns&&this.selectedColumns.indexOf(e)>=0}};ay=K([ek("columnHoverService")],ay);var aR=class extends tR{constructor(){super(...arguments),this.executeNextFuncs=[],this.executeLaterFuncs=[],this.active=!1,this.suppressAnimation=!1,this.animationThreadCount=0}postConstruct(){this.ctrlsService.whenReady(e=>this.gridBodyCtrl=e.gridBodyCtrl)}isActive(){return this.active&&!this.suppressAnimation}setSuppressAnimation(e){this.suppressAnimation=e}start(){this.active||this.gos.get("suppressColumnMoveAnimation")||this.gos.get("enableRtl")||(this.ensureAnimationCssClassPresent(),this.active=!0)}finish(){this.active&&this.flush(()=>{this.active=!1})}executeNextVMTurn(e){this.active?this.executeNextFuncs.push(e):e()}executeLaterVMTurn(e){this.active?this.executeLaterFuncs.push(e):e()}ensureAnimationCssClassPresent(){this.animationThreadCount++;let e=this.animationThreadCount;this.gridBodyCtrl.setColumnMovingCss(!0),this.executeLaterFuncs.push(()=>{this.animationThreadCount===e&&this.gridBodyCtrl.setColumnMovingCss(!1)})}flush(e){if(0===this.executeNextFuncs.length&&0===this.executeLaterFuncs.length){e();return}let t=e=>{for(;e.length;){let t=e.pop();t&&t()}};this.getFrameworkOverrides().wrapIncoming(()=>{window.setTimeout(()=>t(this.executeNextFuncs),0),window.setTimeout(()=>{e(),t(this.executeLaterFuncs)},200)})}};K([eB("ctrlsService")],aR.prototype,"ctrlsService",2),K([eV],aR.prototype,"postConstruct",1),aR=K([ek("columnAnimationService")],aR);var aD=class extends tR{postConstruct(){this.ctrlsService.whenReady(e=>{this.centerRowsCtrl=e.center,this.addManagedListener(this.eventService,tP.EVENT_BODY_HEIGHT_CHANGED,this.checkPageSize.bind(this)),this.addManagedListener(this.eventService,tP.EVENT_SCROLL_VISIBILITY_CHANGED,this.checkPageSize.bind(this)),this.addManagedPropertyListener("paginationAutoPageSize",this.onPaginationAutoSizeChanged.bind(this)),this.checkPageSize()})}notActive(){return!this.gos.get("paginationAutoPageSize")||null==this.centerRowsCtrl}onPaginationAutoSizeChanged(){this.notActive()?this.paginationProxy.unsetAutoCalculatedPageSize():this.checkPageSize()}checkPageSize(){if(this.notActive())return;
226let e=this.centerRowsCtrl.getViewportSizeFeature().getBodyHeight();if(e>0){let t=()=>{let t=Math.floor(e/this.gos.getRowHeightAsNumber());this.paginationProxy.setPageSize(t,"autoCalculated")};this.isBodyRendered?eP(()=>t(),50)():(t(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}};K([eB("ctrlsService")],aD.prototype,"ctrlsService",2),K([eB("paginationProxy")],aD.prototype,"paginationProxy",2),K([eV],aD.prototype,"postConstruct",1),aD=K([ek("paginationAutoPageSizeService")],aD);var aT=class extends tR{constructor(){super(...arguments),this.cacheVersion=0}init(){this.active=this.gos.get("valueCache"),this.neverExpires=this.gos.get("valueCacheNeverExpires")}onDataChanged(){this.neverExpires||this.expire()}expire(){this.cacheVersion++}setValue(e,t,i){this.active&&(e.__cacheVersion!==this.cacheVersion&&(e.__cacheVersion=this.cacheVersion,e.__cacheData={}),e.__cacheData[t]=i)}getValue(e,t){if(this.active&&e.__cacheVersion===this.cacheVersion)return e.__cacheData[t]}};K([eV],aT.prototype,"init",1),aT=K([ek("valueCache")],aT);var ab=class extends tR{init(){"clientSide"===this.rowModel.getType()&&(this.clientSideRowModel=this.rowModel),this.addManagedListener(this.eventService,tP.EVENT_CELL_VALUE_CHANGED,this.onCellValueChanged.bind(this))}onCellValueChanged(e){"paste"!==e.source&&this.doChangeDetection(e.node,e.column)}doChangeDetection(e,t){if(this.gos.get("suppressChangeDetection"))return;let i=[e];if(this.clientSideRowModel&&!e.isRowPinned()){let s=new lI(this.gos.get("aggregateOnlyChangedColumns"),this.clientSideRowModel.getRootNode());s.addParentNode(e.parent,[t]),this.clientSideRowModel.doAggregate(s),s.forEachChangedNodeDepthFirst(e=>{i.push(e)})}this.rowRenderer.refreshCells({rowNodes:i})}};K([eB("rowModel")],ab.prototype,"rowModel",2),K([eB("rowRenderer")],ab.prototype,"rowRenderer",2),K([eV],ab.prototype,"init",1),ab=K([ek("changeDetectionService")],ab);var aA=class extends tR{adaptFunction(e,t){let i=this.componentMetadataProvider.retrieve(e);return i&&i.functionAdapter?i.functionAdapter(t):null}adaptCellRendererFunction(e){class t{refresh(e){return!1}getGui(){return this.eGui}init(t){let i=e(t),s=typeof i;if("string"===s||"number"===s||"boolean"===s){this.eGui=sg("<span>"+i+"</span>");return}if(null==i){this.eGui=sg("<span></span>");return}this.eGui=i}}return t}doesImplementIComponent(e){return!!e&&e.prototype&&"getGui"in e.prototype}};K([eB("componentMetadataProvider")],aA.prototype,"componentMetadataProvider",2),aA=K([ek("agComponentUtils")],aA);var aP=class extends tR{postConstruct(){this.componentMetaData={dateComponent:{mandatoryMethodList:["getDate","setDate"],optionalMethodList:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","onParamsUpdated","refresh"]},detailCellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},headerComponent:{mandatoryMethodList:[],optionalMethodList:["refresh"]},headerGroupComponent:{mandatoryMethodList:[],optionalMethodList:[]},loadingCellRenderer:{mandatoryMethodList:[],optionalMethodList:[],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},loadingOverlayComponent:{mandatoryMethodList:[],optionalMethodList:["refresh"]},noRowsOverlayComponent:{mandatoryMethodList:[],optionalMethodList:["refresh"]},floatingFilterComponent:{mandatoryMethodList:["onParentModelChanged"],optionalMethodList:["afterGuiAttached","onParamsUpdated","refresh"]},cellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh","afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},cellEditor:{mandatoryMethodList:["getValue"],optionalMethodList:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},innerRenderer:{mandatoryMethodList:[],optionalMethodList:["afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},fullWidthCellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh","afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},groupRowRenderer:{mandatoryMethodList:[],optionalMethodList:["afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},filter:{mandatoryMethodList:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethodList:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},statusPanel:{mandatoryMethodList:[],optionalMethodList:["refresh"]},toolPanel:{mandatoryMethodList:[],optionalMethodList:["refresh","getState"]},tooltipComponent:{mandatoryMethodList:[],optionalMethodList:[]},menuItem:{mandatoryMethodList:[],optionalMethodList:["setActive","select","setExpanded","configureDefaults"]}}}retrieve(e){return this.componentMetaData[e]}};K([eB("agComponentUtils")],aP.prototype,"agComponentUtils",2),K([eV],aP.prototype,"postConstruct",1),aP=K([ek("componentMetadataProvider")],aP);var aF={"ag-theme-custom":{headerHeight:25,headerCellMinWidth:24,listItemHeight:20,rowHeight:25,chartMenuPanelWidth:220},"ag-theme-material":{headerHeight:56,headerCellMinWidth:48,listItemHeight:32,rowHeight:48,chartMenuPanelWidth:240},"ag-theme-balham":{headerHeight:32,headerCellMinWidth:24,listItemHeight:24,rowHeight:28,chartMenuPanelWidth:220}
226,"ag-theme-alpine":{headerHeight:48,headerCellMinWidth:36,listItemHeight:24,rowHeight:42,chartMenuPanelWidth:240},"ag-theme-quartz":{headerHeight:48,headerCellMinWidth:36,listItemHeight:24,rowHeight:42,chartMenuPanelWidth:260}},aL={headerHeight:["ag-header-row"],headerCellMinWidth:["ag-header-cell"],listItemHeight:["ag-virtual-list-item"],rowHeight:["ag-row"],chartMenuPanelWidth:["ag-chart-docked-container"]},aM=class extends tR{constructor(){super(...arguments),this.calculatedSizes={},this.calculatedTheme=null}postConstruct(){var e;let t=null!=(e=this.getTheme().el)?e:this.eGridDiv;this.addManagedPropertyListener("rowHeight",()=>this.refreshRowHeightVariable()),this.mutationObserver=new MutationObserver(()=>{this.calculatedSizes={},this.calculatedTheme=null,this.calculatedTheme=this.getTheme(),this.fireGridStylesChangedEvent()}),this.mutationObserver.observe(t||this.eGridDiv,{attributes:!0,attributeFilter:["class"]})}fireGridStylesChangedEvent(){let e={type:tP.EVENT_GRID_STYLES_CHANGED};this.eventService.dispatchEvent(e)}getSassVariable(e){let{themeFamily:t,el:i}=this.getTheme();if(!t||0!==t.indexOf("ag-theme"))return;this.calculatedSizes||(this.calculatedSizes={}),this.calculatedSizes[t]||(this.calculatedSizes[t]={});let s=this.calculatedSizes[t][e];return null!=s?s:(this.calculatedSizes[t][e]=this.calculateValueForSassProperty(e,t,i),this.calculatedSizes[t][e])}calculateValueForSassProperty(e,t,i){let s=aF["ag-theme-"+(t.match("material")?"material":t.match("balham")?"balham":t.match("alpine")?"alpine":"custom")][e],o=this.gos.getDocument();if(i||(i=this.eGridDiv),!aL[e])return s;let r=aL[e],n=o.createElement("div"),l=Array.from(i.classList);n.classList.add(t,...l),n.style.position="absolute";let a=r.reduce((e,t)=>{let i=o.createElement("div");return i.style.position="static",i.classList.add(t),e.appendChild(i),i},n),h=0;if(o.body){o.body.appendChild(n);let t=-1!==e.toLowerCase().indexOf("height")?"height":"width";
226h=parseInt(window.getComputedStyle(a)[t],10),o.body.removeChild(n)}return h||s}isThemeDark(){let{theme:e}=this.getTheme();return!!e&&e.indexOf("dark")>=0}chartMenuPanelWidth(){return this.getSassVariable("chartMenuPanelWidth")}getTheme(){if(this.calculatedTheme)return this.calculatedTheme;let e=/\bag-(material|(?:theme-([\w\-]*)))\b/g,t=this.eGridDiv,i=null,s=[];for(;t;){if(i=e.exec(t.className)){let i=t.className.match(e);i&&(s=i);break}t=t.parentElement||void 0}if(!i)return{allThemes:s};let o=i[0];return this.calculatedTheme={theme:o,el:t,themeFamily:o.replace(/-dark$/,""),allThemes:s},this.calculatedTheme}getFromTheme(e,t){var i;return null!=(i=this.getSassVariable(t))?i:e}getDefaultRowHeight(){return this.getFromTheme(25,"rowHeight")}getListItemHeight(){return this.getFromTheme(20,"listItemHeight")}refreshRowHeightVariable(){let e=this.eGridDiv.style.getPropertyValue("--ag-line-height").trim(),t=this.gos.get("rowHeight");if(null==t||isNaN(t)||!isFinite(t))return null!==e&&this.eGridDiv.style.setProperty("--ag-line-height",null),-1;let i=`${t}px`;return e!=i?(this.eGridDiv.style.setProperty("--ag-line-height",i),t):""!=e?parseFloat(e):-1}getMinColWidth(){let e=this.getFromTheme(null,"headerCellMinWidth");return q(e)?Math.max(e,10):10}destroy(){this.calculatedSizes=null,this.mutationObserver&&this.mutationObserver.disconnect(),super.destroy()}};K([eB("eGridDiv")],aM.prototype,"eGridDiv",2),K([eV],aM.prototype,"postConstruct",1),aM=K([ek("environment")],aM);var aN=class extends tR{constructor(){super(...arguments),this.scrollY=0,this.uiBodyHeight=0}agWire(e){this.logger=e.create("RowContainerHeightService")}postConstruct(){this.addManagedListener(this.eventService,tP.EVENT_BODY_HEIGHT_CHANGED,this.updateOffset.bind(this)),this.maxDivHeight=i_(),this.logger.log("maxDivHeight = "+this.maxDivHeight)}isStretching(){return this.stretching}getDivStretchOffset(){return this.divStretchOffset}updateOffset(){if(!this.stretching)return;let e=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition().top,t=this.getUiBodyHeight();(e!==this.scrollY||t!==this.uiBodyHeight)&&(this.scrollY=e,this.uiBodyHeight=t,this.calculateOffset())}calculateOffset(){this.setUiContainerHeight(this.maxDivHeight),this.pixelsToShave=this.modelHeight-this.uiContainerHeight,this.maxScrollY=this.uiContainerHeight-this.uiBodyHeight;let e=this.scrollY/this.maxScrollY,t=e*this.pixelsToShave;this.logger.log(`Div Stretch Offset = ${t} (${this.pixelsToShave} * ${e})`),this.setDivStretchOffset(t)}setUiContainerHeight(e){e!==this.uiContainerHeight&&(this.uiContainerHeight=e,this.eventService.dispatchEvent({type:tP.EVENT_ROW_CONTAINER_HEIGHT_CHANGED}))}clearOffset(){this.setUiContainerHeight(this.modelHeight),this.pixelsToShave=0,this.setDivStretchOffset(0)}setDivStretchOffset(e){let t="number"==typeof e?Math.floor(e):null;this.divStretchOffset!==t&&(this.divStretchOffset=t,this.eventService.dispatchEvent({type:tP.EVENT_HEIGHT_SCALE_CHANGED}))}setModelHeight(e){this.modelHeight=e,this.stretching=null!=e&&this.maxDivHeight>0&&e>this.maxDivHeight,this.stretching?this.calculateOffset():this.clearOffset()}getUiContainerHeight(){return this.uiContainerHeight}getRealPixelPosition(e){return e-this.divStretchOffset}getUiBodyHeight(){let e=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition();return e.bottom-e.top}getScrollPositionForPixel(e){if(this.pixelsToShave<=0)return e;let t=this.modelHeight-this.getUiBodyHeight();return this.maxScrollY*(e/t)}};K([eB("ctrlsService")],aN.prototype,"ctrlsService",2),K([$(0,ez("loggerFactory"))],aN.prototype,"agWire",1),K([eV],aN.prototype,"postConstruct",1),aN=K([ek("rowContainerHeightService")],aN);var aI=class extends tR{init(){this.addManagedPropertyListener("isRowSelectable",()=>this.updateSelectable())}updateSelectableAfterGrouping(){this.updateSelectable(!0)}updateSelectable(e=!1){let t=!!this.gos.get("rowSelection"),i=this.gos.get("isRowSelectable");if(!t||!i)return;let s=this.gos.get("groupSelectsChildren"),o="clientSide"===this.rowModel.getType()&&s,r=[],n=t=>{if(e&&!t.group)return;if(o&&t.group){let e=t.childrenAfterGroup.some(e=>!0===e.selectable);t.setRowSelectable(e,!0);return}let s=!i||i(t);t.setRowSelectable(s,!0),!s&&t.isSelected()&&r.push(t)};
226o?new lI(!1,this.rowModel.getRootNode()).forEachChangedNodeDepthFirst(n,!0,!0):this.rowModel.forEachNode(n),r.length&&this.selectionService.setNodesSelected({nodes:r,newValue:!1,source:"selectableChanged"}),o&&this.selectionService instanceof ac&&this.selectionService.updateGroupsFromChildrenSelections("selectableChanged")}};K([eB("rowModel")],aI.prototype,"rowModel",2),K([eB("selectionService")],aI.prototype,"selectionService",2),K([eV],aI.prototype,"init",1),aI=K([ek("selectableService")],aI);var aG=class extends s9{constructor(){super(),this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1}postConstruct(){let e=this.gos.get("enableRtl");this.setTemplate(this.getTemplate());let{btFirst:t,btPrevious:i,btNext:s,btLast:o,pageSizeComp:r}=this;this.activateTabIndex([t,i,s,o]),t.insertAdjacentElement("afterbegin",sV(e?"last":"first",this.gos)),i.insertAdjacentElement("afterbegin",sV(e?"next":"previous",this.gos)),s.insertAdjacentElement("afterbegin",sV(e?"previous":"next",this.gos)),o.insertAdjacentElement("afterbegin",sV(e?"first":"last",this.gos)),this.addManagedPropertyListener("pagination",this.onPaginationChanged.bind(this)),this.addManagedPropertyListener("suppressPaginationPanel",this.onPaginationChanged.bind(this)),this.addManagedPropertyListeners(["paginationPageSizeSelector","paginationAutoPageSize","suppressPaginationPanel"],()=>this.onPageSizeRelatedOptionsChange()),this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector()),this.onPaginationChanged()}onPaginationChanged(){let e=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.setDisplayed(e),e&&(this.setupListeners(),this.enableOrDisableButtons(),this.updateRowLabels(),this.setCurrentPageLabel(),this.setTotalLabels(),this.onPageSizeRelatedOptionsChange())}onPageSizeRelatedOptionsChange(){this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector())}setupListeners(){this.areListenersSetup||(this.addManagedListener(this.eventService,tP.EVENT_PAGINATION_CHANGED,this.onPaginationChanged.bind(this)),[{el:this.btFirst,fn:this.onBtFirst.bind(this)},{el:this.btPrevious,fn:this.onBtPrevious.bind(this)},{el:this.btNext,fn:this.onBtNext.bind(this)},{el:this.btLast,fn:this.onBtLast.bind(this)}].forEach(e=>{let{el:t,fn:i}=e;this.addManagedListener(t,"click",i),this.addManagedListener(t,"keydown",e=>{(e.key===sk.ENTER||e.key===sk.SPACE)&&(e.preventDefault(),i())})}),this.areListenersSetup=!0)}onBtFirst(){this.previousAndFirstButtonsDisabled||this.paginationProxy.goToFirstPage()}setCurrentPageLabel(){let e=this.paginationProxy.getTotalPages()>0,t=this.paginationProxy.getCurrentPage();this.lbCurrent.textContent=this.formatNumber(e?t+1:0)}formatNumber(e){let t=this.gos.getCallback("paginationNumberFormatter");if(t)return t({value:e});let i=this.localeService.getLocaleTextFunc();return iQ(e,i("thousandSeparator",","),i("decimalSeparator","."))}getTemplate(){let e=this.localeService.getLocaleTextFunc(),t=e("page","Page"),i=e("to","to"),s=e("of","of"),o=e("firstPage","First Page"),r=e("previousPage","Previous Page"),n=e("nextPage","Next Page"),l=e("lastPage","Last Page"),a=this.getCompId();return`<div class="ag-paging-panel ag-unselectable" id="ag-${a}">
227                <ag-page-size-selector ref="pageSizeComp"></ag-page-size-selector>
228                <span class="ag-paging-row-summary-panel" role="status">
229                    <span id="ag-${a}-first-row" ref="lbFirstRowOnPage" class="ag-paging-row-summary-panel-number"></span>
230                    <span id="ag-${a}-to">${i}</span>
231                    <span id="ag-${a}-last-row" ref="lbLastRowOnPage" class="ag-paging-row-summary-panel-number"></span>
232                    <span id="ag-${a}-of">${s}</span>
233                    <span id="ag-${a}-row-count" ref="lbRecordCount" class="ag-paging-row-summary-panel-number"></span>
234                </span>
235                <span class="ag-paging-page-summary-panel" role="presentation">
236                    <div ref="btFirst" class="ag-button ag-paging-button" role="button" aria-label="${o}"></div>
237                    <div ref="btPrevious" class="ag-button ag-paging-button" role="button" aria-label="${r}"></div>
238                    <span class="ag-paging-description" role="status">
239                        <span id="ag-${a}-start-page">${t}</span>
240                        <span id="ag-${a}-start-page-number" ref="lbCurrent" class="ag-paging-number"></span>
241                        <span id="ag-${a}-of-page">${s}</span>
242                        <span id="ag-${a}-of-page-number" ref="lbTotal" class="ag-paging-number"></span>
243                    </span>
244                    <div ref="btNext" class="ag-button ag-paging-button" role="button" aria-label="${n}"></div>
245                    <div ref="btLast" class="ag-button ag-paging-button" role="button" aria-label="${l}"></div>
246                </span>
247            </div>`}onBtNext(){this.nextButtonDisabled||this.paginationProxy.goToNextPage()}onBtPrevious(){this.previousAndFirstButtonsDisabled||this.paginationProxy.goToPreviousPage()}onBtLast(){this.lastButtonDisabled||this.paginationProxy.goToLastPage()}enableOrDisableButtons(){let e=this.paginationProxy.getCurrentPage(),t=this.paginationProxy.isLastPageFound(),i=this.paginationProxy.getTotalPages();this.previousAndFirstButtonsDisabled=0===e,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);let s=this.isZeroPagesToDisplay();this.nextButtonDisabled=e===i-1||s,this.lastButtonDisabled=!t||s||e===i-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){ia(e,t),e.classList.toggle("ag-disabled",t)}updateRowLabels(){let e,t;let i=this.paginationProxy.getCurrentPage(),s=this.paginationProxy.getPageSize(),o=this.paginationProxy.isLastPageFound(),r=this.paginationProxy.isLastPageFound()?this.paginationProxy.getMasterRowCount():null;if(this.isZeroPagesToDisplay()?e=t=0:(t=(e=s*i+1)+s-1,o&&t>r&&(t=r)),this.lbFirstRowOnPage.textContent=this.formatNumber(e),this.rowNodeBlockLoader.isLoading()){let e=this.localeService.getLocaleTextFunc();this.lbLastRowOnPage.innerHTML=e("pageLastRowUnknown","?")}else this.lbLastRowOnPage.textContent=this.formatNumber(t)}isZeroPagesToDisplay(){let e=this.paginationProxy.isLastPageFound(),t=this.paginationProxy.getTotalPages();return e&&0===t}setTotalLabels(){let e=this.paginationProxy.isLastPageFound(),t=this.paginationProxy.getTotalPages(),i=e?this.paginationProxy.getMasterRowCount():null;if(1===i){let e=this.paginationProxy.getRow(0);if(e&&e.group&&!(e.groupData||e.aggData)){this.setTotalLabelsToZero();return}}if(e)this.lbTotal.textContent=this.formatNumber(t),this.lbRecordCount.textContent=this.formatNumber(i);else{let e=this.localeService.getLocaleTextFunc()("more","more");this.lbTotal.innerHTML=e,this.lbRecordCount.innerHTML=e}}setTotalLabelsToZero(){this.lbFirstRowOnPage.textContent=this.formatNumber(0),this.lbCurrent.textContent=this.formatNumber(0),this.lbLastRowOnPage.textContent=this.formatNumber(0),this.lbTotal.textContent=this.formatNumber(0),this.lbRecordCount.textContent=this.formatNumber(0)}};K([eB("paginationProxy")],aG.prototype,"paginationProxy",2),K([eB("rowNodeBlockLoader")],aG.prototype,"rowNodeBlockLoader",2),K([ot("btFirst")],aG.prototype,"btFirst",2),K([ot("btPrevious")],aG.prototype,"btPrevious",2),K([ot("btNext")],aG.prototype,"btNext",2),K([ot("btLast")],aG.prototype,"btLast",2),K([ot("lbRecordCount")],aG.prototype,"lbRecordCount",2),K([ot("lbFirstRowOnPage")],aG.prototype,"lbFirstRowOnPage",2),K([ot("lbLastRowOnPage")],aG.prototype,"lbLastRowOnPage",2),K([ot("lbCurrent")],aG.prototype,"lbCurrent",2),K([ot("lbTotal")],aG.prototype,"lbTotal",2),K([ot("pageSizeComp")],aG.prototype,"pageSizeComp",2),K([eV],aG.prototype,"postConstruct",1);var aO=class e extends s9{constructor(){super(e.TEMPLATE),this.inProgress=!1,this.destroyRequested=!1}updateLayoutClasses(e,t){let i=this.eOverlayWrapper.classList;i.toggle("ag-layout-auto-height",t.autoHeight),i.toggle("ag-layout-normal",t.normal),i.toggle("ag-layout-print",t.print)}postConstruct(){this.createManagedBean(new ns(this)),this.setDisplayed(!1,{skipAriaHidden:!0}),this.overlayService.registerOverlayWrapperComp(this)}setWrapperTypeClass(e){let t=this.eOverlayWrapper.classList;this.activeOverlayWrapperCssClass&&t.toggle(this.activeOverlayWrapperCssClass,!1),this.activeOverlayWrapperCssClass=e,t.toggle(e,!0)}showOverlay(e,t,i){this.inProgress||(this.setWrapperTypeClass(t),this.destroyActiveOverlay(),this.inProgress=!0,e&&e.then(e=>{this.inProgress=!1,this.eOverlayWrapper.appendChild(e.getGui()),this.activeOverlay=e,this.updateListenerDestroyFunc=i,this.destroyRequested&&(this.destroyRequested=!1,this.destroyActiveOverlay())}),this.setDisplayed(!0,{skipAriaHidden:!0}))}destroyActiveOverlay(){var e;if(this.inProgress){this.destroyRequested=!0;return}this.activeOverlay&&(this.activeOverlay=this.getContext().destroyBean(this.activeOverlay),null==(e=this.updateListenerDestroyFunc)||e.call(this),sd(this.eOverlayWrapper))}hideOverlay(){this.destroyActiveOverlay(),this.setDisplayed(!1,{skipAriaHidden:!0})}destroy(){this.destroyActiveOverlay(),super.destroy()}};aO.TEMPLATE=`
248        <div class="ag-overlay" role="presentation">
249            <div class="ag-overlay-panel" role="presentation">
250                <div class="ag-overlay-wrapper" ref="eOverlayWrapper" role="presentation"></div>
251            </div>
252        </div>`,K([eB("overlayService")],aO.prototype,"overlayService",2),K([ot("eOverlayWrapper")],aO.prototype,"eOverlayWrapper",2),K([eV],aO.prototype,"postConstruct",1);var ax=class extends tR{getFirstRow(){let e,t=0;return this.pinnedRowModel.getPinnedTopRowCount()?e="top":this.rowModel.getRowCount()?(e=null,t=this.paginationProxy.getPageFirstRow()):this.pinnedRowModel.getPinnedBottomRowCount()&&(e="bottom"),void 0===e?null:{rowIndex:t,rowPinned:e}}
252getLastRow(){let e;let t=null,i=this.pinnedRowModel.getPinnedBottomRowCount(),s=this.pinnedRowModel.getPinnedTopRowCount();return i?(t="bottom",e=i-1):this.rowModel.getRowCount()?(t=null,e=this.paginationProxy.getPageLastRow()):s&&(t="top",e=s-1),void 0===e?null:{rowIndex:e,rowPinned:t}}getRowNode(e){switch(e.rowPinned){case"top":return this.pinnedRowModel.getPinnedTopRowData()[e.rowIndex];case"bottom":return this.pinnedRowModel.getPinnedBottomRowData()[e.rowIndex];default:return this.rowModel.getRow(e.rowIndex)}}sameRow(e,t){return!e&&!t||(!e||!!t)&&(!!e||!t)&&e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned}before(e,t){switch(e.rowPinned){case"top":if("top"!==t.rowPinned)return!0;break;case"bottom":if("bottom"!==t.rowPinned)return!1;break;default:if(q(t.rowPinned))return"top"!==t.rowPinned}return e.rowIndex<t.rowIndex}};K([eB("rowModel")],ax.prototype,"rowModel",2),K([eB("pinnedRowModel")],ax.prototype,"pinnedRowModel",2),K([eB("paginationProxy")],ax.prototype,"paginationProxy",2),ax=K([ek("rowPositionUtils")],ax);var a_=class extends tR{createId(e){let{rowIndex:t,rowPinned:i,column:s}=e;return this.createIdFromValues({rowIndex:t,column:s,rowPinned:i})}createIdFromValues(e){let{rowIndex:t,rowPinned:i,column:s}=e;return`${t}.${null==i?"null":i}.${s.getId()}`}equals(e,t){let i=e.column===t.column,s=e.rowPinned===t.rowPinned,o=e.rowIndex===t.rowIndex;return i&&s&&o}};a_=K([ek("cellPositionUtils")],a_);var aV=class{constructor(e){this.cellValueChanges=e}},aH=class extends aV{constructor(e,t,i,s){super(e),this.initialRange=t,this.finalRange=i,this.ranges=s}},ak=class e{constructor(t){this.actionStack=[],this.maxStackSize=t||e.DEFAULT_STACK_SIZE,this.actionStack=Array(this.maxStackSize)}pop(){return this.actionStack.pop()}push(e){e.cellValueChanges&&e.cellValueChanges.length>0&&(this.actionStack.length===this.maxStackSize&&this.actionStack.shift(),this.actionStack.push(e))}clear(){this.actionStack=[]}getCurrentStackSize(){return this.actionStack.length}};ak.DEFAULT_STACK_SIZE=10;var aB=class extends tR{constructor(){super(...arguments),this.cellValueChanges=[],this.activeCellEdit=null,this.activeRowEdit=null,this.isPasting=!1,this.isRangeInAction=!1,this.onCellValueChanged=e=>{let t={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned},i=null!==this.activeCellEdit&&this.cellPositionUtils.equals(this.activeCellEdit,t),s=null!==this.activeRowEdit&&this.rowPositionUtils.sameRow(this.activeRowEdit,t);if(!(i||s||this.isPasting||this.isRangeInAction))return;let{rowPinned:o,rowIndex:r,column:n,oldValue:l,value:a}=e,h={rowPinned:o,rowIndex:r,columnId:n.getColId(),newValue:a,oldValue:l};this.cellValueChanges.push(h)},this.clearStacks=()=>{this.undoStack.clear(),this.redoStack.clear()}}init(){if(!this.gos.get("undoRedoCellEditing"))return;let e=this.gos.get("undoRedoCellEditingLimit");e<=0||(this.undoStack=new ak(e),this.redoStack=new ak(e),this.addRowEditingListeners(),this.addCellEditingListeners(),this.addPasteListeners(),this.addFillListeners(),this.addCellKeyListeners(),this.addManagedListener(this.eventService,tP.EVENT_CELL_VALUE_CHANGED,this.onCellValueChanged),this.addManagedListener(this.eventService,tP.EVENT_MODEL_UPDATED,e=>{e.keepUndoRedoStack||this.clearStacks()}),this.addManagedListener(this.eventService,tP.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.clearStacks),this.addManagedListener(this.eventService,tP.EVENT_NEW_COLUMNS_LOADED,this.clearStacks),this.addManagedListener(this.eventService,tP.EVENT_COLUMN_GROUP_OPENED,this.clearStacks),this.addManagedListener(this.eventService,tP.EVENT_COLUMN_ROW_GROUP_CHANGED,this.clearStacks),this.addManagedListener(this.eventService,tP.EVENT_COLUMN_MOVED,this.clearStacks),this.addManagedListener(this.eventService,tP.EVENT_COLUMN_PINNED,this.clearStacks),this.addManagedListener(this.eventService,tP.EVENT_COLUMN_VISIBLE,this.clearStacks),this.addManagedListener(this.eventService,tP.EVENT_ROW_DRAG_END,this.clearStacks),this.ctrlsService.whenReady(e=>{this.gridBodyCtrl=e.gridBodyCtrl}))}getCurrentUndoStackSize(){return this.undoStack?this.undoStack.getCurrentStackSize():0}getCurrentRedoStackSize(){return this.redoStack?this.redoStack.getCurrentStackSize():0}undo(e){let t={type:tP.EVENT_UNDO_STARTED,source:e};this.eventService.dispatchEvent(t);let i=this.undoRedo(this.undoStack,this.redoStack,"initialRange","oldValue","undo"),s={type:tP.EVENT_UNDO_ENDED,source:e,operationPerformed:i};this.eventService.dispatchEvent(s)}redo(e){let t={type:tP.EVENT_REDO_STARTED,source:e};this.eventService.dispatchEvent(t);let i=this.undoRedo(this.redoStack,this.undoStack,"finalRange","newValue","redo"),s={type:tP.EVENT_REDO_ENDED,source:e,operationPerformed:i};this.eventService.dispatchEvent(s)}undoRedo(e,t,i,s,o){if(!e)return!1;let r=e.pop();return!!r&&!!r.cellValueChanges&&(this.processAction(r,e=>e[s],o),r instanceof aH?this.processRange(this.rangeService,r.ranges||[r[i]]):this.processCell(r.cellValueChanges),t.push(r),!0)}
252processAction(e,t,i){e.cellValueChanges.forEach(e=>{let{rowIndex:s,rowPinned:o,columnId:r}=e,n=this.rowPositionUtils.getRowNode({rowIndex:s,rowPinned:o});n.displayed&&n.setDataValue(r,t(e),i)})}processRange(e,t){let i;e.removeAllCellRanges(!0),t.forEach((s,o)=>{if(!s)return;let r=s.startRow,n=s.endRow;o===t.length-1&&(i={rowPinned:r.rowPinned,rowIndex:r.rowIndex,columnId:s.startColumn.getColId()},this.setLastFocusedCell(i));let l={rowStartIndex:r.rowIndex,rowStartPinned:r.rowPinned,rowEndIndex:n.rowIndex,rowEndPinned:n.rowPinned,columnStart:s.startColumn,columns:s.columns};e.addCellRange(l)})}processCell(e){let t=e[0],{rowIndex:i,rowPinned:s}=t,o=this.rowPositionUtils.getRowNode({rowIndex:i,rowPinned:s}),r={rowPinned:t.rowPinned,rowIndex:o.rowIndex,columnId:t.columnId};this.setLastFocusedCell(r,this.rangeService)}setLastFocusedCell(e,t){let{rowIndex:i,columnId:s,rowPinned:o}=e,r=this.gridBodyCtrl.getScrollFeature(),n=this.columnModel.getGridColumn(s);if(!n)return;r.ensureIndexVisible(i),r.ensureColumnVisible(n);let l={rowIndex:i,column:n,rowPinned:o};this.focusService.setFocusedCell(W(B({},l),{forceBrowserFocus:!0})),null==t||t.setRangeToCell(l)}addRowEditingListeners(){this.addManagedListener(this.eventService,tP.EVENT_ROW_EDITING_STARTED,e=>{this.activeRowEdit={rowIndex:e.rowIndex,rowPinned:e.rowPinned}}),this.addManagedListener(this.eventService,tP.EVENT_ROW_EDITING_STOPPED,()=>{let e=new aV(this.cellValueChanges);this.pushActionsToUndoStack(e),this.activeRowEdit=null})}addCellEditingListeners(){this.addManagedListener(this.eventService,tP.EVENT_CELL_EDITING_STARTED,e=>{this.activeCellEdit={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned}}),this.addManagedListener(this.eventService,tP.EVENT_CELL_EDITING_STOPPED,e=>{if(this.activeCellEdit=null,e.valueChanged&&!this.activeRowEdit&&!this.isPasting&&!this.isRangeInAction){let e=new aV(this.cellValueChanges);this.pushActionsToUndoStack(e)}})}addPasteListeners(){this.addManagedListener(this.eventService,tP.EVENT_PASTE_START,()=>{this.isPasting=!0}),this.addManagedListener(this.eventService,tP.EVENT_PASTE_END,()=>{let e=new aV(this.cellValueChanges);this.pushActionsToUndoStack(e),this.isPasting=!1})}addFillListeners(){this.addManagedListener(this.eventService,tP.EVENT_FILL_START,()=>{this.isRangeInAction=!0}),this.addManagedListener(this.eventService,tP.EVENT_FILL_END,e=>{let t=new aH(this.cellValueChanges,e.initialRange,e.finalRange);this.pushActionsToUndoStack(t),this.isRangeInAction=!1})}addCellKeyListeners(){this.addManagedListener(this.eventService,tP.EVENT_KEY_SHORTCUT_CHANGED_CELL_START,()=>{this.isRangeInAction=!0}),this.addManagedListener(this.eventService,tP.EVENT_KEY_SHORTCUT_CHANGED_CELL_END,()=>{let e;e=this.rangeService&&this.gos.get("enableRangeSelection")?new aH(this.cellValueChanges,void 0,void 0,[...this.rangeService.getCellRanges()]):new aV(this.cellValueChanges),this.pushActionsToUndoStack(e),this.isRangeInAction=!1})}pushActionsToUndoStack(e){this.undoStack.push(e),this.cellValueChanges=[],this.redoStack.clear()}};K([eB("focusService")],aB.prototype,"focusService",2),K([eB("ctrlsService")],aB.prototype,"ctrlsService",2),K([eB("cellPositionUtils")],aB.prototype,"cellPositionUtils",2),K([eB("rowPositionUtils")],aB.prototype,"rowPositionUtils",2),K([eB("columnModel")],aB.prototype,"columnModel",2),K([eW("rangeService")],aB.prototype,"rangeService",2),K([eV],aB.prototype,"init",1),aB=K([ek("undoRedoService")],aB);var aW=class extends tR{findHeader(e,t){let i,s;if(e.column instanceof tA?i=this.columnModel.getDisplayedGroupAtDirection(e.column,t):(s=`getDisplayedCol${t}`,i=this.columnModel[s](e.column)),!i)return;let{headerRowIndex:o}=e;if("filter"!==this.getHeaderRowType(o)){let e=[i];for(;i.getParent();)e.push(i=i.getParent());i=e[e.length-1-o]}let{column:r,headerRowIndex:n}=this.getHeaderIndexToFocus(i,o);return{column:r,headerRowIndex:n}}getHeaderIndexToFocus(e,t){let i;if(e instanceof tA&&this.isAnyChildSpanningHeaderHeight(e)&&e.isPadding()){let s=i=e.getLeafColumns()[0];for(;s!==e;)t++,s=s.getParent()}return{column:i||e,headerRowIndex:t}}isAnyChildSpanningHeaderHeight(e){return!!e&&e.getLeafColumns().some(e=>e.isSpanHeaderHeight())}getColumnVisibleParent(e,t){let i=this.getHeaderRowType(t),s="filter"===i?e:e.getParent(),o=t-1,r=o;if("column"===i&&this.isAnyChildSpanningHeaderHeight(e.getParent())){for(;s&&s.isPadding();)s=s.getParent(),o--;r=o,o<0&&(s=e,o=t,r=void 0)}return{column:s,headerRowIndex:o,headerRowIndexWithoutSpan:r}}getColumnVisibleChild(e,t,i="After"){let s=this.getHeaderRowType(t),o=e,r=t+1,n=r;if("group"===s){let t=e.getDisplayedLeafColumns(),s="After"===i?t[0]:e5(t),n=[],l=s;for(;l.getParent()!==e;)l=l.getParent(),n.push(l);if(o=s,s.isSpanHeaderHeight())for(let e=n.length-1;e>=0;e--){let t=n[e];if(!t.isPadding()){o=t;break}r++}else(o=e5(n))||(o=s)}return{column:o,headerRowIndex:r,headerRowIndexWithoutSpan:n}}getHeaderRowType(e){let t=this.ctrlsService.getHeaderRowContainerCtrl();if(t)return t.getRowType(e)}findColAtEdgeForHeaderRow(e,t){let i=this.columnModel.getAllDisplayedColumns(),s=i["start"===t?0:i.length-1];if(!s)return;let o=this.ctrlsService.getHeaderRowContainerCtrl(s.getPinned()).getRowType(e);if("group"==o){let t=this.columnModel.getColumnGroupAtLevel(s,e);return{headerRowIndex:e,column:t}}return{headerRowIndex:null==o?-1:e,column:s}}};K([eB("columnModel")],aW.prototype,"columnModel",2),K([eB("ctrlsService")],aW.prototype,"ctrlsService",2),aW=K([ek("headerPositionUtils")],aW);var aU=class{buildColumnDefs(e,t,i){let s=[],o={};
252return e.forEach(e=>{let r=this.createDefFromColumn(e,t,i),n=!0,l=r,a=e.getOriginalParent(),h=null;for(;a;){let e=null;if(a.isPadding()){a=a.getOriginalParent();continue}let t=o[a.getGroupId()];if(t){t.children.push(l),n=!1;break}if((e=this.createDefFromGroup(a))&&(e.children=[l],o[e.groupId]=e,l=e,a=a.getOriginalParent()),null!=a&&h===a){n=!1;break}h=a}n&&s.push(l)}),s}createDefFromGroup(e){let t=ed(e.getColGroupDef(),["children"]);return t&&(t.groupId=e.getGroupId()),t}createDefFromColumn(e,t,i){let s=ed(e.getColDef());return s.colId=e.getColId(),s.width=e.getActualWidth(),s.rowGroup=e.isRowGroupActive(),s.rowGroupIndex=e.isRowGroupActive()?t.indexOf(e):null,s.pivot=e.isPivotActive(),s.pivotIndex=e.isPivotActive()?i.indexOf(e):null,s.aggFunc=e.isValueActive()?e.getAggFunc():null,s.hide=!e.isVisible()||void 0,s.pinned=e.isPinned()?e.getPinned():null,s.sort=e.getSort()?e.getSort():null,s.sortIndex=null!=e.getSortIndex()?e.getSortIndex():null,s}};aU=K([ek("columnDefFactory")],aU);var az=class{getInitialRowClasses(e){let t=[];return q(e.extraCssClass)&&t.push(e.extraCssClass),t.push("ag-row"),t.push(e.rowFocused?"ag-row-focus":"ag-row-no-focus"),e.fadeRowIn&&t.push("ag-opacity-zero"),t.push(e.rowIsEven?"ag-row-even":"ag-row-odd"),e.rowNode.isRowPinned()&&t.push("ag-row-pinned"),e.rowNode.isSelected()&&t.push("ag-row-selected"),e.rowNode.footer&&t.push("ag-row-footer"),t.push("ag-row-level-"+e.rowLevel),e.rowNode.stub&&t.push("ag-row-loading"),e.fullWidthRow&&t.push("ag-full-width-row"),e.expandable&&(t.push("ag-row-group"),t.push(e.rowNode.expanded?"ag-row-group-expanded":"ag-row-group-contracted")),e.rowNode.dragging&&t.push("ag-row-dragging"),ta(t,this.processClassesFromGridOptions(e.rowNode)),ta(t,this.preProcessRowClassRules(e.rowNode)),t.push(e.printLayout?"ag-row-position-relative":"ag-row-position-absolute"),e.firstRowOnPage&&t.push("ag-row-first"),e.lastRowOnPage&&t.push("ag-row-last"),e.fullWidthRow&&("left"===e.pinned&&t.push("ag-cell-last-left-pinned"),"right"===e.pinned&&t.push("ag-cell-first-right-pinned")),t}processClassesFromGridOptions(e){let t=[],i=e=>{"string"==typeof e?t.push(e):Array.isArray(e)&&e.forEach(e=>t.push(e))},s=this.gos.get("rowClass");if(s){if("function"==typeof s)return console.warn("AG Grid: rowClass should not be a function, please use getRowClass instead"),[];i(s)}let o=this.gos.getCallback("getRowClass");return o&&i(o({data:e.data,node:e,rowIndex:e.rowIndex})),t}preProcessRowClassRules(e){let t=[];return this.processRowClassRules(e,e=>{t.push(e)},e=>{}),t}processRowClassRules(e,t,i){let s=this.gos.addGridCommonParams({data:e.data,node:e,rowIndex:e.rowIndex});this.stylingService.processClassRules(void 0,this.gos.get("rowClassRules"),s,t,i)}calculateRowLevel(e){return e.group?e.level:e.parent?e.parent.level+1:0}};K([eB("stylingService")],az.prototype,"stylingService",2),K([eB("gridOptionsService")],az.prototype,"gos",2),az=K([ek("rowCssClassCalculator")],az);var aK=class extends tR{init(){this.isAccentedSort=this.gos.get("accentedSort"),this.primaryColumnsSortGroups=this.gos.isColumnsSortingCoupledToGroup(),this.addManagedPropertyListener("accentedSort",e=>this.isAccentedSort=e.currentValue),this.addManagedPropertyListener("autoGroupColumnDef",()=>this.primaryColumnsSortGroups=this.gos.isColumnsSortingCoupledToGroup())}doFullSort(e,t){let i=e.map((e,t)=>({currentPos:t,rowNode:e}));return i.sort(this.compareRowNodes.bind(this,t)),i.map(e=>e.rowNode)}compareRowNodes(e,t,i){let s=t.rowNode,o=i.rowNode;for(let t=0,i=e.length;t<i;t++){let i;let r=e[t],n="desc"===r.sort,l=this.getValue(s,r.column),a=this.getValue(o,r.column),h=this.getComparator(r,s);if(!isNaN(i=h?h(l,a,s,o,n):sJ.defaultComparator(l,a,this.isAccentedSort))&&0!==i)return"asc"===r.sort?i:-1*i}return t.currentPos-i.currentPos}getComparator(e,t){let i=e.column,s=i.getColDef().comparator;if(null!=s)return s;if(!i.getColDef().showRowGroup)return;let o=!t.group&&i.getColDef().field;if(!o)return;let r=this.columnModel.getPrimaryColumn(o);if(r)return r.getColDef().comparator}getValue(e,t){var i,s;if(!this.primaryColumnsSortGroups)return this.valueService.getValue(t,e,!1,!1);if(e.rowGroupColumn===t){if(this.gos.isGroupUseEntireRow(this.columnModel.isPivotActive())){let s=null==(i=e.allLeafChildren)?void 0:i[0];return s?this.valueService.getValue(t,s,!1,!1):void 0}let o=this.columnModel.getGroupDisplayColumnForGroup(t.getId());if(!o)return;return null==(s=e.groupData)?void 0:s[o.getId()]}if(!e.group||!t.getColDef().showRowGroup)return this.valueService.getValue(t,e,!1,!1)}};K([eB("valueService")],aK.prototype,"valueService",2),K([eB("columnModel")],aK.prototype,"columnModel",2),K([eV],aK.prototype,"init",1),aK=K([ek("rowNodeSorter")],aK);var a$=class extends tR{constructor(){super(...arguments),this.params={},this.ready=!1,this.readyCallbacks=[]}checkReady(){let e=this.params;this.ready=null!=e.gridCtrl&&null!=e.gridBodyCtrl&&null!=e.center&&null!=e.left&&null!=e.right&&null!=e.bottomCenter&&null!=e.bottomLeft&&null!=e.bottomRight&&null!=e.topCenter&&null!=e.topLeft&&null!=e.topRight&&null!=e.stickyTopCenter&&null!=e.stickyTopLeft&&null!=e.stickyTopRight&&null!=e.stickyBottomCenter&&null!=e.stickyBottomLeft&&null!=e.stickyBottomRight&&null!=e.centerHeader&&null!=e.leftHeader&&null!=e.rightHeader&&null!=e.fakeHScrollComp&&null!=e.fakeVScrollComp&&null!=e.gridHeaderCtrl,this.ready&&(this.readyCallbacks.forEach(t=>t(e)),this.readyCallbacks.length=0)}whenReady(e){this.ready?e(this.params):this.readyCallbacks.push(e)}register(e,t){this.params[e]=t,this.checkReady()}registerHeaderContainer(e,t){switch(t){case"left":this.params.leftHeader=e;break;case"right":this.params.rightHeader=e;break;default:this.params.centerHeader=e}this.checkReady()}get(e){return this.params[e]}getParams(){return this.params}getGridBodyCtrl(){return this.params.gridBodyCtrl}getHeaderRowContainerCtrls(){return[this.params.leftHeader,this.params.rightHeader,this.params.centerHeader]}getHeaderRowContainerCtrl(e){switch(e){case"left":return this.params.leftHeader;case"right":return this.params.rightHeader;default:return this.params.centerHeader}}};a$.NAME="ctrlsService",a$=K([ek(a$.NAME)],a$);var aY=class extends tR{constructor(){super(...arguments),this.registry={}}register(e){this.registry[e.controllerName]=e.controllerClass}getInstance(e){let t=this.registry[e];if(null!=t)return new t}};aY=K([ek("ctrlsFactory")],aY);var aj=class extends s9{constructor(e,t){super(e),this.direction=t,this.hideTimeout=null}postConstruct(){this.addManagedListener(this.eventService,tP.EVENT_SCROLL_VISIBILITY_CHANGED,this.onScrollVisibilityChanged.bind(this)),this.onScrollVisibilityChanged(),this.addOrRemoveCssClass("ag-apple-scrollbar",iI()||iG())}initialiseInvisibleScrollbar(){void 0===this.invisibleScrollbar&&(this.invisibleScrollbar=iW(),this.invisibleScrollbar&&(this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles())
252)}addActiveListenerToggles(){let e=this.getGui();["mouseenter","mousedown","touchstart"].forEach(t=>this.addManagedListener(e,t,()=>this.addOrRemoveCssClass("ag-scrollbar-active",!0))),["mouseleave","touchend"].forEach(t=>this.addManagedListener(e,t,()=>this.addOrRemoveCssClass("ag-scrollbar-active",!1)))}onScrollVisibilityChanged(){void 0===this.invisibleScrollbar&&this.initialiseInvisibleScrollbar(),this.animationFrameService.requestAnimationFrame(()=>this.setScrollVisible())}hideAndShowInvisibleScrollAsNeeded(){this.addManagedListener(this.eventService,tP.EVENT_BODY_SCROLL,e=>{e.direction===this.direction&&(null!==this.hideTimeout&&(window.clearTimeout(this.hideTimeout),this.hideTimeout=null),this.addOrRemoveCssClass("ag-scrollbar-scrolling",!0))}),this.addManagedListener(this.eventService,tP.EVENT_BODY_SCROLL_END,()=>{this.hideTimeout=window.setTimeout(()=>{this.addOrRemoveCssClass("ag-scrollbar-scrolling",!1),this.hideTimeout=null},400)})}attemptSettingScrollPosition(e){let t=this.getViewport();eL(()=>sp(t),()=>this.setScrollPosition(e),100)}getViewport(){return this.eViewport}getContainer(){return this.eContainer}onScrollCallback(e){this.addManagedListener(this.getViewport(),"scroll",e)}};K([ot("eViewport")],aj.prototype,"eViewport",2),K([ot("eContainer")],aj.prototype,"eContainer",2),K([eB("scrollVisibleService")],aj.prototype,"scrollVisibleService",2),K([eB("ctrlsService")],aj.prototype,"ctrlsService",2),K([eB("animationFrameService")],aj.prototype,"animationFrameService",2);var aq=class e extends aj{constructor(){super(e.TEMPLATE,"horizontal")}postConstruct(){super.postConstruct();let e=this.setFakeHScrollSpacerWidths.bind(this);this.addManagedListener(this.eventService,tP.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,tP.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,e),this.addManagedListener(this.eventService,tP.EVENT_PINNED_ROW_DATA_CHANGED,this.onPinnedRowDataChanged.bind(this)),this.addManagedPropertyListener("domLayout",e),this.ctrlsService.register("fakeHScrollComp",this),this.createManagedBean(new nM(e=>this.eContainer.style.width=`${e}px`)),this.addManagedPropertyListeners(["suppressHorizontalScroll"],this.onScrollVisibilityChanged.bind(this))}initialiseInvisibleScrollbar(){void 0===this.invisibleScrollbar&&(this.enableRtl=this.gos.get("enableRtl"),super.initialiseInvisibleScrollbar(),this.invisibleScrollbar&&this.refreshCompBottom())}onPinnedRowDataChanged(){this.refreshCompBottom()}refreshCompBottom(){if(!this.invisibleScrollbar)return;let e=this.pinnedRowModel.getPinnedBottomTotalHeight();this.getGui().style.bottom=`${e}px`}onScrollVisibilityChanged(){super.onScrollVisibilityChanged(),this.setFakeHScrollSpacerWidths()}setFakeHScrollSpacerWidths(){let e=this.scrollVisibleService.isVerticalScrollShowing(),t=this.columnModel.getDisplayedColumnsRightWidth(),i=!this.enableRtl&&e,s=this.gos.getScrollbarWidth();i&&(t+=s),sy(this.eRightSpacer,t),this.eRightSpacer.classList.toggle("ag-scroller-corner",t<=s);let o=this.columnModel.getDisplayedColumnsLeftWidth();this.enableRtl&&e&&(o+=s),sy(this.eLeftSpacer,o),this.eLeftSpacer.classList.toggle("ag-scroller-corner",o<=s)}setScrollVisible(){let e=this.scrollVisibleService.isHorizontalScrollShowing(),t=this.invisibleScrollbar,i=this.gos.get("suppressHorizontalScroll"),s=e&&this.gos.getScrollbarWidth()||0,o=i?0:0===s&&t?16:s;this.addOrRemoveCssClass("ag-scrollbar-invisible",t),sD(this.getGui(),o),sD(this.eViewport,o),sD(this.eContainer,o),this.setDisplayed(e,{skipAriaHidden:!0})}getScrollPosition(){return sa(this.getViewport(),this.enableRtl)}setScrollPosition(e){sp(this.getViewport())||this.attemptSettingScrollPosition(e),sh(this.getViewport(),e,this.enableRtl)}};aq.TEMPLATE=`<div class="ag-body-horizontal-scroll" aria-hidden="true">
253            <div class="ag-horizontal-left-spacer" ref="eLeftSpacer"></div>
254            <div class="ag-body-horizontal-scroll-viewport" ref="eViewport">
255                <div class="ag-body-horizontal-scroll-container" ref="eContainer"></div>
256            </div>
257            <div class="ag-horizontal-right-spacer" ref="eRightSpacer"></div>
258        </div>`,K([ot("eLeftSpacer")],aq.prototype,"eLeftSpacer",2),K([ot("eRightSpacer")],aq.prototype,"eRightSpacer",2),K([eB("columnModel")],aq.prototype,"columnModel",2),K([eB("pinnedRowModel")],aq.prototype,"pinnedRowModel",2),K([eV],aq.prototype,"postConstruct",1);var aQ=class extends tR{postConstruct(){let e=this.checkContainerWidths.bind(this);this.addManagedListener(this.eventService,tP.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,tP.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,e),this.addManagedPropertyListener("domLayout",e)}checkContainerWidths(){let e=this.gos.isDomLayout("print"),t=e?0:this.columnModel.getDisplayedColumnsLeftWidth(),i=e?0:this.columnModel.getDisplayedColumnsRightWidth();t!=this.leftWidth&&(this.leftWidth=t,this.eventService.dispatchEvent({type:tP.EVENT_LEFT_PINNED_WIDTH_CHANGED})),i!=this.rightWidth&&(this.rightWidth=i,this.eventService.dispatchEvent({type:tP.EVENT_RIGHT_PINNED_WIDTH_CHANGED}))}getPinnedRightWidth(){return this.rightWidth}getPinnedLeftWidth(){return this.leftWidth}};K([eB("columnModel")],aQ.prototype,"columnModel",2),K([eV],aQ.prototype,"postConstruct",1),aQ=K([ek("pinnedWidthService")],aQ);var aX=class extends tR{constructor(){super(...arguments),this.events=[]}postConstruct(){"clientSide"==this.rowModel.getType()&&(this.clientSideRowModel=this.rowModel)}
258dispatchExpanded(e,t){if(null==this.clientSideRowModel){this.eventService.dispatchEvent(e);return}this.events.push(e);let i=()=>{this.clientSideRowModel&&this.clientSideRowModel.onRowGroupOpened(),this.events.forEach(e=>this.eventService.dispatchEvent(e)),this.events=[]};t?i():(null==this.dispatchExpandedDebounced&&(this.dispatchExpandedDebounced=this.animationFrameService.debounce(i)),this.dispatchExpandedDebounced())}};K([eB("animationFrameService")],aX.prototype,"animationFrameService",2),K([eB("rowModel")],aX.prototype,"rowModel",2),K([eV],aX.prototype,"postConstruct",1),aX=K([ek("rowNodeEventThrottle")],aX);var aJ=(e,t)=>{var i;return(null!=(i=t.rowModelType)?i:"clientSide")==="clientSide"?{module:"@ag-grid-enterprise/row-grouping"}:null},aZ={objectName:"colDef",allProperties:["headerName","columnGroupShow","headerClass","toolPanelClass","headerValueGetter","pivotKeys","groupId","colId","sort","initialSort","field","type","cellDataType","tooltipComponent","tooltipField","headerTooltip","cellClass","showRowGroup","filter","initialAggFunc","defaultAggFunc","aggFunc","pinned","initialPinned","chartDataType","cellAriaRole","cellEditorPopupPosition","headerGroupComponent","headerGroupComponentParams","cellStyle","cellRenderer","cellRendererParams","cellEditor","cellEditorParams","filterParams","pivotValueColumn","headerComponent","headerComponentParams","floatingFilterComponent","floatingFilterComponentParams","tooltipComponentParams","refData","columnsMenuParams","columnChooserParams","children","sortingOrder","allowedAggFuncs","menuTabs","pivotTotalColumnIds","cellClassRules","icons","sortIndex","initialSortIndex","flex","initialFlex","width","initialWidth","minWidth","maxWidth","rowGroupIndex","initialRowGroupIndex","pivotIndex","initialPivotIndex","suppressCellFlash","suppressColumnsToolPanel","suppressFiltersToolPanel","openByDefault","marryChildren","suppressStickyLabel","hide","initialHide","rowGroup","initialRowGroup","pivot","initialPivot","checkboxSelection","showDisabledCheckboxes","headerCheckboxSelection","headerCheckboxSelectionFilteredOnly","headerCheckboxSelectionCurrentPageOnly","suppressMenu","suppressHeaderMenuButton","suppressMovable","lockPosition","lockVisible","lockPinned","unSortIcon","suppressSizeToFit","suppressAutoSize","enableRowGroup","enablePivot","enableValue","editable","suppressPaste","suppressNavigable","enableCellChangeFlash","rowDrag","dndSource","autoHeight","wrapText","sortable","resizable","singleClickEdit","floatingFilter","cellEditorPopup","suppressFillHandle","wrapHeaderText","autoHeaderHeight","dndSourceOnRowDrag","valueGetter","valueSetter","filterValueGetter","keyCreator","valueFormatter","valueParser","comparator","equals","pivotComparator","suppressKeyboardEvent","suppressHeaderKeyboardEvent","colSpan","rowSpan","getQuickFilterText","onCellValueChanged","onCellClicked","onCellDoubleClicked","onCellContextMenu","rowDragText","tooltipValueGetter","cellRendererSelector","cellEditorSelector","suppressSpanHeaderHeight","useValueFormatterForExport","useValueParserForImport","mainMenuItems","contextMenuItems","suppressFloatingFilterButton","suppressHeaderFilterButton","suppressHeaderContextMenu","loadingCellRenderer","loadingCellRendererParams","loadingCellRendererSelector"],docsUrl:"column-properties/",deprecations:{columnsMenuParams:{version:"31.1",message:"Use `columnChooserParams` instead."},suppressMenu:{version:"31.1",message:"Use `suppressHeaderMenuButton` instead."},suppressCellFlash:{version:"31.2",message:"Use `enableCellChangeFlash={false}` in the ColDef"},dndSource:{version:"31.2",message:"This feature has been replaced by `Row Dragging to an External DropZone`."},dndSourceOnRowDrag:{version:"31.2",message:"This feature has been replaced by `Row Dragging to an External DropZone`."}},validations:{enableRowGroup:aJ,rowGroup:aJ,rowGroupIndex:aJ,enablePivot:aJ,enableValue:aJ,pivot:aJ,pivotIndex:aJ,aggFunc:aJ,cellEditor:e=>"agRichSelect"===e.cellEditor||"agRichSelectCellEditor"===e.cellEditor?{module:"@ag-grid-enterprise/rich-select"}:null,menuTabs:e=>{var t;let i=["columnsMenuTab","generalMenuTab"];return(null==(t=e.menuTabs)?void 0:t.some(e=>i.includes(e)))?{module:"@ag-grid-enterprise/menu"}:null},columnsMenuParams:{module:["@ag-grid-enterprise/menu","@ag-grid-enterprise/column-tool-panel"]},columnChooserParams:{module:["@ag-grid-enterprise/menu","@ag-grid-enterprise/column-tool-panel"]},headerCheckboxSelection:{supportedRowModels:["clientSide","serverSide"],dependencies:(e,{rowSelection:t})=>"multiple"===t?null:"headerCheckboxSelection is only supported with rowSelection=multiple"},headerCheckboxSelectionFilteredOnly:{supportedRowModels:["clientSide"],dependencies:(e,{rowSelection:t})=>"multiple"===t?null:"headerCheckboxSelectionFilteredOnly is only supported with rowSelection=multiple"},headerCheckboxSelectionCurrentPageOnly:{supportedRowModels:["clientSide"],dependencies:(e,{rowSelection:t})=>"multiple"===t?null:"headerCheckboxSelectionCurrentPageOnly is only supported with rowSelection=multiple"},children:()=>aZ}},a0={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!1,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipHideDelay:1e4,tooltipMouseTrack:!1,tooltipShowMode:"standard",tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:"	",suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!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,suppressChartToolPanelsButton:!1,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,rowBuffer:10,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,suppressAsyncEvents:!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,enableCellChangeFlash:!1,cellFlashDelay:500,cellFlashDuration:500,cellFadeDelay:1e3,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:"normal",ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:"singleColumn",groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!1,groupIncludeTotalFooter:!1,groupSuppressBlankHeader:!1,groupSelectsFiltered:!1,showOpenedGroup:!1,groupRemoveSingleChildren:!1,groupRemoveLowestSingleChildren:!1,groupHideOpenParents:!1,groupAllowUnbalanced:!1,rowGroupPanelShow:"never",suppressMakeColumnVisibleAfterUnGroup:!1,treeData:!1,rowGroupPanelSuppressSort:!1,suppressGroupRowsSticky:!1,rowModelType:"clientSide",asyncTransactionWaitMillis:50,suppressModelUpdateAfterUpdateTransaction:!1,cacheOverflowSize:1,infiniteInitialRowCount:1,serverSideInitialRowCount:1,suppressServerSideInfiniteScroll:!1,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!1,serverSideSortOnServer:!1,serverSideFilterOnServer:!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,suppressGroupMaintainValueType:!1,functionsPassive:!1,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1},a1={objectName:"gridOptions",allProperties:[...tX.ALL_PROPERTIES,...tZ.EVENT_CALLBACKS],propertyExceptions:["api","columnApi"],docsUrl:"grid-options/",deprecations:{enableChartToolPanelsButton:{version:"29"},functionsPassive:{version:"29.2"},onColumnRowGroupChangeRequest:{version:"29.2"},onColumnPivotChangeRequest:{version:"29.2"},onColumnValueChangeRequest:{version:"29.2"}
258,onColumnAggFuncChangeRequest:{version:"29.2"},serverSideFilterAllLevels:{version:"30",message:"All server-side group levels are now filtered by default. This can be toggled using `serverSideOnlyRefreshFilteredGroups`."},suppressAggAtRootLevel:{version:"30",message:"The root level aggregation is now suppressed by default. This can be toggled using  `alwaysAggregateAtRootLevel`."},excludeHiddenColumnsFromQuickFilter:{version:"30",message:"Hidden columns are now excluded from the Quick Filter by default. This can be toggled using `includeHiddenColumnsInQuickFilter`."},enterMovesDown:{version:"30",renamed:"enterNavigatesVertically"},enterMovesDownAfterEdit:{version:"30",renamed:"enterNavigatesVerticallyAfterEdit"},suppressParentsInRowNodes:{version:"30.2",message:"Using suppressParentsInRowNodes is no longer recommended. To serialize nodes it is now recommended to instead remove the parent node reference before serialization."},advancedFilterModel:{version:"31",message:"Use `initialState.filter.advancedFilterModel` instead."},suppressAsyncEvents:{version:"31",message:"Events should be handled asynchronously."},cellFadeDelay:{version:"31.1",renamed:"cellFadeDuration"},cellFlashDelay:{version:"31.1",renamed:"cellFlashDuration"},suppressServerSideInfiniteScroll:{version:"31.1"},serverSideSortOnServer:{version:"31.1"},serverSideFilterOnServer:{version:"31.1"},enableCellChangeFlash:{version:"31.2",message:"Use `enableCellChangeFlash` in the `ColDef` or `defaultColDef` for all columns."},groupIncludeFooter:{version:"31.3",message:"Use `groupTotalRow` instead."},groupIncludeTotalFooter:{version:"31.3",message:"Use `grandTotalRow` instead."}},validations:{sideBar:{module:"@ag-grid-enterprise/side-bar"},statusBar:{module:"@ag-grid-enterprise/status-bar"},enableCharts:{module:"@ag-grid-enterprise/charts"},getMainMenuItems:{module:"@ag-grid-enterprise/menu"},getContextMenuItems:{module:"@ag-grid-enterprise/menu"},allowContextMenuWithControlKey:{module:"@ag-grid-enterprise/menu"},enableAdvancedFilter:{module:"@ag-grid-enterprise/advanced-filter"},treeData:{supportedRowModels:["clientSide","serverSide"],module:"@ag-grid-enterprise/row-grouping",dependencies:e=>{var t;let i=null!=(t=e.rowModelType)?t:"clientSide";switch(i){case"clientSide":let s=`treeData requires 'getDataPath' in the ${i} row model.`;return e.getDataPath?null:s;case"serverSide":let o=`treeData requires 'isServerSideGroup' and 'getServerSideGroupKey' in the ${i} row model.`;return e.isServerSideGroup&&e.getServerSideGroupKey?null:o}return null}},masterDetail:{module:"@ag-grid-enterprise/master-detail"},enableRangeSelection:{module:"@ag-grid-enterprise/range-selection"},enableRangeHandle:{dependencies:{enableRangeSelection:[!0]}},enableFillHandle:{dependencies:{enableRangeSelection:[!0]}},groupDefaultExpanded:{supportedRowModels:["clientSide"]},groupIncludeFooter:{supportedRowModels:["clientSide","serverSide"],dependencies:e=>{var t;switch(null!=(t=e.rowModelType)?t:"clientSide"){case"clientSide":break;case"serverSide":return e.suppressServerSideInfiniteScroll?"groupIncludeFooter is not supported alongside suppressServerSideInfiniteScroll":null}return null}},groupIncludeTotalFooter:{supportedRowModels:["clientSide"]},groupRemoveSingleChildren:{dependencies:{groupHideOpenParents:[void 0,!1],groupRemoveLowestSingleChildren:[void 0,!1]}},groupRemoveLowestSingleChildren:{dependencies:{groupHideOpenParents:[void 0,!1],groupRemoveSingleChildren:[void 0,!1]}},groupSelectsChildren:{dependencies:{rowSelection:["multiple"]}},suppressParentsInRowNodes:{dependencies:{groupSelectsChildren:[void 0,!1]}},viewportDatasource:{supportedRowModels:["viewport"],module:"@ag-grid-enterprise/viewport-row-model"},serverSideDatasource:{supportedRowModels:["serverSide"],module:"@ag-grid-enterprise/server-side-row-model"},cacheBlockSize:{supportedRowModels:["serverSide","infinite"]},datasource:{supportedRowModels:["infinite"],module:"@ag-grid-community/infinite-row-model"},rowData:{supportedRowModels:["clientSide"],module:"@ag-grid-community/client-side-row-model"},columnDefs:()=>aZ,defaultColDef:()=>aZ,defaultColGroupDef:()=>aZ,autoGroupColumnDef:()=>aZ}},a2=class{constructor(){this.destroyed=!1,this.domDataKey="__AG_"+Math.random().toString(),this.propertyEventService=new e$,this.globalEventHandlerFactory=e=>(t,i)=>{if(this.destroyed)return;let s=tF.has(t);if(s&&!e||!s&&e)return;let o=tZ.getCallbackForEvent(t),r=this.gridOptions[o];"function"==typeof r&&this.frameworkOverrides.wrapOutgoing(()=>{r(i)})}}get context(){return this.gridOptions.context}init(){this.columnApi=new ap(this.api);let e=!this.get("suppressAsyncEvents");this.eventService.addGlobalListener(this.globalEventHandlerFactory().bind(this),e),this.eventService.addGlobalListener(this.globalEventHandlerFactory(!0).bind(this),!1),this.propertyEventService.setFrameworkOverrides(this.frameworkOverrides),this.get
258ScrollbarWidth()}destroy(){this.destroyed=!0,this.columnApi=void 0}get(e){var t;return null!=(t=this.gridOptions[e])?t:a0[e]}getCallback(e){return this.mergeGridCommonParams(this.gridOptions[e])}exists(e){return q(this.gridOptions[e])}mergeGridCommonParams(e){return e?t=>(t.api=this.api,t.columnApi=this.columnApi,t.context=this.context,e(t)):e}static toBoolean(e){return"boolean"==typeof e?e:"string"==typeof e&&("TRUE"===e.toUpperCase()||""==e)}static toNumber(e){if("number"==typeof e)return e;if("string"==typeof e){let t=parseInt(e);if(isNaN(t))return;return t}}static toConstrainedNum(e,t){return i=>{let s=a2.toNumber(i);if(null!=s&&!(s<e)&&!(s>t))return s}}static getCoercedValue(e,t){let i=a2.PROPERTY_COERCIONS.get(e);return i?i(t):t}static getCoercedGridOptions(e){let t={};return Object.entries(e).forEach(([e,i])=>{let s=a2.getCoercedValue(e,i);t[e]=s}),t}updateGridOptions({options:e,force:t,source:i="api"}){let s={id:a2.changeSetId++,properties:[]},o=[];Object.entries(e).forEach(([e,r])=>{"api"===i&&tq[e]&&ew(`${e} is an initial property and cannot be updated.`);let n=a2.getCoercedValue(e,r),l=t||"object"==typeof n&&"api"===i,a=this.gridOptions[e];(l||a!==n)&&(this.gridOptions[e]=n,o.push({type:e,currentValue:n,previousValue:a,changeSet:s,source:i}))}),this.validationService.processGridOptions(this.gridOptions),s.properties=o.map(e=>e.type),o.forEach(e=>{this.gridOptions.debug&&console.log(`AG Grid: Updated property ${e.type} from `,e.previousValue," to  ",e.currentValue),this.propertyEventService.dispatchEvent(e)})}addEventListener(e,t){this.propertyEventService.addEventListener(e,t)}removeEventListener(e,t){this.propertyEventService.removeEventListener(e,t)}getScrollbarWidth(){if(null==this.scrollbarWidth){let e="number"==typeof this.gridOptions.scrollbarWidth&&this.gridOptions.scrollbarWidth>=0?this.gridOptions.scrollbarWidth:ik();null!=e&&(this.scrollbarWidth=e,this.eventService.dispatchEvent({type:tP.EVENT_SCROLLBAR_WIDTH_CHANGED}))}return this.scrollbarWidth}isRowModelType(e){return this.gridOptions.rowModelType===e||"clientSide"===e&&Q(this.gridOptions.rowModelType)}isDomLayout(e){var t;return(null!=(t=this.gridOptions.domLayout)?t:"normal")===e}isRowSelection(){return"single"===this.gridOptions.rowSelection||"multiple"===this.gridOptions.rowSelection}useAsyncEvents(){return!this.get("suppressAsyncEvents")}isGetRowHeightFunction(){return"function"==typeof this.gridOptions.getRowHeight}getRowHeightForNode(e,t=!1,i){if(null==i&&(i=this.environment.getDefaultRowHeight()),this.isGetRowHeightFunction()){if(t)return{height:i,estimated:!0};let s={node:e,data:e.data},o=this.getCallback("getRowHeight")(s);if(this.isNumeric(o))return 0===o&&ew("The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead."),{height:Math.max(1,o),estimated:!1}}return e.detail&&this.get("masterDetail")?this.getMasterDetailRowHeight():{height:this.gridOptions.rowHeight&&this.isNumeric(this.gridOptions.rowHeight)?this.gridOptions.rowHeight:i,estimated:!1}}getMasterDetailRowHeight(){return this.get("detailRowAutoHeight")?{height:1,estimated:!1}:this.isNumeric(this.gridOptions.detailRowHeight)?{height:this.gridOptions.detailRowHeight,estimated:!1}:{height:300,estimated:!1}}getRowHeightAsNumber(){if(!this.gridOptions.rowHeight||Q(this.gridOptions.rowHeight))return this.environment.getDefaultRowHeight();let e=this.environment.refreshRowHeightVariable();return -1!==e?e:(console.warn("AG Grid row height must be a number if not using standard row model"),this.environment.getDefaultRowHeight())}isNumeric(e){return!isNaN(e)&&"number"==typeof e&&isFinite(e)}getDomDataKey(){return this.domDataKey}getDomData(e,t){let i=e[this.getDomDataKey()];return i?i[t]:void 0}setDomData(e,t,i){let s=this.getDomDataKey(),o=e[s];Q(o)&&(o={},e[s]=o),o[t]=i}getDocument(){let e=null;return(this.gridOptions.getDocument&&q(this.gridOptions.getDocument)?e=this.gridOptions.getDocument():this.eGridDiv&&(e=this.eGridDiv.ownerDocument),e&&q(e))?e:document}getWindow(){return this.getDocument().defaultView||window}getRootNode(){return this.eGridDiv.getRootNode()}getActiveDomElement(){return this.getRootNode().activeElement}getAsyncTransactionWaitMillis(){return q(this.gridOptions.asyncTransactionWaitMillis)?this.gridOptions.asyncTransactionWaitMillis:50}isAnimateRows(){return!this.get("ensureDomOrder")&&this.get("animateRows")}isGroupRowsSticky(){return!(this.get("paginateChildRows")||this.get("groupHideOpenParents")||this.isDomLayout("print"))}isColumnsSortingCoupledToGroup(){let e=this.gridOptions.autoGroupColumnDef;return!(null==e?void 0:e.comparator)&&!this.get("treeData")}getGroupAggFiltering(){let e=this.gridOptions.groupAggFiltering;return"function"==typeof e?this.getCallback("groupAggFiltering"):!0===e?()=>!0:void 0}getGrandTotalRow(){return this.gridOptions.grandTotalRow||(this.gridOptions.groupIncludeTotalFooter?"bottom":void 0)}getGroupTotalRowCallback(){let e=this.get("groupTotalRow");if("function"==typeof e)return this.getCallback("groupTotalRow");if(e)return()=>e;let t=this.get("groupIncludeFooter");if("function"==typeof t){let e=this.getCallback("groupIncludeFooter");return t=>e(t)?"bottom":void 0}return()=>t?"bottom":void 0}isGroupMultiAutoColumn(){return this.gridOptions.groupDisplayType?"multipleColumns"===this.gridOptions.groupDisplayType:this.get("groupHideOpenParents")}isGroupUseEntireRow(e){return!e&&"groupRows"===this.gridOptions.groupDisplayType}getGridCommonParams(){return{api:this.api,columnApi:this.columnApi,context:this.context}}addGridCommonParams(e){return e.api=this.api,e.columnApi=this.columnApi,e.context=this.context,e}};a2.PROPERTY_COERCIONS=new Map([...tX.BOOLEAN_PROPERTIES.map(e=>[e,a2.toBoolean]),...tX.NUMBER_PROPERTIES.map(e=>[e,a2.toNumber]),["groupAggFiltering",e=>"function"==typeof e?e:a2.toBoolean(e)],["pageSize",a2.toConstrainedNum(1,Number.MAX_VALUE)],["autoSizePadding",a2.toConstrainedNum(0,Number.MAX_VALUE)],["keepDetailRowsCount",a2.toConstrainedNum(1,Number.MAX_VALUE)],["rowBuffer",a2.toConstrainedNum(0,Number.MAX_VALUE)],["infiniteInitialRowCount",a2.toConstrainedNum(1,Number.MAX_VALUE)],["cacheOverflowSize",a2.toConstrainedNum(1,Number.MAX_VALUE)],["cacheBlockSize",a2.toConstrainedNum(1,Number.MAX_VALUE)],["serverSideInitialRowCount",a2.toConstrainedNum(1,Number.MAX_VALUE)],["viewportRowModelPageSize",a2.toConstrainedNum(1,Number.MAX_VALUE)],["viewportRowModelBufferSize",a2.toConstrainedNum(0,Number.MAX_VALUE)]]),a2.changeSetId=0,K([eB("gridOptions")],a2.prototype,"gridOptions",2),K([eB("eventService")],a2.prototype,"eventService",2),K([eB("environment")],a2.prototype,"environment",2),K([eB("frameworkOverrides")],a2.prototype,"frameworkOverrides",2),K([eB("eGridDiv")],a2.prototype,"eGridDiv",2),K([eB("validationService")],a2.prototype,"validationService",2),K([eB("gridApi")],a2.prototype,"api",2),K([eV],a2.prototype,"init",1),K([eH],a2.prototype,"destroy",1),a2=K([ek("gridOptionsService")],a2);var a3=class extends tR{getLocaleTextFunc(){let e=this.gos.getCallback("getLocaleText");if(e)return(t,i,s)=>e({key:t,defaultValue:i,variableValues:s});let t=this.gos.get("localeText");return(e,i,s)=>{let o=t&&t[e];if(o&&s&&s.length){let e=0;for(;!(e>=s.length)&&-1!==o.indexOf("${variable}");)o=o.replace("${variable}",s[e++])}return null!=o?o:i}}};a3=K([ek("localeService")],a3);var a5=class e extends aj{constructor(){super(e.TEMPLATE,"vertical")}
258postConstruct(){super.postConstruct(),this.createManagedBean(new nF(this.eContainer)),this.ctrlsService.register("fakeVScrollComp",this),this.addManagedListener(this.eventService,tP.EVENT_ROW_CONTAINER_HEIGHT_CHANGED,this.onRowContainerHeightChanged.bind(this))}setScrollVisible(){let e=this.scrollVisibleService.isVerticalScrollShowing(),t=this.invisibleScrollbar,i=e&&this.gos.getScrollbarWidth()||0,s=0===i&&t?16:i;this.addOrRemoveCssClass("ag-scrollbar-invisible",t),sy(this.getGui(),s),sy(this.eViewport,s),sy(this.eContainer,s),this.setDisplayed(e,{skipAriaHidden:!0})}onRowContainerHeightChanged(){let{ctrlsService:e}=this,t=e.getGridBodyCtrl().getBodyViewportElement(),i=this.getScrollPosition(),s=t.scrollTop;i!=s&&this.setScrollPosition(s,!0)}getScrollPosition(){return this.getViewport().scrollTop}setScrollPosition(e,t){t||sp(this.getViewport())||this.attemptSettingScrollPosition(e),this.getViewport().scrollTop=e}};a5.TEMPLATE=`<div class="ag-body-vertical-scroll" aria-hidden="true">
259            <div class="ag-body-vertical-scroll-viewport" ref="eViewport">
260                <div class="ag-body-vertical-scroll-container" ref="eContainer"></div>
261            </div>
262        </div>`,K([eV],a5.prototype,"postConstruct",1);var a4={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},a6=["january","february","march","april","may","june","july","august","september","october","november","december"],a8=class extends tR{constructor(){super(...arguments),this.dataTypeDefinitions={},this.isWaitingForRowData=!1,this.isColumnTypeOverrideInDataTypeDefinitions=!1,this.columnStateUpdatesPendingInference={},this.columnStateUpdateListenerDestroyFuncs=[]}init(){this.groupHideOpenParents=this.gos.get("groupHideOpenParents"),this.addManagedPropertyListener("groupHideOpenParents",()=>{this.groupHideOpenParents=this.gos.get("groupHideOpenParents")}),this.processDataTypeDefinitions(),this.addManagedPropertyListener("dataTypeDefinitions",e=>{this.processDataTypeDefinitions(),this.columnModel.recreateColumnDefs(t$(e.source))})}processDataTypeDefinitions(){var e;let t=this.getDefaultDataTypes();this.dataTypeDefinitions={},Object.entries(t).forEach(([e,t])=>{this.dataTypeDefinitions[e]=W(B({},t),{groupSafeValueFormatter:this.createGroupSafeValueFormatter(t)})});let i=null!=(e=this.gos.get("dataTypeDefinitions"))?e:{};this.dataTypeMatchers={},Object.entries(i).forEach(([e,s])=>{let o=this.processDataTypeDefinition(s,i,[e],t);o&&(this.dataTypeDefinitions[e]=o,s.dataTypeMatcher&&(this.dataTypeMatchers[e]=s.dataTypeMatcher))}),this.checkObjectValueHandlers(t),["dateString","text","number","boolean","date"].forEach(e=>{let i=this.dataTypeMatchers[e];i&&delete this.dataTypeMatchers[e],this.dataTypeMatchers[e]=null!=i?i:t[e].dataTypeMatcher})}mergeDataTypeDefinitions(e,t){let i=B(B({},e),t);return e.columnTypes&&t.columnTypes&&t.appendColumnTypes&&(i.columnTypes=[...this.convertColumnTypes(e.columnTypes),...this.convertColumnTypes(t.columnTypes)]),i}processDataTypeDefinition(e,t,i,s){let o;let r=e.extendsDataType;if(e.columnTypes&&(this.isColumnTypeOverrideInDataTypeDefinitions=!0),e.extendsDataType===e.baseDataType){let i=s[r],n=t[r];
262if(i&&n&&(i=n),!this.validateDataTypeDefinition(e,i,r))return;o=this.mergeDataTypeDefinitions(i,e)}else{if(i.includes(r)){ew('Data type definition hierarchies (via the "extendsDataType" property) cannot contain circular references.');return}let n=t[r];if(!this.validateDataTypeDefinition(e,n,r))return;let l=this.processDataTypeDefinition(n,t,[...i,r],s);if(!l)return;o=this.mergeDataTypeDefinitions(l,e)}return W(B({},o),{groupSafeValueFormatter:this.createGroupSafeValueFormatter(o)})}validateDataTypeDefinition(e,t,i){return t?t.baseDataType===e.baseDataType||(ew('The "baseDataType" property of a data type definition must match that of its parent.'),!1):(ew(`The data type definition ${i} does not exist.`),!1)}createGroupSafeValueFormatter(e){if(e.valueFormatter)return t=>{var i,s;if(null==(i=t.node)?void 0:i.group){let i=t.column.getAggFunc();if(i){if("first"===i||"last"===i)return e.valueFormatter(t);if("number"===e.baseDataType&&"count"!==i){if("number"==typeof t.value)return e.valueFormatter(t);if("object"==typeof t.value){if(!t.value)return;if("toNumber"in t.value)return e.valueFormatter(W(B({},t),{value:t.value.toNumber()}));if("value"in t.value)return e.valueFormatter(W(B({},t),{value:t.value.value}))}}}if(!this.gos.get("suppressGroupMaintainValueType"))return}else if(this.groupHideOpenParents&&t.column.isRowGroupActive()){if("string"!=typeof t.value||(null==(s=e.dataTypeMatcher)?void 0:s.call(e,t.value)))return e.valueFormatter(t);if(!this.gos.get("suppressGroupMaintainValueType"))return}return e.valueFormatter(t)}}updateColDefAndGetDataTypeDefinitionColumnType(e,t,i){let{cellDataType:s}=t,{field:o}=t;if(void 0===s&&(s=e.cellDataType),(null==s||!0===s)&&(s=!!this.canInferCellDataType(e,t)&&this.inferCellDataType(o,i)),!s){e.cellDataType=!1;return}let r=this.dataTypeDefinitions[s];if(!r){ew(`Missing data type definition - "${s}"`);return}return e.cellDataType=s,r.groupSafeValueFormatter&&(e.valueFormatter=r.groupSafeValueFormatter),r.valueParser&&(e.valueParser=r.valueParser),r.suppressDefaultProperties||this.setColDefPropertiesForBaseDataType(e,r,i),r.columnTypes}updateColDefAndGetColumnType(e,t,i){var s,o;let r=this.updateColDefAndGetDataTypeDefinitionColumnType(e,t,i),n=null!=(o=null!=(s=t.type)?s:r)?o:e.type;return e.type=n,n?this.convertColumnTypes(n):void 0}addColumnListeners(e){if(!this.isWaitingForRowData)return;let t=this.columnStateUpdatesPendingInference[e.getColId()];if(!t)return;let i=e=>{t.add(e.key)};e.addEventListener(eX.EVENT_STATE_UPDATED,i),this.columnStateUpdateListenerDestroyFuncs.push(()=>e.removeEventListener(eX.EVENT_STATE_UPDATED,i))}canInferCellDataType(e,t){var i;if("clientSide"!==this.rowModel.getType())return!1;let s={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0}
262;if(this.doColDefPropsPreventInference(t,s))return!1;let o=null===t.type?e.type:t.type;if(o){let e=null!=(i=this.gos.get("columnTypes"))?i:{};if(this.convertColumnTypes(o).some(t=>{let i=e[t.trim()];return i&&this.doColDefPropsPreventInference(i,s)}))return!1}return!this.doColDefPropsPreventInference(e,s)}doColDefPropsPreventInference(e,t){return[["cellRenderer","agSparklineCellRenderer"],["valueGetter",void 0],["valueParser",void 0],["refData",void 0]].some(([i,s])=>this.doesColDefPropPreventInference(e,t,i,s))}doesColDefPropPreventInference(e,t,i,s){if(!t[i])return!1;let o=e[i];return null===o?(t[i]=!1,!1):void 0===s?!!o:o===s}inferCellDataType(e,t){var i;let s;if(!e)return;let o=this.getInitialData();if(o){let t=e.indexOf(".")>=0&&!this.gos.get("suppressFieldDotNotation");s=ep(o,e,t)}else this.initWaitForRowData(t);if(null==s)return;let[r]=null!=(i=Object.entries(this.dataTypeMatchers).find(([e,t])=>t(s)))?i:["object"];return r}getInitialData(){let e=this.gos.get("rowData");if(null==e?void 0:e.length)return e[0];if(this.initialData)return this.initialData;{let e=this.rowModel.getRootNode().allLeafChildren;if(null==e?void 0:e.length)return e[0].data}return null}initWaitForRowData(e){if(this.columnStateUpdatesPendingInference[e]=new Set,this.isWaitingForRowData)return;this.isWaitingForRowData=!0;let t=this.isColumnTypeOverrideInDataTypeDefinitions;t&&this.columnModel.queueResizeOperations();let i=this.addManagedListener(this.eventService,tP.EVENT_ROW_DATA_UPDATE_STARTED,e=>{let{firstRowData:s}=e;if(!s)return;null==i||i(),this.isWaitingForRowData=!1,this.processColumnsPendingInference(s,t),this.columnStateUpdatesPendingInference={},t&&this.columnModel.processResizeOperations();let o={type:tP.EVENT_DATA_TYPES_INFERRED};this.eventService.dispatchEvent(o)})}isPendingInference(){return this.isWaitingForRowData}processColumnsPendingInference(e,t){this.initialData=e;let i=[];this.columnStateUpdateListenerDestroyFuncs.forEach(e=>e()),this.columnStateUpdateListenerDestroyFuncs=[];let s={},o={};Object.entries(this.columnStateUpdatesPendingInference).forEach(([e,r])=>{let n=this.columnModel.getGridColumn(e);if(!n)return;let l=n.getColDef();if(!this.columnModel.resetColumnDefIntoColumn(n,"cellDataTypeInferred"))return;let a=n.getColDef();if(t&&a.type&&a.type!==l.type){let t=this.getUpdatedColumnState(n,r);t.rowGroup&&null==t.rowGroupIndex&&(s[e]=t),t.pivot&&null==t.pivotIndex&&(o[e]=t),i.push(t)}}),t&&i.push(...this.columnModel.generateColumnStateForRowGroupAndPivotIndexes(s,o)),i.length&&this.columnModel.applyColumnState({state:i},"cellDataTypeInferred"),this.initialData=null}getUpdatedColumnState(e,t){let i=this.columnModel.getColumnStateFromColDef(e);return t.forEach(e=>{delete i[e],"rowGroup"===e?delete i.rowGroupIndex:"pivot"===e&&delete i.pivotIndex}),i}checkObjectValueHandlers(e){let t=this.dataTypeDefinitions.object,i=e.object;this.hasObjectValueParser=t.valueParser!==i.valueParser,this.hasObjectValueFormatter=t.valueFormatter!==i.valueFormatter}convertColumnTypes(e){let t=[];return e instanceof Array?e.some(e=>"string"!=typeof e)?console.warn("if colDef.type is supplied an array it should be of type 'string[]'"):t=e:"string"==typeof e?t=e.split(","):console.warn("colDef.type should be of type 'string' | 'string[]'"),t}getDateStringTypeDefinition(e){var t;return e&&null!=(t=this.getDataTypeDefinition(e))?t:this.dataTypeDefinitions.dateString}getDateParserFunction(e){return this.getDateStringTypeDefinition(e).dateParser}getDateFormatterFunction(e){return this.getDateStringTypeDefinition(e).dateFormatter}getDataTypeDefinition(e){let t=e.getColDef();if(t.cellDataType)return this.dataTypeDefinitions[t.cellDataType]}getBaseDataType(e){var t;return null==(t=this.getDataTypeDefinition(e))?void 0:t.baseDataType}checkType(e,t){var i;if(null==t)return!0;let s=null==(i=this.getDataTypeDefinition(e))?void 0:i.dataTypeMatcher;return!s||s(t)}validateColDef(e){"object"===e.cellDataType&&(e.valueFormatter!==this.dataTypeDefinitions.object.groupSafeValueFormatter||this.hasObjectValueFormatter||ew('Cell data type is "object" but no value formatter has been provided. Please either provide an object data type definition with a value formatter, or set "colDef.valueFormatter"'),e.editable&&e.valueParser===this.dataTypeDefinitions.object.valueParser&&!this.hasObjectValueParser&&ew('Cell data type is "object" but no value parser has been provided. Please either provide an object data type definition with a value parser, or set "colDef.valueParser"'))}setColDefPropertiesForBaseDataType(e,t,i){let s=(e,i,s)=>{let o=e.getColDef().valueFormatter;return o===t.groupSafeValueFormatter&&(o=t.valueFormatter),this.valueService.formatValue(e,i,s,o)},o=eO.__isRegistered("@ag-grid-enterprise/set-filter",this.context.getGridId()),r=this.localeService.getLocaleTextFunc(),n=t=>{let{filterParams:i}=e;e.filterParams="object"==typeof i?B(B({},i),t):t};switch(t.baseDataType){case"number":e.cellEditor="agNumberCellEditor",o&&n({comparator:(e,t)=>
262{let i=null==e?0:parseInt(e),s=null==t?0:parseInt(t);return i===s?0:i>s?1:-1}});break;case"boolean":e.cellEditor="agCheckboxCellEditor",e.cellRenderer="agCheckboxCellRenderer",e.suppressKeyboardEvent=e=>!!e.colDef.editable&&e.event.key===sk.SPACE,n(o?{valueFormatter:e=>q(e.value)?r(String(e.value),e.value?"True":"False"):r("blanks","(Blanks)")}:{maxNumConditions:1,debounceMs:0,filterOptions:["empty",{displayKey:"true",displayName:"True",predicate:(e,t)=>t,numberOfInputs:0},{displayKey:"false",displayName:"False",predicate:(e,t)=>!1===t,numberOfInputs:0}]});break;case"date":e.cellEditor="agDateCellEditor",e.keyCreator=e=>s(e.column,e.node,e.value),o&&n({valueFormatter:e=>{let t=s(e.column,e.node,e.value);return q(t)?t:r("blanks","(Blanks)")},treeList:!0,treeListFormatter:(e,t)=>{if(1===t&&null!=e){let t=a6[Number(e)-1];return r(t,a4[t])}return null!=e?e:r("blanks","(Blanks)")}});break;case"dateString":{e.cellEditor="agDateStringCellEditor",e.keyCreator=e=>s(e.column,e.node,e.value);let i=t.dateParser;n(o?{valueFormatter:e=>{let t=s(e.column,e.node,e.value);return q(t)?t:r("blanks","(Blanks)")},treeList:!0,treeListPathGetter:e=>{let t=i(null!=e?e:void 0);return t?[String(t.getFullYear()),String(t.getMonth()+1),String(t.getDate())]:null},treeListFormatter:(e,t)=>{if(1===t&&null!=e){let t=a6[Number(e)-1];return r(t,a4[t])}return null!=e?e:r("blanks","(Blanks)")}}:{comparator:(e,t)=>{let s=i(t);return null==t||s<e?-1:s>e?1:0}});break}case"object":e.cellEditorParams={useFormatter:!0},e.comparator=(e,t)=>{let o=this.columnModel.getPrimaryColumn(i),r=null==o?void 0:o.getColDef();if(!o||!r)return 0;let n=null==e?"":s(o,null,e),l=null==t?"":s(o,null,t);return n===l?0:n>l?1:-1},e.keyCreator=e=>s(e.column,e.node,e.value),o?n({valueFormatter:e=>{let t=s(e.column,e.node,e.value);return q(t)?t:r("blanks","(Blanks)")}}):e.filterValueGetter=e=>s(e.column,e.node,this.valueService.getValue(e.column,e.node))}}getDefaultDataTypes(){let e=e=>!!e.match("^\\d{4}-\\d{2}-\\d{2}$"),t=this.localeService.getLocaleTextFunc();return{number:{baseDataType:"number",valueParser:e=>{var t,i;return(null==(i=null==(t=e.newValue)?void 0:t.trim)?void 0:i.call(t))===""?null:Number(e.newValue)},valueFormatter:e=>null==e.value?"":"number"!=typeof e.value||isNaN(e.value)?t("invalidNumber","Invalid Number"):String(e.value),dataTypeMatcher:e=>"number"==typeof e},text:{baseDataType:"text",valueParser:e=>""===e.newValue?null:J(e.newValue),dataTypeMatcher:e=>"string"==typeof e},boolean:{baseDataType:"boolean",valueParser:e=>{var t,i;return null==e.newValue?e.newValue:(null==(i=null==(t=e.newValue)?void 0:t.trim)?void 0:i.call(t))===""?null:"true"===String(e.newValue).toLowerCase()},valueFormatter:e=>null==e.value?"":String(e.value),dataTypeMatcher:e=>"boolean"==typeof e},date:{baseDataType:"date",valueParser:e=>i1(null==e.newValue?null:String(e.newValue)),valueFormatter:e=>{var i;return null==e.value?"":!(e.value instanceof Date)||isNaN(e.value.getTime())?t("invalidDate","Invalid Date"):null!=(i=iJ(e.value,!1))?i:""},dataTypeMatcher:e=>e instanceof Date},dateString:{baseDataType:"dateString",dateParser:e=>{var t;return null!=(t=i1(e))?t:void 0},dateFormatter:e=>{var t;return null!=(t=iJ(null!=e?e:null,!1))?t:void 0},valueParser:t=>e(String(t.newValue))?t.newValue:null,valueFormatter:t=>e(String(t.value))?t.value:"",dataTypeMatcher:t=>"string"==typeof t&&e(t)},object:{baseDataType:"object",valueParser:()=>null,valueFormatter:e=>{var t;return null!=(t=J(e.value))?t:""}}}}};K([eB("rowModel")],a8.prototype,"rowModel",2),K([eB("columnModel")],a8.prototype,"columnModel",2),K([eB("valueService")],a8.prototype,"valueService",2),K([eV],a8.prototype,"init",1),a8=K([ek("dataTypeService")],a8);var a7=class extends tR{constructor(){super(...arguments),this.waitingForColumns=!1}postConstruct(){this.addManagedPropertyListener("columnDefs",e=>this.setColumnDefs(e))}start(){this.ctrlsService.whenReady(()=>{let e=this.gos.get("columnDefs");e?this.setColumnsAndData(e):this.waitingForColumns=!0,this.gridReady()})}setColumnsAndData(e){this.columnModel.setColumnDefs(null!=e?e:[],"gridInitializing"),this.rowModel.start()}gridReady(){this.dispatchGridReadyEvent();let e=eO.__isRegistered("@ag-grid-enterprise/core",this.context.getGridId());new av("AG Grid",()=>this.gos.get("debug")).log(`initialised successfully, enterprise = ${e}`)}
262dispatchGridReadyEvent(){let e={type:tP.EVENT_GRID_READY};this.eventService.dispatchEvent(e)}setColumnDefs(e){let t=this.gos.get("columnDefs");if(t){if(this.waitingForColumns){this.waitingForColumns=!1,this.setColumnsAndData(t);return}this.columnModel.setColumnDefs(t,t$(e.source))}}};K([eB("ctrlsService")],a7.prototype,"ctrlsService",2),K([eB("columnModel")],a7.prototype,"columnModel",2),K([eB("rowModel")],a7.prototype,"rowModel",2),K([eV],a7.prototype,"postConstruct",1),a7=K([ek("syncService")],a7);var a9=class extends tR{constructor(){super(...arguments),this.manuallyDisplayed=!1}postConstruct(){this.addManagedListener(this.eventService,tP.EVENT_ROW_DATA_UPDATED,()=>this.onRowDataUpdated()),this.addManagedListener(this.eventService,tP.EVENT_NEW_COLUMNS_LOADED,()=>this.onNewColumnsLoaded())}registerOverlayWrapperComp(e){this.overlayWrapperComp=e,(!this.gos.get("columnDefs")||this.gos.isRowModelType("clientSide")&&!this.gos.get("rowData"))&&this.showLoadingOverlay()}showLoadingOverlay(){if(this.gos.get("suppressLoadingOverlay"))return;let e=this.userComponentFactory.getLoadingOverlayCompDetails({});this.showOverlay(e,"ag-overlay-loading-wrapper","loadingOverlayComponentParams")}showNoRowsOverlay(){if(this.gos.get("suppressNoRowsOverlay"))return;let e=this.userComponentFactory.getNoRowsOverlayCompDetails({});this.showOverlay(e,"ag-overlay-no-rows-wrapper","noRowsOverlayComponentParams")}showOverlay(e,t,i){let s=e.newAgStackInstance(),o=this.addManagedPropertyListener(i,({currentValue:e})=>{s.then(t=>{t.refresh&&t.refresh(this.gos.addGridCommonParams(B({},null!=e?e:{})))})});this.manuallyDisplayed=this.columnModel.isReady()&&!this.paginationProxy.isEmpty(),this.overlayWrapperComp.showOverlay(s,t,o)}hideOverlay(){this.manuallyDisplayed=!1,this.overlayWrapperComp.hideOverlay()}showOrHideOverlay(){let e=this.paginationProxy.isEmpty(),t=this.gos.get("suppressNoRowsOverlay");e&&!t?this.showNoRowsOverlay():this.hideOverlay()}onRowDataUpdated(){this.showOrHideOverlay()}onNewColumnsLoaded(){!this.columnModel.isReady()||this.paginationProxy.isEmpty()||this.manuallyDisplayed||this.hideOverlay()}};K([eB("userComponentFactory")],a9.prototype,"userComponentFactory",2),K([eB("paginationProxy")],a9.prototype,"paginationProxy",2),K([eB("columnModel")],a9.prototype,"columnModel",2),K([eV],a9.prototype,"postConstruct",1),a9=K([ek("overlayService")],a9);var he=class extends tR{constructor(){super(...arguments),this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=eP(()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=eP(()=>this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState()),0),this.onRowSelectedDebounced=eP(()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){var e;this.isClientSideRowModel="clientSide"===this.rowModel.getType(),this.cachedState=null!=(e=this.gos.get("initialState"))?e:{},this.ctrlsService.whenReady(()=>this.suppressEventsAndDispatchInitEvent(()=>this.setupStateOnGridReady()));let t=this.addManagedListener(this.eventService,tP.EVENT_NEW_COLUMNS_LOADED,({source:e})=>{"gridInitializing"===e&&(null==t||t(),this.suppressEventsAndDispatchInitEvent(()=>this.setupStateOnColumnsInitialised()))}),i=this.addManagedListener(this.eventService,tP.EVENT_ROW_COUNT_READY,()=>{null==i||i(),this.suppressEventsAndDispatchInitEvent(()=>this.setupStateOnRowCountReady())}),s=this.addManagedListener(this.eventService,tP.EVENT_FIRST_DATA_RENDERED,()=>{null==s||s(),this.suppressEventsAndDispatchInitEvent(()=>this.setupStateOnFirstDataRendered())})}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setupStateOnGridReady(){this.updateCachedState("sideBar",this.getSideBarState()),this.addManagedListener(this.eventService,tP.EVENT_TOOL_PANEL_VISIBLE_CHANGED,()=>this.updateCachedState("sideBar",this.getSideBarState())),this.addManagedListener(this.eventService,tP.EVENT_SIDE_BAR_UPDATED,()=>
262this.updateCachedState("sideBar",this.getSideBarState()))}setupStateOnColumnsInitialised(){var e;let t=null!=(e=this.gos.get("initialState"))?e:{};this.setColumnState(t),this.setColumnGroupState(t),this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState()),this.addManagedListener(this.eventService,tP.EVENT_COLUMN_VALUE_CHANGED,()=>this.updateColumnState(["aggregation"])),this.addManagedListener(this.eventService,tP.EVENT_COLUMN_MOVED,()=>this.updateColumnState(["columnOrder"])),this.addManagedListener(this.eventService,tP.EVENT_COLUMN_PINNED,()=>this.updateColumnState(["columnPinning"])),this.addManagedListener(this.eventService,tP.EVENT_COLUMN_RESIZED,()=>this.updateColumnState(["columnSizing"])),this.addManagedListener(this.eventService,tP.EVENT_COLUMN_VISIBLE,()=>this.updateColumnState(["columnVisibility"])),this.addManagedListener(this.eventService,tP.EVENT_COLUMN_PIVOT_CHANGED,()=>this.updateColumnState(["pivot"])),this.addManagedListener(this.eventService,tP.EVENT_COLUMN_PIVOT_MODE_CHANGED,()=>this.updateColumnState(["pivot"])),this.addManagedListener(this.eventService,tP.EVENT_COLUMN_ROW_GROUP_CHANGED,()=>this.updateColumnState(["rowGroup"])),this.addManagedListener(this.eventService,tP.EVENT_SORT_CHANGED,()=>this.updateColumnState(["sort"])),this.addManagedListener(this.eventService,tP.EVENT_NEW_COLUMNS_LOADED,()=>this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","pivot","rowGroup","sort"])),this.addManagedListener(this.eventService,tP.EVENT_COLUMN_GROUP_OPENED,()=>this.updateCachedState("columnGroup",this.getColumnGroupState()))}setupStateOnRowCountReady(){var e;let{filter:t,rowGroupExpansion:i,rowSelection:s,pagination:o}=null!=(e=this.gos.get("initialState"))?e:{},r=this.gos.get("advancedFilterModel");(t||r)&&this.setFilterState(t,r),i&&this.setRowGroupExpansionState(i),s&&this.setRowSelectionState(s),o&&this.setPaginationState(o),this.updateCachedState("filter",this.getFilterState()),this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("rowSelection",this.getRowSelectionState()),this.updateCachedState("pagination",this.getPaginationState()),this.addManagedListener(this.eventService,tP.EVENT_FILTER_CHANGED,(
262)=>this.updateCachedState("filter",this.getFilterState())),this.addManagedListener(this.eventService,tP.EVENT_ROW_GROUP_OPENED,()=>this.onRowGroupOpenedDebounced()),this.addManagedListener(this.eventService,tP.EVENT_EXPAND_COLLAPSE_ALL,()=>this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState())),this.addManagedListener(this.eventService,tP.EVENT_SELECTION_CHANGED,()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()}),this.addManagedListener(this.eventService,tP.EVENT_PAGINATION_CHANGED,e=>{(e.newPage||e.newPageSize)&&this.updateCachedState("pagination",this.getPaginationState())})}setupStateOnFirstDataRendered(){var e;let{scroll:t,rangeSelection:i,focusedCell:s,columnOrder:o}=null!=(e=this.gos.get("initialState"))?e:{};s&&this.setFocusedCellState(s),i&&this.setRangeSelectionState(i),t&&this.setScrollState(t),this.setColumnPivotState(!!(null==o?void 0:o.orderedColIds)),this.updateCachedState("sideBar",this.getSideBarState()),this.updateCachedState("focusedCell",this.getFocusedCellState()),this.updateCachedState("rangeSelection",this.getRangeSelectionState()),this.updateCachedState("scroll",this.getScrollState()),this.addManagedListener(this.eventService,tP.EVENT_CELL_FOCUSED,()=>this.updateCachedState("focusedCell",this.getFocusedCellState())),this.addManagedListener(this.eventService,tP.EVENT_RANGE_SELECTION_CHANGED,e=>{e.finished&&this.updateCachedState("rangeSelection",this.getRangeSelectionState())}),this.addManagedListener(this.eventService,tP.EVENT_BODY_SCROLL_END,()=>this.updateCachedState("scroll",this.getScrollState()))}getColumnState(){let e=this.columnModel.isPivotMode(),t=[],i=[],s=[],o=[],r=[],n=[],l=[],a=[],h=[],d=this.columnModel.getColumnState();for(let e=0;e<d.length;e++){let{colId:u,sort:c,sortIndex:p,rowGroup:g,rowGroupIndex:m,aggFunc:C,pivot:v,pivotIndex:f,pinned:w,hide:E,width:S,flex:y}=d[e];h.push(u),c&&(t[null!=p?p:0]={colId:u,sort:c}),g&&(i[null!=m?m:0]=u),"string"==typeof C&&s.push({colId:u,aggFunc:C}),v&&(o[null!=f?f:0]=u),w&&("right"===w?n:r).push(u),E&&l.push(u),(y||S)&&a.push({colId:u,flex:null!=y?y:void 0,width:S})}return{sort:t.length?{sortModel:t}:void 0,rowGroup:i.length?{groupColIds:i}:void 0,aggregation:s.length?{aggregationModel:s}:void 0,pivot:o.length||e?{pivotMode:e,pivotColIds:o}:void 0,columnPinning:r.length||n.length?{leftColIds:r,rightColIds:n}:void 0,columnVisibility:l.length?{hiddenColIds:l}:void 0,columnSizing:a.length?{columnSizingModel:a}:void 0,columnOrder:h.length?{orderedColIds:h}:void 0}}setColumnState(e){let{sort:t,rowGroup:i,aggregation:s,pivot:o,columnPinning:r,columnVisibility:n,columnSizing:l,columnOrder:a}=e,h={},d=e=>{let t=h[e];return t||(t={colId:e},h[e]=t),t};t&&t.sortModel.forEach(({colId:e,sort:t},i)=>{let s=d(e);s.sort=t,s.sortIndex=i}),i&&i.groupColIds.forEach((e,t)=>{let i=d(e);i.rowGroup=!0,i.rowGroupIndex=t}),s&&s.aggregationModel.forEach(({colId:e,aggFunc:t})=>{d(e).aggFunc=t}),o&&(o.pivotColIds.forEach((e,t)=>{let i=d(e);i.pivot=!0,i.pivotIndex=t}),this.gos.updateGridOptions({options:{pivotMode:o.pivotMode},source:"gridInitializing"})),r&&(r.leftColIds.forEach(e=>{d(e).pinned="left"}),r.rightColIds.forEach(e=>{d(e).pinned="right"})),n&&n.hiddenColIds.forEach(e=>{d(e).hide=!0}),l&&l.columnSizingModel.forEach(({colId:e,flex:t,width:i})=>{let s=d(e);s.flex=null!=t?t:null,s.width=i});let u=null==a?void 0:a.orderedColIds,c=!!(null==u?void 0:u.length),p=c?u.map(e=>d(e)):Object.values(h);p.length&&(this.columnStates=p,this.columnModel.applyColumnState({state:p,applyOrder:c,defaultState:{sort:null,sortIndex:null,rowGroup:null,rowGroupIndex:null,aggFunc:null,pivot:null,pivotIndex:null,pinned:null,hide:null,flex:null}},"gridInitializing"))}setColumnPivotState(e){let t=this.columnStates;this.columnStates=void 0;let i=this.columnGroupStates;if(this.columnGroupStates=void 0,this.columnModel.isSecondaryColumnsPresent()){if(t){let i=[];for(let e of t)this.columnModel.getSecondaryColumn(e.colId)&&i.push(e);this.columnModel.applyColumnState({state:i,applyOrder:e},"gridInitializing")}i&&this.columnModel.setColumnGroupState(i,"gridInitializing")}}getColumnGroupState(){let e=this.columnModel.getColumnGroupState(),t=[];return e.forEach(({groupId:e,open:i})=>
262{i&&t.push(e)}),t.length?{openColumnGroupIds:t}:void 0}setColumnGroupState(e){var t;if(!e.hasOwnProperty("columnGroup"))return;let i=new Set(null==(t=e.columnGroup)?void 0:t.openColumnGroupIds),s=this.columnModel.getColumnGroupState().map(({groupId:e})=>{let t=i.has(e);return t&&i.delete(e),{groupId:e,open:t}});i.forEach(e=>{s.push({groupId:e,open:!0})}),s.length&&(this.columnGroupStates=s),this.columnModel.setColumnGroupState(s,"gridInitializing")}getFilterState(){var e;let t=this.filterManager.getFilterModel();t&&0===Object.keys(t).length&&(t=void 0);let i=null!=(e=this.filterManager.getAdvancedFilterModel())?e:void 0;return t||i?{filterModel:t,advancedFilterModel:i}:void 0}setFilterState(e,t){let{filterModel:i,advancedFilterModel:s}=null!=e?e:{advancedFilterModel:t};i&&this.filterManager.setFilterModel(i,"columnFilter"),s&&this.filterManager.setAdvancedFilterModel(s)}getRangeSelectionState(){var e;let t=null==(e=this.rangeService)?void 0:e.getCellRanges().map(e=>{let{id:t,type:i,startRow:s,endRow:o,columns:r,startColumn:n}=e;return{id:t,type:i,startRow:s,endRow:o,colIds:r.map(e=>e.getColId()),startColId:n.getColId()}});return(null==t?void 0:t.length)?{cellRanges:t}:void 0}setRangeSelectionState(e){if(!this.gos.get("enableRangeSelection")||!this.rangeService)return;let t=[];
262e.cellRanges.forEach(e=>{let i=[];if(e.colIds.forEach(e=>{let t=this.columnModel.getGridColumn(e);t&&i.push(t)}),!i.length)return;let s=this.columnModel.getGridColumn(e.startColId);if(!s){let e=this.columnModel.getAllDisplayedColumns(),t=new Set(i);s=e.find(e=>t.has(e))}t.push(W(B({},e),{columns:i,startColumn:s}))}),this.rangeService.setCellRanges(t)}getScrollState(){var e,t,i;if(!this.isClientSideRowModel)return;let s=null==(e=this.ctrlsService.getGridBodyCtrl())?void 0:e.getScrollFeature(),{left:o}=null!=(t=null==s?void 0:s.getHScrollPosition())?t:{left:0},{top:r}=null!=(i=null==s?void 0:s.getVScrollPosition())?i:{top:0};return r||o?{top:r,left:o}:void 0}setScrollState(e){var t;if(!this.isClientSideRowModel)return;let{top:i,left:s}=e;null==(t=this.ctrlsService.getGridBodyCtrl())||t.getScrollFeature().setScrollPosition(i,s)}getSideBarState(){var e,t;return null==(t=null==(e=this.sideBarService)?void 0:e.getSideBarComp())?void 0:t.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;let e=this.focusService.getFocusedCell();if(e){let{column:t,rowIndex:i,rowPinned:s}=e;return{colId:t.getColId(),rowIndex:i,rowPinned:s}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;let{colId:t,rowIndex:i,rowPinned:s}=e;this.focusService.setFocusedCell({column:this.columnModel.getGridColumn(t),rowIndex:i,rowPinned:s,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){let e=this.paginationProxy.getCurrentPage(),t=this.gos.get("paginationAutoPageSize")?void 0:this.paginationProxy.getPageSize();if(e||t)return{page:e,pageSize:t}}setPaginationState(e){e.pageSize&&!this.gos.get("paginationAutoPageSize")&&this.paginationProxy.setPageSize(e.pageSize,"initialState"),"number"==typeof e.page&&this.paginationProxy.setPage(e.page)}getRowSelectionState(){var e;let t=this.selectionService.getSelectionState();return t&&(Array.isArray(t)||!1!==t.selectAll&&!1!==t.selectAllChildren||(null==(e=null==t?void 0:t.toggledNodes)?void 0:e.length))?t:void 0}setRowSelectionState(e){this.selectionService.setSelectionState(e,"gridInitializing")}getRowGroupExpansionState(){let e=this.expansionService.getExpandedRows();return e.length?{expandedRowGroupIds:e}:void 0}setRowGroupExpansionState(e){this.expansionService.expandRows(e.expandedRowGroupIds)}updateColumnState(e){let t=this.getColumnState(),i=!1;Object.entries(t).forEach(([e,t])=>{ei(t,this.cachedState[e])||(i=!0)}),this.cachedState=B(B({},this.cachedState),t),i&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){let i=this.cachedState[e];this.setCachedStateValue(e,t),ei(t,i)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState=W(B({},this.cachedState),{[e]:t})}refreshStaleState(){this.staleStateKeys.forEach(e=>{"rowSelection"===e&&this.setCachedStateValue(e,this.getRowSelectionState())}),this.staleStateKeys.clear()}dispatchStateUpdateEvent(e){this.suppressEvents||(e.forEach(e=>this.queuedUpdateSources.add(e)),this.dispatchStateUpdateEventDebounced())}dispatchQueuedStateUpdateEvents(){let e=Array.from(this.queuedUpdateSources);this.queuedUpdateSources.clear();let t={type:tP.EVENT_STATE_UPDATED,sources:e,state:this.cachedState};this.eventService.dispatchEvent(t)}suppressEventsAndDispatchInitEvent(e){this.suppressEvents=!0,this.columnAnimationService.setSuppressAnimation(!0),e(),setTimeout(()=>{this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&(this.columnAnimationService.setSuppressAnimation(!1),this.dispatchStateUpdateEvent(["gridInitializing"]))})}};K([eB("filterManager")],he.prototype,"filterManager",2),K([eB("ctrlsService")],he.prototype,"ctrlsService",2),K([eB("focusService")],he.prototype,"focusService",2),K([eB("columnModel")],he.prototype,"columnModel",2),K([eB("paginationProxy")],he.prototype,"paginationProxy",2),K([eB("rowModel")],he.prototype,"rowModel",2),K([eB("selectionService")],he.prototype,"selectionService",2),K([eB("expansionService")],he.prototype,"expansionService",2),K([eB("columnAnimationService")],he.prototype,"columnAnimationService",2),K([eW("sideBarService")],he.prototype,"sideBarService",2),K([eW("rangeService")],he.prototype,"rangeService",2),K([eV],he.prototype,"postConstruct",1),he=K([ek("stateService")],he);var ht=class extends tR{init(){this.processGridOptions(this.gridOptions)}processGridOptions(e){this.processOptions(e,a1)}processColumnDefs(e){this.processOptions(e,aZ)}processOptions(e,t){let{validations:i,deprecations:s,allProperties:o,propertyExceptions:r,objectName:n,docsUrl:l}=t;o&&!0!==this.gridOptions.suppressPropertyNamesCheck&&this.checkProperties(e,[...null!=r?r:[],...Object.keys(s)],o,n,l);let a=new Set;Object.keys(e).forEach(t=>{var o;let r;let n=s[t];if(n){if("renamed"in n){let{renamed:i,version:s}=n;a.add(`As of v${s}, ${String(t)} is deprecated. Please use ${String(i)} instead.`),e[i]=e[t]}else{let{message:e,version:i}=n;a.add(`As of v${i}, ${String(t)} is deprecated. ${null!=e?e:""}`)}}let l=e[t];if(null==l||!1===l)return;let h=i[t];
262if(!h)return;if("function"==typeof h){let i=h(e,this.gridOptions);if(!i)return;if("objectName"in i){let s=e[t];if(Array.isArray(s)){s.forEach(e=>{this.processOptions(e,i)});return}this.processOptions(e[t],i);return}r=i}else r=h;let{module:d,dependencies:u,supportedRowModels:c}=r;if(c){let e=null!=(o=this.gridOptions.rowModelType)?o:"clientSide";if(!c.includes(e)){a.add(`${String(t)} is not supported with the '${e}' row model.`);return}}if(d){let e=Array.isArray(d)?d:[d],i=!0;if(e.forEach(e=>{eO.__assertRegistered(e,String(t),this.context.getGridId())||(i=!1,a.add(`${String(t)} is only available when ${e} is loaded.`))}),!i)return}if(u){let i=this.checkForWarning(t,u,e);if(i){a.add(i);return}}}),a.size>0&&a.forEach(e=>{ew(e)})}checkForWarning(e,t,i){if("function"==typeof t)return t(i,this.gridOptions);let s=Object.entries(t).find(([e,t])=>{let s=i[e];return!t.includes(s)});if(!s)return null;let[o,r]=s;return r.length>1?`'${String(e)}' requires '${o}' to be one of [${r.join(", ")}].`:`'${String(e)}' requires '${o}' to be ${r[0]}.`}checkProperties(e,t,i,s,o){let r=sI(Object.getOwnPropertyNames(e),["__ob__","__v_skip","__metadata__",...t,...i],i);if(ea(r,(e,t)=>{ew(`invalid ${s} property '${e}' did you mean any of these: ${t.slice(0,8).join(", ")}`)}),Object.keys(r).length>0&&o){let e=this.getFrameworkOverrides().getDocLink(o);ew(`to see all the valid ${s} properties please check: ${e}`)}}};K([eB("gridOptions")],ht.prototype,"gridOptions",2),K([eV],ht.prototype,"init",1),ht=K([ek("validationService")],ht);var hi=class extends tR{constructor(){super(...arguments),this.syncEventListeners=new Map,this.asyncEventListeners=new Map,this.syncGlobalEventListeners=new Set,this.globalEventListenerPairs=new Map}postConstruct(){this.frameworkEventWrappingService=new eY(this.getFrameworkOverrides())}addEventListener(e,t){let i=this.frameworkEventWrappingService.wrap(t),s=this.gos.useAsyncEvents()&&!tF.has(e),o=s?this.asyncEventListeners:this.syncEventListeners;o.has(e)||o.set(e,new Set),o.get(e).add(i),this.eventService.addEventListener(e,i,s)}removeEventListener(e,t){var i;let s=this.frameworkEventWrappingService.unwrap(t),o=this.asyncEventListeners.get(e),r=!!(null==o?void 0:o.delete(s));r||null==(i=this.syncEventListeners.get(e))||i.delete(s),this.eventService.removeEventListener(e,s,r)}addGlobalListener(e){let t=this.frameworkEventWrappingService.wrapGlobal(e);if(this.gos.useAsyncEvents()){let i=(e,i)=>{tF.has(e)&&t(e,i)},s=(e,i)=>{tF.has(e)||t(e,i)};this.globalEventListenerPairs.set(e,{syncListener:i,asyncListener:s}),this.eventService.addGlobalListener(i,!1),this.eventService.addGlobalListener(s,!0)}else this.syncGlobalEventListeners.add(t),this.eventService.addGlobalListener(t,!1)}removeGlobalListener(e){let t=this.frameworkEventWrappingService.unwrapGlobal(e);if(this.globalEventListenerPairs.has(t)){let{syncListener:i,asyncListener:s}=this.globalEventListenerPairs.get(t);this.eventService.removeGlobalListener(i,!1),this.eventService.removeGlobalListener(s,!0),this.globalEventListenerPairs.delete(e)}else this.syncGlobalEventListeners.delete(t),this.eventService.removeGlobalListener(t,!1)}destroyEventListeners(e,t){e.forEach((e,i)=>{e.forEach(e=>this.eventService.removeEventListener(i,e,t)),e.clear()}),e.clear()}destroyGlobalListeners(e,t){e.forEach(e=>this.eventService.removeGlobalListener(e,t)),e.clear()}destroy(){super.destroy(),this.destroyEventListeners(this.syncEventListeners,!1),this.destroyEventListeners(this.asyncEventListeners,!0),this.destroyGlobalListeners(this.syncGlobalEventListeners,!1),this.globalEventListenerPairs.forEach(({syncListener:e,asyncListener:t})=>{this.eventService.removeGlobalListener(e,!1),this.eventService.removeGlobalListener(t,!0)}),this.globalEventListenerPairs.clear()}};K([eV],hi.prototype,"postConstruct",1),hi=K([ek("apiEventService")],hi);var hs=class extends s9{constructor(){super('<span class="ag-paging-page-size"></span>'),this.hasEmptyOption=!1,this.handlePageSizeItemSelected=()=>{if(!this.selectPageSizeComp)return;let e=this.selectPageSizeComp.getValue();if(!e)return;let t=Number(e);isNaN(t)||t<1||t===this.paginationProxy.getPageSize()||(this.paginationProxy.setPageSize(t,"pageSizeSelector"),this.hasEmptyOption&&this.toggleSelectDisplay(!0),this.selectPageSizeComp.getFocusableElement().focus())}}init(){this.addManagedPropertyListener("paginationPageSizeSelector",()=>{this.onPageSizeSelectorValuesChange()}),this.addManagedListener(this.eventService,tP.EVENT_PAGINATION_CHANGED,e=>this.handlePaginationChanged(e))}handlePaginationChanged(e){if(!this.selectPageSizeComp||!(null==e?void 0:e.newPageSize))return;let t=this.paginationProxy.getPageSize();this.getPageSizeSelectorValues().includes(t)?this.selectPageSizeComp.setValue(t.toString()):this.hasEmptyOption?this.selectPageSizeComp.setValue(""):this.toggleSelectDisplay(!0)}toggleSelectDisplay(e){this.selectPageSizeComp&&this.reset(),e&&(this.reloadPageSizesSelector(),this.selectPageSizeComp&&this.appendChild(this.selectPageSizeComp))}reset(){sd(this.getGui()),this.selectPageSizeComp&&(this.destroyBean(this.selectPageSizeComp),this.selectPageSizeComp=void 0)}onPageSizeSelectorValuesChange(){this.selectPageSizeComp&&this.shouldShowPageSizeSelector()&&this.reloadPageSizesSelector()}shouldShowPageSizeSelector(){return this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel")&&!this.gos.get("paginationAutoPageSize")&&!1!==this.gos.get("paginationPageSizeSelector")}reloadPageSizesSelector(){let e=this.getPageSizeSelectorValues(),t=this.paginationProxy.getPageSize(),i=!t||!e.includes(t);i&&(e.unshift(""),ew(`The paginationPageSize grid option is set to a value that is not in the list of page size options.
263                Please make sure that the paginationPageSize grid option is set to one of the values in the 
264                paginationPageSizeSelector array, or set the paginationPageSizeSelector to false to hide the page size selector.`)),this.selectPageSizeComp&&(this.destroyBean(this.selectPageSizeComp),this.selectPageSizeComp=void 0);let s=this.localeService.getLocaleTextFunc(),o=s("pageSizeSelectorLabel","Page Size:"),r=e.map(e=>({value:String(e),text:String(e)})),n=s("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new oE).addOptions(r).setValue(String(i?"":t)).setAriaLabel(n).setLabel(o).onValueChange(()=>this.handlePageSizeItemSelected()),this.hasEmptyOption=i}getPageSizeSelectorValues(){let e=this.gos.get("paginationPageSizeSelector");return Array.isArray(e)&&this.validateValues(e)?[...e].sort((e,t)=>
264e-t):[20,50,100]}validateValues(e){if(!e.length)return ew(`The paginationPageSizeSelector grid option is an empty array. This is most likely a mistake.
265                If you want to hide the page size selector, please set the paginationPageSizeSelector to false.`),!1;for(let t=0;t<e.length;t++){let i=e[t],s="number"==typeof i,o=i>0;if(!s)return ew(`The paginationPageSizeSelector grid option contains a non-numeric value.
266                    Please make sure that all values in the paginationPageSizeSelector array are numbers.`),!1;if(!o)return ew(`The paginationPageSizeSelector grid option contains a negative number or zero.
267                    Please make sure that all values in the paginationPageSizeSelector array are positive.`),!1}return!0}destroy(){this.toggleSelectDisplay(!1),super.destroy()}};K([eB("paginationProxy")],hs.prototype,"paginationProxy",2),K([eV],hs.prototype,"init",1);var ho=class extends tR{constructor(){super(),this.descriptionContainer=null,this.announceValue=eP(this.announceValue.bind(this),200)}postConstruct(){let e=this.gos.getDocument(),t=this.descriptionContainer=e.createElement("div");t.classList.add("ag-aria-description-container"),is(t,"polite"),ir(t,"additions text"),io(t,!0),this.eGridDiv.appendChild(t)}announceValue(e){this.descriptionContainer&&(this.descriptionContainer.textContent="",setTimeout(()=>{this.isAlive()&&this.descriptionContainer&&(this.descriptionContainer.textContent=e)},50))}destroy(){super.destroy();let{descriptionContainer:e}=this;e&&(sd(e),e.parentElement&&e.parentElement.removeChild(e)),this.descriptionContainer=null,this.eGridDiv=null}};K([eB("eGridDiv")],ho.prototype,"eGridDiv",2),K([eV],ho.prototype,"postConstruct",1),ho=K([ek("ariaAnnouncementService")],ho);var hr=class{};function hn(e){hr.gridOptions=e}function hl(e,t,i){if(!t)return eE("No gridOptions provided to createGrid"),{};let s=new hd().create(e,t,t=>{let i=new aw(e);t.createBean(i)},void 0,i);if(!Object.isFrozen(t)&&!(null==i?void 0:i.frameworkOverrides)){let e="https://ag-grid.com/javascript-data-grid/grid-interface/#grid-api";Object.defineProperty(t,"api",{get:()=>{eE(`gridOptions.api is no longer supported. See ${e}.`)},configurable:!0}),Object.defineProperty(t,"columnApi",{get:()=>{eE(`gridOptions.columnApi is no longer supported and all methods moved to the grid api. See ${e}.`)},configurable:!0})}return s}hr.gridOptions=void 0;var ha=class{constructor(e,t,i){if(ew("Since v31 new Grid(...) is deprecated. Use createGrid instead: `const gridApi = createGrid(...)`. The grid api is returned from createGrid and will not be available on gridOptions."),!t){eE("No gridOptions provided to the grid");return}this.gridOptions=t;let s=new hd().create(e,t,t=>{let i=new aw(e);t.createBean(i).addDestroyFunc(()=>{this.destroy()})},void 0,i);this.gridOptions.api=s,this.gridOptions.columnApi=new ap(s)}destroy(){var e;this.gridOptions&&(null==(e=this.gridOptions.api)||e.destroy(),delete this.gridOptions.api,delete this.gridOptions.columnApi)}},hh=1,hd=class{create(e,t,i,s,o){var r;let n={};hr.gridOptions?(ec(n,hr.gridOptions,!0,!0),n=B(B({},n),t)):n=t;let l=a2.getCoercedGridOptions(n),a=!!l.debug,h=null!=(r=l.gridId)?r:String(hh++),d=this.getRegisteredModules(o,h),u=this.createBeansList(l.rowModelType,d,h),c=this.createProvidedBeans(e,l,o);if(!u){eE("Failed to create grid.");return}let p={providedBeanInstances:c,beanClasses:u,debug:a,gridId:h},g=new av("Context",()=>p.debug),m=new ex(p,g),C=m.getBean("beans");return this.registerModuleUserComponents(C,d),this.registerStackComponents(C,d),this.registerControllers(C,d),i(m),C.syncService.start(),s&&s(m),m.getBean("gridApi")}registerControllers(e,t){t.forEach(t=>{t.controllers&&t.controllers.forEach(t=>e.ctrlsFactory.register(t))})}registerStackComponents(e,t){let i=this.createAgStackComponentsList(t);e.agStackComponentsRegistry.setupComponents(i)}getRegisteredModules(e,t){let i=e?e.modules:null,s=eO.__getRegisteredModules(t),o=[],r={},n=(e,t,i)=>{r[t.moduleName]||(r[t.moduleName]=!0,o.push(t),eO.__register(t,e,i)),t.dependantModules&&t.dependantModules.forEach(t=>n(e,t,i))};
267return i&&i.forEach(e=>n(!0,e,t)),s&&s.forEach(e=>n(!eO.__isPackageBased(),e,void 0)),o}registerModuleUserComponents(e,t){this.extractModuleEntity(t,e=>e.userComponents?e.userComponents:[]).forEach(t=>{e.userComponentRegistry.registerDefaultComponent(t.componentName,t.componentClass)})}createProvidedBeans(e,t,i){let s=i?i.frameworkOverrides:null;Q(s)&&(s=new ah);let o={gridOptions:t,eGridDiv:e,globalEventListener:i?i.globalEventListener:null,globalSyncEventListener:i?i.globalSyncEventListener:null,frameworkOverrides:s};return i&&i.providedBeanInstances&&Object.assign(o,i.providedBeanInstances),o}createAgStackComponentsList(e){return[{componentName:"AgCheckbox",componentClass:oy},{componentName:"AgRadioButton",componentClass:oR},{componentName:"AgToggleButton",componentClass:lH},{componentName:"AgInputTextField",componentClass:oO},{componentName:"AgInputTextArea",componentClass:lk},{componentName:"AgInputNumberField",componentClass:ox},{componentName:"AgInputDateField",componentClass:lB},{componentName:"AgInputRange",componentClass:lW},{componentName:"AgRichSelect",componentClass:lY},{componentName:"AgSelect",componentClass:oE},{componentName:"AgSlider",componentClass:lq},{componentName:"AgGridBody",componentClass:nk},{componentName:"AgHeaderRoot",componentClass:lg},{componentName:"AgSortIndicator",componentClass:oJ},{componentName:"AgPagination",componentClass:aG},{componentName:"AgPageSizeSelector",componentClass:hs},{componentName:"AgOverlayWrapper",componentClass:aO},{componentName:"AgGroupComponent",componentClass:lX},{componentName:"AgRowContainer",componentClass:nj},{componentName:"AgFakeHorizontalScroll",componentClass:aq},{componentName:"AgFakeVerticalScroll",componentClass:a5},{componentName:"AgAutocomplete",componentClass:as}].concat(this.extractModuleEntity(e,e=>e.agStackComponents?e.agStackComponents:[]))}createBeansList(e="clientSide",t,i){let s=t.filter(t=>!t.rowModel||t.rowModel===e),o={clientSide:"@ag-grid-community/client-side-row-model",infinite:"@ag-grid-community/infinite-row-model",serverSide:"@ag-grid-enterprise/server-side-row-model",viewport:"@ag-grid-enterprise/viewport-row-model"};if(!o[e]){eE("Could not find row model for rowModelType = "+e);return}if(!eO.__assertRegistered(o[e],`rowModelType = '${e}'`,i))return;let r=[ng,ax,a_,aW,aD,r4,rF,aA,aP,ly,rQ,aN,lm,a3,ht,lM,r1,tj,e$,a2,l9,ac,r8,tK,lu,l_,lF,am,tD,au,nU,aT,ag,aC,lA,lC,rn,ap,aS,nW,aM,ad,lV,nB,aE,ay,aR,aI,tN,ab,lR,aB,t0,aU,az,lx,aK,a$,aQ,aX,aY,a8,r6,a7,a9,he,lT,hi,ho,lb];r.push(...this.extractModuleEntity(s,e=>e.beans?e.beans:[]));let n=[];return r.forEach(e=>{0>n.indexOf(e)&&n.push(e)}),n}extractModuleEntity(e,t){return[].concat(...e.map(t))}},hu=class{wrap(e,t,i=[],s){let o=this.createWrapper(e,s);return t.forEach(e=>{this.createMethod(o,e,!0)}
267),i.forEach(e=>{this.createMethod(o,e,!1)}),o}unwrap(e){return e}createMethod(e,t,i){e.addMethod(t,this.createMethodProxy(e,t,i))}createMethodProxy(e,t,i){return function(){return e.hasMethod(t)?e.callMethod(t,arguments):(i&&console.warn("AG Grid: Framework component is missing the method "+t+"()"),null)}}},hc=class{};hc.CHART_TYPE_TO_SERIES_TYPE={column:"bar",groupedColumn:"bar",stackedColumn:"bar",normalizedColumn:"bar",bar:"bar",groupedBar:"bar",stackedBar:"bar",normalizedBar:"bar",line:"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"},hc.COMBO_CHART_TYPES=["columnLineCombo","areaColumnCombo","customCombo"],hc.SERIES_GROUP_TYPES=["grouped","stacked","normalized"];var hp=((y=hp||{}).InsideBase="insideBase",y.InsideEnd="insideEnd",y.Center="center",y.OutsideEnd="outsideEnd",y),hg="undefined"==typeof global?{}:global;hg.HTMLElement="undefined"==typeof HTMLElement?{}:HTMLElement,hg.HTMLButtonElement="undefined"==typeof HTMLButtonElement?{}:HTMLButtonElement,hg.HTMLSelectElement="undefined"==typeof HTMLSelectElement?{}:HTMLSelectElement,hg.HTMLInputElement="undefined"==typeof HTMLInputElement?{}:HTMLInputElement,hg.Node="undefined"==typeof Node?{}:Node,hg.MouseEvent="undefined"==typeof MouseEvent?{}:MouseEvent;var hm=class e{constructor(t,i,s,o,r,n){this.nextId=0,this.rowCountReady=!1,this.allNodesMap={},this.rootNode=t,this.gos=i,this.eventService=s,this.columnModel=o,this.beans=n,this.selectionService=r,this.rootNode.group=!0,this.rootNode.level=-1,this.rootNode.id=e.ROOT_NODE_ID,this.rootNode.allLeafChildren=[],this.rootNode.childrenAfterGroup=[],this.rootNode.childrenAfterSort=[],this.rootNode.childrenAfterAggFilter=[],this.rootNode.childrenAfterFilter=[]}getCopyOfNodesMap(){return sJ.cloneObject(this.allNodesMap)}getRowNode(e){return this.allNodesMap[e]}setRowData(t){if("string"==typeof t){console.warn("AG Grid: rowData must be an array.");return}this.rowCountReady=!0,this.dispatchRowDataUpdateStartedEvent(t);let i=this.rootNode,s=this.rootNode.sibling;i.childrenAfterFilter=null,i.childrenAfterGroup=null,i.childrenAfterAggFilter=null,i.childrenAfterSort=null,i.childrenMapped=null,i.updateHasChildren(),this.nextId=0,this.allNodesMap={},t?i.allLeafChildren=t.map(t=>this.createNode(t,this.rootNode,e.TOP_LEVEL)):(i.allLeafChildren=[],i.childrenAfterGroup=[]),s&&(s.childrenAfterFilter=i.childrenAfterFilter,s.childrenAfterGroup=i.childrenAfterGroup,s.childrenAfterAggFilter=i.childrenAfterAggFilter,s.childrenAfterSort=i.childrenAfterSort,s.childrenMapped=i.childrenMapped,s.allLeafChildren=i.allLeafChildren)}updateRowData(e,t){this.rowCountReady=!0,this.dispatchRowDataUpdateStartedEvent(e.add);let i={remove:[],update:[],add:[]},s=[];return this.executeRemove(e,i,s),this.executeUpdate(e,i,s),this.executeAdd(e,i),this.updateSelection(s,"rowDataChanged"),t&&sJ.sortRowNodesByOrder(this.rootNode.allLeafChildren,t),i}isRowCountReady(){return this.rowCountReady}dispatchRowDataUpdateStartedEvent(e){let t={type:tP.EVENT_ROW_DATA_UPDATE_STARTED,firstRowData:(null==e?void 0:e.length)?e[0]:null};this.eventService.dispatchEvent(t)}updateSelection(e,t){let i=e.length>0;if(i&&this.selectionService.setNodesSelected({newValue:!1,nodes:e,suppressFinishActions:!0,source:t}),this.selectionService.updateGroupsFromChildrenSelections(t),i){let e={type:tP.EVENT_SELECTION_CHANGED,source:t};this.eventService.dispatchEvent(e)}}executeAdd(t,i){var s;let{add:o,addIndex:r}=t;if(sJ.missingOrEmpty(o))return;let n=o.map(t=>this.createNode(t,this.rootNode,e.TOP_LEVEL));if("number"==typeof r&&r>=0){let{allLeafChildren:e}=this.rootNode,t=e.length,i=r;if(this.gos.get("treeData")&&r>0&&t>0){for(let o=0;o<t;o++)if((null==(s=e[o])?void 0:s.rowIndex)==r-1){i=o+1;break}}let o=e.slice(0,i),l=e.slice(i,e.length);this.rootNode.allLeafChildren=[...o,...n,...l]}else this.rootNode.allLeafChildren=[...this.rootNode.allLeafChildren,...n];this.rootNode.sibling&&(this.rootNode.sibling.allLeafChildren=this.rootNode.allLeafChildren),i.add=n}executeRemove(e,t,i){let{remove:s}=e;if(sJ.missingOrEmpty(s))return;let o={};
267s.forEach(e=>{let s=this.lookupRowNode(e);s&&(s.isSelected()&&i.push(s),s.clearRowTopAndRowIndex(),o[s.id]=!0,delete this.allNodesMap[s.id],t.remove.push(s))}),this.rootNode.allLeafChildren=this.rootNode.allLeafChildren.filter(e=>!o[e.id]),this.rootNode.sibling&&(this.rootNode.sibling.allLeafChildren=this.rootNode.allLeafChildren)}executeUpdate(t,i,s){let{update:o}=t;sJ.missingOrEmpty(o)||o.forEach(t=>{let o=this.lookupRowNode(t);o&&(o.updateData(t),!o.selectable&&o.isSelected()&&s.push(o),this.setMasterForRow(o,t,e.TOP_LEVEL,!1),i.update.push(o))})}lookupRowNode(e){let t;let i=this.gos.getCallback("getRowId");if(i){let s=i({data:e,level:0});if(!(t=this.allNodesMap[s]))return console.error(`AG Grid: could not find row id=${s}, data item was not found for this id`),null}else if(!(t=this.rootNode.allLeafChildren.find(t=>t.data===e)))return console.error("AG Grid: could not find data item as object was not found",e),console.error("Consider using getRowId to help the Grid find matching row data"),null;return t||null}createNode(e,t,i){let s=new rt(this.beans);s.group=!1,this.setMasterForRow(s,e,i,!0);let o=this.gos.get("suppressParentsInRowNodes");return t&&!o&&(s.parent=t),s.level=i,s.setDataAndId(e,this.nextId.toString()),this.allNodesMap[s.id]&&console.warn(`AG Grid: duplicate node id '${s.id}' detected from getRowId callback, this could cause issues in your grid.`),this.allNodesMap[s.id]=s,this.nextId++,s}setMasterForRow(e,t,i,s){if(this.gos.get("treeData"))e.setMaster(!1),s&&(e.expanded=!1);else{if(this.gos.get("masterDetail")){let i=this.gos.get("isRowMaster");i?e.setMaster(i(t)):e.setMaster(!0)}else e.setMaster(!1);if(s){let t=this.columnModel.getRowGroupColumns(),s=t?t.length:0;e.expanded=!!e.master&&this.isExpanded(i+s)}}}isExpanded(e){let t=this.gos.get("groupDefaultExpanded");return -1===t||e<t}};hm.TOP_LEVEL=0,hm.ROOT_NODE_ID="ROOT_NODE_ID";var hC=class extends tR{constructor(){super(...arguments),this.onRowHeightChanged_debounced=sJ.debounce(this.onRowHeightChanged.bind(this),100),this.rowsToDisplay=[],this.hasStarted=!1,this.shouldSkipSettingDataOnStart=!1,this.isRefreshingModel=!1,this.rowCountReady=!1}init(){let e=this.refreshModel.bind(this,{step:"group"}),t=!this.gos.get("suppressAnimationFrame"),i=this.refreshModel.bind(this,{step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:t});this.addManagedListener(this.eventService,tP.EVENT_NEW_COLUMNS_LOADED,i),this.addManagedListener(this.eventService,tP.EVENT_COLUMN_ROW_GROUP_CHANGED,e),this.addManagedListener(this.eventService,tP.EVENT_COLUMN_VALUE_CHANGED,this.onValueChanged.bind(this)),this.addManagedListener(this.eventService,tP.EVENT_COLUMN_PIVOT_CHANGED,this.refreshModel.bind(this,{step:"pivot"})),this.addManagedListener(this.eventService,tP.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.addManagedListener(this.eventService,tP.EVENT_SORT_CHANGED,this.onSortChanged.bind(this)),this.addManagedListener(this.eventService,tP.EVENT_COLUMN_PIVOT_MODE_CHANGED,e),this.addManagedListener(this.eventService,tP.EVENT_GRID_STYLES_CHANGED,this.onGridStylesChanges.bind(this)),this.addManagedListener(this.eventService,tP.EVENT_GRID_READY,()=>this.onGridReady()),this.addPropertyListeners(),this.rootNode=new rt(this.beans),this.nodeManager=new hm(this.rootNode,this.gos,this.eventService,this.columnModel,this.selectionService,this.beans)}addPropertyListeners(){let e=new Set(["treeData","masterDetail"]),t=new Set(["suppressParentsInRowNodes","groupDefaultExpanded","groupAllowUnbalanced","initialGroupOrderComparator","groupHideOpenParents","groupDisplayType"]),i=new Set(["excludeChildrenWhenTreeDataFiltering"]),s=new Set(["removePivotHeaderRowWhenSingleValueColumn","pivotRowTotals","pivotColumnGroupTotals","suppressExpandablePivotGroups"]),o=new Set(["getGroupRowAgg","alwaysAggregateAtRootLevel","groupIncludeTotalFooter","suppressAggFilteredOnly","grandTotalRow"]),r=new Set(["postSortRows","groupDisplayType","accentedSort"]),n=new Set([]),l=new Set(["groupRemoveSingleChildren","groupRemoveLowestSingleChildren","groupIncludeFooter","groupTotalRow"]),a=[...e,...t,...i,...s,...s,...o,...r,...n,...l];this.addManagedPropertyListeners(a,a=>{var h;let d=null==(h=a.changeSet)?void 0:h.properties;if(!d)return;let u=e=>d.some(t=>e.has(t));if(u(e)){this.setRowData(this.rootNode.allLeafChildren.map(e=>e.data));return}if(u(t)){this.refreshModel({step:"group"});return}if(u(i)){this.refreshModel({step:"filter"});return}if(u(s)){this.refreshModel({step:"pivot"});return}if(u(o)){this.refreshModel({step:"aggregate"});return}if(u(r)){this.refreshModel({step:"sort"});return}if(u(n)){this.refreshModel({step:"filter_aggregates"});return}u(l)&&this.refreshModel({step:"map"})}),this.addManagedPropertyListener("rowHeight",()=>this.resetRowHeights())}start(){this.hasStarted=!0,this.shouldSkipSettingDataOnStart?this.dispatchUpdateEventsAndRefresh():this.setInitialData()}setInitialData(){let e=this.gos.get("rowData");e&&(this.shouldSkipSettingDataOnStart=!0,this.setRowData(e))}ensureRowHeightsValid(e,t,i,s){let o;let r=!1;do{o=!1;let n=this.getRowIndexAtPixel(e),l=this.getRowIndexAtPixel(t),a=Math.max(n,i),h=Math.min(l,s);for(let e=a;
267e<=h;e++){let t=this.getRow(e);if(t.rowHeightEstimated){let e=this.gos.getRowHeightForNode(t);t.setRowHeight(e.height),o=!0,r=!0}}o&&this.setRowTopAndRowIndex()}while(o);return r}setRowTopAndRowIndex(){let e=this.environment.getDefaultRowHeight(),t=0,i=new Set,s=this.gos.isDomLayout("normal");for(let o=0;o<this.rowsToDisplay.length;o++){let r=this.rowsToDisplay[o];if(null!=r.id&&i.add(r.id),null==r.rowHeight){let t=this.gos.getRowHeightForNode(r,s,e);r.setRowHeight(t.height,t.estimated)}r.setRowTop(t),r.setRowIndex(o),t+=r.rowHeight}return i}clearRowTopAndRowIndex(e,t){let i=e.isActive(),s=e=>{e&&null!=e.id&&!t.has(e.id)&&e.clearRowTopAndRowIndex()},o=e=>{if(s(e),s(e.detailNode),s(e.sibling),e.hasChildren()&&e.childrenAfterGroup){let t=-1==e.level;(!i||t||e.expanded)&&e.childrenAfterGroup.forEach(o)}};o(this.rootNode)}ensureRowsAtPixel(e,t,i=0){let s=this.getRowIndexAtPixel(t),o=this.getRow(s),r=!this.gos.get("suppressAnimationFrame");return o!==e[0]&&(e.forEach(e=>{sJ.removeFromArray(this.rootNode.allLeafChildren,e)}),e.forEach((e,t)=>{sJ.insertIntoArray(this.rootNode.allLeafChildren,e,Math.max(s+i,0)+t)}),this.refreshModel({step:"group",keepRenderedRows:!0,keepEditingRows:!0,animate:r}),!0)}highlightRowAtPixel(e,t){let i=null!=t?this.getRowIndexAtPixel(t):null,s=null!=i?this.getRow(i):null;if(!s||!e||s===e||null==t){this.lastHighlightedRow&&(this.lastHighlightedRow.setHighlighted(null),this.lastHighlightedRow=null);return}let o=this.getHighlightPosition(t,s);this.lastHighlightedRow&&this.lastHighlightedRow!==s&&(this.lastHighlightedRow.setHighlighted(null),this.lastHighlightedRow=null),s.setHighlighted(o),this.lastHighlightedRow=s}getHighlightPosition(e,t){if(!t){let i=this.getRowIndexAtPixel(e);if(!(t=this.getRow(i||0)))return 1}let{rowTop:i,rowHeight:s}=t;return e-i<s/2?0:1}getLastHighlightedRowNode(){return this.lastHighlightedRow}isLastRowIndexKnown(){return!0}getRowCount(){return this.rowsToDisplay?this.rowsToDisplay.length:0}getTopLevelRowCount(){if(this.rowsToDisplay&&this.rowsToDisplay[0]===this.rootNode)return 1;let e=this.rootNode.childrenAfterAggFilter;return e?e.length:0}getTopLevelRowDisplayedIndex(e){if(this.rowsToDisplay&&this.rowsToDisplay[0]===this.rootNode)return e;let t=this.rootNode.childrenAfterSort[e];if(this.gos.get("groupHideOpenParents"))for(;t.expanded&&t.childrenAfterSort&&t.childrenAfterSort.length>0;)t=t.childrenAfterSort[0];return t.rowIndex}getRowBounds(e){if(sJ.missing(this.rowsToDisplay))return null;let t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null}onRowGroupOpened(){let e=this.gos.isAnimateRows();this.refreshModel({step:"map",keepRenderedRows:!0,animate:e})}onFilterChanged(e){if(e.afterDataChange)return;let t=this.gos.isAnimateRows(),i=0===e.columns.length||e.columns.some(e=>e.isPrimary());this.refreshModel({step:i?"filter":"filter_aggregates",keepRenderedRows:!0,animate:t})}onSortChanged(){let e=this.gos.isAnimateRows();this.refreshModel({step:"sort",keepRenderedRows:!0,animate:e,keepEditingRows:!0})}getType(){return"clientSide"}onValueChanged(){this.columnModel.isPivotActive()?this.refreshModel({step:"pivot"}):this.refreshModel({step:"aggregate"})}createChangePath(e){let t=sJ.missingOrEmpty(e),i=new lI(!1,this.rootNode);return(t||this.gos.get("treeData"))&&i.setInactive(),i}isSuppressModelUpdateAfterUpdateTransaction(e){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction")||null==e.rowNodeTransactions)return!1;let t=e.rowNodeTransactions.filter(e=>null!=e.add&&e.add.length>0||null!=e.remove&&e.remove.length>0);return null==t||0==t.length}buildRefreshModelParams(e){let t="group",i={everything:"group",group:"group",filter:"filter",map:"map",aggregate:"aggregate",sort:"sort",pivot:"pivot"};if(sJ.exists(e)&&(t=i[e]),sJ.missing(t)){console.error(`AG Grid: invalid step ${e}, available steps are ${Object.keys(i).join(", ")}`);return}return{step:t,keepRenderedRows:!0,keepEditingRows:!0,animate:!this.gos.get("suppressAnimationFrame")}}refreshModel(e){if(!this.hasStarted||this.isRefreshingModel||this.columnModel.shouldRowModelIgnoreRefresh())return;let t="object"==typeof e&&"step"in e?e:this.buildRefreshModelParams(e);if(!t||this.isSuppressModelUpdateAfterUpdateTransaction(t))return;let i=this.createChangePath(t.rowNodeTransactions);switch(this.isRefreshingModel=!0,t.step){case"group":this.doRowGrouping(t.rowNodeTransactions,t.rowNodeOrder,i,!!t.afterColumnsChanged);case"filter":this.doFilter(i);case"pivot":this.doPivot(i);case"aggregate":this.doAggregate(i);case"filter_aggregates":this.doFilterAggregates(i);case"sort":this.doSort(t.rowNodeTransactions,i);case"map":this.doRowsToDisplay()}let s=this.setRowTopAndRowIndex();this.clearRowTopAndRowIndex(i,s),this.isRefreshingModel=!1;let o={type:tP.EVENT_MODEL_UPDATED,animate:t.animate,keepRenderedRows:t.keepRenderedRows,newD
267ata:t.newData,newPage:!1,keepUndoRedoStack:t.keepUndoRedoStack};this.eventService.dispatchEvent(o)}isEmpty(){let e=sJ.missing(this.rootNode.allLeafChildren)||0===this.rootNode.allLeafChildren.length;return sJ.missing(this.rootNode)||e||!this.columnModel.isReady()}isRowsToRender(){return sJ.exists(this.rowsToDisplay)&&this.rowsToDisplay.length>0}getNodesInRangeForSelection(e,t){let i=!t,s=!1,o=[],r=this.gos.get("groupSelectsChildren");return this.forEachNodeAfterFilterAndSort(n=>{if(!s){if(i&&(n===t||n===e)&&(s=!0,n.group&&r)){o.push(...n.allLeafChildren);return}if(!i){if(n!==t&&n!==e)return;i=!0}if(!n.group||!r){o.push(n);return}}}),o}setDatasource(e){console.error("AG Grid: should never call setDatasource on clientSideRowController")}getTopLevelNodes(){return this.rootNode?this.rootNode.childrenAfterGroup:null}getRootNode(){return this.rootNode}getRow(e){return this.rowsToDisplay[e]}isRowPresent(e){return this.rowsToDisplay.indexOf(e)>=0}getRowIndexAtPixel(e){if(this.isEmpty()||0===this.rowsToDisplay.length)return -1;let t=0,i=this.rowsToDisplay.length-1;if(e<=0)return 0;if(sJ.last(this.rowsToDisplay).rowTop<=e)return this.rowsToDisplay.length-1;let s=-1,o=-1;for(;;){let r=Math.floor((t+i)/2),n=this.rowsToDisplay[r];if(this.isRowInPixel(n,e)||(n.rowTop<e?t=r+1:n.rowTop>e&&(i=r-1),s===t&&o===i))return r;s=t,o=i}}isRowInPixel(e,t){let i=e.rowTop,s=e.rowTop+e.rowHeight;return i<=t&&s>t}forEachLeafNode(e){this.rootNode.allLeafChildren&&this.rootNode.allLeafChildren.forEach((t,i)=>e(t,i))}forEachNode(e,t=!1){this.recursivelyWalkNodesAndCallback({nodes:[...this.rootNode.childrenAfterGroup||[]],callback:e,recursionType:0,index:0,includeFooterNodes:t})}forEachNodeAfterFilter(e,t=!1){this.recursivelyWalkNodesAndCallback({nodes:[...this.rootNode.childrenAfterAggFilter||[]],callback:e,recursionType:1,index:0,includeFooterNodes:t})}forEachNodeAfterFilterAndSort(e,t=!1){this.recursivelyWalkNodesAndCallback({nodes:[...this.rootNode.childrenAfterSort||[]],callback:e,recursionType:2,index:0,includeFooterNodes:t})}forEachPivotNode(e,t=!1){this.recursivelyWalkNodesAndCallback({nodes:[this.rootNode],callback:e,recursionType:3,index:0,includeFooterNodes:t})}recursivelyWalkNodesAndCallback(e){let{nodes:t,callback:i,recursionType:s,includeFooterNodes:o}=e,{index:r}=e,n=e=>{var s;let n=null==(s=t[0])?void 0:s.parent;if(!n)return;let l=o&&this.gos.getGrandTotalRow(),a=this.gos.getGroupTotalRowCallback(),h=o&&a({node:n});if(n===this.rootNode){l===e&&(n.createFooter(),i(n.sibling,r++));return}h===e&&(n.createFooter(),i(n.sibling,r++))};n("top");for(let e=0;e<t.length;e++){let n=t[e];if(i(n,r++),n.hasChildren()&&!n.footer){let e=null;switch(s){case 0:e=n.childrenAfterGroup;break;case 1:e=n.childrenAfterAggFilter;break;case 2:e=n.childrenAfterSort;break;case 3:e=n.leafGroup?null:n.childrenAfterSort}e&&(r=this.recursivelyWalkNodesAndCallback({nodes:[...e],callback:i,recursionType:s,index:r,includeFooterNodes:o}))}}return n("bottom"),r}doAggregate(e){var t;null==(t=this.aggregationStage)||t.execute({rowNode:this.rootNode,changedPath:e})}doFilterAggregates(e){this.filterAggregatesStage?this.filterAggregatesStage.execute({rowNode:this.rootNode,changedPath:e}):this.rootNode.childrenAfterAggFilter=this.rootNode.childrenAfterFilter}expandOrCollapseAll(e){let t=this.gos.get("treeData"),i=this.columnModel.isPivotActive(),s=o=>{o&&o.forEach(o=>{let r=()=>{o.expanded=e,s(o.childrenAfterGroup)};if(t){sJ.exists(o.childrenAfterGroup)&&r();return}if(i){o.leafGroup||r();return}o.group&&r()})};this.rootNode&&s(this.rootNode.childrenAfterGroup),this.refreshModel({step:"map"});let o={type:tP.EVENT_EXPAND_COLLAPSE_ALL,source:e?"expandAll":"collapseAll"};this.eventService.dispatchEvent(o)}doSort(e,t){this.sortStage.execute({rowNode:this.rootNode,rowNodeTransactions:e,changedPath:t})}doRowGrouping(e,t,i,s){if(this.groupStage){if(e?this.groupStage.execute({rowNode:this.rootNode,rowNodeTransactions:e,rowNodeOrder:t,changedPath:i}):this.groupStage.execute({rowNode:this.rootNode,changedPath:i,afterColumnsChanged:s}),this.gos.get("groupSelectsChildren")&&this.selectionService.updateGroupsFromChildrenSelections("rowGroupChanged",i)){let e={type:tP.EVENT_SELECTION_CHANGED,source:"rowGroupChanged"};this.eventService.dispatchEvent(e)}}else this.rootNode.childrenAfterGroup=this.rootNode.allLeafChildren,this.rootNode.sibling&&(this.rootNode.sibling.childrenAfterGroup=this.rootNode.childrenAfterGroup),this.rootNode.updateHasChildren();this.nodeManager.isRowCountReady()&&(this.rowCountReady=!0,this.eventService.dispatchEventOnce({type:tP.EVENT_ROW_COUNT_READY}))}doFilter(e){this.filterStage.execute({rowNode:this.rootNode,changedPath:e})}doPivot(e){var t;null==(t=this.pivotStage)||t.execute({rowNode:this.rootNode,changedPath:e})}getCopyOfNodesMap(){return this.nodeManager.getCopyOfNodesMap()}getRowNode(e){if("string"==typeof e&&0==e.indexOf(rt.ID_PREFIX_ROW_GROUP)){let t;return this.forEachNode(i=>{i.id===e&&(t=i)}),t}return this.nodeManager.getRowNode(e)}setRowData(e){this.selectionService.reset("rowDataChanged"),this.nodeManager.setRowData(e),this.hasStarted&&this.dispatchUpdateEventsAndRefresh()}dispatchUpdateEventsAndRefresh(){let e={type:tP.EVENT_ROW_DATA_UPDATED};this.eventService.dispatchEvent(e),this.refreshModel({step:"group",newData:!0})}batchUpdateRowData(e,t){if(null==this.applyAsyncTransactionsTimeout){this.rowDataTransactionBatch=[];let e=this.gos.getAsyncTransactionWaitMillis();this.applyAsyncTransactionsTimeout=window.setTimeout(()=>{this.executeBatchUpdateRowData()},e)}this.rowDataTransactionBatch.push({rowDataTransaction:e,callback:t})}flushAsyncTransactions(){null!=this.applyAsyncTransactionsTimeout&&(clearTimeout(this.applyAsyncTransactionsTimeout),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){this.valueCache.onDataChanged();let e=[],t=[],i=!1;if(this.rowDataTransactionBatch&&this.rowDataTransactionBatch.forEac
267h(s=>{let o=this.nodeManager.updateRowData(s.rowDataTransaction,void 0);t.push(o),s.callback&&e.push(s.callback.bind(null,o)),"number"==typeof s.rowDataTransaction.addIndex&&(i=!0)}),this.commonUpdateRowData(t,void 0,i),e.length>0&&window.setTimeout(()=>{e.forEach(e=>e())},0),t.length>0){let e={type:tP.EVENT_ASYNC_TRANSACTIONS_FLUSHED,results:t};this.eventService.dispatchEvent(e)}this.rowDataTransactionBatch=null,this.applyAsyncTransactionsTimeout=void 0}updateRowData(e,t){this.valueCache.onDataChanged();let i=this.nodeManager.updateRowData(e,t),s="number"==typeof e.addIndex;return this.commonUpdateRowData([i],t,s),i}createRowNodeOrder(){if(this.gos.get("suppressMaintainUnsortedOrder"))return;let e={};if(this.rootNode&&this.rootNode.allLeafChildren)for(let t=0;t<this.rootNode.allLeafChildren.length;t++)e[this.rootNode.allLeafChildren[t].id]=t;return e}commonUpdateRowData(e,t,i){if(!this.hasStarted)return;let s=!this.gos.get("suppressAnimationFrame");i&&(t=this.createRowNodeOrder());let o={type:tP.EVENT_ROW_DATA_UPDATED};this.eventService.dispatchEvent(o),this.refreshModel({step:"group",rowNodeTransactions:e,rowNodeOrder:t,keepRenderedRows:!0,keepEditingRows:!0,animate:s})}doRowsToDisplay(){this.rowsToDisplay=this.flattenStage.execute({rowNode:this.rootNode})}onRowHeightChanged(){this.refreshModel({step:"map",keepRenderedRows:!0,keepEditingRows:!0,keepUndoRedoStack:!0})}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}resetRowHeights(){let e=this.resetRowHeightsForAllRowNodes();this.rootNode.setRowHeight(this.rootNode.rowHeight,!0),this.rootNode.sibling&&this.rootNode.sibling.setRowHeight(this.rootNode.sibling.rowHeight,!0),e&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode(t=>{t.setRowHeight(t.rowHeight,!0);let i=t.detailNode;i&&i.setRowHeight(i.rowHeight,!0),t.sibling&&t.sibling.setRowHeight(t.sibling.rowHeight,!0),e=!0}),e}onGridStylesChanges(){this.columnModel.isAutoRowHeightActive()||this.resetRowHeights()}onGridReady(){this.hasStarted||this.setInitialData()}isRowDataLoaded(){return this.rowCountReady}};K([eB("columnModel")],hC.prototype,"columnModel",2),K([eB("selectionService")],hC.prototype,"selectionService",2),K([eB("valueCache")],hC.prototype,"valueCache",2),K([eB("beans")],hC.prototype,"beans",2),K([eB("filterStage")],hC.prototype,"filterStage",2),K([eB("sortStage")],hC.prototype,"sortStage",2),K([eB("flattenStage")],hC.prototype,"flattenStage",2),K([eW("groupStage")],hC.prototype,"groupStage",2),K([eW("aggregationStage")],hC.prototype,"aggregationStage",2),K([eW("pivotStage")],hC.prototype,"pivotStage",2),K([eW("filterAggregatesStage")],hC.prototype,"filterAggregatesStage",2),K([eV],hC.prototype,"init",1),hC=K([ek("rowModel")],hC);var hv=class extends tR{execute(e){let{changedPath:t}=e;this.filterService.filter(t)}};K([eB("filterService")],hv.prototype,"filterService",2),hv=K([ek("filterStage")],hv);var hf=class extends tR{execute(e){let t=this.sortController.getSortOptions(),i=sJ.exists(t)&&t.length>0,s=i&&sJ.exists(e.rowNodeTransactions)&&this.gos.get("deltaSort"),o=t.some(e=>this.gos.isColumnsSortingCoupledToGroup()?e.column.isPrimary()&&e.column.isRowGroupActive():!!e.column.getColDef().showRowGroup);this.sortService.sort(t,i,s,e.rowNodeTransactions,e.changedPath,o)}};K([eB("sortService")],hf.prototype,"sortService",2),K([eB("sortController")],hf.prototype,"sortController",2),hf=K([ek("sortStage")],hf);var hw=class extends tR{execute(e){let t=e.rowNode,i=[],s=this.beans.columnModel.isPivotMode(),o=s&&t.leafGroup,r=o?[t]:t.childrenAfterSort,n=this.getFlattenDetails();this.recursivelyAddToRowsToDisplay(n,r,i,s,0);let l=i.length>0;if(!o&&l&&n.grandTotalRow){t.createFooter();let e="top"===n.grandTotalRow;this.addRowNodeToRowsToDisplay(n,t.sibling,i,0,e)}return i}getFlattenDetails(){let e=this.gos.get("groupRemoveSingleChildren");return{groupRemoveLowestSingleChildren:!e&&this.gos.get("groupRemoveLowestSingleChildren"),groupRemoveSingleChildren:e,isGroupMultiAutoColumn:this.gos.isGroupMultiAutoColumn(),hideOpenParents:this.gos.get("groupHideOpenParents"),grandTotalRow:this.gos.getGrandTotalRow(),groupTotalRow:this.gos.getGroupTotalRowCallback()}}recursivelyAddToRowsToDisplay(e,t,i,s,o){if(!sJ.missingOrEmpty(t))for(let r=0;r<t.length;r++){let n=t[r],l=n.hasChildren(),a=s&&!l,h=e.groupRemoveSingleChildren&&l&&1===n.childrenAfterGroup.length,d=e.groupRemoveLowestSingleChildren&&l&&n.leafGroup&&1===n.childrenAfterGroup.length,u=s&&n.leafGroup,c=e.hideOpenParents&&n.expanded&&!n.master&&!u;if(a||c||h||d||this.addRowNodeToRowsToDisplay(e,n,i,o),!s||!n.leafGroup){if(l){let t=h||d;if(n.expanded||t){let r=e.groupTotalRow({node:n});r||n.destroyFooter();let l=t?o:o+1;"top"===r&&(n.createFooter(),this.addRowNodeToRowsToDisplay(e,n.sibling,i,l)),this.recursivelyAddToRowsToDisplay(e,n.childrenAfterSort,i,s,l),"bottom"===r&&(n.createFooter(),this.addRowNodeToRowsToDisplay(e,n.sibling,i,l))}}else if(n.master&&n.expanded){let t=this.createDetailNode(n);this.addRowNodeToRowsToDisplay(e,t,i,o)}}}}
267addRowNodeToRowsToDisplay(e,t,i,s,o){o?i.unshift(t):i.push(t),t.setUiLevel(e.isGroupMultiAutoColumn?0:s)}createDetailNode(e){if(sJ.exists(e.detailNode))return e.detailNode;let t=new rt(this.beans);return t.detail=!0,t.selectable=!1,t.parent=e,sJ.exists(e.id)&&(t.id="detail_"+e.id),t.data=e.data,t.level=e.level+1,e.detailNode=t,t}};K([eB("beans")],hw.prototype,"beans",2),hw=K([ek("flattenStage")],hw);var hE=class extends tR{sort(e,t,i,s,o,r){let n=this.gos.get("groupMaintainOrder"),l=this.columnModel.getAllGridColumns().some(e=>e.isRowGroupActive()),a={};i&&s&&(a=this.calculateDirtyNodes(s));let h=this.columnModel.isPivotMode(),d=this.gos.getCallback("postSortRows");o&&o.forEachChangedNodeDepthFirst(s=>{var u;this.pullDownGroupDataForHideOpenParents(s.childrenAfterAggFilter,!0);let c=h&&s.leafGroup;if(n&&l&&!s.leafGroup&&!r){let e=null==(u=this.columnModel.getRowGroupColumns())?void 0:u[s.level+1],t=(null==e?void 0:e.getSort())===null,i=s.childrenAfterAggFilter.slice(0);if(s.childrenAfterSort&&!t){let e={};s.childrenAfterSort.forEach((t,i)=>{e[t.id]=i}),i.sort((t,i)=>{var s,o;return(null!=(s=e[t.id])?s:0)-(null!=(o=e[i.id])?o:0)})}s.childrenAfterSort=i}else!t||c?s.childrenAfterSort=s.childrenAfterAggFilter.slice(0):i?s.childrenAfterSort=this.doDeltaSort(s,a,o,e):s.childrenAfterSort=this.rowNodeSorter.doFullSort(s.childrenAfterAggFilter,e);s.sibling&&(s.sibling.childrenAfterSort=s.childrenAfterSort),this.updateChildIndexes(s),d&&d({nodes:s.childrenAfterSort})}),this.updateGroupDataForHideOpenParents(o)}calculateDirtyNodes(e){let t={},i=e=>{e&&e.forEach(e=>t[e.id]=!0)};return e&&e.forEach(e=>{i(e.add),i(e.update),i(e.remove)}),t}doDeltaSort(e,t,i,s){let o=e.childrenAfterAggFilter,r=e.childrenAfterSort;if(!r)return this.rowNodeSorter.doFullSort(o,s);let n={},l=[];o.forEach(e=>{t[e.id]||!i.canSkip(e)?l.push(e):n[e.id]=!0});let a=r.filter(e=>n[e.id]),h=(e,t)=>({currentPos:t,rowNode:e}),d=l.map(h).sort((e,t)=>this.rowNodeSorter.compareRowNodes(s,e,t));return this.mergeSortedArrays(s,d,a.map(h)).map(({rowNode:e})=>e)}mergeSortedArrays(e,t,i){let s=[],o=0,r=0;for(;o<t.length&&r<i.length;)0>this.rowNodeSorter.compareRowNodes(e,t[o],i[r])?s.push(t[o++]):s.push(i[r++]);for(;o<t.length;)s.push(t[o++]);for(;r<i.length;)s.push(i[r++]);return s}updateChildIndexes(e){if(sJ.missing(e.childrenAfterSort))return;let t=e.childrenAfterSort;for(let i=0;i<t.length;i++){let s=t[i],o=0===i,r=i===e.childrenAfterSort.length-1;s.setFirstChild(o),s.setLastChild(r),s.setChildIndex(i)}}updateGroupDataForHideOpenParents(e){if(!this.gos.get("groupHideOpenParents"))return;if(this.gos.get("treeData"))return sJ.warnOnce("The property hideOpenParents dose not work with Tree Data. This is because Tree Data has values at the group level, it doesn't make sense to hide them."),!1;let t=e=>{this.pullDownGroupDataForHideOpenParents(e.childrenAfterSort,!1),e.childrenAfterSort.forEach(e=>{e.hasChildren()&&t(e)})};e&&e.executeFromRootNode(e=>t(e))}pullDownGroupDataForHideOpenParents(e,t){!this.gos.get("groupHideOpenParents")||sJ.missing(e)||e.forEach(e=>{this.columnModel.getGroupDisplayColumns().forEach(i=>{let s=i.getColDef().showRowGroup;if("string"!=typeof s){console.error("AG Grid: groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup");return}let o=this.columnModel.getPrimaryColumn(s);if(o!==e.rowGroupColumn){if(t)e.setGroupValue(i.getId(),void 0);else{let t=e.getFirstChildOfFirstChild(o);t&&e.setGroupValue(i.getId(),t.key)}}})})}};K([eB("columnModel")],hE.prototype,"columnModel",2),K([eB("rowNodeSorter")],hE.prototype,"rowNodeSorter",2),hE=K([ek("sortService")],hE);var hS=class extends tR{filter(e){let t=this.filterManager.isChildFilterPresent();this.filterNodes(t,e)}filterNodes(e,t){let i=(t,i)=>{t.hasChildren()&&e&&!i?t.childrenAfterFilter=t.childrenAfterGroup.filter(e=>{let t=e.childrenAfterFilter&&e.childrenAfterFilter.length>0,i=e.data&&this.filterManager.doesRowPassFilter({rowNode:e});return t||i}):t.childrenAfterFilter=t.childrenAfterGroup,t.sibling&&(t.sibling.childrenAfterFilter=t.childrenAfterFilter)};if(this.doingTreeDataFiltering()){let e=(t,s)=>{if(t.childrenAfterGroup)for(let o=0;o<t.childrenAfterGroup.length;o++){let r=t.childrenAfterGroup[o],n=s||this.filterManager.doesRowPassFilter({rowNode:r});r.childrenAfterGroup?e(t.childrenAfterGroup[o],n):i(r,n)}i(t,s)};t.executeFromRootNode(t=>e(t,!1))}else t.forEachChangedNodeDepthFirst(e=>i(e,!1),!0)}doingTreeDataFiltering(){return this.gos.get("treeData")&&!this.gos.get("excludeChildrenWhenTreeDataFiltering")}};K([eB("filterManager")],hS.prototype,"filterManager",2),hS=K([ek("filterService")],hS);var hy=class extends tR{postConstruct(){"clientSide"===this.rowModel.getType()&&(this.clientSideRowModel=this.rowModel,this.addManagedPropertyListener("rowData",()=>this.onRowDataUpdated()))}isActive(){let e=this.gos.exists("getRowId");return!this.gos.get("resetRowDataOnUpdate")&&e}setRowData(e){let t=this.createTransactionForRowData(e);if(!t)return;let[i,s]=t;this.clientSideRowModel.updateRowData(i,s)}createTransactionForRowData(e){if(sJ.missing(this.clientSideRowModel)){console.error("AG Grid: ImmutableService only works with ClientSideRowModel");return}let t=this.gos.getCallback("getRowId");if(null==t){console.error("AG Grid: ImmutableService requires getRowId() callback to be implemented, your row data needs IDs!");return}let i={remove:[],update:[],add:[]},s=this.clientSideRowModel.getCopyOfNodesMap(),o=this.gos.get("suppressMaintainUnsortedOrder")?void 0:{};return sJ.exists(e)&&e.forEach((e,r)=>{let n=t({data:e,level:0}),l=s[n];o&&(o[n]=r),l?(l.data!==e&&i.update.push(e),s[n]=void 0):i.add.push(e)}
267),sJ.iterateObject(s,(e,t)=>{t&&i.remove.push(t.data)}),[i,o]}onRowDataUpdated(){let e=this.gos.get("rowData");e&&(this.isActive()?this.setRowData(e):(this.selectionService.reset("rowDataChanged"),this.clientSideRowModel.setRowData(e)))}};K([eB("rowModel")],hy.prototype,"rowModel",2),K([eB("rowRenderer")],hy.prototype,"rowRenderer",2),K([eB("selectionService")],hy.prototype,"selectionService",2),K([eV],hy.prototype,"postConstruct",1);var hR={version:"31.3.4",moduleName:"@ag-grid-community/client-side-row-model",rowModel:"clientSide",beans:[hC,hv,hf,hw,hE,hS,hy=K([ek("immutableService")],hy)]},hD=Object.defineProperty,hT=Object.getOwnPropertyDescriptor,hb=(e,t,i,s)=>{for(var o,r=s>1?void 0:s?hT(t,i):t,n=e.length-1;n>=0;n--)(o=e[n])&&(r=(s?o(t,i,r):o(r))||r);return s&&r&&hD(t,i,r),r},hA=class extends lO{constructor(e,t,i){super(e),this.parentCache=t,this.params=i,this.startRow=e*i.blockSize,this.endRow=this.startRow+i.blockSize}postConstruct(){this.createRowNodes()}getBlockStateJson(){return{id:""+this.getId(),state:{blockNumber:this.getId(),startRow:this.getStartRow(),endRow:this.getEndRow(),pageStatus:this.getState()}}}setDataAndId(e,t,i){sJ.exists(t)?e.setDataAndId(t,i.toString()):e.setDataAndId(void 0,void 0)}loadFromDatasource(){let e=this.createLoadParams();if(sJ.missing(this.params.datasource.getRows)){console.warn("AG Grid: datasource is missing getRows method");return}window.setTimeout(()=>{this.params.datasource.getRows(e)},0)}processServerFail(){}createLoadParams(){return{startRow:this.getStartRow(),endRow:this.getEndRow(),successCallback:this.pageLoaded.bind(this,this.getVersion()),failCallback:this.pageLoadFailed.bind(this,this.getVersion()),sortModel:this.params.sortModel,filterModel:this.params.filterModel,context:this.gos.getGridCommonParams().context}}forEachNode(e,t,i){this.rowNodes.forEach((s,o)=>{this.startRow+o<i&&e(s,t.next())})}getLastAccessed(){return this.lastAccessed}getRow(e,t=!1){t||(this.lastAccessed=this.params.lastAccessedSequence.next());let i=e-this.startRow;return this.rowNodes[i]}getStartRow(){return this.startRow}getEndRow(){return this.endRow}createRowNodes(){this.rowNodes=[];for(let e=0;e<this.params.blockSize;e++){let t=this.startRow+e,i=new rt(this.beans);i.setRowHeight(this.params.rowHeight),i.uiLevel=0,i.setRowIndex(t),i.setRowTop(this.params.rowHeight*t),this.rowNodes.push(i)}}processServerResult(e){this.rowNodes.forEach((t,i)=>{let s=e.rowData?e.rowData[i]:void 0;!t.id&&t.alreadyRendered&&s&&(this.rowNodes[i]=new rt(this.beans),this.rowNodes[i].setRowIndex(t.rowIndex),this.rowNodes[i].setRowTop(t.rowTop),this.rowNodes[i].setRowHeight(t.rowHeight),t.clearRowTopAndRowIndex()),this.setDataAndId(this.rowNodes[i],s,this.startRow+i)});let t=null!=e.rowCount&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,t)}destroyRowNodes(){this.rowNodes.forEach(e=>{e.clearRowTopAndRowIndex()})}};hb([eB("beans")],hA.prototype,"beans",2),hb([eV],hA.prototype,"postConstruct",1),hb([eH],hA.prototype,"destroyRowNodes",1);var hP=class e extends tR{constructor(e){super(),this.lastRowIndexKnown=!1,this.blocks={},this.blockCount=0,this.rowCount=e.initialRowCount,this.params=e}setBeans(e){this.logger=e.create("InfiniteCache")}getRow(e,t=!1){let i=Math.floor(e/this.params.blockSize),s=this.blocks[i];if(!s){if(t)return;s=this.createBlock(i)}return s.getRow(e)}createBlock(e){let t=this.createBean(new hA(e,this,this.params));return this.blocks[t.getId()]=t,this.blockCount++,this.purgeBlocksIfNeeded(t),this.params.rowNodeBlockLoader.addBlock(t),t}refreshCache(){if(0==this.blockCount){this.purgeCache();return}this.getBlocksInOrder().forEach(e=>e.setStateWaitingToLoad()),this.params.rowNodeBlockLoader.checkBlockToLoad()}destroyAllBlocks(){this.getBlocksInOrder().forEach(e=>this.destroyBlock(e))}getRowCount(){return this.rowCount}isLastRowIndexKnown(){return this.lastRowIndexKnown}pageLoaded(e,t){this.isAlive()&&(this.logger.log(`onPageLoaded: page = ${e.getId()}, lastRow = ${t}`),this.checkRowCount(e,t),this.onCacheUpdated())}purgeBlocksIfNeeded(t){let i=this.getBlocksInOrder().filter(e=>e!=t);i.sort((e,t)=>
267t.getLastAccessed()-e.getLastAccessed());let s=this.params.maxBlocksInCache>0,o=s?this.params.maxBlocksInCache-1:null,r=e.MAX_EMPTY_BLOCKS_TO_KEEP-1;i.forEach((e,t)=>{(e.getState()===hA.STATE_WAITING_TO_LOAD&&t>=r||s&&t>=o)&&!(this.isBlockCurrentlyDisplayed(e)||this.isBlockFocused(e))&&this.removeBlockFromCache(e)})}isBlockFocused(e){let t=this.focusService.getFocusCellToUseAfterRefresh();if(!t||null!=t.rowPinned)return!1;let i=e.getStartRow(),s=e.getEndRow();return t.rowIndex>=i&&t.rowIndex<s}isBlockCurrentlyDisplayed(e){let t=e.getStartRow(),i=e.getEndRow()-1;return this.rowRenderer.isRangeInRenderedViewport(t,i)}removeBlockFromCache(e){e&&this.destroyBlock(e)}checkRowCount(e,t){if("number"==typeof t&&t>=0)this.rowCount=t,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){let t=(e.getId()+1)*this.params.blockSize+this.params.overflowSize;this.rowCount<t&&(this.rowCount=t)}}setRowCount(e,t){this.rowCount=e,sJ.exists(t)&&(this.lastRowIndexKnown=t),!this.lastRowIndexKnown&&this.rowCount%this.params.blockSize==0&&this.rowCount++,this.onCacheUpdated()}forEachNodeDeep(e){let t=new sZ;this.getBlocksInOrder().forEach(i=>i.forEachNode(e,t,this.rowCount))}getBlocksInOrder(){return sJ.getAllValuesInObject(this.blocks).sort((e,t)=>e.getId()-t.getId())}destroyBlock(e){delete this.blocks[e.getId()],this.destroyBean(e),this.blockCount--,this.params.rowNodeBlockLoader.removeBlock(e)}onCacheUpdated(){if(this.isAlive()){this.destroyAllBlocksPastVirtualRowCount();let e={type:tP.EVENT_STORE_UPDATED};this.eventService.dispatchEvent(e)}}destroyAllBlocksPastVirtualRowCount(){let e=[];this.getBlocksInOrder().forEach(t=>{t.getId()*this.params.blockSize>=this.rowCount&&e.push(t)}),e.length>0&&e.forEach(e=>this.destroyBlock(e))}purgeCache(){this.getBlocksInOrder().forEach(e=>this.removeBlockFromCache(e)),this.lastRowIndexKnown=!1,0===this.rowCount&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}getRowNodesInRange(e,t){let i=[],s=-1,o=!1,r=new sZ;sJ.missing(e)&&(o=!0);let n=!1;return this.getBlocksInOrder().forEach(l=>{if(!n){if(o&&s+1!==l.getId()){n=!0;return}s=l.getId(),l.forEachNode(s=>{let r=s===e||s===t;(o||r)&&i.push(s),r&&(o=!o)},r,this.rowCount)}}),n||o?[]:i}};hP.MAX_EMPTY_BLOCKS_TO_KEEP=2,hb([eB("rowRenderer")],hP.prototype,"rowRenderer",2),hb([eB("focusService")],hP.prototype,"focusService",2),hb([(s=ez("loggerFactory"),(e,t)=>s(e,t,0))],hP.prototype,"setBeans",1),hb([eH],hP.prototype,"destroyAllBlocks",1);var hF=class extends tR{getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}ensureRowHeightsValid(e,t,i,s){return!1}init(){this.gos.isRowModelType("infinite")&&(this.rowHeight=this.gos.getRowHeightAsNumber(),this.addEventListeners(),this.addDestroyFunc(()=>this.destroyCache()),this.verifyProps())}verifyProps(){this.gos.exists("initialGroupOrderComparator")&&sJ.warnOnce("initialGroupOrderComparator cannot be used with Infinite Row Model as sorting is done on the server side")}start(){this.setDatasource(this.gos.get("datasource"))}destroyDatasource(){this.datasource&&(this.getContext().destroyBean(this.datasource),this.rowRenderer.datasourceChanged(),this.datasource=null)}addEventListeners(){this.addManagedListener(this.eventService,tP.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.addManagedListener(this.eventService,tP.EVENT_SORT_CHANGED,this.onSortChanged.bind(this)),this.addManagedListener(this.eventService,tP.EVENT_NEW_COLUMNS_LOADED,this.onColumnEverything.bind(this)),this.addManagedListener(this.eventService,tP.EVENT_STORE_UPDATED,this.onCacheUpdated.bind(this)),this.addManagedPropertyListener("datasource",()=>this.setDatasource(this.gos.get("datasource"))),this.addManagedPropertyListener("cacheBlockSize",()=>this.resetCache()),this.addManagedPropertyListener("rowHeight",()=>{this.rowHeight=this.gos.getRowHeightAsNumber(),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()})}onFilterChanged(){this.reset()}onSortChanged(){this.reset()}onColumnEverything(){(!this.cacheParams||this.isSortModelDifferent())&&this.reset()}isSortModelDifferent(){return!sJ.jsonEquals(this.cacheParams.sortModel,this.sortController.getSortModel())}getType(){return"infinite"}setDatasource(e){this.destroyDatasource(),this.datasource=e,e&&this.reset()}isEmpty(){return!this.infiniteCache}isRowsToRender(){return!!this.infiniteCache}getNodesInRangeForSelection(e,t){return this.infiniteCache?this.infiniteCache.getRowNodesInRange(e,t):[]}reset(){this.datasource&&(null!=this.gos.getCallback("getRowId")||this.selectionService.reset("rowDataChanged"),this.resetCache())}createModelUpdatedEvent(){return{type:tP.EVENT_MODEL_UPDATED,newPage:!1,newPageSize:!1,newData:!1,keepRenderedRows:!0,animate:!1}}resetCache(){this.destroyCache(),this.cacheParams={datasource:this.datasource,filterModel:this.filterManager.getFilterModel(),sortModel:this.sortController.getSortModel(),rowNodeBlockLoader:this.rowNodeBlockLoader,initialRowCount:this.gos.get("infiniteInitialRowCount"),maxBlocksInCache:this.gos.get("maxBlocksInCache"),rowHeight:this.gos.getRowHeightAsNumber(),overflowSize:this.gos.get("cacheOverflowSize"),blockSize:this.gos.get("cacheBlockSize"),lastAccessedSequence:new sZ},this.infiniteCache=this.createBean(new hP(this.cacheParams)),this.eventService.dispatchEventOnce({type:tP.EVENT_ROW_COUNT_READY});let e=this.createModelUpdatedEvent();this.eventService.dispatchEvent(e)}updateRowHeights(){this.forEachNode(e=>{e.setRowHeight(this.rowHeight),e.setRowTop(this.rowHeight*e.rowIndex)});let e=this.createModelUpdatedEvent();this.eventService.dispatchEvent(e)}destroyCache(){this.infiniteCache&&(this.infiniteCache=this.destroyBean(this.infiniteCache))}
267onCacheUpdated(){let e=this.createModelUpdatedEvent();this.eventService.dispatchEvent(e)}getRow(e){if(!(!this.infiniteCache||e>=this.infiniteCache.getRowCount()))return this.infiniteCache.getRow(e)}getRowNode(e){let t;return this.forEachNode(i=>{i.id===e&&(t=i)}),t}forEachNode(e){this.infiniteCache&&this.infiniteCache.forEachNodeDeep(e)}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(e){return e}getRowIndexAtPixel(e){if(0!==this.rowHeight){let t=Math.floor(e/this.rowHeight),i=this.getRowCount()-1;return t>i?i:t}return 0}getRowCount(){return this.infiniteCache?this.infiniteCache.getRowCount():0}isRowPresent(e){return!!this.getRowNode(e.id)}refreshCache(){this.infiniteCache&&this.infiniteCache.refreshCache()}purgeCache(){this.infiniteCache&&this.infiniteCache.purgeCache()}isLastRowIndexKnown(){return!!this.infiniteCache&&this.infiniteCache.isLastRowIndexKnown()}setRowCount(e,t){this.infiniteCache&&this.infiniteCache.setRowCount(e,t)}};hb([eB("filterManager")],hF.prototype,"filterManager",2),hb([eB("sortController")],hF.prototype,"sortController",2),hb([eB("selectionService")],hF.prototype,"selectionService",2),hb([eB("rowRenderer")],hF.prototype,"rowRenderer",2),hb([eB("rowNodeBlockLoader")],hF.prototype,"rowNodeBlockLoader",2),hb([eV],hF.prototype,"init",1),hb([eH],hF.prototype,"destroyDatasource",1);var hL={version:"31.3.4",moduleName:"@ag-grid-community/infinite-row-model",rowModel:"infinite",beans:[hF=hb([ek("rowModel")],hF)]},hM=Object.defineProperty,hN=Object.defineProperties,hI=Object.getOwnPropertyDescriptor,hG=Object.getOwnPropertyDescriptors,hO=Object.getOwnPropertySymbols,hx=Object.prototype.hasOwnProperty,h_=Object.prototype.propertyIsEnumerable,hV=(e,t,i)=>t in e?hM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,hH=(e,t)=>{for(var i in t||(t={}))hx.call(t,i)&&hV(e,i,t[i]);if(hO)for(var i of hO(t))h_.call(t,i)&&hV(e,i,t[i]);return e},hk=(e,t)=>hN(e,hG(t)),hB=(e,t,i,s)=>{for(var o,r=s>1?void 0:s?hI(t,i):t,n=e.length-1;n>=0;n--)(o=e[n])&&(r=(s?o(t,i,r):o(r))||r);return s&&r&&hM(t,i,r),r},hW=(e,t,i)=>new Promise((s,o)=>{var r=e=>{try{l(i.next(e))}catch(e){o(e)}},n=e=>{try{l(i.throw(e))}catch(e){o(e)}},l=e=>e.done?s(e.value):Promise.resolve(e.value).then(r,n);l((i=i.apply(e,t)).next())}),hU=class{setBeans(e){this.beans=e}getFileName(e){let t=this.getDefaultFileExtension();return null!=e&&e.length||(e=this.getDefaultFileName()),-1===e.indexOf(".")?`${e}.${t}`:e}getData(e){let t=this.createSerializingSession(e);return this.beans.gridSerializer.serialize(t,e)}getDefaultFileName(){return`export.${this.getDefaultFileExtension()}`}},hz=class{constructor(e){this.groupColumns=[];let{columnModel:t,valueService:i,gos:s,processCellCallback:o,processHeaderCallback:r,processGroupHeaderCallback:n,processRowGroupCallback:l}=e;this.columnModel=t,this.valueService=i,this.gos=s,this.processCellCallback=o,this.processHeaderCallback=r,this.processGroupHeaderCallback=n,this.processRowGroupCallback=l}prepare(e){this.groupColumns=e.filter(e=>!!e.getColDef().showRowGroup)}extractHeaderValue(e){let t=this.getHeaderName(this.processHeaderCallback,e);return null!=t?t:""}extractRowCellValue(e,t,i,s,o){let r=(!this.gos.get("groupHideOpenParents")||o.footer)&&this.shouldRenderGroupSummaryCell(o,e,t)?this.createValueForGroupNode(e,o):this.valueService.getValue(e,o);return this.processCell({accumulatedRowIndex:i,rowNode:o,column:e,value:r,processCellCallback:this.processCellCallback,type:s})}shouldRenderGroupSummaryCell(e,t,i){var s;if(!(e&&e.group))return!1;if(-1!==this.groupColumns.indexOf(t)){if((null==(s=e.groupData)?void 0:s[t.getId()])!=null||this.gos.isRowModelType("serverSide")&&e.group)return!0;if(e.footer&&-1===e.level){let e=t.getColDef();return null==e||!0===e.showRowGroup||e.showRowGroup===this.columnModel.getRowGroupColumns()[0].getId()}}let o=this.gos.isGroupUseEntireRow(this.columnModel.isPivotMode());return 0===i&&o}getHeaderName(e,t){return e?e(this.gos.addGridCommonParams({column:t})):this.columnModel.getDisplayNameForColumn(t,"csv",!0)}createValueForGroupNode(e,t){if(this.processRowGroupCallback)return this.processRowGroupCallback(this.gos.addGridCommonParams({column:e,node:t}));let i=this.gos.get("treeData"),s=this.gos.get("suppressGroupMaintainValueType"),o=t=>{var o,r;if(i||s)return t.key;let n=null==(o=t.groupData)?void 0:o[e.getId()];return n&&t.rowGroupColumn&&!1!==t.rowGroupColumn.getColDef().useValueFormatterForExport&&null!=(r=this.valueService.formatValue(t.rowGroupColumn,t,n))?r:n},r=t.footer,n=[o(t)];if(!this.gos.isGroupMultiAutoColumn())for(;t.parent;)n.push(o(t=t.parent));let l=n.reverse().join(" -> ");return r?`Total ${l}`:l}processCell(e){var t;let{accumulatedRowIndex:i,rowNode:s,column:o,value:r,processCellCallback:n,type:l}=e;return n?{value:null!=(t=n(this.gos.addGridCommonParams({accumulatedRowIndex:i,column:o,node:s,value:r,type:l,parseValue:e=>this.valueService.parseValue(o,s,e,this.valueService.getValue(o,s)),formatValue:e=>{var t;return null!=(t=this.valueService.formatValue(o,s,e))?t:e}})))?t:""}:!1!==o.getColDef().useValueFormatterForExport?{value:null!=r?r:"",valueFormatted:this.valueService.formatValue(o,s,r)}:{value:null!=r?r:""}}},hK=class{static download(e,t){let i=document.defaultView||window;if(!i){console.warn("AG Grid: There is no `window` associated with the current `document`");return}let s=document.createElement("a"),o=i.URL.createObjectURL(t);s.setAttribute("href",o),s.setAttribute("download",e),s.style.display="none",document.body.appendChild(s),s.dispatchEvent(new MouseEvent("click",{bubbles:!1,cancelable:!0,view:i})),document.body.removeChild(s),i.setTimeout(()=>{i.URL.revokeObjectURL(o)},0)}},h$=class extends hz{constructor(e){super(e),this.isFirstLine=!0,this.result="";let{suppressQuotes:t,columnSeparator:i}=e;this.suppressQuotes=t,this.columnSeparator=i}addCustomContent(e){e&&("string"==typeof e?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,"\r\n"),this.result+=e):e.forEach(e
267=>{this.beginNewLine(),e.forEach((e,t)=>{0!==t&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(e.data.value||""),e.mergeAcross&&this.appendEmptyCells(e.mergeAcross)})}))}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(e,t,i,s){0!=i&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(s)}appendEmptyCells(e){for(let t=1;t<=e;t++)this.result+=this.columnSeparator+this.putInQuotes("")}onNewHeaderRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}}onNewHeaderRowColumn(e,t){0!=t&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}onNewBodyRowColumn(e,t,i){var s;0!=t&&(this.result+=this.columnSeparator);let o=this.extractRowCellValue(e,t,t,"csv",i);this.result+=this.putInQuotes(null!=(s=o.valueFormatted)?s:o.value)}putInQuotes(e){let t;return this.suppressQuotes?e:null==e?'""':("string"==typeof e?t=e:"function"==typeof e.toString?t=e.toString():(console.warn("AG Grid: unknown value type during csv conversion"),t=""),'"'+t.replace(/"/g,'""')+'"')}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+="\r\n"),this.isFirstLine=!1}},hY=class extends hU{postConstruct(){this.setBeans({gridSerializer:this.gridSerializer,gos:this.gos})}getMergedParams(e){return Object.assign({},this.gos.get("defaultCsvExportParams"),e)}export(e){if(this.isExportSuppressed()){console.warn("AG Grid: Export cancelled. Export is not allowed as per your configuration.");return}let t=this.getMergedParams(e),i=new Blob(["\uFEFF",this.getData(t)],{type:"text/plain"}),s="function"==typeof t.fileName?t.fileName(this.gos.getGridCommonParams()):t.fileName;hK.download(this.getFileName(s),i)}exportDataAsCsv(e){this.export(e)}getDataAsCsv(e,t=!1){let i=t?Object.assign({},e):this.getMergedParams(e);return this.getData(i)}getDefaultFileExtension(){return"csv"}createSerializingSession(e){let{columnModel:t,valueService:i,gos:s}=this,{processCellCallback:o,processHeaderCallback:r,processGroupHeaderCallback:n,processRowGroupCallback:l,suppressQuotes:a,columnSeparator:h}=e;return new h$({columnModel:t,valueService:i,gos:s,processCellCallback:o||void 0,processHeaderCallback:r||void 0,processGroupHeaderCallback:n||void 0,processRowGroupCallback:l||void 0,suppressQuotes:a||!1,columnSeparator:h||","})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}};hB([eB("columnModel")],hY.prototype,"columnModel",2),hB([eB("valueService")],hY.prototype,"valueService",2),hB([eB("gridSerializer")],hY.prototype,"gridSerializer",2),hB([eB("gridOptionsService")],hY.prototype,"gos",2),hB([eV],hY.prototype,"postConstruct",1),hY=hB([ek("csvCreator")],hY);var hj=((R=hj||{})[R.HEADER_GROUPING=0]="HEADER_GROUPING",R[R.HEADER=1]="HEADER",R[R.BODY=2]="BODY",R),hq=class extends tR{serialize(e,t={}){let{allColumns:i,columnKeys:s,skipRowGroups:o}=t,r=this.getColumnsToExport(i,o,s);return sJ.compose(this.prepareSession(r),this.prependContent(t),this.exportColumnGroups(t,r),this.exportHeaders(t,r),this.processPinnedTopRows(t,r),this.processRows(t,r),this.processPinnedBottomRows(t,r),this.appendContent(t))(e).parse()}processRow(e,t,i,s){let o=t.shouldRowBeSkipped||(()=>!1),r=this.gos.get("groupRemoveSingleChildren"),n=this.gos.get("groupRemoveLowestSingleChildren"),l=null!=t.rowPositions||!!t.onlySelected,a=this.gos.get("groupHideOpenParents")&&!l,h=this.columnModel.isPivotMode()?s.leafGroup:!s.group,d=!!s.footer;t.skipRowGroups;let u=n&&s.leafGroup,c=1===s.allChildrenCount&&(r||u);if(!h&&!d&&(t.skipRowGroups||c||a)||t.onlySelected&&!s.isSelected()||t.skipPinnedTop&&"top"===s.rowPinned||t.skipPinnedBottom&&"bottom"===s.rowPinned||-1===s.level&&!h&&!d||o(this.gos.addGridCommonParams({node:s})))return;let p=e.onNewBodyRow(s);if(i.forEach((e,t)=>{p.onColumn(e,t,s)}),t.getCustomContentBelowRow){let i=t.getCustomContentBelowRow(this.gos.addGridCommonParams({node:s}));i&&e.addCustomContent(i)}}appendContent(e){return t=>{let i=e.appendContent;return i&&t.addCustomContent(i),t}}prependContent(e){return t=>{let i=e.prependContent;return i&&t.addCustomContent(i),t}}prepareSession(e){return t=>(t.prepare(e),t)}exportColumnGroups(e,t){return i=>{if(!e.skipColumnGroupHeaders){let s=new tL,o=this.displayedGroupCreator.createDisplayedGroups(t,s,null);this.recursivelyAddHeaderGroups(o,i,e.processGroupHeaderCallback)}return i}}exportHeaders(e,t){return i=>{if(!e.skipColumnHeaders){let e=i.onNewHeaderRow();t.forEach((t,i)=>{e.onColumn(t,i,void 0)})}return i}}processPinnedTopRows(e,t){return i=>{let s=this.processRow.bind(this,i,e,t);return e.rowPositions?e.rowPositions.filter(e=>"top"===e.rowPinned).sort((e,t)=>
267e.rowIndex-t.rowIndex).map(e=>this.pinnedRowModel.getPinnedTopRow(e.rowIndex)).forEach(s):this.pinnedRowModel.forEachPinnedTopRow(s),i}}processRows(e,t){return i=>{let s=this.rowModel,o=s.getType(),r="clientSide"===o,n="serverSide"===o,l=!r&&e.onlySelected,a=this.processRow.bind(this,i,e,t),{exportedRows:h="filteredAndSorted"}=e;if(e.rowPositions)e.rowPositions.filter(e=>null==e.rowPinned).sort((e,t)=>e.rowIndex-t.rowIndex).map(e=>s.getRow(e.rowIndex)).forEach(a);else if(this.columnModel.isPivotMode())r?s.forEachPivotNode(a,!0):n?s.forEachNodeAfterFilterAndSort(a,!0):s.forEachNode(a);else if(e.onlySelectedAllPages||l){let e=this.selectionService.getSelectedNodes();this.replicateSortedOrder(e),e.forEach(a)}else"all"===h?s.forEachNode(a):r?s.forEachNodeAfterFilterAndSort(a,!0):n?s.forEachNodeAfterFilterAndSort(a,!0):s.forEachNode(a);return i}}replicateSortedOrder(e){let t=this.sortController.getSortOptions(),i=(e,s)=>{var o,r,n,l;return null!=e.rowIndex&&null!=s.rowIndex?e.rowIndex-s.rowIndex:e.level===s.level?(null==(o=e.parent)?void 0:o.id)===(null==(r=s.parent)?void 0:r.id)?this.rowNodeSorter.compareRowNodes(t,{rowNode:e,currentPos:null!=(n=e.rowIndex)?n:-1},{rowNode:s,currentPos:null!=(l=s.rowIndex)?l:-1}):i(e.parent,s.parent):e.level>s.level?i(e.parent,s):i(e,s.parent)};e.sort(i)}processPinnedBottomRows(e,t){return i=>{let s=this.processRow.bind(this,i,e,t);return e.rowPositions?e.rowPositions.filter(e=>"bottom"===e.rowPinned).sort((e,t)=>e.rowIndex-t.rowIndex).map(e=>this.pinnedRowModel.getPinnedBottomRow(e.rowIndex)).forEach(s):this.pinnedRowModel.forEachPinnedBottomRow(s),i}}getColumnsToExport(e=!1,t=!1,i){let s=this.columnModel.isPivotMode();if(i&&i.length)return this.columnModel.getGridColumns(i);let o=this.gos.get("treeData"),r=[];return r=e&&!s?this.columnModel.getAllGridColumns():this.columnModel.getAllDisplayedColumns(),t&&!o&&(r=r.filter(e=>e.getColId()!==tM)),r}recursivelyAddHeaderGroups(e,t,i){let s=[];e.forEach(e=>
267{e.getChildren&&e.getChildren().forEach(e=>s.push(e))}),e.length>0&&e[0]instanceof tA&&this.doAddHeaderHeader(t,e,i),s&&s.length>0&&this.recursivelyAddHeaderGroups(s,t,i)}doAddHeaderHeader(e,t,i){let s=e.onNewHeaderGroupingRow(),o=0;t.forEach(e=>{let t;t=i?i(this.gos.addGridCommonParams({columnGroup:e})):this.columnModel.getDisplayNameForColumnGroup(e,"header");let r=e.getLeafColumns().reduce((e,t,i,s)=>{let o=sJ.last(e);return"open"===t.getColumnGroupShow()?o&&null==o[1]||(o=[i],e.push(o)):o&&null==o[1]&&(o[1]=i-1),i===s.length-1&&o&&null==o[1]&&(o[1]=i),e},[]);s.onColumn(e,t||"",o++,e.getLeafColumns().length-1,r)})}};hB([eB("displayedGroupCreator")],hq.prototype,"displayedGroupCreator",2),hB([eB("columnModel")],hq.prototype,"columnModel",2),hB([eB("rowModel")],hq.prototype,"rowModel",2),hB([eB("pinnedRowModel")],hq.prototype,"pinnedRowModel",2),hB([eB("selectionService")],hq.prototype,"selectionService",2),hB([eB("rowNodeSorter")],hq.prototype,"rowNodeSorter",2),hB([eB("sortController")],hq.prototype,"sortController",2),hq=hB([ek("gridSerializer")],hq);var hQ={version:"31.3.4",moduleName:"@ag-grid-community/csv-export",beans:[hY,hq]},hX=class{static createHeader(e={}){let t=["version"];e.version||(e.version="1.0"),e.encoding&&t.push("encoding"),e.standalone&&t.push("standalone");let i=t.map(t=>`${t}="${e[t]}"`).join(" ");return`<?xml ${i} ?>`}static createXml(e,t){let i="";e.properties&&(e.properties.prefixedAttributes&&e.properties.prefixedAttributes.forEach(e=>{Object.keys(e.map).forEach(s=>{i+=this.returnAttributeIfPopulated(e.prefix+s,e.map[s],t)})}),e.properties.rawMap&&Object.keys(e.properties.rawMap).forEach(s=>{i+=this.returnAttributeIfPopulated(s,e.properties.rawMap[s],t)}));let s="<"+e.name+i;return e.children||null!=e.textNode?null!=e.textNode?s+">"+e.textNode+"</"+e.name+">\r\n":(s+=">\r\n",e.children&&e.children.forEach(e=>{s+=this.createXml(e,t)}),s+"</"+e.name+">\r\n"):s+"/>\r\n"}static returnAttributeIfPopulated(e,t,i){if(!t&&""!==t&&0!==t)return"";let s=t;return"boolean"==typeof t&&i&&(s=i(t)),` ${e}="${s}"`}},hJ=e=>{let t=e.getHours();return t<<=6,t|=e.getMinutes(),t<<=5,t|=e.getSeconds()/2},hZ=e=>{let t=e.getFullYear()-1980;return t<<=4,t|=e.getMonth()+1,t<<=5,t|=e.getDate()};function h0(e,t){let i="";for(let s=0;s<t;s++)i+=String.fromCharCode(255&e),e>>>=8;return i}var h1=e=>{if(!e.length)return 0;let t=-1,i=0;for(let s=0;s<e.length;s++)i=h3[(t^e[s])&255],t=t>>>8^i;return -1^t},h2=e=>e.length?"string"==typeof e?h1(new TextEncoder().encode(e)):h1(e):0,h3=new 
267Uint32Array([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,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]),h5=e=>hW(void 0,null,function*(){let t=0,i=[],s=new WritableStream({write:e=>{i.push(e),t+=e.length}}),o=new ReadableStream({start:t=>{let i=new FileReader;i.onload=e=>{var i;(null==(i=e.target)?void 0:i.result)&&t.enqueue(e.target.result),t.close()},i.readAsArrayBuffer(e)}}),r=new window.CompressionStream("deflate-raw");return yield o.pipeThrough(r).pipeTo(s),{size:t,content:new Blob(i)}}),h4=e=>hW(void 0,null,function*(){let t=new Blob([e]),{size:i,content:s}=yield h5(t);return{size:i,content:new Uint8Array((yield s.arrayBuffer()))}}),{utf8_encode:h6}=sJ,h8=(e,t)=>hW(void 0,null,function*(){let i,s;let{content:o}=e,{size:r,content:n}=o?di(o):{size:0,content:Uint8Array.from([])},l=!1;if("file"===e.type&&n&&r>0){let e=yield h4(n);i=e.content,s=e.size,l=!0}return hk(hH({},h9(e,l,t,r,n,s)),{content:i||n,isCompressed:l})}),h7=(e,t)=>{let{content:i}=e,{content:s}=i?di(i):{content:Uint8Array.from([])};return hk(hH({},h9(e,!1,t,s.length,s,void 0)),{content:s,isCompressed:!1})},h9=(e,t,i,s,o,r)=>{let{content:n,path:l,created:a}=e,h=hJ(a),d=hZ(a),u=h2(o),c=void 0!==r?r:s,p=h6(l),g=p!==l,m="";if(g){let e=h0(1,1)+h0(h2(p),4)+p;m="up"+h0(e.length,2)+e}let C="\x14\0"+(g?"\0\b":"\0\0")+h0(t?8:0,2)+h0(h,2)+h0(d,2)+h0(c?u:0,4)+h0(null!=r?r:s,4)+h0(s,4)+h0(p.length,2)+h0(m.length,2),v="PK\x03\x04"+C+p+m,f="PK\x01\x02\x14\0"+C+"\0\0\0\0\0\0"+(n?"\0\0\0\0":"\x10\0\0\0")+h0(i,4)+p+m;return{localFileHeader:Uint8Array.from(v,e=>e.charCodeAt(0)),centralDirectoryHeader:Uint8Array.from(f,e=>e.charCodeAt(0))}},de=(e,t,i)=>{let s="PK\x05\x06\0\0\0\0"+h0(e,2)+h0(e,2)+h0(t,4)+h0(i,4)+"\0\0";return Uint8Array.from(s,e=>e.charCodeAt(0))},dt=e=>{let t=new Uint8Array(e.length);for(let i=0;i<e.length;i++)t[i]=e.charCodeAt(i);return t},di=e=>{let t;return{size:(t="string"==typeof e?dt(atob(e.split(";base64,")[1])):e).length,content:t}},ds=class{static addFolders(e){e.forEach(this.addFolder.bind(this))}static addFolder(e){this.folders.push({path:e,created:new Date,isBase64:!1,type:"folder"})}static addFile(e,t,i=!1){this.files.push({path:e,created:new Date,content:i?t:new TextEncoder().encode(t),isBase64:i,type:"file"})}static getZipFile(e="application/zip"){return hW(this,null,function*(){let t=yield this.buildCompressedFileStream();return this.clearStream(),new Blob([t],{type:e})})}static getUncompressedZipFile(e="application/zip"){let t=this.buildFileStream();return this.clearStream(),new Blob([t],{type:e})}static clearStream(){this.folders=[],this.files=[]}static packageFiles(e){let t=new Uint8Array(0),i=new Uint8Array(0),s=0,o=0;for(let r of e){let{localFileHeader:e,centralDirectoryHeader:n,content:l}=r,a=new Uint8Array(t.length+e.length);a.set(t),a.set(e,t.length);let h=new Uint8Array((t=a).length+l.length);h.set(t),h.set(l,t.length),t=h;let d=new Uint8Array(i.length+n.length);d.set(i),d.set(n,i.length),i=d,s+=e.length+l.length,o+=n.length}
267let r=de(e.length,o,s),n=new Uint8Array(t.length+i.length+r.length);return n.set(t),n.set(i,t.length),n.set(r,t.length+i.length),n}static buildCompressedFileStream(){return hW(this,null,function*(){let e=[...this.folders,...this.files],t=[],i=0;for(let s of e){let e=yield h8(s,i),{localFileHeader:o,content:r}=e;t.push(e),i+=o.length+r.length}return this.packageFiles(t)})}static buildFileStream(){let e=[...this.folders,...this.files],t=[],i=0;for(let s of e){let e=h7(s,i),{localFileHeader:o,content:r}=e;t.push(e),i+=o.length+r.length}return this.packageFiles(t)}};ds.folders=[],ds.files=[],eO.__registerModules([hR,hL,hQ],!1,void 0)}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.