UNPKG

ag-grid-community

Version:

Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue

12 lines (11 loc) 1.32 MB
/** * ag-grid-community - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v31.1.1 * @link https://www.ag-grid.com/ ' * @license MIT */ /** * ag-grid-community - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v31.1.1 * @link https://www.ag-grid.com/ ' * @license MIT */ "use strict";function e(e){return null==e||""===e?null:e}function t(e,t){return void 0===t&&(t=!1),null!=e&&(""!==e||t)}function o(e){return!t(e)}function n(e){return null==e||0===e.length}function r(e){return null!=e&&"function"==typeof e.toString?e.toString():null}function i(e){if(void 0!==e){if(null===e||""===e)return null;if("number"==typeof e)return isNaN(e)?void 0:e;var t=parseInt(e,10);return isNaN(t)?void 0:t}}function s(e){if(void 0!==e)return null!==e&&""!==e&&("boolean"==typeof e?e:/true/i.test(e))}function a(e,t){return(e?JSON.stringify(e):null)===(t?JSON.stringify(t):null)}function l(e){if(e instanceof Set||e instanceof Map){var t=[];return e.forEach((function(e){return t.push(e)})),t}return Object.values(e)}Object.defineProperty(exports,"__esModule",{value:!0});var u=Object.freeze({makeNull:e,exists:t,missing:o,missingOrEmpty:n,toStringOrNull:r,attrToNumber:i,attrToBoolean:s,attrToString:function(e){if(null!=e&&""!==e)return e},jsonEquals:a,defaultComparator:function(e,t,o){void 0===o&&(o=!1);var n=null==e,r=null==t;if(e&&e.toNumber&&(e=e.toNumber()),t&&t.toNumber&&(t=t.toNumber()),n&&r)return 0;if(n)return-1;if(r)return 1;function i(e,t){return e>t?1:e<t?-1:0}if("string"!=typeof e)return i(e,t);if(!o)return i(e,t);try{return e.localeCompare(t)}catch(o){return i(e,t)}},values:l}),c=function(){function e(){this.existingKeys={}}return e.prototype.addExistingKeys=function(e){for(var t=0;t<e.length;t++)this.existingKeys[e[t]]=!0},e.prototype.getUniqueKey=function(e,t){e=r(e);for(var o=0;;){var n=void 0;if(e?(n=e,0!==o&&(n+="_"+o)):t?(n=t,0!==o&&(n+="_"+o)):n=o,!this.existingKeys[n])return this.existingKeys[n]=!0,String(n);o++}},e}(),p=function(e){var t="function"==typeof Symbol&&Symbol.iterator,o=t&&e[t],n=0;if(o)return o.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},d=function(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var n,r,i=o.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return s};function h(e,t){var o,n;if(null!=e)if(Array.isArray(e))for(var r=0;r<e.length;r++)t(r.toString(),e[r]);else try{for(var i=p(Object.entries(e)),s=i.next();!s.done;s=i.next()){var a=d(s.value,2);t(a[0],a[1])}}catch(e){o={error:e}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}}function f(e){for(var t={},o=Object.keys(e),n=0;n<o.length;n++){var r=o[n],i=e[r];t[r]=i}return t}function g(e,t){if(e){var o=e,n={};return Object.keys(o).forEach((function(e){if(!(t&&t.indexOf(e)>=0)){var r=o[e],i=w(r)&&r.constructor===Object;n[e]=i?g(r):r}})),n}}function v(e){if(!e)return[];var t=Object;if("function"==typeof t.values)return t.values(e);var o=[];for(var n in e)e.hasOwnProperty(n)&&e.propertyIsEnumerable(n)&&o.push(e[n]);return o}function y(e,o,n,r){void 0===n&&(n=!0),void 0===r&&(r=!1),t(o)&&h(o,(function(t,o){var i=e[t];if(i!==o){if(r)if(null==i&&null!=o)"object"==typeof o&&o.constructor===Object&&(i={},e[t]=i);w(o)&&w(i)&&!Array.isArray(i)?y(i,o,n,r):(n||void 0!==o)&&(e[t]=o)}}))}function m(e,t,o){if(t&&e){if(!o)return e[t];for(var n=t.split("."),r=e,i=0;i<n.length;i++){if(null==r)return;r=r[n[i]]}return r}}function C(e,t,o){void 0===t&&(t=[]),Object.keys(e).forEach((function(o){"object"!=typeof e[o]||t.includes(o)||(e[o]=void 0)}));var n=Object.getPrototypeOf(e),r={};Object.getOwnPropertyNames(n).forEach((function(e){if("function"==typeof n[e]&&!t.includes(e)){r[e]={value:function(){console.warn(function(e){return"AG Grid: Grid API function ".concat(e,"() cannot be called as the grid has been destroyed.\n It is recommended to remove local references to the grid api. Alternatively, check gridApi.isDestroyed() to avoid calling methods against a destroyed grid.\n To run logic when the grid is about to be destroyed use the gridPreDestroy event. See: ").concat(o)}(e))},writable:!0}}})),Object.defineProperties(e,r)}function w(e){return"object"==typeof e&&null!==e}var S=Object.freeze({iterateObject:h,cloneObject:f,deepCloneDefinition:g,getAllValuesInObject:v,mergeDeep:y,getValueUsingField:m,removeAllReferences:C,isNonNullObject:w}),E={};function R(e,t){E[t]||(e(),E[t]=!0)}function b(e){R((function(){return console.warn("AG Grid: "+e)}),e)}function O(e){R((function(){return console.error("AG Grid: "+e)}),e)}function T(e){if(e.name)return e.name;var t=/function\s+([^\(]+)/.exec(e.toString());return t&&2===t.length?t[1].trim():null}function P(e){return!!(e&&e.constructor&&e.call&&e.apply)}function D(e){M(e,400)}var _=[],A=!1;function F(e){_.push(e),A||(A=!0,window.setTimeout((function(){var e=_.slice();_.length=0,A=!1,e.forEach((function(e){return e()}))}),0))}function M(e,t){void 0===t&&(t=0),e.length>0&&window.setTimeout((function(){return e.forEach((function(e){return e()}))}),t)}function L(e,t){var o;return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=this;window.clearTimeout(o),o=window.setTimeout((function(){e.apply(i,n)}),t)}}function N(e,t){var o=0;return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=this,s=(new Date).getTime();s-o<t||(o=s,e.apply(i,n))}}function x(e,t,o,n){void 0===o&&(o=100);var r=(new Date).getTime(),i=null,s=!1,a=function(){var a=(new Date).getTime()-r>o;(e()||a)&&(t(),s=!0,null!=i&&(window.clearInterval(i),i=null),a&&n&&console.warn(n))};a(),s||(i=window.setInterval(a,10))}var I,G=Object.freeze({doOnce:R,warnOnce:b,errorOnce:O,getFunctionName:T,isFunction:P,executeInAWhile:D,executeNextVMTurn:F,executeAfter:M,debounce:L,throttle:N,waitUntil:x,compose:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return e.reduce((function(e,t){return t(e)}),t)}},noop:function(){}});(I=exports.ModuleNames||(exports.ModuleNames={})).CommunityCoreModule="@ag-grid-community/core",I.InfiniteRowModelModule="@ag-grid-community/infinite-row-model",I.ClientSideRowModelModule="@ag-grid-community/client-side-row-model",I.CsvExportModule="@ag-grid-community/csv-export",I.EnterpriseCoreModule="@ag-grid-enterprise/core",I.RowGroupingModule="@ag-grid-enterprise/row-grouping",I.ColumnsToolPanelModule="@ag-grid-enterprise/column-tool-panel",I.FiltersToolPanelModule="@ag-grid-enterprise/filter-tool-panel",I.MenuModule="@ag-grid-enterprise/menu",I.SetFilterModule="@ag-grid-enterprise/set-filter",I.MultiFilterModule="@ag-grid-enterprise/multi-filter",I.StatusBarModule="@ag-grid-enterprise/status-bar",I.SideBarModule="@ag-grid-enterprise/side-bar",I.RangeSelectionModule="@ag-grid-enterprise/range-selection",I.MasterDetailModule="@ag-grid-enterprise/master-detail",I.RichSelectModule="@ag-grid-enterprise/rich-select",I.GridChartsModule="@ag-grid-enterprise/charts",I.ViewportRowModelModule="@ag-grid-enterprise/viewport-row-model",I.ServerSideRowModelModule="@ag-grid-enterprise/server-side-row-model",I.ExcelExportModule="@ag-grid-enterprise/excel-export",I.ClipboardModule="@ag-grid-enterprise/clipboard",I.SparklinesModule="@ag-grid-enterprise/sparklines",I.AdvancedFilterModule="@ag-grid-enterprise/advanced-filter",I.AngularModule="@ag-grid-community/angular",I.ReactModule="@ag-grid-community/react",I.VueModule="@ag-grid-community/vue";var V=function(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var n,r,i=o.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return s},H=function(e,t,o){if(o||2===arguments.length)for(var n,r=0,i=t.length;r<i;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))},k=function(){function e(){}return e.register=function(t){e.__register(t,!0,void 0)},e.registerModules=function(t){e.__registerModules(t,!0,void 0)},e.__register=function(t,o,n){e.runVersionChecks(t),void 0!==n?(e.areGridScopedModules=!0,void 0===e.gridModulesMap[n]&&(e.gridModulesMap[n]={}),e.gridModulesMap[n][t.moduleName]=t):e.globalModulesMap[t.moduleName]=t,e.setModuleBased(o)},e.__unRegisterGridModules=function(t){delete e.gridModulesMap[t]},e.__registerModules=function(t,o,n){e.setModuleBased(o),t&&t.forEach((function(t){return e.__register(t,o,n)}))},e.isValidModuleVersion=function(t){var o=V(t.version.split(".")||[],2),n=o[0],r=o[1],i=V(e.currentModuleVersion.split(".")||[],2),s=i[0],a=i[1];return n===s&&r===a},e.runVersionChecks=function(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. '".concat(t.moduleName,"' is version ").concat(t.version," but the other modules are version ").concat(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. '".concat(t.moduleName,"' is incompatible. Please update all modules to the same version.")),t.validate){var o=t.validate();if(!o.isValid){var n=o;console.error("AG Grid: ".concat(n.message))}}},e.setModuleBased=function(t){void 0===e.moduleBased?e.moduleBased=t:e.moduleBased!==t&&R((function(){console.warn("AG Grid: You are mixing modules (i.e. @ag-grid-community/core) and packages (ag-grid-community) - you can only use one or the other of these mechanisms."),console.warn("Please see https://www.ag-grid.com/javascript-grid/packages-modules/ for more information.")}),"ModulePackageCheck")},e.__setIsBundled=function(){e.isBundled=!0},e.__assertRegistered=function(t,o,n){var r;if(this.__isRegistered(t,n))return!0;var i,s=o+t;if(e.isBundled)i="AG Grid: unable to use ".concat(o," as 'ag-grid-enterprise' has not been loaded. Check you are using the Enterprise bundle:\n \n <script src=\"https://cdn.jsdelivr.net/npm/ag-grid-enterprise@AG_GRID_VERSION/dist/ag-grid-enterprise.min.js\"><\/script>\n \nFor 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){var a=null===(r=Object.entries(exports.ModuleNames).find((function(e){var o=V(e,2);o[0];return o[1]===t})))||void 0===r?void 0:r[0];i="AG Grid: unable to use ".concat(o," as the ").concat(a," is not registered").concat(e.areGridScopedModules?" for gridId: ".concat(n):"",". Check if you have registered the module:\n \n import { ModuleRegistry } from '@ag-grid-community/core';\n import { ").concat(a," } from '").concat(t,"';\n \n ModuleRegistry.registerModules([ ").concat(a," ]);\n\nFor more info see: https://www.ag-grid.com/javascript-grid/modules/")}else i="AG Grid: unable to use ".concat(o," as package 'ag-grid-enterprise' has not been imported. Check that you have imported the package:\n \n import 'ag-grid-enterprise';\n \nFor more info see: https://www.ag-grid.com/javascript-grid/packages/");return R((function(){console.warn(i)}),s),!1},e.__warnEnterpriseChartDisabled=function(e){var t="ag-charts-enterprise:"+e,o="AG Grid: the '".concat(e,"' chart type is not supported in AG Charts Community. See ").concat("https://ag-grid.com/javascript-data-grid/integrated-charts/"," for more details.");R((function(){console.warn(o)}),t)},e.__isRegistered=function(t,o){var n;return!!e.globalModulesMap[t]||!!(null===(n=e.gridModulesMap[o])||void 0===n?void 0:n[t])},e.__getRegisteredModules=function(t){return H(H([],V(l(e.globalModulesMap)),!1),V(l(e.gridModulesMap[t]||{})),!1)},e.__getGridRegisteredModules=function(t){var o;return l(null!==(o=e.gridModulesMap[t])&&void 0!==o?o:{})||[]},e.__isPackageBased=function(){return!e.moduleBased},e.globalModulesMap={},e.gridModulesMap={},e.areGridScopedModules=!1,e}(),B=function(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var n,r,i=o.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return s},j=function(e,t,o){if(o||2===arguments.length)for(var n,r=0,i=t.length;r<i;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))},W=function(){function e(e,t){if(this.beanWrappers={},this.destroyed=!1,e&&e.beanClasses){this.contextParams=e,this.logger=t,this.logger.log(">> creating ag-Application Context"),this.createBeans();var o=this.getBeanInstances();this.wireBeans(o),this.logger.log(">> ag-Application Context ready - component is alive")}}return e.prototype.getBeanInstances=function(){return l(this.beanWrappers).map((function(e){return e.beanInstance}))},e.prototype.createBean=function(e,t){if(!e)throw Error("Can't wire to bean since it is null");return this.wireBeans([e],t),e},e.prototype.wireBeans=function(e,o){this.autoWireBeans(e),this.methodWireBeans(e),this.callLifeCycleMethods(e,"preConstructMethods"),t(o)&&e.forEach(o),this.callLifeCycleMethods(e,"postConstructMethods")},e.prototype.createBeans=function(){var e=this;this.contextParams.beanClasses.forEach(this.createBeanWrapper.bind(this)),h(this.beanWrappers,(function(t,o){var n;o.bean.__agBeanMetaData&&o.bean.__agBeanMetaData.autowireMethods&&o.bean.__agBeanMetaData.autowireMethods.agConstructor&&(n=o.bean.__agBeanMetaData.autowireMethods.agConstructor);var r=e.getBeansForParameters(n,o.bean.name),i=new(o.bean.bind.apply(o.bean,j([null],B(r),!1)));o.beanInstance=i}));var t=Object.keys(this.beanWrappers).join(", ");this.logger.log("created beans: ".concat(t))},e.prototype.createBeanWrapper=function(e){var t=e.__agBeanMetaData;if(!t){var o=void 0;return o=e.prototype.constructor?T(e.prototype.constructor):""+e,void console.error("Context item ".concat(o," is not a bean"))}var n={bean:e,beanInstance:null,beanName:t.beanName};this.beanWrappers[t.beanName]=n},e.prototype.autoWireBeans=function(e){var t=this;e.forEach((function(e){t.forEachMetaDataInHierarchy(e,(function(o,n){var r=o.agClassAttributes;r&&r.forEach((function(o){var r=t.lookupBeanInstance(n,o.beanName,o.optional);e[o.attributeName]=r}))}))}))},e.prototype.methodWireBeans=function(e){var t=this;e.forEach((function(e){t.forEachMetaDataInHierarchy(e,(function(o,n){h(o.autowireMethods,(function(o,r){if("agConstructor"!==o){var i=t.getBeansForParameters(r,n);e[o].apply(e,i)}}))}))}))},e.prototype.forEachMetaDataInHierarchy=function(e,t){for(var o=Object.getPrototypeOf(e);null!=o;){var n=o.constructor;if(n.hasOwnProperty("__agBeanMetaData"))t(n.__agBeanMetaData,this.getBeanName(n));o=Object.getPrototypeOf(o)}},e.prototype.getBeanName=function(e){if(e.__agBeanMetaData&&e.__agBeanMetaData.beanName)return e.__agBeanMetaData.beanName;var t=e.toString();return t.substring(9,t.indexOf("("))},e.prototype.getBeansForParameters=function(e,t){var o=this,n=[];return e&&h(e,(function(e,r){var i=o.lookupBeanInstance(t,r);n[Number(e)]=i})),n},e.prototype.lookupBeanInstance=function(e,t,o){if(void 0===o&&(o=!1),this.destroyed)return this.logger.log("AG Grid: bean reference ".concat(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];var n=this.beanWrappers[t];return n?n.beanInstance:(o||console.error("AG Grid: unable to find bean reference ".concat(t," while initialising ").concat(e)),null)},e.prototype.callLifeCycleMethods=function(e,t){var o=this;e.forEach((function(e){return o.callLifeCycleMethodsOnBean(e,t)}))},e.prototype.callLifeCycleMethodsOnBean=function(e,t,o){var n={};this.forEachMetaDataInHierarchy(e,(function(e){var r=e[t];r&&r.forEach((function(e){e!=o&&(n[e]=!0)}))})),Object.keys(n).forEach((function(t){return e[t]()}))},e.prototype.getBean=function(e){return this.lookupBeanInstance("getBean",e,!0)},e.prototype.destroy=function(){if(!this.destroyed){this.destroyed=!0,this.logger.log(">> Shutting down ag-Application Context");var e=this.getBeanInstances();this.destroyBeans(e),this.contextParams.providedBeanInstances=null,k.__unRegisterGridModules(this.contextParams.gridId),this.logger.log(">> ag-Application Context shut down - component is dead")}},e.prototype.destroyBean=function(e){e&&this.destroyBeans([e])},e.prototype.destroyBeans=function(e){var t=this;return e?(e.forEach((function(e){t.callLifeCycleMethodsOnBean(e,"preDestroyMethods","destroy");var o=e;"function"==typeof o.destroy&&o.destroy()})),[]):[]},e.prototype.isDestroyed=function(){return this.destroyed},e.prototype.getGridId=function(){return this.contextParams.gridId},e}();function U(e,t,o){var n=Z(e.constructor);n.preConstructMethods||(n.preConstructMethods=[]),n.preConstructMethods.push(t)}function z(e,t,o){var n=Z(e.constructor);n.postConstructMethods||(n.postConstructMethods=[]),n.postConstructMethods.push(t)}function K(e,t,o){var n=Z(e.constructor);n.preDestroyMethods||(n.preDestroyMethods=[]),n.preDestroyMethods.push(t)}function Y(e){return function(t){Z(t).beanName=e}}function q(e){return function(t,o,n){X(t,e,!1,t,o,null)}}function Q(e){return function(t,o,n){X(t,e,!0,t,o,null)}}function X(e,t,o,n,r,i){if(null!==t)if("number"!=typeof i){var s=Z(e.constructor);s.agClassAttributes||(s.agClassAttributes=[]),s.agClassAttributes.push({attributeName:r,beanName:t,optional:o})}else console.error("AG Grid: Autowired should be on an attribute");else console.error("AG Grid: Autowired name should not be null")}function J(e){return function(t,o,n){var r,i="function"==typeof t?t:t.constructor;if("number"==typeof n){var s=void 0;o?(r=Z(i),s=o):(r=Z(i),s="agConstructor"),r.autowireMethods||(r.autowireMethods={}),r.autowireMethods[s]||(r.autowireMethods[s]={}),r.autowireMethods[s][n]=e}}}function Z(e){return e.hasOwnProperty("__agBeanMetaData")||(e.__agBeanMetaData={}),e.__agBeanMetaData}var $=function(e,t,o,n){var r,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(i<3?r(s):i>3?r(t,o,s):r(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},ee=function(e,t){return function(o,n){t(o,n,e)}},te=function(){function e(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}return e.prototype.setBeans=function(e,t,o,n){if(void 0===o&&(o=null),void 0===n&&(n=null),this.frameworkOverrides=t,this.gridOptionsService=e,o){var r=e.useAsyncEvents();this.addGlobalListener(o,r)}n&&this.addGlobalListener(n,!1)},e.prototype.setFrameworkOverrides=function(e){this.frameworkOverrides=e},e.prototype.getListeners=function(e,t,o){var n=t?this.allAsyncListeners:this.allSyncListeners,r=n.get(e);return!r&&o&&(r=new Set,n.set(e,r)),r},e.prototype.noRegisteredListenersExist=function(){return 0===this.allSyncListeners.size&&0===this.allAsyncListeners.size&&0===this.globalSyncListeners.size&&0===this.globalAsyncListeners.size},e.prototype.addEventListener=function(e,t,o){void 0===o&&(o=!1),this.getListeners(e,o,!0).add(t)},e.prototype.removeEventListener=function(e,t,o){void 0===o&&(o=!1);var n=this.getListeners(e,o,!1);n&&(n.delete(t),0===n.size&&(o?this.allAsyncListeners:this.allSyncListeners).delete(e))},e.prototype.addGlobalListener=function(e,t){void 0===t&&(t=!1),(t?this.globalAsyncListeners:this.globalSyncListeners).add(e)},e.prototype.removeGlobalListener=function(e,t){void 0===t&&(t=!1),(t?this.globalAsyncListeners:this.globalSyncListeners).delete(e)},e.prototype.dispatchEvent=function(e){var t=e;this.gridOptionsService&&this.gridOptionsService.addGridCommonParams(t),this.dispatchToListeners(t,!0),this.dispatchToListeners(t,!1),this.firedEvents[t.type]=!0},e.prototype.dispatchEventOnce=function(e){this.firedEvents[e.type]||this.dispatchEvent(e)},e.prototype.dispatchToListeners=function(e,t){var o,n=this,r=e.type;if(t&&"event"in e){var i=e.event;i instanceof Event&&(e.eventPath=i.composedPath())}var s=null!==(o=this.getListeners(r,t,!1))&&void 0!==o?o:new Set,a=new Set(s);a.size>0&&function(o,r){o.forEach((function(o){if(r.has(o)){var i=n.frameworkOverrides?function(){return n.frameworkOverrides.wrapIncoming((function(){return o(e)}))}:function(){return o(e)};t?n.dispatchAsync(i):i()}}))}(a,s),new Set(t?this.globalAsyncListeners:this.globalSyncListeners).forEach((function(o){var i=n.frameworkOverrides?function(){return n.frameworkOverrides.wrapIncoming((function(){return o(r,e)}))}:function(){return o(r,e)};t?n.dispatchAsync(i):i()}))},e.prototype.dispatchAsync=function(e){var t=this;this.asyncFunctionsQueue.push(e),this.scheduled||(this.frameworkOverrides.wrapIncoming((function(){window.setTimeout(t.flushAsyncQueue.bind(t),0)})),this.scheduled=!0)},e.prototype.flushAsyncQueue=function(){this.scheduled=!1;var e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],e.forEach((function(e){return e()}))},$([ee(0,J("gridOptionsService")),ee(1,J("frameworkOverrides")),ee(2,J("globalEventListener")),ee(3,J("globalSyncEventListener"))],e.prototype,"setBeans",null),e=$([Y("eventService")],e)}(),oe=function(){function e(e){this.frameworkOverrides=e,this.wrappedListeners=new Map,this.wrappedGlobalListeners=new Map}return e.prototype.wrap=function(e){var t=this,o=e;return this.frameworkOverrides.shouldWrapOutgoing&&(o=function(o){t.frameworkOverrides.wrapOutgoing((function(){return e(o)}))},this.wrappedListeners.set(e,o)),o},e.prototype.wrapGlobal=function(e){var t=this,o=e;return this.frameworkOverrides.shouldWrapOutgoing&&(o=function(o,n){t.frameworkOverrides.wrapOutgoing((function(){return e(o,n)}))},this.wrappedGlobalListeners.set(e,o)),o},e.prototype.unwrap=function(e){var t;return null!==(t=this.wrappedListeners.get(e))&&void 0!==t?t:e},e.prototype.unwrapGlobal=function(e){var t;return null!==(t=this.wrappedGlobalListeners.get(e))&&void 0!==t?t:e},e}(),ne=function(e,t,o,n){var r,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(i<3?r(s):i>3?r(t,o,s):r(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},re={resizable:!0,sortable:!0},ie=0;function se(){return ie++}var ae=function(){function e(e,t,o,n){this.instanceId=se(),this.autoHeaderHeight=null,this.moving=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.eventService=new te,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.colDef=e,this.userProvidedColDef=t,this.colId=o,this.primary=n,this.setState(e)}return e.prototype.getInstanceId=function(){return this.instanceId},e.prototype.setState=function(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);var t=e.sortIndex,o=e.initialSortIndex;void 0!==t?null!==t&&(this.sortIndex=t):null!==o&&(this.sortIndex=o);var n=e.hide,r=e.initialHide;this.visible=void 0!==n?!n:!r,void 0!==e.pinned?this.setPinned(e.pinned):this.setPinned(e.initialPinned);var i=e.flex,s=e.initialFlex;void 0!==i?this.flex=i:void 0!==s&&(this.flex=s)},e.prototype.setColDef=function(e,t,o){this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),this.eventService.dispatchEvent(this.createColumnEvent("colDefChanged",o))},e.prototype.getUserProvidedColDef=function(){return this.userProvidedColDef},e.prototype.setParent=function(e){this.parent=e},e.prototype.getParent=function(){return this.parent},e.prototype.setOriginalParent=function(e){this.originalParent=e},e.prototype.getOriginalParent=function(){return this.originalParent},e.prototype.initialise=function(){this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip()},e.prototype.initDotNotation=function(){var e=this.gridOptionsService.get("suppressFieldDotNotation");this.fieldContainsDots=t(this.colDef.field)&&this.colDef.field.indexOf(".")>=0&&!e,this.tooltipFieldContainsDots=t(this.colDef.tooltipField)&&this.colDef.tooltipField.indexOf(".")>=0&&!e},e.prototype.initMinAndMaxWidths=function(){var e=this.colDef;this.minWidth=this.columnUtils.calculateColMinWidth(e),this.maxWidth=this.columnUtils.calculateColMaxWidth(e)},e.prototype.initTooltip=function(){this.tooltipEnabled=t(this.colDef.tooltipField)||t(this.colDef.tooltipValueGetter)||t(this.colDef.tooltipComponent)},e.prototype.resetActualWidth=function(e){var t=this.columnUtils.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)},e.prototype.isEmptyGroup=function(){return!1},e.prototype.isRowGroupDisplayed=function(e){if(o(this.colDef)||o(this.colDef.showRowGroup))return!1;var t=!0===this.colDef.showRowGroup,n=this.colDef.showRowGroup===e;return t||n},e.prototype.isPrimary=function(){return this.primary},e.prototype.isFilterAllowed=function(){return!!this.colDef.filter},e.prototype.isFieldContainsDots=function(){return this.fieldContainsDots},e.prototype.isTooltipEnabled=function(){return this.tooltipEnabled},e.prototype.isTooltipFieldContainsDots=function(){return this.tooltipFieldContainsDots},e.prototype.addEventListener=function(e,t){var o,n;this.frameworkOverrides.shouldWrapOutgoing&&!this.frameworkEventListenerService&&(this.eventService.setFrameworkOverrides(this.frameworkOverrides),this.frameworkEventListenerService=new oe(this.frameworkOverrides));var r=null!==(n=null===(o=this.frameworkEventListenerService)||void 0===o?void 0:o.wrap(t))&&void 0!==n?n:t;this.eventService.addEventListener(e,r)},e.prototype.removeEventListener=function(e,t){var o,n,r=null!==(n=null===(o=this.frameworkEventListenerService)||void 0===o?void 0:o.unwrap(t))&&void 0!==n?n:t;this.eventService.removeEventListener(e,r)},e.prototype.createColumnFunctionCallbackParams=function(e){return this.gridOptionsService.addGridCommonParams({node:e,data:e.data,column:this,colDef:this.colDef})},e.prototype.isSuppressNavigable=function(e){if("boolean"==typeof this.colDef.suppressNavigable)return this.colDef.suppressNavigable;if("function"==typeof this.colDef.suppressNavigable){var t=this.createColumnFunctionCallbackParams(e);return(0,this.colDef.suppressNavigable)(t)}return!1},e.prototype.isCellEditable=function(e){return!(e.group&&!this.gridOptionsService.get("enableGroupEdit"))&&this.isColumnFunc(e,this.colDef.editable)},e.prototype.isSuppressFillHandle=function(){return!!this.colDef.suppressFillHandle},e.prototype.isAutoHeight=function(){return!!this.colDef.autoHeight},e.prototype.isAutoHeaderHeight=function(){return!!this.colDef.autoHeaderHeight},e.prototype.isRowDrag=function(e){return this.isColumnFunc(e,this.colDef.rowDrag)},e.prototype.isDndSource=function(e){return this.isColumnFunc(e,this.colDef.dndSource)},e.prototype.isCellCheckboxSelection=function(e){return this.isColumnFunc(e,this.colDef.checkboxSelection)},e.prototype.isSuppressPaste=function(e){return this.isColumnFunc(e,this.colDef?this.colDef.suppressPaste:null)},e.prototype.isResizable=function(){return!!this.getColDefValue("resizable")},e.prototype.getColDefValue=function(e){var t;return null!==(t=this.colDef[e])&&void 0!==t?t:re[e]},e.prototype.isColumnFunc=function(e,t){return"boolean"==typeof t?t:"function"==typeof t&&t(this.createColumnFunctionCallbackParams(e))},e.prototype.setMoving=function(e,t){this.moving=e,this.eventService.dispatchEvent(this.createColumnEvent("movingChanged",t))},e.prototype.createColumnEvent=function(e,t){return this.gridOptionsService.addGridCommonParams({type:e,column:this,columns:[this],source:t})},e.prototype.isMoving=function(){return this.moving},e.prototype.getSort=function(){return this.sort},e.prototype.setSort=function(e,t){this.sort!==e&&(this.sort=e,this.eventService.dispatchEvent(this.createColumnEvent("sortChanged",t))),this.dispatchStateUpdatedEvent("sort")},e.prototype.setMenuVisible=function(e,t){this.menuVisible!==e&&(this.menuVisible=e,this.eventService.dispatchEvent(this.createColumnEvent("menuVisibleChanged",t)))},e.prototype.isMenuVisible=function(){return this.menuVisible},e.prototype.isSortable=function(){return!!this.getColDefValue("sortable")},e.prototype.isSortAscending=function(){return"asc"===this.sort},e.prototype.isSortDescending=function(){return"desc"===this.sort},e.prototype.isSortNone=function(){return o(this.sort)},e.prototype.isSorting=function(){return t(this.sort)},e.prototype.getSortIndex=function(){return this.sortIndex},e.prototype.setSortIndex=function(e){this.sortIndex=e,this.dispatchStateUpdatedEvent("sortIndex")},e.prototype.setAggFunc=function(e){this.aggFunc=e,this.dispatchStateUpdatedEvent("aggFunc")},e.prototype.getAggFunc=function(){return this.aggFunc},e.prototype.getLeft=function(){return this.left},e.prototype.getOldLeft=function(){return this.oldLeft},e.prototype.getRight=function(){return this.left+this.actualWidth},e.prototype.setLeft=function(e,t){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.eventService.dispatchEvent(this.createColumnEvent("leftChanged",t)))},e.prototype.isFilterActive=function(){return this.filterActive},e.prototype.setFilterActive=function(e,t,o){this.filterActive!==e&&(this.filterActive=e,this.eventService.dispatchEvent(this.createColumnEvent("filterActiveChanged",t)));var n=this.createColumnEvent("filterChanged",t);o&&y(n,o),this.eventService.dispatchEvent(n)},e.prototype.isHovered=function(){return this.columnHoverService.isHovered(this)},e.prototype.setPinned=function(e){this.pinned=!0===e||"left"===e?"left":"right"===e?"right":null,this.dispatchStateUpdatedEvent("pinned")},e.prototype.setFirstRightPinned=function(e,t){this.firstRightPinned!==e&&(this.firstRightPinned=e,this.eventService.dispatchEvent(this.createColumnEvent("firstRightPinnedChanged",t)))},e.prototype.setLastLeftPinned=function(e,t){this.lastLeftPinned!==e&&(this.lastLeftPinned=e,this.eventService.dispatchEvent(this.createColumnEvent("lastLeftPinnedChanged",t)))},e.prototype.isFirstRightPinned=function(){return this.firstRightPinned},e.prototype.isLastLeftPinned=function(){return this.lastLeftPinned},e.prototype.isPinned=function(){return"left"===this.pinned||"right"===this.pinned},e.prototype.isPinnedLeft=function(){return"left"===this.pinned},e.prototype.isPinnedRight=function(){return"right"===this.pinned},e.prototype.getPinned=function(){return this.pinned},e.prototype.setVisible=function(e,t){var o=!0===e;this.visible!==o&&(this.visible=o,this.eventService.dispatchEvent(this.createColumnEvent("visibleChanged",t))),this.dispatchStateUpdatedEvent("hide")},e.prototype.isVisible=function(){return this.visible},e.prototype.isSpanHeaderHeight=function(){var e=this.getColDef();return!e.suppressSpanHeaderHeight&&!e.autoHeaderHeight},e.prototype.getColumnGroupPaddingInfo=function(){var e=this.getParent();if(!e||!e.isPadding())return{numberOfParents:0,isSpanningTotal:!1};for(var t=e.getPaddingLevel()+1,o=!0;e;){if(!e.isPadding()){o=!1;break}e=e.getParent()}return{numberOfParents:t,isSpanningTotal:o}},e.prototype.getColDef=function(){return this.colDef},e.prototype.getColumnGroupShow=function(){return this.colDef.columnGroupShow},e.prototype.getColId=function(){return this.colId},e.prototype.getId=function(){return this.colId},e.prototype.getUniqueId=function(){return this.colId},e.prototype.getDefinition=function(){return this.colDef},e.prototype.getActualWidth=function(){return this.actualWidth},e.prototype.getAutoHeaderHeight=function(){return this.autoHeaderHeight},e.prototype.setAutoHeaderHeight=function(e){var t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t},e.prototype.createBaseColDefParams=function(e){return this.gridOptionsService.addGridCommonParams({node:e,data:e.data,colDef:this.colDef,column:this})},e.prototype.getColSpan=function(e){if(o(this.colDef.colSpan))return 1;var t=this.createBaseColDefParams(e),n=this.colDef.colSpan(t);return Math.max(n,1)},e.prototype.getRowSpan=function(e){if(o(this.colDef.rowSpan))return 1;var t=this.createBaseColDefParams(e),n=this.colDef.rowSpan(t);return Math.max(n,1)},e.prototype.setActualWidth=function(e,t,o){void 0===o&&(o=!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),o||this.fireColumnWidthChangedEvent(t)),this.dispatchStateUpdatedEvent("width")},e.prototype.fireColumnWidthChangedEvent=function(e){this.eventService.dispatchEvent(this.createColumnEvent("widthChanged",e))},e.prototype.isGreaterThanMax=function(e){return null!=this.maxWidth&&e>this.maxWidth},e.prototype.getMinWidth=function(){return this.minWidth},e.prototype.getMaxWidth=function(){return this.maxWidth},e.prototype.getFlex=function(){return this.flex||0},e.prototype.setFlex=function(e){this.flex!==e&&(this.flex=e),this.dispatchStateUpdatedEvent("flex")},e.prototype.setMinimum=function(e){t(this.minWidth)&&this.setActualWidth(this.minWidth,e)},e.prototype.setRowGroupActive=function(e,t){this.rowGroupActive!==e&&(this.rowGroupActive=e,this.eventService.dispatchEvent(this.createColumnEvent("columnRowGroupChanged",t))),this.dispatchStateUpdatedEvent("rowGroup")},e.prototype.isRowGroupActive=function(){return this.rowGroupActive},e.prototype.setPivotActive=function(e,t){this.pivotActive!==e&&(this.pivotActive=e,this.eventService.dispatchEvent(this.createColumnEvent("columnPivotChanged",t))),this.dispatchStateUpdatedEvent("pivot")},e.prototype.isPivotActive=function(){return this.pivotActive},e.prototype.isAnyFunctionActive=function(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()},e.prototype.isAnyFunctionAllowed=function(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()},e.prototype.setValueActive=function(e,t){this.aggregationActive!==e&&(this.aggregationActive=e,this.eventService.dispatchEvent(this.createColumnEvent("columnValueChanged",t)))},e.prototype.isValueActive=function(){return this.aggregationActive},e.prototype.isAllowPivot=function(){return!0===this.colDef.enablePivot},e.prototype.isAllowValue=function(){return!0===this.colDef.enableValue},e.prototype.isAllowRowGroup=function(){return!0===this.colDef.enableRowGroup},e.prototype.getMenuTabs=function(e){b("As of v31.1, 'getMenuTabs' is deprecated. Use 'getColDef().menuTabs ?? defaultValues' instead.");var t=this.getColDef().menuTabs;return null==t&&(t=e),t},e.prototype.dispatchStateUpdatedEvent=function(t){this.eventService.dispatchEvent({type:e.EVENT_STATE_UPDATED,key:t})},e.EVENT_MOVING_CHANGED="movingChanged",e.EVENT_LEFT_CHANGED="leftChanged",e.EVENT_WIDTH_CHANGED="widthChanged",e.EVENT_LAST_LEFT_PINNED_CHANGED="lastLeftPinnedChanged",e.EVENT_FIRST_RIGHT_PINNED_CHANGED="firstRightPinnedChanged",e.EVENT_VISIBLE_CHANGED="visibleChanged",e.EVENT_FILTER_CHANGED="filterChanged",e.EVENT_FILTER_ACTIVE_CHANGED="filterActiveChanged",e.EVENT_SORT_CHANGED="sortChanged",e.EVENT_COL_DEF_CHANGED="colDefChanged",e.EVENT_MENU_VISIBLE_CHANGED="menuVisibleChanged",e.EVENT_ROW_GROUP_CHANGED="columnRowGroupChanged",e.EVENT_PIVOT_CHANGED="columnPivotChanged",e.EVENT_VALUE_CHANGED="columnValueChanged",e.EVENT_STATE_UPDATED="columnStateUpdated",ne([q("gridOptionsService")],e.prototype,"gridOptionsService",void 0),ne([q("columnUtils")],e.prototype,"columnUtils",void 0),ne([q("columnHoverService")],e.prototype,"columnHoverService",void 0),ne([q("frameworkOverrides")],e.prototype,"frameworkOverrides",void 0),ne([z],e.prototype,"initialise",null),e}(),le=function(e,t,o,n){var r,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(i<3?r(s):i>3?r(t,o,s):r(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},ue=function(){function e(e,t,o,n){this.localEventService=new te,this.expandable=!1,this.instanceId=se(),this.expandableListenerRemoveCallback=null,this.colGroupDef=e,this.groupId=t,this.expanded=!!e&&!!e.openByDefault,this.padding=o,this.level=n}return e.prototype.destroy=function(){this.expandableListenerRemoveCallback&&this.reset(null,void 0)},e.prototype.reset=function(e,t){this.colGroupDef=e,this.level=t,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0},e.prototype.getInstanceId=function(){return this.instanceId},e.prototype.setOriginalParent=function(e){this.originalParent=e},e.prototype.getOriginalParent=function(){return this.originalParent},e.prototype.getLevel=function(){return this.level},e.prototype.isVisible=function(){return!!this.children&&this.children.some((function(e){return e.isVisible()}))},e.prototype.isPadding=function(){return this.padding},e.prototype.setExpanded=function(t){this.expanded=void 0!==t&&t;var o={type:e.EVENT_EXPANDED_CHANGED};this.localEventService.dispatchEvent(o)},e.prototype.isExpandable=function(){return this.expandable},e.prototype.isExpanded=function(){return this.expanded},e.prototype.getGroupId=function(){return this.groupId},e.prototype.getId=function(){return this.getGroupId()},e.prototype.setChildren=function(e){this.children=e},e.prototype.getChildren=function(){return this.children},e.prototype.getColGroupDef=function(){return this.colGroupDef},e.prototype.getLeafColumns=function(){var e=[];return this.addLeafColumns(e),e},e.prototype.addLeafColumns=function(t){this.children&&this.children.forEach((function(o){o instanceof ae?t.push(o):o instanceof e&&o.addLeafColumns(t)}))},e.prototype.getColumnGroupShow=function(){var e=this.colGroupDef;if(e)return e.columnGroupShow},e.prototype.setupExpandable=function(){var e=this;this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();var t=this.onColumnVisibilityChanged.bind(this);this.getLeafColumns().forEach((function(e){return e.addEventListener("visibleChanged",t)})),this.expandableListenerRemoveCallback=function(){e.getLeafColumns().forEach((function(e){return e.removeEventListener("visibleChanged",t)})),e.expandableListenerRemoveCallback=null}},e.prototype.setExpandable=function(){if(!this.isPadding()){for(var t=!1,o=!1,n=!1,r=this.findChildrenRemovingPadding(),i=0,s=r.length;i<s;i++){var a=r[i];if(a.isVisible()){var l=a.getColumnGroupShow();"open"===l?(t=!0,n=!0):"closed"===l?(o=!0,n=!0):(t=!0,o=!0)}}var u=t&&o&&n;if(this.expandable!==u){this.expandable=u;var c={type:e.EVENT_EXPANDABLE_CHANGED};this.localEventService.dispatchEvent(c)}}},e.prototype.findChildrenRemovingPadding=function(){var t=[],o=function(n){n.forEach((function(n){n instanceof e&&n.isPadding()?o(n.children):t.push(n)}))};return o(this.children),t},e.prototype.onColumnVisibilityChanged=function(){this.setExpandable()},e.prototype.addEventListener=function(e,t){this.localEventService.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.localEventService.removeEventListener(e,t)},e.EVENT_EXPANDED_CHANGED="expandedChanged",e.EVENT_EXPANDABLE_CHANGED="expandableChanged",le([K],e.prototype,"destroy",null),e}(),ce={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}};function pe(e){if(e&&e.length)return e[e.length-1]}function de(e,t,o){return null==e&&null==t||null!=e&&null!=t&&e.length===t.length&&e.every((function(e,n){return o?o(e,t[n]):t[n]===e}))}function he(e){return e.sort((function(e,t){return e-t}))}function fe(e,t){var o=e.indexOf(t);o>=0&&(e[o]=e[e.length-1],e.pop())}function ge(e,t){var o=e.indexOf(t);o>=0&&e.splice(o,1)}function ve(e,t){for(var o=0;o<t.length;o++)fe(e,t[o])}function ye(e,t){for(var o=0;o<t.length;o++)ge(e,t[o])}function me(e,t,o){e.splice(o,0,t)}function Ce(e,t,o){ye(e,t),t.slice().reverse().forEach((function(t){return me(e,t,o)}))}function we(e,t){return e.indexOf(t)>-1}function Se(e){return[].concat.apply([],e)}function Ee(e,t){null!=t&&null!=e&&t.forEach((function(t){return e.push(t)}))}var Re=Object.freeze({existsAndNotEmpty:function(e){return null!=e&&e.length>0},last:pe,areEqual:de,shallowCompare:function(e,t){return de(e,t)},sortNumerically:he,removeRepeatsFromArray:function(e,t){if(e)for(var o=e.length-2;o>=0;o--){var n=e[o]===t,r=e[o+1]===t;n&&r&&e.splice(o+1,1)}},removeFromUnorderedArray:fe,removeFromArray:ge,removeAllFromUnorderedArray:ve,removeAllFromArray:ye,insertIntoArray:me,insertArrayIntoArray:function(e,t,o){if(null!=e&&null!=t)for(var n=t.length-1;n>=0;n--){me(e,t[n],o)}},moveInArray:Ce,includes:we,flatten:Se,pushAll:Ee,toStrings:function(e){return e.map(r)},forEachReverse:function(e,t){if(null!=e)for(var o=e.length-1;o>=0;o--)t(e[o],o)}}),be=["touchstart","touchend","touchmove","touchcancel","scroll"],Oe={};function Te(e){e.__ag_Grid_Stop_Propagation=!0}function Pe(e){return!0===e.__ag_Grid_Stop_Propagation}var De,_e=(De={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"},function(e){if("boolean"==typeof Oe[e])return Oe[e];var t=document.createElement(De[e]||"div");return Oe[e="on"+e]=e in t});function Ae(e,t,o){for(var n=t;n;){var r=e.getDomData(n,o);if(r)return r;n=n.parentElement}return null}function Fe(e,t){return!(!t||!e)&&Le(t).indexOf(e)>=0}function Me(e){for(var t=[],o=e.target;o;)t.push(o),o=o.parentElement;return t}function Le(e){var t=e;return t.path?t.path:t.composedPath?t.composedPath():Me(t)}function Ne(e,t,o,n){var r=we(be,o)?{passive:!0}:void 0;e&&e.addEventListener&&e.addEventListener(t,o,n,r)}var xe,Ie=Object.freeze({stopPropagationForAgGrid:Te,isStopPropagationForAgGrid:Pe,isEventSupported:_e,getCtrlForEventTarget:Ae,isElementInEventPath:Fe,createEventPath:Me,getEventPath:Le,addSafePassiveEventListener:Ne}),Ge=function(e,t,o,n){var r,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(i<3?r(s):i>3?r(t,o,s):r(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Ve=function(){function e(){var e=this;this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.lastChangeSetIdLookup={},this.propertyListenerId=0,this.isAlive=function(){return!e.destroyed}}return e.prototype.getFrameworkOverrides=function(){return this.frameworkOverrides},e.prototype.getContext=function(){return this.context},e.prototype.destroy=function(){this.destroyFunctions.forEach((function(e){return e()})),this.destroyFunctions.length=0,this.destroyed=!0,this.dispatchEvent({type:e.EVENT_DESTROYED})},e.prototype.addEventListener=function(e,t){this.localEventService||(this.localEventService=new te),this.localEventService.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.localEventService&&this.localEventService.removeEventListener(e,t)},e.prototype.dispatchEvent=function(e){this.localEventService&&this.localEventService.dispatchEvent(e)},e.prototype.addManagedListener=function(e,t,o){var n=this;if(!this.destroyed){e instanceof HTMLElement?Ne(this.getFrameworkOverrides(),e,t,o):e.addEventListener(t,o);var r=function(){return e.removeEventListener(t,o),n.destroyFunctions=n.destroyFunctions.filter((function(e){return e!==r})),null};return this.destroyFunctions.push(r),r}},e.prototype.setupGridOptionListener=function(e,t){var o=this;this.gridOptionsService.addEventListener(e,t);var n=function(){return o.gridOptionsService.removeEventListener(e,t),o.destroyFunctions=o.destroyFunctions.filter((function(e){return e!==n})),null};return this.destroyFunctions.push(n),n},e.prototype.addManagedPropertyListener=function(e,t){return this.destroyed?function(){return null}:this.setupGridOptionListener(e,t)},e.prototype.addManagedPropertyListeners=function(e,t){var o=this;if(!this.destroyed){var n=e.join("-")+this.propertyListenerId++,r=function(e){if(e.changeSet){if(e.changeSet&&e.changeSet.id===o.lastChangeSetIdLookup[n])return;o.lastChangeSetIdLookup[n]=e.changeSet.id}var r={type:"gridPropertyChanged",changeSet:e.changeSet,source:e.source};t(r)};e.forEach((function(e){return o.setupGridOptionListener(e,r)}))}},e.prototype.addDestroyFunc=function(e){this.isAlive()?this.destroyFunctions.push(e):e()},e.prototype.createManagedBean=function(e,t){var o=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),o},e.prototype.createBean=function(e,t,o){return(t||this.getContext()).createBean(e,o)},e.prototype.destroyBean=function(e,t){return(t||this.getContext()).destroyBean(e)},e.prototype.destroyBeans=function(e,t){var o=this;return e&&e.forEach((function(e){return o.destroyBean(e,t)})),[]},e.EVENT_DESTROYED="destroyed",Ge([q("frameworkOverrides")],e.prototype,"frameworkOverrides",void 0),Ge([q("context")],e.prototype,"context",void 0),Ge([q("eventService")],e.prototype,"eventService",void 0),Ge([q("gridOptionsService")],e.prototype,"gridOptionsService",void 0),Ge([q("localeService")],e.prototype,"localeService",void 0),Ge([q("environment")],e.prototype,"environment",void 0),Ge([K],e.prototype,"destroy",null),e}(),He=(xe=function(e,t){return(xe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}xe(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),ke=function(e,t,o,n){var r,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(i<3?r(s):i>3?r(t,o,s):r(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},Be=function(e,t){return function(o,n){t(o,n,e)}},je=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return He(t,e),t.prototype.setBeans=function(e){this.logger=e.create("ColumnFactory")},t.prototype.createColumnTree=function(e,t,o,n){var r=new c,i=this.extractExistingTreeData(o),s=i.existingCols,a=i.existingGroups,l=i.existingColKeys;r.addExistingKeys(l);var u=this.recursivelyCreateColumns(e,0,t,s,r,a,n),p=this.findMaxDept(u,0);this.logger.log("Number of levels for grouped columns is "+p);var d=this.balanceColumnTree(u,0,p,r);return this.columnUtils.depthFirstOriginalTreeSearch(null,d,(function(e,t){e instanceof ue&&e.setupExpandable(),e.setOriginalParent(t)})),{columnTree:d,treeDept:p}},t.prototype.extractExistingTreeData=function(e){var t=[],o=[],n=[];return e&&this.columnUtils.depthFirstOriginalTreeSearch(null,e,(function(e){if(e instanceof ue){var r=e;o.push(r)}else{var i=e;n.push(i.getId()),t.push(i)}})),{existingCols:t,existingGroups:o,existingColKeys:n}},t.prototype.createForAutoGroups=function(e,t){var o=this;return e.map((function(e){return o.createAutoGroupTreeItem(t,e)}))},t.prototype.createAutoGroupTreeItem=function(e,t){for(var o=this.findDepth(e),n=t,r=o-1;r>=0;r--){var i=new ue(null,"FAKE_PATH_".concat(t.getId(),"}_").concat(r),!0,r);this.createBean(i),i.setChildren([n]),n.setOriginalParent(i),n=i}return 0===o&&t.setOriginalParent(null),n},t.prototype.findDepth=function(e){for(var t=0,o=e;o&&o[0]&&o[0]instanceof ue;)t++,o=o[0].getChildren();return t},t.prototype.balanceColumnTree=function(e,t,o,n){for(var r=[],i=0;i<e.length;i++){var s=e[i];if(s instanceof ue){var a=s,l=this.balanceColumnTree(a.getChildren(),t+1,o,n);a.setChildren(l),r.push(a)}else{for(var u=void 0,c=void 0,p=o-1;p>=t;p--){var d=n.getUniqueKey(null,null),h=this.createMergedColGroupDef(null),f=new ue(h,d,!0,t);this.createBean(f),c&&c.setChildren([f]),c=f,u||(u=c)}if(u&&c){if(r.push(u),e.some((function(e){return e instanceof ue}))){c.setChildren([s]);continue}c.setChildren(e);break}r.push(s)}}return r},t.prototype.findMaxDept=function(e,t){for(var o=t,n=0;n<e.length;n++){var r=e[n];if(r instanceof ue){var i=r,s=this.findMaxDept(i.getChildren(),t+1);o<s&&(o=s)}}return o},t.prototype.recursivelyCreateColumns=function(e,t,o,n,r,i,s){if(!e)return[];for(var a=new Array(e.length),l=0;l<a.length;l++){var u=e[l];this.isColumnGroup(u)?a[l]=this.createColumnGroup(o,u,t,n,r,i,s):a[l]=this.createColumn(o,u,n,r,s)}return a},t.prototype.createColumnGroup=function(e,t,o,n,r,i,s){var a=this.createMergedColGroupDef(t),l=r.getUniqueKey(a.groupId||null,null),u=new ue(a,l,!1,o);this.createBean(u);var c=this.findExistingGroup(t,i);c&&i.splice(c.idx,1);var p=null==c?void 0:c.group;p&&u.setExpanded(p.isExpanded());var d=this.recursivelyCreateColumns(a.children,o+1,e,n,r,i,s);return u.setChildren(d),u},t.prototype.createMergedColGroupDef=function(e){var t={};return Object.assign(t,this.gridOptionsService.get("defaultColGroupDef")),Object.assign(t,e),t},t.prototype.createColumn=function(e,t,o,n,r){var i=this.findExistingColumn(t,o);i&&(null==o||o.splice(i.idx,1));var s=null==i?void 0:i.column;if(s){l=this.addColumnDefaultAndTypes(t,s.getColId());s.setColDef(l,t,r),this.applyColumnState(s,l,r)}els