PageSourceSearch

https://upag.gov.in/static/js/vendors-e7aec6a0.1ae31619.js

js upag.gov.in collected 2026-10-04 02:27:50 UTC 1,423,634 bytes, 2 lines download raw bytes

vendor: 13,685 bytes, lines 1-2
1/*! For license information please see vendors-e7aec6a0.1ae31619.js.LICENSE.txt */
2"use strict";(globalThis.webpackChunkupag||=[]).push([[9491],{32957(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__){var ag_grid_community__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(67079),MD5=function(){function e(){this.ieCompatibility=!1}return e.prototype.init=function(){this.ieCompatibility="5d41402abc4b2a76b9719d911017c592"!=this.md5("hello")},e.prototype.md5cycle=function(e,t){var r=e[0],o=e[1],i=e[2],n=e[3];r=this.ff(r,o,i,n,t[0],7,-680876936),n=this.ff(n,r,o,i,t[1],12,-389564586),i=this.ff(i,n,r,o,t[2],17,606105819),o=this.ff(o,i,n,r,t[3],22,-1044525330),r=this.ff(r,o,i,n,t[4],7,-176418897),n=this.ff(n,r,o,i,t[5],12,1200080426),i=this.ff(i,n,r,o,t[6],17,-1473231341),o=this.ff(o,i,n,r,t[7],22,-45705983),r=this.ff(r,o,i,n,t[8],7,1770035416),n=this.ff(n,r,o,i,t[9],12,-1958414417),i=this.ff(i,n,r,o,t[10],17,-42063),o=this.ff(o,i,n,r,t[11],22,-1990404162),r=this.ff(r,o,i,n,t[12],7,1804603682),n=this.ff(n,r,o,i,t[13],12,-40341101),i=this.ff(i,n,r,o,t[14],17,-1502002290),o=this.ff(o,i,n,r,t[15],22,1236535329),r=this.gg(r,o,i,n,t[1],5,-165796510),n=this.gg(n,r,o,i,t[6],9,-1069501632),i=this.gg(i,n,r,o,t[11],14,643717713),o=this.gg(o,i,n,r,t[0],20,-373897302),r=this.gg(r,o,i,n,t[5],5,-701558691),n=this.gg(n,r,o,i,t[10],9,38016083),i=this.gg(i,n,r,o,t[15],14,-660478335),o=this.gg(o,i,n,r,t[4],20,-405537848),r=this.gg(r,o,i,n,t[9],5,568446438),n=this.gg(n,r,o,i,t[14],9,-1019803690),i=this.gg(i,n,r,o,t[3],14,-187363961),o=this.gg(o,i,n,r,t[8],20,1163531501),r=this.gg(r,o,i,n,t[13],5,-1444681467),n=this.gg(n,r,o,i,t[2],9,-51403784),i=this.gg(i,n,r,o,t[7],14,1735328473),o=this.gg(o,i,n,r,t[12],20,-1926607734),r=this.hh(r,o,i,n,t[5],4,-378558),n=this.hh(n,r,o,i,t[8],11,-2022574463),i=this.hh(i,n,r,o,t[11],16,1839030562),o=this.hh(o,i,n,r,t[14],23,-35309556),r=this.hh(r,o,i,n,t[1],4,-1530992060),n=this.hh(n,r,o,i,t[4],11,1272893353),i=this.hh(i,n,r,o,t[7],16,-155497632),o=this.hh(o,i,n,r,t[10],23,-1094730640),r=this.hh(r,o,i,n,t[13],4,681279174),n=this.hh(n,r,o,i,t[0],11,-358537222),i=this.hh(i,n,r,o,t[3],16,-722521979),o=this.hh(o,i,n,r,t[6],23,76029189),r=this.hh(r,o,i,n,t[9],4,-640364487),n=this.hh(n,r,o,i,t[12],11,-421815835),i=this.hh(i,n,r,o,t[15],16,530742520),o=this.hh(o,i,n,r,t[2],23,-995338651),r=this.ii(r,o,i,n,t[0],6,-198630844),n=this.ii(n,r,o,i,t[7],10,1126891415),i=this.ii(i,n,r,o,t[14],15,-1416354905),o=this.ii(o,i,n,r,t[5],21,-57434055),r=this.ii(r,o,i,n,t[12],6,1700485571),n=this.ii(n,r,o,i,t[3],10,-1894986606),i=this.ii(i,n,r,o,t[10],15,-1051523),o=this.ii(o,i,n,r,t[1],21,-2054922799),r=this.ii(r,o,i,n,t[8],6,1873313359),n=this.ii(n,r,o,i,t[15],10,-30611744),i=this.ii(i,n,r,o,t[6],15,-1560198380),o=this.ii(o,i,n,r,t[13],21,1309151649),r=this.ii(r,o,i,n,t[4],6,-145523070),n=this.ii(n,r,o,i,t[11],10,-1120210379),i=this.ii(i,n,r,o,t[2],15,718787259),o=this.ii(o,i,n,r,t[9],21,-343485551),e[0]=this.add32(r,e[0]),e[1]=this.add32(o,e[1]),e[2]=this.add32(i,e[2]),e[3]=this.add32(n,e[3])},e.prototype.cmn=function(e,t,r,o,i,n){return t=this.add32(this.add32(t,e),this.add32(o,n)),this.add32(t<<i|t>>>32-i,r)},e.prototype.ff=function(e,t,r,o,i,n,a){return this.cmn(t&r|~t&o,e,t,i,n,a)},e.prototype.gg=function(e,t,r,o,i,n,a){return this.cmn(t&o|r&~o,e,t,i,n,a)},e.prototype.hh=function(e,t,r,o,i,n,a){return this.cmn(t^r^o,e,t,i,n,a)},e.prototype.ii=function(e,t,r,o,i,n,a){return this.cmn(r^(t|~o),e,t,i,n,a)},e.prototype.md51=function(e){var t,r=e.length,o=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=e.length;t+=64)this.md5cycle(o,this.md5blk(e.substring(t-64,t)));e=e.substring(t-64);var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<e.length;t++)i[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(i[t>>2]|=128<<(t%4<<3),t>55)for(this.md5cycle(o,i),t=0;t<16;t++)i[t]=0;return i[14]=8*r,this.md5cycle(o,i),o},e.prototype.md5blk=function(e){for(var t=[],r=0;r<64;r+=4)t[r>>2]=e.charCodeAt(r)+(e.charCodeAt(r+1)<<8)+(e.charCodeAt(r+2)<<16)+(e.charCodeAt(r+3)<<24);return t},e.prototype.rhex=function(e){for(var t="0123456789abcdef".split(""),r="",o=0;o<4;o++)r+=t[e>>8*o+4&15]+t[e>>8*o&15];return r},e.prototype.hex=function(e){for(var t=0;t<e.length;t++)e[t]=this.rhex(e[t]);return e.join("")},e.prototype.md5=function(e){return this.hex(this.md51(e))},e.prototype.add32=function(e,t){return this.ieCompatibility?this.add32Compat(e,t):this.add32Std(e,t)},e.prototype.add32Std=function(e,t){return e+t&4294967295},e.prototype.add32Compat=function(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r},e}(),__read$19=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a};function missingOrEmpty(e){return null==e||0===e.length}function exists(e,t){return void 0===t&&(t=!1),null!=e&&(""!==e||t)}var LicenseManager=function(){function e(e){this.watermarkMessage=void 0,this.document=e,this.md5=new MD5,this.md5.init()}return e.prototype.validateLicense=function(){if(missingOrEmpty(e.licenseKey))this.isWebsiteUrl()||this.outputMissingLicenseKey();else if(e.licenseKey.length>32)if(-1!==e.licenseKey.indexOf("For_Trialing_ag-Grid_Only"))this.outputInvalidLicenseKey();else{var t=e.extractLicenseComponents(e.licenseKey),r=t.md5,o=t.license,i=t.version,n=t.isTrial;r===this.md5.md5(o)?exists(i)&&i?this.validateLicenseKeyForVersion(i,!!n,o):this.validateLegacyKey(o):this.outputInvalidLicenseKey()}else this.outputInvalidLicenseKey()},e.extractExpiry=function(t){var r=t.substring(t.lastIndexOf("_")+1,t.length);return new Date(parseInt(e.decode(r),10))},e.extractLicenseComponents=function(t){var r=t.replace(/[\u200B-\u200D\uFEFF]/g,""),o=(r=r.replace(/\r?\n|\r/g,"")).length-32,i=r.substring(o),n=r.substring(0,o),a=__read$19(e.extractBracketedInformation(r),2);return{md5:i,license:n,version:a[0],isTrial:a[1]}},e.prototype.getLicenseDetails=function(t){var r=e.extractLicenseComponents(t),o=r.md5,i=r.license,n=r.version,a=r.isTrial,s=o===this.md5.md5(i),l=null;return s&&(l=e.extractExpiry(i),s=!isNaN(l.getTime())),{licenseKey:t,valid:s,expiry:s?e.formatDate(l):null,version:n||"legacy",isTrial:a}},e.prototype.isDisplayWatermark=function(){return!this.isLocalhost()&&!this.isWebsiteUrl()&&!missingOrEmpty(this.watermarkMessage)},e.prototype.getWatermarkMessage=function(){return this.watermarkMessage||""},e.prototype.getHostname=function(){var e=(this.document.defaultView||window).location.hostname;return void 0===e?"":e},e.prototype.isWebsiteUrl=function(){return null!==this.getHostname().match(/^((?:\w+\.)?ag-grid\.com)$/)},e.prototype.isLocalhost=function(){return null!==this.getHostname().match(/^(?:127\.0\.0\.1|localhost)$/)},e.formatDate=function(e){var t=e.getDate(),r=e.getMonth(),o=e.getFullYear();return t+" "+["January","February","March","April","May","June","July","August","September","October","November","December"][r]+" "+o},e.getGridReleaseDate=function(){return new Date(parseInt(e.decode(e.RELEASE_INFORMATION),10))},e.decode=function(t){for(var r,o,i,n,a,s,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",c="",u=0,d=t.replace(/[^A-Za-z0-9+/=]/g,"");u<d.length;)r=l.indexOf(d.charAt(u++))<<2|(n=l.indexOf(d.charAt(u++)))>>4,o=(15&n)<<4|(a=l.indexOf(d.charAt(u++)))>>2,i=(3&a)<<6|(s=l.indexOf(d.charAt(u++))),c+=String.fromCharCode(r),64!=a&&(c+=String.fromCharCode(o)),64!=s&&(c+=String.fromCharCode(i));return e.utf8_decode(c)},e.utf8_decode=function(e){e=e.replace(/rn/g,"n");for(var t="",r=0;r<e.length;r++){var o=e.charCodeAt(r);o<128?t+=String.fromCharCode(o):o>127&&o<2048?(t+=String.fromCharCode(o>>6|192),t+=String.fromCharCode(63&o|128)):(t+=String.fromCharCode(o>>12|224),t+=String.fromCharCode(o>>6&63|128),t+=String.fromCharCode(63&o|128))}return t},e.setLicenseKey=function(e){this.licenseKey=e},e.extractBracketedInformation=function(e){var t=e.split("[").filter(function(e){return e.indexOf("]")>-1}).map(function(e){return e.split("]")[0]});if(!t||0===t.length)return[null,null];var r=1===t.filter(function(e){return"TRIAL"===e}).length;return[t.filter(function(e){return 0===e.indexOf("v")}).map(function(e){return e.replace(/^v/,"")})[0],r]},e.prototype.validateLicenseKeyForVersion=function(e,t,r){"2"===e&&(t?this.validateForTrial(r):this.validateLegacyKey(r))},e.prototype.validateLegacyKey=function(t){var r=e.getGridReleaseDate(),o=e.extractExpiry(t),i=!1,n=!1;if(isNaN(o.getTime())||(i=!0,n=r<o),i){if(!n){var a=e.formatDate(o),s=e.formatDate(r);this.outputIncompatibleVersion(a,s)}}else this.outputInvalidLicenseKey()},e.prototype.validateForTrial=function(t){var r=e.extractExpiry(t),o=new Date,i=!1,n=!1;if(isNaN(r.getTime())||(i=!0,n=r>o),i){if(!n){var a=e.formatDate(r);this.outputExpiredTrialKey(a)}}else this.outputInvalidLicenseKey()},e.prototype.outputInvalidLicenseKey=function(){console.error("*****************************************************************************************************************"),console.error("***************************************** AG Grid Enterprise License ********************************************"),console.error("********************************************* Invalid License ***************************************************"),console.error("* Your license for AG Grid Enterprise is not valid - please contact [email protected] to obtain a valid license. *"),console.error("*****************************************************************************************************************"),console.error("*****************************************************************************************************************"),this.watermarkMessage="Invalid License"},e.prototype.outputExpiredTrialKey=function(e){console.error("****************************************************************************************************************"),console.error("***************************************** AG Grid Enterprise License *******************************************"),console.error("*****************************************   Trial Period Expired.    *******************************************"),console.error("* Your license for AG Grid Enterprise expired on "+e+".                                                *"),console.error("* Please email [email protected] to purchase a license.                                                         *"),console.error("****************************************************************************************************************"),console.error("****************************************************************************************************************"),this.watermarkMessage="Trial Period Expired"},e.prototype.outputMissingLicenseKey=function(){console.error("****************************************************************************************************************"),console.error("***************************************** AG Grid Enterprise License *******************************************"),console.error("****************************************** License Key Not Found ***********************************************"),console.error("* All AG Grid Enterprise features are unlocked.                                                                *"),console.error("* This is an evaluation only version, it is not licensed for development projects intended for production.     *"),console.error("* If you want to hide the watermark, please email [email protected] for a trial license.                        *"),console.error("****************************************************************************************************************"),console.error("****************************************************************************************************************"),this.watermarkMessage="For Trial Use Only"},e.prototype.outputIncompatibleVersion=function(e,t){console.error("****************************************************************************************************************************"),console.error("****************************************************************************************************************************"),console.error("*                                             AG Grid Enterprise License                                                   *"),console.error("*                           License not compatible with installed version of AG Grid Enterprise.                           *"),console.error("*                                                                                                                          *"),console.error("* Your AG Grid License entitles you to all versions of AG Grid that we release within the time covered by your license     *"),console.error("* - typically we provide one year licenses which entitles you to all releases / updates of AG Grid within that year.       *"),console.error("* Your license has an end (expiry) date which stops the license key working with versions of AG Grid released after the    *"),console.error("* license end date. The license key that you have expires on "+e+", however the version of AG Grid you    *"),console.error("* are trying to use was released on "+t+".                                                               *"),console.error("*                                                                                                                          *"),console.error("* Please contact [email protected] to renew your subscription to new versions and get a new license key to work with this   *"),console.error("* ver
2sion of AG Grid.                                                                                                      *"),console.error("****************************************************************************************************************************"),console.error("****************************************************************************************************************************"),this.watermarkMessage="License Expired"},e.RELEASE_INFORMATION="MTY3OTA3NTEyNjExOQ==",e}(),__extends$3k=(extendStatics=function(e,t){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},extendStatics(e,t)},function(e,t){function r(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),extendStatics,__decorate$2w=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},GridLicenseManager=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$3k(t,e),t.prototype.validateLicense=function(){this.licenseManager=new LicenseManager(this.gridOptionsService.getDocument()),this.licenseManager.validateLicense()},t.prototype.getLicenseDetails=function(e){this.licenseManager.getLicenseDetails(e)},t.prototype.isDisplayWatermark=function(){return this.licenseManager.isDisplayWatermark()},t.prototype.getWatermarkMessage=function(){return this.licenseManager.getWatermarkMessage()},t.setLicenseKey=function(e){LicenseManager.setLicenseKey(e)},__decorate$2w([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PreConstruct],t.prototype,"validateLicense",null),__decorate$2w([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Bean)("licenseManager")],t)}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.BeanStub),__extends$3j=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$2v=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},WatermarkComp=function(e){function t(){return e.call(this,'<div class="ag-watermark">\n                    <div ref="eLicenseTextRef" class="ag-watermark-text"></div>\n               </div>')||this}return __extends$3j(t,e),t.prototype.postConstruct=function(){var e=this,t=this.shouldDisplayWatermark();this.setDisplayed(t),t&&(this.eLicenseTextRef.innerText=this.licenseManager.getWatermarkMessage(),window.setTimeout(function(){return e.addCssClass("ag-opacity-zero")},0),window.setTimeout(function(){return e.setDisplayed(!1)},5e3))},t.prototype.shouldDisplayWatermark=function(){var e=(this.gridOptionsService.getDocument().defaultView||window).location.pathname,t=this.licenseManager.isDisplayWatermark();return!!e&&-1!==e.indexOf("forceWatermark")||t},__decorate$2v([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("licenseManager")],t.prototype,"licenseManager",void 0),__decorate$2v([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eLicenseTextRef")],t.prototype,"eLicenseTextRef",void 0),__decorate$2v([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"postConstruct",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),VERSION$i="29.2.0",EnterpriseCoreModule={version:VERSION$i,moduleName:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleNames.EnterpriseCoreModule,beans:[GridLicenseManager],agStackComponents:[{componentName:"AgWatermark",componentClass:WatermarkComp}]},__extends$3i=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$2u=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},__values$C=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);
2if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},SOURCE_PASTE="paste",EXPORT_TYPE_DRAG_COPY="dragCopy",EXPORT_TYPE_CLIPBOARD="clipboard",CellClearType;!function(e){e[e.CellRange=0]="CellRange",e[e.SelectedRows=1]="SelectedRows",e[e.FocusedCell=2]="FocusedCell"}(CellClearType||(CellClearType={}));var ClipboardService=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.lastPasteOperationTime=0,t.navigatorApiFailed=!1,t}var r;return __extends$3i(t,e),r=t,t.prototype.init=function(){var e=this;this.logger=this.loggerFactory.create("ClipboardService"),"clientSide"===this.rowModel.getType()&&(this.clientSideRowModel=this.rowModel),this.ctrlsService.whenReady(function(t){e.gridCtrl=t.gridCtrl})},t.prototype.pasteFromClipboard=function(){var e=this;this.logger.log("pasteFromClipboard"),!this.gridOptionsService.is("suppressClipboardApi")&&!this.navigatorApiFailed&&navigator.clipboard&&navigator.clipboard.readText?navigator.clipboard.readText().then(this.processClipboardData.bind(this)).catch(function(t){ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.doOnce(function(){console.warn(t),console.warn("AG Grid: Unable to use the Clipboard API (navigator.clipboard.readText()). The reason why it could not be used has been logged in the previous line. For this reason the grid has defaulted to using a workaround which doesn't perform as well. Either fix why Clipboard API is blocked, OR stop this message from appearing by setting grid property suppressClipboardApi=true (which will default the grid to using the workaround rather than the API")},"clipboardApiError"),e.navigatorApiFailed=!0,e.pasteFromClipboardLegacy()}):this.pasteFromClipboardLegacy()},t.prototype.pasteFromClipboardLegacy=function(){var e=this,t=!1,r=function(r){var o=(new Date).getTime();o-e.lastPasteOperationTime<50&&(t=!0,r.preventDefault()),e.lastPasteOperationTime=o};this.executeOnTempElement(function(e){e.addEventListener("paste",r),e.focus({preventScroll:!0})},function(o){var i=o.value;t?e.refocusLastFocusedCell():e.processClipboardData(i),o.removeEventListener("paste",r)})},t.prototype.refocusLastFocusedCell=function(){var e=this.focusService.getFocusedCell();e&&this.focusService.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0})},t.prototype.getClipboardDelimiter=function(){var e=this.gridOptionsService.get("clipboardDelimiter");return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.exists(e)?e:"\t"},t.prototype.processClipboardData=function(e){var t=this;if(null!=e){var o=r.stringToArray(e,this.getClipboardDelimiter()),i=this.gridOptionsService.getCallback("processDataFromClipboard");i&&(o=i({data:o})),null!=o&&(this.gridOptionsService.is("suppressLastEmptyLineOnPaste")&&this.removeLastLineIfBlank(o),this.doPasteOperation(function(e,r,i,n){t.rangeService&&t.rangeService.isMoreThanOneCell()&&!t.hasOnlyOneValueToPaste(o)?t.pasteIntoActiveRange(o,e,r,n):t.pasteStartingFromFocusedCell(o,e,r,i,n)}))}},t.stringToArray=function(e,t){void 0===t&&(t=",");var r=[],o=function(e){return"\r"===e||"\n"===e},i=!1;if(""===e)return[[""]];for(var n,a,s,l=function(l,c,u){var d=e[u-1],p=e[u],h=e[u+1],_=function(){r[l]||(r[l]=[]),r[l][c]||(r[l][c]="")};if(_(),'"'===p){if(i)return'"'===h?(r[l][c]+='"',u++):i=!1,n=l,a=c,s=u,"continue";if(void 0===d||d===t||o(d))return i=!0,n=l,a=c,s=u,"continue"}if(!i){if(p===t)return c++,_(),n=l,a=c,s=u,"continue";if(o(p))return c=0,l++,_(),"\r"===p&&"\n"===h&&u++,n=l,a=c,s=u,"continue"}r[l][c]+=p,n=l,a=c,s=u},c=0,u=0,d=0;d<e.length;d++)l(c,u,d),c=n,u=a,d=s;return r},t.prototype.doPasteOperation=function(e){var t,r=this.gridOptionsService.api,o=this.gridOptionsService.columnApi,i="clipboard";if(this.eventService.dispatchEvent({type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_PASTE_START,api:r,columnApi:o,source:i}),this.clientSideRowModel){var n=this.gridOptionsService.is("aggregateOnlyChangedColumns");t=new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ChangedPath(n,this.clientSideRowModel.getRootNode())}var a={},s=[];e(a,s,this.focusService.getFocusedCell(),t),t&&this.clientSideRowModel.doAggregate(t),this.rowRenderer.refreshCells(),this.dispatchFlashCells(a),this.fireRowChanged(s),this.refocusLastFocusedCell();var l={type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_PASTE_END,source:i};this.eventService.dispatchEvent(l)},t.prototype.pasteIntoActiveRange=function(e,t,r,o){var i=this,n=this.getRangeSize()%e.length!=0,a=0,s=0;this.iterateActiveRanges(!1,function(l,c,u,d){if(d-a>=e.length){if(n)return;a+=s,s=0}var p=e[d-a];r.push(c);var h=i.gridOptionsService.getCallback("processCellFromClipboard");u.forEach(function(e,r){if(e.isCellEditable(c)&&!e.isSuppressPaste(c)){r>=p.length&&(r%=p.length);var n=i.processCell(c,e,p[r],EXPORT_TYPE_DRAG_COPY,h);c.setDataValue(e,n,SOURCE_PASTE),o&&o.addParentNode(c.parent,[e]);var a=l.rowIndex,s=l.rowPinned,u=i.cellPositionUtils.createIdFromValues({rowIndex:a,column:e,rowPinned:s});t[u]=!0}}),s++})},t.prototype.pasteStartingFromFocusedCell=function(e,t,r,o,i){if
2(o){var n={rowIndex:o.rowIndex,rowPinned:o.rowPinned},a=this.columnModel.getDisplayedColumnsStartingAt(o.column);this.isPasteSingleValueIntoRange(e)?this.pasteSingleValueIntoRange(e,r,t,i):this.pasteMultipleValues(e,n,r,a,t,EXPORT_TYPE_CLIPBOARD,i)}},t.prototype.isPasteSingleValueIntoRange=function(e){return this.hasOnlyOneValueToPaste(e)&&null!=this.rangeService&&!this.rangeService.isEmpty()},t.prototype.pasteSingleValueIntoRange=function(e,t,r,o){var i=this,n=e[0][0];this.iterateActiveRanges(!1,function(e,a,s){t.push(a),s.forEach(function(e){return i.updateCellValue(a,e,n,r,EXPORT_TYPE_CLIPBOARD,o)})})},t.prototype.hasOnlyOneValueToPaste=function(e){return 1===e.length&&1===e[0].length},t.prototype.copyRangeDown=function(){var e=this;if(this.rangeService&&!this.rangeService.isEmpty()){var t=[];this.doPasteOperation(function(r,o,i,n){var a=e.gridOptionsService.getCallback("processCellForClipboard"),s=e.gridOptionsService.getCallback("processCellFromClipboard");e.iterateActiveRanges(!0,function(i,l,c){t.length?(o.push(l),c.forEach(function(o,a){if(o.isCellEditable(l)&&!o.isSuppressPaste(l)){var c=e.processCell(l,o,t[a],EXPORT_TYPE_DRAG_COPY,s);l.setDataValue(o,c,SOURCE_PASTE),n&&n.addParentNode(l.parent,[o]);var u=i.rowIndex,d=i.rowPinned,p=e.cellPositionUtils.createIdFromValues({rowIndex:u,column:o,rowPinned:d});r[p]=!0}})):c.forEach(function(r){var o=e.processCell(l,r,e.valueService.getValue(r,l),EXPORT_TYPE_DRAG_COPY,a);t.push(o)})})})}},t.prototype.removeLastLineIfBlank=function(e){var t=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.last(e);if(t&&1===t.length&&""===t[0]){if(1===e.length)return;ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.removeFromArray(e,t)}},t.prototype.fireRowChanged=function(e){var t=this;"fullRow"===this.gridOptionsService.get("editType")&&e.forEach(function(e){var r={type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_ROW_VALUE_CHANGED,node:e,data:e.data,rowIndex:e.rowIndex,rowPinned:e.rowPinned};t.eventService.dispatchEvent(r)})},t.prototype.pasteMultipleValues=function(e,t,r,o,i,n,a){var s=this,l=t,c=null!=this.clientSideRowModel&&!this.gridOptionsService.isTreeData();e.forEach(function(e){var t=function(){for(;;){if(!l)return null;var e=s.rowPositionUtils.getRowNode(l);if(l=s.cellNavigationService.getRowBelow({rowPinned:l.rowPinned,rowIndex:l.rowIndex}),null==e)return null;if(!(e.detail||e.footer||c&&e.group))return e}}();t&&(e.forEach(function(e,r){return s.updateCellValue(t,o[r],e,i,n,a)}),r.push(t))})},t.prototype.updateCellValue=function(e,t,r,o,i,n){if(e&&t&&t.isCellEditable(e)&&!t.isSuppressPaste(e)){var a=this.processCell(e,t,r,i,this.gridOptionsService.getCallback("processCellFromClipboard"));e.setDataValue(t,a,SOURCE_PASTE);var s=e.rowIndex,l=e.rowPinned;o[this.cellPositionUtils.createIdFromValues({rowIndex:s,column:t,rowPinned:l})]=!0,n&&n.addParentNode(e.parent,[t])}},t.prototype.copyToClipboard=function(e){void 0===e&&(e={}),this.copyOrCutToClipboard(e)},t.prototype.cutToClipboard=function(e){void 0===e&&(e={}),this.gridOptionsService.is("suppressCutToClipboard")||this.copyOrCutToClipboard(e,!0)},t.prototype.copyOrCutToClipboard=function(e,t){var r=e.includeHeaders,o=e.includeGroupHeaders;this.logger.log("copyToClipboard: includeHeaders = "+r),null==r&&(r=this.gridOptionsService.is("copyHeadersToClipboard")),null==o&&(o=this.gridOptionsService.is("copyGroupHeadersToClipboard"));var i={includeHeaders:r,includeGroupHeaders:o},n=!this.gridOptionsService.is("suppressCopyRowsToClipboard"),a=null;!this.rangeService||this.rangeService.isEmpty()||this.shouldSkipSingleCellRange()?n&&!this.selectionService.isEmpty()?(this.copySelectedRowsToClipboard(i),a=CellClearType.SelectedRows):this.focusService.isAnyCellFocused()&&(this.copyFocusedCellToClipboard(i),a=CellClearType.FocusedCell):(this.copySelectedRangeToClipboard(i),a=CellClearType.CellRange),t&&null!==a&&this.clearCellsAfterCopy(a)},t.prototype.clearCellsAfterCopy=function(e){if(this.eventService.dispatchEvent({type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_KEY_SHORTCUT_CHANGED_CELL_START}),e===CellClearType.CellRange)this.rangeService.clearCellRangeCellValues(void 0,"clipboardService");else if(e===CellClearType.SelectedRows)this.clearSelectedRows();else{var t=this.focusService.getFocusedCell();if(null==t)return;var r=this.rowPositionUtils.getRowNode(t);
2r&&this.clearCellValue(r,t.column)}this.eventService.dispatchEvent({type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_KEY_SHORTCUT_CHANGED_CELL_END})},t.prototype.clearSelectedRows=function(){var e,t,r,o,i=this.selectionService.getSelectedNodes(),n=this.columnModel.getAllDisplayedColumns();try{for(var a=__values$C(i),s=a.next();!s.done;s=a.next()){var l=s.value;try{for(var c=(r=void 0,__values$C(n)),u=c.next();!u.done;u=c.next()){var d=u.value;this.clearCellValue(l,d)}}catch(e){r={error:e}}finally{try{u&&!u.done&&(o=c.return)&&o.call(c)}finally{if(r)throw r.error}}}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}},t.prototype.clearCellValue=function(e,t){t.isCellEditable(e)&&e.setDataValue(t,null,"clipboardService")},t.prototype.shouldSkipSingleCellRange=function(){return this.gridOptionsService.is("suppressCopySingleCellRanges")&&!this.rangeService.isMoreThanOneCell()},t.prototype.iterateActiveRanges=function(e,t,r){var o=this;if(this.rangeService&&!this.rangeService.isEmpty()){var i=this.rangeService.getCellRanges();e?this.iterateActiveRange(i[0],t,r,!0):i.forEach(function(e,n){return o.iterateActiveRange(e,t,r,n===i.length-1)})}},t.prototype.iterateActiveRange=function(e,t,r,o){if(this.rangeService){var i=this.rangeService.getRangeStartRow(e),n=this.rangeService.getRangeEndRow(e);r&&e.columns&&r(e.columns);for(var a=0,s=!1;!s&&null!=i;){var l=this.rowPositionUtils.getRowNode(i);s=this.rowPositionUtils.sameRow(i,n),t(i,l,e.columns,a++,s&&o),i=this.cellNavigationService.getRowBelow(i)}}},t.prototype.copySelectedRangeToClipboard=function(e){if(void 0===e&&(e={}),this.rangeService&&!this.rangeService.isEmpty()){var t=this.rangeService.areAllRangesAbleToMerge()?this.buildDataFromMergedRanges(e):this.buildDataFromRanges(e),r=t.data,o=t.cellsToFlash;this.copyDataToClipboard(r),this.dispatchFlashCells(o)}},t.prototype.buildDataFromMergedRanges=function(e){var t=this,r=new Set,o=this.rangeService.getCellRanges(),i=new Map,n=[],a={};o.forEach(function(e){e.columns.forEach(function(e){return r.add(e)});var o=t.getRangeRowPositionsAndCellsToFlash(e),s=o.rowPositions,l=o.cellsToFlash;s.forEach(function(e){var t=e.rowIndex+"-"+(e.rowPinned||"null");i.get(t)||(i.set(t,!0),n.push(e))}),Object.assign(a,l)});var s=this.columnModel.getAllDisplayedColumns(),l=Array.from(r);return l.sort(function(e,t){return s.indexOf(e)-s.indexOf(t)}),{data:this.buildExportParams({columns:l,rowPositions:n,includeHeaders:e.includeHeaders,includeGroupHeaders:e.includeGroupHeaders}),cellsToFlash:a}},t.prototype.buildDataFromRanges=function(e){var t=this,r=this.rangeService.getCellRanges(),o=[],i={};return r.forEach(function(r){var n=t.getRangeRowPositionsAndCellsToFlash(r),a=n.rowPositions,s=n.cellsToFlash;Object.assign(i,s),o.push(t.buildExportParams({columns:r.columns,rowPositions:a,includeHeaders:e.includeHeaders,includeGroupHeaders:e.includeGroupHeaders}))}),{data:o.join("\n"),cellsToFlash:i}},t.prototype.getRangeRowPositionsAndCellsToFlash=function(e){for(var t=this,r=[],o={},i=this.rangeService.getRangeStartRow(e),n=this.rangeService.getRangeEndRow(e),a=i;a&&(r.push(a),e.columns.forEach(function(e){var r=a,i=r.rowIndex,n=r.rowPinned,s=t.cellPositionUtils.createIdFromValues({rowIndex:i,column:e,rowPinned:n});o[s]=!0}),!this.rowPositionUtils.sameRow(a,n));)a=this.cellNavigationService.getRowBelow(a);return{rowPositions:r,cellsToFlash:o}},t.prototype.copyFocusedCellToClipboard=function(e){var t;void 0===e&&(e={});var r=this.focusService.getFocusedCell();if(null!=r){var o=this.cellPositionUtils.createId(r),i={rowPinned:r.rowPinned,rowIndex:r.rowIndex},n=r.column,a=this.buildExportParams({columns:[n],rowPositions:[i],includeHeaders:e.includeHeaders,includeGroupHeaders:e.includeGroupHeaders});this.copyDataToClipboard(a),this.dispatchFlashCells(((t={})[o]=!0,t))}},t.prototype.copySelectedRowsToClipboard=function(e){void 0===e&&(e={});var t=e.columnKeys,r=e.includeHeaders,o=e.includeGroupHeaders,i=this.buildExportParams({columns:t,includeHeaders:r,includeGroupHeaders:o});this.copyDataToClipboard(i)},t.prototype.buildExportParams=function(e){var t=this,r=e.columns,o=e.rowPositions,i=e.includeHeaders,n=void 0!==i&&i,a=e.includeGroupHeaders,s={columnKeys:r,rowPositions:o,skipColumnHeaders:!n,skipColumnGroupHeaders:!(void 0!==a&&a),suppressQuotes:!0,columnSeparator:this.getClipboardDelimiter(),onlySelected:!o,processCellCallback:this.gridOptionsService.getCallback("processCellForClipboard"),processRowGroupCallback:function(e){return t.processRowGroupCallback(e)},processHeaderCallback:this.gridOptionsService.getCallback("processHeaderForClipboard"),processGroupHeaderCallback:this.gridOptionsService.getCallback("processGroupHeaderForClipboard")};return this.csvCreator.getDataAsCsv(s,!0)},t.prototype.processRowGroupCallback=function(e){var t=e.node,r=t.key,o=null!=r?r:"";if(e.node.footer){var i="";r&&r.length&&(i=" "+r),o="Total"+i}var n=this.gridOptionsService.getCallback("processCellForClipboard");if(n){var a=t.rowGroupColumn;return!a&&t.footer&&-1===t.level&&(a=this.columnModel.getRowGroupColumns()[0]),n({value:o,node:t,column:a,type:"clipboard"})}return o},t.prototype.dispatchFlashCells=function(e){var t=this;window.setTimeout(function(){var r={type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_FLASH_CELLS,cells:e};t.eventService.dispatchEvent(r)},0)},t.prototype.processCell=function(e,t,r,o,i){return i?i({column:t,node:e,value:r,type:o}):r},t.prototype.copyDataToClipboard=function(e){var t=this,r=this.gridOptionsService.getCallback("sendToClipboard");r?r({data:e}):!this.gridOptionsService.is("suppressClipboardApi")&&navigator.clipboard?navigator.clipboard.writeText(e).catch(function(r){ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.doOnce(function(){console.warn(r),console.warn("AG Grid: Unable to use the Clipboard API (navigator.clipboard.writeText()). The reason why it could not be used has been logged in the previous line. For this reason the grid has defaulted to using a workaround which doesn't perform as well. Either fix why Clipboard API is blocked, OR stop this message from appearing by setting grid property suppressClipboardApi=true (which will default the grid to using the workaround rather than the API.")},"clipboardApiError"),t.copyDataToClipboardLegacy(e)}):this.copyDataToClipboardLegacy(e)},t.prototype.copyDataToClipboardLegacy=function(e){var t=this;this.executeOnTempElement(function(r){var o=t.gridOptionsService.getDocument(),i=o.activeElement;r.value=e||" ",r.select(),r.focus({preventScroll:!0}),o.execCommand("copy")||console.warn("AG Grid: Browser did not allow document.execCommand('copy'). Ensure api.copySelectedRowsToClipboard() is invoked via a user event, i.e. button click, otherwise the browser will prevent it for security reasons."),null!=i&&null!=i.focus&&i.focus({preventScroll:!0})})},t.prototype.executeOnTempElement=function(e,t){var r=this.gridOptionsService.getDocument(),o=r.createElement("textarea");o.style.width="1px",o.style.height="1px",o.style.top=r.documentElement.scrollTop+"px",o.style.left=r.documentElement.scrollLeft+"px",o.style.position="absolute",o.style.opacity="0";var i=this.gridCtrl.getGui();i.appendChild(o);try{e(o)}catch(e){console.warn("AG Grid: Browser does not support document.execCommand('copy') for clipboard operations")}t?window.setTimeout(function(){t(o),i.removeChild(o)},100):i.removeChild(o)},t.prototype.getRangeSize=function(){var e=this.rangeService.getCellRanges(),t=0,r=0;return e.length>0&&(t=this.rangeService.getRangeStartRow(e[0]).rowIndex,r=this.rangeService.getRangeEndRow(e[0]).rowIndex),t-r+1},__decorate$2u([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("csvCreator")],t.prototype,"csvCreator",void 0),__decorate$2u([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("loggerFactory")],t.prototype,"loggerFactory",void 0),__decorate$2u([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("selectionService")],t.prototype,"selectionService",void 0),__decorate$2u([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Optional)("rangeService")],t.prototype,"rangeService",void 0),__decorate$2u([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("rowModel")],t.prototype,"rowModel",void 0),__decorate$2u([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("ctrlsService")],t.prototype,"ctrlsService",void 0),__decorate$2u([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("valueService")],t.prototype,"valueService",void 0),__decorate$2u([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("focusService")],t.prototype,"focusService",void 0),__decorate$2u([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("rowRenderer")],t.prototype,"rowRenderer",void 0),__decorate$2u([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],t.prototype,"columnModel",void 0),__decorate$2u([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("cellNavigationService")],t.prototype,"cellNavigationService",void 0),__decorate$2u([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("cellPositionUtils")],t.prototype,"cellPositionUtils",void 0),__decorate$2u([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("rowPositionUtils")],t.prototype,"rowPositionUtils",void 0),__decorate$2u([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"init",null),r=__decorate$2u([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Bean)("clipboardService")],t)}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.BeanStub),VERSION$h="29.2.0",ClipboardModule={version:VERSION$h,moduleName:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleNames.ClipboardModule,beans:[ClipboardService],dependantModules:[EnterpriseCoreModule,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.CsvExportModule]},__extends$3h=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$2t=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},ExpandState;!function(e){e[e.EXPANDED=0]="EXPANDED",e[e.COLLAPSED=1]="COLLAPSED",e[e.INDETERMINATE=2]="INDETERMINATE"}(ExpandState||(ExpandState={}));var PrimaryColsHeaderPanel=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return __extends$3h(t,e),t.prototype.postConstruct=function(){var e=this;this.createExpandIcons(),this.addManagedListener(this.eExpand,"click",this.onExpandClicked.bind(this)),this.addManagedListener(this.eExpand,"keydown",function(t){t.key===ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.KeyCode.SPACE&&e.onExpandClicked()}
2),this.addManagedListener(this.eSelect.getInputElement(),"click",this.onSelectClicked.bind(this)),this.eFilterTextField.onValueChange(function(){return e.onFilterTextChanged()}),this.addManagedListener(this.eFilterTextField.getInputElement(),"keypress",this.onMiniFilterKeyPress.bind(this)),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_NEW_COLUMNS_LOADED,this.showOrHideOptions.bind(this));var t=this.localeService.getLocaleTextFunc();this.eSelect.setInputAriaLabel(t("ariaColumnSelectAll","Toggle Select All Columns")),this.eFilterTextField.setInputAriaLabel(t("ariaFilterColumnsInput","Filter Columns Input"))},t.prototype.init=function(e){this.params=e,this.columnModel.isReady()&&this.showOrHideOptions()},t.prototype.createExpandIcons=function(){this.eExpand.appendChild(this.eExpandChecked=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.createIconNoSpan("columnSelectOpen",this.gridOptionsService)),this.eExpand.appendChild(this.eExpandUnchecked=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.createIconNoSpan("columnSelectClosed",this.gridOptionsService)),this.eExpand.appendChild(this.eExpandIndeterminate=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.createIconNoSpan("columnSelectIndeterminate",this.gridOptionsService)),this.setExpandState(ExpandState.EXPANDED)},t.prototype.showOrHideOptions=function(){var e=!this.params.suppressColumnFilter,t=!this.params.suppressColumnSelectAll,r=!this.params.suppressColumnExpandAll,o=this.columnModel.isPrimaryColumnGroupsPresent(),i=this.localeService.getLocaleTextFunc();this.eFilterTextField.setInputPlaceholder(i("searchOoo","Search...")),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setDisplayed(this.eFilterTextField.getGui(),e),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setDisplayed(this.eSelect.getGui(),t),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setDisplayed(this.eExpand,r&&o)},t.prototype.onFilterTextChanged=function(){var e=this;this.onFilterTextChangedDebounced||(this.onFilterTextChangedDebounced=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.debounce(function(){var t=e.eFilterTextField.getValue();e.dispatchEvent({type:"filterChanged",filterText:t})},t.DEBOUNCE_DELAY)),this.onFilterTextChangedDebounced()},t.prototype.onMiniFilterKeyPress=function(e){var r=this;e.key===ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.KeyCode.ENTER&&setTimeout(function(){return r.onSelectClicked()},t.DEBOUNCE_DELAY)},t.prototype.onSelectClicked=function(){this.dispatchEvent({type:this.selectState?"unselectAll":"selectAll"})},t.prototype.onExpandClicked=function(){this.dispatchEvent({type:this.expandState===ExpandState.EXPANDED?"collapseAll":"expandAll"})},t.prototype.setExpandState=function(e){this.expandState=e,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setDisplayed(this.eExpandChecked,this.expandState===ExpandState.EXPANDED),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setDisplayed(this.eExpandUnchecked,this.expandState===ExpandState.COLLAPSED),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setDisplayed(this.eExpandIndeterminate,this.expandState===ExpandState.INDETERMINATE)},t.prototype.setSelectionState=function(e){this.selectState=e,this.eSelect.setValue(this.selectState)},t.DEBOUNCE_DELAY=300,t.TEMPLATE='<div class="ag-column-select-header" role="presentation">\n            <div ref="eExpand" class="ag-column-select-header-icon" tabindex="0"></div>\n            <ag-checkbox ref="eSelect" class="ag-column-select-header-checkbox"></ag-checkbox>\n            <ag-input-text-field class="ag-column-select-header-filter-wrapper" ref="eFilterTextField"></ag-input-text-field>\n        </div>',__decorate$2t([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],t.prototype,"columnModel",void 0),__decorate$2t([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eExpand")],t.prototype,"eExpand",void 0),__decorate$2t([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eSelect")],t.prototype,"eSelect",void 0),__decorate$2t([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eFilterTextField")],t.prototype,"eFilterTextField",void 0),__decorate$2t([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"postConstruct",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),ColumnModelItem=function(){function e(e,t,r,o,i){void 0===o&&(o=!1),this.eventService=new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.EventService,this.displayName=e,this.dept=r,this.group=o,o?(this.columnGroup=t,this.expanded=i,this.children=[]):this.column=t}return e.prototype.isGroup=function(){return this.group},e.prototype.getDisplayName=function(){return this.displayName},e.prototype.getColumnGroup=function(){return this.columnGroup},e.prototype.getColumn=function(){return this.column},e.prototype.getDept=function(){return this.dept},e.prototype.isExpanded=function(){return!!this.expanded},e.prototype.getChildren=function(){return this.children},e.prototype.isPassesFilter=function(){return this.passesFilter},e.prototype.setExpanded=function(t){t!==this.expanded&&(this.expanded=t,this.eventService.dispatchEvent({type:e.EVENT_EXPANDED_CHANGED}))},e.prototype.setPassesFilter=function(e){this.passesFilter=e},e.prototype.addEventListener=function(e,t){this.eventService.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.eventService.removeEventListener(e,t)},e.EVENT_EXPANDED_CHANGED="expandedChanged",e}(),__extends$3g=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$2s=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},__read$18=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},__spread$I=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read$18(arguments[t]));return e},__values$B=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);
2if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ToolPanelContextMenu=function(e){function t(t,r,o){var i=e.call(this,'<div class="ag-menu"></div>')||this;return i.column=t,i.mouseEvent=r,i.parentEl=o,i.displayName=null,i}return __extends$3g(t,e),t.prototype.postConstruct=function(){this.initializeProperties(this.column),this.buildMenuItemMap(),this.column instanceof ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Column?this.displayName=this.columnModel.getDisplayNameForColumn(this.column,"columnToolPanel"):this.displayName=this.columnModel.getDisplayNameForProvidedColumnGroup(null,this.column,"columnToolPanel"),this.isActive()&&(this.mouseEvent.preventDefault(),this.displayContextMenu())},t.prototype.initializeProperties=function(e){e instanceof ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ProvidedColumnGroup?this.columns=e.getLeafColumns():this.columns=[e],this.allowGrouping=this.columns.some(function(e){return e.isPrimary()&&e.isAllowRowGroup()}),this.allowValues=this.columns.some(function(e){return e.isPrimary()&&e.isAllowValue()}),this.allowPivoting=this.columnModel.isPivotMode()&&this.columns.some(function(e){return e.isPrimary()&&e.isAllowPivot()})},t.prototype.buildMenuItemMap=function(){var e=this,t=this.localeService.getLocaleTextFunc();this.menuItemMap=new Map,this.menuItemMap.set("rowGroup",{allowedFunction:function(e){return e.isPrimary()&&e.isAllowRowGroup()},activeFunction:function(e){return e.isRowGroupActive()},activateLabel:function(){return t("groupBy","Group by")+" "+e.displayName},deactivateLabel:function(){return t("ungroupBy","Un-Group by")+" "+e.displayName},activateFunction:function(){var t=e.columnModel.getRowGroupColumns();e.columnModel.setRowGroupColumns(e.addColumnsToList(t),"toolPanelUi")},deActivateFunction:function(){var t=e.columnModel.getRowGroupColumns();e.columnModel.setRowGroupColumns(e.removeColumnsFromList(t),"toolPanelUi")},addIcon:"menuAddRowGroup",removeIcon:"menuRemoveRowGroup"}),this.menuItemMap.set("value",{allowedFunction:function(e){return e.isPrimary()&&e.isAllowValue()},activeFunction:function(e){return e.isValueActive()},activateLabel:function(){return t("addToValues","Add "+e.displayName+" to values",[e.displayName])},deactivateLabel:function(){return t("removeFromValues","Remove "+e.displayName+" from values",[e.displayName])},activateFunction:function(){var t=e.columnModel.getValueColumns();e.columnModel.setValueColumns(e.addColumnsToList(t),"toolPanelUi")},deActivateFunction:function(){var t=e.columnModel.getValueColumns();e.columnModel.setValueColumns(e.removeColumnsFromList(t),"toolPanelUi")},addIcon:"valuePanel",removeIcon:"valuePanel"}),this.menuItemMap.set("pivot",{allowedFunction:function(t){return e.columnModel.isPivotMode()&&t.isPrimary()&&t.isAllowPivot()},activeFunction:function(e){return e.isPivotActive()},activateLabel:function(){return t("addToLabels","Add "+e.displayName+" to labels",[e.displayName])},deactivateLabel:function(){return t("removeFromLabels","Remove "+e.displayName+" from labels",[e.displayName])},activateFunction:function(){var t=e.columnModel.getPivotColumns();e.columnModel.setPivotColumns(e.addColumnsToList(t),"toolPanelUi")},deActivateFunction:function(){var t=e.columnModel.getPivotColumns();e.columnModel.setPivotColumns(e.removeColumnsFromList(t),"toolPanelUi")},addIcon:"pivotPanel",removeIcon:"pivotPanel"})},t.prototype.addColumnsToList=function(e){return __spread$I(e).concat(this.columns.filter(function(t){return-1===e.indexOf(t)}))},t.prototype.removeColumnsFromList=function(e){var t=this;return e.filter(function(e){return-1===t.columns.indexOf(e)})},t.prototype.displayContextMenu=function(){var e=this,t=this.getGui(),r=this.createBean(new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgMenuList),o=this.getMappedMenuItems(),i=this.localeService.getLocaleTextFunc(),n=function(){};t.appendChild(r.getGui()),r.addMenuItems(o),r.addManagedListener(r,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgMenuItemComponent.EVENT_MENU_ITEM_SELECTED,function(){e.parentEl.focu
2s(),n()});var a=this.popupService.addPopup({modal:!0,eChild:t,closeOnEsc:!0,afterGuiAttached:function(){return e.focusService.focusInto(r.getGui())},ariaLabel:i("ariaLabelContextMenu","Context Menu"),closedCallback:function(t){t instanceof KeyboardEvent&&e.parentEl.focus(),e.destroyBean(r)}});a&&(n=a.hideFunc),this.popupService.positionPopupUnderMouseEvent({type:"columnContextMenu",mouseEvent:this.mouseEvent,ePopup:t})},t.prototype.isActive=function(){return this.allowGrouping||this.allowValues||this.allowPivoting},t.prototype.getMappedMenuItems=function(){var e,t,r=[],o=function(e){var t=i.columns.some(function(t){return e.allowedFunction(t)&&!e.activeFunction(t)}),o=i.columns.some(function(t){return e.allowedFunction(t)&&e.activeFunction(t)});t&&r.push({name:e.activateLabel(i.displayName),icon:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.createIconNoSpan(e.addIcon,i.gridOptionsService,null),action:function(){return e.activateFunction()}}),o&&r.push({name:e.deactivateLabel(i.displayName),icon:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.createIconNoSpan(e.removeIcon,i.gridOptionsService,null),action:function(){return e.deActivateFunction()}})},i=this;try{for(var n=__values$B(this.menuItemMap.values()),a=n.next();!a.done;a=n.next())o(a.value)}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return r},__decorate$2s([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],t.prototype,"columnModel",void 0),__decorate$2s([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("popupService")],t.prototype,"popupService",void 0),__decorate$2s([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("focusService")],t.prototype,"focusService",void 0),__decorate$2s([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"postConstruct",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),__extends$3f=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$2r=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},ToolPanelColumnGroupComp=function(e){function t(t,r,o,i){var n=e.call(this)||this;return n.modelItem=t,n.allowDragging=r,n.eventType=o,n.focusWrapper=i,n.processingColumnStateChange=!1,n.modelItem=t,n.columnGroup=t.getColumnGroup(),n.columnDept=t.getDept(),n.allowDragging=r,n}return __extends$3f(t,e),t.prototype.init=function(){var e=this;this.setTemplate(t.TEMPLATE),this.eDragHandle=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.createIconNoSpan("columnDrag",this.gridOptionsService),this.eDragHandle.classList.add("ag-drag-handle","ag-column-select-column-group-drag-handle");var r=this.cbSelect.getGui(),o=this.cbSelect.getInputElement();r.insertAdjacentElement("afterend",this.eDragHandle),o.setAttribute("tabindex","-1"),this.displayName=this.columnModel.getDisplayNameForProvidedColumnGroup(null,this.columnGroup,this.eventType),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.missing(this.displayName)&&(this.displayName=">>"),this.eLabel.innerHTML=this.displayName?this.displayName:"",this.setupExpandContract(),this.addCssClass("ag-column-select-indent-"+this.columnDept),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.onColumnStateChanged.bind(this)),this.addManagedListener(this.eLabel,"click",this.onLabelClicked.bind(this)),this.addManagedListener(this.cbSelect,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgCheckbox.EVENT_CHANGED,this.onCheckboxChanged.bind(this)),this.addManagedListener(this.modelItem,ColumnModelItem.EVENT_EXPANDED_CHANGED,this.onExpandChanged.bind(this)),this.addManagedListener(this.focusWrapper,"keydown",this.handleKeyDown.bind(this)),this.addManagedListener(this.focusWrapper,"contextmenu",this.onContextMenu.bind(this)),this.setOpenClosedIcons(),this.setupDragging(),this.onColumnStateChanged(),this.addVisibilityListenersToAllChildren(),this.refreshAriaExpanded(),this.refreshAriaLabel(),this.setupTooltip(),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.CssClassApplier.getToolPanelClassesFromColDef(this.columnGroup.getColGroupDef(),this.gridOptionsService,null,this.columnGroup).forEac
2h(function(t){return e.addOrRemoveCssClass(t,!0)})},t.prototype.getColumns=function(){return this.columnGroup.getLeafColumns()},t.prototype.setupTooltip=function(){var e=this,t=this.columnGroup.getColGroupDef();if(t){var r=function(){var r=t.headerTooltip;e.setTooltip(r)};r(),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_NEW_COLUMNS_LOADED,r)}},t.prototype.getTooltipParams=function(){var t=e.prototype.getTooltipParams.call(this);return t.location="columnToolPanelColumnGroup",t},t.prototype.handleKeyDown=function(e){switch(e.key){case ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.KeyCode.LEFT:e.preventDefault(),this.modelItem.setExpanded(!1);break;case ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.KeyCode.RIGHT:e.preventDefault(),this.modelItem.setExpanded(!0);break;case ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.KeyCode.SPACE:e.preventDefault(),this.isSelectable()&&this.onSelectAllChanged(!this.isSelected())}},t.prototype.onContextMenu=function(e){var t=this,r=this.columnGroup;if(!this.gridOptionsService.is("functionsReadOnly")){var o=this.createBean(new ToolPanelContextMenu(r,e,this.focusWrapper));this.addDestroyFunc(function(){o.isAlive()&&t.destroyBean(o)})}},t.prototype.addVisibilityListenersToAllChildren=function(){var e=this;this.columnGroup.getLeafColumns().forEach(function(t){e.addManagedListener(t,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Column.EVENT_VISIBLE_CHANGED,e.onColumnStateChanged.bind(e)),e.addManagedListener(t,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Column.EVENT_VALUE_CHANGED,e.onColumnStateChanged.bind(e)),e.addManagedListener(t,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Column.EVENT_PIVOT_CHANGED,e.onColumnStateChanged.bind(e)),e.addManagedListener(t,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Column.EVENT_ROW_GROUP_CHANGED,e.onColumnStateChanged.bind(e))})},t.prototype.setupDragging=function(){var e=this;if(this.allowDragging){var t=!this.gridOptionsService.is("suppressDragLeaveHidesColumns"),r={type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.DragSourceType.ToolPanel,eElement:this.eDragHandle,dragItemName:this.displayName,defaultIconName:t?ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.DragAndDropService.ICON_HIDE:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.DragAndDropService.ICON_NOT_ALLOWED,getDragItem:function(){return e.createDragItem()},onDragStarted:function(){var t={type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_COLUMN_PANEL_ITEM_DRAG_START,column:e.columnGroup};e.eventService.dispatchEvent(t)},onDragStopped:function(){var t={type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_COLUMN_PANEL_ITEM_DRAG_END};e.eventService.dispatchEvent(t)},onGridEnter:function(){t&&e.onChangeCommon(!0)},onGridExit:function(){t&&e.onChangeCommon(!1)}};this.dragAndDropService.addDragSource(r,!0),this.addDestroyFunc(function(){return e.dragAndDropService.removeDragSource(r)})}else ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setDisplayed(this.eDragHandle,!1)},t.prototype.createDragItem=function(){var e={};return this.columnGroup.getLeafColumns().forEach(function(t){e[t.getId()]=t.isVisible()}),{columns:this.columnGroup.getLeafColumns(),visibleState:e}},t.prototype.setupExpandContract=function(){this.eGroupClosedIcon.appendChild(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.createIcon("columnSelectClosed",this.gridOptionsService,null)),this.eGroupOpenedIcon.appendChild(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.createIcon("columnSelectOpen",this.gridOptionsService,null)),this.addManagedListener(this.eGroupClosedIcon,"click",this.onExpandOrContractClicked.bind(this)),this.addManagedListener(this.eGroupOpenedIcon,"click",this.onExpandOrContractClicked.bind(this));var e=new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.TouchListener(this.eColumnGroupIcons,!0);this.addManagedListener(e,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.TouchListener.EVENT_TAP,this.onExpandOrContractClicked.bind(this)),this.addDestroyFunc(e.destroy.bind(e))},t.prototype.onLabelClicked=function(){var e=!this.cbSelect.getValue();this.onChangeCommon(e)},t.prototype.onCheckboxChanged=function(e){this.onChangeCommon(e.selected)},t.prototype.getVisibleLeafColumns=function(){var e=[],t=function(r){r.forEach(function(r){r.isPassesFilter()&&(r.isGroup()?t(r.getChildren()):e.push(r.getColumn()))})};return t(this.modelItem.getChildren()),e},t.prototype.onChangeCommon=function(e){this.refreshAriaLabel(),this.processingColumnStateChange||this.modelItemUtils.selectAllChildren(this.modelItem.getChildren(),e,this.eventType)},t.prototype.refreshAriaLabel=function(){var e=this.localeService.getLocaleTextFunc(),t=e("ariaColumnGroup","Column Group"),r=this.cbSelect.getValue(),o=void 0===r?e("ariaIndeterminate","indeterminate"):r?e("ariaVisible","visible"):e("ariaHidden","hidden"),i=e("ariaToggleVisibility","Press SPACE to toggle visibility");ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setAriaLabel(this.focusWrapper,this.displayName+" "+t),this.cbSelect.setInputAriaLabel(i+" ("+o+")"),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setAriaDescribedBy(this.focusWrapper,this.cbSelect.getIn
2putElement().id)},t.prototype.onColumnStateChanged=function(){var e=this.workOutSelectedValue(),t=this.workOutReadOnlyValue();this.processingColumnStateChange=!0,this.cbSelect.setValue(e),this.cbSelect.setReadOnly(t),this.addOrRemoveCssClass("ag-column-select-column-group-readonly",t),this.processingColumnStateChange=!1},t.prototype.workOutSelectedValue=function(){var e=this,t=this.columnModel.isPivotMode(),r=this.getVisibleLeafColumns(),o=0,i=0;if(r.forEach(function(r){!t&&r.getColDef().lockVisible||(e.isColumnChecked(r,t)?o++:i++)}),!(o>0&&i>0))return o>0},t.prototype.workOutReadOnlyValue=function(){var e=this.columnModel.isPivotMode(),t=0;return this.columnGroup.getLeafColumns().forEach(function(r){e?r.isAnyFunctionAllowed()&&t++:r.getColDef().lockVisible||t++}),0===t},t.prototype.isColumnChecked=function(e,t){if(t){var r=e.isPivotActive(),o=e.isRowGroupActive(),i=e.isValueActive();return r||o||i}return e.isVisible()},t.prototype.onExpandOrContractClicked=function(){var e=this.modelItem.isExpanded();this.modelItem.setExpanded(!e)},t.prototype.onExpandChanged=function(){this.setOpenClosedIcons(),this.refreshAriaExpanded()},t.prototype.setOpenClosedIcons=function(){var e=this.modelItem.isExpanded();ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setDisplayed(this.eGroupClosedIcon,!e),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setDisplayed(this.eGroupOpenedIcon,e)},t.prototype.refreshAriaExpanded=function(){ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setAriaExpanded(this.focusWrapper,this.modelItem.isExpanded())},t.prototype.getDisplayName=function(){return this.displayName},t.prototype.onSelectAllChanged=function(e){var t=this.cbSelect.getValue();!this.cbSelect.isReadOnly()&&(e&&!t||!e&&t)&&this.cbSelect.toggle()},t.prototype.isSelected=function(){return this.cbSelect.getValue()},t.prototype.isSelectable=function(){return!this.cbSelect.isReadOnly()},t.prototype.setSelected=function(e){this.cbSelect.setValue(e,!0)},t.TEMPLATE='<div class="ag-column-select-column-group" aria-hidden="true">\n            <span class="ag-column-group-icons" ref="eColumnGroupIcons" >\n                <span class="ag-column-group-closed-icon" ref="eGroupClosedIcon"></span>\n                <span class="ag-column-group-opened-icon" ref="eGroupOpenedIcon"></span>\n            </span>\n            <ag-checkbox ref="cbSelect" class="ag-column-select-checkbox"></ag-checkbox>\n            <span class="ag-column-select-column-label" ref="eLabel"></span>\n        </div>',__decorate$2r([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],t.prototype,"columnModel",void 0),__decorate$2r([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("dragAndDropService")],t.prototype,"dragAndDropService",void 0),__decorate$2r([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("modelItemUtils")],t.prototype,"modelItemUtils",void 0),__decorate$2r([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("cbSelect")],t.prototype,"cbSelect",void 0),__decorate$2r([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eLabel")],t.prototype,"eLabel",void 0),__decorate$2r([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eGroupOpenedIcon")],t.prototype,"eGroupOpenedIcon",void 0),__decorate$2r([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eGroupClosedIcon")],t.prototype,"eGroupClosedIcon",void 0),__decorate$2r([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eColumnGroupIcons")],t.prototype,"eColumnGroupIcons",void 0),__decorate$2r([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"init",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),__extends$3e=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$2q=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},PRIMARY_COLS_LIST_ITEM_HOVERED="ag-list-item-hovered",PrimaryColsListPanelItemDragFeature=function(e){function t(t,r){var o=e.call(this)||this;return o.comp=t,o.virtualList=r,o.currentDragColumn=null,o.lastHoveredColumnItem=null,o}return __extends$3e(t,e),t.prototype.postConstruct=function(){this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_COLUMN_PANEL_ITEM_DRAG_START,this.columnPanelItemDragStart.bind(this)),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_COLUMN_PANEL_ITEM_DRAG_END,this.columnPanelItemDragEnd.bind(this)),this.createDropTarget(),this.createAutoScrollService()},t.prototype.columnPanelItemDragStart=function(e){var t=e.column;this.currentDragColumn=t,this.getCurrentColumns().find(function(e){var t=e.getColDef();return!!t.suppressMovable||!!t.lockPosition})&&(this.moveBlocked=!0)},t.prototype.columnPanelItemDragEnd=function(){var e=this;window.setTimeout(function(){e.currentDragColumn=null,e.moveBlocked=!1},10)},t.prototype.createDropTarget=function(){var e=this,t={isInterestedIn:function(e){return e===ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.DragSourceType.ToolPanel},getIconName:function(){return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.DragAndDropService[e.moveBlocked?"ICON_NOT_ALLOWED":"ICON_MOVE"]},getContainer:function(){return e.comp.getGui()},onDragging:function(t){return e.onDragging(t)},onDragStop:function(){return e.onDragStop()},onDragLeave:function(){return e.onDragLeave()}};this.dragAndDropService.addDropTarget(t)},t.prototype.createAutoScrollService=function(){var e=this.virtualList.getGui();this.autoScrollService=new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AutoScrollService({scrollC
2ontainer:e,scrollAxis:"y",getVerticalPosition:function(){return e.scrollTop},setVerticalPosition:function(t){return e.scrollTop=t}})},t.prototype.onDragging=function(e){if(this.currentDragColumn&&!this.moveBlocked){var t=this.getDragColumnItem(e),r=this.virtualList.getComponentAt(t.rowIndex);if(r){var o=r.getGui().parentElement;this.lastHoveredColumnItem&&this.lastHoveredColumnItem.rowIndex===t.rowIndex&&this.lastHoveredColumnItem.position===t.position||(this.autoScrollService.check(e.event),this.clearHoveredItems(),this.lastHoveredColumnItem=t,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.radioCssClass(o,""+PRIMARY_COLS_LIST_ITEM_HOVERED),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.radioCssClass(o,"ag-item-highlight-"+t.position))}}},t.prototype.getDragColumnItem=function(e){var t=this.virtualList.getGui(),r=parseFloat(window.getComputedStyle(t).paddingTop),o=this.virtualList.getRowHeight(),i=this.virtualList.getScrollTop(),n=Math.max(0,(e.y-r+i)/o),a=this.comp.getDisplayedColsList().length-1,s=0|Math.min(a,n);return{rowIndex:s,position:Math.round(n)>n||n>a?"bottom":"top",component:this.virtualList.getComponentAt(s)}},t.prototype.onDragStop=function(){if(!this.moveBlocked){var e=this.getTargetIndex(),t=this.getCurrentColumns();null!=e&&this.columnModel.moveColumns(t,e,"toolPanelUi"),this.clearHoveredItems(),this.autoScrollService.ensureCleared()}},t.prototype.getMoveDiff=function(e){var t=this.columnModel.getAllGridColumns(),r=this.getCurrentColumns(),o=r[0],i=r.length;return t.indexOf(o)<e?i:0},t.prototype.getCurrentColumns=function(){return this.currentDragColumn instanceof ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ProvidedColumnGroup?this.currentDragColumn.getLeafColumns():[this.currentDragColumn]},t.prototype.getTargetIndex=function(){if(!this.lastHoveredColumnItem)return null;var e,t=this.lastHoveredColumnItem.component,r="top"===this.lastHoveredColumnItem.position;t instanceof ToolPanelColumnGroupComp?(e=t.getColumns()[0],r=!0):e=t.getColumn();var o=this.columnModel.getAllGridColumns().indexOf(e),i=r?o:o+1;return i-this.getMoveDiff(i)},t.prototype.onDragLeave=function(){this.clearHoveredItems(),this.autoScrollService.ensureCleared()},t.prototype.clearHoveredItems=function(){this.virtualList.getGui().querySelectorAll("."+PRIMARY_COLS_LIST_ITEM_HOVERED).forEach(function(e){[PRIMARY_COLS_LIST_ITEM_HOVERED,"ag-item-highlight-top","ag-item-highlight-bottom"].forEach(function(t){e.classList.remove(t)})}),this.lastHoveredColumnItem=null},__decorate$2q([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],t.prototype,"columnModel",void 0),__decorate$2q([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("dragAndDropService")],t.prototype,"dragAndDropService",void 0),__decorate$2q([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"postConstruct",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.BeanStub),__extends$3d=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$2p=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},ToolPanelColumnComp=function(e){function t(t,r,o,i,n){var a=e.call(this)||this;return a.column=t,a.columnDept=r,a.allowDragging=o,a.groupsExist=i,a.focusWrapper=n,a.processingColumnStateChange=!1,a}return __extends$3d(t,e),t.prototype.init=function(){var e=this;this.setTemplate(t.TEMPLATE),this.eDragHandle=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.createIconNoSpan("columnDrag",this.gridOptionsService),this.eDragHandle.classList.add("ag-drag-handle","ag-column-select-column-drag-handle");
2var r=this.cbSelect.getGui(),o=this.cbSelect.getInputElement();r.insertAdjacentElement("afterend",this.eDragHandle),o.setAttribute("tabindex","-1"),this.displayName=this.columnModel.getDisplayNameForColumn(this.column,"columnToolPanel");var i=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.escapeString(this.displayName);this.eLabel.innerHTML=i;var n=this.columnDept;this.groupsExist&&this.addCssClass("ag-column-select-add-group-indent"),this.addCssClass("ag-column-select-indent-"+n),this.setupDragging(),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.onColumnStateChanged.bind(this)),this.addManagedListener(this.column,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Column.EVENT_VALUE_CHANGED,this.onColumnStateChanged.bind(this)),this.addManagedListener(this.column,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Column.EVENT_PIVOT_CHANGED,this.onColumnStateChanged.bind(this)),this.addManagedListener(this.column,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Column.EVENT_ROW_GROUP_CHANGED,this.onColumnStateChanged.bind(this)),this.addManagedListener(this.column,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Column.EVENT_VISIBLE_CHANGED,this.onColumnStateChanged.bind(this)),this.addManagedListener(this.focusWrapper,"keydown",this.handleKeyDown.bind(this)),this.addManagedListener(this.focusWrapper,"contextmenu",this.onContextMenu.bind(this)),this.addManagedPropertyListener("functionsReadOnly",this.onColumnStateChanged.bind(this)),this.addManagedListener(this.cbSelect,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgCheckbox.EVENT_CHANGED,this.onCheckboxChanged.bind(this)),this.addManagedListener(this.eLabel,"click",this.onLabelClicked.bind(this)),this.onColumnStateChanged(),this.refreshAriaLabel(),this.setupTooltip(),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.CssClassApplier.getToolPanelClassesFromColDef(this.column.getColDef(),this.gridOptionsService,this.column,null).forEach(function(t){return e.addOrRemoveCssClass(t,!0)})},t.prototype.getColumn=function(){return this.column},t.prototype.setupTooltip=function(){var e=this,t=function(){var t=e.column.getColDef().headerTooltip;e.setTooltip(t)};t(),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_NEW_COLUMNS_LOADED,t)},t.prototype.getTooltipParams=function(){var t=e.prototype.getTooltipParams.call(this);return t.location="columnToolPanelColumn",t.colDef=this.column.getColDef(),t},t.prototype.onContextMenu=function(e){var t=this,r=this.column;if(!this.gridOptionsService.is("functionsReadOnly")){var o=this.createBean(new ToolPanelContextMenu(r,e,this.focusWrapper));this.addDestroyFunc(function(){o.isAlive()&&t.destroyBean(o)})}},t.prototype.handleKeyDown=function(e){e.key===ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.KeyCode.SPACE&&(e.preventDefault(),this.isSelectable()&&this.onSelectAllChanged(!this.isSelected()))},t.prototype.onLabelClicked=function(){if(!this.gridOptionsService.is("functionsReadOnly")){var e=!this.cbSelect.getValue();this.onChangeCommon(e)}},t.prototype.onCheckboxChanged=function(e){this.onChangeCommon(e.selected)},t.prototype.onChangeCommon=function(e){this.cbSelect.isReadOnly()||(this.refreshAriaLabel(),this.processingColumnStateChange||this.modelItemUtils.setColumn(this.column,e,"toolPanelUi"))},t.prototype.refreshAriaLabel=function(){var e=this.localeService.getLocaleTextFunc(),t=e("ariaColumn","Column"),r=this.cbSelect.getValue()?e("ariaVisible","visible"):e("ariaHidden","hidden"),o=e("ariaToggleVisibility","Press SPACE to toggle visibility");ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setAriaLabel(this.focusWrapper,this.displayName+" "+t),this.cbSelect.setInputAriaLabel(o+" ("+r+")"),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setAriaDescribedBy(this.focusWrapper,this.cbSelect.getInputElement().id)},t.prototype.setupDragging=function(){var e=this;if(this.allowDragging){var t=!this.gridOptionsService.is("suppressDragLeaveHidesColumns"),r={type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.DragSourceType.ToolPanel,eElement:this.eDragHandle,dragItemName:this.displayName,defaultIconName:t?ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.DragAndDropService.ICON_HIDE:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.DragAndDropService.ICON_NOT_ALLOWED,getDragItem:function(){return e.createDragItem()},onDragStarted:function(){var t={type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_COLUMN_PANEL_ITEM_DRAG_START,column:e.column};e.eventService.dispatchEvent(t)},onDragStopped:function(){var t={type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_COLUMN_PANEL_ITEM_DRAG_END};e.eventService.dispatchEvent(t)},onGridEnter:function(){t&&e.onChangeCommon(!0)}
2,onGridExit:function(){t&&e.onChangeCommon(!1)}};this.dragAndDropService.addDragSource(r,!0),this.addDestroyFunc(function(){return e.dragAndDropService.removeDragSource(r)})}else ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setDisplayed(this.eDragHandle,!1)},t.prototype.createDragItem=function(){var e={};return e[this.column.getId()]=this.column.isVisible(),{columns:[this.column],visibleState:e}},t.prototype.onColumnStateChanged=function(){this.processingColumnStateChange=!0;var e=this.columnModel.isPivotMode();if(e){var t=this.column.isAnyFunctionActive();this.cbSelect.setValue(t)}else this.cbSelect.setValue(this.column.isVisible());var r=!0,o=!0;if(e){var i=this.gridOptionsService.is("functionsReadOnly"),n=!this.column.isAnyFunctionAllowed();o=r=!i&&!n}else{var a=this.column.getColDef(),s=a.enableRowGroup,l=a.enableValue,c=a.lockPosition,u=a.suppressMovable;r=!a.lockVisible,o=!!s||!!l||!(c||u)}this.cbSelect.setReadOnly(!r),this.eDragHandle.classList.toggle("ag-column-select-column-readonly",!o),this.addOrRemoveCssClass("ag-column-select-column-readonly",!o&&!r);var d=e&&this.gridOptionsService.is("functionsPassive");this.cbSelect.setPassive(d),this.processingColumnStateChange=!1},t.prototype.getDisplayName=function(){return this.displayName},t.prototype.onSelectAllChanged=function(e){e!==this.cbSelect.getValue()&&(this.cbSelect.isReadOnly()||this.cbSelect.toggle())},t.prototype.isSelected=function(){return this.cbSelect.getValue()},t.prototype.isSelectable=function(){return!this.cbSelect.isReadOnly()},t.prototype.isExpandable=function(){return!1},t.prototype.setExpanded=function(e){console.warn("AG Grid: can not expand a column item that does not represent a column group header")},t.TEMPLATE='<div class="ag-column-select-column" aria-hidden="true">\n            <ag-checkbox ref="cbSelect" class="ag-column-select-checkbox"></ag-checkbox>\n            <span class="ag-column-select-column-label" ref="eLabel"></span>\n        </div>',__decorate$2p([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],t.prototype,"columnModel",void 0),__decorate$2p([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("dragAndDropService")],t.prototype,"dragAndDropService",void 0),__decorate$2p([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("modelItemUtils")],t.prototype,"modelItemUtils",void 0),__decorate$2p([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eLabel")],t.prototype,"eLabel",void 0),__decorate$2p([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("cbSelect")],t.prototype,"cbSelect",void 0),__decorate$2p([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"init",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),__extends$3c=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$2o=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},UIColumnModel=function(){function e(e){this.items=e}return e.prototype.getRowCount=function(){return this.items.length},e.prototype.getRow=function(e){return this.items[e]},e}(),PRIMARY_COLS_LIST_PANEL_CLASS="ag-column-select-list",PrimaryColsListPanel=function(e){function t(){var r=e.call(this,t.TEMPLATE)||this;return r.destroyColumnItemFuncs=[],r}return __extends$3c(t,e),t.prototype.destroyColumnTree=function(){this.allColsTree=[],this.destroyColumnItemFuncs.forEach(function(e){return e()}),this.destroyColumnItemFuncs=[]},t.prototype.init=function(e,t,r){var o=this;this.params=e,this.allowDragging=t,this.eventType=r,this.params.suppressSyncLayoutWithGri
2d||this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_COLUMN_MOVED,this.onColumnsChanged.bind(this)),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_NEW_COLUMNS_LOADED,this.onColumnsChanged.bind(this)),[ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_COLUMN_PIVOT_CHANGED,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_COLUMN_ROW_GROUP_CHANGED,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_COLUMN_VALUE_CHANGED,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_COLUMN_VISIBLE,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_NEW_COLUMNS_LOADED].forEach(function(e){o.addManagedListener(o.eventService,e,o.fireSelectionChangedEvent.bind(o))}),this.expandGroupsByDefault=!this.params.contractColumnSelection;var i=this.localeService.getLocaleTextFunc()("ariaColumnList","Column List");this.virtualList=this.createManagedBean(new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.VirtualList("column-select","tree",i)),this.appendChild(this.virtualList.getGui()),this.virtualList.setComponentCreator(function(e,t){return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setAriaLevel(t,e.getDept()+1),o.createComponentFromItem(e,t)}),this.columnModel.isReady()&&this.onColumnsChanged(),e.suppressColumnMove||this.gridOptionsService.is("suppressMovableColumns")||this.createManagedBean(new PrimaryColsListPanelItemDragFeature(this,this.virtualList))},t.prototype.createComponentFromItem=function(e,t){if(e.isGroup()){var r=new ToolPanelColumnGroupComp(e,this.allowDragging,this.eventType,t);return this.getContext().createBean(r),r}var o=new ToolPanelColumnComp(e.getColumn(),e.getDept(),this.allowDragging,this.groupsExist,t);return this.getContext().createBean(o),o},t.prototype.onColumnsChanged=function(){var e=this.getExpandedStates(),t=this.columnModel.isPivotMode();this.params.suppressSyncLayoutWithGrid||t?this.buildTreeFromProvidedColumnDefs():this.buildTreeFromWhatGridIsDisplaying(),this.setExpandedStates(e),this.markFilteredColumns(),this.flattenAndFilterModel()},t.prototype.getDisplayedColsList=function(){return this.displayedColsList},t.prototype.getExpandedStates=function(){if(!this.allColsTree)return{};var e={};return this.forEachItem(function(t){if(t.isGroup()){var r=t.getColumnGroup();r&&(e[r.getId()]=t.isExpanded())}}),e},t.prototype.setExpandedStates=function(e){this.allColsTree&&this.forEachItem(function(t){if(t.isGroup()){var r=t.getColumnGroup();if(r){var o=e[r.getId()];null!=o&&t.setExpanded(o)}}})},t.prototype.buildTreeFromWhatGridIsDisplaying=function(){this.colDefService.syncLayoutWithGrid(this.setColumnLayout.bind(this))},t.prototype.setColumnLayout=function(e){var t=this.colDefService.createColumnTree(e);this.buildListModel(t),this.groupsExist=e.some(function(e){return e&&void 0!==e.children}),this.markFilteredColumns(),this.flattenAndFilterModel()},t.prototype.buildTreeFromProvidedColumnDefs=function(){this.buildListModel(this.columnModel.getPrimaryColumnTree()),this.groupsExist=this.columnModel.isPrimaryColumnGroupsPresent()},t.prototype.buildListModel=function(e){var t=this,r=this.onColumnExpanded.bind(this),o=function(e,t,r){e.forEach(function(e){e instanceof ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ProvidedColumnGroup?i(e,t,r):n(e,t,r)})},i=function(e,i,n){var a=e.getColGroupDef();if(!a||!a.suppressColumnsToolPanel)if(e.isPadding())o(e.getChildren(),i,n);else{var s=t.columnModel.getDisplayNameForProvidedColumnGroup(null,e,t.eventType),l=new ColumnModelItem(s,e,i,!0,t.expandGroupsByDefault);n.push(l),function(e){e.addEventListener(ColumnModelItem.EVENT_EXPANDED_CHANGED,r);var o=e.removeEventListener.bind(e,ColumnModelItem.EVENT_EXPANDED_CHANGED,r);t.destroyColumnItemFuncs.push(o)}(l),o(e.getChildren(),i+1,l.getChildren())}},n=function(e,r,o){if(!e.getColDef()||!e.getColDef().suppressColumnsToolPanel){var i=t.columnModel.getDisplayNameForColumn(e,"columnToolPanel");o.push(new ColumnModelItem(i,e,r))}};this.destroyColumnTree(),o(e,0,this.allColsTree)},t.prototype.onColumnExpanded=function(){this.flattenAndFilterModel()},t.prototype.flattenAndFilterModel=function(){var e=this;this.displayedColsList=[];var t=function(r){r.isPassesFilter()&&(e.displayedColsList.push(r),r.isGroup()&&r.isExpanded()&&r.getChildren().forEac
2h(t))};this.allColsTree.forEach(t),this.virtualList.setModel(new UIColumnModel(this.displayedColsList));var r=this.virtualList.getLastFocusedRow();this.virtualList.refresh(),null!=r&&this.focusRowIfAlive(r),this.notifyListeners()},t.prototype.focusRowIfAlive=function(e){var t=this;window.setTimeout(function(){t.isAlive()&&t.virtualList.focusRow(e)},0)},t.prototype.forEachItem=function(e){var t=function(r){r.forEach(function(r){e(r),r.isGroup()&&t(r.getChildren())})};t(this.allColsTree)},t.prototype.doSetExpandedAll=function(e){this.forEachItem(function(t){t.isGroup()&&t.setExpanded(e)})},t.prototype.setGroupsExpanded=function(e,t){if(t){var r=[];this.forEachItem(function(o){if(o.isGroup()){var i=o.getColumnGroup().getId();t.indexOf(i)>=0&&(o.setExpanded(e),r.push(i))}});var o=t.filter(function(e){return!ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.includes(r,e)});o.length>0&&console.warn("AG Grid: unable to find group(s) for supplied groupIds:",o)}else this.doSetExpandedAll(e)},t.prototype.getExpandState=function(){var e=0,t=0;return this.forEachItem(function(r){r.isGroup()&&(r.isExpanded()?e++:t++)}),e>0&&t>0?ExpandState.INDETERMINATE:t>0?ExpandState.COLLAPSED:ExpandState.EXPANDED},t.prototype.doSetSelectedAll=function(e){this.modelItemUtils.selectAllChildren(this.allColsTree,e,this.eventType)},t.prototype.getSelectionState=function(){var e=0,t=0,r=this.columnModel.isPivotMode();if(this.forEachItem(function(o){if(!o.isGroup()&&o.isPassesFilter()){var i,n=o.getColumn(),a=n.getColDef();
2if(r){if(!n.isAllowPivot()&&!n.isAllowRowGroup()&&!n.isAllowValue())return;i=n.isValueActive()||n.isPivotActive()||n.isRowGroupActive()}else{if(a.lockVisible)return;i=n.isVisible()}i?e++:t++}}),!(e>0&&t>0))return!(0===e||t>0)},t.prototype.setFilterText=function(e){this.filterText=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.exists(e)?e.toLowerCase():null,this.markFilteredColumns(),this.flattenAndFilterModel()},t.prototype.markFilteredColumns=function(){var e=this,t=function(t){if(!ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.exists(e.filterText))return!0;var r=t.getDisplayName();return null==r||-1!==r.toLowerCase().indexOf(e.filterText)},r=function(e,o){var i=!1;if(e.isGroup()){var n=t(e);e.getChildren().forEach(function(e){var t=r(e,n||o);t&&(i=t)})}var a=!(!o&&!i)||t(e);return e.setPassesFilter(a),a};this.allColsTree.forEach(function(e){return r(e,!1)})},t.prototype.notifyListeners=function(){this.fireGroupExpandedEvent(),this.fireSelectionChangedEvent()},t.prototype.fireGroupExpandedEvent=function(){var e=this.getExpandState();this.dispatchEvent({type:"groupExpanded",state:e})},t.prototype.fireSelectionChangedEvent=function(){var e=this.getSelectionState();this.dispatchEvent({type:"selectionChanged",state:e})},t.TEMPLATE='<div class="'+PRIMARY_COLS_LIST_PANEL_CLASS+'" role="presentation"></div>',__decorate$2o([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],t.prototype,"columnModel",void 0),__decorate$2o([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("toolPanelColDefService")],t.prototype,"colDefService",void 0),__decorate$2o([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("modelItemUtils")],t.prototype,"modelItemUtils",void 0),__decorate$2o([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PreDestroy],t.prototype,"destroyColumnTree",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),__extends$3b=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$2n=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},PivotModePanel=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$3b(t,e),t.prototype.createTemplate=function(){return'<div class="ag-pivot-mode-panel">\n                <ag-toggle-button ref="cbPivotMode" class="ag-pivot-mode-select"></ag-toggle-button>\n            </div>'},t.prototype.init=function(){this.setTemplate(this.createTemplate()),this.cbPivotMode.setValue(this.columnModel.isPivotMode());var e=this.localeService.getLocaleTextFunc();this.cbPivotMode.setLabel(e("pivotMode","Pivot Mode")),this.addManagedListener(this.cbPivotMode,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgCheckbox.EVENT_CHANGED,this.onBtPivotMode.bind(this)),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_NEW_COLUMNS_LOADED,this.onPivotModeChanged.bind(this)),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.onPivotModeChanged.bind(this))},t.prototype.onBtPivotMode=function(){var e=!!this.cbPivotMode.getValue();if(e!==this.columnModel.isPivotMode()){this.columnModel.setPivotMode(e,"toolPanelUi");var t=this.gridOptionsService.api;t&&t.refreshHeader()}},t.prototype.onPivotModeChanged=function(){var e=this.columnModel.isPivotMode();this.cbPivotMode.setValue(e)},__decorate$2n([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],t.prototype,"columnModel",void 0),__decorate$2n([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("cbPivotMode")],t.prototype,"cbPivotMode",void 0),__decorate$2n([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PreConstruct],t.prototype,"init",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),__extends$3a=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$2m=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},AggregationStage=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$3a(t,e),t.prototype.execute=function(e){var t=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.missingOrEmpty(this.columnModel.getValueColumns()),r
2=!this.getGroupRowAggFunc(),o=e.changedPath&&e.changedPath.isActive();if(!(t&&r&&o)){var i=this.createAggDetails(e);this.recursivelyCreateAggData(i)}},t.prototype.getGroupRowAggFunc=function(){var e=this.gridOptionsService.getCallback("getGroupRowAgg");if(e)return e;var t=this.gridOptionsService.get("groupRowAggNodes");return t?function(e){return t(e.nodes)}:void 0},t.prototype.createAggDetails=function(e){var t=this.columnModel.isPivotActive(),r=this.columnModel.getValueColumns(),o=t?this.columnModel.getPivotColumns():[];return{changedPath:e.changedPath,valueColumns:r,pivotColumns:o}},t.prototype.isSuppressAggFilteredOnly=function(){return void 0!==this.gridOptionsService.getGroupAggFiltering()||this.gridOptionsService.is("suppressAggFilteredOnly")},t.prototype.recursivelyCreateAggData=function(e){var t=this;this.filteredOnly=!this.isSuppressAggFilteredOnly(),e.changedPath.forEachChangedNodeDepthFirst(function(r){if(r.hasChildren()){if(-1===r.level){var o=!t.columnModel.isPivotMode();if(t.gridOptionsService.is("suppressAggAtRootLevel")&&o)return}t.aggregateRowNode(r,e)}else r.aggData&&r.setAggData(null)},!0)},t.prototype.aggregateRowNode=function(e,t){var r,o=0===t.valueColumns.length,i=0===t.pivotColumns.length,n=this.getGroupRowAggFunc();r=n?n({nodes:e.childrenAfterFilter}):o?null:i?this.aggregateRowNodeUsingValuesOnly(e,t):this.aggregateRowNodeUsingValuesAndPivot(e),e.setAggData(r),e.sibling&&e.sibling.setAggData(r)},t.prototype.aggregateRowNodeUsingValuesAndPivot=function(e){var t=this,r={},o=this.pivotStage.getPivotColumnDefs();return o.filter(function(e){return!ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.exists(e.pivotTotalColumnIds)}).forEach(function(o){var i,n=o.pivotKeys||[],a=o.pivotValueColumn,s=o.colId;i=e.leafGroup?t.getValuesFromMappedSet(e.childrenMapped,n,a):t.getValuesPivotNonLeaf(e,s),r[s]=t.aggregateValues(i,a.getAggFunc(),a,e)}),o.filter(function(e){return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.exists(e.pivotTotalColumnIds)}).forEach(function(o){var i=[],n=o.pivotValueColumn,a=o.pivotTotalColumnIds,s=o.colId;a&&a.length&&(a.forEach(function(e){i.push(r[e])}),r[s]=t.aggregateValues(i,n.getAggFunc(),n,e))}),r},t.prototype.aggregateRowNodeUsingValuesOnly=function(e,t){var r=this,o={},i=t.changedPath.isActive()?t.changedPath.getValueColumnsForNode(e,t.valueColumns):t.valueColumns,n=t.changedPath.isActive()?t.changedPath.getNotValueColumnsForNode(e,t.valueColumns):null,a=this.getValuesNormal(e,i),s=e.aggData;return i.forEach(function(t,i){o[t.getId()]=r.aggregateValues(a[i],t.getAggFunc(),t,e)}),n&&s&&n.forEach(function(e){o[e.getId()]=s[e.getId()]}),o},t.prototype.getValuesPivotNonLeaf=function(e,t){var r=[];return e.childrenAfterFilter.forEach(function(e){var o=e.aggData[t];r.push(o)}),r},t.prototype.getValuesFromMappedSet=function(e,t,r){var o=this,i=e;if(t.forEach(function(e){return i=i?i[e]:null}),!i)return[];var n=[];return i.forEach(function(e){var t=o.valueService.getValue(r,e);n.push(t)}),n},t.prototype.getValuesNormal=function(e,t){var r=[];t.forEach(function(){return r.push([])});for(var o=t.length,i=this.filteredOnly?e.childrenAfterFilter:e.childrenAfterGroup,n=i.length,a=0;a<n;a++)for(var s=i[a],l=0;l<o;l++){var c=t[l],u=this.valueService.getValue(c,s);r[l].push(u)}return r},t.prototype.aggregateValues=function(e,t,r,o){var i="string"==typeof t?this.aggFuncService.getAggFunc(t):t;return"function"!=typeof i?(console.error("AG Grid: unrecognised aggregation function "+t),null):i({values:e,column:r,colDef:r?r.getColDef():void 0,rowNode:o,data:o?o.data:void 0,api:this.gridApi,columnApi:this.columnApi,context:this.gridOptionsService.context})},__decorate$2m([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],t.prototype,"columnModel",void 0),__decorate$2m([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("valueService")],t.prototype,"valueService",void 0),__decorate$2m([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("pivotStage")],t.prototype,"pivotStage",void 0),__decorate$2m([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("aggFuncService")],t.prototype,"aggFuncService",void 0),__decorate$2m([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("gridApi")],t.prototype,"gridApi",void 0),__decorate$2m([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnApi")],t.prototype,"columnApi",void 0),__decorate$2m([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Bean)("aggregationStage")],t)}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.BeanStub),BatchRemover=function(){function e(){this.allSets={},this.allParents=[]}return e.prototype.removeFromChildrenAfterGroup=function(e,t){this.get
2Set(e).removeFromChildrenAfterGroup[t.id]=!0},e.prototype.isRemoveFromAllLeafChildren=function(e,t){return!!this.getSet(e).removeFromAllLeafChildren[t.id]},e.prototype.preventRemoveFromAllLeafChildren=function(e,t){delete this.getSet(e).removeFromAllLeafChildren[t.id]},e.prototype.removeFromAllLeafChildren=function(e,t){this.getSet(e).removeFromAllLeafChildren[t.id]=!0},e.prototype.getSet=function(e){return this.allSets[e.id]||(this.allSets[e.id]={removeFromAllLeafChildren:{},removeFromChildrenAfterGroup:{}},this.allParents.push(e)),this.allSets[e.id]},e.prototype.getAllParents=function(){return this.allParents},e.prototype.flush=function(){var e=this;this.allParents.forEach(function(t){var r=e.allSets[t.id];t.childrenAfterGroup=t.childrenAfterGroup.filter(function(e){return!r.removeFromChildrenAfterGroup[e.id]}),t.allLeafChildren=t.allLeafChildren.filter(function(e){return!r.removeFromAllLeafChildren[e.id]}),t.updateHasChildren(),t.sibling&&(t.sibling.childrenAfterGroup=t.childrenAfterGroup,t.sibling.allLeafChildren=t.allLeafChildren)}),this.allSets={},this.allParents.length=0},e}(),__extends$39=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$2l=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},__read$17=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},__spread$H=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read$17(arguments[t]));return e},GroupStage=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.groupIdSequence=new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.NumberSequence,t}return __extends$39(t,e),t.prototype.postConstruct=function(){this.usingTreeData=this.gridOptionsService.isTreeData(),this.usingTreeData&&(this.getDataPath=this.gridOptionsService.get("getDataPath"))},t.prototype.execute=function(e){var t=this.createGroupingDetails(e);if(t.transactions)this.handleTransaction(t);else{var r=!0===e.afterColumnsChanged;this.shotgunResetEverything(t,r)}this.positionLeafsAndGroups(e.changedPath),this.orderGroups(t.rootNode),this.selectableService.updateSelectableAfterGrouping(t.rootNode)},t.prototype.positionLeafsAndGroups=function(e){this.usingTreeData||e.forEachChangedNodeDepthFirst(function(e){if(e.childrenAfterGroup){var t,r=[],o=[];e.childrenAfterGroup.forEach(function(e){var i;(null===(i=e.childrenAfterGroup)||void 0===i?void 0:i.length)?""!==e.key||t?o.push(e):t=e:r.push(e)}),t&&o.push(t),e.childrenAfterGroup=__spread$H(r,o)}},!1)},t.prototype.createGroupingDetails=function(e){var t=e.rowNode,r=e.changedPath,o=e.rowNodeTransactions,i=e.rowNodeOrder,n=this.usingTreeData?null:this.columnModel.getRowGroupColumns();return{includeParents:!this.gridOptionsService.is("suppressParentsInRowNodes"),expandByDefault:this.gridOptionsService.getNum("groupDefaultExpanded"),groupedCols:n,rootNode:t,pivotMode:this.columnModel.isPivotMode(),groupedColCount:this.usingTreeData||!n?0:n.length,rowNodeOrder:i,transactions:o,changedPath:r}},t.prototype.handleTransaction=function(e){var t=this;e.transactions.forEach(function(r){var o=t.usingTreeData?void 0:new BatchRemover;if(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.existsAndNotEmpty(r.remove)&&t.removeNodes(r.remove,e,o),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.existsAndNotEmpty(r.update)&&t.moveNodesInWrongPath(r.update,e,o),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.existsAndNotEmpty(r.add)&&t.insertN
2odes(r.add,e,!1),o){var i=o.getAllParents().slice();o.flush(),t.removeEmptyGroups(i,e)}}),e.rowNodeOrder&&this.sortChildren(e)},t.prototype.sortChildren=function(e){e.changedPath.forEachChangedNodeDepthFirst(function(t){t.childrenAfterGroup&&ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.sortRowNodesByOrder(t.childrenAfterGroup,e.rowNodeOrder)&&e.changedPath.addParentNode(t)},!1,!0)},t.prototype.orderGroups=function(e){if(!this.usingTreeData){var t=this.getInitialGroupOrderComparator();ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.exists(t)&&function e(r){ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.exists(r.childrenAfterGroup)&&!r.leafGroup&&(r.childrenAfterGroup.sort(function(e,r){return t({nodeA:e,nodeB:r})}),r.childrenAfterGroup.forEach(function(t){return e(t)}))}(e)}},t.prototype.getInitialGroupOrderComparator=function(){var e=this.gridOptionsService.getCallback("initialGroupOrderComparator");if(e)return e;var t=this.gridOptionsService.get("defaultGroupOrderComparator");return t?function(e){return t(e.nodeA,e.nodeB)}:void 0},t.prototype.getExistingPathForNode=function(e,t){for(var r=[],o=this.usingTreeData?e:e.parent;o&&o!==t.rootNode;)r.push({key:o.key,rowGroupColumn:o.rowGroupColumn,field:o.field}),o=o.parent;return r.reverse(),r},t.prototype.moveNodesInWrongPath=function(e,t,r){var o=this;e.forEach(function(e){t.changedPath.isActive()&&t.changedPath.addParentNode(e.parent);var i=function(e){return e.key},n=o.getExistingPathForNode(e,t).map(i),a=o.getGroupInfo(e,t).map(i);ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.areEqual(n,a)||o.moveNode(e,t,r)})},t.prototype.moveNode=function(e,t,r){if(this.removeNodesInStages([e],t,r),this.insertOneNode(e,t,!0,r),e.setData(e.data),t.changedPath.isActive()){var o=e.parent;t.changedPath.addParentNode(o)}},t.prototype.removeNodes=function(e,t,r){this.removeNodesInStages(e,t,r),t.changedPath.isActive()&&e.forEach(function(e){return t.changedPath.addParentNode(e.parent)})},t.prototype.removeNodesInStages=function(e,t,r){if(this.removeNodesFromParents(e,t,r),this.usingTreeData){this.postRemoveCreateFillerNodes(e,t);var o=e.map(function(e){return e.parent});this.removeEmptyGroups(o,t)}},t.prototype.forEachParentGroup=function(e,t,r){for(var o=t;o&&o!==e.rootNode;)r(o),o=o.parent},t.prototype.removeNodesFromParents=function(e,t,r){var o=this,i=null==r,n=r||new BatchRemover;e.forEach(function(e){o.removeFromParent(e,n),o.forEachParentGroup(t,e.parent,function(t){n.removeFromAllLeafChildren(t,e)})}),i&&n.flush()},t.prototype.postRemoveCreateFillerNodes=function(e,t){var r=this;e.forEach(function(e){if(e.hasChildren()){var o=r.getExistingPathForNode(e,t),i=r.findParentForNode(e,o,t);i.expanded=e.expanded,i.allLeafChildren=e.allLeafChildren,i.childrenAfterGroup=e.childrenAfterGroup,i.childrenMapped=e.childrenMapped,i.updateHasChildren(),i.childrenAfterGroup.forEach(function(e){return e.parent=i})}})},t.prototype.removeEmptyGroups=function(e,t){for(var r=this,o=!0,i=function(){o=!1;var i=new BatchRemover;e.forEach(function(e){r.forEachParentGroup(t,e,function(e){(function(e){var t=r.getChildrenMappedKey(e.key,e.rowGroupColumn),o=e.parent;return!!(o&&o.childrenMapped&&o.childrenMapped[t]&&e.isEmptyRowGroupNode())})(e)&&(o=!0,r.removeFromParent(e,i),e.setSelectedParams({newValue:!1,source:"rowGroupChanged"}))})}),i.flush()};o;)i()},t.prototype.removeFromParent=function(e,t){e.parent&&(t?t.removeFromChildrenAfterGroup(e.parent,e):(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.removeFromArray(e.parent.childrenAfterGroup,e),e.parent.updateHasChildren()));var r=this.getChildrenMappedKey(e.key,e.rowGroupColumn);e.parent&&e.parent.childrenMapped&&(e.parent.childrenMapped[r]=void 0),e.setRowTop(null),e.setRowIndex(null)},t.prototype.addToParent=function(e,t){var r=this.getChildrenMappedKey(e.key,e.rowGroupColumn);t&&(null!=t.childrenMapped&&(t.childrenMapped[r]=e),t.childrenAfterGroup.push(e),t.updateHasChildren())},t.prototype.areGroupColsEqual=function(e,t){return null!=e&&null!=t&&e.pivotMode===t.pivotMode&&ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.areEqual(e.groupedCols,t.groupedCols)},t.prototype.checkAllGroupDataAfterColsChanged=function(e){var t=this,r=function(e){e&&e.forEach(function(e){if(t.usingTreeData||e.group){var o={field:e.field,key:e.key,rowGroupColumn:e.rowGroupColumn};t.setGroupData(e,o),r(e.childrenAfterGroup)}})};r(e.rootNode.childrenAfterGroup)},t.prototype.shotgunResetEverything=function(e,t){if(!this.noChangeInGroupingColumns(e,t)){this.selectionService.filterFromSelection(function(e){return e&&!e.group});var r=e.rootNode,o=e.groupedCols;r.leafGroup=!this.usingTreeData&&0===o.length,r.childrenAfterGroup=[],r.childrenMapped={},r.updateHasChildren();var i=r.sibling;i&&(i.childrenAfterGroup=r.childrenAfterGroup,i.childrenMapped=r.childrenMapped),this.insertNodes(r.allLeafChildren,e,!1)}},t.prototype.noChangeInGroupingColumns=function(e,t){var r=!1,o=this.columnModel.getGroupDisplayColumns(),i=o?o.map(function(e){return e.getId()}).join("-"):"";return t&&(r=this.usingTreeData||this.areGroupColsEqual(e,this.oldGroupingDetails),this.oldGroupDisplayColIds!==i&&this.checkAllGroupDataAfterColsChanged(e)),this.oldGroupingDetails=e,this.oldGroupDisplayColIds=i,r}
2,t.prototype.insertNodes=function(e,t,r){var o=this;e.forEach(function(e){o.insertOneNode(e,t,r),t.changedPath.isActive()&&t.changedPath.addParentNode(e.parent)})},t.prototype.insertOneNode=function(e,t,r,o){var i=this.getGroupInfo(e,t),n=this.findParentForNode(e,i,t,o);n.group||console.warn("AG Grid: duplicate group keys for row data, keys should be unique",[n.data,e.data]),this.usingTreeData?this.swapGroupWithUserNode(n,e,r):(e.parent=n,e.level=i.length,n.childrenAfterGroup.push(e),n.updateHasChildren())},t.prototype.findParentForNode=function(e,t,r,o){var i=this,n=r.rootNode;return t.forEach(function(t,a){n=i.getOrCreateNextNode(n,t,a,r),(null==o?void 0:o.isRemoveFromAllLeafChildren(n,e))?null==o||o.preventRemoveFromAllLeafChildren(n,e):n.allLeafChildren.push(e)}),n},t.prototype.swapGroupWithUserNode=function(e,t,r){t.parent=e.parent,t.key=e.key,t.field=e.field,t.groupData=e.groupData,t.level=e.level,r||(t.expanded=e.expanded),t.leafGroup=e.leafGroup,t.rowGroupIndex=e.rowGroupIndex,t.allLeafChildren=e.allLeafChildren,t.childrenAfterGroup=e.childrenAfterGroup,t.childrenMapped=e.childrenMapped,t.sibling=e.sibling,t.updateHasChildren(),this.removeFromParent(e),t.childrenAfterGroup.forEach(function(e){return e.parent=t}),this.addToParent(t,e.parent)},t.prototype.getOrCreateNextNode=function(e,t,r,o){var i=this.getChildrenMappedKey(t.key,t.rowGroupColumn),n=e.childrenMapped?e.childrenMapped[i]:void 0;return n||(n=this.createGroup(t,e,r,o),this.addToParent(n,e)),n},t.prototype.createGroup=function(e,t,r,o){var i=new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RowNode(this.beans);return i.group=!0,i.field=e.field,i.rowGroupColumn=e.rowGroupColumn,this.setGroupData(i,e),i.id=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RowNode.ID_PREFIX_ROW_GROUP+this.groupIdSequence.next(),i.key=e.key,i.level=r,i.leafGroup=!this.usingTreeData&&r===o.groupedColCount-1,i.allLeafChildren=[],i.setAllChildrenCount(0),i.rowGroupIndex=this.usingTreeData?null:r,i.childrenAfterGroup=[],i.childrenMapped={},i.updateHasChildren(),i.parent=o.includeParents?t:null,this.setExpandedInitialValue(o,i),this.gridOptionsService.is("groupIncludeFooter")&&i.createFooter(),i},t.prototype.setGroupData=function(e,t){var r=this;e.groupData={},this.columnModel.getGroupDisplayColumns().forEach(function(o){(r.usingTreeData||e.rowGroupColumn&&o.isRowGroupDisplayed(e.rowGroupColumn.getId()))&&(e.groupData[o.getColId()]=t.key)})},t.prototype.getChildrenMappedKey=function(e,t){return t?t.getId()+"-"+e:e},t.prototype.setExpandedInitialValue=function(e,t){if(e.pivotMode&&t.leafGroup)t.expanded=!1;else{var r=this.gridOptionsService.getCallback("isGroupOpenByDefault");if(r){var o={rowNode:t,field:t.field,key:t.key,level:t.level,rowGroupColumn:t.rowGroupColumn};t.expanded=1==r(o)}else{var i=e.expandByDefault;-1!==e.expandByDefault?t.expanded=t.level<i:t.expanded=!0}}},t.prototype.getGroupInfo=function(e,t){return this.usingTreeData?this.getGroupInfoFromCallback(e):this.getGroupInfoFromGroupColumns(e,t)},t.prototype.getGroupInfoFromCallback=function(e){var t=this.getDataPath?this.getDataPath(e.data):null;return null!=t&&0!==t.length||ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.doOnce(function(){return console.warn("AG Grid: getDataPath() should not return an empty path for data",e.data)},"groupStage.getGroupInfoFromCallback"),t?t.map(function(e){return{key:e,field:null,rowGroupColumn:null}}):[]},t.prototype.getGroupInfoFromGroupColumns=function(e,t){var r=this,o=[];return t.groupedCols.forEach(function(i){var n=r.valueService.getKeyForNode(i,e),a=null!=n&&""!==n;if((t.pivotMode||!r.gridOptionsService.is("groupAllowUnbalanced"))&&!a&&(n="",a=!0),a){var s={key:n,field:i.getColDef().field,rowGroupColumn:i};o.push(s)}}),o},__decorate$2l([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],t.prototype,"columnModel",void 0),__decorate$2l([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("selectableService")],t.prototype,"selectableService",void 0),__decorate$2l([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("valueService")],t.prototype,"valueService",void 0),__decorate$2l([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("beans")],t.prototype,"beans",void 0),__decorate$2l([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("selectionService")],t.prototype,"selectionService",void 0),__decorate$2l([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"postConstruct",null),__decorate$2l([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Bean)("groupStage")],t)}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.BeanStub),__extends$38=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__assign$M=function(){return __assign$M=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$M.apply(this,arguments)},__decorate$2k=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},__read$16=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},__spread$G=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read$16(arguments[t]));return e},PivotColDefService=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}var r;return __extends$38(t,e),r=t,t.prototype.createPivotColumnDefs=function(e){var t=this.columnModel.getPivotColumns(),r=this.columnModel.getValueColumns(),o=t.length,i=this.recursiveBuildGroup(0,e,[],o,t),n=function e(t,r){return void 0===r&&(r=[]),t.forEach(function(t){void 0!==t.children?e(t.children,r):r.push(t)}),r}(i);return this.addRowGroupTotals(i,n,r),this.addExpandablePivotGroups(i,n),this.addPivotTotalsToGroups(i,n),{pivotColumnGroupDefs:i,pivotColumnDefs:n.map(function(e){return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.cloneObject(e)})}},t.prototype.recursiveBuildGroup=function(e,t,r,o,i){var n=this,a=this.columnModel.getValueColumns();if(e>=o)return this.buildMeasureCols(r);var s=i[e].getColDef(),l=this.headerNameComparator.bind(this,s.pivotComparator);if(1===a.length&&this.gridOptionsService.is("removePivotHeaderRowWhenSingleValueColumn")&&e===o-1){var c=[];return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.iterateOb
2ject(t,function(e){var t=__spread$G(r,[e]);c.push(__assign$M(__assign$M({},n.createColDef(a[0],e,t)),{columnGroupShow:"open"}))}),c.sort(l),c}var u=[];return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.iterateObject(t,function(t,a){var s=__spread$G(r,[t]);u.push({children:n.recursiveBuildGroup(e+1,a,s,o,i),headerName:t,pivotKeys:s,columnGroupShow:"open",groupId:n.generateColumnGroupId(s)})}),u.sort(l),u},t.prototype.buildMeasureCols=function(e){var t=this,r=this.columnModel.getValueColumns();return 0===r.length?[this.createColDef(null,"-",e)]:r.map(function(r){var o=t.columnModel.getDisplayNameForColumn(r,"header");return __assign$M(__assign$M({},t.createColDef(r,o,e)),{columnGroupShow:"open"})})},t.prototype.addExpandablePivotGroups=function(e,t){var r=this;if(!this.gridOptionsService.is("suppressExpandablePivotGroups")&&!this.gridOptionsService.get("pivotColumnGroupTotals")){var o=function(e,t,i){var n=e;if(n.children){var a=new Map;n.children.forEach(function(e){o(e,t,a)});var s=!n.children.some(function(e){return e.children});r.columnModel.getValueColumns().forEach(function(o){var i=r.columnModel.getDisplayNameForColumn(o,"header"),n=r.createColDef(o,i,e.pivotKeys);n.pivotTotalColumnIds=a.get(o.getColId()),n.columnGroupShow="closed",n.aggFunc=o.getAggFunc(),s||(e.children.push(n),t.push(n))}),r.merge(i,a)}else{var l=e;if(!l.pivotValueColumn)return;var c=l.pivotValueColumn.getColId(),u=i.has(c)?i.get(c):[];u.push(l.colId),i.set(c,u)}};e.forEach(function(e){o(e,t,new Map)})}},t.prototype.addPivotTotalsToGroups=function(e,t){var r=this;if(this.gridOptionsService.get("pivotColumnGroupTotals")){var o="after"===this.gridOptionsService.get("pivotColumnGroupTotals"),i=this.columnModel.getValueColumns(),n=i.map(function(e){return e.getAggFunc()});if(n&&!(n.length<1)&&this.sameAggFuncs(n)){var a=i[0];e.forEach(function(e){r.recursivelyAddPivotTotal(e,t,a,o)})}}},t.prototype.recursivelyAddPivotTotal=function(e,t,r,o){var i=this,n=e;if(!n.children){var a=e;return a.colId?[a.colId]:null}var s=[];if(n.children.forEach(function(e){var n=i.recursivelyAddPivotTotal(e,t,r,o);n&&(s=s.concat(n))}),n.children.length>1){var l=this.localeService.getLocaleTextFunc()("pivotColumnGroupTotals","Total"),c=this.createColDef(r,l,e.pivotKeys,!0);c.pivotTotalColumnIds=s,c.aggFunc=r.getAggFunc();var u=e.children;o?u.push(c):u.unshift(c),t.push(c)}return s},t.prototype.addRowGroupTotals=function(e,t,r){var o=this;if(this.gridOptionsService.get("pivotRowTotals"))for(var i="after"===this.gridOptionsService.get("pivotRowTotals"),n=i?r.slice():r.slice().reverse(),a=function(r){var a=n[r],l=[];e.forEach(function(e){l=l.concat(o.extractColIdsForValueColumn(e,a))});var c=n.length>1||!s.gridOptionsService.is("removePivotHeaderRowWhenSingleValueColumn");s.createRowGroupTotal(e,t,a,l,i,c)},s=this,l=0;l<n.length;l++)a(l)},t.prototype.extractColIdsForValueColumn=function(e,t){var r=this,o=e;if(!o.children){var i=o;return i.pivotValueColumn===t&&i.colId?[i.colId]:[]}var n=[];return o.children.forEach(function(e){r.extractColIdsForValueColumn(e,t);var o=r.extractColIdsForValueColumn(e,t);n=n.concat(o)}),n},t.prototype.createRowGroupTotal=function(e,t,o,i,n,a){var s;if(0===this.columnModel.getValueColumns().length)s=this.createColDef(null,"-",[]);else{var l=this.columnModel.getDisplayNameForColumn(o,"header");(s=this.createColDef(o,l,[])).pivotTotalColumnIds=i}s.colId=r.PIVOT_ROW_TOTAL_PREFIX+s.colId,t.push(s);var c=a?{children:[s],pivotKeys:[],groupId:r.PIVOT_ROW_TOTAL_PREFIX+"_pivotGroup_"+o.getColId()}:s;n?e.push(c):e.unshift(c)},t.prototype.createColDef=function(e,t,r,o){void 0===o&&(o=!1);var i={};if(e){var n=e.getColDef();Object.assign(i,n),i.hide=!1}return i.headerName=t,i.colId=this.generateColumnId(r||[],e&&!o?e.getColId():""),i.field=i.colId,i.valueGetter=function(e){var t;return null===(t=e.data)||void 0===t?void 0:t[e.colDef.field]},i.pivotKeys=r,i.pivotValueColumn=e,!0===i.filter&&(i.filter="agNumberColumnFilter"),i},t.prototype.sameAggFuncs=function(e){if(1==e.length)return!0;for(var t=1;t<e.length;t++)if(e[t]!==e[0])return!1;return!0},t.prototype.headerNameComparator=function(e,t,r){return e?e(t.headerName,r.headerName):t.headerName&&!r.headerName?1:!t.headerName&&r.headerName?-1:t.headerName&&r.headerName?t.headerName<r.headerName?-1:t.headerName>r.headerName?1:0:0},t.prototype.merge=function(e,t){t.forEach(function(t,r,o){var i=e.has(r)?e.get(r):[],n=__spread$G(i,t);e.set(r,n)})},t.prototype.generateColumnGroupId=function(e){return"pivotGroup_"+this.columnModel.getPivotColumns().map(function(e){return e.getColId()}).join("-")+"_"+e.join("-")},t.prototype.generateColumnId=function(e,t){return"pivot_"+this.columnModel.getPivotColumns().map(function(e){return e.getColId()}).join("-")+"_"+e.join("-")+"_"+t},t.PIVOT_ROW_TOTAL_PREFIX="PivotRowTotal_",__decorate$2k([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],t.prototype,"columnModel",void 0),r=__decorate$2k([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Bean)("pivotColDefService")],t)}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.BeanStub),__extends$37=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$2j=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},PivotStage=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.uniqueValues={},t}return __extends$37(t,e),t.prototype.execute=function(e){var t=e.changedPath;this.columnModel.isPivotActive()?this.executePivotOn(t):this.executePivotOff(t)},t.prototype.executePivotOff=function(e){this.aggregationColumnsHashLastTime=null,this.uniqueValues={},this.columnModel.isSecondaryColumnsPresent()&&(this.columnModel.setSecondaryColumns(null,"rowModelUpdated"),e&&e.setInactive())},t.prototype.executePivotOn=function(e){var t=this.bucketUpRowNodes(e),r=this.setUniqueValues(t),o=this.columnModel.getValueColumns(),i=o.map(function(e){return e.getId()+"-"+e.getColDef().headerName}).join("#"),n=o.map(function(e){return e.getAggFunc().toString()}).join("#"),a=this.aggregationColumnsHashLastTime!==i,s=this.aggregationFuncsHashLastTime!==n;this.aggregationColumnsHashLastTime=i,this.aggregationFuncsHashLastTime=n;var l=this.columnModel.getRowGroupColumns().map(function(e){return e.getId()}).join("#"),c=l!==this.groupColumnsHashLastTime;if(this.groupColumnsHashLastTime=l,r||a||c||s){var u=this.pivotColDefService.createPivotColumnDefs(this.uniqueValues),d=u.pivotColumnGroupDefs,p=u.pivotColumnDefs;this.pivotColumnDefs=p,this.columnModel.setSecondaryColumns(d,"rowModelUpdated"),e&&e.setInactive()}},t.prototype.setUniqueValues=function(e){return!(JSON.stringify(e)===JSON.stringify(this.uniqueValues)||(this.uniqueValues=e,0))},t.prototype.bucketUpRowNodes=function(e){var t=this,r={};e.forEachChangedNodeDepthFirst(function(e){e.leafGroup&&(e.childrenMapped=null)});var o=function(e){var i;e.leafGroup?t.bucketRowNode(e,r):null===(i=e.childrenAfterFilter)||void 0===i||i.forEac
2h(o)};return e.executeFromRootNode(o),r},t.prototype.bucketRowNode=function(e,t){var r=this.columnModel.getPivotColumns();0===r.length?e.childrenMapped=null:e.childrenMapped=this.bucketChildren(e.childrenAfterFilter,r,0,t),e.sibling&&(e.sibling.childrenMapped=e.childrenMapped)},t.prototype.bucketChildren=function(e,t,r,o){var i=this,n={},a=t[r];if(e.forEach(function(e){var t=i.valueService.getKeyForNode(a,e);ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.missing(t)&&(t=""),o[t]||(o[t]={}),n[t]||(n[t]=[]),n[t].push(e)}),r===t.length-1)return n;var s={};return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.iterateObject(n,function(e,n){s[e]=i.bucketChildren(n,t,r+1,o[e])}),s},t.prototype.getPivotColumnDefs=function(){return this.pivotColumnDefs},__decorate$2j([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("valueService")],t.prototype,"valueService",void 0),__decorate$2j([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],t.prototype,"columnModel",void 0),__decorate$2j([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("pivotColDefService")],t.prototype,"pivotColDefService",void 0),__decorate$2j([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Bean)("pivotStage")],t)}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.BeanStub),__extends$36=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$2i=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},AGBigInt="undefined"==typeof BigInt?null:BigInt,AggFuncService=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.aggFuncsMap={},t.initialised=!1,t}var r;return __extends$36(t,e),r=t,t.prototype.init=function(){this.initialised||(this.initialiseWithDefaultAggregations(),this.addAggFuncs(this.gridOptionsService.get("aggFuncs")))},t.prototype.initialiseWithDefaultAggregations=function(){this.aggFuncsMap[r.AGG_SUM]=aggSum,this.aggFuncsMap[r.AGG_FIRST]=aggFirst,this.aggFuncsMap[r.AGG_LAST]=aggLast,this.aggFuncsMap[r.AGG_MIN]=aggMin,this.aggFuncsMap[r.AGG_MAX]=aggMax,this.aggFuncsMap[r.AGG_COUNT]=aggCount,this.aggFuncsMap[r.AGG_AVG]=aggAvg,this.initialised=!0},t.prototype.isAggFuncPossible=function(e,t){var r=this.getFuncNames(e),o=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.includes(r,t),i=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.exists(this.aggFuncsMap[t]);return o&&i},t.prototype.getDefaultAggFunc=function(e){var t=e.getColDef().defaultAggFunc;if(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.exists(t)&&this.isAggFuncPossible(e,t))return t;if(this.isAggFuncPossible(e,r.AGG_SUM))return r.AGG_SUM;var o=this.getFuncNames(e);return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.existsAndNotEmpty(o)?o[0]:null},t.prototype.addAggFuncs=function(e){ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.iterateObject(e,this.addAggFunc.bind(this))},t.prototype.addAggFunc=function(e,t){this.init(),this.aggFuncsMap[e]=t},t.prototype.getAggFunc=function(e){return this.init(),this.aggFuncsMap[e]},t.prototype.getFuncNames=function(e){return e.getColDef().allowedAggFuncs??Object.keys(this.aggFuncsMap).sort()},t.prototype.clear=function(){this.aggFuncsMap={}},t.AGG_SUM="sum",t.AGG_FIRST="first",t.AGG_LAST="last",t.AGG_MIN="min",t.AGG_MAX="max",t.AGG_COUNT="count",t.AGG_AVG="avg",__decorate$2i([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"init",null),r=__decorate$2i([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Bean)("aggFuncService")],t)}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.BeanStub);function aggSum(e){for(var t=e.values,r=null,o=0;o<t.length;o++){var i=t[o];"number"==typeof i?null===r?r=i:r+=AGBigInt?"number"==typeof r?i:AGBigInt(i):i:"bigint"==typeof i&&(r=null===r?i:("bigint"==typeof r?r:AGBigInt(r))+i)}return r}function aggFirst(e){return e.values.length>0?e.values[0]:null}function aggLast(e){return e.values.length>0?ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.last(e.values):null}function aggMin(e){for(var t=e.values,r=null,o=0;o<t.length;o++){var i=t[o];"number"!=typeof i&&"bigint"!=typeof i||!(null===r||r>i)||(r=i)}return r}function aggMax(e){for(var t=e.values,r=null,o=0;o<t.length;o++){var i=t[o];"number"!=typeof i&&"bigint"!=typeof i||!(null===r||r<i)||(r=i)}return r}function aggCount(e){for(var t=e.values,r=0,o=0;o<t.length;o++){var i=t[o];r+=null!=i&&"number"==typeof i.value?i.value:1}return r}function aggAvg(e){for(var t,r,o,i=e.values,n=0,a=0,s=0;s<i.length;s++){var l=i[s],c=null;"number"==typeof l||"bigint"==typeof l?(c=l,a++):null==l||"number"!=typeof l.value&&"bigint"!=typeof l.value||"number"!=typeof l.count||(c=AGBigInt?l.value*("number"==typeof l.value?l.count:AGBigInt(l.count)):l.value*l.count,a+=l.count),"number"==typeof c?n+=AGBigInt?"number"==typeof n?c:AGBigInt(c):c:"bigint"==typeof c&&(n=("bigint"==typeof n?n:AGBigInt(n))+c)}var u=null;a>0&&(u=AGBigInt?n/("number"==typeof n?a:AGBigInt(a)):n/a);var d=null===(r=null===(t=e.rowNode)||void 0===t?void 0:t.aggData)||void 0===r?void 0:r[null===(o=e.column)||void 0===o?void 0:o.getColId()];return d&&d.count===a&&d.value===u?d:{count:a,value:u,toString:function(){return"number"==typeof this.value||"bigint"==typeof this.value?this.value.toString():""},toNumber:function(){return this.value}}}var __extends$35=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$2h=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},DropZoneColumnComp=function(e){function t(t,r,o,i,n){var a=e.call(this)||this;return a.column=t,a.dragSourceDropTarget=r,a.ghost=o,a.dropZonePurpose=i,a.horizontal=n,a.popupS
2howing=!1,a}return __extends$35(t,e),t.prototype.init=function(){var e=this;this.setTemplate(t.TEMPLATE);var r=this.getGui(),o=this.gridOptionsService.is("functionsReadOnly");this.addElementClasses(r),this.addElementClasses(this.eDragHandle,"drag-handle"),this.addElementClasses(this.eText,"text"),this.addElementClasses(this.eButton,"button"),this.eDragHandle.appendChild(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.createIconNoSpan("columnDrag",this.gridOptionsService)),this.eButton.appendChild(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.createIconNoSpan("cancel",this.gridOptionsService)),this.setupSort(),this.displayName=this.columnModel.getDisplayNameForColumn(this.column,"columnDrop"),this.setupComponents(),this.ghost||o||this.addDragSource(),this.setupAria(),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Column.EVENT_SORT_CHANGED,function(){e.setupAria()}),this.setupTooltip()},t.prototype.setupAria=function(){var e=this.localeService.getLocaleTextFunc(),t=this.getColumnAndAggFuncName(),r=t.name,o=t.aggFuncName,i=e("ariaDropZoneColumnComponentAggFuncSeperator"," of "),n={asc:e("ariaDropZoneColumnComponentSortAscending","ascending"),desc:e("ariaDropZoneColumnComponentSortDescending","descending")},a=this.column.getSort(),s=this.gridOptionsService.is("rowGroupPanelSuppressSort"),l=[[o&&""+o+i,r,this.isGroupingZone()&&!s&&a&&", "+n[a]].filter(function(e){return!!e}).join("")],c=this.gridOptionsService.is("functionsReadOnly");if(this.isAggregationZone()&&!c){var u=e("ariaDropZoneColumnValueItemDescription","Press ENTER to change the aggregation type");l.push(u)}if(this.isGroupingZone()&&this.column.getColDef().sortable&&!s){var d=e("ariaDropZoneColumnGroupItemDescription","Press ENTER to sort");l.push(d)}var p=e("ariaDropZoneColumnComponentDescription","Press DELETE to remove");l.push(p),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setAriaLabel(this.getGui(),l.join(". "))},t.prototype.setupTooltip=function(){var e=this,t=function(){var t=e.column.getColDef().headerTooltip;e.setTooltip(t)};t(),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_NEW_COLUMNS_LOADED,t)},t.prototype.setupSort=function(){var e=this,t=this.column.getColDef().sortable,r=this.isGroupingZone();if(t&&r&&!this.gridOptionsService.is("rowGroupPanelSuppressSort")){this.eSortIndicator.setupSort(this.column,!0);var o=function(t){t.preventDefault();var r="ctrl"===e.gridOptionsService.get("multiSortKey")?t.ctrlKey||t.metaKey:t.shiftKey;e.sortController.progressSort(e.column,r,"uiColumnSorted")};this.addGuiEventListener("click",o),this.addGuiEventListener("keydown",function(t){t.key===ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.KeyCode.ENTER&&e.isGroupingZone()&&o(t)})}},t.prototype.addDragSource=function(){var e=this,t={type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.DragSourceType.ToolPanel,eElement:this.eDragHandle,defaultIconName:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.DragAndDropService.ICON_HIDE,getDragItem:function(){return e.createDragItem()},dragItemName:this.displayName,dragSourceDropTarget:this.dragSourceDropTarget};this.dragAndDropService.addDragSource(t,!0),this.addDestroyFunc(function(){return e.dragAndDropService.removeDragSource(t)})},t.prototype.createDragItem=function(){var e={};return e[this.column.getId()]=this.column.isVisible(),{columns:[this.column],visibleState:e}},t.prototype.setupComponents=function(){this.setTextValue(),this.setupRemove(),this.ghost&&this.addCssClass("ag-column-drop-cell-ghost"),this.isAggregationZone()&&!this.gridOptionsService.is("functionsReadOnly")&&this.addGuiEventListener("click",this.onShowAggFuncSelection.bind(this))},t.prototype.setupRemove=function(){var e=this;ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setDisplayed(this.eButton,!this.gridOptionsService.is("functionsReadOnly"));var r={type:t.EVENT_COLUMN_REMOVE};this.addGuiEventListener("keydown",function(t){var o=t.key===ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.KeyCode.ENTER;t.key===ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.KeyCode.DELETE&&(t.preventDefault(),e.dispatchEvent(r)),o&&e.isAggregationZone()&&!e.gridOptionsService.is("functionsReadOnly")&&(t.preventDefault(),e.onShowAggFuncSelection())}),this.addManagedListener(this.eButton,"click",function(t){e.dispatchEvent(r),t.stopPropagation()});var o=new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.TouchListener(this.eButton);this.addManagedListener(o,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.TouchListener.EVENT_TAP,function(){e.dispatchEvent(r)}),this.addDestroyFunc(o.destroy.bind(o))},t.prototype.getColumnAndAggFuncName=function(){var e=this.displayName,t="";if(this.isAggregationZone()){var r=this.column.getAggFunc(),o="string"==typeof r?r:"agg";t=this.localeService.getLocaleTextFunc()(o,o)}return{name:e,aggFuncName:t}},t.prototype.setTextValue=function(){var e=this.getColumnAndAggFuncName(),t=e.name,r=e.aggFuncName,o=this.isAggregationZone()?r+"("+t+")":t,i=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.escapeString(o);this.eText.innerHTML=i},t.prototype.onShowAggFuncSelection=function(){var e=this;
2if(!this.popupShowing){this.popupShowing=!0;var t=new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.VirtualList("select-agg-func"),r=this.aggFuncService.getFuncNames(this.column),o=this.getGui(),i=t.getGui();t.setModel({getRow:function(e){return r[e]},getRowCount:function(){return r.length}}),this.getContext().createBean(t);var n=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.loadTemplate('<div class="ag-select-agg-func-popup"></div>');n.style.top="0px",n.style.left="0px",n.appendChild(i),n.style.width=o.clientWidth+"px";var a=this.localeService.getLocaleTextFunc(),s=this.popupService.addPopup({modal:!0,eChild:n,closeOnEsc:!0,closedCallback:function(){e.destroyBean(t),e.popupShowing=!1,o.focus()},ariaLabel:a("ariaLabelAggregationFunction","Aggregation Function")});s&&t.setComponentCreator(this.createAggSelect.bind(this,s.hideFunc)),t.addGuiEventListener("keydown",function(e){if(e.key===ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.KeyCode.ENTER||e.key===ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.KeyCode.SPACE){var r=t.getLastFocusedRow();if(null==r)return;var o=t.getComponentAt(r);o&&o.selectItem()}}),this.popupService.positionPopupByComponent({type:"aggFuncSelect",eventSource:o,ePopup:n,keepWithinBounds:!0,column:this.column,position:"under"}),t.refresh();var l=r.findIndex(function(t){return t===e.column.getAggFunc()});-1===l&&(l=0),t.focusRow(l)}},t.prototype.createAggSelect=function(e,t){var r=this,o=this.localeService.getLocaleTextFunc(),i=t.toString(),n=o(i,i);return new AggItemComp(function(){if(e(),r.gridOptionsService.is("functionsPassive")){var o={type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_COLUMN_AGG_FUNC_CHANGE_REQUEST,columns:[r.column],aggFunc:t};r.eventService.dispatchEvent(o)}else r.columnModel.setColumnAggFunc(r.column,t,"toolPanelDragAndDrop")},n)},t.prototype.addElementClasses=function(e,t){t=t?"-"+t:"";var r=this.horizontal?"horizontal":"vertical";e.classList.add("ag-column-drop-cell"+t,"ag-column-drop-"+r+"-cell"+t)},t.prototype.isAggregationZone=function(){return"aggregation"===this.dropZonePurpose},t.prototype.isGroupingZone=function(){return"rowGroup"===this.dropZonePurpose},t.EVENT_COLUMN_REMOVE="columnRemove",t.TEMPLATE='<span role="option" tabindex="0">\n          <span ref="eDragHandle" class="ag-drag-handle ag-column-drop-cell-drag-handle" role="presentation"></span>\n          <span ref="eText" class="ag-column-drop-cell-text" aria-hidden="true"></span>\n          <ag-sort-indicator ref="eSortIndicator"></ag-sort-indicator>\n          <span ref="eButton" class="ag-column-drop-cell-button" role="presentation"></span>\n        </span>',__decorate$2h([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("dragAndDropService")],t.prototype,"dragAndDropService",void 0),__decorate$2h([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],t.prototype,"columnModel",void 0),__decorate$2h([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("popupService")],t.prototype,"popupService",void 0),__decorate$2h([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Optional)("aggFuncService")],t.prototype,"aggFuncService",void 0),__decorate$2h([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("sortController")],t.prototype,"sortController",void 0),__decorate$2h([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eText")],t.prototype,"eText",void 0),__decorate$2h([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eDragHandle")],t.prototype,"eDragHandle",void 0),__decorate$2h([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eButton")],t.prototype,"eButton",void 0),__decorate$2h([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eSortIndicator")],t.prototype,"eSortIndicator",void 0),__decorate$2h([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"init",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),AggItemComp=function(e){function t(t,r){var o=e.call(this,'<div class="ag-select-agg-func-item"/>')||this;return o.selectItem=t,o.getGui().innerText=r,o.addGuiEventListener("click",o.selectItem),o}return __extends$35(t,e),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),__extends$34=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$2g=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},__read$15=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},__spread$F=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read$15(arguments[t]));return e},BaseDropZonePanel=function(e){function t(r,o){var i=e.call(this,'<div class="ag-unselectable" role="presentation"></div>')||this;return i.horizontal=r,i.dropZonePurpose=o,i.state=t.STATE_NOT_DRAGGING,i.gui
2DestroyFunctions=[],i.childColumnComponents=[],i.resizeEnabled=!1,i.addElementClasses(i.getGui()),i.eColumnDropList=document.createElement("div"),i.addElementClasses(i.eColumnDropList,"list"),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setAriaRole(i.eColumnDropList,"listbox"),i}return __extends$34(t,e),t.prototype.isHorizontal=function(){return this.horizontal},t.prototype.toggleResizable=function(e){this.positionableFeature.setResizable(!!e&&{bottom:!0}),this.resizeEnabled=e},t.prototype.setBeans=function(e){this.beans=e},t.prototype.destroy=function(){this.destroyGui(),e.prototype.destroy.call(this)},t.prototype.destroyGui=function(){this.guiDestroyFunctions.forEach(function(e){return e()}),this.guiDestroyFunctions.length=0,this.childColumnComponents.length=0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.clearElement(this.getGui()),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.clearElement(this.eColumnDropList)},t.prototype.init=function(e){this.params=e,this.createManagedBean(new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ManagedFocusFeature(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.addManagedListener(this.beans.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_NEW_COLUMNS_LOADED,this.refreshGui.bind(this)),this.addManagedPropertyListener("functionsReadOnly",this.refreshGui.bind(this)),this.setupDropTarget(),this.positionableFeature=new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PositionableFeature(this.getGui(),{minHeight:100}),this.createManagedBean(this.positionableFeature),this.refreshGui(),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setAriaLabel(this.eColumnDropList,this.getAriaLabel())},t.prototype.handleKeyDown=function(e){var t=!this.horizontal,r=e.key===ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.KeyCode.DOWN,o=e.key===ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.KeyCode.UP;if(!t){var i=this.gridOptionsService.is("enableRtl");r=!i&&e.key===ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.KeyCode.RIGHT||i&&e.key===ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.KeyCode.LEFT,o=!i&&e.key===ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.KeyCode.LEFT||i&&e.key===ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.KeyCode.RIGHT}if(r||o){var n=this.focusService.findNextFocusableElement(this.getFocusableElement(),!1,o);n&&(e.preventDefault(),n.focus())}},t.prototype.addElementClasses=function(e,t){t=t?"-"+t:"";var r=this.horizontal?"horizontal":"vertical";e.classList.add("ag-column-drop"+t,"ag-column-drop-"+r+t)},t.prototype.setupDropTarget=function(){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.beans.dragAndDropService.addDropTarget(this.dropTarget)},t.prototype.isInterestedIn=function(e){return e===ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.DragSourceType.HeaderCell||e===ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.DragSourceType.ToolPanel},t.prototype.checkInsertIndex=function(e){var t=this.getNewInsertIndex(e);if(t<0)return!1;var r=t!==this.insertIndex;return r&&(this.insertIndex=t),r},t.prototype.getNewInsertIndex=function(e){var t=this,r=e.event,o=this.horizontal?r.clientX:r.clientY,i=this.childColumnComponents.map(function(e){return e.getGui().getBoundingClientRect()}),n=i.findIndex(function(e){return t.horizontal?e.right>o&&e.left<o:e.top<o&&e.bottom>o});if(-1===n){var a=this.beans.gridOptionsService.is("enableRtl");return i.every(function(e){return o>(t.horizontal?e.right:e.bottom)})?a&&this.horizontal?0:this.childColumnComponents.length:i.every(function(e){return o<(t.horizontal?e.left:e.top)})?a&&this.horizontal?this.childColumnComponents.length:0:this.insertIndex}return this.insertIndex<=n?n+1:n},t.prototype.checkDragStartedBySelf=function(e){this.state===t.STATE_NOT_DRAGGING&&(this.state=t.STATE_REARRANGE_COLUMNS,this.potentialDndColumns=e.dragSource.getDragItem().columns||[],this.refreshGui(),this.checkInsertIndex(e),this.refreshGui())},t.prototype.onDragging=function(e){this.checkDragStartedBySelf(e),this.checkInsertIndex(e)&&this.refreshGui()},t.prototype.onDragEnter=function(e){var r=e.dragSource.getDragItem().columns||[];this.state=t.STATE_NEW_COLUMNS_IN;var o=r.filter(this.isColumnDroppable.bind(this));if(o.length>0){if(this.isRowGroupPanel()&&!this.gridOptionsService.is("suppressRowGroupHidesColumns")&&!e.fromNudge){var i=e.dragSource.getDragItem().columns;this.setColumnsVisible(i,!1,"uiColumnDragged")}this.potentialDndColumns=o,this.checkInsertIndex(e),this.refreshGui()}},t.prototype.setColumnsVisible=function(e,t,r){if(void 0===r&&(r="api"),e){var o=e.filter(function(e){return!e.getColDef().lockVisible});this.colModel.setColumnsVisible(o,t,r)}},t.prototype.isPotentialDndColumns=function(){return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.existsAndNotEmpty(this.potentialDndColumns)},t.prototype.isRowGroupPanel=function(){return"rowGroup"===this.dropZonePurpose},t.prototype.onDragLeave=function(e){if(this.state===t.STATE_REARRANGE_COLUMNS){var r=e.dragSource.getDragItem().columns||[];this.removeColumns(r)}
2if(this.isPotentialDndColumns()){if(this.isRowGroupPanel()&&!this.gridOptionsService.is("suppressMakeColumnVisibleAfterUnGroup")&&!e.fromNudge){var o=e.dragSource.getDragItem();this.setColumnsVisible(o.columns,!0,"uiColumnDragged")}this.potentialDndColumns=[],this.refreshGui()}this.state=t.STATE_NOT_DRAGGING},t.prototype.onDragStop=function(){if(this.isPotentialDndColumns()){var e=!1;this.state===t.STATE_NEW_COLUMNS_IN?(this.addColumns(this.potentialDndColumns),e=!0):e=this.rearrangeColumns(this.potentialDndColumns),this.potentialDndColumns=[],this.beans.gridOptionsService.is("functionsPassive")&&e||this.refreshGui()}this.state=t.STATE_NOT_DRAGGING},t.prototype.removeColumns=function(e){var t=this.getExistingColumns().filter(function(t){return!ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.includes(e,t)});this.updateColumns(t)},t.prototype.addColumns=function(e){if(e){var t=this.getExistingColumns().slice(),r=e.filter(function(e){return t.indexOf(e)<0});ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.insertArrayIntoArray(t,r,this.insertIndex),this.updateColumns(t)}},t.prototype.rearrangeColumns=function(e){var t=this.getNonGhostColumns().slice();return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.insertArrayIntoArray(t,e,this.insertIndex),!ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.areEqual(t,this.getExistingColumns())&&(this.updateColumns(t),!0)},t.prototype.refreshGui=function(){var e=this.eColumnDropList.scrollTop,t=this.resizeEnabled,r=this.getFocusedItem(),o=this.focusService.findNextFocusableElement();o||(o=this.focusService.findNextFocusableElement(void 0,!1,!0)),this.toggleResizable(!1),this.destroyGui(),this.addIconAndTitleToGui(),this.addEmptyMessageToGui(),this.addColumnsToGui(),this.isHorizontal()||(this.eColumnDropList.scrollTop=e),t&&this.toggleResizable(t),this.restoreFocus(r,o)},t.prototype.getFocusedItem=function(){var e=this.getGui(),t=this.gridOptionsService.getDocument().activeElement;return e.contains(t)?Array.from(e.querySelectorAll(".ag-column-drop-cell")).indexOf(t):-1},t.prototype.restoreFocus=function(e,t){var r=this.getGui(),o=Array.from(r.querySelectorAll(".ag-column-drop-cell"));if(-1!==e){0===o.length&&t.focus();var i=o[Math.min(o.length-1,e)];i&&i.focus()}},t.prototype.getNonGhostColumns=function(){var e=this,t=this.getExistingColumns();return this.isPotentialDndColumns()?t.filter(function(t){return!ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.includes(e.potentialDndColumns,t)}):t},t.prototype.addColumnsToGui=function(){var e=this,t=this.getNonGhostColumns().map(function(t){return e.createColumnComponent(t,!1)});if(this.isPotentialDndColumns()){var r=this.potentialDndColumns.map(function(t){return e.createColumnComponent(t,!0)});this.insertIndex>=t.length?t.push.apply(t,__spread$F(r)):t.splice.apply(t,__spread$F([this.insertIndex,0],r))}this.appendChild(this.eColumnDropList),t.forEach(function(t,r){r>0&&e.addArrow(e.eColumnDropList),e.eColumnDropList.appendChild(t.getGui())}),this.addAriaLabelsToComponents()},t.prototype.addAriaLabelsToComponents=function(){var e=this;this.childColumnComponents.forEach(function(t,r){var o=t.getGui();ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setAriaPosInSet(o,r+1),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setAriaSetSize(o,e.childColumnComponents.length)})},t.prototype.createColumnComponent=function(e,t){var r=this,o=new DropZoneColumnComp(e,this.dropTarget,t,this.dropZonePurpose,this.horizontal);return o.addEventListener(DropZoneColumnComp.EVENT_COLUMN_REMOVE,this.removeColumns.bind(this,[e])),this.beans.context.createBean(o),this.guiDestroyFunctions.push(function(){return r.destroyBean(o)}),t||this.childColumnComponents.push(o),o},t.prototype.addIconAndTitleToGui=function(){var e=this.params.icon,t=document.createElement("div");if(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setAriaHidden(t,!0),this.addElementClasses(t,"title-bar"),this.addElementClasses(e,"icon"),this.addOrRemoveCssClass("ag-column-drop-empty",this.isExistingColumnsEmpty()),t.appendChild(e),!this.horizontal){var r=document.createElement("span");this.addElementClasses(r,"title"),r.innerHTML=this.params.title,t.appendChild(r)}this.appendChild(t)},t.prototype.isExistingColumnsEmpty=function(){return 0===this.getExistingColumns().length},t.prototype.addEmptyMessageToGui=function(){if(this.isExistingColumnsEmpty()&&!this.isPotentialDndColumns()){var e=document.createElement("span");e.innerHTML=this.params.emptyMessage,this.addElementClasses(e,"empty-message"),this.eColumnDropList.appendChild(e)}},t.prototype.addArrow=function(e){if(this.horizontal){var t=this.beans.gridOptionsService.is("enableRtl"),r=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.createIconNoSpan(t?"smallLeft":"smallRight",this.beans.gridOptionsService);this.addElementClasses(r,"cell-separator"),e.appendChild(r)}}
2,t.STATE_NOT_DRAGGING="notDragging",t.STATE_NEW_COLUMNS_IN="newColumnsIn",t.STATE_REARRANGE_COLUMNS="rearrangeColumns",__decorate$2g([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],t.prototype,"colModel",void 0),__decorate$2g([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("focusService")],t.prototype,"focusService",void 0),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),__extends$33=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$2f=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},RowGroupDropZonePanel=function(e){function t(t){return e.call(this,t,"rowGroup")||this}return __extends$33(t,e),t.prototype.passBeansUp=function(){e.prototype.setBeans.call(this,{gridOptionsService:this.gridOptionsService,eventService:this.eventService,context:this.getContext(),loggerFactory:this.loggerFactory,dragAndDropService:this.dragAndDropService});var t=this.localeService.getLocaleTextFunc(),r=t("rowGroupColumnsEmptyMessage","Drag here to set row groups"),o=t("groups","Row Groups");e.prototype.init.call(this,{dragAndDropIcon:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.DragAndDropService.ICON_GROUP,icon:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.createIconNoSpan("rowGroupPanel",this.gridOptionsService,null),emptyMessage:r,title:o}),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_COLUMN_ROW_GROUP_CHANGED,this.refreshGui.bind(this))},t.prototype.getAriaLabel=function(){return this.localeService.getLocaleTextFunc()("ariaRowGroupDropZonePanelLabel","Row Groups")},t.prototype.getTooltipParams=function(){var t=e.prototype.getTooltipParams.call(this);return t.location="rowGroupColumnsList",t},t.prototype.isColumnDroppable=function(e){return!(this.gridOptionsService.is("functionsReadOnly")||!e.isPrimary())&&e.isAllowRowGroup()&&
2!e.isRowGroupActive()},t.prototype.updateColumns=function(e){if(this.gridOptionsService.is("functionsPassive")){var t={type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_COLUMN_ROW_GROUP_CHANGE_REQUEST,columns:e};this.eventService.dispatchEvent(t)}else this.columnModel.setRowGroupColumns(e,"toolPanelUi")},t.prototype.getIconName=function(){return this.isPotentialDndColumns()?ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.DragAndDropService.ICON_GROUP:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.DragAndDropService.ICON_NOT_ALLOWED},t.prototype.getExistingColumns=function(){return this.columnModel.getRowGroupColumns()},__decorate$2f([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],t.prototype,"columnModel",void 0),__decorate$2f([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("loggerFactory")],t.prototype,"loggerFactory",void 0),__decorate$2f([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("dragAndDropService")],t.prototype,"dragAndDropService",void 0),__decorate$2f([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"passBeansUp",null),t}(BaseDropZonePanel),__extends$32=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$2e=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},PivotDropZonePanel=function(e){function t(t){return e.call(this,t,"pivot")||this}return __extends$32(t,e),t.prototype.passBeansUp=function(){e.prototype.setBeans.call(this,{gridOptionsService:this.gridOptionsService,eventService:this.eventService,context:this.getContext(),loggerFactory:this.loggerFactory,dragAndDropService:this.dragAndDropService});var t=this.localeService.getLocaleTextFunc(),r=t("pivotColumnsEmptyMessage","Drag here to set column labels"),o=t("pivots","Column Labels");e.prototype.init.call(this,{dragAndDropIcon:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.DragAndDropService.ICON_GROUP,icon:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.createIconNoSpan("pivotPanel",this.gridOptionsService,null),emptyMessage:r,title:o}),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_NEW_COLUMNS_LOADED,this.refresh.bind(this)),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_COLUMN_PIVOT_CHANGED,this.refresh.bind(this)),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.checkVisibility.bind(this)),this.refresh()},t.prototype.getAriaLabel=function(){return this.localeService.getLocaleTextFunc()("ariaPivotDropZonePanelLabel","Column Labels")},t.prototype.getTooltipParams=function(){var t=e.prototype.getTooltipParams.call(this);return t.location="pivotColumnsList",t},t.prototype.refresh=function(){this.checkVisibility(),this.refreshGui()},t.prototype.checkVisibility=function(){var e=this.columnModel.isPivotMode();if(this.isHorizontal())switch(this.gridOptionsService.get("pivotPanelShow")){case"always":this.setDisplayed(e);break;case"onlyWhenPivoting":var t=this.columnModel.isPivotActive();this.setDisplayed(e&&t);break;default:this.setDisplayed(!1)}else this.setDisplayed(e)},t.prototype.isColumnDroppable=function(e){return!(this.gridOptionsService.is("functionsReadOnly")||!e.isPrimary())&&e.isAllowPivot()&&!e.isPivotActive()},t.prototype.updateColumns=function(e){if(this.gridOptionsService.is("functionsPassive")){var t={type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_COLUMN_PIVOT_CHANGE_REQUEST,columns:e};this.eventService.dispatchEvent(t)}else this.columnModel.setPivotColumns(e,"toolPanelUi")},t.prototype.getIconName=function(){return this.isPotentialDndColumns()?ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.DragAndDropService.ICON_PIVOT:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.DragAndDropService.ICON_NOT_ALLOWED},t.prototype.getExistingColumns=function(){return this.columnModel.getPivotColumns()},__decorate$2e([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],t.prototype,"columnModel",void 0),__decorate$2e([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("loggerFactory")],t.prototype,"loggerFactory",void 0),__decorate$2e([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("dragAndDropService")],t.prototype,"dragAndDropService",void 0),__decorate$2e([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"passBeansUp",null),t}(BaseDropZonePanel),__extends$31=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$2d=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},GridHeaderDropZones=function(e){function t(){return e.call(this)||this}return __extends$31(t,e),t.prototype.postConstruct=function(){this.setGui(this.createNorthPanel()),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_COLUMN_ROW_GROUP_CHANGED,this.onRowGroupChanged.bind(this)),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_NEW_COLUMNS_LOADED,this.onRowGroupChanged.bind(this)),this.addManagedPropertyListener("rowGroupPanelShow",this.onRowGroupChanged.bind(this)),this.onRowGroupChanged()},t.prototype.createNorthPanel=function(){var e=document.createElement("div"),t=this.onDropPanelVisible.bind(this);return e.classList.add("ag-column-drop-wrapper"),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setAriaRole(e,"presentation"),this.rowGroupComp=new RowGroupDropZonePanel(!0),this.createManagedBean(this.rowGroupComp),this.pivotComp=new PivotDropZonePanel(!0),this.createManagedBean(this.pivotComp),e.appendChild(this.rowGroupComp.getGui()),e.appendChild(this.pivotComp.getGui()),this.addManagedListener(this.rowGroupComp,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component.EVENT_DISPLAYED_CHANGED,t),this.addManagedListener(this.pivotComp,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component.EVENT_DISPLAYED_CHANGED,t),this.onDropPanelVisible(),e},t.prototype.onDropPanelVisible=function(){var e=this.rowGroupComp.isDisplayed()&&this.pivotComp.isDisplayed();this.rowGroupComp.addOrRemoveCssClass("ag-column-drop-horizontal-half-width",e),this.pivotComp.addOrRemoveCssClass("ag-column-drop-horizontal-half-width",e)},t.prototype.onRowGroupChanged=function(){if(this.rowGroupComp){var e=this.gridOptionsService.get("rowGroupPanelShow");if("always"===e)this.rowGroupComp.setDisplayed(!0);else if("onlyWhenGrouping"===e){var t=!this.columnModel.isRowGroupEmpty();this.rowGroupComp.setDisplayed(t)}else this.rowGroupComp.setDisplayed(!1)}},__decorate$2d([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],t.prototype,"columnModel",void 0),__decorate$2d([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"postConstruct",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),__extends$30=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$2c=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},FilterAggregatesStage=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$30(t,e),t.prototype.execute=function(e){var t=this,r=this.columnModel.isPivotMode(),o=this.filterManager.isAggregateFilterPresent(),i=this.gridOptionsService.getGroupAggFiltering()||(r?function(e){return e.no
2de.leafGroup}:function(e){return!e.node.group}),n=e.changedPath,a=function(e,r){void 0===r&&(r=!1),e.childrenAfterFilter&&(e.childrenAfterAggFilter=e.childrenAfterFilter,r&&e.childrenAfterAggFilter.forEach(function(e){return a(e,r)}),t.setAllChildrenCount(e)),e.sibling&&(e.sibling.childrenAfterAggFilter=e.childrenAfterAggFilter)};n.forEachChangedNodeDepthFirst(o?function(e){var r;e.childrenAfterAggFilter=(null===(r=e.childrenAfterFilter)||void 0===r?void 0:r.filter(function(e){var r;return i({node:e})&&t.filterManager.doesRowPassAggregateFilters({rowNode:e})?(a(e,!0),!0):null===(r=e.childrenAfterAggFilter)||void 0===r?void 0:r.length}))||null,t.setAllChildrenCount(e),e.sibling&&(e.sibling.childrenAfterAggFilter=e.childrenAfterAggFilter)}:a,!0)},t.prototype.setAllChildrenCountTreeData=function(e){var t=0;e.childrenAfterAggFilter.forEach(function(e){t++,t+=e.allChildrenCount}),e.setAllChildrenCount(t)},t.prototype.setAllChildrenCountGridGrouping=function(e){var t=0;e.childrenAfterAggFilter.forEach(function(e){e.group?t+=e.allChildrenCount:t++}),e.setAllChildrenCount(t)},t.prototype.setAllChildrenCount=function(e){e.hasChildren()?this.gridOptionsService.isTreeData()?this.setAllChildrenCountTreeData(e):this.setAllChildrenCountGridGrouping(e):e.setAllChildrenCount(null)},__decorate$2c([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("filterManager")],t.prototype,"filterManager",void 0),__decorate$2c([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],t.prototype,"columnModel",void 0),__decorate$2c([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Bean)("filterAggregatesStage")],t)}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.BeanStub),VERSION$g="29.2.0",__extends$2$=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$2b=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},GroupFilter=function(e){function t(){return e.call(this,'\n            <div class="ag-group-filter">\n                <div ref="eGroupField"></div>\n                <div ref="eUnderlyingFilter"></div>\n            </div>\n        ')||this}return __extends$2$(t,e),t.prototype.postConstruct=function(){this.initialiseTabGuard({})},t.prototype.init=function(e){var t=this;return this.params=e,this.validateParams(),this.updateGroups().then(function(){t.addManagedListener(t.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_COLUMN_ROW_GROUP_CHANGED,function(){return t.onColumnRowGroupChanged()})})},t.prototype.validateParams=function(){var e=this.params.colDef;e.field&&ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.doOnce(function(){return console.warn('AG Grid: Group Column Filter does not work with the colDef property "field". This property will be ignored.')},"groupFilterFieldParam"),e.filterValueGetter&&ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.doOnce(function(){return console.warn('AG Grid: Group Column Filter does not work with the colDef property "filterValueGetter". This property will be ignored.')},"groupFilterFilterValueGetterParam"),e.filterParams&&ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.doOnce(function(){return console.warn('AG Grid: Group Column Filter does not work with the colDef property "filterParams". This property will be ignored.')},"groupFilterFilterParams")},t.prototype.updateGroups=function(){var e=this.updateGroupField();return this.getUnderlyingFilters(e)},t.prototype.getSourceColumns=function(){return this.groupColumn=this.params.column,this.gridOptionsService.is("treeData")?(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.doOnce(function(){return console.warn("AG Grid: Group Column Filter does not work with Tree Data enabled. Please disable Tree Data, or use a different filter.")},"groupFilterTreeData"),[]):this.columnModel.getSourceColumnsForGroupColumn(this.groupColumn)||(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.doOnce(function(){return console.warn("AG Grid: Group Column Filter only works on group columns. Please use a different filter.")},"groupFilterNotGroupColumn"),[])},t.prototype.updateGroupField=function(){var e=this;ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.clearElement(this.eGroupField),this.eGroupFieldSelect&&this.destroyBean(this.eGroupFieldSelect);var t=this.getSourceColumns(),r=t.filter(function(e){return e.isFilterAllowed()});return r.length?(1===t.length?(this.selectedColumn=r[0],ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setDisplayed(this.eGroupField,!1)):(this.selectedColumn&&r.some(function(t){return t.getId()===e.selectedColumn.getId()}
2)||(this.selectedColumn=r[0]),this.createGroupFieldSelectElement(r),this.eGroupField.appendChild(this.eGroupFieldSelect.getGui()),this.eGroupField.appendChild(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.loadTemplate('<div class="ag-filter-separator"></div>')),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setDisplayed(this.eGroupField,!0)),r):(this.selectedColumn=void 0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setDisplayed(this.eGroupField,!1),null)},t.prototype.createGroupFieldSelectElement=function(e){var t=this;this.eGroupFieldSelect=this.createManagedBean(new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgSelect);var r=this.localeService.getLocaleTextFunc();this.eGroupFieldSelect.setLabel(r("groupFilterSelect","Select field:")),this.eGroupFieldSelect.setLabelAlignment("top"),this.eGroupFieldSelect.addOptions(e.map(function(e){var r;return{value:e.getId(),text:null!==(r=t.columnModel.getDisplayNameForColumn(e,"groupFilter",!1))&&void 0!==r?r:void 0}})),this.eGroupFieldSelect.setValue(this.selectedColumn.getId()),this.eGroupFieldSelect.onValueChange(function(e){return t.updateSelectedColumn(e)}),this.eGroupFieldSelect.addCssClass("ag-group-filter-field-select-wrapper"),1===e.length&&this.eGroupFieldSelect.setDisabled(!0)},t.prototype.getUnderlyingFilters=function(e){var t=this;if(!e)return this.filterColumnPairs=void 0,this.selectedFilter=void 0,this.groupColumn.setFilterActive(!1,"columnRowGroupChanged"),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgPromise.resolve();var r=[],o=[];return e.forEach(function(e){var i=t.filterManager.getOrCreateFilterWrapper(e,"COLUMN_MENU");(null==i?void 0:i.filterPromise)&&r.push(i.filterPromise.then(function(r){return r&&o.push({filter:r,column:e}),e.getId()===t.selectedColumn.getId()&&(t.selectedFilter=null!=r?r:void 0),r}))}),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgPromise.all(r).then(function(){t.filterColumnPairs=o,t.groupColumn.setFilterActive(t.isFilterActive(),"columnRowGroupChanged")})},t.prototype.addUnderlyingFilterElement=function(){var e=this;if(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.clearElement(this.eUnderlyingFilter),!this.selectedColumn)return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgPromise.resolve();var t=this.filterManager.getOrCreateFilterWrapper(this.selectedColumn,"COLUMN_MENU");return t?t.guiPromise.then(function(r){var o;e.eUnderlyingFilter.appendChild(r),null===(o=t.filterPromise)||void 0===o||o.then(function(t){var r,o;null===(r=null==t?void 0:t.afterGuiAttached)||void 0===r||r.call(t,e.afterGuiAttachedParams),(null===(o=e.afterGuiAttachedParams)||void 0===o?void 0:o.suppressFocus)||!e.eGroupFieldSelect||e.eGroupFieldSelect.isDisabled()||e.eGroupFieldSelect.getFocusableElement().focus()})}):ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgPromise.resolve()},t.prototype.updateSelectedColumn=function(e){var r,o;if(e){null===(o=null===(r=this.selectedFilter)||void 0===r?void 0:r.afterGuiDetached)||void 0===o||o.call(r);var i=this.getFilterColumnPair(e);this.selectedColumn=null==i?void 0:i.column,this.selectedFilter=null==i?void 0:i.filter,this.dispatchEvent({type:t.EVENT_SELECTED_COLUMN_CHANGED}),this.addUnderlyingFilterElement()}},t.prototype.isFilterActive=function(){var e;return!!(null===(e=this.filterColumnPairs)||void 0===e?void 0:e.some(function(e){return e.filter.isFilterActive()}))},t.prototype.doesFilterPass=function(){return!0},t.prototype.getModel=function(){return null},t.prototype.setModel=function(){return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgPromise.resolve()},t.prototype.afterGuiAttached=function(e){this.afterGuiAttachedParams=e,this.addUnderlyingFilterElement()},t.prototype.afterGuiDetached=function(){var e,t;ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.clearElement(this.eUnderlyingFilter),null===(t=null===(e=this.selectedFilter)||void 0===e?void 0:e.afterGuiDetached)||void 0===t||t.call(e)},t.prototype.onColumnRowGroupChanged=function(){var e=this;this.updateGroups().then(function(){e.dispatchEvent({type:t.EVENT_COLUMN_ROW_GROUP_CHANGED}),e.eventService.dispatchEvent({type:"filterAllowedUpdated"})})},t.prototype.getFilterColumnPair=function(e){var t;if(e)return null===(t=this.filterColumnPairs)||void 0===t?void 0:t.find(function(t){return t.column.getId()===e})},t.prototype.getSelectedFilter=function(){return this.selectedFilter},t.prototype.getSelectedColumn=function(){return this.selectedColumn},t.prototype.isFilterAllowed=function(){return!!this.selectedColumn},t.prototype.destroy=function(){e.prototype.destroy.call(this)},t.EVENT_COLUMN_ROW_GROUP_CHANGED="columnRowGroupChanged",t.EVENT_SELECTED_COLUMN_CHANGED="selectedColumnChanged",__decorate$2b([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("filterManager")],t.prototype,"filterManager",void 0),__decorate$2b([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],t.prototype,"columnModel",void 0),__decorate$2b([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eGroupField")],t.prototype,"eGroupField",void 0),__decorate$2b([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eUnderlyingFilter")],t.prototype,"eUnderlyingFilter",void 0),__decorate$2b([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"postConstruct",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.TabGuardComp),__extends$2_=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$2a=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},GroupFloatingFilterComp=function(e){function t(){return e.call(this,'\n            <div ref="eFloatingFilter" class="ag-group-floating-filter ag-floating-filter-input" role="presentation"></div>\n        ')||this}return __extends$2_(t,e),t.prototype.init=function(e){var t=this;this.params=e;var r="multipleColumns"===this.gridOptionsService.get("groupDisplayType");return new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgPromise(function(e){t.params.parentFilterInstance(function(o){t.parentFilterInstance=o,r?t.setupUnderlyingFloatingFilterElement().then(function(){return e()}):(t.setupReadOnlyFloatingFilterElement(),e())})}).then(function(){t.addManagedListener(t.parentFilterInstance,GroupFilter.EVENT_SELECTED_COLUMN_CHANGED,function(){return t.onSelectedColumnChanged()}),t.addManagedListener(t.parentFilterInstance,GroupFilter.EVENT_COLUMN_ROW_GROUP_CHANGED,function(){return t.onColumnRowGroupChanged()})})},t.prototype.setupReadOnlyFloatingFilterElement=function(){var e=this;if(!this.eFloatingFilterText){this.eFloatingFilterText=this.createManagedBean(new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgInputTextField);var t=this.columnModel.getDisplayNameForColumn(this.params.column,"header",!0),r=this.localeService.getLocaleTextFunc();this.eFloatingFilterText.setDisabled(!0).setInputAriaLabel(t+" "+r("ariaFilterInput","Filter Input")).addGuiEventListener("click",function(){return e.params.showParentFilter()})}this.updateDisplayedValue(),this.eFloatingFilter.appendChild(this.eFloatingFilterText.getGui())},t.prototype.setupUnderlyingFloatingFilterElement=function(){var e=this;this.showingUnderlyingFloatingFilter=!1,this.underlyingFloatingFilter=void 0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.clearElement(this.eFloatingFilter);var t=this.parentFilterInstance.getSelectedColumn();if(t&&!t.isVisible()){var r=this.filterManager.getFloatingFilterCompDetail
2s(t,this.params.showParentFilter);if(r)return this.columnVisibleChangedListener||(this.columnVisibleChangedListener=this.addManagedListener(t,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Column.EVENT_VISIBLE_CHANGED,this.onColumnVisibleChanged.bind(this))),r.newAgStackInstance().then(function(t){var r,o;e.underlyingFloatingFilter=t,null===(r=e.underlyingFloatingFilter)||void 0===r||r.onParentModelChanged(null===(o=e.parentFilterInstance.getSelectedFilter())||void 0===o?void 0:o.getModel()),e.appendChild(t.getGui()),e.showingUnderlyingFloatingFilter=!0})}return this.setupReadOnlyFloatingFilterElement(),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgPromise.resolve()},t.prototype.onColumnVisibleChanged=function(){this.setupUnderlyingFloatingFilterElement()},t.prototype.onParentModelChanged=function(e,t){var r,o;this.showingUnderlyingFloatingFilter?null===(r=this.underlyingFloatingFilter)||void 0===r||r.onParentModelChanged(null===(o=this.parentFilterInstance.getSelectedFilter())||void 0===o?void 0:o.getModel(),t):this.updateDisplayedValue()},t.prototype.updateDisplayedValue=function(){if(this.parentFilterInstance&&this.eFloatingFilterText){var e=this.parentFilterInstance.getSelectedFilter();if(!e)return this.eFloatingFilterText.setValue(""),void this.eFloatingFilterText.setDisplayed(!1);if(this.eFloatingFilterText.setDisplayed(!0),e.getModelAsString){var t=e.getModel();this.eFloatingFilterText.setValue(null==t?"":e.getModelAsString(t))}else this.eFloatingFilterText.setValue("")}},t.prototype.onSelectedColumnChanged=function(){this.showingUnderlyingFloatingFilter||this.updateDisplayedValue()},t.prototype.onColumnRowGroupChanged=function(){this.showingUnderlyingFloatingFilter||this.updateDisplayedValue()},t.prototype.destroy=function(){e.prototype.destroy.call(this)},__decorate$2a([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],t.prototype,"columnModel",void 0),__decorate$2a([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("filterManager")],t.prototype,"filterManager",void 0),__decorate$2a([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eFloatingFilter")],t.prototype,"eFloatingFilter",void 0),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),RowGroupingModule={version:VERSION$g,moduleName:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleNames.RowGroupingModule,beans:[AggregationStage,FilterAggregatesStage,GroupStage,PivotColDefService,PivotStage,AggFuncService],agStackComponents:[{componentName:"AgGridHeaderDropZones",componentClass:GridHeaderDropZones}],userComponents:[{componentName:"agGroupColumnFilter",componentClass:GroupFilter},{componentName:"agGroupColumnFloatingFilter",componentClass:GroupFloatingFilterComp}],dependantModules:[EnterpriseCoreModule]},__extends$2Z=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$29=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},ValuesDropZonePanel=function(e){function t(t){return e.call(this,t,"aggregation")||this}return __extends$2Z(t,e),t.prototype.passBeansUp=function(){e.prototype.setBeans.call(this,{gridOptionsService:this.gridOptionsService,eventService:this.eventService,context:this.getContext(),loggerFactory:this.loggerFactory,dragAndDropService:this.dragAndDropService});var t=this.localeService.getLocaleTextFunc(),r=t("valueColumnsEmptyMessage","Drag here to aggregate"),o=t("values","Values");e.prototype.init.call(this,{dragAndDropIcon:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.DragAndDropService.ICON_AGGREGATE,icon:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.createIconNoSpan("valuePanel",this.gridOptionsService,null),emptyMessage:r,title:o}),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_COLUMN_VALUE_CHANGED,this.refreshGui.bind(this))},t.prototype.getAriaLabel=function(){return this.localeService.getLocaleTextFunc()("ariaValuesDropZonePanelLabel","Values")},t.prototype.getTooltipParams=function(){var t=e.prototype.getTooltipParams.call(this);return t.location="valueColumnsList",t},t.prototype.getIconName=function(){return this.isPotentialDndColumns()?ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.DragAndDropService.ICON_AGGREGATE:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.DragAndDropService.ICON_NOT_ALLOWED},t.prototype.isColumnDroppable=function(e){return!(this.gridOptionsService.is("functionsReadOnly")||!e.isPrimary())&&e.isAllowValue()&&!e.isValueActive()},t.prototype.updateColumns=function(e){if(this.gridOptionsService.is("functionsPassive")){var t={type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_COLUMN_VALUE_CHANGE_REQUEST,columns:e};this.eventService.dispatchEvent(t)}else this.columnModel.setValueColumns(e,"toolPanelUi")},t.prototype.getExistingColumns=function(){return this.columnModel.getValueColumns()},__decorate$29([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],t.prototype,"columnModel",void 0),__decorate$29([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("loggerFactory")],t.prototype,"loggerFactory",void 0),__decorate$29([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("dragAndDropService")],t.prototype,"dragAndDropService",void 0),__decorate$29([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"passBeansUp",null),t}(BaseDropZonePanel),__extends$2Y=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$28=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},PrimaryColsPanel=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return __extends$2Y(t,e),t.prototype.init=function(e,t,r){this.allowDragging=e,this.params=t,this.eventType=r,this.primaryColsHeaderPanel.init(this.params);var o=this.params.suppressColumnFilter,i=this.params.suppressColumnSelectAll;this.params.suppressColumnExpandAll&&o&&i&&this.primaryColsHeaderPanel.setDisplayed(!1),this.addManagedListener(this.primaryColsListPanel,"groupExpanded",this.onGroupExpanded.bind(this)),this.addManagedListener(this.primaryColsListPanel,"selectionChanged",this.onSelectionChange.bind(this)),this.primaryColsListPanel.init(this.params,this.allowDragging,this.eventType),this.addManagedListener(this.primaryColsHeaderPanel,"expandAll",this.onExpandAll.bind(this)),this.addManagedListener(this.primaryColsHeaderPanel,"collapseAll",this.onCollapseAll.bind(this)),this.addManagedListener(this.primaryColsHeaderPanel,"selectAll",this.onSelectAll.bind(this)),this.addManagedListener(this.primaryColsHeaderPanel,"unselectAll",this.onUnselectAll.bind(this)),this.addManagedListener(this.primaryColsHeaderPanel,"filterChanged",this.onFilterChanged.bind(this)),this.positionableFeature=new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PositionableFeature
2(this.getGui(),{minHeight:100}),this.createManagedBean(this.positionableFeature)},t.prototype.toggleResizable=function(e){this.positionableFeature.setResizable(!!e&&{bottom:!0})},t.prototype.onExpandAll=function(){this.primaryColsListPanel.doSetExpandedAll(!0)},t.prototype.onCollapseAll=function(){this.primaryColsListPanel.doSetExpandedAll(!1)},t.prototype.expandGroups=function(e){this.primaryColsListPanel.setGroupsExpanded(!0,e)},t.prototype.collapseGroups=function(e){this.primaryColsListPanel.setGroupsExpanded(!1,e)},t.prototype.setColumnLayout=function(e){this.primaryColsListPanel.setColumnLayout(e)},t.prototype.onFilterChanged=function(e){this.primaryColsListPanel.setFilterText(e.filterText)},t.prototype.syncLayoutWithGrid=function(){this.primaryColsListPanel.onColumnsChanged()},t.prototype.onSelectAll=function(){this.primaryColsListPanel.doSetSelectedAll(!0)},t.prototype.onUnselectAll=function(){this.primaryColsListPanel.doSetSelectedAll(!1)},t.prototype.onGroupExpanded=function(e){this.primaryColsHeaderPanel.setExpandState(e.state)},t.prototype.onSelectionChange=function(e){this.primaryColsHeaderPanel.setSelectionState(e.state)},t.TEMPLATE='<div class="ag-column-select">\n            <ag-primary-cols-header ref="primaryColsHeaderPanel"></ag-primary-cols-header>\n            <ag-primary-cols-list ref="primaryColsListPanel"></ag-primary-cols-list>\n        </div>',__decorate$28([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("primaryColsHeaderPanel")],t.prototype,"primaryColsHeaderPanel",void 0),__decorate$28([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("primaryColsListPanel")],t.prototype,"primaryColsListPanel",void 0),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),__extends$2X=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__assign$L=function(){return __assign$L=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$L.apply(this,arguments)},__decorate$27=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},ColumnToolPanel=function(e){function t(){var r=e.call(this,t.TEMPLATE)||this;return r.initialised=!1,r.childDestroyFuncs=[],r}return __extends$2X(t,e),t.prototype.setVisible=function(t){e.prototype.setDisplayed.call(this,t),t&&!this.initialised&&this.init(this.params)},t.prototype.init=function(e){var t=this,r={suppressColumnMove:!1,suppressColumnSelectAll:!1,suppressColumnFilter:!1,suppressColumnExpandAll:!1,contractColumnSelection:!1,suppressPivotMode:!1,suppressRowGroups:!1,suppressValues:!1,suppressPivots:!1,suppressSyncLayoutWithGrid:!1,api:this.gridApi,columnApi:this.columnApi};if(this.params=__assign$L(__assign$L(__assign$L({},r),e),{context:this.gridOptionsService.context}),this.isRowGroupingModuleLoaded()&&!this.params.suppressPivotMode&&(this.pivotModePanel=this.createBean(new PivotModePanel),this.childDestroyFuncs.push(function(){return t.destroyBean(t.pivotModePanel)}),this.appendChild(this.pivotModePanel)),this.primaryColsPanel=this.createBean(new PrimaryColsPanel),this.childDestroyFuncs.push(function(){return t.destroyBean(t.primaryColsPanel)}),this.primaryColsPanel.init(!0,this.params,"toolPanelUi"),this.primaryColsPanel.addCssClass("ag-column-panel-column-select"),this.appendChild(this.primaryColsPanel),this.isRowGroupingModuleLoaded()){this.params.suppressRowGroups||(this.rowGroupDropZonePanel=this.createBean(new RowGroupDropZonePanel(!1)),this.childDestroyFuncs.push(function(){return t.destroyBean(t.rowGroupDropZonePanel)}),this.appendChild(this.rowGroupDropZonePanel)),this.params.suppressValues||(this.valuesDropZonePanel=this.createBean(new ValuesDropZonePanel(!1)),this.childDestroyFuncs.push(function(){return t.destroyBean(t.valuesDropZonePanel)}),this.appendChild(this.valuesDropZonePanel)),this.params.suppressPivots||(this.pivotDropZonePanel=this.createBean(new PivotDropZonePanel(!1)),this.childDestroyFuncs.push(function(){return t.destroyBean(t.pivotDropZonePanel)}),this.appendChild(this.pivotDropZonePanel)),this.setLastVisible();var o=this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED,function(){t.resetChildrenHeight(),t.setLastVisible()});this.childDestroyFuncs.push(function(){return o()})}this.initialised=!0},t.prototype.setPivotModeSectionVisible=function(e){var t=this;this.isRowGroupingModuleLoaded()&&(this.pivotModePanel?this.pivotModePanel.setDisplayed(e):e&&(this.pivotModePanel=this.createBean(new PivotModePanel),this.getGui().insertBefore(this.pivotModePanel.getGui(),this.getGui().firstChild),this.childDestroyFuncs.push(function(){return t.destroyBean(t.pivotModePanel)})),this.setLastVisible())},t.prototype.setRowGroupsSectionVisible=function(e){this.isRowGroupingModuleLoaded()&&(this.rowGroupDropZonePanel?this.rowGroupDropZonePanel.setDisplayed(e):e&&(this.rowGroupDropZonePanel=this.createManagedBean(new RowGroupDropZonePanel(!1)),this.appendChild(this.rowGroupDropZonePanel)),this.setLastVisible())},t.prototype.setValuesSectionVisible=function(e){this.isRowGroupingModuleLoaded()&&(this.valuesDropZonePanel?this.valuesDropZonePanel.setDisplayed(e):e&&(this.valuesDropZonePanel=this.createManagedBean(new ValuesDropZonePanel(!1)),this.appendChild(this.valuesDropZonePanel)),this.setLastVisible())},t.prototype.setPivotSectionVisible=function(e){this.isRowGroupingModuleLoaded()&&(this.pivotDropZonePanel?this.pivotDropZonePanel.setDisplayed(e):e&&(this.pivotDropZonePanel=this.createManagedBean(new PivotDropZonePanel(!1)),this.appendChild(this.pivotDropZonePanel),this.pivotDropZonePanel.setDisplayed(e)),this.setLastVisible())},t.prototype.setResizers=function(){[this.primaryColsPanel,this.rowGroupDropZonePanel,this.valuesDropZonePanel,this.pivotDropZonePanel].forEach(function(e){if(e){var t=e.getGui();e.toggleResizable(!t.classList.contains("ag-last-column-drop")&&!t.classList.contains("ag-hidden"))}})},t.prototype.setLastVisible=function(){var e=this.getGui();Array.prototype.slice.call(e.querySelectorAll(".ag-column-drop")).forEac
2h(function(e){return e.classList.remove("ag-last-column-drop")});var t=e.querySelectorAll(".ag-column-drop:not(.ag-hidden)"),r=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.last(t);r&&r.classList.add("ag-last-column-drop"),this.setResizers()},t.prototype.resetChildrenHeight=function(){for(var e=this.getGui().children,t=0;t<e.length;t++){var r=e[t];r.style.removeProperty("height"),r.style.removeProperty("flex")}},t.prototype.isRowGroupingModuleLoaded=function(){return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleRegistry.assertRegistered(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleNames.RowGroupingModule,"Row Grouping")},t.prototype.expandColumnGroups=function(e){this.primaryColsPanel.expandGroups(e)},t.prototype.collapseColumnGroups=function(e){this.primaryColsPanel.collapseGroups(e)},t.prototype.setColumnLayout=function(e){this.primaryColsPanel.setColumnLayout(e)},t.prototype.syncLayoutWithGrid=function(){this.primaryColsPanel.syncLayoutWithGrid()},t.prototype.destroyChildren=function(){this.childDestroyFuncs.forEach(function(e){return e()}),this.childDestroyFuncs.length=0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.clearElement(this.getGui())},t.prototype.refresh=function(){this.destroyChildren(),this.init(this.params)},t.prototype.destroy=function(){this.destroyChildren(),e.prototype.destroy.call(this)},t.TEMPLATE='<div class="ag-column-panel"></div>',__decorate$27([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("gridApi")],t.prototype,"gridApi",void 0),__decorate$27([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnApi")],t.prototype,"columnApi",void 0),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),__extends$2W=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$26=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},HorizontalResizeComp=function(e){function t(){var t=e.call(this,'<div class="ag-tool-panel-horizontal-resize"></div>')||this;return t.minWidth=100,t.maxWidth=null,t}return __extends$2W(t,e),t.prototype.setElementToResize=function(e){this.elementToResize=e},t.prototype.postConstruct=function(){var e=this.horizontalResizeService.addResizeBar({eResizeBar:this.getGui(),dragStartPixels:1,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this),onResizeEnd:this.onResizeEnd.bind(this)});this.addDestroyFunc(e),this.setInverted(this.gridOptionsService.is("enableRtl"))},t.prototype.dispatchResizeEvent=function(e,t,r){var o={type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_TOOL_PANEL_SIZE_CHANGED,width:r,started:e,ended:t};this.eventService.dispatchEvent(o)},t.prototype.onResizeStart=function(){this.startingWidth=this.elementToResize.offsetWidth,this.dispatchResizeEvent(!0,!1,this.startingWidth)},t.prototype.onResizeEnd=function(e){return this.onResizing(e,!0)},t.prototype.onResizing=function(e,t){void 0===t&&(t=!1);var r=this.inverted?-1:1,o=Math.max(this.minWidth,Math.floor(this.startingWidth-e*r));null!=this.maxWidth&&(o=Math.min(this.maxWidth,o)),this.elementToResize.style.width=o+"px",this.dispatchResizeEvent(!1,t,o)},t.prototype.setInverted=function(e){this.inverted=e},t.prototype.setMaxWidth=function(e){this.maxWidth=e},t.prototype.setMinWidth=function(e){this.minWidth=null!=e?e:100},__decorate$26([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("horizontalResizeService")],t.prototype,"horizontalResizeService",void 0),__decorate$26([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"postConstruct",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),__extends$2V=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$25=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},SideBarButtonComp=function(e){function t(t){var r=e.call(this)||this;return r.toolPanelDef=t,r}return __extends$2V(t,e),t.prototype.getToolPanelId=function(){return this.toolPanelDef.id},t.prototype.postConstruct=function(){var e=this.createTemplate();this.setTemplate(e),this.setLabel(),this.setIcon(),this.addManagedListener(this.eToggleButton,"click",this.onButtonPressed.bind(this))},t.prototype.createTemplate=function(){return'<div class="ag-side-button" role="presentation">\n                <button type="button" ref="eToggleButton" tabindex="-1" role="tab" class="ag-side-button-button">\n                    <div ref="eIconWrapper" class="ag-side-button-icon-wrapper" aria-hidden="true"></div>
2\n                    <span ref ="eLabel" class="ag-side-button-label"></span>\n                </button>\n            </div>'},t.prototype.setLabel=function(){var e=this.localeService.getLocaleTextFunc(),t=this.toolPanelDef,r=e(t.labelKey,t.labelDefault);this.eLabel.innerText=r},t.prototype.setIcon=function(){this.eIconWrapper.insertAdjacentElement("afterbegin",ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.createIconNoSpan(this.toolPanelDef.iconKey,this.gridOptionsService))},t.prototype.onButtonPressed=function(){this.dispatchEvent({type:t.EVENT_TOGGLE_BUTTON_CLICKED})},t.prototype.setSelected=function(e){this.addOrRemoveCssClass("ag-selected",e)},t.EVENT_TOGGLE_BUTTON_CLICKED="toggleButtonClicked",__decorate$25([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eToggleButton")],t.prototype,"eToggleButton",void 0),__decorate$25([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eIconWrapper")],t.prototype,"eIconWrapper",void 0),__decorate$25([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eLabel")],t.prototype,"eLabel",void 0),__decorate$25([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"postConstruct",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),__extends$2U=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$24=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},SideBarButtonsComp=function(e){function t(){var r=e.call(this,t.TEMPLATE)||this;return r.buttonComps=[],r}return __extends$2U(t,e),t.prototype.postConstruct=function(){this.addManagedListener(this.getFocusableElement(),"keydown",this.handleKeyDown.bind(this))},t.prototype.handleKeyDown=function(e){if(e.key===ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.KeyCode.TAB&&e.shiftKey){var t=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.last(this.columnModel.getAllDisplayedColumns());this.focusService.focusGridView(t,!0)&&e.preventDefault()}},t.prototype.setToolPanelDefs=function(e){e.forEach(this.addButtonComp.bind(this))},t.prototype.setActiveButton=function(e){this.buttonComps.forEach(function(t){t.setSelected(e===t.getToolPanelId())})},t.prototype.addButtonComp=function(e){var r=this,o=this.createBean(new SideBarButtonComp(e));this.buttonComps.push(o),this.appendChild(o),o.addEventListener(SideBarButtonComp.EVENT_TOGGLE_BUTTON_CLICKED,function(){r.dispatchEvent({type:t.EVENT_SIDE_BAR_BUTTON_CLICKED,toolPanelId:e.id})})},t.prototype.clearButtons=function(){this.buttonComps=this.destroyBeans(this.buttonComps),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.clearElement(this.getGui())},t.EVENT_SIDE_BAR_BUTTON_CLICKED="sideBarButtonClicked",t.TEMPLATE='<div class="ag-side-buttons" role="tablist"></div>',__decorate$24([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("focusService")],t.prototype,"focusService",void 0),__decorate$24([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],t.prototype,"columnModel",void 0),__decorate$24([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"postConstruct",null),__decorate$24([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PreDestroy],t.prototype,"clearButtons",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),SideBarDefParser=function(){function e(){}return e.parse=function(t){if(t){if(!0===t)return{toolPanels:[e.DEFAULT_COLUMN_COMP,e.DEFAULT_FILTER_COMP],defaultToolPanel:"columns"};if("string"==typeof t)return e.parse([t]);if(Array.isArray(t)){var r=[];if(t.forEach(function(t){var o=e.DEFAULT_BY_KEY[t];o?r.push(o):console.warn("AG Grid: the key "+t+" is not a valid key for specifying a tool panel, valid keys are: "+Object.keys(e.DEFAULT_BY_KEY).join(","))}),0===r.length)return;return{toolPanels:r,defaultToolPanel:r[0].id}}return{toolPanels:e.parseComponents(t.toolPanels),defaultToolPanel:t.defaultToolPanel,hiddenByDefault:t.hiddenByDefault,position:t.position}}},e.parseComponents=function(t){var r=[];return t?(t.forEach(function(t){var o=null;if("string"==typeof t){var i=e.DEFAULT_BY_KEY[t];if(!i)return void console.warn("AG Grid: the key "+t+" is not a valid key for specifying a tool panel, valid keys are: "+Object.keys(e.DEFAULT_BY_KEY).join(","));o=i}else o=t;r.push(o)}),r):r},e.DEFAULT_COLUMN_COMP={id:"columns",labelDefault:"Columns",labelKey:"columns",iconKey:"columns",toolPanel:"agColumnsToolPanel"},e.DEFAULT_FILTER_COMP={id:"filters",labelDefault:"Filters",labelKey:"filters",iconKey:"filter",toolPanel:"agFiltersToolPanel"},e.DEFAULT_BY_KEY={columns:e.DEFAULT_COLUMN_COMP,filters:e.DEFAULT_FILTER_COMP},e}(),__extends$2T=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$23=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},ToolPanelWrapper=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return __extends$2T(t,e),t.prototype.setupResize=function(){var e=this.getGui(),t=this.resizeBar=this.createManagedBean(new HorizontalResizeComp);t.setElementToResize(e),this.appendChild(t)},t.prototype.getToolPanelId=function(){return this.toolPanelId},t.prototype.setToolPanelDef=function(e){var t=e.id,r=e.minWidth,o=e.maxWidth,i=e.width;this.toolPanelId=t,this.width=i;
2var n=this.userComponentFactory.getToolPanelCompDetails(e,{}).newAgStackInstance();null!=n?(n.then(this.setToolPanelComponent.bind(this)),null!=r&&this.resizeBar.setMinWidth(r),null!=o&&this.resizeBar.setMaxWidth(o)):console.warn("AG Grid: error processing tool panel component "+t+". You need to specify either 'toolPanel' or 'toolPanelFramework'")},t.prototype.setToolPanelComponent=function(e){var t=this;this.toolPanelCompInstance=e,this.appendChild(e.getGui()),this.addDestroyFunc(function(){t.destroyBean(e)}),this.width&&(this.getGui().style.width=this.width+"px")},t.prototype.getToolPanelInstance=function(){return this.toolPanelCompInstance},t.prototype.setResizerSizerSide=function(e){var t="left"===e,r=this.gridOptionsService.is("enableRtl")?t:!t;this.resizeBar.setInverted(r)},t.prototype.refresh=function(){this.toolPanelCompInstance.refresh()},t.TEMPLATE='<div class="ag-tool-panel-wrapper"/>',__decorate$23([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("userComponentFactory")],t.prototype,"userComponentFactory",void 0),__decorate$23([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"setupResize",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),__extends$2S=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$22=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},SideBarComp=function(e){function t(){var r=e.call(this,t.TEMPLATE)||this;return r.toolPanelWrappers=[],r}return __extends$2S(t,e),t.prototype.postConstruct=function(){var e=this;this.sideBarButtonsComp.addEventListener(SideBarButtonsComp.EVENT_SIDE_BAR_BUTTON_CLICKED,this.onToolPanelButtonClicked.bind(this)),this.setSideBarDef(),this.addManagedPropertyListener("sideBar",function(){e.clearDownUi(),e.setSideBarDef()}),this.gridApi.registerSideBarComp(this),this.createManagedBean(new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ManagedFocusFeature(this.getFocusableElement(),{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this)}))},t.prototype.onTabKeyDown=function(e){if(!e.defaultPrevented){var t=this.focusService,r=this.sideBarButtonsComp,o=this.getGui(),i=r.getGui(),n=this.gridOptionsService.getDocument().activeElement,a=o.querySelector(".ag-tool-panel-wrapper:not(.ag-hidden)"),s=e.target;if(a)if(i.contains(n))t.focusInto(a,e.shiftKey)&&e.preventDefault();else if(e.shiftKey){var l=null;a.contains(n)?l=this.focusService.findNextFocusableElement(a,void 0,!0):t.isTargetUnderManagedComponent(a,s)&&e.shiftKey&&(l=this.focusService.findFocusableElementBeforeTabGuard(a,s)),l||(l=i.querySelector(".ag-selected button")),l&&(e.preventDefault(),l.focus())}}},t.prototype.handleKeyDown=function(e){var t=this.gridOptionsService.getDocument();if(this.sideBarButtonsComp.getGui().contains(t.activeElement)){var r=this.sideBarButtonsComp.getGui(),o=Array.prototype.slice.call(r.querySelectorAll(".ag-side-button")),i=t.activeElement,n=o.findIndex(function(e){return e.contains(i)}),a=null;switch(e.key){case ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.KeyCode.LEFT:case ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.KeyCode.UP:a=Math.max(0,n-1);break;case ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.KeyCode.RIGHT:case ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.KeyCode.DOWN:a=Math.min(n+1,o.length-1)}if(null!==a){var s=o[a].querySelector("button");s&&(s.focus(),e.preventDefault())}}},t.prototype.onToolPanelButtonClicked=function(e){var t=e.toolPanelId;this.openedItem()===t?this.openToolPanel(void 0,"sideBarButtonClicked"):this.openToolPanel(t,"sideBarButtonClicked")},t.prototype.clearDownUi=function(){this.sideBarButtonsComp.clearButtons(),this.destroyToolPanelWrappers()},t.prototype.setSideBarDef=function(){this.setDisplayed(!1);var e=this.gridOptionsService.get("sideBar");if(this.sideBar=SideBarDefParser.parse(e),this.sideBar&&this.sideBar.toolPanels){var t=!this.sideBar.hiddenByDefault;this.setDisplayed(t);var r=this.sideBar.toolPanels;this.sideBarButtonsComp.setToolPanelDefs(r),this.setupToolPanels(r),this.setSideBarPosition(this.sideBar.position),this.sideBar.hiddenByDefault||this.openToolPanel(this.sideBar.defaultToolPanel,"sideBarInitializing")}},t.prototype.getDef=function(){return this.sideBar},t.prototype.setSideBarPosition=function(e){e||(e="right");var t="left"===e,r=t?"right":"left";return this.addOrRemoveCssClass("ag-side-bar-left",t),this.addOrRemoveCssClass("ag-side-bar-right",!t),this.toolPanelWrappers.forEac
2h(function(e){e.setResizerSizerSide(r)}),this},t.prototype.setupToolPanels=function(e){var t=this;e.forEach(function(e){if(null!=e.id){if("agColumnsToolPanel"===e.toolPanel&&!ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleRegistry.assertRegistered(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleNames.ColumnsToolPanelModule,"Column Tool Panel"))return;if("agFiltersToolPanel"===e.toolPanel&&!ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleRegistry.assertRegistered(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleNames.FiltersToolPanelModule,"Filters Tool Panel"))return;var r=new ToolPanelWrapper;t.getContext().createBean(r),r.setToolPanelDef(e),r.setDisplayed(!1),t.getGui().appendChild(r.getGui()),t.toolPanelWrappers.push(r)}else console.warn("AG Grid: please review all your toolPanel components, it seems like at least one of them doesn't have an id")})},t.prototype.refresh=function(){this.toolPanelWrappers.forEach(function(e){return e.refresh()})},t.prototype.openToolPanel=function(e,t){void 0===t&&(t="api");var r=this.openedItem();r!==e&&(this.toolPanelWrappers.forEach(function(t){var r=e===t.getToolPanelId();t.setDisplayed(r)}),r!==this.openedItem()&&(this.sideBarButtonsComp.setActiveButton(e),this.raiseToolPanelVisibleEvent(e,null!=r?r:void 0,t)))},t.prototype.getToolPanelInstance=function(e){var t=this.toolPanelWrappers.filter(function(t){return t.getToolPanelId()===e})[0];if(t)return t.getToolPanelInstance();console.warn("AG Grid: unable to lookup Tool Panel as invalid key supplied: "+e)},t.prototype.raiseToolPanelVisibleEvent=function(e,t,r){var o={type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_TOOL_PANEL_VISIBLE_CHANGED,source:e};if(this.eventService.dispatchEvent(o),t){var i={type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_INTERNAL_TOOL_PANEL_VISIBLE_CHANGED,source:r,key:t,visible:!1};this.eventService.dispatchEvent(i)}if(e){var n={type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_INTERNAL_TOOL_PANEL_VISIBLE_CHANGED,source:r,key:e,visible:!0};this.eventService.dispatchEvent(n)}},t.prototype.close=function(e){void 0===e&&(e="api"),this.openToolPanel(void 0,e)},t.prototype.isToolPanelShowing=function(){return!!this.openedItem()},t.prototype.openedItem=function(){var e=null;return this.toolPanelWrappers.forEach(function(t){t.isDisplayed()&&(e=t.getToolPanelId())}),e},t.prototype.destroyToolPanelWrappers=function(){var e=this;this.toolPanelWrappers.forEach(function(t){ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.removeFromParent(t.getGui()),e.destroyBean(t)}),this.toolPanelWrappers.length=0},t.prototype.destroy=function(){this.destroyToolPanelWrappers(),e.prototype.destroy.call(this)},t.TEMPLATE='<div class="ag-side-bar ag-unselectable">\n            <ag-side-bar-buttons ref="sideBarButtons"></ag-side-bar-buttons>\n        </div>',__decorate$22([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("gridApi")],t.prototype,"gridApi",void 0),__decorate$22([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("focusService")],t.prototype,"focusService",void 0),__decorate$22([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("sideBarButtons")],t.prototype,"sideBarButtonsComp",void 0),__decorate$22([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"postConstruct",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),__extends$2R=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$21=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},ToolPanelColDefService=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isColGroupDef=function(e){return e&&void 0!==e.children},t.getId=function(e){return t.isColGroupDef(e)?e.groupId:e.colId},t}return __extends$2R(t,e),t.prototype.createColumnTree=function(e){var t=this,r=[],o=function(e,i){if(t.isColGroupDef(e)){var n=e,a=void 0!==n.groupId?n.groupId:n.headerName,s=new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ProvidedColumnGroup(n,a,!1,i),l=[];
2return n.children.forEach(function(e){var t=o(e,i+1);t&&l.push(t)}),s.setChildren(l),s}var c=e,u=c.colId?c.colId:c.field,d=t.columnModel.getPrimaryColumn(u);return d||r.push(c),d},i=[];return e.forEach(function(e){var t=o(e,0);t&&i.push(t)}),r.length>0&&console.warn("AG Grid: unable to find grid columns for the supplied colDef(s):",r),i},t.prototype.syncLayoutWithGrid=function(e){var t=this.getLeafPathTrees();e(this.mergeLeafPathTrees(t))},t.prototype.getLeafPathTrees=function(){var e=function(t,r){var o;if(t instanceof ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ProvidedColumnGroup)if(t.isPadding())o=r;else{var i=Object.assign({},t.getColGroupDef());i.groupId=t.getGroupId(),i.children=[r],o=i}else{var n=Object.assign({},t.getColDef());n.colId=t.getColId(),o=n}var a=t.getOriginalParent();return a?e(a,o):o},t=this.columnModel.getAllGridColumns().filter(function(e){var t=e.getColDef();return e.isPrimary()&&!t.showRowGroup});return t.map(function(t){return e(t,t.getColDef())})},t.prototype.mergeLeafPathTrees=function(e){for(var t=this,r=function(e,r){return t.isColGroupDef(e)&&t.isColGroupDef(r)&&t.getId(e)===t.getId(r)},o=function(e,r){if(!t.isColGroupDef(r))return e;var i=e,n=r;return n.children&&n.groupId&&t.addChildrenToGroup(i,n.groupId,n.children[0])||n.children.forEach(function(e){return o(i,e)}),i},i=[],n=1;n<=e.length;n++){var a=e[n-1],s=e[n];r(a,s)?e[n]=o(a,s):i.push(a)}return i},t.prototype.addChildrenToGroup=function(e,t,r){var o=this;if(!this.isColGroupDef(e))return!0;var i=e,n=r;if(function(e,t){var r=e.children.map(o.getId),i=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.includes(r,o.getId(t)),n=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.last(e.children),a=n&&o.getId(n)!==o.getId(t);return i&&a}(i,n))return i.children.push(n),!0;if(i.groupId===t){var a=i.children.map(this.getId);if(!ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.includes(a,this.getId(n)))return i.children.push(n),!0}return i.children.forEach(function(e){return o.addChildrenToGroup(e,t,r)}),!1},__decorate$21([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],t.prototype,"columnModel",void 0),__decorate$21([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Bean)("toolPanelColDefService")],t)}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.BeanStub),VERSION$f="29.2.0",SideBarModule={version:VERSION$f,moduleName:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleNames.SideBarModule,beans:[ToolPanelColDefService],agStackComponents:[{componentName:"AgHorizontalResize",componentClass:HorizontalResizeComp},{componentName:"AgSideBar",componentClass:SideBarComp},{componentName:"AgSideBarButtons",componentClass:SideBarButtonsComp}],dependantModules:[EnterpriseCoreModule]},__decorate$20=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},ModelItemUtils=function(){function e(){}return e.prototype.selectAllChildren=function(e,t,r){var o=this.extractAllLeafColumns(e);this.setAllColumns(o,t,r)},e.prototype.setColumn=function(e,t,r){this.setAllColumns([e],t,r)},e.prototype.setAllColumns=function(e,t,r){this.columnModel.isPivotMode()?this.setAllPivot(e,t,r):this.setAllVisible(e,t,r)},e.prototype.extractAllLeafColumns=function(e){var t=[],r=function(e){e.forEach(function(e){e.isPassesFilter()&&(e.isGroup()?r(e.getChildren()):t.push(e.getColumn()))})};return r(e),t},e.prototype.setAllVisible=function(e,t,r){var o=[];e.forEach(function(e){e.getColDef().lockVisible||e.isVisible()!=t&&o.push({colId:e.getId(),hide:!t})}),o.length>0&&this.columnModel.applyColumnState({state:o},r)},e.prototype.setAllPivot=function(e,t,r){this.gridOptionsService.is("functionsPassive")?this.setAllPivotPassive(e,t):this.setAllPivotActive(e,t,r)},e.prototype.setAllPivotPassive=function(e,t){var r=this.columnModel.getPivotColumns().slice(),o=this.columnModel.getValueColumns().slice(),i=this.columnModel.getRowGroupColumns().slice(),n=!1,a=!1,s=!1,l=t?function(e){e.isAnyFunctionActive()||(e.isAllowValue()?(o.push(e),a=!0):e.isAllowRowGroup()?(i.push(e),n=!0):e.isAllowPivot()&&(r.push(e),s=!0))}:function(e){e.isAnyFunctionActive()&&(r.indexOf(e)>=0&&(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.removeFromArray(r,e),n=!0),o.indexOf(e)>=0&&(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.removeFromArray(o,e),a=!0),i.indexOf(e)>=0&&(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.removeFromArray(i,e),s=!0))};if(e.forEach(l),n){var c={type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_COLUMN_PIVOT_CHANGE_REQUEST,columns:r};this.eventService.dispatchEvent(c)}if(s){var u={type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_COLUMN_ROW_GROUP_CHANGE_REQUEST,columns:i};this.eventService.dispatchEvent(u)}if(a){var d={type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_COLUMN_VALUE_CHANGE_REQUEST,columns:i};this.eventService.dispatchEvent(d)}},e.prototype.setAllPivotActive=function(e,t,r){var o=this,i=[],n=t?function(e){if(!e.isAnyFunctionActive())if(e.isAllowValue()){var t="string"==typeof e.getAggFunc()?e.getAggFunc():o.aggFuncService.getDefaultAggFunc(e);i.push({colId:e.getId(),aggFunc:t})}else e.isAllowRowGroup()?i.push({colId:e.getId(),rowGroup:!0}):e.isAllowPivot()&&i.push({colId:e.getId(),pivot:!0})}:function(e){(e.isPivotActive()||e.isRowGroupActive()||e.isValueActive())&&i.push({colId:e.getId(),pivot:!1,rowGroup:!1,aggFunc:null})};e.forEach(n),i.length>0&&this.columnModel.applyColumnState({state:i},r)},__decorate$20([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("aggFuncService")],e.prototype,"aggFuncService",void 0),__decorate$20([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],e.prototype,"columnModel",void 0),__decorate$20([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("gridOptionsService")],e.prototype,"gridOptionsService",void 0),__decorate$20([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("eventService")],e.prototype,"eventService",void 0),__decorate$20([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Bean)("modelItemUtils")],e)}(),VERSION$e="29.2.0",ColumnsToolPanelModule={version:VERSION$e,moduleName:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleNames.ColumnsToolPanelModule,beans:[ModelItemUtils],agStackComponents:[{componentName:"AgPrimaryColsHeader",componentClass:PrimaryColsHeaderPanel},{componentName:"AgPrimaryColsList",componentClass:PrimaryColsListPanel},{componentName:"AgPrimaryCols",componentClass:PrimaryColsPanel}],userComponents:[{componentName:"agColumnsToolPanel",componentClass:ColumnToolPanel}],dependantModules:[EnterpriseCoreModule,RowGroupingModule,SideBarModule]},workbook={getTemplate:function(){return{name:"Workbook",properties:{prefixedAttributes:[{prefix:"xmlns:",map:{o:"urn:schemas-microsoft-com:office:office",x:"urn:schemas-microsoft-com:office:excel",ss:"urn:schemas-microsoft-com:office:spreadsheet",html:"http://www.w3.org/TR/REC-html40"}}],rawMap:{xmlns:"urn:schemas-microsoft-com:office:spreadsheet"}}}}},excelWorkbook={getTemplate:function(){return{name:"ExcelWorkbook",properties:{rawMap:{xmlns:"urn:schemas-microsoft-com:office:excel"}},children:[{name:"WindowHeight",textNode:"8130"},{name:"WindowWidth",textNode:"15135"},{name:"WindowHeight",textNode:"8130"},{name:"WindowTopX",textNode:"120"},{name:"WindowTopY",textNode:"45"},{name:"ProtectStructure",textNode:"False"},{name:"ProtectWindow",textNode:"False"}]}}},column={getTemplate:function(e){return{name:"Column",properties:{prefixedAttributes:[{prefix:"ss:",map:{Width:e.width}}]}}}},cell={getTemplate:function(e){var t=e.mergeAcross,r=e.styleId,o=e.data,i={};return t&&(i.MergeAcross=t),r&&(i.StyleID=r),{name:"Cell",properties:{prefixedAttributes:[{prefix:"ss:",map:i}]},children:[{name:"Data",properties:{prefixedAttributes:[{prefix:"ss:",map:{Type:null==o?void 0:o.type}}]},textNode:null==o?void 0:o.value}]}}},row={getTemplate:function(e){return{name:"Row",children:e.cells.map(function(e){return cell.getTemplate(e)}
2)}}},worksheet={getTemplate:function(e){var t=e.table,r=e.name,o=t.columns,i=t.rows,n=o.map(function(e){return column.getTemplate(e)}),a=i.map(function(e){return row.getTemplate(e)});return{name:"Worksheet",children:[{name:"Table",children:n.concat(a)}],properties:{prefixedAttributes:[{prefix:"ss:",map:{Name:r}}]}}}},documentProperties={getTemplate:function(){return{name:"DocumentProperties",properties:{rawMap:{xmlns:"urn:schemas-microsoft-com:office:office"}},children:[{name:"Version",textNode:"12.00"}]}}},alignment={getTemplate:function(e){var t=e.alignment;return{name:"Alignment",properties:{prefixedAttributes:[{prefix:"ss:",map:{Vertical:t.vertical,Horizontal:t.horizontal,Indent:t.indent,ReadingOrder:t.readingOrder,Rotate:t.rotate,ShrinkToFit:t.shrinkToFit,VerticalText:t.verticalText,WrapText:t.wrapText}}]}}}},borders={getTemplate:function(e){var t=e.borders;return{name:"Borders",children:[t.borderBottom,t.borderLeft,t.borderRight,t.borderTop].map(function(e,t){return{name:"Border",properties:{prefixedAttributes:[{prefix:"ss:",map:{Position:0==t?"Bottom":1==t?"Left":2==t?"Right":"Top",LineStyle:e.lineStyle,Weight:e.weight,Color:e.color}}]}}})}}},font={getTemplate:function(e){var t=e.font;return{name:"Font",properties:{prefixedAttributes:[{prefix:"ss:",map:{Bold:t.bold,FontName:t.fontName,Italic:t.italic,Color:t.color,Outline:t.outline,Shadow:t.shadow,Size:t.size,StrikeThrough:t.strikeThrough,Underline:t.underline,VerticalAlign:t.verticalAlign}},{prefix:"x:",map:{CharSet:t.charSet,Family:t.family}}]}}}},interior={getTemplate:function(e){var t=e.interior;return{name:"Interior",properties:{prefixedAttributes:[{prefix:"ss:",map:{Color:t.color,Pattern:t.pattern,PatternColor:t.patternColor}}]}}}},protection={getTemplate:function(e){return{name:"Protection",properties:{prefixedAttributes:[{prefix:"ss:",map:{Protected:e.protection.protected,HideFormula:e.protection.hideFormula}}]}}}},numberFormat={getTemplate:function(e){return{name:"NumberFormat",properties:{prefixedAttributes:[{prefix:"ss:",map:{Format:e.numberFormat.format}}]}}}},style={getTemplate:function(e){var t=e.id;return{name:"Style",properties:{prefixedAttributes:[{prefix:"ss:",map:{ID:t,Name:e.name||t}}]}}}},ExcelXmlFactory=function(){function e(){}return e.createExcel=function(e,t){var r=this.excelXmlHeader(),o=documentProperties.getTemplate(),i=excelWorkbook.getTemplate(),n=this.workbook(o,i,e,t);return""+r+ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.XmlFactory.createXml(n,function(e){return e?"1":"0"})},e.workbook=function(e,t,r,o){var i=[e,t,this.stylesXmlElement(r)].concat(worksheet.getTemplate(o));return Object.assign({},workbook.getTemplate(),{children:i})},e.excelXmlHeader=function(){return'<?xml version="1.0" ?>\n        <?mso-application progid="Excel.Sheet" ?>\n        '},e.stylesXmlElement=function(e){var t=this;return{name:"Styles",children:e?e.map(function(e){return t.styleXmlElement(e)}):[]}},e.styleXmlElement=function(e){var t=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.compose(this.addProperty("alignment",e),this.addProperty("borders",e),this.addProperty("font",e),this.addProperty("interior",e),this.addProperty("protection",e),this.addProperty("numberFormat",e))([]);return Object.assign({},style.getTemplate(e),{children:t})},e.addProperty=function(e,t){return function(r){if(!t[e])return r;var o={alignment,borders,font,interior,numberFormat,protection};return r.concat(o[e].getTemplate(t))}},e.factoryMode=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ExcelFactoryMode.SINGLE_SHEET,e}(),INCH_TO_EMU=9525,numberFormatMap={0:1,"0.00":2,"#,##0":3,"#,##0.00":4,"0%":9,"0.00%":10,"0.00E+00":11,"# ?/?":12,"# ??/??":13,"mm-dd-yy":14,"d-mmm-yy":15,"d-mmm":16,"mmm-yy":17,"h:mm AM/PM":18,"h:mm:ss AM/PM":19,"h:mm":20,"h:mm:ss":21,"m/d/yy h:mm":22,"#,##0 ;(#,##0)":37,"#,##0 ;[Red](#,##0)":38,"#,##0.00;(#,##0.00)":39,"#,##0.00;[Red](#,##0.00)":40,"mm:ss":45,"[h]:mm:ss":46,"mmss.0":47,"##0.0E+0":48,"@":49},pixelsToPoint=function(e){return Math.round(72*e/96)},pointsToPixel=function(e){return Math.round(96*e/72)},pixelsToEMU=function(e){return Math.ceil(e*INCH_TO_EMU)},getFontFamilyId=function(e){if(void 0!==e){var t=["Automatic","Roman","Swiss","Modern","Script","Decorative"].indexOf(e||"Automatic");return Math.max(t,0)}},getHeightFromProperty=function(e,t){var r;if(t)return r="number"==typeof t?t:t({rowIndex:e}),pixelsToPoint(r)},setExcelImageTotalWidth=function(e,t){var r=e.position,o=r.colSpan,i=r.column;if(e.width)if(o)for(var n=t.slice(i-1,i+o-1),a=0,s=0;s<n.length;s++){var l=n[s].getActualWidth();if(e.width<a+l){e.position.colSpan=s+1,e.totalWidth=e.width,e.width=e.totalWidth-a;break}a+=l}else e.totalWidth=e.width},setExcelImageTotalHeight=function(e,t){var r=e.position,o=r.rowSpan,i=r.row;if(e.height)if(o)for(var n=0,a=0,s=i;s<i+o;s++){var l=pointsToPixel(getHeightFromProperty(s,t)||20);if(e.height<n+l){e.position.rowSpan=a+1,e.totalHeight=e.height,e.height=e.totalHeight-n;break}n+=l,a++}else e.totalHeight=e.height},createXmlPart=function(e){return""+ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.XmlFactory.createHeader({encoding:"UTF-8",standalone:"yes"})+ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.XmlFactory.createXml(e)},getExcelColumnName=function(e){var t=String.fromCharCode,r=Math.floor(e/26),o=e%26;return r&&26!==e?o?r<26?t(65+r-1)+t(65+o-1):getExcelColumnName(r)+t(65+o-1):getExcelColumnName(r-1)+"Z":t(65+e-1)},__extends$2Q=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__assign$K=function(){return __assign$K=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$K.apply(this,arguments)},__read$14=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},__spread$E=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read$14(arguments[t]));return e},BaseExcelSerializingSession=function(e){function t(t){var r=e.call(this,t)||this;return r.mixedStyles={},r.mixedStyleCounter=0,r.rows=[],r.config=Object.assign({},t),r.stylesByIds={}
vendor: 7,541 bytes, line 2
2,r.config.baseExcelStyles.forEach(function(e){r.stylesByIds[e.id]=e}),r.excelStyles=__spread$E(r.config.baseExcelStyles),r}return __extends$2Q(t,e),t.prototype.addCustomContent=function(e){var t=this;e.forEach(function(e){var r=t.rows.length+1,o={height:getHeightFromProperty(r,e.height||t.config.rowHeight),cells:(e.cells||[]).map(function(e,o){var i,n=t.addImage(r,t.columnsToExport[o],null===(i=e.data)||void 0===i?void 0:i.value),a=__assign$K({},e);return n&&(a.data={},null!=n.value?a.data.value=n.value:(a.data.type="e",a.data.value=null)),a}),outlineLevel:e.outlineLevel||void 0};null!=e.collapsed&&(o.collapsed=e.collapsed),null!=e.hidden&&(o.hidden=e.hidden),t.rows.push(o)})},t.prototype.onNewHeaderGroupingRow=function(){var e=this,t=[];return this.rows.push({cells:t,height:getHeightFromProperty(this.rows.length+1,this.config.headerRowHeight)}),{onColumn:function(r,o,i,n,a){var s=e.config.styleLinker({rowType:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RowType.HEADER_GROUPING,rowIndex:1,value:"grouping-"+o,columnGroup:r});t.push(__assign$K(__assign$K({},e.createMergedCell(e.getStyleId(s),e.getDataTypeForValue("string"),o,n)),{collapsibleRanges:a}))}}},t.prototype.onNewHeaderRow=function(){return this.onNewRow(this.onNewHeaderColumn,this.config.headerRowHeight)},t.prototype.onNewBodyRow=function(){return this.onNewRow(this.onNewBodyColumn,this.config.rowHeight)},t.prototype.prepare=function(t){var r=this;e.prototype.prepare.call(this,t),this.columnsToExport=__spread$E(t),this.cols=t.map(function(e,t){return r.convertColumnToExcel(e,t)})},t.prototype.parse=function(){for(var e=this.rows.reduce(function(e,t){return Math.max(e,t.cells.length)},0);this.cols.length<e;)this.cols.push(this.convertColumnToExcel(null,this.cols.length+1));var t={name:this.config.sheetName,table:{columns:this.cols,rows:this.rows}};return this.createExcel(t)},t.prototype.isFormula=function(e){return null!=e&&this.config.autoConvertFormulas&&e.toString().startsWith("=")},t.prototype.isNumerical=function(e){return isFinite(e)&&""!==e&&!isNaN(parseFloat(e))},t.prototype.getStyleById=function(e){return null==e?null:this.stylesByIds[e]||null},t.prototype.convertColumnToExcel=function(e,t){var r=this.config.columnWidth;return r?"number"==typeof r?{width:r}:{width:r({column:e,index:t})}:e?{width:Math.max(e.getActualWidth(),75)}:{}},t.prototype.onNewHeaderColumn=function(e,t){var r=this;return function(o,i){var n=r.extractHeaderValue(o),a=r.config.styleLinker({rowType:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RowType.HEADER,rowIndex:e,value:n,column:o});t.push(r.createCell(r.getStyleId(a),r.getDataTypeForValue("string"),n))}},t.prototype.onNewRow=function(e,t){var r=[];return this.rows.push({cells:r,height:getHeightFromProperty(this.rows.length+1,t)}),{onColumn:e.bind(this,this.rows.length,r)()}},t.prototype.onNewBodyColumn=function(e,t){var r=this,o=0;return function(i,n,a){if(o>0)o-=1;else{if(!r.config.gridOptionsService.is("groupHideOpenParents")&&null!=a.level){var s=a.footer?1:0;ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.last(r.rows).outlineLevel=a.level+s}var l=r.extractRowCellValue(i,n,e,"excel",a),c=r.config.styleLinker({rowType:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RowType.BODY,rowIndex:e,value:l,column:i,node:a}),u=r.getStyleId(c),d=i.getColSpan(a),p=r.addImage(e,i,l);p?t.push(r.createCell(u,r.getDataTypeForValue(p.value),null==p.value?"":p.value)):d>1?(o=d-1,t.push(r.createMergedCell(u,r.getDataTypeForValue(l),l,d-1))):t.push(r.createCell(u,r.getDataTypeForValue(l),l))}}},t.prototype.getStyleId=function(e){if(!e||!e.length)return null;if(1===e.length)return e[0];var t=e.join("-");return this.mixedStyles[t]||this.addNewMixedStyle(e),this.mixedStyles[t].excelID},t.prototype.addNewMixedStyle=function(e){var t=this;this.mixedStyleCounter+=1;var r="mixedStyle"+this.mixedStyleCounter,o={};e.forEach(function(e){t.excelStyles.forEach(function(t){t.id===e&&ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.mergeDeep(o,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.deepCloneObject(t))})}),o.id=r,o.name=r;var i=e.join("-");this.mixedStyles[i]={excelID:r,key:i,result:o},this.excelStyles.push(o),this.stylesByIds[r]=o},t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.BaseGridSerializingSession),__extends$2P=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),ExcelXmlSerializingSession=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$2P(t,e),t.prototype.createExcel=function(e){return ExcelXmlFactory.createExcel(this.excelStyles,e)},t.prototype.getDataTypeForValue=function(e){return this.isNumerical(e)?"Number":"String"},t.prototype.getType=function(e,t,r){if(this.isFormula(r))return"Formula";if(t&&t.dataType)switch(t.dataType.toLocaleLowerCase()){case"string":return"Formula";case"number":return"Number";case"datetime":return"DateTime";case"error":return"Error";case"boolean":return"Boolean";default:console.warn("AG Grid: Unrecognized data type for excel export ["+t.id+".dataType="+t.dataType+"]")}return e},t.prototype.addImage=function(){},t.prototype.createCell=function(e,t,r){var o=this.getStyleById(e),i=this.getType(t,o,r)||t;return{styleId:o?e:void 0,data:{type:i,value:this.getValueTransformed(i,r)}}},t.prototype.getValueTransformed=function(e,t){var r,o=this;switch(e){case"String":return function(e){if(o.config.suppressTextAsCDATA)return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.escapeString(e);var t="<![CDATA[",r="]]>",i=new RegExp(r,"g");return t+String(e).replace(i,"]]"+r+t+">")+r}(t);case"Number":return Number(t).valueOf()+"";case"Boolean":return(r=t)&&"0"!==r&&"false"!==r?"1":"0";default:return t}},t.prototype.createMergedCell=function(e,t,r,o){return{styleId:this.getStyleById(e)?e:void 0,data:{type:t,value:r},mergeAcross:o}},t}(BaseExcelSerializingSession),coreFactory={getTemplate:function(e){var t=(new Date).toJSON();return{name:"cp:coreProperties",properties:{prefixedAttributes:[{prefix:"xmlns:",map:{cp:"http://schemas.openxmlformats.org/package/2006/metadata/core-properties",dc:"http://purl.org/dc/elements/1.1/",dcterms:"http://purl.org/dc/terms/",dcmitype:"http://purl.org/dc/dcmitype/",xsi:"http://www.w3.org/2001/XMLSchema-instance"}}]},children:[{name:"dc:creator",textNode:e},{name:"dc:title",textNode:"Workbook"},{name:"dcterms:created",properties:{rawMap:{"xsi:type":"dcterms:W3CDTF"}},textNode:t},{name:"dcterms:modified",properties:{rawMap:{"xsi:type":"dcterms:W3CDTF"}},textNode:t}]}}},contentTypeFactory={getTemplate:function(e){var t=e.name,r=e.ContentType;return{name:t,properties:{rawMap:{Extension:e.Extension,PartName:e.PartName,ContentType:r}}}}},__read$13=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},__spread$D=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read$13(arguments[t]));return e},contentTypesFactory={getTemplate:function(e){var t=new Array(e).fill(void 0).map(function(e,t){return{name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml",PartName:"/xl/wor
2ksheets/sheet"+(t+1)+".xml"}}),r=ExcelXlsxFactory.worksheetImages.size,o={};ExcelXlsxFactory.workbookImageIds.forEach(function(e){o[e.type]=!0});var i=new Array(r).fill(void 0).map(function(e,t){return{name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.drawing+xml",PartName:"/xl/drawings/drawing"+(t+1)+".xml"}}),n=Object.keys(o).map(function(e){return{name:"Default",ContentType:"image/"+e,Extension:e}});return{name:"Types",properties:{rawMap:{xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"}},children:__spread$D(n,[{name:"Default",Extension:"rels",ContentType:"application/vnd.openxmlformats-package.relationships+xml"},{name:"Default",ContentType:"application/xml",Extension:"xml"},{name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml",PartName:"/xl/workbook.xml"}],t,[{name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.theme+xml",PartName:"/xl/theme/theme1.xml"},{name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml",PartName:"/xl/styles.xml"},{name:"Override",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml",PartName:"/xl/sharedStrings.xml"}],i,[{name:"Override",ContentType:"application/vnd.openxmlformats-package.core-properties+xml",PartName:"/docProps/core.xml"}]).map(function(e){return contentTypeFactory.getTemplate(e)})}}},getAnchor=function(e,t){return{name:"xdr:"+e,children:[{name:"xdr:col",textNode:t.col.toString()},{name:"xdr:colOff",textNode:t.offsetX.toString()},{name:"xdr:row",textNode:t.row.toString()},{name:"xdr:rowOff",textNode:t.offsetY.toString()}]}},getExt=function(e){var t=[{name:"a:ext",properties:{rawMap:{uri:"{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}"}},children:[{name:"a16:creationId",properties:{rawMap:{id:"{822E6D20-D7BC-2841-A643-D49A6EF008A2}","xmlns:a16":"http://schemas.microsoft.com/office/drawing/2014/main"}}}]}];switch(e.recolor&&e.recolor.toLowerCase()){case"grayscale":case"sepia":case"washout":t.push({name:"a:ext",properties:{rawMap:{uri:"{C183D7F6-B498-43B3-948B-1728B52AA6E4}"}},children:[{name:"adec:decorative",properties:{rawMap:{val:"0","xmlns:adec":"http://schemas.microsoft.com/office/drawing/2017/decorative"}}}]})}return{name:"a:extLst",children:t}},getNvPicPr=function(e,t){return{name:"xdr:nvPicPr",children:[{name:"xdr:cNvPr",properties:{rawMap:{id:t,name:e.id,descr:null!=e.altText?e.altText:void 0}},children:[getExt(e)]},{name:"xdr:cNvPicPr",properties:{rawMap:{preferRelativeResize:"0"}},children:[{name:"a:picLocks"}]}]}},getColorDetails=function(e){if(e.saturation||e.tint){var t=[];return e.saturation&&t.push({name:"a:satMod",properties:{rawMap:{val:1e3*e.saturation}}}),e.tint&&t.push({name:"a:tint",properties:{rawMap:{val:1e3*e.tint}}}),t}},getDuoTone=function(e,t){return{name:"a:duotone",children:[{name:"a:prstClr",properties:{rawMap:{val:e.color}},children:getColorDetails(e)},{name:"a:srgbClr",properties:{rawMap:{val:t.color}},children:getColorDetails(t)}]}},getBlipFill=function(e,t){var r;if(e.transparency){var o=Math.min(Math.max(e.transparency,0),100);r=[{name:"a:alphaModFix",properties:{rawMap:{amt:1e5-Math.round(1e3*o)}}}]}if(e.recolor)switch(r||(r=[]),e.recolor.toLocaleLowerCase()){case"grayscale":r.push({name:"a:grayscl"});break;case"sepia":r.push(getDuoTone({color:"black"},{color:"D9C3A5",tint:50,saturation:180}));break;case"washout":r.push({name:"a:lum",properties:{rawMap:{bright:"70000",contrast:"-70000"}}})}return{name:"xdr:blipFill",children:[{name:"a:blip",properties:{rawMap:{cstate:"print","r:embed":"rId"+t,"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships"}},children:r},{name:"a:stretch",children:[{name:"a:fillRect"}]}]}},getSpPr=function(e,t){var r={name:"a:xfrm",children:[{name:"a:off",properties:{rawMap:{x:0,y:0}}},{name:"a:ext",properties:{rawMap:{cx:t.width,cy:t.height}}}]};if(e.rotation){var o=e.rotation;r.properties={rawMap:{rot:6e4*Math.min(Math.max(o,0),360)}}}return{name:"xdr:spPr",children:[r,{name:"a:prstGeom",properties:{rawMap:{prst:"rect"}},children:[{name:"a:avLst"}]}]}},getImageBoxSize=function(e){e.fitCell=!!e.fitCell||!e.width||!e.height;var t=e.position,r=void 0===t?{}:t,o=e.fitCell,i=e.width,n=void 0===i?0:i,a=e.height,s=void 0===a?0:a,l=e.totalHeight,c=e.totalWidth,u=r.offsetX,d=void 0===u?0:u,p=r.offsetY,h=void 0===p?0:p,_=r.row,f=void 0===_?1:_,g=r.rowSpan,y=void 0===g?1:g,m=r.column,v=void 0===m?1:m,E=r.colSpan,C=void 0===E?1:E;return{from:{row:f-1,col:v-1,offsetX:pixelsToEMU(d),offsetY:pixelsToEMU(h)},to:{row:f-1+(o?1:y-1),col:v-1+(o?1:C-1),offsetX:pixelsToEMU(n+d),offsetY:pixelsToEMU(s+h)},height:pixelsToEMU(l||s),width:pixelsToEMU(c||n)}},getPicture=function(e,t,r,o){return{name:"xdr:pic",children:[getNvPicPr(e,t+1),getBlipFill(e,r+1),getSpPr(e,o)]}},drawingFactory={getTemplate:function(e){var t=e.sheetIndex,r=ExcelXlsxFactory.worksheetImages.get(t),o=ExcelXlsxFactory.worksheetImageIds.get(t);return{name:"xdr:wsDr",properties:{rawMap:{"xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main","xmlns:xdr":"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing"}},children:r.map(function(e,t){var r=getImageBoxSize(e);return{name:"xdr:twoCellAnchor",properties:{rawMap:{editAs:"absolute"}},children:[getAnchor("from",r.from),getAnchor("to",r.to),getPicture
vendor: 4,924 bytes, line 2
2(e,t,o.get(e.id).index,r),{name:"xdr:clientData"}]}})}}},__read$12=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},getColorChildren=function(e){var t=__read$12(e,4);return{name:"a:"+t[0],children:[{name:"a:"+t[1],properties:{rawMap:{val:t[2],lastClr:t[3]}}}]}},colorScheme={getTemplate:function(){return{name:"a:clrScheme",properties:{rawMap:{name:"Office"}},children:[getColorChildren(["dk1","sysClr","windowText","000000"]),getColorChildren(["lt1","sysClr","window","FFFFFF"]),getColorChildren(["dk2","srgbClr","44546A"]),getColorChildren(["lt2","srgbClr","E7E6E6"]),getColorChildren(["accent1","srgbClr","4472C4"]),getColorChildren(["accent2","srgbClr","ED7D31"]),getColorChildren(["accent3","srgbClr","A5A5A5"]),getColorChildren(["accent4","srgbClr","FFC000"]),getColorChildren(["accent5","srgbClr","5B9BD5"]),getColorChildren(["accent6","srgbClr","70AD47"]),getColorChildren(["hlink","srgbClr","0563C1"]),getColorChildren(["folHlink","srgbClr","954F72"])]}}},__read$11=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},getFont$1=function(e){var t=__read$11(e,4),r=t[0],o=t[1];return{name:"a:"+r,properties:{rawMap:{script:t[2],typeface:o,panose:t[3]}}}},fontScheme={getTemplate:function(){var e=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.utf8_encode;return{name:"a:fontScheme",properties:{rawMap:{name:"Office"}},children:[{name:"a:majorFont",children:[getFont$1(["latin","Calibri Light",void 0,"020F0302020204030204"]),getFont$1(["ea",""]),getFont$1(["cs",""]),getFont$1(["font",e("游ゴシック Light"),"Jpan"]),getFont$1(["font",e("맑은 고딕"),"Hang"]),getFont$1(["font",e("等线 Light"),"Hans"]),getFont$1(["font",e("新細明體"),"Hant"]),getFont$1(["font","Times New Roman","Arab"]),getFont$1(["font","Times New Roman","Hebr"]),getFont$1(["font","Tahoma","Thai"]),getFont$1(["font","Nyala","Ethi"]),getFont$1(["font","Vrinda","Beng"]),getFont$1(["font","Shruti","Gujr"]),getFont$1(["font","MoolBoran","Khmr"]),getFont$1(["font","Tunga","Knda"]),getFont$1(["font","Raavi","Guru"]),getFont$1(["font","Euphemia","Cans"]),getFont$1(["font","Plantagenet Cherokee","Cher"]),getFont$1(["font","Microsoft Yi Baiti","Yiii"]),getFont$1(["font","Microsoft Himalaya","Tibt"]),getFont$1(["font","MV Boli","Thaa"]),getFont$1(["font","Mangal","Deva"]),getFont$1(["font","Gautami","Telu"]),getFont$1(["font","Latha","Taml"]),getFont$1(["font","Estrangelo Edessa","Syrc"]),getFont$1(["font","Kalinga","Orya"]),getFont$1(["font","Kartika","Mlym"]),getFont$1(["font","DokChampa","Laoo"]),getFont$1(["font","Iskoola Pota","Sinh"]),getFont$1(["font","Mongolian Baiti","Mong"]),getFont$1(["font","Times New Roman","Viet"]),getFont$1(["font","Microsoft Uighur","Uigh"]),getFont$1(["font","Sylfaen","Geor"]),getFont$1(["font","Arial","Armn"]),getFont$1(["font","Leelawadee UI","Bugi"]),getFont$1(["font","Microsoft JhengHei","Bopo"]),getFont$1(["font","Javanese Text","Java"]),getFont$1(["font","Segoe UI","Lisu"]),getFont$1(["font","Myanmar Text","Mymr"]),getFont$1(["font","Ebrima","Nkoo"]),getFont$1(["font","Nirmala UI","Olck"]),getFont$1(["font","Ebrima","Osma"]),getFont$1(["font","Phagspa","Phag"]),getFont$1(["font","Estrangelo Edessa","Syrn"]),getFont$1(["font","Estrangelo Edessa","Syrj"]),getFont$1(["font","Estrangelo Edessa","Syre"]),getFont$1(["font","Nirmala UI","Sora"]),getFont$1(["font","Microsoft Tai Le","Tale"]),getFont$1(["font","Microsoft New Tai Lue","Talu"]),getFont$1(["font","Ebrima","Tfng"])]},{name:"a:minorFont",children:[getFont$1(["latin","Calibri",void 0,"020F0502020204030204"]),getFont$1(["ea",""]),getFont$1(["cs",""]),getFont$1(["font",e("游ゴシック"),"Jpan"]),getFont$1(["font",e("맑은 고딕"),"Hang"]),getFont$1(["font",e("等线"),"Hans"]),getFont$1(["font",e("新細明體"),"Hant"]),getFont$1(["font","Arial","Arab"]),getFont$1(["font","Arial","Hebr"]),getFont$1(["font","Tahoma","Thai"]),getFont$1(["font","Nyala","Ethi"]),getFont$1(["font","Vrinda","Beng"]),getFont$1(["font","Shruti","Gujr"]),getFont$1(["font","DaunPenh","Khmr"]),getFont$1(["font","Tunga","Knda"]),getFont$1(["font","Raavi","Guru"]),getFont$1(["font","Euphemia","Cans"]),getFont$1(["font","Plantagenet Cherokee","Cher"]),getFont$1(["font","Microsoft Yi Baiti","Yiii"]),getFont$1(["font","Microsoft Himalaya","Tibt"]),getFont$1(["font","MV Boli","Thaa"]),getFont$1(["font","Mangal","Deva"]),getFont$1(["font","Gautami","Telu"]),getFont$1(["font","Latha","Taml"]),getFont$1(["font","Estrangelo Edessa","Syrc"]),getFont$1(["font","Kalinga","Or
2ya"]),getFont$1(["font","Kartika","Mlym"]),getFont$1(["font","DokChampa","Laoo"]),getFont$1(["font","Iskoola Pota","Sinh"]),getFont$1(["font","Mongolian Baiti","Mong"]),getFont$1(["font","Arial","Viet"]),getFont$1(["font","Microsoft Uighur","Uigh"]),getFont$1(["font","Sylfaen","Geor"]),getFont$1(["font","Arial","Armn"]),getFont$1(["font","Leelawadee UI","Bugi"]),getFont$1(["font","Microsoft JhengHei","Bopo"]),getFont$1(["font","Javanese Text","Java"]),getFont$1(["font","Segoe UI","Lisu"]),getFont$1(["font","Myanmar Text","Mymr"]),getFont$1(["font","Ebrima","Nkoo"]),getFont$1(["font","Nirmala UI","Olck"]),getFont$1(["font","Ebrima","Osma"]),getFont$1(["font","Phagspa","Phag"]),getFont$1(["font","Estrangelo Edessa","Syrn"]),getFont$1(["font","Estrangelo Edessa","Syrj"]),getFont$1(["font","Estrangelo Edessa","Syre"]),getFont$1(["font","Nirmala UI","Sora"]),getFont$1(["font","Microsoft Tai Le","Tale"]),getFont$1(["font","Microsoft New Tai Lue","Talu"]),getFont$1(["font","Ebrima","Tfng"])]}]}}},__read$10=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},getPropertyVal=function(e,t,r){return{name:"a:"+e,properties:{rawMap:{val:t}},children:r}},getGs=function(e){var t=__read$10(e,6),r=t[0],o=t[1],i=t[2],n=t[3],a=t[4],s=t[5],l=[];return l.push(getPropertyVal("satMod",i)),n&&l.push(getPropertyVal("lumMod",n)),a&&l.push(getPropertyVal("tint",a)),s&&l.push(getPropertyVal("shade",s)),{name:"a:gs",properties:{rawMap:{pos:r}},children:[{name:"a:schemeClr",properties:{rawMap:{val:o}},children:l}]}},getSolidFill=function(e,t){return{name:"a:solidFill",children:[getPropertyVal("schemeClr",e,t)]}},getGradFill=function(e){var t=__read$10(e,5),r=t[0],o=t[1],i=t[2],n=t[3],a=t[4],s=__read$10(a,2),l=s[0],c=s[1];return{name:"a:gradFill",properties:{rawMap:{rotWithShape:r}},children:[{name:"a:gsLst",children:[getGs(o),getGs(i),getGs(n)]},{name:"a:lin",properties:{rawMap:{ang:l,scaled:c}}}]}},getLine=function(e){var t=__read$10(e,4);return{name:"a:ln",properties:{rawMap:{w:t[0],cap:t[1],cmpd:t[2],algn:t[3]}},children:[getSolidFill("phClr"),getPropertyVal("prstDash","solid"),{name:"a:miter",properties:{rawMap:{lim:"800000"}}}]}},getEffectStyle=function(e){var t=[];if(e){var r=__read$10(e,5),o=r[0],i=r[1],n=r[2],a=r[3],s=r[4];t.push({name:"a:outerShdw",properties:{rawMap:{blurRad:o,dist:i,dir:n,algn:a,rotWithShape:s}},children:[getPropertyVal("srgbClr","000000",[getPropertyVal("alpha","63000")])]})}return{name:"a:effectStyle",children:[Object.assign({},{name:"a:effectLst"},t.length?{children:t}:{})]}},getFillStyleList=function(){return{name:"a:fillStyleLst",children:[getSolidFill("phClr"),getGradFill(["1",["0","phClr","105000","110000","67000"],["50000","phClr","103000","105000","73000"],["100000","phClr","109000","105000","81000"],["5400000","0"]]),getGradFill(["1",["0","phClr","103000","102000","94000"],["50000","phClr","110000","100000",void 0,"100000"],["100000","phClr","120000","99000",void 0,"78000"],["5400000","0"]])]}},getLineStyleList=function(){return{name:"a:lnStyleLst",children:[getLine(["6350","flat","sng","ctr"]),getLine(["12700","flat","sng","ctr"]),getLine(["19050","flat","sng","ctr"])]}},getEffectStyleList=function(){return{name:"a:effectStyleLst",children:[getEffectStyle(),getEffectStyle(),getEffectStyle(["57150","19050","5400000","ctr","0"])]}},getBgFillStyleList=function(){return{name:"a:bgFillStyleLst",children:[getSolidFill("phClr"),getSolidFill("phClr",[getPropertyVal("tint","95000"),getPropertyVal("satMod","170000")]),getGradFill(["1",["0","phClr","150000","102000","93000","98000"],["50000","phClr","130000","103000","98000","90000"],["100000","phClr","120000",void 0,void 0,"63000"],["5400000","0"]])]}},formatScheme={getTemplate:function(){return{name:"a:fmtScheme",properties:{rawMap:{name:"Office"}},children:[getFillStyleList(),getLineStyleList(),getEffectStyleList(),getBgFillStyleList()]}}},themeElements={getTemplate:function(){return{name:"a:themeElements",children:[colorScheme.getTemplate(),fontScheme.getTemplate(),formatScheme.getTemplate()]}}},officeTheme={getTemplate:function(){return{name:"a:theme",properties:{prefixedAttributes:[{prefix:"xmlns:",map:{a:"http://schemas.openxmlformats.org/drawingml/2006/main"}}],rawMap:{name:"Office Theme"}},children:[themeElements.getTemplate(),{name:"a:objectDefaults"},{name:"a:extraClrSchemeLst"}]}}},buildSharedString=function(e){var t=[];return e.forEach(function(e,r){var o=r.toString(),i={name:"t",textNode:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.utf8_encode(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.escapeString(o))};o.trim().length!==o.length&&(i.properties={rawMap:{"xml:space":"preserve"}}),t.push({name:"si",children:[i]})}),t},sharedStrings={getTemplate:function(e){return{name:"sst",properties:{rawMap:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main",count:e.size,uniqueCount:e.size}},children:buildSharedString(e)}}},numberFormatFactory={getTemplate:function(e){return{name:"numFmt",properties:{rawMap:{formatCode:e.formatCode,numFmtId:e.numFmtId}}}}},numberFormatsFactory={getTemplate:function(e){return{name:"numFmts",properties:{rawMap:{count:e.length}},children:e.map(function(e){return numberFormatFactory.getTemplate(e)}
vendor: 4,124 bytes, line 2
2)}}},fontFactory={getTemplate:function(e){var t=e.size,r=e.colorTheme,o=e.color,i=void 0===o?"FF000000":o,n=e.fontName,a=void 0===n?"Calibri":n,s=e.family,l=e.scheme,c=e.italic,u=e.bold,d=e.strikeThrough,p=e.outline,h=e.shadow,_=e.underline,f=e.verticalAlign,g=[{name:"sz",properties:{rawMap:{val:t}}},{name:"color",properties:{rawMap:{theme:r,rgb:i}}},{name:"name",properties:{rawMap:{val:a}}}];return s&&g.push({name:"family",properties:{rawMap:{val:s}}}),l&&g.push({name:"scheme",properties:{rawMap:{val:l}}}),c&&g.push({name:"i"}),u&&g.push({name:"b"}),d&&g.push({name:"strike"}),p&&g.push({name:"outline"}),h&&g.push({name:"shadow"}),_&&g.push({name:"u",properties:{rawMap:{val:_}}}),f&&g.push({name:"vertAlign",properties:{rawMap:{val:f}}}),{name:"font",children:g}}},fontsFactory={getTemplate:function(e){return{name:"fonts",properties:{rawMap:{count:e.length}},children:e.map(function(e){return fontFactory.getTemplate(e)})}}},fillFactory={getTemplate:function(e){var t=e.patternType,r=e.fgTheme,o=e.fgTint,i=e.fgRgb,n=e.bgRgb,a=e.bgIndexed,s={name:"patternFill",properties:{rawMap:{patternType:t}}};return(r||o||i)&&(s.children=[{name:"fgColor",properties:{rawMap:{theme:r,tint:o,rgb:i}}}]),(a||n)&&(s.children||(s.children=[]),s.children.push({name:"bgColor",properties:{rawMap:{indexed:a,rgb:n}}})),{name:"fill",children:[s]}}},fillsFactory={getTemplate:function(e){return{name:"fills",properties:{rawMap:{count:e.length}},children:e.map(function(e){return fillFactory.getTemplate(e)})}}},getWeightName=function(e){switch(e){case 1:return"thin";case 2:return"medium";case 3:return"thick";default:return"hair"}},mappedBorderNames={None:"None",Dot:"Dotted",Dash:"Dashed",Double:"Double",DashDot:"DashDot",DashDotDot:"DashDotDot",SlantDashDot:"SlantDashDot"},mediumBorders=["Dashed","DashDot","DashDotDot"],colorMap={None:"none",Solid:"solid",Gray50:"mediumGray",Gray75:"darkGray",Gray25:"lightGray",HorzStripe:"darkHorizontal",VertStripe:"darkVertical",ReverseDiagStripe:"darkDown",DiagStripe:"darkUp",DiagCross:"darkGrid",ThickDiagCross:"darkTrellis",ThinHorzStripe:"lightHorizontal",ThinVertStripe:"lightVertical",ThinReverseDiagStripe:"lightDown",ThinDiagStripe:"lightUp",ThinHorzCross:"lightGrid",ThinDiagCross:"lightTrellis",Gray125:"gray125",Gray0625:"gray0625"},horizontalAlignmentMap={Automatic:"general",Left:"left",Center:"center",Right:"right",Fill:"fill",Justify:"justify",CenterAcrossSelection:"centerContinuous",Distributed:"distributed",JustifyDistributed:"justify"},verticalAlignmentMap={Automatic:void 0,Top:"top",Bottom:"bottom",Center:"center",Justify:"justify",Distributed:"distributed",JustifyDistributed:"justify"},convertLegacyPattern=function(e){return e?colorMap[e]||e:"none"},convertLegacyColor=function(e){return null==e?e:("#"===e.charAt(0)&&(e=e.substr(1)),6===e.length?"FF"+e:e)},convertLegacyBorder=function(e,t){if(!e)return"thin";var r=getWeightName(t),o=mappedBorderNames[e];return"Continuous"===e?r:"medium"===r&&-1!==mediumBorders.indexOf(o)?"medium"+o:o.charAt(0).toLowerCase()+o.substr(1)},convertLegacyHorizontalAlignment=function(e){return horizontalAlignmentMap[e]||"general"},convertLegacyVerticalAlignment=function(e){return verticalAlignmentMap[e]||void 0},getBorderColor=function(e){return{name:"color",properties:{rawMap:{rgb:convertLegacyColor(e||"#000000")}}}},borderFactory$1={getTemplate:function(e){var t=e.left,r=e.right,o=e.top,i=e.bottom,n=e.diagonal,a=t?[getBorderColor(t.color)]:void 0,s=r?[getBorderColor(r.color)]:void 0,l=o?[getBorderColor(o.color)]:void 0,c=i?[getBorderColor(i.color)]:void 0,u=n?[getBorderColor(n.color)]:void 0;return{name:"border",children:[{name:"left",properties:{rawMap:{style:t&&t.style}},children:a},{name:"right",properties:{rawMap:{style:r&&r.style}},children:s},{name:"top",properties:{rawMap:{style:o&&o.style}},children:l},{name:"bottom",properties:{rawMap:{style:i&&i.style}},children:c},{name:"diagonal",properties:{rawMap:{style:n&&n.style}},children:u}]}}},bordersFactory={getTemplate:function(e){return{name:"borders",properties:{rawMap:{count:e.length}},children:e.map(function(e){return borderFactory$1.getTemplate(e)}
2)}}},getReadingOrderId=function(e){var t=["Context","LeftToRight","RightToLeft"].indexOf(e);return Math.max(t,0)},alignmentFactory={getTemplate:function(e){var t=e.horizontal,r=e.indent,o=e.readingOrder,i=e.rotate,n=e.shrinkToFit,a=e.vertical,s=e.wrapText;return{name:"alignment",properties:{rawMap:{horizontal:t&&convertLegacyHorizontalAlignment(t),indent:r,readingOrder:o&&getReadingOrderId(o),textRotation:i,shrinkToFit:n,vertical:a&&convertLegacyVerticalAlignment(a),wrapText:s}}}}},protectionFactory={getTemplate:function(e){var t=!1===e.protected?0:1;return{name:"protection",properties:{rawMap:{hidden:!0===e.hideFormula?1:0,locked:t}}}}},xfFactory={getTemplate:function(e){var t=e.alignment,r=e.borderId,o=e.fillId,i=e.fontId,n=e.numFmtId,a=e.protection,s=e.xfId,l=[];return t&&l.push(alignmentFactory.getTemplate(t)),a&&l.push(protectionFactory.getTemplate(a)),{name:"xf",properties:{rawMap:{applyAlignment:t?1:void 0,applyProtection:a?1:void 0,applyBorder:r?1:void 0,applyFill:o?1:void 0,borderId:r,fillId:o,applyFont:i?1:void 0,fontId:i,applyNumberFormat:n?1:void 0,numFmtId:n,xfId:s}},children:l.length?l:void 0}}},cellStylesXfsFactory={getTemplate:function(e){return{name:"cellStyleXfs",properties:{rawMap:{count:e.length}},children:e.map(function(e){return xfFactory.getTemplate(e)})}}},cellXfsFactory={getTemplate:function(e){return{name:"cellXfs",properties:{rawMap:{count:e.length}},children:e.map(function(e){return xfFactory.getTemplate(e)})}}},borderFactory={getTemplate:function(e){return{name:"cellStyle",properties:{rawMap:{builtinId:e.builtinId,name:e.name,xfId:e.xfId}}}}},cellStylesFactory={getTemplate:function(e){return{name:"cellStyles",properties:{rawMap:{count:e.length}},children:e.map(function(e){return borderFactory.getTemplate(e)})}}},__assign$J=function(){return __assign$J=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$J.apply(this,arguments)},stylesMap,registeredNumberFmts,registeredFonts,registeredFills,registeredBorders,registeredCellStyleXfs,registeredCellXfs,registeredCellStyles,currentSheet,getStyleName=function(e,t){return-1!==e.indexOf("mixedStyle")&&t>1&&(e+="_"+t),e},resetStylesheetValues=function(){stylesMap={base:0},registeredNumberFmts=[],registeredFonts=[{fontName:"Calibri",colorTheme:"1",family:"2",scheme:"minor"}],registeredFills=[{patternType:"none"},{patternType:"gray125"}],registeredBorders=[{left:void 0,right:void 0,top:void 0,bottom:void 0,diagonal:void 0}],registeredCellStyleXfs=[{borderId:0,fillId:0,fontId:0,numFmtId:0}],registeredCellXfs=[{borderId:0,fillId:0,fontId:0,numFmtId:0,xfId:0}],registeredCellStyles=[{builtinId:0,name:"Normal",xfId:0}]},registerFill=function(e){var t=convertLegacyPattern(e.pattern),r=convertLegacyColor(e.color),o=convertLegacyColor(e.patternColor),i=registeredFills.findIndex(function(e){var i=e.patternType,n=e.fgRgb,a=e.bgRgb;return i==t&&n==r&&a==o});return-1===i&&(i=registeredFills.length,registeredFills.push({patternType:t,fgRgb:r,bgRgb:o})),i},registerNumberFmt=function(e){if(e=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.utf8_encode(e),numberFormatMap[e])return numberFormatMap[e];var t=registeredNumberFmts.findIndex(function(t){return t.formatCode===e});return-1===t?(t=registeredNumberFmts.length+164,registeredNumberFmts.push({formatCode:e,numFmtId:t})):t=registeredNumberFmts[t].numFmtId,t},registerBorders=function(e){var t,r,o,i,n,a,s,l,c=e.borderBottom,u=e.borderTop,d=e.borderLeft,p=e.borderRight;d&&(o=convertLegacyBorder(d.lineStyle,d.weight),s=convertLegacyColor(d.color)),p&&(i=convertLegacyBorder(p.lineStyle,p.weight),l=convertLegacyColor(p.color)),c&&(t=convertLegacyBorder(c.lineStyle,c.weight),n=convertLegacyColor(c.color)),u&&(r=convertLegacyBorder(u.lineStyle,u.weight),a=convertLegacyColor(u.color));var h=registeredBorders.findIndex(function(e){var c=e.left,u=e.right,d=e.top,p=e.bottom;if(!c&&(o||s))return!1;if(!u&&(i||l))return!1;if(!d&&(r||a))return!1;if(!p&&(t||n))return!1;var h=c||{},_=h.style,f=h.color,g=u||{},y=g.style,m=g.color,v=d||{},E=v.style,C=v.color,O=p||{},P=O.style,S=O.color;return _==o&&f==s&&y==i&&m==l&&E==r&&C==a&&P==t&&S==n});return-1===h&&(h=registeredBorders.length,registeredBorders.push({left:{style:o,color:s},right:{style:i,color:l},top:{style:r,color:a},bottom:{style:t,color:n},diagonal:{style:void 0,color:void 0}})),h},registerFont=function(e){var t=e.fontName,r=void 0===t?"Calibri":t,o=e.color,
2i=e.size,n=e.bold,a=e.italic,s=e.outline,l=e.shadow,c=e.strikeThrough,u=e.underline,d=e.family,p=e.verticalAlign,h=r?ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.utf8_encode(r):r,_=convertLegacyColor(o),f=getFontFamilyId(d),g=u?u.toLocaleLowerCase():void 0,y=p?p.toLocaleLowerCase():void 0,m=registeredFonts.findIndex(function(e){return e.fontName==h&&e.color==_&&e.size==i&&e.bold==n&&e.italic==a&&e.outline==s&&e.shadow==l&&e.strikeThrough==c&&e.underline==g&&e.verticalAlign==y&&e.family==f});return-1===m&&(m=registeredFonts.length,registeredFonts.push({fontName:h,color:_,size:i,bold:n,italic:a,outline:s,shadow:l,strikeThrough:c,underline:g,verticalAlign:y,family:null!=f?f.toString():void 0})),m},registerStyle=function(e){var t=e.alignment,r=e.borders,o=e.font,i=e.interior,n=e.numberFormat,a=e.protection,s=e.id,l=0,c=0,u=0,d=0;s&&(s=getStyleName(s,currentSheet),null==stylesMap[s]&&(i&&(l=registerFill(i)),r&&(c=registerBorders(r)),o&&(u=registerFont(o)),n&&(d=registerNumberFmt(n.format)),stylesMap[s]=registeredCellXfs.length,registeredCellXfs.push({alignment:t,borderId:c||0,fillId:l||0,fontId:u||0,numFmtId:d||0,protection:a,xfId:0})))},stylesheetFactory={getTemplate:function(e){var t=numberFormatsFactory.getTemplate(registeredNumberFmts),r=fontsFactory.getTemplate(registeredFonts.map(function(t){return __assign$J(__assign$J({},t),{size:null!=t.size?t.size:e})})),o=fillsFactory.getTemplate(registeredFills),i=bordersFactory.getTemplate(registeredBorders),n=cellStylesXfsFactory.getTemplate(registeredCellStyleXfs),a=cellXfsFactory.getTemplate(registeredCellXfs),s=cellStylesFactory.getTemplate(registeredCellStyles);return resetStylesheetValues(),{name:"styleSheet",properties:{rawMap:{"mc:Ignorable":"x14ac x16r2 xr",xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","xmlns:x14ac":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac","xmlns:x16r2":"http://schemas.microsoft.com/office/spreadsheetml/2015/02/main","xmlns:xr":"http://schemas.microsoft.com/office/spreadsheetml/2014/revision"}},children:[t,r,o,i,n,a,s,{name:"tableStyles",properties:{rawMap:{count:0,defaultPivotStyle:"PivotStyleLight16",defaultTableStyle:"TableStyleMedium2"}}}]}}},getStyleId=function(e,t){return stylesMap[getStyleName(e,t)]||0},registerStyles=function(e,t){1===(currentSheet=t)&&resetStylesheetValues(),e.forEach(registerStyle)},sheetFactory={getTemplate:function(e,t){var r=(t+1).toString();return{name:"sheet",properties:{rawMap:{name:e,sheetId:r,"r:id":"rId"+r}}}}},sheetsFactory={getTemplate:function(e){return{name:"sheets",children:e.map(function(e,t){return sheetFactory.getTemplate(e,t)})}}},workbookFactory={getTemplate:function(e){return{name:"workbook",properties:{prefixedAttributes:[{prefix:"xmlns:",map:{r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships"}}],rawMap:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main"}},children:[sheetsFactory.getTemplate(e)]}}},getExcelCellWidth=function(e){return Math.ceil((e-12)/7+1)},columnFactory={getTemplate:function(e){var t=e.min,r=e.max,o=e.outlineLevel,i=e.s,n=e.width,a=e.hidden,s=e.bestFit,l=1,c="0";return n>1&&(l=getExcelCellWidth(n),c="1"),{name:"col",properties:{rawMap:{min:t,max:r,outlineLevel:null!=o?o:void 0,width:l,style:i,hidden:a?"1":"0",bestFit:s?"1":"0",customWidth:c}}}}},convertLegacyType=function(e){var t=e.charAt(0).toLowerCase();return"s"===t?"inlineStr":t},cellFactory={getTemplate:function(e,t,r){var o=e.ref,i=e.data,n=e.styleId,a=i||{type:"empty",value:null},s=a.type,l=a.value,c=s;"f"===s?c="str":s.charAt(0)===s.charAt(0).toUpperCase()&&(c=convertLegacyType(s));var u,d={name:"c",properties:{rawMap:{r:o,t:"empty"===c?void 0:c,s:n?getStyleId(n,r):void 0}}};return"empty"===c?d:(u="str"===c&&"f"===s?[{name:"f",textNode:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.escapeString(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.utf8_encode(l))}]:"inlineStr"===c?[{name:"is",children:[{name:"t",textNode:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.escapeString(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.utf8_encode(l))}]}]:[{name:"v",textNode:l}],Object.assign({},d,{children:u}))}},__read$$=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},__spread$C=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read$$(arguments[t]));return e},addEmptyCells=function(e,t){for(var r=[],o=0,i=0;i<e.length;i++)(a=e[i]).mergeAcross&&(r.push({pos:i,excelPos:o}),o+=a.mergeAcross),o++;if(r.length)for(i=r.length-1;i>=0;i--){for(var n=[],a=e[r[i].pos],s=1;s<=a.mergeAcross;s++)n.push({ref:""+getExcelColumnName(r[i].excelPos+1+s)+(t+1),styleId:a.styleId,data:{type:"empty",value:null}});n.length&&e.splice.apply(e,__spread$C([r[i].pos+1,0],n))}},shouldDisplayCell=function(e){var t;return""!==(null===(t=e.data)||void 0===t?void 0:t.value)||void 0!==e.styleId},rowFactory={getTemplate:function(e,t,r){var o=e.collapsed,i=e.hidden,n=e.height,a=e.outlineLevel,s=e.cells,l=void 0===s?[]:s;addEmptyCells(l,t);var c=l.filter(shouldDisplayCell).map(function(e,t){return cellFactory.getTemplate(e,t,r)});return{name:"row",properties:{rawMap:{r:t+1,collapsed:o,hidden:i?"1":"0",ht:n,customHeight:null!=n?"1":"0",spans:"1:1",outlineLevel:a||void 0}},children:c}}},mergeCellFactory={getTemplate:function(e){return{name:"mergeCell",properties:{rawMap:{ref:e}}}}},getMergedCellsAndAddColumnGroups=function(e,t){var r=[],o=[];e.forEach(function(e,i){var n,a=e.cells,s=0;a.forEach(function(e,a){var l=a+s+1,c=getExcelColumnName(l),u=i+1;if(e.mergeAcross){s+=e.mergeAcross;var d=getExcelColumnName(a+s+1);
2r.push(""+c+u+":"+d+u)}t[l-1]||(t[l-1]={});var p=e.collapsibleRanges;p&&p.forEach(function(e){o.push([l+e[0],l+e[1]])}),(n=t[l-1]).min=l,n.max=l,e.ref=""+c+u})}),o.sort(function(e,t){return e[0]!==t[0]?e[0]-t[0]:t[1]-e[1]});var i=new Map,n=new Map;return o.filter(function(e){var t=e.toString();return!i.get(t)&&(i.set(t,!0),!0)}).forEach(function(e){var r=t.find(function(t){return t.min==e[0]&&t.max==e[1]}),o=n.get(e[0]);t.push({min:e[0],max:e[1],outlineLevel:o||1,width:(r||{width:100}).width}),n.set(e[0],(o||0)+1)}),r},getPageOrientation=function(e){return!e||"Portrait"!==e&&"Landscape"!==e?"portrait":e.toLocaleLowerCase()},getPageSize=function(e){if(null==e)return 1;var t=["Letter","Letter Small","Tabloid","Ledger","Legal","Statement","Executive","A3","A4","A4 Small","A5","A6","B4","B5","Folio","Envelope","Envelope DL","Envelope C5","Envelope B5","Envelope C3","Envelope C4","Envelope C6","Envelope Monarch","Japanese Postcard","Japanese Double Postcard"].indexOf(e);return-1===t?1:t+1},addColumns=function(e){return function(t){return e.length&&t.push({name:"cols",children:e.map(function(e){return columnFactory.getTemplate(e)})}),t}},addSheetData=function(e,t){return function(r){return e.length&&r.push({name:"sheetData",children:e.map(function(e,r){return rowFactory.getTemplate(e,r,t)})}),r}},addMergeCells=function(e){return function(t){return e.length&&t.push({name:"mergeCells",properties:{rawMap:{count:e.length}},children:e.map(function(e){return mergeCellFactory.getTemplate(e)})}),t}},addPageMargins=function(e){return function(t){var r=e.top,o=void 0===r?.75:r,i=e.right,n=void 0===i?.7:i,a=e.bottom,s=void 0===a?.75:a,l=e.left,c=void 0===l?.7:l,u=e.header,d=void 0===u?.3:u,p=e.footer,h=void 0===p?.3:p;return t.push({name:"pageMargins",properties:{rawMap:{bottom:s,footer:h,header:d,left:c,right:n,top:o}}}),t}},addPageSetup=function(e){return function(t){return e&&t.push({name:"pageSetup",properties:{rawMap:{horizontalDpi:0,verticalDpi:0,orientation:getPageOrientation(e.orientation),paperSize:getPageSize(e.pageSize)}}}),t}},replaceHeaderFooterTokens=function(e){return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.iterateObject({"&[Page]":"&P","&[Pages]":"&N","&[Date]":"&D","&[Time]":"&T","&[Tab]":"&A","&[Path]":"&Z","&[File]":"&F"},function(t,r){e=e.replace(t,r)}),e},getHeaderPosition=function(e){return"Center"===e?"C":"Right"===e?"R":"L"},applyHeaderFontStyle=function(e,t){return t?(e+="&amp;&quot;",e+=t.fontName||"Calibri",t.bold!==t.italic?e+=t.bold?",Bold":",Italic":t.bold?e+=",Bold Italic":e+=",Regular",e+="&quot;",t.size&&(e+="&amp;"+t.size),t.strikeThrough&&(e+="&amp;S"),t.underline&&(e+="&amp;"+("Double"===t.underline?"E":"U")),t.color&&(e+="&amp;K"+t.color.replace("#","").toUpperCase()),e):e},processHeaderFooterContent=function(e){return e.reduce(function(e,t){var r=getHeaderPosition(t.position);return""+applyHeaderFontStyle(e+"&amp;"+r,t.font)+ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.escapeString(replaceHeaderFooterTokens(t.value))},"")},buildHeaderFooter=function(e){var t=[];return["all","first","even"].forEach(function(r){var o=e[r],i="all"===r?"odd":r;o&&(o.header||o.footer)&&ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.iterateObject(o,function(e,r){var o=""+e.charAt(0).toUpperCase()+e.slice(1);r&&t.push({name:""+i+o,properties:{rawMap:{"xml:space":"preserve"}},textNode:processHeaderFooterContent(r)})})}),t},addHeaderFooter=function(e){return function(t){if(!e)return t;var r=null!=e.first?1:0,o=null!=e.even?1:0;return t.push({name:"headerFooter",properties:{rawMap:{differentFirst:r,differentOddEven:o}},children:buildHeaderFooter(e)}),t}},addDrawingRel=function(e){return function(t){return ExcelXlsxFactory.worksheetImages.get(e)&&t.push({name:"drawing",properties:{rawMap:{"r:id":"rId1"}}}),t}},addSheetPr=function(){return function(e){return e.push({name:"sheetPr",children:[{name:"outlinePr",properties:{rawMap:{summaryBelow:0}}}]}),e}},addSheetFormatPr=function(e){return function(t){var r=e.reduce(function(e,t){return t.outlineLevel&&t.outlineLevel>e?t.outlineLevel:e},0);return t.push({name:"sheetFormatPr",properties:{rawMap:{baseColWidth:10,defaultRowHeight:16,outlineLevelRow:r||void 0}}}),t}},worksheetFactory={getTemplate:function(e){var t=e.worksheet,r=e.currentSheet,o=e.margins,i=void 0===o?{}:o,n=e.pageSetup,a=e.headerFooterConfig,s=t.table,l=s.rows,c=s.columns,u=c&&c.length?getMergedCellsAndAddColumnGroups(l,c):[];return{name:"worksheet",properties:{prefixedAttributes:[{prefix:"xmlns:",map:{r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships"}}],rawMap:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main"}},children:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.compose(addSheetPr(),addSheetFormatPr(l),addColumns(c),addSheetData(l,r+1),addMergeCells(u),addPageMargins(i),addPageSetup(n),addHeaderFooter(a),addDrawingRel(r))([])}}},relationshipFactory={getTemplate:function(e){return{name:"Relationship",properties:{rawMap:{Id:e.Id,Type:e.Type,Target:e.Target}}}}},relationshipsFactory={getTemplate:function(e){return{name:"Relationships",properties:{rawMap:{xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"}},children:e.map(function(e){return relationshipFactory.getTemplate(e)}
vendor: 9,142 bytes, line 2
2)}}},__read$_=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},__spread$B=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read$_(arguments[t]));return e},ExcelXlsxFactory=function(){function e(){}return e.createExcel=function(e,t,r,o,i){return this.addSheetName(t),registerStyles(e,this.sheetNames.length),this.createWorksheet(t,r,o,i)},e.buildImageMap=function(e,t,r,o,i){var n=this.sheetNames.length,a=this.images.get(e.id);e.position&&e.position.row&&e.position.column||(e.position||(e.position={}),e.position=Object.assign({},e.position,{row:t,column:o.indexOf(r)+1}));var s=e;if(setExcelImageTotalWidth(s,o),setExcelImageTotalHeight(s,i),a){var l=a.find(function(e){return e.sheetId===n});l?l.image.push(s):a.push({sheetId:n,image:[s]})}else this.images.set(s.id,[{sheetId:n,image:[s]}]),this.workbookImageIds.set(s.id,{type:s.imageType,index:this.workbookImageIds.size});this.buildSheetImageMap(n,s)},e.buildSheetImageMap=function(e,t){var r=this.worksheetImageIds.get(e);r||(r=new Map,this.worksheetImageIds.set(e,r));var o=this.worksheetImages.get(e);o?(o.push(t),r.get(t.id)||r.set(t.id,{index:r.size,type:t.imageType})):(this.worksheetImages.set(e,[t]),r.set(t.id,{index:0,type:t.imageType}))},e.addSheetName=function(e){for(var t=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.escapeString(e.name)||"",r="";-1!==this.sheetNames.indexOf(""+t+r);)if(""===r)r="_1";else{var o=parseInt(r.slice(1),10);r="_"+(o+1)}e.name=""+t+r,this.sheetNames.push(e.name)},e.getStringPosition=function(e){return this.sharedStrings.has(e)?this.sharedStrings.get(e):(this.sharedStrings.set(e,this.sharedStrings.size),this.sharedStrings.size-1)},e.resetFactory=function(){this.sharedStrings=new Map,this.images=new Map,this.worksheetImages=new Map,this.workbookImageIds=new Map,this.worksheetImageIds=new Map,this.sheetNames=[],this.factoryMode=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ExcelFactoryMode.SINGLE_SHEET},e.createWorkbook=function(){return createXmlPart(workbookFactory.getTemplate(this.sheetNames))},e.createStylesheet=function(e){return createXmlPart(stylesheetFactory.getTemplate(e))},e.createSharedStrings=function(){return createXmlPart(sharedStrings.getTemplate(this.sharedStrings))},e.createCore=function(e){return createXmlPart(coreFactory.getTemplate(e))},e.createContentTypes=function(e){return createXmlPart(contentTypesFactory.getTemplate(e))},e.createRels=function(){var e=relationshipsFactory.getTemplate([{Id:"rId1",Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",Target:"xl/workbook.xml"},{Id:"rId2",Type:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",Target:"docProps/core.xml"}]);return createXmlPart(e)},e.createTheme=function(){return createXmlPart(officeTheme.getTemplate())},e.createWorkbookRels=function(e){var t=new Array(e).fill(void 0).map(function(e,t){return{Id:"rId"+(t+1),Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet",Target:"worksheets/sheet"+(t+1)+".xml"}}),r=relationshipsFactory.getTemplate(__spread$B(t,[{Id:"rId"+(e+1),Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",Target:"theme/theme1.xml"},{Id:"rId"+(e+2),Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",Target:"styles.xml"},{Id:"rId"+(e+3),Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",Target:"sharedStrings.xml"}]));return createXmlPart(r)},e.createDrawing=function(e){return createXmlPart(drawingFactory.getTemplate({sheetIndex:e}))},e.createDrawingRel=function(e){var t=this,r=this.worksheetImageIds.get(e),o=[];return r.forEach(function(e,r){o.push({Id:"rId"+(e.index+1),Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:"../media/image"+(t.workbookImageIds.get(r).index+1)+"."+e.type})}),createXmlPart(relationshipsFactory.getTemplate(o))},e.createWorksheetDrawingRel=function(e){var t=relationshipsFactory.getTemplate([{Id:"rId1",Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",Target:"../drawings/drawing"+(e+1)+".xml"}]);return createXmlPart(t)},e.createWorksheet=function(e,t,r,o){return createXmlPart(worksheetFactory.getTemplate({worksheet:e,currentSheet:this.sheetNames.length-1,margins:t,pageSetup:r,headerFooterConfig:o}))},e.sharedStrings=new Map,e.sheetNames=[],e.images=new Map,e.worksheetImages=new Map,e.workbookImageIds=new Map,e.worksheetImageIds=new Map,e.factoryMode=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ExcelFactoryMode.SINGLE_SHEET,e}(),__extends$2O=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),ExcelXlsxSerializingSession=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$2O(t,e),t.prototype.createExcel=function(e){var t=this.excelStyles,r=this.config,o=r.margins,i=r.pageSetup,n=r.headerFooterConfig;return ExcelXlsxFactory.createExcel(t,e,o,i,n)},t.prototype.getDataTypeForValue=function(e){return void 0===e?"empty":this.isNumerical(e)?"n":"s"},t.prototype.getType=function(e,t,r){if(this.isFormula(r))return"f";if(t&&t.dataType)switch(t.dataType.toLocaleLowerCase()){case"formula":return"f";case"string":return"s";case"number":return"n";case"datetime":return"d";case"error":return"e";case"boolean":return"b";default:console.warn("AG Grid: Unrecognized data type for excel export ["+t.id+".dataType="+t.dataType+"]")}return e},t.prototype.addImage=function(e,t,r){if(this.config.addImageToCell){var o=this.config.addImageToCell(e,t,r);if(o)return ExcelXlsxFactory.buildImageMap(o.image,e,t,this.columnsToExport,this.config.rowHeight),o}},t.prototype.createCell=function(e,t,r){var o=this.getStyleById(e),i=this.getType(t,o,r)||t;return{styleId:o?e:void 0,data:{type:i,value:this.getCellValue(i,r)}}},t.prototype.createMergedCell=function(e,t,r,o){var i=r??"";return{styleId:this.getStyleById(e)?e:void 0,data:{type:t,value:"s"===t?ExcelXlsxFactory.getStringPosition(i).toString():r},mergeAcross:o}},t.prototype.getCellValue=function(e,t){if(null==t)return ExcelXlsxFactory.getStringPosition("").toString();switch(e){case"s":return""===t?"":ExcelXlsxFactory.getStringPosition(t).toString();case"f":return t.slice(1);case"n":return Number(t).toString();default:return t}},t}(BaseExcelSerializingSession),__extends$2N=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__assign$I=function(){return __assign$I=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$I.apply(this,arguments)},__decorate$1$=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},getMultipleSheetsAsExcel=function(e){var t=e.data,r=e.fontSize,o=void 0===r?11:r,i=e.author,n=void 0===i?"AG Grid":i,a=ExcelXlsxFactory.images.size>0;if(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ZipContainer.addFolders(["_rels/","docProps/","xl/","xl/theme/","xl/_rels/","xl/worksheets/"]),a){ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ZipContainer.addFolders(["xl/worksheets/_rels","xl/drawings/","xl/drawings/_rels","xl/media/"]);var s=0;ExcelXlsxFactory.images.forEach(function(e){var t=e[0].image[0],r=t.imageType;ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ZipContainer.addFile("xl/media/image"+ ++s+"."+r,t.base64,!0)})}if(!t||0===t.length)return console.warn("AG Grid: Invalid params supplied to getMultipleSheetsAsExcel() - `ExcelExportParams.data` is empty."),void ExcelXlsxFactory.resetFactory();var l=t.length,c=0;t.forEach(function(e,t){ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ZipContainer.addFile("xl/worksheets/sheet"+(t+1)+".xml",e),a&&ExcelXlsxFactory.worksheetImages.get(t)&&createImageRelationsForSheet(t,c++)}),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ZipContainer.addFile("xl/workbook.xml",ExcelXlsxFactory.createWorkbook()),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ZipContainer.addFile("xl/styles.xml",ExcelXlsxFactory.createStylesheet(o)),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ZipContainer.addFile("xl/s
2haredStrings.xml",ExcelXlsxFactory.createSharedStrings()),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ZipContainer.addFile("xl/theme/theme1.xml",ExcelXlsxFactory.createTheme()),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ZipContainer.addFile("xl/_rels/workbook.xml.rels",ExcelXlsxFactory.createWorkbookRels(l)),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ZipContainer.addFile("docProps/core.xml",ExcelXlsxFactory.createCore(n)),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ZipContainer.addFile("[Content_Types].xml",ExcelXlsxFactory.createContentTypes(l)),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ZipContainer.addFile("_rels/.rels",ExcelXlsxFactory.createRels()),ExcelXlsxFactory.resetFactory();var u=e.mimeType||"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ZipContainer.getContent(u)},exportMultipleSheetsAsExcel=function(e){var t=e.fileName,r=void 0===t?"export.xlsx":t,o=getMultipleSheetsAsExcel(e);o&&ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Downloader.download(r,o)},createImageRelationsForSheet=function(e,t){var r="xl/drawings",o=r+"/drawing"+(t+1)+".xml",i=r+"/_rels/drawing"+(t+1)+".xml.rels",n="xl/worksheets/_rels/sheet"+(e+1)+".xml.rels";ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ZipContainer.addFile(i,ExcelXlsxFactory.createDrawingRel(e)),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ZipContainer.addFile(o,ExcelXlsxFactory.createDrawing(e)),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ZipContainer.addFile(n,ExcelXlsxFactory.createWorksheetDrawingRel(t))},ExcelCreator=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.exportMode="xlsx",t}return __extends$2N(t,e),t.prototype.postConstruct=function(){this.setBeans({gridSerializer:this.gridSerializer,gridOptionsService:this.gridOptionsService})},t.prototype.getMergedParams=function(e){var t=this.gridOptionsService.get("defaultExcelExportParams");return Object.assign({},t,e)},t.prototype.getData=function(t){return this.setExportMode(t.exportMode||"xlsx"),e.prototype.getData.call(this,t)},t.prototype.export=function(e){if(this.isExportSuppressed())return console.warn("AG Grid: Export cancelled. Export is not allowed as per your configuration."),"";var t=this.getMergedParams(e),r=this.getData(t),o={data:[r],fontSize:t.fontSize,author:t.author,mimeType:t.mimeType},i=this.packageFile(o);return i&&ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Downloader.download(this.getFileName(t.fileName),i),r},t.prototype.exportDataAsExcel=function(e){return this.export(e)},t.prototype.getDataAsExcel=function(e){var t=this.getMergedParams(e),r=this.getData(t);if(e&&"xml"===e.exportMode)return r;var o={data:[r],fontSize:t.fontSize,author:t.author,mimeType:t.mimeType};return this.packageFile(o)},t.prototype.setFactoryMode=function(e,t){void 0===t&&(t="xlsx"),("xlsx"===t?ExcelXlsxFactory:ExcelXmlFactory).factoryMode=e},t.prototype.getFactoryMode=function(e){return("xlsx"===e?ExcelXlsxFactory:ExcelXmlFactory).factoryMode},t.prototype.getSheetDataForExcel=function(e){var t=this.getMergedParams(e);return this.getData(t)},t.prototype.getMultipleSheetsAsExcel=function(e){return getMultipleSheetsAsExcel(e)},t.prototype.exportMultipleSheetsAsExcel=function(e){return exportMultipleSheetsAsExcel(e)},t.prototype.getDefaultFileName=function(){return"export."+this.getExportMode()},t.prototype.getDefaultFileExtension=function(){return this.getExportMode()},t.prototype.createSerializingSession=function(e){var t=this,r=t.columnModel,o=t.valueService,i=t.gridOptionsService,n="xlsx"===this.getExportMode(),a="ag-grid";null!=e.sheetName&&(a=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.utf8_encode(e.sheetName.toString().substr(0,31)));var s=__assign$I(__assign$I({},e),{sheetName:a,columnModel:r,valueService:o,gridOptionsService:i,headerRowHeight:e.headerRowHeight||e.rowHeight,baseExcelStyles:this.gridOptionsService.get("excelStyles")||[],styleLinker:this.styleLinker.bind(this)});return new(n?ExcelXlsxSerializingSession:ExcelXmlSerializingSession)(s)},t.prototype.styleLinker=function(e){var t=e.rowType,r=e.rowIndex,o=e.value,i=e.column,n=e.columnGroup,a=e.node,s=t===ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RowType.HEADER,l=t===ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RowType.HEADER_GROUPING,c=s?i:n,u=[];
2if(s||l)return u.push("header"),l&&u.push("headerGroup"),c&&(u=u.concat(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.CssClassApplier.getHeaderClassesFromColDef(c.getDefinition(),this.gridOptionsService,i||null,n||null))),u;var d=this.gridOptionsService.get("excelStyles"),p=["cell"];if(!d||!d.length)return p;var h=d.map(function(e){return e.id});return this.stylingService.processAllCellClasses(i.getDefinition(),{value:o,data:a.data,node:a,colDef:i.getDefinition(),column:i,rowIndex:r,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context},function(e){h.indexOf(e)>-1&&p.push(e)}),p.sort(function(e,t){return h.indexOf(e)<h.indexOf(t)?-1:1})},t.prototype.isExportSuppressed=function(){return this.gridOptionsService.is("suppressExcelExport")},t.prototype.setExportMode=function(e){this.exportMode=e},t.prototype.getExportMode=function(){return this.exportMode},t.prototype.packageFile=function(e){if("xml"===this.getExportMode()){var t=e.mimeType||"application/vnd.ms-excel";return new Blob(["\ufeff",e.data[0]],{type:t})}return getMultipleSheetsAsExcel(e)},__decorate$1$([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],t.prototype,"columnModel",void 0),__decorate$1$([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("valueService")],t.prototype,"valueService",void 0),__decorate$1$([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("stylingService")],t.prototype,"stylingService",void 0),__decorate$1$([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("gridSerializer")],t.prototype,"gridSerializer",void 0),__decorate$1$([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("gridOptionsService")],t.prototype,"gridOptionsService",void 0),__decorate$1$([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"postConstruct",null),__decorate$1$([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Bean)("excelCreator")],t)}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.BaseCreator),VERSION$d="29.2.0",ExcelExportModule={version:VERSION$d,moduleName:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleNames.ExcelExportModule,beans:[ExcelCreator,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.GridSerializer,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.CsvCreator],dependantModules:[ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.CsvExportModule,EnterpriseCoreModule]},__extends$2M=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$1_=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},EXPAND_STATE;!function(e){e[e.EXPANDED=0]="EXPANDED",e[e.COLLAPSED=1]="COLLAPSED",e[e.INDETERMINATE=2]="INDETERMINATE"}(EXPAND_STATE||(EXPAND_STATE={}));var FiltersToolPanelHeaderPanel=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$2M(t,e),t.prototype.preConstruct=function(){this.setTemplate('<div class="ag-filter-toolpanel-search" role="presentation">\n                <div ref="eExpand" class="ag-filter-toolpanel-expand"></div>\n                <ag-input-text-field ref="eFilterTextField" class="ag-filter-toolpanel-search-input"></ag-input-text-field>\n            </div>')},t.prototype.postConstruct=function(){var e=this.localeService.getLocaleTextFunc();this.eFilterTextField.onValueChange(this.onSearchTextChanged.bind(this)),this.eFilterTextField.setInputAriaLabel(e("ariaFilterColumnsInput","Filter Columns Input")),this.createExpandIcons(),this.setExpandState(EXPAND_STATE.EXPANDED),this.addManagedListener(this.eExpand,"click",this.onExpandClicked.bind(this)),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_NEW_COLUMNS_LOADED,this.showOrHideOptions.bind(this))},t.prototype.init=function(e){this.params=e,this.columnModel.isReady()&&this.showOrHideOptions()},t.prototype.createExpandIcons=function(){this.eExpand.appendChild(this.eExpandChecked=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.createIconNoSpan("columnSelectOpen",this.gridOptionsService)),this.eExpand.appendChild(this.eExpandUnchecked=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.createIconNoSpan("columnSelectClosed",this.gridOptionsService)),this.eExpand.appendChild(this.eExpandIndeterminate=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.createIconNoSpan("columnSelectIndeterminate",this.gridOptionsService))},t.prototype.showOrHideOptions=function(){var e=!this.params.suppressFilterSearch,t=!this.params.suppressExpandAll,r=this.localeService.getLocaleTextFunc();this.eFilterTextField.setInputPlaceholder(r("searchOoo","Search..."));var o=this.columnModel.getAllGridColumns().some(function(e){return e.getOriginalParent()&&e.isFilterAllowed()});ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setDisplayed(this.eFilterTextField.getGui(),e),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setDisplayed(this.eExpand,t&&o)},t.prototype.onSearchTextChanged=function(){var e=this;this.onSearchTextChangedDebounced||(this.onSearchTextChangedDebounced=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.debounce(function(){e.dispatchEvent({type:"searchChanged",searchText:e.eFilterTextField.getValue()})},300)),this.onSearchTextChangedDebounced()},t.prototype.onExpandClicked=function(){var e=this.currentExpandState===EXPAND_STATE.EXPANDED?{type:"collapseAll"}
2:{type:"expandAll"};this.dispatchEvent(e)},t.prototype.setExpandState=function(e){this.currentExpandState=e,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setDisplayed(this.eExpandChecked,this.currentExpandState===EXPAND_STATE.EXPANDED),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setDisplayed(this.eExpandUnchecked,this.currentExpandState===EXPAND_STATE.COLLAPSED),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setDisplayed(this.eExpandIndeterminate,this.currentExpandState===EXPAND_STATE.INDETERMINATE)},__decorate$1_([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],t.prototype,"columnModel",void 0),__decorate$1_([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eExpand")],t.prototype,"eExpand",void 0),__decorate$1_([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eFilterTextField")],t.prototype,"eFilterTextField",void 0),__decorate$1_([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PreConstruct],t.prototype,"preConstruct",null),__decorate$1_([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"postConstruct",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),__extends$2L=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$1Z=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},ToolPanelFilterComp=function(e){function t(r){void 0===r&&(r=!1);var o=e.call(this,t.TEMPLATE)||this;return o.expanded=!1,o.hideHeader=r,o}return __extends$2L(t,e),t.prototype.postConstruct=function(){this.eExpandChecked=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.createIconNoSpan("columnSelectOpen",this.gridOptionsService),this.eExpandUnchecked=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.createIconNoSpan("columnSelectClosed",this.gridOptionsService),this.eExpand.appendChild(this.eExpandChecked),this.eExpand.appendChild(this.eExpandUnchecked)},t.prototype.setColumn=function(e){var t=this;this.column=e,this.eFilterName.innerText=this.columnModel.getDisplayNameForColumn(this.column,"filterToolPanel",!1)||"",this.addManagedListener(this.eFilterToolPanelHeader,"click",this.toggleExpanded.bind(this)),this.addManagedListener(this.eFilterToolPanelHeader,"keydown",function(e){e.key===ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.KeyCode.ENTER&&t.toggleExpanded()}),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_FILTER_OPENED,this.onFilterOpened.bind(this)),this.addInIcon("filter",this.eFilterIcon,this.column),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setDisplayed(this.eFilterIcon,this.isFilterActive(),{skipAriaHidden:!0}),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setDisplayed(this.eExpandChecked,!1),this.hideHeader?(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setDisplayed(this.eFilterToolPanelHeader,!1),this.eFilterToolPanelHeader.removeAttribute("tabindex")):this.eFilterToolPanelHeader.setAttribute("tabindex","0"),this.addManagedListener(this.column,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Column.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_FILTER_DESTROYED,this.onFilterDestroyed.bind(this))},t.prototype.getColumn=function(){return this.column},t.prototype.getColumnFilterName=function(){return this.columnModel.getDisplayNameForColumn(this.column,"filterToolPanel",!1)},t.prototype.addCssClassToTitleBar=function(e){this.eFilterToolPanelHeader.classList.add(e)},t.prototype.addInIcon=function(e,t,r){if(null!=t){var o=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.createIconNoSpan(e,this.gridOptionsService,r);t.appendChild(o)}},t.prototype.isFilterActive=function(){return this.filterManager.isFilterActive(this.column)},t.prototype.onFilterChanged=function(){ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setDisplayed(this.eFilterIcon,this.isFilterActive(),{skipAriaHidden:!0}),this.dispatchEvent({type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Column.EVENT_FILTER_CHANGED})},t.prototype.onFilterDestroyed=function(e){this.expanded&&"api"===e.source&&e.column.getId()===this.column.getId()&&this.columnModel.getPrimaryColumn(this.column)&&(this.removeFilterElement(),this.addFilterElement())},t.prototype.toggleExpanded=function(){this.expanded?this.collapse():this.expand()},t.prototype.expand=function(){this.expanded||(this.expanded=!0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setAriaExpanded(this.eFilterToolPanelHeader,!0),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setDisplayed(this.eExpandChecked,!0),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setDisplayed(this.eExpandUnchecked,!1),this.addFilterElement())},t.prototype.addFilterElement=function(){var e=this,t=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.loadTemplate('<div class="ag-filter-toolpanel-instance-filter"></div>'),r=this.filterManager.getOrCreateFilterWrapper(this.column,"TOOLBAR");if(r){var o=r.filterPromise,i=r.guiPromise;null==o||o.then(function(r){e.underlyingFilter=r,r&&i.then(function(o){o&&t.appendChild(o),e.agFilterToolPanelBody.appendChild(t),r.afterGuiAttached&&r.afterGuiAttached({container:"toolPanel"})})})}},t.prototype.collapse=function(){var e,t;this.expanded&&(this.expanded=!1,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setAriaExpanded(this.eFilterToolPanelHeader,!1),this.removeFilterElement(),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setDisplayed(this.eExpandChecked,!1),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setDisplayed(this.eExpandUnchecked,!0),null===(t=null===(e=this.underlyingFilter)||void 0===e?void 0:e.afterGuiDetached)||void 0===t||t.call(e))},t.prototype.removeFilterElement=function(){ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.clearElement(this.agFilterToolPanelBody)},t.prototype.isExpanded=function(){return this.expanded},t.prototype.refreshFilter=function(e){var t;if(this.expanded){var r=this.underlyingFilter;r&&(e?"function"==typeof r.refreshVirtualList&&r.refreshVirtualList():null===(t=r.afterGuiDetached)||void 0===t||t.call(r))}},t.prototype.onFilterOpened=function(e){"COLUMN_MENU"===e.source&&e.column===this.column&&this.expanded&&this.collapse()},t.TEMPLATE='\n        <div class="ag-filter-toolpanel-instance">\n            <div class="ag-filter-toolpanel-header ag-filter-toolpanel-instance-header" ref="eFilterToolPanelHeader" role="button" aria-expanded="false">\n                <div ref="eExpand" class="ag-filter-toolpanel-expand"></div>
2\n                <span ref="eFilterName" class="ag-header-cell-text"></span>\n                <span ref="eFilterIcon" class="ag-header-icon ag-filter-icon ag-filter-toolpanel-instance-header-icon" aria-hidden="true"></span>\n            </div>\n            <div class="ag-filter-toolpanel-instance-body ag-filter" ref="agFilterToolPanelBody"></div>\n        </div>',__decorate$1Z([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eFilterToolPanelHeader")],t.prototype,"eFilterToolPanelHeader",void 0),__decorate$1Z([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eFilterName")],t.prototype,"eFilterName",void 0),__decorate$1Z([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("agFilterToolPanelBody")],t.prototype,"agFilterToolPanelBody",void 0),__decorate$1Z([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eFilterIcon")],t.prototype,"eFilterIcon",void 0),__decorate$1Z([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eExpand")],t.prototype,"eExpand",void 0),__decorate$1Z([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("filterManager")],t.prototype,"filterManager",void 0),__decorate$1Z([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],t.prototype,"columnModel",void 0),__decorate$1Z([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"postConstruct",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),__extends$2K=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$1Y=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},ToolPanelFilterGroupComp=function(e){function t(t,r,o,i,n){var a=e.call(this)||this;return a.columnGroup=t,a.childFilterComps=r,a.depth=i,a.expandedCallback=o,a.showingColumn=n,a}return __extends$2K(t,e),t.prototype.preConstruct=function(){this.setTemplate(t.TEMPLATE,{filterGroupComp:{cssIdentifier:"filter-toolpanel",direction:"vertical"}})},t.prototype.init=function(){var e=this;this.setGroupTitle(),this.filterGroupComp.setAlignItems("stretch"),this.filterGroupComp.addCssClass("ag-filter-toolpanel-group-level-"+this.depth),this.filterGroupComp.addCssClassToTitleBar("ag-filter-toolpanel-group-level-"+this.depth+"-header"),this.childFilterComps.forEach(function(t){e.filterGroupComp.addItem(t),t.addCssClassToTitleBar("ag-filter-toolpanel-group-level-"+(e.depth+1)+"-header")}),this.refreshFilterClass(),this.addExpandCollapseListeners(),this.addFilterChangedListeners(),this.setupTooltip()},t.prototype.setupTooltip=function(){var e=this;if(this.showingColumn){var t=function(){var t=e.columnGroup.getColDef().headerTooltip;e.setTooltip(t)};t(),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_NEW_COLUMNS_LOADED,t)}},t.prototype.getTooltipParams=function(){var t=e.prototype.getTooltipParams.call(this);return t.location="filterToolPanelColumnGroup",t},t.prototype.addCssClassToTitleBar=function(e){this.filterGroupComp.addCssClassToTitleBar(e)},t.prototype.refreshFilters=function(e){this.childFilterComps.forEach(function(r){r instanceof t?r.refreshFilters(e):r.refreshFilter(e)})},t.prototype.isColumnGroup=function(){return this.columnGroup instanceof ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ProvidedColumnGroup},t.prototype.isExpanded=function(){return this.filterGroupComp.isExpanded()},t.prototype.getChildren=function(){return this.childFilterComps},t.prototype.getFilterGroupName=function(){return this.filterGroupName?this.filterGroupName:""},t.prototype.getFilterGroupId=function(){return this.columnGroup.getId()},t.prototype.hideGroupItem=function(e,t){this.filterGroupComp.hideItem(e,t)},t.prototype.hideGroup=function(e){this.setDisplayed(!e)},t.prototype.forEachToolPanelFilterChild=function(e){this.childFilterComps.forEach(function(t){t instanceof ToolPanelFilterComp&&e(t)})},t.prototype.addExpandCollapseListeners=function(){var e=this,t=this.isColumnGroup()?function(){return e.expandedCallback()}:function(){return e.forEachToolPanelFilterChild(function(e){return e.expand()})},r=this.isColumnGroup()?function(){return e.expandedCallback()}:function(){return e.forEachToolPanelFilterChild(function(e){return e.collapse()})};this.addManagedListener(this.filterGroupComp,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgGroupComponent.EVENT_EXPANDED,t),this.addManagedListener(this.filterGroupComp,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgGroupComponent.EVENT_COLLAPSED,r)},t.prototype.getColumns=function(){return this.columnGroup instanceof ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ProvidedColumnGroup?this.columnGroup.getLeafColumns():[this.columnGroup]},t.prototype.addFilterChangedListeners=function(){var e=this;
2this.getColumns().forEach(function(t){e.addManagedListener(t,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Column.EVENT_FILTER_CHANGED,function(){return e.refreshFilterClass()})}),this.columnGroup instanceof ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ProvidedColumnGroup||this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_FILTER_OPENED,this.onFilterOpened.bind(this))},t.prototype.refreshFilterClass=function(){var e=this.getColumns();this.filterGroupComp.addOrRemoveCssClass("ag-has-filter",e.some(function(e){return e.isFilterActive()}))},t.prototype.onFilterOpened=function(e){"COLUMN_MENU"===e.source&&e.column===this.columnGroup&&this.isExpanded()&&this.collapse()},t.prototype.expand=function(){this.filterGroupComp.toggleGroupExpand(!0)},t.prototype.collapse=function(){this.filterGroupComp.toggleGroupExpand(!1)},t.prototype.setGroupTitle=function(){this.filterGroupName=this.columnGroup instanceof ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ProvidedColumnGroup?this.getColumnGroupName(this.columnGroup):this.getColumnName(this.columnGroup),this.filterGroupComp.setTitle(this.filterGroupName||"")},t.prototype.getColumnGroupName=function(e){return this.columnModel.getDisplayNameForProvidedColumnGroup(null,e,"filterToolPanel")},t.prototype.getColumnName=function(e){return this.columnModel.getDisplayNameForColumn(e,"filterToolPanel",!1)},t.prototype.destroyFilters=function(){this.childFilterComps=this.destroyBeans(this.childFilterComps),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.clearElement(this.getGui())},t.prototype.destroy=function(){this.destroyFilters(),e.prototype.destroy.call(this)},t.TEMPLATE='<div class="ag-filter-toolpanel-group-wrapper">\n            <ag-group-component ref="filterGroupComp"></ag-group-component>\n        </div>',__decorate$1Y([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("filterGroupComp")],t.prototype,"filterGroupComp",void 0),__decorate$1Y([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],t.prototype,"columnModel",void 0),__decorate$1Y([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PreConstruct],t.prototype,"preConstruct",null),__decorate$1Y([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"init",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),__extends$2J=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$1X=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},FiltersToolPanelListPanel=function(e){function t(){var r=e.call(this,t.TEMPLATE)||this;return r.initialised=!1,r.filterGroupComps=[],r}return __extends$2J(t,e),t.prototype.init=function(e){var t=this;this.initialised=!0;var r={suppressExpandAll:!1,suppressFilterSearch:!1,suppressSyncLayoutWithGrid:!1,api:this.gridApi,columnApi:this.columnApi,context:this.gridOptionsService.context};ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.mergeDeep(r,e),this.params=r,this.params.suppressSyncLayoutWithGrid||this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_COLUMN_MOVED,function(){return t.onColumnsChanged()}),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_NEW_COLUMNS_LOADED,function(){return t.onColumnsChanged()}),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_INTERNAL_TOOL_PANEL_VISIBLE_CHANGED,function(e){"filters"===e.key&&t.refreshFilters(e.visible)}),this.columnModel.isReady()&&this.onColumnsChanged()},t.prototype.onColumnsChanged=function(){var e=this.columnModel.isPivotMode();
2this.params.suppressSyncLayoutWithGrid||e?this.buildTreeFromProvidedColumnDefs():this.syncFilterLayout()},t.prototype.syncFilterLayout=function(){this.toolPanelColDefService.syncLayoutWithGrid(this.setFiltersLayout.bind(this))},t.prototype.buildTreeFromProvidedColumnDefs=function(){var e=this.columnModel.getPrimaryColumnTree();this.recreateFilters(e)},t.prototype.setFiltersLayout=function(e){var t=this.toolPanelColDefService.createColumnTree(e);this.recreateFilters(t)},t.prototype.recreateFilters=function(e){var t=this,r=this.gridOptionsService.getDocument().activeElement,o=this.getExpansionState();this.destroyFilters(),this.filterGroupComps=this.recursivelyAddComps(e,0,o);var i=this.filterGroupComps.length;i&&(this.filterGroupComps.forEach(function(e){return t.appendChild(e)}),this.setFirstAndLastVisible(0,i-1)),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.exists(this.searchFilterText)&&this.searchFilters(this.searchFilterText),this.fireExpandedEvent(),this.getGui().contains(r)&&r.focus()},t.prototype.recursivelyAddComps=function(e,t,r){var o=this;return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.flatten(e.map(function(e){if(e instanceof ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ProvidedColumnGroup)return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.flatten(o.recursivelyAddFilterGroupComps(e,t,r));var i=e;if(!o.shouldDisplayFilter(i))return[];var n=new ToolPanelFilterComp(0===t);if(o.createBean(n),n.setColumn(i),r.get(i.getId())&&n.expand(),t>0)return n;var a=o.createBean(new ToolPanelFilterGroupComp(i,[n],o.onGroupExpanded.bind(o),t,!0));return a.addCssClassToTitleBar("ag-filter-toolpanel-header"),r.get(a.getFilterGroupId())||a.collapse(),a}))},t.prototype.recursivelyAddFilterGroupComps=function(e,t,r){if(this.filtersExistInChildren(e.getChildren())){var o=e.getColGroupDef();if(o&&o.suppressFiltersToolPanel)return[];var i=e.isPadding()?t:t+1,n=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.flatten(this.recursivelyAddComps(e.getChildren(),i,r));if(e.isPadding())return n;var a=new ToolPanelFilterGroupComp(e,n,this.onGroupExpanded.bind(this),t,!1);return this.createBean(a),a.addCssClassToTitleBar("ag-filter-toolpanel-header"),!1===r.get(a.getFilterGroupId())&&a.collapse(),[a]}},t.prototype.filtersExistInChildren=function(e){var t=this;return e.some(function(e){return e instanceof ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ProvidedColumnGroup?t.filtersExistInChildren(e.getChildren()):t.shouldDisplayFilter(e)})},t.prototype.shouldDisplayFilter=function(e){var t=e.getColDef()&&e.getColDef().suppressFiltersToolPanel;return e.isFilterAllowed()&&!t},t.prototype.getExpansionState=function(){var e=new Map,t=function(r){e.set(r.getFilterGroupId(),r.isExpanded()),r.getChildren().forEac
2h(function(r){r instanceof ToolPanelFilterGroupComp?t(r):e.set(r.getColumn().getId(),r.isExpanded())})};return this.filterGroupComps.forEach(t),e},t.prototype.refresh=function(){},t.prototype.setVisible=function(t){e.prototype.setDisplayed.call(this,t),t&&!this.initialised&&this.init(this.params)},t.prototype.expandFilterGroups=function(e,t){var r=[],o=function(i){var n=i.getFilterGroupId();(!t||ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.includes(t,n))&&(e&&i.isColumnGroup()?i.expand():i.collapse(),r.push(n)),i.getChildren().forEach(function(e){e instanceof ToolPanelFilterGroupComp&&o(e)})};if(this.filterGroupComps.forEach(o),this.onGroupExpanded(),t){var i=t.filter(function(e){return r.indexOf(e)<0});i.length>0&&console.warn("AG Grid: unable to find groups for these supplied groupIds:",i)}},t.prototype.expandFilters=function(e,t){var r=[],o=function(i){if(i instanceof ToolPanelFilterGroupComp){var n=!1;return i.getChildren().forEach(function(t){o(t)&&(e?(i.expand(),n=!0):i.isColumnGroup()||i.collapse())}),n}var a=i.getColumn().getColId(),s=!t||ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.includes(t,a);return s&&(e?i.expand():i.collapse(),r.push(a)),s};if(this.filterGroupComps.forEach(o),this.onGroupExpanded(),t){var i=t.filter(function(e){return r.indexOf(e)<0});i.length>0&&console.warn("AG Grid: unable to find columns for these supplied colIds:",i)}},t.prototype.onGroupExpanded=function(){this.fireExpandedEvent()},t.prototype.fireExpandedEvent=function(){var e,t=0,r=0,o=function(e){e.isColumnGroup()&&(e.isExpanded()?t++:r++,e.getChildren().forEac
2h(function(e){e instanceof ToolPanelFilterGroupComp&&o(e)}))};this.filterGroupComps.forEach(o),e=t>0&&r>0?EXPAND_STATE.INDETERMINATE:r>0?EXPAND_STATE.COLLAPSED:EXPAND_STATE.EXPANDED,this.dispatchEvent({type:"groupExpanded",state:e})},t.prototype.performFilterSearch=function(e){this.searchFilterText=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.exists(e)?e.toLowerCase():null,this.searchFilters(this.searchFilterText)},t.prototype.searchFilters=function(e){var t,r,o=function(t){return!ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.exists(e)||-1!==t.toLowerCase().indexOf(e)},i=function(e,t){if(!(e instanceof ToolPanelFilterGroupComp))return o(e.getColumnFilterName()||"");var r=e.getChildren(),n=o(e.getFilterGroupName()),a=t||n;if(a){e.hideGroup(!1);for(var s=0;s<r.length;s++)i(r[s],a),e.hideGroupItem(!1,s);return!0}var l=!1;return r.forEach(function(r,o){var n=i(r,t);e.hideGroupItem(!n,o),n&&(l=!0)}),e.hideGroup(!l),l};this.filterGroupComps.forEach(function(e,o){i(e,!1),void 0===t?e.containsCssClass("ag-hidden")||(t=o,r=o):e.containsCssClass("ag-hidden")||r===o||(r=o)}),this.setFirstAndLastVisible(t,r)},t.prototype.setFirstAndLastVisible=function(e,t){this.filterGroupComps.forEach(function(r,o){r.removeCssClass("ag-first-group-visible"),r.removeCssClass("ag-last-group-visible"),o===e&&r.addCssClass("ag-first-group-visible"),o===t&&r.addCssClass("ag-last-group-visible")})},t.prototype.refreshFilters=function(e){this.filterGroupComps.forEach(function(t){return t.refreshFilters(e)})},t.prototype.destroyFilters=function(){this.filterGroupComps=this.destroyBeans(this.filterGroupComps),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.clearElement(this.getGui())},t.prototype.destroy=function(){this.destroyFilters(),e.prototype.destroy.call(this)},t.TEMPLATE='<div class="ag-filter-list-panel"></div>',__decorate$1X([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("gridApi")],t.prototype,"gridApi",void 0),__decorate$1X([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnApi")],t.prototype,"columnApi",void 0),__decorate$1X([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("toolPanelColDefService")],t.prototype,"toolPanelColDefService",void 0),__decorate$1X([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],t.prototype,"columnModel",void 0),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),__extends$2I=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__assign$H=function(){return __assign$H=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$H.apply(this,arguments)},__decorate$1W=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},FiltersToolPanel=function(e){function t(){var r=e.call(this,t.TEMPLATE)||this;return r.initialised=!1,r.listenerDestroyFuncs=[],r}return __extends$2I(t,e),t.prototype.init=function(e){this.initialised&&(this.listenerDestroyFuncs.forEach(function(e){return e()}),this.listenerDestroyFuncs=[]),this.initialised=!0;var t={suppressExpandAll:!1,suppressFilterSearch:!1,suppressSyncLayoutWithGrid:!1,api:this.gridApi,columnApi:this.columnApi};this.params=__assign$H(__assign$H(__assign$H({},t),e),{context:this.gridOptionsService.context}),this.filtersToolPanelHeaderPanel.init(this.params),this.filtersToolPanelListPanel.init(this.params);var r=this.params.suppressExpandAll,o=this.params.suppressFilterSearch;r&&o&&this.filtersToolPanelHeaderPanel.setDisplayed(!1),this.listenerDestroyFuncs.push(this.addManagedListener(this.filtersToolPanelHeaderPanel,"expandAll",this.onExpandAll.bind(this)),this.addManagedListener(this.filtersToolPanelHeaderPanel,"collapseAll",this.onCollapseAll.bind(this)),this.addManagedListener(this.filtersToolPanelHeaderPanel,"searchChanged",this.onSearchChanged.bind(this)),this.addManagedListener(this.filtersToolPanelListPanel,"groupExpanded",this.onGroupExpanded.bind(this)))},t.prototype.setVisible=function(t){e.prototype.setDisplayed.call(this,t),t&&!this.initialised&&this.init(this.params)},t.prototype.onExpandAll=function(){this.filtersToolPanelListPanel.expandFilterGroups(!0)},t.prototype.onCollapseAll=function(){this.filtersToolPanelListPanel.expandFilterGroups(!1)},t.prototype.onSearchChanged=function(e){this.filtersToolPanelListPanel.performFilterSearch(e.searchText)},t.prototype.setFilterLayout=function(e){this.filtersToolPanelListPanel.setFiltersLayout(e)},t.prototype.onGroupExpanded=function(e){this.filtersToolPanelHeaderPanel.setExpandState(e.state)},t.prototype.expandFilterGroups=function(e){this.filtersToolPanelListPanel.expandFilterGroups(!0,e)},t.prototype.collapseFilterGroups=function(e){this.filtersToolPanelListPanel.expandFilterGroups(!1,e)},t.prototype.expandFilters=function(e){this.filtersToolPanelListPanel.expandFilters(!0,e)},t.prototype.collapseFilters=function(e){this.filtersToolPanelListPanel.expandFilters(!1,e)}
2,t.prototype.syncLayoutWithGrid=function(){this.filtersToolPanelListPanel.syncFilterLayout()},t.prototype.refresh=function(){this.init(this.params)},t.prototype.destroy=function(){e.prototype.destroy.call(this)},t.TEMPLATE='<div class="ag-filter-toolpanel">\n            <ag-filters-tool-panel-header ref="filtersToolPanelHeaderPanel"></ag-filters-tool-panel-header>\n            <ag-filters-tool-panel-list ref="filtersToolPanelListPanel"></ag-filters-tool-panel-list>\n         </div>',__decorate$1W([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("filtersToolPanelHeaderPanel")],t.prototype,"filtersToolPanelHeaderPanel",void 0),__decorate$1W([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("filtersToolPanelListPanel")],t.prototype,"filtersToolPanelListPanel",void 0),__decorate$1W([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("gridApi")],t.prototype,"gridApi",void 0),__decorate$1W([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnApi")],t.prototype,"columnApi",void 0),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),VERSION$c="29.2.0",FiltersToolPanelModule={version:VERSION$c,moduleName:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleNames.FiltersToolPanelModule,beans:[],agStackComponents:[{componentName:"AgFiltersToolPanelHeader",componentClass:FiltersToolPanelHeaderPanel},{componentName:"AgFiltersToolPanelList",componentClass:FiltersToolPanelListPanel}],userComponents:[{componentName:"agFiltersToolPanel",componentClass:FiltersToolPanel}],dependantModules:[SideBarModule,EnterpriseCoreModule]},__extends$2H=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),TimeInterval=function(){function e(e,t,r){this._encode=e,this._decode=t,this._rangeCallback=r}return e.prototype.floor=function(e){var t=new Date(e),r=this._encode(t);return this._decode(r)},e.prototype.ceil=function(e){var t=new Date(Number(e)-1),r=this._encode(t);return this._decode(r+1)},e.prototype.range=function(e,t,r){var o,i=null===(o=this._rangeCallback)||void 0===o?void 0:o.call(this,e,t),n=this._encode(r?this.floor(e):this.ceil(e)),a=this._encode(r?this.ceil(t):this.floor(t));if(a<n)return[];for(var s=[],l=n;l<=a;l++){var c=this._decode(l);s.push(c)}return null==i||i(),s},e}(),CountableTimeInterval=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$2H(t,e),t.prototype.getOffset=function(e,t){var r="number"==typeof e||e instanceof Date?this._encode(new Date(e)):0;return Math.floor(r)%t},t.prototype.every=function(e,t){var r,o=this,i=0,n=(null!=t?t:{}).snapTo,a=void 0===n?"start":n;if("string"==typeof a){var s=i;r=function(t,r){var n="start"===a?t:r;return i=o.getOffset(n,e),function(){return i=s}}}else"number"==typeof a?i=this.getOffset(new Date(a),e):a instanceof Date&&(i=this.getOffset(a,e));return new TimeInterval(function(t){var r=o._encode(t);return Math.floor((r-i)/e)},function(t){return o._decode(t*e+i)},r)},t}(TimeInterval);function encode$b(e){return e.getTime()}function decode$b(e){return new Date(e)}var millisecond=new CountableTimeInterval(encode$b,decode$b);new Date(0).getFullYear();var durationSecond=1e3,durationMinute=60*durationSecond,durationHour=60*durationMinute,durationDay=24*durationHour,durationWeek=7*durationDay,durationMonth=30*durationDay,durationYear=365*durationDay,offset$2=(new Date).getTimezoneOffset()*durationMinute;function encode$a(e){return Math.floor((e.getTime()-offset$2)/durationSecond)}function decode$a(e){return new Date(offset$2+e*durationSecond)}var second=new CountableTimeInterval(encode$a,decode$a),offset$1=(new Date).getTimezoneOffset()*durationMinute;function encode$9(e){return Math.floor((e.getTime()-offset$1)/durationMinute)}function decode$9(e){return new Date(offset$1+e*durationMinute)}var minute=new CountableTimeInterval(encode$9,decode$9),offset=(new Date).getTimezoneOffset()*durationMinute;function encode$8(e){return Math.floor((e.getTime()-offset)/durationHour)}function decode$8(e){return new Date(offset+e*durationHour)}var hour=new CountableTimeInterval(encode$8,decode$8);function encode$7(e){var t=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate());return Math.floor(t/durationDay)}function decode$7(e){var t=new Date(0);return t.setDate(t.getDate()+e),t.setHours(0,0,0,0),t}var day=new CountableTimeInterval(encode$7,decode$7),baseSunday=new Date(2023,0,1);function weekday(e){var t=Date.UTC(baseSunday.getFullYear(),baseSunday.getMonth(),baseSunday.getDate())+e*durationDay;return new CountableTimeInterval(function(e){var r=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate());return Math.floor((r-t)/durationWeek)},function(e){var r=new Date(t);return r.setDate(r.getDate()+7*e),r})}var sunday=weekday(0),monday=weekday(1),tuesday=weekday(2),wednesday=weekday(3),thursday=weekday(4),friday=weekday(5),saturday=weekday(6);function encode$6(e){return 12*e.getFullYear()+e.getMonth()}function decode$6(e){var t=Math.floor(e/12);return new Date(t,e-12*t,1)}var month=new CountableTimeInterval(encode$6,decode$6);function encode$5(e){return e.getFullYear()}function decode$5(e){var t=new Date;return t.setFullYear(e),t.setMonth(0,1),t.setHours(0,0,0,0),t}var year=new CountableTimeInterval(encode$5,decode$5);function encode$4(e){return Math.floor(e.getTime()/durationMinute)}function decode$4(e){return new Date(e*durationMinute)}
2var utcMinute=new CountableTimeInterval(encode$4,decode$4);function encode$3(e){return Math.floor(e.getTime()/durationHour)}function decode$3(e){return new Date(e*durationHour)}var utcHour=new CountableTimeInterval(encode$3,decode$3);function encode$2(e){return Math.floor(e.getTime()/durationDay)}function decode$2(e){var t=new Date(0);return t.setUTCDate(t.getUTCDate()+e),t.setUTCHours(0,0,0,0),t}var utcDay=new CountableTimeInterval(encode$2,decode$2);function encode$1(e){return 12*e.getUTCFullYear()+e.getUTCMonth()}function decode$1(e){var t=Math.floor(e/12),r=e-12*t;return new Date(Date.UTC(t,r,1))}var utcMonth=new CountableTimeInterval(encode$1,decode$1);function encode(e){return e.getUTCFullYear()}function decode(e){var t=new Date;return t.setUTCFullYear(e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0),t}var utcYear=new CountableTimeInterval(encode,decode),time=Object.freeze({__proto__:null,millisecond,second,minute,hour,day,sunday,monday,tuesday,wednesday,thursday,friday,saturday,month,year,utcMinute,utcHour,utcDay,utcMonth,utcYear}),MOBILE=[/Android/i,/webOS/i,/iPhone/i,/iPad/i,/iPod/i,/BlackBerry/i,/Windows Phone/i];function isDesktop(){var e=navigator.userAgent;return!MOBILE.some(function(t){return t.test(e)})}var HdpiCanvas=function(){function e(e){var t=e.document,r=void 0===t?window.document:t,o=e.width,i=void 0===o?600:o,n=e.height,a=void 0===n?300:n,s=e.domLayer,l=void 0!==s&&s,c=e.zIndex,u=void 0===c?0:c,d=e.name,p=void 0===d?void 0:d,h=e.overrideDevicePixelRatio,_=void 0===h?void 0:h;this._container=void 0,this._enabled=!0,this._pixelRatio=NaN,this._width=0,this._height=0,this.document=r,this.element=r.createElement("canvas"),this.element.width=i,this.element.height=a,this.context=this.element.getContext("2d"),this.imageSource=this.context.canvas;var f=this.element.style;f.userSelect="none",f.display="block",l&&(f.position="absolute",f.zIndex=String(u),f.top="0",f.left="0",f.pointerEvents="none",f.opacity="1",p&&(this.element.id=p)),this.setPixelRatio(_),this.resize(i,a)}return Object.defineProperty(e.prototype,"container",{get:function(){return this._container},set:function(e){this._container!==e&&(this.remove(),e&&e.appendChild(this.element),this._container=e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"enabled",{get:function(){return this._enabled},set:function(e){this.element.style.display=e?"block":"none",this._enabled=!!e},enumerable:!1,configurable:!0}),e.prototype.remove=function(){var e=this.element.parentNode;null!=e&&e.removeChild(this.element)},e.prototype.destroy=function(){this.element.remove(),this.element.width=0,this.element.height=0,this.context.clearRect(0,0,0,0),Object.freeze(this)},e.prototype.snapshot=function(){},e.prototype.clear=function(){this.context.save(),this.context.resetTransform(),this.context.clearRect(0,0,this.width,this.height),this.context.restore()},e.prototype.toImage=function(){var e=this.document.createElement("img");return e.src=this.getDataURL(),e},e.prototype.getDataURL=function(e){return this.element.toDataURL(e)},e.prototype.download=function(e,t){void 0===t&&(t="image/png"),e=(e||"").trim()||"image";var r=this.getDataURL(t),o=this.document,i=o.createElement("a");i.href=r,i.download=e,i.style.display="none",o.body.appendChild(i),i.click(),o.body.removeChild(i)},Object.defineProperty(e.prototype,"pixelRatio",{get:function(){return this._pixelRatio},enumerable:!1,configurable:!0}),e.prototype.setPixelRatio=function(t){var r=null!=t?t:window.devicePixelRatio;isDesktop()||(r=1),e.overrideScale(this.context,r),this._pixelRatio=r},Object.defineProperty(e.prototype,"pixelated",{get:function(){return"pixelated"===this.element.style.imageRendering},set:function(e){this.element.style.imageRendering=e?"pixelated":"auto"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this._width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},enumerable:!1,configurable:!0}),e.prototype.resize=function(e,t){if(e>0&&t>0){var r=this,o=r.element,i=r.context,n=r.pixelRatio;o.width=Math.round(e*n),o.height=Math.round(t*n),o.style.width=e+"px",o.style.height=t+"px",i.resetTransform(),this._width=e,this._height=t}},Object.defineProperty(e,"textMeasuringContext",{get:function(){if(this._textMeasuringContext)return this._textMeasuringContext;var e=document.createElement("canvas");return this._textMeasuringContext=e.getContext("2d"),this._textMeasuringContext}
2,enumerable:!1,configurable:!0}),Object.defineProperty(e,"svgText",{get:function(){if(this._svgText)return this._svgText;var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"svg");t.setAttribute("width","100"),t.setAttribute("height","100"),t.classList?t.classList.add("text-measuring-svg"):t.setAttribute("class","text-measuring-svg"),t.style.position="absolute",t.style.top="-1000px",t.style.visibility="hidden";var r=document.createElementNS(e,"text");return r.setAttribute("x","0"),r.setAttribute("y","30"),r.setAttribute("text","black"),t.appendChild(r),document.body.appendChild(t),this._svgText=r,r},enumerable:!1,configurable:!0}),Object.defineProperty(e,"has",{get:function(){if(this._has)return this._has;var e=navigator.userAgent.indexOf("Chrome")>-1,t=navigator.userAgent.indexOf("Firefox")>-1,r=!e&&navigator.userAgent.indexOf("Safari")>-1;return this._has=Object.freeze({textMetrics:void 0!==this.textMeasuringContext.measureText("test").actualBoundingBoxDescent&&!t&&!r,getTransform:void 0!==this.textMeasuringContext.getTransform}),this._has},enumerable:!1,configurable:!0}),e.measureText=function(e,t,r,o){var i=this.textMeasuringContext;return i.font=t,i.textBaseline=r,i.textAlign=o,i.measureText(e)},e.getTextSize=function(e,t){if(this.has.textMetrics){var r=this.textMeasuringContext;r.font=t;var o=r.measureText(e);return{width:o.width,height:o.actualBoundingBoxAscent+o.actualBoundingBoxDescent}}return this.measureSvgText(e,t)},e.measureSvgText=function(e,t){var r=this.textSizeCache,o=r[t];if(o){var i=o[e];if(i)return i}else r[t]={};var n=this.svgText;n.style.font=t,n.textContent=e;var a=n.getBBox(),s={width:a.width,height:a.height};return r[t][e]=s,s},e.overrideScale=function(e,t){var r=0,o={save:function(){this.$save(),r++},restore:function(){if(!(r>0))throw new Error("AG Charts - Unable to restore() past depth 0");this.$restore(),r--},setTransform:function(e,r,o,i,n,a){"object"==typeof e?this.$setTransform(e):this.$setTransform(e*t,r*t,o*t,i*t,n*t,a*t)},resetTransform:function(){this.$setTransform(t,0,0,t,0,0)},verifyDepthZero:function(){if(0!==r)throw new Error("AG Charts - Save/restore depth is non-zero: "+r)}};for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(e["$"+i]||(e["$"+i]=e[i]),e[i]=o[i])},e.textSizeCache={},e}(),__assign$G=function(){return __assign$G=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$G.apply(this,arguments)},__read$Z=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},BBox=function(){function e(e,t,r,o){this.x=e,this.y=t,this.width=r,this.height=o}return e.prototype.clone=function(){var t=this;return new e(t.x,t.y,t.width,t.height)},e.prototype.equals=function(e){return this.x===e.x&&this.y===e.y&&this.width===e.width&&this.height===e.height},e.prototype.containsPoint=function(e,t){return e>=this.x&&e<=this.x+this.width&&t>=this.y&&t<=this.y+this.height},e.prototype.isInfinite=function(){return Math.abs(this.x)===1/0||Math.abs(this.y)===1/0||Math.abs(this.width)===1/0||Math.abs(this.height)===1/0},e.prototype.shrink=function(e,t){var r=this,o=function(e,t){switch(e){case"top":r.y+=t;case"bottom":r.height-=t;break;case"left":r.x+=t;case"right":r.width-=t;break;case"vertical":r.y+=t,r.height-=2*t;break;case"horizontal":r.x+=t,r.width-=2*t;break;default:r.x+=t,r.width-=2*t,r.y+=t,r.height-=2*t}};return"number"==typeof e?o(t,e):Object.entries(e).forEach(function(e){var t=__read$Z(e,2),r=t[0],i=t[1];return o(r,i)}),this},e.prototype.grow=function(e,t){if("number"==typeof e)this.shrink(-e,t);else{var r=__assign$G({},e);for(var o in r)r[o]*=-1;this.shrink(r)}return this},e.merge=function(t){var r=1/0,o=1/0,i=-1/0,n=-1/0;return t.forEach(function(e){e.x<r&&(r=e.x),e.y<o&&(o=e.y),e.x+e.width>i&&(i=e.x+e.width),e.y+e.height>n&&(n=e.y+e.height)}),new e(r,o,i-r,n-o)},e}(),__read$Y=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a}
2,Matrix=function(){function e(e){void 0===e&&(e=[1,0,0,1,0,0]),this.elements=e}return e.prototype.setElements=function(e){var t=this.elements;return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],this},Object.defineProperty(e.prototype,"identity",{get:function(){var e=this.elements;return 1===e[0]&&0===e[1]&&0===e[2]&&1===e[3]&&0===e[4]&&0===e[5]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"a",{get:function(){return this.elements[0]},set:function(e){this.elements[0]=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"b",{get:function(){return this.elements[1]},set:function(e){this.elements[1]=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"c",{get:function(){return this.elements[2]},set:function(e){this.elements[2]=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"d",{get:function(){return this.elements[3]},set:function(e){this.elements[3]=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"e",{get:function(){return this.elements[4]},set:function(e){this.elements[4]=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"f",{get:function(){return this.elements[5]},set:function(e){this.elements[5]=e},enumerable:!1,configurable:!0}),e.prototype.AxB=function(e,t,r){var o=e[0]*t[0]+e[2]*t[1],i=e[1]*t[0]+e[3]*t[1],n=e[0]*t[2]+e[2]*t[3],a=e[1]*t[2]+e[3]*t[3],s=e[0]*t[4]+e[2]*t[5]+e[4],l=e[1]*t[4]+e[3]*t[5]+e[5];(r=r||e)[0]=o,r[1]=i,r[2]=n,r[3]=a,r[4]=s,r[5]=l},e.prototype.multiplySelf=function(e){return this.AxB(this.elements,e.elements),this},e.prototype.multiply=function(t){var r=new Array(6);return this.AxB(this.elements,t.elements,r),new e(r)},e.prototype.preMultiplySelf=function(e){return this.AxB(e.elements,this.elements,this.elements),this},e.prototype.inverse=function(){var t=this.elements,r=t[0],o=t[1],i=t[2],n=t[3],a=t[4],s=t[5],l=1/(r*n-o*i);return new e([n*=l,-(o*=l),-(i*=l),r*=l,i*s-n*a,o*a-r*s])},e.prototype.inverseTo=function(e){var t=this.elements,r=t[0],o=t[1],i=t[2],n=t[3],a=t[4],s=t[5],l=1/(r*n-o*i);return r*=l,o*=l,i*=l,n*=l,e.setElements([n,-o,-i,r,i*s-n*a,o*a-r*s]),this},e.prototype.invertSelf=function(){var e=this.elements,t=e[0],r=e[1],o=e[2],i=e[3],n=e[4],a=e[5],s=1/(t*i-r*o);return t*=s,r*=s,o*=s,i*=s,e[0]=i,e[1]=-r,e[2]=-o,e[3]=t,e[4]=o*a-i*n,e[5]=r*n-t*a,this},e.prototype.transformPoint=function(e,t){var r=this.elements;return{x:e*r[0]+t*r[2]+r[4],y:e*r[1]+t*r[3]+r[5]}},e.prototype.transformBBox=function(e,t){var r=this.elements,o=r[0],i=r[1],n=r[2],a=r[3],s=.5*e.width,l=.5*e.height,c=e.x+s,u=e.y+l,d=Math.abs(s*o)+Math.abs(l*n),p=Math.abs(s*i)+Math.abs(l*a);return t||(t=new BBox(0,0,0,0)),t.x=c*o+u*n+r[4]-d,t.y=c*i+u*a+r[5]-p,t.width=d+d,t.height=p+p,t},e.prototype.toContext=function(e){if(!this.identity){var t=this.elements;e.transform(t[0],t[1],t[2],t[3],t[4],t[5])}},e.flyweight=function(t){return e.instance.setElements(t.elements)},e.updateTransformMatrix=function(e,t,r,o,i,n,a){var s,l,c=__read$Y([0,0],2),u=c[0],d=c[1],p=t,h=r;1===p&&1===h?(s=0,l=0):(s=null==(null==a?void 0:a.scalingCenterX)?u:null==a?void 0:a.scalingCenterX,l=null==(null==a?void 0:a.scalingCenterY)?d:null==a?void 0:a.scalingCenterY);var _,f,g=o,y=Math.cos(g),m=Math.sin(g);0===g?(_=0,f=0):(_=null==(null==a?void 0:a.rotationCenterX)?u:null==a?void 0:a.rotationCenterX,f=null==(null==a?void 0:a.rotationCenterY)?d:null==a?void 0:a.rotationCenterY);var v=i,E=n,C=s*(1-p)-_,O=l*(1-h)-f;return e.setElements([y*p,m*p,-m*h,y*h,y*C-m*O+_+v,m*C+y*O+f+E]),e},e.fromContext=function(t){var r=t.getTransform();return new e([r.a,r.b,r.c,r.d,r.e,r.f])},e.instance=new e,e}(),ID_MAP={},RedrawType;function createId$1(e){var t,r=e.constructor,o=Object.prototype.hasOwnProperty.call(r,"className")?r.className:r.name;if(!o)throw new Error("The "+r+" is missing the 'className' property.");var i=(null!==(t=ID_MAP[o])&&void 0!==t?t:0)+1;return ID_MAP[o]=i,o+"-"+i}function windowValue(e){var t="undefined"!=typeof window?window:void 0;return null==t?void 0:t[e]}function evalAvailable(){try{return eval(""),!0}catch(e){return!1}}!function(e){e[e.NONE=0]="NONE",e[e.TRIVIAL=1]="TRIVIAL",e[e.MINOR=2]="MINOR",e[e.MAJOR=3]="MAJOR"}(RedrawType||(RedrawType={}));var EVAL_USEABLE=evalAvailable();function SceneChangeDetection(opts){var _a=opts||{},_b=_a.redraw,redraw=void 0===_b?RedrawType.TRIVIAL:_b,_c=_a.type,type=void 0===_c?"normal":_c,changeCb=_a.changeCb,convertor=_a.convertor,_d=_a.checkDirtyOnAssignment,checkDirtyOnAssignment=void 0!==_d&&_d,debug=null!=windowValue("agChartsSceneChangeDetectionDebug");return function(target,key){var privateKey="__"+key;if(!target[key])if(EVAL_USEABLE){var setterJs="\n                "+(debug?"var setCount = 0;":"")+"\n                function set_"+key+"(value) {\n                    const oldValue = this."+privateKey+";\n                    "+(convertor?"value = convertor(value);":"")+"\n                    if (value !== oldValue) {\n                        this."+privateKey+" = value;\n                        "+(debug?"console.log({ t: this, property: '"+key+"', oldValue, value, stack: new Error().stack });":"")+"\n                        "+("normal"===type?"this.markDirty(this, "+redraw+");":"")+"\n                        "+("transform"===type?"this.markDirtyTransform("+redraw+");":"")+"\n                        "+("path"===type?"if (!this._dirtyPath) { this._dirtyPath = true; this.markDirty(this, "+redraw+"); }":"")+"\n                        "+("font"===type?"if (!this._dirtyFont) { this._dirtyFont = true; this.markDirty(this, "+redraw+"); }":"")+"\n                        "+(changeCb?"changeCb(this);":"")+"\n                    }\n                    "+(checkDirtyOnAssignment?"if (value != null && value._dirty > "+RedrawType.NONE+") { this.markDirty(value, value._dirty); }":"")+"\n                };\n                set_"+key+";\n            ",getterJs="\n                function get_"+key+"() {\n                    return this."+privateKey+";\n                };\n                get_"+key+";\n            ";Object.defineProperty(target,key,{set:eval(setterJs),get:eval(getterJs),enumerable:!0,configurable:!0})}else{var setter=function(e){var t=this[privateKey];(e=convertor?convertor(e):e)!==t&&(this[privateKey]=e,"normal"===type&&this.markDirty(this,redraw),"transform"===type&&this.markDirtyTransform(redraw),"path"!==type||this._dirtyPath||(this._dirtyPath=!0,this.markDirty(this,redraw)),"font"!==type||this._dirtyFont||(this._dirtyFont=!0,this.markDirty(this,redraw)),changeCb&&changeCb(this)),checkDirtyOnAssignment&&null!=e&&e._dirty>RedrawType.NONE&&this.markDirty(e,e._dirty)},getter=function(){return this[privateKey]};Object.defineProperty(target,key,{set:setter,get:getter,enumerable:!0,configurable:!0})}}}var ChangeDetectable=function(){function e(){this._dirty=RedrawType.MAJOR}return e.prototype.markDirty=function(e,t){void 0===t&&(t=RedrawType.TRIVIAL),this._dirty>t||(this._dirty=t)},e.prototype.markClean=function(e){this._dirty=RedrawType.NONE},e.prototype.isDirty=function(){return this._dirty>RedrawType.NONE},e}(),__extends$2G=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$1V=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},__values$A=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);
2if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},__read$X=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},__spread$A=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read$X(arguments[t]));return e},PointerEvents;!function(e){e[e.All=0]="All",e[e.None=1]="None"}(PointerEvents||(PointerEvents={}));var zIndexChangedCallback=function(e){e.parent&&(e.parent.dirtyZIndex=!0),e.zIndexChanged()},Node=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.serialNumber=t._nextSerialNumber++,r.id=createId$1(r),r.tag=NaN,r.isContainerNode=!1,r._children=[],r.childSet={},r.matrix=new Matrix,r.inverseMatrix=new Matrix,r._dirtyTransform=!1,r.scalingX=1,r.scalingY=1,r.scalingCenterX=null,r.scalingCenterY=null,r.rotationCenterX=null,r.rotationCenterY=null,r.rotation=0,r.translationX=0,r.translationY=0,r.visible=!0,r.dirtyZIndex=!1,r.zIndex=0,r.zIndexSubOrder=void 0,r.pointerEvents=PointerEvents.All,r}return __extends$2G(t,e),Object.defineProperty(t.prototype,"datum",{get:function(){var e;return void 0!==this._datum?this._datum:null===(e=this._parent)||void 0===e?void 0:e.datum},set:function(e){this._datum=e},enumerable:!1,configurable:!0}),t.prototype._setLayerManager=function(e){var t,r;this._layerManager=e,this._debug=null==e?void 0:e.debug;try{for(var o=__values$A(this.children),i=o.next();!i.done;i=o.next())i.value._setLayerManager(e)}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}},Object.defineProperty(t.prototype,"layerManager",{get:function(){return this._layerManager},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return this._parent},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"children",{get:function(){return this._children},enumerable:!1,configurable:!0}),t.prototype.append=function(e){var t,r;Array.isArray(e)||(e=[e]);try{for(var o=__values$A(e),i=o.next();!i.done;i=o.next()){var n=i.value;if(n.parent)throw new Error(n+" already belongs to another parent: "+n.parent+".");if(n.layerManager)throw new Error(n+" already belongs to a scene: "+n.layerManager+".");if(this.childSet[n.id])throw new Error("Duplicate "+n.constructor.name+" node: "+n);this._children.push(n),this.childSet[n.id]=!0,n._parent=this,n._setLayerManager(this.layerManager)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}this.dirtyZIndex=!0,this.markDirty(this,RedrawType.MAJOR)},t.prototype.appendChild=function(e){return this.append(e),e},t.prototype.removeChild=function(e){if(e.parent===this){var t=this.children.indexOf(e);if(t>=0)return this._children.splice(t,1),delete this.childSet[e.id],e._parent=void 0,e._setLayerManager(),this.dirtyZIndex=!0,this.markDirty(e,RedrawType.MAJOR),e}throw new Error("The node to be removed is not a child of this node.")},t.prototype.insertBefore=function(e,t){var r=e.parent;if(e.parent&&e.parent.removeChild(e),t&&t.parent===this){var o=this.children.indexOf(t);if(!(o>=0))throw new Error(t+" has "+r+" as the parent, but is not in its list of children.");this._children.splice(o,0,e),this.childSet[e.id]=!0,e._parent=this,e._setLayerManager(this.layerManager),this.dirtyZIndex=!0,this.markDirty(e,RedrawType.MAJOR)}else this.append(e);return e},t.prototype.calculateCumulativeMatrix=function(){this.computeTransformMatrix();for(var e=Matrix.flyweight(this.matrix),t=this.parent;t;)t.computeTransformMatrix(),e.preMultiplySelf(t.matrix),t=t.parent;return e},t.prototype.transformPoint=function(e,t){return this.calculateCumulativeMatrix().invertSelf().transformPoint(e,t)},t.prototype.inverseTransformPoint=function(e,t){return this.calculateCumulativeMatrix().transformPoint(e,t)},t.prototype.transformBBox=function(e){return this.calculateCumulativeMatrix().invertSelf().transformBBox(e)},t.prototype.inverseTransformBBox=function(e){return this.calculateCumulativeMatrix().transformBBox(e)},t.prototype.markDirtyTransform=function(){this._dirtyTransform=!0,this.markDirty(this,RedrawType.MAJOR)},t.prototype.containsPoint=function(e,t){return!1},t.prototype.pickNode=function(e,t){var r;if(this.visible&&this.pointerEvents!==PointerEvents.None&&this.containsPoint(e,t)){var o=this.children;if(o.length>1e3){for(var i=o.length-1;i>=0;i--)if(n=(null===(r=o[i].computeBBox())||void 0===r?void 0:r.containsPoint(e,t))?o[i].pickNode(e,t):void 0)return n}else if(o.length)for(i=o.length-1;i>=0;i--){var n;if(n=o[i].pickNode(e,t))return n}else if(!this.isContainerNode)return this}},t.prototype.findNodes=function(e){var t,r,o=e(this)?[this]:[];try{for(var i=__values$A(this.children),n=i.next();!n.done;n=i.next()){var a=n.value.findNodes(e);a&&o.push.apply(o,__spread$A(a))}}catch(e){t={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return o},t.prototype.computeBBox=function(){},t.prototype.computeTransformedBBox=function(){var e=this.computeBBox();if(e){this.computeTransformMatrix();
2for(var t=Matrix.flyweight(this.matrix),r=this.parent;r;)r.computeTransformMatrix(),t.preMultiplySelf(r.matrix),r=r.parent;return t.transformBBox(e,e),e}},t.prototype.computeTransformMatrix=function(){if(this._dirtyTransform){var e=this,t=e.matrix,r=e.scalingX,o=e.scalingY,i=e.rotation,n=e.translationX,a=e.translationY,s=e.scalingCenterX,l=e.scalingCenterY,c=e.rotationCenterX,u=e.rotationCenterY;Matrix.updateTransformMatrix(t,r,o,i,n,a,{scalingCenterX:s,scalingCenterY:l,rotationCenterX:c,rotationCenterY:u}),t.inverseTo(this.inverseMatrix),this._dirtyTransform=!1}},t.prototype.render=function(e){var t=e.stats;this._dirty=RedrawType.NONE,t&&t.nodesRendered++},t.prototype.clearBBox=function(e){var t=this.computeBBox();if(null!=t){var r=t.x,o=t.y,i=t.width,n=t.height,a=this.transformPoint(r,o),s=this.transformPoint(r+i,o+n);e.clearRect(a.x,a.y,s.x-a.x,s.y-a.y)}},t.prototype.markDirty=function(e,t,r){void 0===t&&(t=RedrawType.TRIVIAL),void 0===r&&(r=t),this._dirty>t||this._dirty===t&&t===r||(this._dirty=t,this.parent?this.parent.markDirty(this,r):this.layerManager&&this.layerManager.markDirty())},Object.defineProperty(t.prototype,"dirty",{get:function(){return this._dirty},enumerable:!1,configurable:!0}),t.prototype.markClean=function(e){var t,r,o=e||{},i=o.force,n=void 0!==i&&i,a=o.recursive,s=void 0===a||a;if((this._dirty!==RedrawType.NONE||n)&&(this._dirty=RedrawType.NONE,s))try{for(var l=__values$A(this.children),c=l.next();!c.done;c=l.next())c.value.markClean()}catch(e){t={error:e}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(t)throw t.error}}},t.prototype.visibilityChanged=function(){},Object.defineProperty(t.prototype,"nodeCount",{get:function(){var e,t,r=1,o=this._dirty>=RedrawType.NONE||this._dirtyTransform?1:0,i=this.visible?1:0;try{for(var n=__values$A(this._children),a=n.next();!a.done;a=n.next()){var s=a.value.nodeCount,l=s.count,c=s.visibleCount,u=s.dirtyCount;r+=l,i+=c,o+=u}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return{count:r,visibleCount:i,dirtyCount:o}},enumerable:!1,configurable:!0}),t.prototype.zIndexChanged=function(){},t._nextSerialNumber=0,__decorate$1V([SceneChangeDetection({type:"transform"})],t.prototype,"scalingX",void 0),__decorate$1V([SceneChangeDetection({type:"transform"})],t.prototype,"scalingY",void 0),__decorate$1V([SceneChangeDetection({type:"transform"})],t.prototype,"scalingCenterX",void 0),__decorate$1V([SceneChangeDetection({type:"transform"})],t.prototype,"scalingCenterY",void 0),__decorate$1V([SceneChangeDetection({type:"transform"})],t.prototype,"rotationCenterX",void 0),__decorate$1V([SceneChangeDetection({type:"transform"})],t.prototype,"rotationCenterY",void 0),__decorate$1V([SceneChangeDetection({type:"transform"})],t.prototype,"rotation",void 0),__decorate$1V([SceneChangeDetection({type:"transform"})],t.prototype,"translationX",void 0),__decorate$1V([SceneChangeDetection({type:"transform"})],t.prototype,"translationY",void 0),__decorate$1V([SceneChangeDetection({redraw:RedrawType.MAJOR,changeCb:function(e){return e.visibilityChanged()}})],t.prototype,"visible",void 0),__decorate$1V([SceneChangeDetection({redraw:RedrawType.TRIVIAL,changeCb:zIndexChangedCallback})],t.prototype,"zIndex",void 0),__decorate$1V([SceneChangeDetection({redraw:RedrawType.TRIVIAL,changeCb:zIndexChangedCallback})],t.prototype,"zIndexSubOrder",void 0),t}(ChangeDetectable);function ascendingStringNumberUndefined(e,t){var r=0;return"number"==typeof e&&"number"==typeof t?r=e-t:"string"==typeof e&&"string"==typeof t?r=e.localeCompare(t):null==e&&null==t||(r=null==e?-1:null==t?1:String(e).localeCompare(String(t))),r}function compoundAscending(e,t,r){var o=function(e){return"function"==typeof e?e():e};for(var i in e){var n=r(o(e[i]),o(t[i]));if(0!==n)return n}return 0}var doOnceFlags$1={};function doOnce$1(e,t){doOnceFlags$1[t]||(e(),doOnceFlags$1[t]=!0)}var __read$W=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},__spread$z=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read$W(arguments[t]));return e},Logger={debug:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];console.log.apply(console,__spread$z(e))},warn:function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];console.warn.apply(console,__spread$z(["AG Charts - "+e],t))},error:function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];console.error.apply(console,__spread$z(["AG Charts - "+e],t))},warnOnce:function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];
2doOnce$1(function(){return Logger.warn.apply(Logger,__spread$z([e],t))},"Logger.warn: "+e)},errorOnce:function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];doOnce$1(function(){return Logger.error.apply(Logger,__spread$z([e],t))},"Logger.warn: "+e)}},__extends$2F=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__assign$F=function(){return __assign$F=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$F.apply(this,arguments)},__decorate$1U=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},__values$z=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},__read$V=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},__spread$y=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read$V(arguments[t]));return e},Group=function(e){function t(t){var r,o=e.call(this)||this;o.opts=t,o.opacity=1,o.lastBBox=void 0;var i=t||{},n=i.zIndex,a=i.zIndexSubOrder;return o.isContainerNode=!0,void 0!==n&&(o.zIndex=n),void 0!==a&&(o.zIndexSubOrder=a),o.name=null===(r=o.opts)||void 0===r?void 0:r.name,o}return __extends$2F(t,e),t.prototype.zIndexChanged=function(){var e;this.layer&&(null===(e=this._layerManager)||void 0===e||e.moveLayer(this.layer,this.zIndex,this.zIndexSubOrder))},t.prototype.isLayer=function(){return null!=this.layer},t.prototype._setLayerManager=function(t){var r,o=this;if(this._layerManager&&this.layer&&(this._layerManager.removeLayer(this.layer),this.layer=void 0),this.layer)throw new Error("AG Charts - unable to deregister scene rendering layer!");if(e.prototype._setLayerManager.call(this,t),t&&(null===(r=this.opts)||void 0===r?void 0:r.layer)){var i=this.opts||{},n=i.zIndex,a=i.zIndexSubOrder,s=i.name;this.layer=t.addLayer({zIndex:n,zIndexSubOrder:a,name:s,getComputedOpacity:function(){return o.getComputedOpacity()},getVisibility:function(){return o.getVisibility()}})}},t.prototype.getComputedOpacity=function(){var e=1,r=this;do{r instanceof t&&(e*=r.opacity)}while(r=r.parent);return e},t.prototype.getVisibility=function(){for(var e=this,t=this.visible;e=e.parent;)e.visible||(t=e.visible);return t},t.prototype.visibilityChanged=function(){this.layer&&(this.layer.enabled=this.visible)},t.prototype.markDirty=function(t,r){void 0===r&&(r=RedrawType.TRIVIAL);var o=r<=RedrawType.MINOR?RedrawType.TRIVIAL:r;e.prototype.markDirty.call(this,t,r,o)},t.prototype.containsPoint=function(e,t){return!0},t.prototype.computeBBox=function(){return this.computeTransformMatrix(),t.computeBBox(this.children)},t.prototype.computeTransformedBBox=function(){return this.computeBBox()},t.prototype.render=function(t){var r,o,i,n,a=this.opts,s=(void 0===a?{}:a).name,l=void 0===s?void 0:s,c=this._debug,u=(void 0===c?{}:c).consoleLog,d=void 0!==u&&u,p=this,h=p.dirty,_=p.dirtyZIndex,f=p.layer,g=p.children,y=p.clipRect,m=t.ctx,v=t.forceRender,E=t.clipBBox,C=t.resized,O=t.stats,P=m.getTransform(),S=h>=RedrawType.MINOR||_||C,b=S||g.some(function(e){return e.dirty>=RedrawType.TRIVIAL});if(l&&d&&Logger.debug({name:l,group:this,isDirty:S,isChildDirty:b,renderCtx:t,forceRender:v}),f){var D=this.computeBBox();void 0!==this.lastBBox&&this.lastBBox.equals(D)?D.isInfinite()||(v=!1):(v=!0,this.lastBBox=D)}if(!S&&!b&&!v){if(l&&d&&O){var M=this.nodeCount;Logger.debug({name:l,result:"skipping",renderCtx:t,counts:M,group:this})}return f&&O&&(O.layersSkipped++,O.nodesSkipped+=this.nodeCount.count),void this.markClean({recursive:!1})}var T=this.visible;if(f){if((m=f.context).save(),m.resetTransform(),v=!0,f.clear(),E){var A=E.width,x=E.height,w=E.x,R=E.y;d&&Logger.debug({name:l,clipBBox:E,ctxTransform:m.getTransform(),renderCtx:t,group:this}),this.clipCtx(m,w,R,A,x)}m.setTransform(P)}else m.globalAlpha*=this.opacity;this.computeTransformMatrix(),this.matrix.toContext(m),y&&(w=y.x,R=y.y,A=y.width,x=y.height,m.save(),d&&Logger.debug({name:l,clipRect:y,ctxTransform:m.getTransform(),renderCtx:t,group:this}),this.clipCtx(m,w,R,A,x),E=this.matrix.inverse().transformBBox(y)),_&&(this.sortChildren(),v=!0);var I=v!==t.forceRender||E!==t.clipBBox||m!==t.ctx?__assign$F(__assign$F({},t),{ctx:m,forceRender:v,clipBBox:E}):t,L=0;try{for(var N=__values$z(g),k=N.next();!k.done;k=N.next()){var B=k.value;B.visible&&T?v||B.dirty!==RedrawType.NONE?(m.save(),B.render(I),m.restore(
2)):O&&(L+=B.nodeCount.count):(B.markClean(),O&&(L+=B.nodeCount.count))}}catch(e){r={error:e}}finally{try{k&&!k.done&&(o=N.return)&&o.call(N)}finally{if(r)throw r.error}}O&&(O.nodesSkipped+=L),e.prototype.render.call(this,t),y&&m.restore(),f&&(O&&O.layersRendered++,m.restore(),f.snapshot(),null===(n=(i=f.context).verifyDepthZero)||void 0===n||n.call(i)),l&&d&&O&&(M=this.nodeCount,Logger.debug({name:l,result:"rendered",skipped:L,renderCtx:t,counts:M,group:this}))},t.prototype.sortChildren=function(){this.dirtyZIndex=!1,this.children.sort(function(e,t){var r,o;return compoundAscending(__spread$y([e.zIndex],null!==(r=e.zIndexSubOrder)&&void 0!==r?r:[void 0,void 0],[e.serialNumber]),__spread$y([t.zIndex],null!==(o=t.zIndexSubOrder)&&void 0!==o?o:[void 0,void 0],[t.serialNumber]),ascendingStringNumberUndefined)})},t.prototype.clipCtx=function(e,t,r,o,i){e.beginPath(),e.moveTo(t,r),e.lineTo(t+o,r),e.lineTo(t+o,r+i),e.lineTo(t,r+i),e.closePath(),e.clip()},t.computeBBox=function(e){var t=1/0,r=-1/0,o=1/0,i=-1/0;return e.forEach(function(e){if(e.visible){var n=e.computeTransformedBBox();if(n){var a=n.x,s=n.y;a<t&&(t=a),s<o&&(o=s),a+n.width>r&&(r=a+n.width),s+n.height>i&&(i=s+n.height)}}}),new BBox(t,o,r-t,i-o)},t.prototype.setClipRectInGroupCoordinateSpace=function(e){this.clipRect=e?this.transformBBox(e):void 0},t.className="Group",__decorate$1U([SceneChangeDetection({convertor:function(e){return Math.min(1,Math.max(0,e))}})],t.prototype,"opacity",void 0),t}(Node),HdpiOffscreenCanvas=function(){function e(e){var t=e.width,r=void 0===t?600:t,o=e.height,i=void 0===o?300:o,n=e.overrideDevicePixelRatio,a=void 0===n?void 0:n;this.enabled=!0,this._pixelRatio=NaN,this._width=0,this._height=0,this.canvas=new OffscreenCanvas(r,i),this.context=this.canvas.getContext("2d"),this.imageSource=this.canvas.transferToImageBitmap(),this.setPixelRatio(a),this.resize(r,i)}return e.isSupported=function(){return null!=window.OffscreenCanvas},e.prototype.snapshot=function(){this.imageSource.close(),this.imageSource=this.canvas.transferToImageBitmap()},e.prototype.destroy=function(){this.imageSource.close(),this.canvas.width=0,this.canvas.height=0,this.context.clearRect(0,0,0,0)},e.prototype.clear=function(){this.context.save(),this.context.resetTransform(),this.context.clearRect(0,0,this.width,this.height),this.context.restore()},Object.defineProperty(e.prototype,"pixelRatio",{get:function(){return this._pixelRatio},enumerable:!1,configurable:!0}),e.prototype.setPixelRatio=function(e){var t=null!=e?e:window.devicePixelRatio;isDesktop()||(t=1),HdpiCanvas.overrideScale(this.context,t),this._pixelRatio=t},Object.defineProperty(e.prototype,"width",{get:function(){return this._width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},enumerable:!1,configurable:!0}),e.prototype.resize=function(e,t){if(e>0&&t>0){var r=this,o=r.canvas,i=r.context,n=r.pixelRatio;o.width=Math.round(e*n),o.height=Math.round(t*n),i.resetTransform(),this._width=e,this._height=t}},e}(),__assign$E=function(){return __assign$E=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$E.apply(this,arguments)},__awaiter$f=function(e,t,r,o){return new(r||(r=Promise))(function(i,n){function a(e){try{l(o.next(e))}catch(e){n(e)}}function s(e){try{l(o.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})},__generator$f=function(e,t){var r,o,i,n,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return n={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function s(n){return function(s){return function(n){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(i=2&n[0]?o.return:n[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,n[1])).done)return i;switch(o=0,i&&(n=[2&n[0],i.value]),n[0]){case 0:case 1:i=n;break;case 4:return a.label++,{value:n[1],done:!1};case 5:a.label++,o=n[1],n=[0];continue;case 7:n=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==n[0]&&2!==n[0])){a=0;continue}if(3===n[0]&&(!i||n[1]>i[0]&&n[1]<i[3])){a.label=n[1];break}if(6===n[0]&&a.label<i[1]){a.label=i[1],i=n;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(n);break}i[2]&&a.ops.pop(),a.trys.pop();continue}n=t.call(e,a)}catch(e){n=[6,e],o=0}finally{r=i=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,s])}}},__read$U=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},__spread$x=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read$U(arguments[t]));return e},__values$y=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);
2if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function buildSceneNodeHighlight(){var e,t=null!==(e=windowValue("agChartsSceneDebug"))&&void 0!==e?e:[];"string"==typeof t&&(t=[t]);var r=[];return t.forEach(function(e){"layout"===e?r.push("seriesRoot","legend","root",/.*Axis-\d+-axis.*/):r.push(e)}),r}var Scene=function(){function e(e){var t,r;this.id=createId$1(this),this.layers=[],this._nextZIndex=0,this._nextLayerId=0,this._dirty=!1,this._root=null,this.debug={dirtyTree:!1,stats:!1,renderBoundingBoxes:!1,consoleLog:!1,sceneNodeHighlight:[]};var o=e.document,i=void 0===o?window.document:o,n=e.mode,a=void 0===n?windowValue("agChartsSceneRenderModel")||"adv-composite":n,s=e.width,l=e.height,c=e.overrideDevicePixelRatio,u=void 0===c?void 0:c;this.overrideDevicePixelRatio=u,this.opts={document:i,mode:a},this.debug.consoleLog=!0===windowValue("agChartsDebug"),this.debug.stats=null!==(t=windowValue("agChartsSceneStats"))&&void 0!==t&&t,this.debug.dirtyTree=null!==(r=windowValue("agChartsSceneDirtyTree"))&&void 0!==r&&r,this.debug.sceneNodeHighlight=buildSceneNodeHighlight(),this.canvas=new HdpiCanvas({document:i,width:s,height:l,overrideDevicePixelRatio:u})}return Object.defineProperty(e.prototype,"container",{get:function(){return this.canvas.container},set:function(e){this.canvas.container=e},enumerable:!1,configurable:!0}),e.prototype.download=function(e,t){this.canvas.download(e,t)},e.prototype.getDataURL=function(e){return this.canvas.getDataURL(e)},Object.defineProperty(e.prototype,"width",{get:function(){return this.pendingSize?this.pendingSize[0]:this.canvas.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.pendingSize?this.pendingSize[1]:this.canvas.height},enumerable:!1,configurable:!0}),e.prototype.resize=function(e,t){e=Math.round(e),t=Math.round(t);var r=e<=0||t<=0,o=isNaN(e)||isNaN(t);return!(e===this.width&&t===this.height||o||r||(this.pendingSize=[e,t],this.markDirty(),0))},e.prototype.addLayer=function(e){var t,r=this.opts.mode;if(["composite","dom-composite","adv-composite"].includes(r)){var o=e.zIndex,i=void 0===o?this._nextZIndex++:o,n=e.name,a=e.zIndexSubOrder,s=e.getComputedOpacity,l=e.getVisibility,c=this,u=c.width,d=c.height,p=c.overrideDevicePixelRatio,h="dom-composite"===r,_="adv-composite"===r&&HdpiOffscreenCanvas.isSupported()?new HdpiOffscreenCanvas({width:u,height:d,overrideDevicePixelRatio:p}):new HdpiCanvas({document:this.opts.document,width:u,height:d,domLayer:h,zIndex:i,name:n,overrideDevicePixelRatio:p}),f={id:this._nextLayerId++,name:n,zIndex:i,zIndexSubOrder:a,canvas:_,getComputedOpacity:s,getVisibility:l};if(i>=this._nextZIndex&&(this._nextZIndex=i+1),this.layers.push(f),this.sortLayers(),h){var g=this.layers.map(function(e){return e.canvas}).filter(function(e){return e instanceof HdpiCanvas}),y=g.findIndex(function(e){return e===_});(null!==(t=g[y-1])&&void 0!==t?t:this.canvas).element.insertAdjacentElement("afterend",_.element)}return this.debug.consoleLog&&Logger.debug({layers:this.layers}),f.canvas}},e.prototype.removeLayer=function(e){var t=this.layers.findIndex(function(t){return t.canvas===e});t>=0&&(this.layers.splice(t,1),e.destroy(),this.markDirty(),this.debug.consoleLog&&Logger.debug({layers:this.layers}))},e.prototype.moveLayer=function(e,t,r){var o=this.layers.find(function(t){return t.canvas===e});o&&(o.zIndex=t,o.zIndexSubOrder=r,this.sortLayers(),this.markDirty(),this.debug.consoleLog&&Logger.debug({layers:this.layers}))},e.prototype.sortLayers=function(){this.layers.sort(function(e,t){var r,o;return compoundAscending(__spread$x([e.zIndex],null!==(r=e.zIndexSubOrder)&&void 0!==r?r:[void 0,void 0],[e.id]),__spread$x([t.zIndex],null!==(o=t.zIndexSubOrder)&&void 0!==o?o:[void 0,void 0],[t.id]),ascendingStringNumberUndefined)})},e.prototype.markDirty=function(){this._dirty=!0},Object.defineProperty(e.prototype,"dirty",{get:function(){return this._dirty}
2,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"root",{get:function(){return this._root},set:function(e){e!==this._root&&(this._root&&this._root._setLayerManager(),this._root=e,e&&(null===e.parent&&e.layerManager&&e.layerManager!==this&&(e.layerManager.root=null),e._setLayerManager(this)),this.markDirty())},enumerable:!1,configurable:!0}),e.prototype.strip=function(){var e,t,r=this.layers;try{for(var o=__values$y(r),i=o.next();!i.done;i=o.next()){var n=i.value;n.canvas.destroy(),delete n.canvas}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}r.splice(0,r.length),this.root=null,this._dirty=!1,this.canvas.context.resetTransform()},e.prototype.destroy=function(){this.container=void 0,this.strip(),this.canvas.destroy(),Object.assign(this,{canvas:void 0,ctx:void 0})},e.prototype.render=function(e){var t;return __awaiter$f(this,void 0,void 0,function(){var r,o,i,n,a,s,l,c,u,d,p,h,_,f,g,y,m,v;return __generator$f(this,function(E){return o=(r=e||{}).debugSplitTimes,i=void 0===o?[performance.now()]:o,n=r.extraDebugStats,a=void 0===n?{}:n,l=(s=this).canvas,c=s.canvas.context,u=s.root,d=s.layers,p=s.pendingSize,h=s.opts.mode,p&&((v=this.canvas).resize.apply(v,__spread$x(p)),this.layers.forEach(function(e){var t;return(t=e.canvas).resize.apply(t,__spread$x(p))}),this.pendingSize=void 0),u&&!u.visible?(this._dirty=!1,[2]):u&&!this.dirty?(this.debug.consoleLog&&Logger.debug("no-op",{redrawType:RedrawType[u.dirty],tree:this.buildTree(u)}),this.debugStats(i,c,void 0,a),[2]):(_={ctx:c,forceRender:!0,resized:!!p,debugNodes:{}},"detailed"===this.debug.stats&&(_.stats={layersRendered:0,layersSkipped:0,nodesRendered:0,nodesSkipped:0}),f=!1,(!u||u.dirty>=RedrawType.TRIVIAL)&&(f=!0,l.clear()),u&&this.debug.dirtyTree&&(g=this.buildDirtyTree(u),y=g.dirtyTree,m=g.paths,Logger.debug({dirtyTree:y,paths:m})),u&&f&&(this.debug.consoleLog&&Logger.debug("before",{redrawType:RedrawType[u.dirty],canvasCleared:f,tree:this.buildTree(u)}),u.visible&&(c.save(),u.render(_),c.restore())),"dom-composite"!==h&&d.length>0&&f&&(this.sortLayers(),c.save(),c.setTransform(1/l.pixelRatio,0,0,1/l.pixelRatio,0,0),d.forEach(function(e){var t=e.canvas,r=t.imageSource,o=t.enabled,i=e.getComputedOpacity,n=e.getVisibility;o&&n()&&(c.globalAlpha=i(),c.drawImage(r,0,0))}),c.restore()),null===(t=c.verifyDepthZero)||void 0===t||t.call(c),this._dirty=!1,this.debugStats(i,c,_.stats,a),this.debugSceneNodeHighlight(c,this.debug.sceneNodeHighlight,_.debugNodes),u&&this.debug.consoleLog&&Logger.debug("after",{redrawType:RedrawType[u.dirty],canvasCleared:f,tree:this.buildTree(u)}),[2])})})},e.prototype.debugStats=function(e,t,r,o){var i,n;void 0===o&&(o={});var a=performance.now();if(this.debug.stats){var s=e[0];e.push(a);var l=function(e,t){var r=e+t;return e+" / "+r+" ("+Math.round(100*e/r)+"%)"},c=function(e,t){return Math.round(100*(t-e))/100+"ms"},u=null!=r?r:{},d=u.layersRendered,p=void 0===d?0:d,h=u.layersSkipped,_=void 0===h?0:h,f=u.nodesRendered,g=void 0===f?0:f,y=u.nodesSkipped,m=void 0===y?0:y,v=e.map(function(t,r){return r>0?c(e[r-1],t):null}).filter(function(e){return null!=e}).join(" + "),E=Object.entries(o).map(function(e){var t=__read$U(e,2);return t[0]+": "+t[1]}).join(" ; "),C=[c(s,a)+" ("+v+")",""+E,"detailed"===this.debug.stats?"Layers: "+l(p,_):null,"detailed"===this.debug.stats?"Nodes: "+l(g,m):null].filter(function(e){return null!=e});t.save(),t.fillStyle="white",t.fillRect(0,0,200,10+15*C.length),t.fillStyle="black";var O=0;try{for(var P=__values$y(C),S=P.next();!S.done;S=P.next()){var b=S.value;t.fillText(b,2,10+15*O++)}}catch(e){i={error:e}}finally{try{S&&!S.done&&(n=P.return)&&n.call(P)}finally{if(i)throw i.error}}t.restore()}},e.prototype.debugSceneNodeHighlight=function(e,t,r){var o,i,n,a,s,l,c,u=function(e){return function(t){return!!e.test(t.id)||t instanceof Group&&null!=t.name&&e.test(t.name)}},d=function(e){return function(t){return e===t.id||t instanceof Group&&null!=t.name&&e===t.name}};try{for(var p=__values$y(t),h=p.next();!h.done;h=p.next()){var _=h.value;if("string"!=typeof _||null==r[_]){var f="string"==typeof _?d(_):u(_),g=null===(c=this.root)||void 0===c?void 0:c.findNodes(f);if(g&&0!==g.length)try{for(var y=(n=void 0,__values$y(g)),m=y.next();!m.done;m=y.next())(C=m.value)instanceof Group&&C.name?r[C.name]=C:r[C.id]=C}catch(e){n={error:e}}finally{try{m&&!m.done&&(a=y.return)&&a.call(y)}finally{if(n)throw n.error}}
2else Logger.debug("no debugging node with id ["+_+"] in scene graph.")}}}catch(e){o={error:e}}finally{try{h&&!h.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}e.save();try{for(var v=__values$y(Object.entries(r)),E=v.next();!E.done;E=v.next()){var C,O=__read$U(E.value,2),P=O[0],S=(C=O[1]).computeTransformedBBox();S?(e.globalAlpha=.8,e.strokeStyle="red",e.lineWidth=1,e.strokeRect(S.x,S.y,S.width,S.height),e.fillStyle="red",e.strokeStyle="white",e.font="16px sans-serif",e.textBaseline="top",e.textAlign="left",e.lineWidth=2,e.strokeText(P,S.x,S.y,S.width),e.fillText(P,S.x,S.y,S.width)):Logger.debug("no bbox for debugged node ["+P+"].")}}catch(e){s={error:e}}finally{try{E&&!E.done&&(l=v.return)&&l.call(v)}finally{if(s)throw s.error}}e.restore()},e.prototype.buildTree=function(e){var t,r=this,o=null!==(t=e instanceof Group?e.name:null)&&void 0!==t?t:e.id;return __assign$E({name:o,node:e,dirty:RedrawType[e.dirty]},e.children.map(function(e){return r.buildTree(e)}).reduce(function(e,t){var r=t.name,o=t.node,i=o.visible,n=o.opacity,a=o.zIndex,s=o.zIndexSubOrder,l=t.node;return(!i||n<=0)&&(r="("+r+")"),l instanceof Group&&l.isLayer()&&(r="*"+r+"*"),e[[""+(null!=r?r:"<unknown>"),"z: "+a,s&&"zo: "+s.join(" / ")].filter(function(e){return!!e}).join(" ")]=t,e},{}))},e.prototype.buildDirtyTree=function(e){var t,r=this;if(e.dirty===RedrawType.NONE)return{dirtyTree:{},paths:[]};var o=e.children.map(function(e){return r.buildDirtyTree(e)}).filter(function(e){return e.paths.length>0}),i=null!==(t=e instanceof Group?e.name:null)&&void 0!==t?t:e.id,n=0===o.length?[i]:o.map(function(e){return e.paths}).reduce(function(e,t){return e.concat(t)},[]).map(function(e){return i+"."+e});return{dirtyTree:__assign$E({name:i,node:e,dirty:RedrawType[e.dirty]},o.map(function(e){return e.dirtyTree}).filter(function(e){return void 0!==e.dirty}).reduce(function(e,t){return e[t.name||"<unknown>"]=t,e},{})),paths:n}},e.className="Scene",e}(),Observable=function(){function e(){this.allEventListeners=new Map}return e.prototype.addEventListener=function(e,t){if("function"!=typeof t)throw new Error("AG Charts - listener must be a Function");var r=this.allEventListeners,o=r.get(e);o||(o=new Set,r.set(e,o)),o.has(t)||o.add(t)},e.prototype.removeEventListener=function(e,t){var r=this.allEventListeners,o=r.get(e);o&&(o.delete(t),0===o.size&&r.delete(e))},e.prototype.hasEventListener=function(e){return this.allEventListeners.has(e)},e.prototype.clearEventListeners=function(){this.allEventListeners.clear()},e.prototype.fireEvent=function(e){var t=this.allEventListeners.get(e.type);null==t||t.forEach(function(t){return t(e)})},e}(),isString$1=function(e){return"string"==typeof e},isStringObject$1=function(e){return!!e&&Object.prototype.hasOwnProperty.call(e,"toString")&&isString$1(e.toString())},isDate$1=function(e){return e instanceof Date&&!isNaN(+e)};function isDiscrete(e){return isString$1(e)||isStringObject$1(e)}function isContinuous(e){var t;return isNumber$4(e)||!!(t=e)&&Object.prototype.hasOwnProperty.call(t,"valueOf")&&isNumber$4(t.valueOf())||function(e){return e instanceof Date&&!isNaN(+e)}(e)}function checkDatum(e,t){return t&&isContinuous(e)?e:t?void 0:isDiscrete(e)?e:String(e)}var isNumber$4=function(e){return"number"==typeof e&&Number.isFinite(e)},__read$T=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},Color=function(){function e(e,t,r,o){void 0===o&&(o=1),this.r=Math.min(1,Math.max(0,e||0)),this.g=Math.min(1,Math.max(0,t||0)),this.b=Math.min(1,Math.max(0,r||0)),this.a=Math.min(1,Math.max(0,o||0))}return e.validColorString=function(t){return t.indexOf("#")>=0?!!e.parseHex(t):t.indexOf("rgb")>=0?!!e.stringToRgba(t):!!e.nameToHex[t.toLowerCase()]},e.fromString=function(t){if(t.indexOf("#")>=0)return e.fromHexString(t);var r=e.nameToHex[t.toLowerCase()];if(r)return e.fromHexString(r);if(t.indexOf("rgb")>=0)return e.fromRgbaString(t);throw new Error("Invalid color string: '"+t+"'")},e.tryParseFromString=function(t){try{return e.fromString(t)}
2catch(r){return Logger.warnOnce("invalid color string: '"+t+"'."),e.fromArray([0,0,0])}},e.parseHex=function(e){var t;switch((e=e.replace(/ /g,"").slice(1)).length){case 6:case 8:t=[];for(var r=0;r<e.length;r+=2)t.push(parseInt(""+e[r]+e[r+1],16));break;case 3:case 4:t=e.split("").map(function(e){return parseInt(e,16)}).map(function(e){return e+16*e})}if((null==t?void 0:t.length)>=3&&t.every(function(e){return e>=0}))return 3===t.length&&t.push(255),t},e.fromHexString=function(t){var r=e.parseHex(t);if(r){var o=__read$T(r,4);return new e(o[0]/255,o[1]/255,o[2]/255,o[3]/255)}throw new Error("Malformed hexadecimal color string: '"+t+"'")},e.stringToRgba=function(e){for(var t=__read$T([NaN,NaN],2),r=t[0],o=t[1],i=0;i<e.length;i++){var n=e[i];if(r||"("!==n){if(")"===n){o=i;break}}else r=i}var a=r&&o&&e.substring(r+1,o);if(a){var s=a.split(","),l=[];for(i=0;i<s.length;i++){var c=s[i],u=parseFloat(c);if(isNaN(u))return;c.indexOf("%")>=0?(u=Math.max(0,Math.min(100,u)),u/=100):3===i?u=Math.max(0,Math.min(1,u)):(u=Math.max(0,Math.min(255,u)),u/=255),l.push(u)}return l}},e.fromRgbaString=function(t){var r=e.stringToRgba(t);if(r){if(3===r.length)return new e(r[0],r[1],r[2]);if(4===r.length)return new e(r[0],r[1],r[2],r[3])}throw new Error("Malformed rgb/rgba color string: '"+t+"'")},e.fromArray=function(t){if(4===t.length)return new e(t[0],t[1],t[2],t[3]);if(3===t.length)return new e(t[0],t[1],t[2]);throw new Error("The given array should contain 3 or 4 color components (numbers).")},e.fromHSB=function(t,r,o,i){void 0===i&&(i=1);var n=e.HSBtoRGB(t,r,o);return new e(n[0],n[1],n[2],i)},e.padHex=function(e){return 1===e.length?"0"+e:e},e.prototype.toHexString=function(){var t="#"+e.padHex(Math.round(255*this.r).toString(16))+e.padHex(Math.round(255*this.g).toString(16))+e.padHex(Math.round(255*this.b).toString(16));return this.a<1&&(t+=e.padHex(Math.round(255*this.a).toString(16))),t},e.prototype.toRgbaString=function(e){void 0===e&&(e=3);var t=[Math.round(255*this.r),Math.round(255*this.g),Math.round(255*this.b)],r=Math.pow(10,e);return 1!==this.a?(t.push(Math.round(this.a*r)/r),"rgba("+t.join(", ")+")"):"rgb("+t.join(", ")+")"},e.prototype.toString=function(){return 1===this.a?this.toHexString():this.toRgbaString()},e.prototype.toHSB=function(){return e.RGBtoHSB(this.r,this.g,this.b)},e.RGBtoHSB=function(e,t,r){var o=Math.min(e,t,r),i=Math.max(e,t,r),n=NaN;if(o!==i){var a=i-o,s=(i-e)/a,l=(i-t)/a,c=(i-r)/a;n=e===i?c-l:t===i?2+s-c:4+l-s,(n/=6)<0&&(n+=1)}return[360*n,0!==i?(i-o)/i:0,i]},e.HSBtoRGB=function(e,t,r){isNaN(e)&&(e=0),e=(e%360+360)%360/360;var o=0,i=0,n=0;if(0===t)o=i=n=r;else{var a=6*(e-Math.floor(e)),s=a-Math.floor(a),l=r*(1-t),c=r*(1-t*s),u=r*(1-t*(1-s));switch(0|a){case 0:o=r,i=u,n=l;break;case 1:o=c,i=r,n=l;break;case 2:o=l,i=r,n=u;break;case 3:o=l,i=c,n=r;break;case 4:o=u,i=l,n=r;break;case 5:o=r,i=l,n=c}}return[o,i,n]},e.prototype.derive=function(t,r,o,i){var n=e.RGBtoHSB(this.r,this.g,this.b),a=n[2];0==a&&o>1&&(a=.05);var s=((n[0]+t)%360+360)%360,l=Math.max(Math.min(n[1]*r,1),0);a=Math.max(Math.min(a*o,1),0);var c=Math.max(Math.min(this.a*i,1),0),u=e.HSBtoRGB(s,l,a);return u.push(c),e.fromArray(u)},e.prototype.brighter=function(){return this.derive(0,1,1/.7,1)},e.prototype.darker=function(){return this.derive(0,1,.7,1)},e.nameToHex=Object.freeze({aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgreen:"#006400",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",green:"#008000",greenyellow:"#ADFF2F",grey:"#808080",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA5
25D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",transparent:"#00000000",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",yellowgreen:"#9ACD32"}),e}(),__values$x=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},BREAK_TRANSFORM_CHAIN=Symbol("BREAK"),CONFIG_KEY="__decorator_config";function initialiseConfig(e,t,r,o){null==Object.getOwnPropertyDescriptor(e,CONFIG_KEY)&&Object.defineProperty(e,CONFIG_KEY,{value:{}});var i=e[CONFIG_KEY];if(null!=i[r])return i[r];i[r]={setters:[],getters:[]};var n=Object.getOwnPropertyDescriptor(e,t),a=null==n?void 0:n.set,s=null==n?void 0:n.get;return Object.defineProperty(e,t,{set:function(e){var n,l,c,u,d,p=null!==(u=null===(c=i[r])||void 0===c?void 0:c.setters)&&void 0!==u?u:[];p.some(function(e){return e.length>2})&&(d=s?s.call(this):this[o]);try{for(var h=__values$x(p),_=h.next();!_.done;_=h.next())if((e=(0,_.value)(this,t,e,d))===BREAK_TRANSFORM_CHAIN)return}catch(e){n={error:e}}finally{try{_&&!_.done&&(l=h.return)&&l.call(h)}finally{if(n)throw n.error}}a?a.call(this,e):this[o]=e},get:function(){var e,n,a,l,c=s?s.call(this):this[o];try{for(var u=__values$x(null!==(l=null===(a=i[r])||void 0===a?void 0:a.getters)&&void 0!==l?l:[]),d=u.next();!d.done;d=u.next())if((c=(0,d.value)(this,t,c))===BREAK_TRANSFORM_CHAIN)return}catch(t){e={error:t}}finally{try{d&&!d.done&&(n=u.return)&&n.call(u)}finally{if(e)throw e.error}}return c},enumerable:!0,configurable:!1}),i[r]}function addTransformToInstanceProperty(e,t){return function(r,o){var i=o.toString(),n=initialiseConfig(r,o,i,"__"+i),a=n.getters;n.setters.push(e),t&&a.splice(0,0,t)}}function Validate(e){return addTransformToInstanceProperty(function(t,r,o){var i,n,a;if(e(o,{target:t}))return o;var s=r.toString().replace(/^_*/,""),l=null!==(n=null===(i=t.constructor)||void 0===i?void 0:i.className)&&void 0!==n?n:null===(a=t.constructor)||void 0===a?void 0:a.name;(null==l?void 0:l.length)<3&&(l=null);var c=l?"of ["+l+"] ":"";return e.message?Logger.warn("Property ["+s+"] "+c+"cannot be set to ["+JSON.stringify(o)+"]; "+e.message+", ignoring."):Logger.warn("Property ["+s+"] "+c+"cannot be set to ["+JSON.stringify(o)+"], ignoring."),BREAK_TRANSFORM_CHAIN})}function predicateWithMessage(e,t){return e.message=t,e}var OPTIONAL=function(e,t,r){return void 0===e||r(e,t)},ARRAY=function(e,t){return predicateWithMessage(function(r,o){return Array.isArray(r)&&(!e||r.length===e)&&(!t||r.every(function(e){return t(e,o)}))},"expecting an Array")},OPT_ARRAY=function(e){return predicateWithMessage(function(t,r){return OPTIONAL(t,r,ARRAY(e))},"expecting an optional Array")},AND=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return predicateWithMessage(function(t,r){return e.every(function(e){return e(t,r)})},e.map(function(e){return e.message}).filter(function(e){return null!=e}).join(" AND "))},OR=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return predicateWithMessage(function(t,r){return e.some(function(e){return e(t,r)})},e.map(function(e){return e.message}).filter(function(e){return null!=e}).join(" OR "))},isComparable=function(e){return null!=e&&!isNaN(e)},LESS_THAN=function(e){return predicateWithMessage(function(t,r){return!isComparable(t)||!isComparable(r.target[e])||t<r.target[e]},"expected to be less than "+e)},GREATER_THAN=function(e){return predicateWithMessage(function(t,r){return!isComparable(t)||!isComparable(r.target[e])||t>r.target[e]},"expected to be greater than "+e)},FUNCTION=predicateWithMessage(function(e){return"function"==typeof e},"expecting a Function"),OPT_FUNCTION=predicateWithMessage(function(e,t){return OPTIONAL(e,t,FUNCTION)},"expecting an optional Function"),BOOLEAN=predicateWithMessage(function(e){return!0===e||!1===e},"expecting a Boolean"),OPT_BOOLEAN=predicateWithMessage(function(e,t){return OPTIONAL(e,t,BOOLEAN)},"expecting an optional Boolean"),STRING=predicateWithMessage(function(e){return"string"==typeof e},"expecting a String"),OPT_STRING=predicateWithMessage(function(e,t){return OPTIONAL(e,t,STRING)}
2,"expecting an optional String"),DATE=predicateWithMessage(function(e){return e instanceof Date&&!isNaN(+e)},"expecting a Date object"),OPT_DATE=predicateWithMessage(function(e,t){return OPTIONAL(e,t,DATE)},"expecting an optional Date");predicateWithMessage(ARRAY(void 0,DATE),"expecting an Array of Date objects");var DATETIME_MS=NUMBER(0),OPT_DATETIME_MS=predicateWithMessage(function(e,t){return OPTIONAL(e,t,DATETIME_MS)},"expecting an optional number"),OPT_DATE_OR_DATETIME_MS=OR(OPT_DATE,OPT_DATETIME_MS),colorMessage="A color string can be in one of the following formats to be valid: #rgb, #rrggbb, rgb(r, g, b), rgba(r, g, b, a) or a CSS color name such as 'white', 'orange', 'cyan', etc",COLOR_STRING=predicateWithMessage(function(e){return"string"==typeof e&&Color.validColorString(e)},"expecting a color String. "+colorMessage),OPT_COLOR_STRING=predicateWithMessage(function(e,t){return OPTIONAL(e,t,COLOR_STRING)},"expecting an optional color String. "+colorMessage),COLOR_STRING_ARRAY=predicateWithMessage(ARRAY(void 0,COLOR_STRING),"expecting an Array of color strings. "+colorMessage),OPT_COLOR_STRING_ARRAY=predicateWithMessage(function(e,t){return OPTIONAL(e,t,COLOR_STRING_ARRAY)},"expecting an optional Array of color strings. "+colorMessage);function NUMBER(e,t){return predicateWithMessage(function(r){return"number"==typeof r&&Number.isFinite(r)&&(void 0===e||r>=e)&&(void 0===t||r<=t)},"expecting a finite Number"+(void 0!==e?", more than or equal to "+e:"")+(void 0!==t?", less than or equal to "+t:""))}function OPT_NUMBER(e,t){return predicateWithMessage(function(r,o){return OPTIONAL(r,o,NUMBER(e,t))},"expecting an optional finite Number"+(void 0!==e?", more than or equal to "+e:"")+(void 0!==t?", less than or equal to "+t:""))}function NUMBER_OR_NAN(e,t){return predicateWithMessage(function(r){return"number"==typeof r&&(isNaN(r)||Number.isFinite(r)&&(void 0===e||r>=e)&&(void 0===t||r<=t))},"expecting a finite Number"+(void 0!==e?", more than or equal to "+e:"")+(void 0!==t?", less than or equal to "+t:""))}var NUMBER_ARRAY=predicateWithMessage(ARRAY(void 0,NUMBER()),"expecting an Array of numbers"),OPT_NUMBER_ARRAY=predicateWithMessage(function(e,t){return OPTIONAL(e,t,NUMBER_ARRAY)},"expecting an optional Array of numbers"),STRING_ARRAY=predicateWithMessage(ARRAY(void 0,STRING),"expecting an Array of strings");function STRING_UNION(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return predicateWithMessage(function(t){return"string"==typeof t&&e.indexOf(t)>=0},"expecting one of: "+e.join(", "))}predicateWithMessage(function(e,t){return OPTIONAL(e,t,STRING_ARRAY)},"expecting an optional Array of strings");var BOOLEAN_ARRAY=predicateWithMessage(ARRAY(void 0,BOOLEAN),"expecting an Array of boolean values");predicateWithMessage(function(e,t){return OPTIONAL(e,t,BOOLEAN_ARRAY)},"expecting an optional Array of boolean values");var FONT_WEIGHTS=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"],FONT_STYLE=predicateWithMessage(function(e){return"normal"===e||"italic"===e||"oblique"===e},"expecting a font style keyword such as 'normal', 'italic' or 'oblique'"),OPT_FONT_STYLE=predicateWithMessage(function(e,t){return OPTIONAL(e,t,FONT_STYLE)},"expecting an optional font style keyword such as 'normal', 'italic' or 'oblique'"),FONT_WEIGHT=predicateWithMessage(function(e){return FONT_WEIGHTS.includes(e)},"expecting a font weight keyword such as 'normal', 'bold' or 'bolder' or a numeric value such as 100, 300 or 600"),OPT_FONT_WEIGHT=predicateWithMessage(function(e,t){return OPTIONAL(e,t,FONT_WEIGHT)},"expecting an optional font weight keyword such as 'normal', 'bold' or 'bolder' or a numeric value such as 100, 300 or 600"),LINE_DASH=predicateWithMessage(ARRAY(void 0,NUMBER(0)),"expecting an Array of numbers specifying the length in pixels of alternating dashes and gaps, for example, [6, 3] means dashes with a length of 6 pixels with gaps between of 3 pixels."),OPT_LINE_DASH=predicateWithMessage(function(e,t){return OPTIONAL(e,t,LINE_DASH)},"expecting an optional Array of numbers specifying the length in pixels of alternating dashes and gaps, for example, [6, 3] means dashes with a length of 6 pixels with gaps between of 3 pixels."),LINE_CAPS=["butt","round","square"],LINE_CAP=predicateWithMessage(function(e){return LINE_CAPS.includes(e)},"expecting a line cap keyword such as 'butt', 'round' or 'square'");predicateWithMessage(function(e,t){return OPTIONAL(e,t,LINE_CAP)},"expecting an optional line cap keyword such as 'butt', 'round' or 'square'");var LINE_JOINS=["round","bevel","miter"],LINE_JOIN=predicateWithMessage(function(e){return LINE_JOINS.includes(e)},"expecting a line join keyword such as 'round', 'bevel' or 'miter'");predicateWithMessage(function(e,t){return OPTIONAL(e,t,LINE_JOIN)},"expecting an optional line join keyword such as 'round', 'bevel' or 'miter'");var POSITIONS=["top","right","bottom","left"],POSITION=predicateWithMessage(function(e){return POSITIONS.includes(e)},"expecting a position keyword such as 'top', 'right', 'bottom' or 'left"),INTERACTION_RANGES=["exact","nearest"],INTERACTION_RANGE=predicateWithMessage(function(e){return"number"==typeof e&&Number.isFinite(e)||INTERACTION_RANGES.includes(e)},"expecting an interaction range of 'exact', 'nearest' or a number"),__read$S=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},ContinuousScale=function(){function e(t,r){this.domain=t,this.range=r,this.nice=!1,this.tickCount=e.defaultTickCount,this.minTickCount=0,this.maxTickCount=1/0,this.niceDomain=null,this.strictClampByDefault=!1,this.cache=null,this.cacheProps=["domain","range","nice","tickCount","minTickCount","maxTickCount"]}return e.prototype.transform=function(e){return e},e.prototype.transformInvert=function(e){return e},e.prototype.fromDomain=function(e){return"number"==typeof e?e:e instanceof Date?e.getTime():NaN},e.prototype.getDomain=function(){return this.nice&&(this.refresh(),this.niceDomain)?this.niceDomain:this.domain},e.prototype.convert=function(e,t){var r,o=this;if(!this.domain||this.domain.length<2)return NaN;this.refresh();var i=null!==(r=null==t?void 0:t.strict)&&void 0!==r?r:this.strictClampByDefault,n=this.getDomain().map(function(e){return o.transform(e)}
2),a=__read$S(n,2),s=a[0],l=a[1],c=this.range,u=__read$S(c,2),d=u[0],p=u[1];return(e=this.transform(e))<s?i?NaN:d:e>l?i?NaN:p:s===l?(d+p)/2:e===s?d:e===l?p:d+(this.fromDomain(e)-this.fromDomain(s))/(this.fromDomain(l)-this.fromDomain(s))*(p-d)},e.prototype.invert=function(e){var t=this;this.refresh();var r,o=this.getDomain().map(function(e){return t.transform(e)}),i=__read$S(o,2),n=i[0],a=i[1],s=this.range,l=__read$S(s,2),c=l[0],u=l[1],d=c>u;return e<(d?u:c)?d?a:n:e>(d?c:u)?d?n:a:(r=c===u?this.toDomain((this.fromDomain(n)+this.fromDomain(a))/2):this.toDomain(this.fromDomain(n)+(e-c)/(u-c)*(this.fromDomain(a)-this.fromDomain(n))),this.transformInvert(r))},e.prototype.didChange=function(){var e=this,t=this.cache;return!(t&&!this.cacheProps.some(function(r){return e[r]!==t[r]})||(this.cache={},this.cacheProps.forEach(function(t){return e.cache[t]=e[t]}),0))},e.prototype.refresh=function(){this.didChange()&&this.update()},e.prototype.isDenseInterval=function(e){var t=e.start,r=e.stop,o=e.interval,i=e.count,n=this.range,a=r-t,s=Math.min(n[0],n[1]);return null!=i||(i=a/("number"==typeof o?o:1)),i>=Math.max(n[0],n[1])-s&&(Logger.warn("the configured tick interval, "+JSON.stringify(o)+", results in more than 1 tick per pixel, ignoring. Supply a larger tick interval or omit this configuration."),!0)},e.defaultTickCount=5,e.defaultMaxTickCount=6,e}(),__extends$2E=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}();function ticks(e,t,r,o,i){if(r<2)return range(e,t,t-e);var n=tickStep(e,t,r,o,i);return isNaN(n)?new NumericTicks(0):range(e=Math.ceil(e/n)*n,t=Math.floor(t/n)*n,n)}var tickMultipliers=[1,2,5,10];function tickStep(e,t,r,o,i){void 0===o&&(o=0),void 0===i&&(i=1/0);var n=(t-e)/r,a=Math.floor(Math.log10(n)),s=Math.pow(10,a),l=tickMultipliers.map(function(n){var a=n*s,l=Math.ceil((t-e)/a);return{multiplier:n,isWithinBounds:l>=o&&l<=i,diffCount:Math.abs(l-r)}}).sort(function(e,t){return e.isWithinBounds!==t.isWithinBounds?e.isWithinBounds?-1:1:e.diffCount-t.diffCount})[0].multiplier;return!l||isNaN(l)?NaN:l*s}function singleTickDomain(e,t){var r=Math.floor(Math.log10(t-e)),o=Math.pow(10,r);return tickMultipliers.map(function(r){var i=r*o,n=Math.floor(e/i)*i,a=Math.ceil(t/i)*i;return{error:1-(t-e)/(a-n),domain:[n,a]}}).sort(function(e,t){return e.error-t.error})[0].domain}var NumericTicks=function(e){function t(t,r){var o=e.call(this)||this;if(r)for(var i=0,n=r.length;i<n;i++)o[i]=r[i];return o.fractionDigits=t,o}return __extends$2E(t,e),t}(Array);function range(e,t,r){for(var o=function(e){var t,r,o=e.split("e");return Math.max((null!==(r=null===(t=o[0].split(".")[1])||void 0===t?void 0:t.length)&&void 0!==r?r:0)-Number(o[1]),0)}((r%1).toExponential()),i=Math.pow(10,o),n=Math.ceil((t-e)/r),a=new NumericTicks(o),s=0;s<=n;s++){var l=e+r*s;a.push(Math.round(l*i)/i)}return a}var CONSTANTS={periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]};function dayOfYear(e,t){void 0===t&&(t=new Date(e.getFullYear(),0,1));var r=e.getTimezoneOffset()-t.getTimezoneOffset(),o=e.getTime()-t.getTime()+6e4*r;return Math.floor(o/864e5)}function weekOfYear(e,t){var r=(t-new Date(e.getFullYear(),0,1).getDay()+7)%7,o=new Date(e.getFullYear(),0,r+1);return o<=e?Math.floor(dayOfYear(e,o)/7)+1:0}var SUNDAY=0,MONDAY=1,THURSDAY=4;function isoWeekOfYear(e,t){void 0===t&&(t=e.getFullYear());var r=new Date(t,0,1).getDay(),o=new Date(t,0,(THURSDAY-r+7)%7-(THURSDAY-MONDAY)+1);return o<=e?Math.floor(dayOfYear(e,o)/7)+1:isoWeekOfYear(e,t-1)}function timezone(e){var t=e.getTimezoneOffset(),r=Math.abs(t);return(t>0?"-":"+")+pad(Math.floor(r/60),2,"0")+pad(Math.floor(r%60),2,"0")}var FORMATTERS={a:function(e){return CONSTANTS.shortDays[e.getDay()]},A:function(e){return CONSTANTS.days[e.getDay()]},b:function(e){return CONSTANTS.shortMonths[e.getMonth()]},B:function(e){return CONSTANTS.months[e.getMonth()]},c:"%x, %X",d:function(e,t){return pad(e.getDate(),2,null!=t?t:"0")},e:"%_d",f:function(e,t){return pad(1e3*e.getMilliseconds(),6,null!=t?t:"0")},H:function(e,t){return pad(e.getHours(),2,null!=t?t:"0")},I:function(e,t){var r=e.getHours()%12;return 0===r?"12":pad(r,2,null!=t?t:"0")}
2,j:function(e,t){return pad(dayOfYear(e)+1,3,null!=t?t:"0")},m:function(e,t){return pad(e.getMonth()+1,2,null!=t?t:"0")},M:function(e,t){return pad(e.getMinutes(),2,null!=t?t:"0")},L:function(e,t){return pad(e.getMilliseconds(),3,null!=t?t:"0")},p:function(e){return e.getHours()<12?"AM":"PM"},Q:function(e){return String(e.getTime())},s:function(e){return String(Math.floor(e.getTime()/1e3))},S:function(e,t){return pad(e.getSeconds(),2,null!=t?t:"0")},u:function(e){var t=e.getDay();return t<1&&(t+=7),String(t%7)},U:function(e,t){return pad(weekOfYear(e,SUNDAY),2,null!=t?t:"0")},V:function(e,t){return pad(isoWeekOfYear(e),2,null!=t?t:"0")},w:function(e,t){return pad(e.getDay(),2,null!=t?t:"0")},W:function(e,t){return pad(weekOfYear(e,MONDAY),2,null!=t?t:"0")},x:"%-m/%-d/%Y",X:"%-I:%M:%S %p",y:function(e,t){return pad(e.getFullYear()%100,2,null!=t?t:"0")},Y:function(e,t){return pad(e.getFullYear(),4,null!=t?t:"0")},Z:function(e){return timezone(e)},"%":function(){return"%"}},PADS={_:" ",0:"0","-":""};function pad(e,t,r){var o=String(Math.floor(e));return o.length>=t?o:""+r.repeat(t-o.length)+o}function buildFormatter(e){for(var t=[];e.length>0;){var r=e.indexOf("%");if(0!==r){var o=r>0?e.substring(0,r):e;t.push(o)}if(r<0)break;var i=e[r+1],n=PADS[i];null!=n&&r++;var a=e[r+1],s=FORMATTERS[a];if("function"==typeof s)t.push([s,n]);else if("string"==typeof s){var l=buildFormatter(s);t.push([l,n])}else t.push(""+(null!=n?n:"")+a);e=e.substring(r+2)}return function(e){var r="number"==typeof e?new Date(e):e;return t.map(function(e){return"string"==typeof e?e:e[0](r,e[1])}).join("")}}var __extends$2D=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__values$w=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},__read$R=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},__spread$w=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read$R(arguments[t]));return e},_a$2,DefaultTimeFormats;!function(e){e[e.MILLISECOND=0]="MILLISECOND",e[e.SECOND=1]="SECOND",e[e.MINUTE=2]="MINUTE",e[e.HOUR=3]="HOUR",e[e.WEEK_DAY=4]="WEEK_DAY",e[e.SHORT_MONTH=5]="SHORT_MONTH",e[e.MONTH=6]="MONTH",e[e.SHORT_YEAR=7]="SHORT_YEAR",e[e.YEAR=8]="YEAR"}(DefaultTimeFormats||(DefaultTimeFormats={}));var formatStrings=(_a$2={},_a$2[DefaultTimeFormats.MILLISECOND]=".%L",_a$2[DefaultTimeFormats.SECOND]=":%S",_a$2[DefaultTimeFormats.MINUTE]="%I:%M",_a$2[DefaultTimeFormats.HOUR]="%I %p",_a$2[DefaultTimeFormats.WEEK_DAY]="%a",_a$2[DefaultTimeFormats.SHORT_MONTH]="%b %d",_a$2[DefaultTimeFormats.MONTH]="%B",_a$2[DefaultTimeFormats.SHORT_YEAR]="%y",_a$2[DefaultTimeFormats.YEAR]="%Y",_a$2);function toNumber(e){return e instanceof Date?e.getTime():e}var TimeScale$1=function(e){function t(){var t=e.call(this,[new Date(2022,11,7),new Date(2022,11,8)],[0,1])||this;return t.type="time",t.cacheProps=["domain","range","nice","tickCount","interval","minTickCount","maxTickCount"],t.year=year,t.month=month,t.week=sunday,t.day=day,t.hour=hour,t.minute=minute,t.second=second,t.millisecond=millisecond,t.tickIntervals=[[t.second,1,durationSecond],[t.second,5,5*durationSecond],[t.second,15,15*durationSecond],[t.second,30,30*durationSecond],[t.minute,1,durationMinute],[t.minute,5,5*durationMinute],[t.minute,15,15*durationMinute],[t.minute,30,30*durationMinute],[t.hour,1,durationHour],[t.hour,3,3*durationHour],[t.hour,6,6*durationHour],[t.hour,12,12*durationHour],[t.day,1,durationDay],[t.day,2,2*durationDay],[t.week,1,durationWeek],[t.week,2,2*durationWeek],[t.week,3,3*durationWeek],[t.month,1,durationMonth],[t.month,2,2*durationMonth],[t.month,3,3*durationMonth],[t.month,4,4*durationMonth],[t.month,6,6*durationMonth],[t.year,1,durationYear]],t}return __extends$2D(t,e),t.prototype.toDomain=function(e){return new Date(e)},t.prototype.calculateDefaultTickFormat=function(e){var t,r;void 0===e&&(e=[]);var o=DefaultTimeFormats.YEAR,i=function(e){e<o&&(o=e)};try{for(var n=__values$w(e),a=n.next();!a.done;a=n.next()){var s=a.value;i(this.getLowestGranularityFormat(s))}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}var l=toNumber(e[0]),c=toNumber(e[e.length-1]),u=new Date(l).getFullYear(),d=new Date(c).getFullYear()-u>0;return this.buildFormatString(o,d)},t.prototype.buildFormatString=function(e,t){var r=[formatStrings[e]],o=0,i=this.getDomain(),n=Math.min.apply(Math,__spread$w(i.map(toNumber))),a=Math.max.apply(Math,__spread$w(i.map(toNumber)))-n;switch(e){case DefaultTimeFormats.SECOND:a/durationMinute>1&&r.push(formatStrings[DefaultTimeFormats.MINUTE]);case DefaultTimeFormats.MINUTE:a/durationHour>1&&r.push(formatStrings[DefaultTimeFormats.HOUR]);case DefaultTimeFormats.HOUR:o=r.length,a/durationDay>1&&r.push(formatStrings[DefaultTimeFormats.WEEK_DAY]);case DefaultTimeFormats.WEEK_DAY:if(a/durationWeek>1||t){var s=r.indexOf(formatStrings[DefaultTimeFormats.WEEK_DAY]);s>-1&&r.splice(s,1,formatStrings[DefaultTimeFormats.SHORT_MONTH])}case DefaultTimeFormats.SHORT_MONTH:case DefaultTimeFormats.MONTH:(a/durationYear>1||t)&&r.push(formatStrings[DefaultTimeFormats.YEAR])}return o<r.length&&(r=__spread$w(r.slice(0,o),[r.slice(o).join(" ")])),o>0&&o<(r=__spread$w(r.slice(0,o).reverse(),r.slice(o))).length&&r.splice(o,0," "),r.join("")},t.prototype.getLowestGranularityFormat=function(e){return this.second.floor(e)<e?DefaultTimeFormats.MILLISECOND:this.minute.floor(e)<e?DefaultTimeFormats.SECOND:this.hour.floor(e)<e?DefaultTimeFormats.MINUTE:this.day.floor(e)<e?DefaultTimeFormats.HOUR:this.month.floor(e)<e?this.week.floor(e)<e?DefaultTimeFormats.WEEK_DAY:DefaultTimeFormats.SHORT_MONTH:this.year.floor(e)<e?DefaultTimeFormats.MONTH:DefaultTimeFormats.YEAR},t.prototype.defaultTickFormat=function(e){var t=this.calculateDefaultTickFormat(e);return function(e){return buildFormatter(t)(e)}},t.prototype.getTickInterval=function(e){for(var t,r,o,i=e.start,n=e.stop,a=e.count,s=e.minCount,l=e.maxCount,c=this.tickIntervals,u=null!=a?a:ContinuousScale.defaultTickCount,d=Math.abs(n-i)/Math.max(u,1),p=0;p<c.length&&d>c[p][2];)p++;if(0===p)o=Math.max(tickStep(i,n,u,s,l),1),r=this.millisecond;else if(p===c.length)o=tickStep(i/durationYear,n/durationYear,u,s,l),r=this.year;else{var h=d-c[p-1][2],_=c[p][2]-d;r=(t=__read$R(c[h<_?p-1:p],2))[0],o=t[1]}return r.every(o)},t.prototype.invert=function(t){return new Date(e.prototype.invert.call(this,t))},t.prototype.ticks=function(){if(!this.domain||this.domain.length<2)return[];this.refresh();var e=__read$R(this.getDomain().map(toNumber),2),t=e[0],r=e[1];if(void 0!==this.interval)return this.getTicksForInterval({start:t,stop:r});if(this.nice){var o=this.tickCount;if(2===o)return this.niceDomain;if(1===o)return this.niceDomain.slice(0,1)}return this.getDefaultTicks({start:t,stop:r})},t.prototype.getDefaultTicks=function(e){var t=e.start,r=e.stop,o=this.getTickInterval({start:t,stop:r,count:this.tickCount,minCount:this.minTickCount,maxCount:this.maxTickCount});return o?o.range(new Date(t),new Date(r)):[]},t.prototype.getTicksForInterval=function(e){var t=e.start,r=e.stop,o=this.interval,i=this.tickIntervals;if(!o)return[];if(o instanceof TimeInterval){var n=o.range(new Date(t),new Date(r));return this.isDenseInterval({start:t,stop:r,interval:o,count:n.length})?this.getDefaultTicks({start:t,stop:r}):n}var a=Math.abs(o);if(this.isDenseInterval({start:t,stop:r,interval:a}))return this.getDefaultTicks({start:t,stop:r});var s=__spread$w(i);s.reverse();var l=s.find(function(e){return a%e[2]===0});if(l)return l[0].every(a/(l[2]/l[1])).range(new Date(t),new Date(r));for(var c=new Date(t),u=new Date(r),d=[];c<=u;)d.push(c),(c=new Date(c)).setMilliseconds(c.getMilliseconds()+a);return d},t.prototype.tickFormat=function(e){var t=e.ticks,r=e.specifier;return null==r?this.defaultTickFormat(t):buildFormatter(r)},t.prototype.update=function(){!this.domain||this.domain.length<2||this.nice&&this.updateNiceDomain()},t.prototype.updateNiceDomain=function(){for(var e=__read$R(this.domain,2),t=e[0],r=e[1],o=0;o<4;o++){this.updateNiceDomainIteration(t,r);var i=__read$R(this.niceDomain,2),n=i[0],a=i[1];if(toNumber(t)===toNumber(n)&&toNumber(r)===toNumber(a))break;t=n,r=a}},t.prototype.updateNiceDomainIteration=function(e,t){var r,o=toNumber(e),i=toNumber(t),n=this.interval;if(n instanceof TimeInterval)r=n;else{var a="number"==typeof n?(i-o)/Math.max(n,1):this.tickCount;r=this.getTickInterval({start:o,stop:i,count:a,minCount:this.minTickCount,maxCount:this.maxTickCount})}if(r){var s=r.range(e,t,!0),l=s[0],c=s[s.length-1];this.niceDomain=[l,c]}},t}(ContinuousScale),__values$v=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);
2if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function extent$4(e){var t=e.length;if(0!==t){for(var r=1/0,o=-1/0,i=0;i<t;i++){var n=e[i];n instanceof Date&&(n=n.getTime()),"number"==typeof n&&(n<r&&(r=n),n>o&&(o=n))}var a=[r,o];if(!a.some(function(e){return!isFinite(e)}))return a}}function findMinMax(e){var t,r,o=void 0,i=void 0;try{for(var n=__values$v(e),a=n.next();!a.done;a=n.next()){var s=a.value;s<0?o=(null!=o?o:0)+s:s>=0&&(i=(null!=i?i:0)+s)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return{min:o,max:i}}var Selection=function(){function e(e,t){this._nodes=[],this._data=[],this._parent=e,this._factory=Object.prototype.isPrototypeOf.call(Node,t)?function(){return new t}:t}return e.select=function(t,r){return new e(t,r)},e.prototype.each=function(e){return this._nodes.forEach(function(t,r){return e(t,t.datum,r)}),this},e.prototype.update=function(e,t){var r=this,o=this._data,i=this._parent,n=this._factory;e.length>o.length?e.slice(o.length).forEach(function(e){var o=n(e);o.datum=e,t&&t(o),i.appendChild(o),r._nodes.push(o)}):e.length<o.length&&this._nodes.splice(e.length).forEach(function(e){i.removeChild(e)}),this._data=e;for(var a=0;a<e.length;a++)this._nodes[a].datum=this._data[a];return this},e.prototype.clear=function(){return this.update([]),this},e.prototype.select=function(e){var t=[],r=function(o){e(o)&&t.push(o),o.children.forEach(r)};return r(this._parent),t},e.prototype.selectByClass=function(e){return this.select(function(t){return t instanceof e})},e.prototype.selectByTag=function(e){return this.select(function(t){return t.tag===e})},e.prototype.nodes=function(){return this._nodes},e}(),__extends$2C=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$1T=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},Shape=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.lastInstanceId=0,r.fillOpacity=1,r.strokeOpacity=1,r.fill=t.defaultStyles.fill,r.stroke=t.defaultStyles.stroke,r.strokeWidth=t.defaultStyles.strokeWidth,r.lineDash=t.defaultStyles.lineDash,r.lineDashOffset=t.defaultStyles.lineDashOffset,r.lineCap=t.defaultStyles.lineCap,r.lineJoin=t.defaultStyles.lineJoin,r.opacity=t.defaultStyles.opacity,r.fillShadow=t.defaultStyles.fillShadow,r}return __extends$2C(t,e),t.createInstance=function(e){var t=Object.create(e);return t._setParent(void 0),t.id=e.id+"-Instance-"+String(++e.lastInstanceId),t},t.prototype.restoreOwnStyles=function(){for(var e=this.constructor.defaultStyles,t=Object.getOwnPropertyNames(e),r=0,o=t.length;r<o;r++){var i=t[r];this[i]=e[i]}},t.prototype.restoreAllStyles=function(){var e=this.constructor.defaultStyles;for(var t in e)this[t]=e[t]},t.prototype.restoreOverriddenStyles=function(){var e=this.constructor.defaultStyles,t=Object.getPrototypeOf(e);for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&Object.prototype.hasOwnProperty.call(t,r)&&(this[r]=e[r])},t.prototype.align=function(e,t){var r,o,i,n=null!==(i=null===(o=null===(r=this.layerManager)||void 0===r?void 0:r.canvas)||void 0===o?void 0:o.pixelRatio)&&void 0!==i?i:1,a=Math.round(e*n)/n;return null==t?a:0===t?0:t<1?Math.ceil(t*n)/n:Math.round((t+e)*n)/n-a},t.prototype.fillStroke=function(e){if(this.layerManager){var t=this.layerManager.canvas.pixelRatio||1,r=e.globalAlpha;if(this.fill){e.fillStyle=this.fill,e.globalAlpha=r*this.opacity*this.fillOpacity;var o=this.fillShadow;o&&o.enabled&&(e.shadowColor=o.color,e.shadowOffsetX=o.xOffset*t,e.shadowOffsetY=o.yOffset*t,e.shadowBlur=o.blur*t),e.fill()}e.shadowColor="rgba(0, 0, 0, 0)",this.stroke&&this.strokeWidth&&(e.strokeStyle=this.stroke,e.globalAlpha=r*this.opacity*this.strokeOpacity,e.lineWidth=this.strokeWidth,this.lineDash&&e.setLineDash(this.lineDash),this.lineDashOffset&&(e.lineDashOffset=this.lineDashOffset),this.lineCap&&(e.lineCap=this.lineCap),this.lineJoin&&(e.lineJoin=this.lineJoin),e.stroke())}},t.prototype.containsPoint=function(e,t){return this.isPointInPath(e,t)},t.defaultStyles=Object.assign({},{fill:"black",stroke:void 0,strokeWidth:0,lineDash:void 0,lineDashOffset:0,lineCap:void 0,lineJoin:void 0,opacity:1,fillShadow:void 0}),__decorate$1T([SceneChangeDetection({redraw:RedrawType.MINOR})],t.prototype,"fillOpacity",void 0),__decorate$1T([SceneChangeDetection({redraw:RedrawType.MINOR})],t.prototype,"strokeOpacity",void 0),__decorate$1T([SceneChangeDetection({redraw:RedrawType.MINOR})],t.prototype,"fill",void 0),__decorate$1T([SceneChangeDetection({redraw:RedrawType.MINOR})],t.prototype,"stroke",void 0),__decorate$1T([SceneChangeDetection({redraw:RedrawType.MINOR})],t.prototype,"strokeWidth",void 0),__decorate$1T([SceneChangeDetection({redraw:RedrawType.MINOR})],t.prototype,"lineDash",void 0),__decorate$1T([SceneChangeDetection({redraw:RedrawType.MINOR})],t.prototype,"lineDashOffset",void 0),__decorate$1T([SceneChangeDetection({redraw:RedrawType.MINOR})],t.prototype,"lineCap",void 0),__decorate$1T([SceneChangeDetection({redraw:RedrawType.MINOR})],t.prototype,"lineJoin",void 0),__decorate$1T([SceneChangeDetection({redraw:RedrawType.MINOR,convertor:function(e){return Math.min(1,Math.max(0,e))}})],t.prototype,"opacity",void 0),__decorate$1T([SceneChangeDetection({redraw:RedrawType.MINOR,checkDirtyOnAssignment:!0})],t.prototype,"fillShadow",void 0),t}(Node),__extends$2B=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$1S=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},Line=function(e){function t(){var t=e.call(this)||this;return t.x1=0,t.y1=0,t.x2=0,t.y2=0,t.restoreOwnStyles(),t}return __extends$2B(t,e),t.prototype.computeBBox=function(){return new BBox(this.x1,this.y1,this.x2-this.x1,this.y2-this.y1)},t.prototype.isPointInPath=function(e,t){return!1},t.prototype.render=function(t){var r,o=t.ctx,i=t.forceRender,n=t.stats;if(this.dirty!==RedrawType.NONE||i){this.computeTransformMatrix(),this.matrix.toContext(o);var a=this.x1,s=this.y1,l=this.x2,c=this.y2;if(a===l){var u=Math.round(a)+Math.floor(this.strokeWidth)%2/2;a=u,l=u}else if(s===c){var d=Math.round(s)+Math.floor(this.strokeWidth)%2/2;s=d,c=d}o.beginPath(),o.moveTo(a,s),o.lineTo(l,c),this.fillStroke(o),null===(r=this.fillShadow)||void 0===r||r.markClean(),e.prototype.render.call(this,t)}else n&&(n.nodesSkipped+=this.nodeCount.count)},t.className="Line",t.defaultStyles=Object.assign({},Shape.defaultStyles,{fill:void 0,strokeWidth:1}),__decorate$1S([SceneChangeDetection({redraw:RedrawType.MAJOR})],t.prototype,"x1",void 0),__decorate$1S([SceneChangeDetection({redraw:RedrawType.MAJOR})],t.prototype,"y1",void 0),__decorate$1S([SceneChangeDetection({redraw:RedrawType.MAJOR})],t.prototype,"x2",void 0),__decorate$1S([SceneChangeDetection({redraw:RedrawType.MAJOR})],t.prototype,"y2",void 0),t}(Shape),__extends$2A=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$1R=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a};function SceneFontChangeDetection(e){var t=e||{},r=t.redraw;return SceneChangeDetection({redraw:void 0===r?RedrawType.MAJOR:r,type:"font",changeCb:t.changeCb})}var Text=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.x=0,r.y=0,r.lines=[],r.text="",r._dirtyFont=!0,r.fontSize=10,r.fontFamily="sans-serif",r.textAlign=t.defaultStyles.textAlign,r.textBaseline=t.defaultStyles.textBaseline,r.lineHeight=void 0,r}return __extends$2A(t,e),t.prototype._splitText=function(){this.lines="string"==typeof this.text?this.text.split(/\r?\n/g):[]},Object.defineProperty(t.prototype,"font",{get:function(){return this._dirtyFont&&(this._dirtyFont=!1,this._font=getFont(this.fontSize,this.fontFamily,this.fontStyle,this.fontWeight)),this._font}
2,enumerable:!1,configurable:!0}),t.prototype.computeBBox=function(){return HdpiCanvas.has.textMetrics?this.getPreciseBBox():this.getApproximateBBox()},t.prototype.getPreciseBBox=function(){for(var e,t,r=0,o=0,i=0,n=0,a=0,s=0;s<this.lines.length;s++){var l=HdpiCanvas.measureText(this.lines[s],this.font,this.textBaseline,this.textAlign);r=Math.max(r,l.actualBoundingBoxLeft),i=Math.max(i,l.width),0==s?(o+=l.actualBoundingBoxAscent,n+=l.actualBoundingBoxAscent):a+=null!==(e=l.fontBoundingBoxAscent)&&void 0!==e?e:l.emHeightAscent,s==this.lines.length-1?n+=l.actualBoundingBoxDescent:a+=null!==(t=l.fontBoundingBoxDescent)&&void 0!==t?t:l.emHeightDescent}return void 0!==this.lineHeight&&(a=(this.lines.length-1)*this.lineHeight),n+=a,o+=a*this.getVerticalOffset(),new BBox(this.x-r,this.y-o,i,n)},t.prototype.getVerticalOffset=function(){switch(this.textBaseline){case"top":case"hanging":return 0;case"bottom":case"alphabetic":case"ideographic":return 1;case"middle":return.5}},t.prototype.getApproximateBBox=function(){var e,t=0,r=0,o=0;this.lines.length>0&&(t=(n=HdpiCanvas.getTextSize(this.lines[0],this.font)).width,r=n.height);for(var i=1;i<this.lines.length;i++){var n=HdpiCanvas.getTextSize(this.lines[i],this.font);t=Math.max(t,n.width),o+=null!==(e=this.lineHeight)&&void 0!==e?e:n.height}var a=this.x,s=this.y;switch(this.textAlign){case"end":case"right":a-=t;break;case"center":a-=t/2}switch(this.textBaseline){case"alphabetic":s-=.7*r+.5*o;break;case"middle":s-=.45*r+.5*o;break;case"ideographic":case"bottom":s-=r+o;break;case"hanging":s-=.2*r+.5*o}return new BBox(a,s,t,r+o)},t.prototype.getLineHeight=function(e){var t,r;if(this.lineHeight)return this.lineHeight;if(HdpiCanvas.has.textMetrics){var o=HdpiCanvas.measureText(e,this.font,this.textBaseline,this.textAlign);return(null!==(t=o.fontBoundingBoxAscent)&&void 0!==t?t:o.emHeightAscent)+(null!==(r=o.fontBoundingBoxDescent)&&void 0!==r?r:o.emHeightDescent)}return HdpiCanvas.getTextSize(e,this.font).height},t.prototype.isPointInPath=function(e,t){var r=this.transformPoint(e,t),o=this.computeBBox();return!!o&&o.containsPoint(r.x,r.y)},t.prototype.render=function(t){var r=t.ctx,o=t.forceRender,i=t.stats;if(this.dirty!==RedrawType.NONE||o)if(this.lines.length&&this.layerManager){this.computeTransformMatrix(),this.matrix.toContext(r);var n=this,a=n.fill,s=n.stroke,l=n.strokeWidth;r.font=this.font,r.textAlign=this.textAlign,r.textBaseline=this.textBaseline;var c=this.layerManager.canvas.pixelRatio||1,u=r.globalAlpha;if(a){r.fillStyle=a,r.globalAlpha=u*this.opacity*this.fillOpacity;var d=this.fillShadow;d&&d.enabled&&(r.shadowColor=d.color,r.shadowOffsetX=d.xOffset*c,r.shadowOffsetY=d.yOffset*c,r.shadowBlur=d.blur*c),this.renderLines(function(e,t,o){return r.fillText(e,t,o)})}if(s&&l){r.strokeStyle=s,r.lineWidth=l,r.globalAlpha=u*this.opacity*this.strokeOpacity;var p=this,h=p.lineDash,_=p.lineDashOffset,f=p.lineCap,g=p.lineJoin;h&&r.setLineDash(h),_&&(r.lineDashOffset=_),f&&(r.lineCap=f),g&&(r.lineJoin=g),this.renderLines(function(e,t,o){return r.strokeText(e,t,o)})}e.prototype.render.call(this,t)}else i&&(i.nodesSkipped+=this.nodeCount.count);else i&&(i.nodesSkipped+=this.nodeCount.count)},t.prototype.renderLines=function(e){for(var t=this,r=this,o=r.lines,i=r.x,n=r.y,a=this.lines.map(function(e){return t.getLineHeight(e)}),s=-(a.reduce(function(e,t){return e+t},0)-a[0])*this.getVerticalOffset(),l=0;l<o.length;l++)e(o[l],i,n+s),s+=a[l]},t.className="Text",t.defaultStyles=Object.assign({},Shape.defaultStyles,{textAlign:"start",fontStyle:void 0,fontWeight:void 0,fontSize:10,fontFamily:"sans-serif",textBaseline:"alphabetic"}),__decorate$1R([SceneChangeDetection({redraw:RedrawType.MAJOR})],t.prototype,"x",void 0),__decorate$1R([SceneChangeDetection({redraw:RedrawType.MAJOR})],t.prototype,"y",void 0),__decorate$1R([SceneChangeDetection({redraw:RedrawType.MAJOR,changeCb:function(e){return e._splitText()}})],t.prototype,"text",void 0),__decorate$1R([SceneFontChangeDetection()],t.prototype,"fontStyle",void 0),__decorate$1R([SceneFontChangeDetection()],t.prototype,"fontWeight",void 0),__decorate$1R([SceneFontChangeDetection()],t.prototype,"fontSize",void 0),__decorate$1R([SceneFontChangeDetection()],t.prototype,"fontFamily",void 0),__decorate$1R([SceneChangeDetection({redraw:RedrawType.MAJOR})],t.prototype,"textAlign",void 0),__decorate$1R([SceneChangeDetection({redraw:RedrawType.MAJOR})],t.prototype,"textBaseline",void 0),__decorate$1R([SceneChangeDetection({redraw:RedrawType.MAJOR})],t.prototype,"lineHeight",void 0),t}(Shape);function getFont(e,t,r,o){return[r||"",o||"",e+"px",t].join(" ").trim()}var twoPi=2*Math.PI;function normalizeAngle360(e){return e%=twoPi,(e+=twoPi)%twoPi}function normalizeAngle360Inclusive(e){return e%=twoPi,(e+=twoPi)!==twoPi&&(e%=twoPi),e}function normalizeAngle180(e){return(e%=twoPi)<-Math.PI?e+=twoPi:e>=Math.PI&&(e-=twoPi),e}function toRadians$1(e){return e/180*Math.PI}function linearRoot(e,t){var r=-t/e;return 0!==e&&r>=0&&r<=1?[r]:[]}function quadraticRoots(e,t,r){if(0===e)return linearRoot(t,r);var o=t*t-4*e*r,i=[];if(0===o){var n=-t/(2*e);n>=0&&n<=1&&i.push(n)}else if(o>0){var a=Math.sqrt(o),s=(-t-a)/(2*e),l=(-t+a)/(2*e);s>=0&&s<=1&&i.push(s),l>=0&&l<=1&&i.push(l)}return i}function cubicRoots(e,t,r,o){if(0===e)return quadraticRoots(t,r,o);var i=t/e,n=r/e,a=(3*n-i*i)/9,s=(9*i*n-o/e*27-2*i*i*i)/54,l=a*a*a+s*s,c=1/3,u=[];if(l>=0){var d=Math.sqrt(l),p=Math.sign(s+d)*Math.pow(Math.abs(s+d),c),h=Math.sign(s-d)*Math.pow(Math.abs(s-d),c),_=Math.abs(Math.sqrt(3)*(p-h)/2),f=-c*i+(p+h);if(f>=0&&f<=1&&u.push(f),0===_){var g=-c*i-(p+h)/2;g>=0&&g<=1&&u.push(g)}}else{var y=Math.acos(s/Math.sqrt(-a*a*a)),m=c*i,v=2*Math.sqrt(-a),E=v*Math.cos(c*y)-m,C=v*Math.cos(c*(y+2*Math.PI))-m,O=v*Math.cos(c*(y+4*Math.PI))-m;E>=0&&E<=1&&u.push(E),C>=0&&C<=1&&u.push(C),O>=0&&O<=1&&u.push(O)}return u}var __values$u=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);
2if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function segmentIntersection(e,t,r,o,i,n,a,s){var l=(r-e)*(s-n)-(o-t)*(a-i);if(0===l)return null;var c=((a-i)*(t-n)-(e-i)*(s-n))/l,u=((r-e)*(t-n)-(o-t)*(e-i))/l;return c>=0&&c<=1&&u>=0&&u<=1?{x:e+c*(r-e),y:t+c*(o-t)}:null}function cubicSegmentIntersections(e,t,r,o,i,n,a,s,l,c,u,d){var p,h,_=[],f=c-d,g=u-l,y=l*(d-c)-c*(u-l),m=bezierCoefficients(e,r,i,a),v=bezierCoefficients(t,o,n,s),E=cubicRoots(f*m[0]+g*v[0],f*m[1]+g*v[1],f*m[2]+g*v[2],f*m[3]+g*v[3]+y);try{for(var C=__values$u(E),O=C.next();!O.done;O=C.next()){var P,S=O.value,b=S*S,D=S*b,M=m[0]*D+m[1]*b+m[2]*S+m[3],T=v[0]*D+v[1]*b+v[2]*S+v[3];(P=l!==u?(M-l)/(u-l):(T-c)/(d-c))>=0&&P<=1&&_.push({x:M,y:T})}}catch(e){p={error:e}}finally{try{O&&!O.done&&(h=C.return)&&h.call(C)}finally{if(p)throw p.error}}return _}function bezierCoefficients(e,t,r,o){return[3*t-e-3*r+o,3*e-6*t+3*r,-3*e+3*t,e]}function arcIntersections(e,t,r,o,i,n,a,s,l,c){var u=(c-s)/(l-a),d=s-u*a,p=Math.pow(u,2)+1,h=2*(u*(d-t)-e),_=Math.pow(e,2)+Math.pow(d-t,2)-Math.pow(r,2),f=Math.pow(h,2)-4*p*_;if(f<0)return[];var g=(-h+Math.sqrt(f))/2/p,y=(-h-Math.sqrt(f))/2/p,m=[];return[g,y].forEach(function(e){if(e>=Math.min(a,l)&&e<=Math.max(a,l)){var t=u*e,r=normalizeAngle360(n?i:o),s=normalizeAngle360(n?o:i),c=normalizeAngle360(Math.atan2(t,e));s<=r&&(s+=2*Math.PI),c<r&&(c+=2*Math.PI),c>=r&&c<=s&&m.push({x:e,y:t})}}),m}var __values$t=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Command;!function(e){e[e.Move=0]="Move",e[e.Line=1]="Line",e[e.Arc=2]="Arc",e[e.Curve=3]="Curve",e[e.ClosePath=4]="ClosePath"}(Command||(Command={}));var Path2D=function(){function e(){this.previousCommands=[],this.previousParams=[],this.previousClosedPath=!1,this.commands=[],this.params=[],this._closedPath=!1}return e.prototype.isDirty=function(){if(this._closedPath!==this.previousClosedPath)return!0;if(this.previousCommands.length!==this.commands.length)return!0;if(this.previousParams.length!==this.params.length)return!0;for(var e=0;e<this.commands.length;e++)if(this.commands[e]!==this.previousCommands[e])return!0;for(e=0;e<this.params.length;e++)if(this.params[e]!==this.previousParams[e])return!0;return!1},e.prototype.draw=function(e){var t,r,o=this.commands,i=this.params,n=0;e.beginPath();try{for(var a=__values$t(o),s=a.next();!s.done;s=a.next())switch(s.value){case Command.Move:e.moveTo(i[n++],i[n++]);break;case Command.Line:e.lineTo(i[n++],i[n++]);break;case Command.Curve:e.bezierCurveTo(i[n++],i[n++],i[n++],i[n++],i[n++],i[n++]);break;case Command.Arc:e.arc(i[n++],i[n++],i[n++],i[n++],i[n++],1===i[n++]);break;case Command.ClosePath:e.closePath()}}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}0===o.length&&e.closePath()},e.prototype.moveTo=function(e,t){this.xy?(this.xy[0]=e,this.xy[1]=t):this.xy=[e,t],this.commands.push(Command.Move),this.params.push(e,t)},e.prototype.lineTo=function(e,t){this.xy?(this.commands.push(Command.Line),this.params.push(e,t),this.xy[0]=e,this.xy[1]=t):this.moveTo(e,t)},e.prototype.rect=function(e,t,r,o){this.moveTo(e,t),this.lineTo(e+r,t),this.lineTo(e+r,t+o),this.lineTo(e,t+o),this.closePath()},e.prototype.arc=function(e,t,r,o,i,n){void 0===n&&(n=!1);var a=e+r*Math.cos(i),s=t+r*Math.sin(i);this.xy?(this.xy[0]=a,this.xy[1]=s):this.xy=[a,s],this.commands.push(Command.Arc),this.params.push(e,t,r,o,i,n?1:0)},e.prototype.cubicCurveTo=function(e,t,r,o,i,n){this.xy||this.moveTo(e,t),this.commands.push(Command.Curve),this.params.push(e,t,r,o,i,n),this.xy[0]=i,this.xy[1]=n},Object.defineProperty(e.prototype,"closedPath",{get:function(){return this._closedPath},enumerable:!1,configurable:!0}),e.prototype.closePath=function(){this.xy&&(this.xy=void 0,this.commands.push(Command.ClosePath),this._closedPath=!0)},e.prototype.clear=function(e){(void 0===e?{trackChanges:!1}:e).trackChanges?(this.previousCommands=this.commands,this.previousParams=this.params,this.previousClosedPath=this._closedPath,this.commands=[],this.params=[]):(this.commands.length=0,this.params.length=0),this.xy=void 0,this._closedPath=!1},e.prototype.isPointInPath=function(e,t){for(var r=this.commands,o=this.params,i=r.length,n=-1e4,a=-1e4,s=NaN,l=NaN,c=0,u=0,d=0,p=0,h=0;p<i;p++)switch(r[p]){case Command.Move:isNaN(s)||segmentIntersection(s,l,c,u,n,a,e,t)&&d++,s=c=o[h++],l=u=o[h++];break;case Command.Line:segmentIntersection(c,u,o[h++],o[h++],n,a,e,t)&&d++,c=o[h-2],u=o[h-1];break;case Command.Curve:d+=cubicSegmentIntersections(c,u,o[h++],o[h++],o[h++],o[h++],o[h++],o[h++],n,a,e,t).length,c=o[h-2],u=o[h-1];break;case Command.Arc:d+=arcIntersections(o[h++],o[h++],o[h++],o[h++],o[h++],Boolean(o[h++]),n,a,e,t).length,c=o[h-2],u=o[h-1];break;case Command.ClosePath:isNaN(s)||segmentIntersection(s,l,c,u,n,a,e,t)&&d++}return d%2==1},e}(),__extends$2z=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$1Q=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a};
2function ScenePathChangeDetection(e){var t=e||{},r=t.redraw,o=void 0===r?RedrawType.MAJOR:r,i=t.changeCb;return SceneChangeDetection({redraw:o,type:"path",convertor:t.convertor,changeCb:i})}var Path=function(e){function t(t){var r=e.call(this)||this;return r.renderOverride=t,r.path=new Path2D,r._dirtyPath=!0,r}return __extends$2z(t,e),Object.defineProperty(t.prototype,"dirtyPath",{get:function(){return this._dirtyPath},set:function(e){this._dirtyPath!==e&&(this._dirtyPath=e,e&&this.markDirty(this,RedrawType.MAJOR))},enumerable:!1,configurable:!0}),t.prototype.checkPathDirty=function(){var e,t;this._dirtyPath||(this.dirtyPath=this.path.isDirty()||null!==(t=null===(e=this.fillShadow)||void 0===e?void 0:e.isDirty())&&void 0!==t&&t)},t.prototype.isPointInPath=function(e,t){var r=this.transformPoint(e,t);return this.path.closedPath&&this.path.isPointInPath(r.x,r.y)},t.prototype.isDirtyPath=function(){},t.prototype.updatePath=function(){},t.prototype.render=function(t){var r,o,i=t.ctx,n=t.forceRender,a=t.stats;if(this.dirty!==RedrawType.NONE||n){if(this.computeTransformMatrix(),this.matrix.toContext(i),(this.dirtyPath||this.isDirtyPath())&&(this.updatePath(),this.dirtyPath=!1),this.clipPath){if(i.save(),"normal"===this.clipMode&&(this.clipPath.draw(i),i.clip()),this.renderOverride?this.renderOverride(i):(this.path.draw(i),this.fillStroke(i)),"punch-out"===this.clipMode){this.clipPath.draw(i),i.clip();var s=null!==(r=this.computeBBox())&&void 0!==r?r:{},l=s.x,c=void 0===l?-1e4:l,u=s.y,d=void 0===u?-1e4:u,p=s.width,h=void 0===p?2e4:p,_=s.height,f=void 0===_?2e4:_;i.clearRect(c,d,h,f)}i.restore()}else this.renderOverride?this.renderOverride(i):(this.path.draw(i),this.fillStroke(i));null===(o=this.fillShadow)||void 0===o||o.markClean(),e.prototype.render.call(this,t)}else a&&(a.nodesSkipped+=this.nodeCount.count)},t.className="Path",__decorate$1Q([ScenePathChangeDetection()],t.prototype,"clipPath",void 0),__decorate$1Q([ScenePathChangeDetection()],t.prototype,"clipMode",void 0),t}(Shape);function isEqual$2(e,t,r){return void 0===r&&(r=1e-10),Math.abs(e-t)<r}function toFixed(e,t){void 0===t&&(t=2);var r=Math.floor(Math.log(Math.abs(e))/Math.LN10);return r>=0||!isFinite(r)?e.toFixed(t):e.toFixed(Math.abs(r)-1+t)}function mod(e,t){return e>=0?Math.floor(e%t):Math.floor(e%t+t)}var __extends$2y=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$1P=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},ArcType;!function(e){e[e.Open=0]="Open",e[e.Chord=1]="Chord",e[e.Round=2]="Round"}(ArcType||(ArcType={}));var Arc=function(e){function t(){var t=e.call(this)||this;return t.centerX=0,t.centerY=0,t.radius=10,t.startAngle=0,t.endAngle=2*Math.PI,t.counterClockwise=!1,t.type=ArcType.Open,t.restoreOwnStyles(),t}return __extends$2y(t,e),Object.defineProperty(t.prototype,"fullPie",{get:function(){return isEqual$2(normalizeAngle360(this.startAngle),normalizeAngle360(this.endAngle))},enumerable:!1,configurable:!0}),t.prototype.updatePath=function(){var e=this.path;e.clear(),e.arc(this.centerX,this.centerY,this.radius,this.startAngle,this.endAngle,this.counterClockwise),this.type===ArcType.Chord?e.closePath():this.type!==ArcType.Round||this.fullPie||(e.lineTo(this.centerX,this.centerY),e.closePath())},t.prototype.computeBBox=function(){return new BBox(this.centerX-this.radius,this.centerY-this.radius,2*this.radius,2*this.radius)},t.prototype.isPointInPath=function(e,t){var r=this.transformPoint(e,t),o=this.computeBBox();return this.type!==ArcType.Open&&o.containsPoint(r.x,r.y)&&this.path.isPointInPath(r.x,r.y)},t.className="Arc",t.defaultStyles=Object.assign({},Shape.defaultStyles,{lineWidth:1,fillStyle:null}
2),__decorate$1P([ScenePathChangeDetection()],t.prototype,"centerX",void 0),__decorate$1P([ScenePathChangeDetection()],t.prototype,"centerY",void 0),__decorate$1P([ScenePathChangeDetection()],t.prototype,"radius",void 0),__decorate$1P([ScenePathChangeDetection()],t.prototype,"startAngle",void 0),__decorate$1P([ScenePathChangeDetection()],t.prototype,"endAngle",void 0),__decorate$1P([ScenePathChangeDetection()],t.prototype,"counterClockwise",void 0),__decorate$1P([ScenePathChangeDetection()],t.prototype,"type",void 0),t}(Path);function ProxyPropertyOnWrite(e,t){return addTransformToInstanceProperty(function(r,o,i){return r[e][null!=t?t:o]=i,i})}function ActionOnSet(e){var t=e.newValue,r=e.oldValue,o=e.changeValue;return addTransformToInstanceProperty(function(e,i,n,a){return n!==a&&(void 0!==a&&(null==r||r.call(e,a)),void 0!==n&&(null==t||t.call(e,n)),null==o||o.call(e,n,a)),n})}var __decorate$1O=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},Caption=function(){function e(){this.node=new Text,this.enabled=!1,this.text="",this.fontSize=10,this.fontFamily="sans-serif",this.spacing=e.PADDING,this._lineHeight=void 0;var t=this.node;t.textAlign="center",t.pointerEvents=PointerEvents.None}return Object.defineProperty(e.prototype,"lineHeight",{get:function(){return this._lineHeight},set:function(e){this._lineHeight=e,this.node.lineHeight=e},enumerable:!1,configurable:!0}),e.PADDING=10,__decorate$1O([Validate(BOOLEAN)],e.prototype,"enabled",void 0),__decorate$1O([Validate(STRING),ProxyPropertyOnWrite("node")],e.prototype,"text",void 0),__decorate$1O([Validate(OPT_FONT_STYLE),ProxyPropertyOnWrite("node")],e.prototype,"fontStyle",void 0),__decorate$1O([Validate(OPT_FONT_WEIGHT),ProxyPropertyOnWrite("node")],e.prototype,"fontWeight",void 0),__decorate$1O([Validate(NUMBER(0)),ProxyPropertyOnWrite("node")],e.prototype,"fontSize",void 0),__decorate$1O([Validate(STRING),ProxyPropertyOnWrite("node")],e.prototype,"fontFamily",void 0),__decorate$1O([Validate(OPT_COLOR_STRING),ProxyPropertyOnWrite("node","fill")],e.prototype,"color",void 0),__decorate$1O([Validate(OPT_NUMBER(0))],e.prototype,"spacing",void 0),__decorate$1O([Validate(OPT_NUMBER(0))],e.prototype,"_lineHeight",void 0),e}(),Layers;function areArrayItemsStrictlyEqual(e,t){return e.length===t.length&&e.every(function(e,r){var o=t[r];return Array.isArray(e)&&Array.isArray(o)?areArrayItemsStrictlyEqual(e,o):e===o})}function areArrayNumbersEqual(e,t){return e.length===t.length&&e.every(function(e,r){return Number(e)===Number(t[r])})}function circleRectOverlap(e,t,r,o,i){var n=e.x<t?t:e.x>t+o?t+o:e.x,a=e.y<r?r:e.y>r+i?r+i:e.y,s=e.x-n,l=e.y-a;return Math.sqrt(s*s+l*l)<=.5*e.size}function rectRectOverlap(e,t,r,o,i){var n=e.x+e.width>t&&e.x<t+o,a=e.y+e.height>r&&e.y<r+i;return n&&a}function rectContainsRect(e,t,r,o,i){return t+o<e.x+e.width&&t>e.x&&r>e.y&&r+i<e.y+e.height}function isPointLabelDatum(e){return null!=e&&"object"==typeof e.point&&"object"==typeof e.label}function placeLabels(e,t,r){void 0===r&&(r=5);var o=[];e=e.map(function(e){return e.slice().sort(function(e,t){return t.point.size-e.point.size})});for(var i=0;i<e.length;i++){var n=o[i]=[],a=e[i];if(a&&a.length&&a[0].label)for(var s=function(i,s){var l=a[i],c=l.label,u=.5*l.point.size,d=l.point.x-.5*c.width,p=l.point.y-u-c.height-r,h=c.width,_=c.height;if(t&&!rectContainsRect(t,d,p,h,_))return"continue";var f=e.some(function(e){return e.some(function(e){return circleRectOverlap(e.point,d,p,h,_)})});if(f)return"continue";var g=o.some(function(e){return e.some(function(e){return rectRectOverlap(e,d,p,h,_)})});if(g)return"continue";n.push({index:i,text:c.text,x:d,y:p,width:h,height:_,datum:l})},l=0,c=a.length;l<c;l++)s(l)}return o}function axisLabelsOverlap(e,t){for(var r=[],o=function(o){var i=e[o],n=i.point,a=n.x,s=n.y,l=i.label.text,c=i.label,u=c.width,d=c.height;if(u+=null!=t?t:0,d+=null!=t?t:0,r.some(function(e){return rectRectOverlap(e,a,s,u,d)}))return{value:!0};r.push({index:o,text:l,x:a,y:s,width:u,height:d,datum:i})},i=0;i<e.length;i++){var n=o(i);if("object"==typeof n)return n.value}return!1}!function(e){e[e.SERIES_BACKGROUND_ZINDEX=-10]="SERIES_BACKGROUND_ZINDEX",e[e.AXIS_GRID_ZINDEX=0]="AXIS_GRID_ZINDEX",e[e.AXIS_ZINDEX=20]="AXIS_ZINDEX",e[e.SERIES_CROSSLINE_RANGE_ZINDEX=30]="SERIES_CROSSLINE_RANGE_ZINDEX",e[e.SERIES_LAYER_ZINDEX=500]="SERIES_LAYER_ZINDEX",e[e.SERIES_LABEL_ZINDEX=1e3]="SERIES_LABEL_ZINDEX",e[e.SERIES_CROSSLINE_LINE_ZINDEX=2500]="SERIES_CROSSLINE_LINE_ZINDEX",e[e.LEGEND_ZINDEX=3e3]="LEGEND_ZINDEX"}(Layers||(Layers={}));var __read$Q=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},__spread$v=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read$Q(arguments[t]));return e},_a$1,group=function(e){return"("+e+")"},optionalGroup=function(e){return group(e)+"?"},nonCapturingGroup=function(e){return optionalGroup("?:"+e)},formatRegEx=new RegExp(["^",nonCapturingGroup(""+optionalGroup(".")+group("[<>=^]")),optionalGroup("[+\\-( ]"),optionalGroup("[$€£¥₣₹#]"),optionalGroup("0"),optionalGroup("\\d+"),optionalGroup(","),nonCapturingGroup("\\."+group("\\d+")),optionalGroup("~"),optionalGroup("[%a-z]"),"$"].join(""),"i"),surroundedRegEx=new RegExp(["^",group(".*?"),"#\\{"+group(".+?")+"\\}",group(".*?"),"$"].join(""));function parseFormatter(e){var t,r,o,i=e.match(surroundedRegEx);i&&(r=(t=__read$Q(i,4))[1],e=t[2],o=t[3]);var n=e.match(formatRegEx);
2if(!n)throw new Error("The number formatter is invalid: "+e);var a=__read$Q(n,11),s=a[1],l=a[2],c=a[3],u=a[4],d=a[5],p=a[6],h=a[7],_=a[8],f=a[9],g=a[10];return{fill:s,align:l,sign:c,symbol:u,zero:d,width:parseInt(p),comma:h,precision:parseInt(_),trim:Boolean(f),type:g,prefix:r,suffix:o}}function format(e){var t,r="string"==typeof e?parseFormatter(e):e,o=r.fill,i=r.align,n=r.sign,a=void 0===n?"-":n,s=r.symbol,l=r.zero,c=r.width,u=r.comma,d=r.type,p=r.prefix,h=void 0===p?"":p,_=r.suffix,f=void 0===_?"":_,g=r.precision,y=r.trim;if(d)if(d in decimalTypes&&d in integerTypes)t=isNaN(g)?integerTypes[d]:decimalTypes[d];else if(d in decimalTypes)t=decimalTypes[d];else{if(!(d in integerTypes))throw new Error("The number formatter type is invalid: "+d);t=integerTypes[d]}else t=decimalTypes.g,y=!0;return isNaN(g)&&(g=d?6:12),function(e){var r=t(e,g);return y&&(r=removeTrailingZeros(r)),u&&(r=insertSeparator(r,u)),r=addSign(e,r,a),s&&"#"!==s&&(r=""+s+r),"#"===s&&"x"===d&&(r="0x"+r),"s"===d&&(r=""+r+getSIPrefix(e)),"%"!==d&&"p"!==d||(r+="%"),isNaN(c)||(r=addPadding(r,c,o||l,i)),""+h+r+f}}var absFloor=function(e){return Math.floor(Math.abs(e))},integerTypes={b:function(e){return absFloor(e).toString(2)},c:function(e){return String.fromCharCode(e)},d:function(e){return Math.round(Math.abs(e)).toFixed(0)},o:function(e){return absFloor(e).toString(8)},x:function(e){return absFloor(e).toString(16)},X:function(e){return integerTypes.x(e).toUpperCase()},n:function(e){return integerTypes.d(e)},"%":function(e){return""+absFloor(100*e).toFixed(0)}},decimalTypes={e:function(e,t){return Math.abs(e).toExponential(t)},E:function(e,t){return decimalTypes.e(e,t).toUpperCase()},f:function(e,t){return Math.abs(e).toFixed(t)},F:function(e,t){return decimalTypes.f(e,t).toUpperCase()},g:function(e,t){if(0===e)return"0";var r=Math.abs(e),o=Math.floor(Math.log10(r));return o>=-4&&o<t?r.toFixed(t-1-o):r.toExponential(t-1)},G:function(e,t){return decimalTypes.g(e,t).toUpperCase()},n:function(e,t){return decimalTypes.g(e,t)},p:function(e,t){return decimalTypes.r(100*e,t)},r:function(e,t){if(0===e)return"0";var r=Math.abs(e),o=Math.floor(Math.log10(r))-(t-1);if(o<=0)return r.toFixed(-o);var i=Math.pow(10,o);return(Math.round(r/i)*i).toFixed()},s:function(e,t){var r=getSIPrefixPower(e);return decimalTypes.r(e/Math.pow(10,r),t)},"%":function(e,t){return decimalTypes.f(100*e,t)}};function removeTrailingZeros(e){return e.replace(/\.0+$/,"").replace(/(\.[1-9])0+$/,"$1")}function insertSeparator(e,t){var r=e.indexOf(".");r<0&&(r=e.length);for(var o=e.substring(0,r).split(""),i=e.substring(r),n=o.length-3;n>0;n-=3)o.splice(n,0,t);return""+o.join("")+i}function getSIPrefix(e){return siPrefixes[getSIPrefixPower(e)]}function getSIPrefixPower(e){var t=Math.log10(Math.abs(e)),r=3*Math.floor(t/3);return Math.max(minSIPrefix,Math.min(maxSIPrefix,r))}var minSIPrefix=-24,maxSIPrefix=24,siPrefixes=(_a$1={},_a$1[minSIPrefix]="y",_a$1[-21]="z",_a$1[-18]="a",_a$1[-15]="f",_a$1[-12]="p",_a$1[-9]="n",_a$1[-6]="µ",_a$1[-3]="m",_a$1[0]="",_a$1[3]="k",_a$1[6]="M",_a$1[9]="G",_a$1[12]="T",_a$1[15]="P",_a$1[18]="E",_a$1[21]="Z",_a$1[maxSIPrefix]="Y",_a$1),minusSign="−";function addSign(e,t,r){return void 0===r&&(r=""),"("===r?e>=0?t:"("+t+")":""+(e>=0?"+"===r?"+":"":minusSign)+t}function addPadding(e,t,r,o){void 0===r&&(r=" "),void 0===o&&(o=">");var i=e;if(">"!==o&&o){if("<"===o)i=i.padEnd(t,r);else if("^"===o){var n=Math.max(0,t-i.length),a=Math.ceil(n/2),s=Math.floor(n/2);i=(i=i.padStart(a+i.length,r)).padEnd(s+i.length,r)}}else i=i.padStart(t,r);return i}function tickFormat(e,t){var r=parseFormatter(t||",f");isNaN(r.precision)&&("f"===r.type||"%"===r.type?r.precision=Math.max.apply(Math,__spread$v(e.map(function(e){if("number"!=typeof e||0===e)return 0;var t=Math.floor(Math.log10(Math.abs(e))),o=r.type?6:12,i=e.toExponential(o-1).replace(/\.?0+e/,"e"),n=i.indexOf(".");if(n<0)return t>=0?0:-t;var a=i.indexOf("e")-n;return Math.max(0,a-t-1)}))):r.type&&!(r.type in decimalTypes)||(r.precision=Math.max.apply(Math,__spread$v(e.map(function(e){if("number"!=typeof e)return 0;var t=e.toExponential((r.type?6:12)-1).replace(/\.?0+e/,"e");return t.substring(0,t.indexOf("e")).replace(".","").length})))));var o=format(r);return function(e){return o(Number(e))}}var __extends$2x=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$1N=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},__read$P=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},__spread$u=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read$P(arguments[t]));return e},identity=function(e){return e},LogScale=function(e){function t(){var t=e.call(this,[1,10],[0,1])||this;return t.type="log",t.base=10,t.cacheProps=["domain","range","nice","tickCount","base"],t.baseLog=identity,t.basePow=identity,t.log=function(e){return t.domain[0]>
2=0?t.baseLog(e):-t.baseLog(-e)},t.pow=function(e){return t.domain[0]>=0?t.basePow(e):-t.basePow(-e)},t}return __extends$2x(t,e),t.prototype.toDomain=function(e){return e},t.prototype.transform=function(e){return this.domain[0]>=0?Math.log(e):-Math.log(-e)},t.prototype.transformInvert=function(e){return this.domain[0]>=0?Math.exp(e):-Math.exp(-e)},t.prototype.update=function(){!this.domain||this.domain.length<2||(this.updateLogFn(),this.updatePowFn(),this.nice&&this.updateNiceDomain())},t.prototype.updateLogFn=function(){var e,t=this.base;if(10===t)e=Math.log10;else if(t===Math.E)e=Math.log;else if(2===t)e=Math.log2;else{var r=Math.log(t);e=function(e){return Math.log(e)/r}}this.baseLog=e},t.prototype.updatePowFn=function(){var e,r=this.base;e=10===r?t.pow10:r===Math.E?Math.exp:function(e){return Math.pow(r,e)},this.basePow=e},t.prototype.updateNiceDomain=function(){var e=__read$P(this.domain,2),t=e[0],r=e[1],o=this.pow(Math.floor(this.log(t))),i=this.pow(Math.ceil(this.log(r)));this.niceDomain=[o,i]},t.pow10=function(e){return e>=0?Math.pow(10,e):1/Math.pow(10,-e)},t.prototype.ticks=function(){var e,t=this,r=null!==(e=this.tickCount)&&void 0!==e?e:10;if(!this.domain||this.domain.length<2||r<1)return[];this.refresh();var o=this.base,i=__read$P(this.getDomain(),2),n=i[0],a=i[1],s=this.log(n),l=this.log(a);if(this.interval){var c=Math.abs(this.interval),u=Math.abs(l-s),d=range(s,l,Math.min(u,c)).map(function(e){return t.pow(e)}).filter(function(e){return e>=n&&e<=a});if(!this.isDenseInterval({start:n,stop:a,interval:c,count:d.length}))return d}if(o%1!=0||l-s>=r)return ticks(s,l,Math.min(l-s,r)).map(function(e){return t.pow(e)});var p=[],h=n>0;s=Math.floor(s)-1,l=Math.round(l)+1;for(var _=Math.min.apply(Math,__spread$u(this.range)),f=(Math.max.apply(Math,__spread$u(this.range))-_)/r,g=1/0,y=s;y<=l;y++)for(var m=this.convert(this.pow(y+1)),v=1;v<o;v++){var E=h?v:o-v+1,C=this.pow(y)*E,O=this.convert(C),P=Math.abs(g-O),S=Math.abs(O-m);C>=n&&C<=a&&(1===v||P>=f&&S>=f)&&(p.push(C),g=O)}return p},t.prototype.tickFormat=function(e){var t=this,r=e.count,o=e.ticks,i=e.specifier,n=this.base;if(null==i&&(i=10===n?".0e":","),"function"!=typeof i&&(i=format(i)),r===1/0)return i;null==r&&(r=10),o=null!=o?o:this.ticks();var a=Math.max(1,n*r/o.length);return function(e){var r=e/t.pow(Math.round(t.log(e)));return r*n<n-.5&&(r*=n),r<=a?i(e):""}},__decorate$1N([Validate(NUMBER(0))],t.prototype,"base",void 0),t}(ContinuousScale),ChartAxisDirection;function Default(e,t){return void 0===t&&(t=[void 0]),addTransformToInstanceProperty(function(r,o,i){return t.includes(i)?e:i})}function createDeprecationWarning(){return function(e,t){var r=["Property ["+e+"] is deprecated.",t].filter(function(e){return null!=e}).join(" ");Logger.warnOnce(r)}}function Deprecated(e,t){var r=null==t?void 0:t.default,o=createDeprecationWarning();return addTransformToInstanceProperty(function(t,i,n){return n!==r&&o(i.toString(),e),n})}function DeprecatedAndRenamedTo(e,t){var r=createDeprecationWarning();return addTransformToInstanceProperty(function(o,i,n){return n!==o[e]&&(r(i.toString(),"Use ["+e+"] instead."),o[e]=t?t(n):n),BREAK_TRANSFORM_CHAIN},function(t,o){return r(o.toString(),"Use ["+e+"] instead."),t[e]})}!function(e){e.X="x",e.Y="y"}(ChartAxisDirection||(ChartAxisDirection={}));var __decorate$1M=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},Label$1=function(){function e(){this.enabled=!0,this.fontSize=12,this.fontFamily="Verdana, sans-serif",this.fontStyle=void 0,this.fontWeight=void 0,this.color="rgba(70, 70, 70, 1)"}return e.prototype.getFont=function(){return getFont(this.fontSize,this.fontFamily,this.fontStyle,this.fontWeight)},__decorate$1M([Validate(BOOLEAN)],e.prototype,"enabled",void 0),__decorate$1M([Validate(NUMBER(0))],e.prototype,"fontSize",void 0),__decorate$1M([Validate(STRING)],e.prototype,"fontFamily",void 0),__decorate$1M([Validate(OPT_FONT_STYLE)],e.prototype,"fontStyle",void 0),__decorate$1M([Validate(OPT_FONT_WEIGHT)],e.prototype,"fontWeight",void 0),__decorate$1M([Validate(COLOR_STRING)],e.prototype,"color",void 0),e}();function calculateLabelRotation(e){var t=e.parallelFlipRotation,r=void 0===t?0:t,o=e.regularFlipRotation,i=void 0===o?0:o,n=e.rotation?normalizeAngle360(toRadians$1(e.rotation)):0,a=!n&&r>=0&&r<=Math.PI?-1:1,s=!n&&i>=0&&i<=Math.PI?-1:1,l=0;return e.parallel?l=a*Math.PI/2:-1===s&&(l=Math.PI),{labelRotation:n,autoRotation:l,parallelFlipFlag:a,regularFlipFlag:s}}var __decorate$1L=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},__read$O=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},__spread$t=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read$O(arguments[t]));return e},TICK_COUNT=predicateWithMessage(function(e,t){return NUMBER(0)(e,t)||e instanceof TimeInterval},"expecting a tick count Number value or, for a time axis, a Time Interval such as 'agCharts.time.month'"),OPT_TICK_COUNT=predicateWithMessage(function(e,t){return OPTIONAL(e,t,TICK_COUNT)},"expecting an optional tick count Number value or, for a time axis, a Time Interval such as 'agCharts.time.month'"),OPT_TICK_INTERVAL=predicateWithMessage(function(e,t){return OPTIONAL(e,t,function(e,t){return 0!==e&&NUMBER(0)(e,t)||e instanceof TimeInterval})},"expecting an optional non-zero positive Number value or, for a time axis, a Time Interval such as 'agCharts.time.month'"),GRID_STYLE_KEYS=["stroke","lineDash"],GRID_STYLE=predicateWithMessage(ARRAY(void 0,function(e){for(var t in e)if(!GRID_STYLE_KEYS.includes(t))return!1;return!0}),"expecting an Array of objects with gridline style properties such as 'stroke' and 'lineDash'"),Tags;!function(e){e[e.TickLine=0]="TickLine",e[e.TickLabel=1]="TickLabel",e[e.GridLine=2]="GridLine",e[e.GridArc=3]="GridArc",e[e.AxisLine=4]="AxisLine"}(Tags||(Tags={}));var AxisLine=function(){function e(){this.width=1,this.color="rgba(195, 195, 195, 1)"}return __decorate$1L([Validate(NUMBER(0))],e.prototype,"width",void 0),__decorate$1L([Validate(OPT_COLOR_STRING)],e.prototype,"color",void 0),e}(),AxisTick=function(){function e(){this.width=1,this.size=6,this.color="rgba(195, 195, 195, 1)",this.count=void 0,this.interval=void 0,this.values=void 0,this.minSpacing=NaN,this.maxSpacing=NaN}return __decorate$1L([Validate(NUMBER(0))],e.prototype,"width",void 0),__decorate$1L([Validate(NUMBER(0))],e.prototype,"size",void 0),__decorate$1L([Validate(OPT_COLOR_STRING)],e.prototype,"color",void 0),__decorate$1L([Validate(OPT_TICK_COUNT),Deprecated("Use tick.interval or tick.minSpacing and tick.maxSpacing instead")],e.prototype,"count",void 0),__decorate$1L([Validate(OPT_TICK_INTERVAL)],e.prototype,"interval",void 0),__decorate$1L([Validate(OPT_ARRAY())],e.prototype,"values",void 0),__decorate$1L([Validate(AND(NUMBER_OR_NAN(1),LESS_THAN("maxSpacing"))),Default(NaN)],e.prototype,"minSpacing",void 0),__decorate$1L([Validate(AND(NUMBER_OR_NAN(1),GREATER_THAN("minSpacing"))),Default(NaN)],e.prototype,"maxSpacing",void 0),e}(),AxisLabel=function(){function e(){this.fontStyle=void 0,this.fontWeight=void 0,this.fontSize=12,this.fontFamily="Verdana, sans-serif",this.padding=5,this.minSpacing=NaN,this.color="rgba(87, 87, 87, 1)",this.rotation=void 0,this.autoRotate=void 0,this.autoRotateAngle=335,this.avoidCollisions=!0,this.mirrored=!1,this.parallel=!1,this.formatter=void 0,this.format=void 0}return __decorate$1L([Validate(OPT_FONT_STYLE)],e.prototype,"fontStyle",void 0),__decorate$1L([Validate(OPT_FONT_WEIGHT)],e.prototype,"fontWeight",void 0),__decorate$1L([Validate(NUMBER(1))],e.prototype,"fontSize",void 0),__decorate$1L([Validate(STRING)],e.prototype,"fontFamily",void 0),__decorate$1L([Validate(NUMBER(0))],e.prototype,"padding",void 0),__decorate$1L([Validate(NUMBER_OR_NAN()),Default(NaN)],e.prototype,"minSpacing",void 0),__decorate$1L([Validate(OPT_COLOR_STRING)],e.prototype,"color",void 0),__decorate$1L([Validate(OPT_NUM
2BER(-360,360))],e.prototype,"rotation",void 0),__decorate$1L([Validate(OPT_BOOLEAN)],e.prototype,"autoRotate",void 0),__decorate$1L([Validate(NUMBER(-360,360))],e.prototype,"autoRotateAngle",void 0),__decorate$1L([Validate(BOOLEAN)],e.prototype,"avoidCollisions",void 0),__decorate$1L([Validate(BOOLEAN)],e.prototype,"mirrored",void 0),__decorate$1L([Validate(BOOLEAN)],e.prototype,"parallel",void 0),__decorate$1L([Validate(OPT_STRING)],e.prototype,"format",void 0),e}(),Axis=function(){function e(e){this.id=createId$1(this),this.nice=!0,this.dataDomain=[],this.axisGroup=new Group({name:this.id+"-axis",zIndex:Layers.AXIS_ZINDEX}),this.lineNode=this.axisGroup.appendChild(new Line),this.tickLineGroup=this.axisGroup.appendChild(new Group({name:this.id+"-Axis-tick-lines",zIndex:Layers.AXIS_ZINDEX})),this.tickLabelGroup=this.axisGroup.appendChild(new Group({name:this.id+"-Axis-tick-labels",zIndex:Layers.AXIS_ZINDEX})),this.crossLineGroup=new Group({name:this.id+"-CrossLines"}),this.gridGroup=new Group({name:this.id+"-Axis-grid"}),this.gridLineGroup=this.gridGroup.appendChild(new Group({name:this.id+"-gridLines",zIndex:Layers.AXIS_GRID_ZINDEX})),this.gridArcGroup=this.gridGroup.appendChild(new Group({name:this.id+"-gridArcs",zIndex:Layers.AXIS_GRID_ZINDEX})),this.tickLineGroupSelection=Selection.select(this.tickLineGroup,Line),this.tickLabelGroupSelection=Selection.select(this.tickLabelGroup,Text),this.gridLineGroupSelection=Selection.select(this.gridLineGroup,Line),this.gridArcGroupSelection=Selection.select(this.gridArcGroup,Arc),this._crossLines=[],this.line=new AxisLine,this.tick=new AxisTick,this.label=new AxisLabel,this.translation={x:0,y:0},this.rotation=0,this.layout={label:{align:"center",baseline:"middle",rotation:0,fractionDigits:0}},this.requestedRange=[0,1],this._visibleRange=[0,1],this._title=void 0,this._gridLength=0,this.gridStyle=[{stroke:"rgba(219, 219, 219, 1)",lineDash:[4,2]}],this._radialGrid=!1,this.fractionDigits=0,this.gridPadding=0,this.seriesAreaPadding=0,this.thickness=0,this._scale=e,this.refreshScale()}return Object.defineProperty(e.prototype,"scale",{get:function(){return this._scale},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"crossLines",{get:function(){return this._crossLines},set:function(e){var t,r,o=this;null===(t=this._crossLines)||void 0===t||t.forEach(function(e){return o.detachCrossLine(e)}),this._crossLines=e,null===(r=this._crossLines)||void 0===r||r.forEach(function(e){o.attachCrossLine(e),o.initCrossLine(e)})},enumerable:!1,configurable:!0}),e.prototype.attachCrossLine=function(e){this.crossLineGroup.appendChild(e.group)},e.prototype.detachCrossLine=function(e){this.crossLineGroup.removeChild(e.group)},e.prototype.destroy=function(){},e.prototype.refreshScale=function(){var e,t=this;this.requestedRange=this.scale.range.slice(),null===(e=this.crossLines)||void 0===e||e.forEach(function(e){t.initCrossLine(e)})},e.prototype.updateRange=function(){var e,t=this,r=t.requestedRange,o=t.visibleRange,i=t.scale,n=(r[1]-r[0])/(o[1]-o[0]),a=n*o[0],s=r[0]-a;i.range=[s,s+n],null===(e=this.crossLines)||void 0===e||e.forEach(function(e){e.clippedRange=[r[0],r[1]]})},e.prototype.setCrossLinesVisible=function(e){this.crossLineGroup.visible=e},e.prototype.attachAxis=function(e,t){e.insertBefore(this.gridGroup,t),e.insertBefore(this.axisGroup,t),e.insertBefore(this.crossLineGroup,t)},e.prototype.detachAxis=function(e){e.removeChild(this.gridGroup),e.removeChild(this.axisGroup),e.removeChild(this.crossLineGroup)},e.prototype.inRange=function(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=0),0===this.inRangeEx(e,t,r)},e.prototype.inRangeEx=function(e,t,r){void 0===t&&(t=0),void 0===r&&(r=0);var o=this.range,i=Math.min(o[0],o[1]),n=Math.max(o[0],o[1]);return e+t<i-r?-1:e>n+r?1:0},Object.defineProperty(e.prototype,"range",{get:function(){return this.requestedRange},set:function(e){this.requestedRange=e.slice(),this.updateRange()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"visibleRange",{get:function(){return this._visibleRange.slice()},set:function(e){if(e&&2===e.length){var t=__read$O(e,2),r=t[0],o=t[1];r=Math.max(0,r),o=Math.min(1,o),r=Math.min(r,o),o=Math.max(r,o),this._visibleRange=[r,o],this.updateRange()}}
2,enumerable:!1,configurable:!0}),e.prototype.onLabelFormatChange=function(e,t){var r=this.scale,o=this.fractionDigits,i=!(r instanceof LogScale)&&o>0?function(e){return"number"==typeof e?e.toFixed(o):String(e)}:function(e){return String(e)};if(t&&r&&r.tickFormat)try{this.labelFormatter=r.tickFormat({ticks:e,specifier:t})}catch(e){this.labelFormatter=i,Logger.warnOnce("the axis label format string "+t+" is invalid. No formatting will be applied")}else this.labelFormatter=i},Object.defineProperty(e.prototype,"title",{get:function(){return this._title},set:function(e){var t=this._title;t!==e&&(t&&this.axisGroup.removeChild(t.node),e&&(e.node.rotation=-Math.PI/2,this.axisGroup.appendChild(e.node)),this._title=e,this.setTickCount(this.tick.count),this.setTickInterval(this.tick.interval),this.updateTitle({ticks:this.scale.ticks()}))},enumerable:!1,configurable:!0}),e.prototype.setDomain=function(){var e,t=this,r=t.scale,o=t.dataDomain,i=t.tick.values;if(i&&r instanceof ContinuousScale){var n=__read$O(null!==(e=extent$4(i))&&void 0!==e?e:[1/0,-1/0],2),a=n[0],s=n[1],l=Math.min(r.fromDomain(o[0]),a),c=Math.max(r.fromDomain(o[1]),s);r.domain=[r.toDomain(l),r.toDomain(c)]}else r.domain=o},e.prototype.setTickInterval=function(e){var t;this.scale.interval=null!==(t=this.tick.interval)&&void 0!==t?t:e},e.prototype.setTickCount=function(e,t,r){var o=this.scale;if(e&&o instanceof ContinuousScale)return"number"==typeof e?(o.tickCount=e,o.minTickCount=null!=t?t:0,void(o.maxTickCount=null!=r?r:1/0)):void(o instanceof TimeScale$1&&this.setTickInterval(e))},Object.defineProperty(e.prototype,"gridLength",{get:function(){return this._gridLength},set:function(e){var t,r=this;(this._gridLength&&!e||!this._gridLength&&e)&&(this.gridLineGroupSelection=this.gridLineGroupSelection.clear(),this.gridArcGroupSelection=this.gridArcGroupSelection.clear()),this._gridLength=e,null===(t=this.crossLines)||void 0===t||t.forEach(function(e){r.initCrossLine(e)})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"radialGrid",{get:function(){return this._radialGrid},set:function(e){this._radialGrid!==e&&(this._radialGrid=e,this.gridLineGroupSelection=this.gridLineGroupSelection.clear(),this.gridArcGroupSelection=this.gridArcGroupSelection.clear())},enumerable:!1,configurable:!0}),e.prototype.update=function(e){var t,r;this.calculateDomain();var o=this,i=o.scale,n=o.gridLength,a=o.tick,s=o.label,l=s.parallel,c=s.mirrored,u=s.avoidCollisions,d=o.requestedRange,p=Math.min.apply(Math,__spread$t(d)),h=Math.max.apply(Math,__spread$t(d)),_=toRadians$1(this.rotation),f=this.isAnySeriesActive(),g=c?1:-1,y=normalizeAngle360(_),m=normalizeAngle360(_-Math.PI/2),v=this.nice;this.setDomain(),this.setTickInterval(this.tick.interval),i instanceof ContinuousScale&&(i.nice=v,this.setTickCount(this.tick.count),i.update());var E=(i.bandwidth||0)/2;this.updatePosition(),this.updateLine();for(var C=0,O=!0,P=[],S=this.estimateTickCount({minSpacing:this.tick.minSpacing,maxSpacing:this.tick.maxSpacing}),b=S.maxTickCount,D=S.minTickCount,M=S.defaultTickCount,T=i instanceof ContinuousScale,A=void 0!==e,x=u&&void 0===this.tick.interval&&void 0===this.tick.values,w=!isNaN(this.tick.minSpacing)||!isNaN(this.tick.maxSpacing),R=this.tick.count||!T||isNaN(b)?10:b;O;){for(var I=!0,L=function(){if(C>R)return"break";var r=P,o=Math.max(M-C,D),a=x&&!(T&&void 0===N.tick.count)&&(w||0!==C);if(N.tick.values?P=N.tick.values:0===b?P=[]:0!==C&&a||(N.setTickCount(null!==(t=N.tick.count)&&void 0!==t?t:o,D,b),P=i.ticks()),a){var s=w?Math.ceil(P.length/o):2;P=P.filter(function(e,t){return t%s===0})}var l=void 0;A&&(l=N.updateSecondaryAxisTicks(e),P=l),N.updateSelections({halfBandwidth:E,gridLength:n,ticks:P}),!A&&P.length>0&&(e=P.length),I=!!x&&areArrayNumbersEqual(P,r),C++},N=this;I&&"break"!==L(););if(I)break;this.onLabelFormatChange(P,this.label.format);var k=this.updateLabels({parallelFlipRotation:y,regularFlipRotation:m,sideFlag:g,tickLabelGroupSelection:this.tickLabelGroupSelection,ticks:P}),B=k.labelData,F=k.rotated,$=this.getLabelSpacing(F);O=!!x&&axisLabelsOverlap(B,$)}this.updateGridLines({gridLength:n,halfBandwidth:E,sideFlag:g});var U=!1,G=function(e){var t=Math.floor(p),r=Math.ceil(h);if(t!==r){e.translationY>=t-1&&e.translationY<t&&(e.translationY=t),e.translationY>r&&e.translationY<=r+1&&(e.translationY=r);var o=e.translationY>=t&&e.translationY<=r;o&&(U=!0),e.visible=o}else e.visible=!1},W=this,K=W.gridLineGroupSelection,V=W.gridArcGroupSelection,j=W.tickLineGroupSelection,H=W.tickLabelGroupSelection;return K.each(G),V.each(G),j.each(G),H.each(G),this.tickLineGroup.visible=U,this.tickLabelGroup.visible=U,this.gridLineGroup.visible=U,this.gridArcGroup.visible=U,null===(r=this.crossLines)||void 0===r||r.forEach(function(e){e.sideFlag=-g,e.direction=_===-Math.PI/2?ChartAxisDirection.X:ChartAxisDirection.Y,e.label.parallel=void 0!==e.label.parallel?e.label.parallel:l,e.parallelFlipRotation=y,e.regularFlipRotation=m,e.update(f)}),this.updateTitle({ticks:P}),j.each(function(e){e.strokeWidth=a.width,e.stroke=a.color,e.visible=U,e.x1=g*a.size,e.x2=0,e.y1=0,e.y2=0}),e},e.prototype.estimateTickCount=function(t){var r=t.minSpacing,o=t.maxSpacing,i=this.requestedRange,n=Math.min.apply(Math,__spread$t(i)),a=Math.max.apply(Math,__spread$t(i))-n,s=Math.max(e.defaultTickMinSpacing,a/ContinuousScale.defaultMaxTickCount);isNaN(r)&&isNaN(o)?(r=s)>(o=a)&&(o=r):isNaN(r)?(r=s)>o&&(r=o):isNaN(o)&&r>(o=a)&&(o=r);var l=Math.max(1,Math.floor(a/r)),c=Math.min(l,Math.ceil(a/o)),u=ContinuousScale.defaultTickCount;return u>l?u=l:u<c&&(u=c),{minTickCount:c,maxTickCount:l,defaultTickCount:u}},e.prototype.getLabelSpacing=function(e){var t=this.label;return isNaN(t.minSpacing)?e?0:10:t.minSpacing},e.prototype.calculateDomain=function(){},e.prototype.updatePosition=function(){var e=this,t=e.label,r=e.crossLineGroup,o=e.axisGroup,i=e.gridGroup,n=e.translation,a=e.gridLineGroupSelection,s=e.gridPadding,l=e.gridLength,c=toRadians$1(this.rotation),u=t.mirrored?1:-1,d=Math.floor(n.x),p=Math.floor(n.y);r.translationX=d,r.translationY=p,r.rotation=c,o.translationX=d,o.translationY=p,o.rotation=c,i.translationX=d,i.translationY=p,i.rotation=c,a.each(function(e){e.x1=s,e.x2=-u*l+s,e.y1=0,e.y2=0})},e.prototype.updateSecondaryAxisTicks=function(e){throw new Error("AG Charts - unexpected call to updateSecondaryAxisTicks() - check axes configuration.")},e.prototype.updateSelections=function(e){var t=e.ticks,r=e.halfBandwidth,o=e.gridLength,i=this.scale,n=t.map(function(e){return{tick:e,translationY:i.convert(e)+r}}),a=this.radialGrid?this.gridLineGroupSelection:this.gridLineGroupSelection.update(o?n:[],function(e){var t=new Line;t.tag=Tags.GridLine,e.append(t)}),s=this.radialGrid?this.gridArcGroupSelection.update(o?n:[],function(e){var t=new Arc;t.tag=Tags.GridArc,e.append(t)}):this.gridArcGroupSelection,l=this.tickLineGroupSelection.update(n,function(e){var t=new Line;t.tag=Tags.TickLine,e.appendChild(t)}),c=this.tickLabelGroupSelection.update(n,function(e){var t=new Text;t.tag=Tags.TickLabel,e.appendChild(t)}),u=function(e){return e.translationY=Math.round(e.datum.translationY)};a.each(u),s.each(u),l.each(u),c.each(u),this.tickLineGroupSelection=l,this.tickLabelGroupSelection=c,this.gridLineGroupSelection=a,this.gridArcGroupSelection=s},e.prototype.updateGridLines=function(e){var t=e.gridLength,r=e.halfBandwidth,o=e.sideFlag,i=this,n=i.gridStyle,a=i.scale,s=i.tick,l=i.gridPadding;if(t&&n.length){var c=n.length,u=void 0;if(this.radialGrid){var d=normalizeAngle360Inclusive(toRadians$1(t));u=this.gridArcGroupSelection.each(function(e,t){var o=Math.round(a.convert(t)+r);e.centerX=0,e.centerY=a.range[0]-o,e.endAngle=d,e.radius=o})}else u=this.gridLineGroupSelection.each(function(e){e.x1=l,e.x2=-o*t+l,e.y1=0,e.y2=0});u.each(function(e,t,r){var o=n[r%c];e.stroke=o.stroke,e.strokeWidth=s.width,e.lineDash=o.lineDash,e.fill=void 0})}},e.prototype.updateLabels=function(e){var t=this,r=e.ticks,o=e.tickLabelGroupSelection,i=e.sideFlag,n=e.parallelFlipRotation,a=e.regularFlipRotation,s=this,l=s.label,c=s.label,u=c.parallel,d=c.rotation,p=s.tick,h=0,_=calculateLabelRotation({rotation:d,parallel:u,regularFlipRotation:a,parallelFlipRotation:n}),f=_.autoRotation,g=_.labelRotation,y=_.parallelFlipFlag,m=_.regularFlipFlag;this.fractionDigits=r.fractionDigits>=0?r.fractionDigits:0;var v=new Map,E=i*(p.size+l.padding+this.seriesAreaPadding),C=new Matrix;Matrix.updateTransformMatrix(C,1,1,f,0,0);var O=[],P=o.each(function(e,r,o){var i=r.tick,n=r.translationY;e.fontStyle=l.fontStyle,e.fontWeight=l.fontWeight,e.fontSize=l.fontSize,e.fontFamily=l.fontFamily,e.fill=l.color,e.text=t.formatTickDatum(i,o);var a=""===e.text||null==e.text,s=e.computeBBox(),c=s.width,u=s.height,d=new BBox(E,n,0,0);C.transformBBox(d,s);var p=s.x,h=void 0===p?0:p,_=s.y,f=void 0===_?0:_;s.width=c,s.height=u,v.set(o,a?null:s),a||O.push({point:{x:h,y:f,size:0},label:{width:c,height:u,text:""}}
2)}),S=this.getLabelSpacing(),b=axisLabelsOverlap(O,S);void 0===l.rotation&&!0===l.autoRotate&&b&&(h=normalizeAngle360(toRadians$1(l.autoRotateAngle)));var D="middle";u&&!g&&(D=i*y===-1?"hanging":"bottom");var M=g>0&&g<=Math.PI,T=h>0&&h<=Math.PI,A="start";u?g||h?i*(M||T?-1:1)==-1&&(A="end"):A="center":i*m===-1&&(A="end");var x=f+g+h;return x&&Matrix.updateTransformMatrix(C,1,1,x,0,0),O=[],P.each(function(e,t,r){if(""!==e.text&&null!=e.text){e.textBaseline=D,e.textAlign=A,e.x=E,e.rotationCenterX=E,e.rotation=x;var o=v.get(r);if(o){e.visible=!0;var i=o.width,n=void 0===i?0:i,a=o.height,s=void 0===a?0:a,l=t.translationY,c=new BBox(E,l,0,0);C.transformBBox(c,o);var u=o.x,d=void 0===u?0:u,p=o.y,h=void 0===p?0:p;O.push({point:{x:d,y:h,size:0},label:{width:n,height:s,text:e.text}})}}else e.visible=!1}),this.layout.label={align:A,baseline:D,rotation:x,fractionDigits:this.fractionDigits},{labelData:O,rotated:!(!g&&!h)}},e.prototype.updateLine=function(){var e=this.lineNode,t=this.requestedRange;e.x1=0,e.x2=0,e.y1=t[0],e.y2=t[1],e.strokeWidth=this.line.width,e.stroke=this.line.color,e.visible=!0},e.prototype.updateTitle=function(e){var t=e.ticks,r=this,o=r.label,i=r.rotation,n=r.title,a=r.lineNode,s=r.requestedRange,l=r.tickLineGroup,c=r.tickLabelGroup;if(n){var u=!1;if(n.enabled&&a.visible){u=!0;var d=o.mirrored?1:-1,p=normalizeAngle360(i),h=Caption.PADDING,_=n.node,f=-1===d&&p>Math.PI&&p<2*Math.PI?-1:1;_.rotation=f*d*Math.PI/2,_.x=Math.floor(f*d*(s[0]+s[1])/2);var g=0;if((null==t?void 0:t.length)>0){var y=Group.computeBBox([l,c]),m=0===i?y.width:y.height;Math.abs(m)<1/0&&(g+=m)}_.y=-1===d?Math.floor(f*(-h-g)):Math.floor(-h-g),_.textBaseline=1===f?"bottom":"top"}n.node.visible=u}},e.prototype.formatTickDatum=function(e,t){var r=this,o=r.label,i=r.labelFormatter,n=r.fractionDigits;return o.formatter?o.formatter({value:n>0?e:String(e),index:t,fractionDigits:n,formatter:i}):i?i(e):String(e)},e.prototype.formatDatum=function(e){return String(e)},e.prototype.computeBBox=function(){return this.axisGroup.computeBBox()},e.prototype.initCrossLine=function(e){e.scale=this.scale,e.gridLength=this.gridLength},e.prototype.isAnySeriesActive=function(){return!1},e.prototype.clipTickLines=function(e,t,r,o){this.tickLineGroup.setClipRectInGroupCoordinateSpace(new BBox(e,t,r,o))},e.prototype.clipGrid=function(e,t,r,o){this.gridGroup.setClipRectInGroupCoordinateSpace(new BBox(e,t,r,o))},e.defaultTickMinSpacing=50,__decorate$1L([Validate(BOOLEAN)],e.prototype,"nice",void 0),__decorate$1L([Validate(GRID_STYLE)],e.prototype,"gridStyle",void 0),__decorate$1L([Validate(NUMBER(0))],e.prototype,"thickness",void 0),e}(),__extends$2w=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__read$N=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},LinearScale$1=function(e){function t(){var t=e.call(this,[0,1],[0,1])||this;return t.type="linear",t}return __extends$2w(t,e),t.prototype.toDomain=function(e){return e},t.prototype.ticks=function(){var e,t=null!==(e=this.tickCount)&&void 0!==e?e:ContinuousScale.defaultTickCount;if(!this.domain||this.domain.length<2||t<1||this.domain.some(function(e){return!isFinite(e)}))return[];this.refresh();var r=__read$N(this.getDomain(),2),o=r[0],i=r[1],n=this.interval;if(n){var a=Math.abs(n);if(!this.isDenseInterval({start:o,stop:i,interval:a}))return range(o,i,a)}return ticks(o,i,t,this.minTickCount,this.maxTickCount)},t.prototype.update=function(){!this.domain||this.domain.length<2||this.nice&&this.updateNiceDomain()},t.prototype.updateNiceDomain=function(){var e,t,r=null!==(e=this.tickCount)&&void 0!==e?e:ContinuousScale.defaultTickCount,o=__read$N(this.domain,2),i=o[0],n=o[1];if(r<1)this.niceDomain=[i,n];else if(1!==r){for(var a=i,s=n,l=0;l<4;l++){var c=null!==(t=this.interval)&&void 0!==t?t:tickStep(i,n,r,this.minTickCount,this.maxTickCount),u=__read$N(this.domain,2),d=u[0],p=u[1];if(c>=1)i=Math.floor(d/c)*c,n=Math.ceil(p/c)*c;else{var h=1/c;i=Math.floor(d*h)/h,n=Math.ceil(p*h)/h}if(i===a&&n===s)break;a=i,s=n}this.niceDomain=[i,n]}else this.niceDomain=singleTickDomain(i,n)},t.prototype.tickFormat=function(e){var t=e.ticks,r=e.specifier;return tickFormat(t||this.ticks(),r)},t}(ContinuousScale),__extends$2v=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__assign$D=function(){return __assign$D=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$D.apply(this,arguments)},__decorate$1K=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},__read$M=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},__spread$s=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read$M(arguments[t]));return e},__values$s=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);
2if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function flipChartAxisDirection(e){return e===ChartAxisDirection.X?ChartAxisDirection.Y:ChartAxisDirection.X}var ChartAxis=function(e){function t(t,r){var o=e.call(this,r)||this;return o.moduleCtx=t,o.keys=[],o.direction=ChartAxisDirection.Y,o.boundSeries=[],o.includeInvisibleDomains=!1,o.modules={},o._position="left",o}return __extends$2v(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return this.constructor.type||""},enumerable:!1,configurable:!0}),t.prototype.useCalculatedTickCount=function(){return this.scale instanceof LinearScale$1},Object.defineProperty(t.prototype,"position",{get:function(){return this._position},set:function(e){if(this._position!==e){switch(this._position=e,e){case"top":this.direction=ChartAxisDirection.X,this.rotation=-90,this.label.mirrored=!0,this.label.parallel=!0;break;case"right":this.direction=ChartAxisDirection.Y,this.rotation=0,this.label.mirrored=!0,this.label.parallel=!1;break;case"bottom":this.direction=ChartAxisDirection.X,this.rotation=-90,this.label.mirrored=!1,this.label.parallel=!0;break;case"left":this.direction=ChartAxisDirection.Y,this.rotation=0,this.label.mirrored=!1,this.label.parallel=!1}this.axisContext&&(this.axisContext.position=e,this.axisContext.direction=this.direction)}},enumerable:!1,configurable:!0}),t.prototype.calculateDomain=function(){var e,t=this,r=t.direction,o=t.boundSeries,i=t.includeInvisibleDomains;if(this.linkedTo)this.dataDomain=this.linkedTo.dataDomain;else{var n=[];o.filter(function(e){return i||e.isEnabled()}).forEach(function(e){n.push(e.getDomain(r))});var a=(e=new Array).concat.apply(e,__spread$s(n));this.dataDomain=this.normaliseDataDomain(a)}},t.prototype.normaliseDataDomain=function(e){return e},t.prototype.isAnySeriesActive=function(){var e=this;return this.boundSeries.some(function(t){return e.includeInvisibleDomains||t.isEnabled()})},t.prototype.getLayoutState=function(){return __assign$D({rect:this.computeBBox()},this.layout)},t.prototype.addModule=function(e){var t=this;if(null!=this.modules[e.optionsKey])throw new Error("AG Charts - module already initialised: "+e.optionsKey);null==this.axisContext&&(this.axisContext={axisId:this.id,position:this.position,direction:this.direction,continuous:this.scale instanceof ContinuousScale,scaleConvert:function(e){return t.scale.convert(e)},scaleInvert:function(e){var r,o,i;return null!==(i=null===(o=(r=t.scale).invert)||void 0===o?void 0:o.call(r,e))&&void 0!==i?i:void 0}});var r=e.initialiseModule(__assign$D(__assign$D({},this.moduleCtx),{parent:this.axisContext}));this.modules[e.optionsKey]=r,this[e.optionsKey]=r.instance},t.prototype.removeModule=function(e){var t,r;null===(r=null===(t=this.modules[e.optionsKey])||void 0===t?void 0:t.instance)||void 0===r||r.destroy(),delete this.modules[e.optionsKey],delete this[e.optionsKey]},t.prototype.isModuleEnabled=function(e){return null!=this.modules[e.optionsKey]},t.prototype.destroy=function(){var t,r;e.prototype.destroy.call(this);try{for(var o=__values$s(Object.entries(this.modules)),i=o.next();!i.done;i=o.next()){var n=__read$M(i.value,2),a=n[0];n[1].instance.destroy(),delete this.modules[a],delete this[a]}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}},__decorate$1K([Validate(STRING_ARRAY)],t.prototype,"keys",void 0),__decorate$1K([Validate(POSITION)],t.prototype,"_position",void 0),t}(Axis),__extends$2u=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$1J=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},TimeAxis=function(e){function t(t){var r=e.call(this,t,new TimeScale$1)||this;r.datumFormat="%m/%d/%y, %H:%M:%S",r.min=void 0,r.max=void 0;var o=r.scale;return o.strictClampByDefault=!0,r.refreshScale(),r.datumFormatter=o.tickFormat({specifier:r.datumFormat}),r}return __extends$2u(t,e),t.prototype.normaliseDataDomain=function(e){var t=this.min,r=this.max;return"number"==typeof t&&(t=new Date(t)),"number"==typeof r&&(r=new Date(r)),e.length>2&&(e=(extent$4(e)||[0,1e3]).map(function(e){return new Date(e)})),t instanceof Date&&(e=[t,e[1]]),r instanceof Date&&(e=[e[0],r]),e[0]>e[1]&&(e=[]),e},t.prototype.onLabelFormatChange=function(t,r){r?e.prototype.onLabelFormatChange.call(this,t,r):this.labelFormatter=this.scale.tickFormat({ticks:t})},t.prototype.formatDatum=function(e){return this.datumFormatter(e)},t.className="TimeAxis",t.type="time",__decorate$1J([Validate(AND(OPT_DATE_OR_DATETIME_MS,LESS_THAN("max")))],t.prototype,"min",void 0),__decorate$1J([Validate(AND(OPT_DATE_OR_DATETIME_MS,GREATER_THAN("min")))],t.prototype,"max",void 0),t}(ChartAxis),__extends$2t=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$1I=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},__values$r=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);
2if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},__read$L=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},__spread$r=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read$L(arguments[t]));return e},SeriesNodePickMode;!function(e){e[e.EXACT_SHAPE_MATCH=0]="EXACT_SHAPE_MATCH",e[e.NEAREST_BY_MAIN_AXIS_FIRST=1]="NEAREST_BY_MAIN_AXIS_FIRST",e[e.NEAREST_BY_MAIN_CATEGORY_AXIS_FIRST=2]="NEAREST_BY_MAIN_CATEGORY_AXIS_FIRST",e[e.NEAREST_NODE=3]="NEAREST_NODE"}(SeriesNodePickMode||(SeriesNodePickMode={}));var warnDeprecated=createDeprecationWarning(),warnSeriesDeprecated=function(){return warnDeprecated("series","Use seriesId to get the series ID")},SeriesNodeBaseClickEvent=function(){function e(e,t,r){this.type="nodeClick",this.event=e,this.datum=t.datum,this.seriesId=r.id,this._series=r}return Object.defineProperty(e.prototype,"series",{get:function(){return warnSeriesDeprecated(),this._series},enumerable:!1,configurable:!0}),e}(),SeriesNodeClickEvent=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$2t(t,e),t}(SeriesNodeBaseClickEvent),SeriesNodeDoubleClickEvent=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="nodeDoubleClick",t}return __extends$2t(t,e),t}(SeriesNodeBaseClickEvent),SeriesItemHighlightStyle=function(){function e(){this.fill="yellow",this.fillOpacity=void 0,this.stroke=void 0,this.strokeWidth=void 0}return __decorate$1I([Validate(OPT_COLOR_STRING)],e.prototype,"fill",void 0),__decorate$1I([Validate(OPT_NUMBER(0,1))],e.prototype,"fillOpacity",void 0),__decorate$1I([Validate(OPT_COLOR_STRING)],e.prototype,"stroke",void 0),__decorate$1I([Validate(OPT_NUMBER(0))],e.prototype,"strokeWidth",void 0),e}(),SeriesHighlightStyle=function(){function e(){this.strokeWidth=void 0,this.dimOpacity=void 0,this.enabled=void 0}return __decorate$1I([Validate(OPT_NUMBER(0))],e.prototype,"strokeWidth",void 0),__decorate$1I([Validate(OPT_NUMBER(0,1))],e.prototype,"dimOpacity",void 0),__decorate$1I([Validate(OPT_BOOLEAN)],e.prototype,"enabled",void 0),e}(),TextHighlightStyle=function(){function e(){this.color="black"}return __decorate$1I([Validate(OPT_COLOR_STRING)],e.prototype,"color",void 0),e}(),HighlightStyle=function(){this.item=new SeriesItemHighlightStyle,this.series=new SeriesHighlightStyle,this.text=new TextHighlightStyle},SeriesTooltip=function(){function e(){this.enabled=!0}return __decorate$1I([Validate(BOOLEAN)],e.prototype,"enabled",void 0),e}(),Series=function(e){function t(t){var r=void 0===t?{}:t,o=r.useSeriesGroupLayer,i=void 0===o||o,n=r.useLabelLayer,a=void 0!==n&&n,s=r.pickModes,l=void 0===s?[SeriesNodePickMode.NEAREST_BY_MAIN_AXIS_FIRST]:s,c=r.directionKeys,u=void 0===c?{}:c,d=e.call(this)||this;d.id=createId$1(d),d.rootGroup=new Group({name:"seriesRoot"}),d.directions=[ChartAxisDirection.X,ChartAxisDirection.Y],d.nodeDataRefresh=!0,d._data=void 0,d._visible=!0,d.showInLegend=!0,d.cursor="default",d.nodeClickRange="exact",d._declarationOrder=-1,d.highlightStyle=new HighlightStyle;var p=d.rootGroup;return d.directionKeys=u,d.contentGroup=p.appendChild(new Group({name:d.id+"-content",layer:i,zIndex:Layers.SERIES_LAYER_ZINDEX,zIndexSubOrder:[function(){return d._declarationOrder},0]})),d.highlightGroup=p.appendChild(new Group({name:d.id+"-highlight",layer:!0,zIndex:Layers.SERIES_LAYER_ZINDEX,zIndexSubOrder:[function(){return d._declarationOrder},15e3]})),d.highlightNode=d.highlightGroup.appendChild(new Group({name:"highlightNode"})),d.highlightLabel=d.highlightGroup.appendChild(new Group({name:"highlightLabel"})),d.highlightNode.zIndex=0,d.highlightLabel.zIndex=10,d.pickModes=l,a&&(d.labelGroup=p.appendChild(new Group({name:d.id+"-series-labels",layer:!0,zIndex:Layers.SERIES_LABEL_ZINDEX}
2))),d}return __extends$2t(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return this.constructor.type||""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"data",{get:function(){return this._data},set:function(e){this._data=e,this.nodeDataRefresh=!0},enumerable:!1,configurable:!0}),t.prototype.hasData=function(){var e=this.data;return e&&(!Array.isArray(e)||e.length>0)},Object.defineProperty(t.prototype,"visible",{get:function(){return this._visible},set:function(e){this._visible=e,this.visibleChanged()},enumerable:!1,configurable:!0}),t.prototype.destroy=function(){},Object.defineProperty(t.prototype,"grouped",{set:function(e){if(!0===e)throw new Error("AG Charts - grouped: true is unsupported for series of type: "+this.type)},enumerable:!1,configurable:!0}),t.prototype.getKeys=function(e){var t=this,r=this.directionKeys,o=this.resolveKeyDirection(e),i=r&&r[o],n=[],a=function(){for(var e,t,r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];try{for(var i=__values$r(r),n=i.next();!n.done;n=i.next()){var a=n.value;s(a)}}catch(t){e={error:t}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}},s=function(e){Array.isArray(e)?a.apply(void 0,__spread$r(e)):n.push(e)};return i?(i.forEach(function(e){var r=t[e];r&&s(r)}),n):n},t.prototype.resolveKeyDirection=function(e){return e},t.prototype.markNodeDataDirty=function(){this.nodeDataRefresh=!0},t.prototype.visibleChanged=function(){},t.prototype.getOpacity=function(e){var t=this.highlightStyle.series,r=t.dimOpacity,o=void 0===r?1:r,i=t.enabled;if(!1===(void 0===i||i)||1===o)return 1;switch(this.isItemIdHighlighted(e)){case"no-highlight":case"highlighted":return 1;case"peer-highlighted":case"other-highlighted":return o}},t.prototype.getStrokeWidth=function(e,t){var r=this.highlightStyle.series,o=r.strokeWidth,i=r.enabled;if(!1===(void 0===i||i)||void 0===o)return e;switch(this.isItemIdHighlighted(t)){case"highlighted":return o;case"no-highlight":case"other-highlighted":case"peer-highlighted":return e}},t.prototype.isItemIdHighlighted=function(e){var t,r=null===(t=this.highlightManager)||void 0===t?void 0:t.getActiveHighlight(),o=null!=r?r:{},i=o.series,n=o.itemId;return null!=i?i!==this?"other-highlighted":void 0===n?"highlighted":e&&r!==e&&n!==e.itemId?"peer-highlighted":"highlighted":"no-highlight"},t.prototype.pickNode=function(e,t){var r,o,i=this,n=i.pickModes,a=i.visible,s=i.rootGroup;if(a&&s.visible)try{for(var l=__values$r(n),c=l.next();!c.done;c=l.next()){var u=c.value;if(!t||t.includes(u)){var d=void 0;switch(u){case SeriesNodePickMode.EXACT_SHAPE_MATCH:d=this.pickNodeExactShape(e);break;case SeriesNodePickMode.NEAREST_BY_MAIN_AXIS_FIRST:case SeriesNodePickMode.NEAREST_BY_MAIN_CATEGORY_AXIS_FIRST:d=this.pickNodeMainAxisFirst(e,u===SeriesNodePickMode.NEAREST_BY_MAIN_CATEGORY_AXIS_FIRST);break;case SeriesNodePickMode.NEAREST_NODE:d=this.pickNodeClosestDatum(e)}if(d)return{pickMode:u,match:d.datum,distance:d.distance}}}}catch(e){r={error:e}}finally{try{c&&!c.done&&(o=l.return)&&o.call(l)}finally{if(r)throw r.error}}},t.prototype.pickNodeExactShape=function(e){var t=this.contentGroup.pickNode(e.x,e.y);if(t)return{datum:t.datum,distance:0}},t.prototype.pickNodeClosestDatum=function(e){throw new Error("AG Charts - Series.pickNodeClosestDatum() not implemented")},t.prototype.pickNodeMainAxisFirst=function(e,t){throw new Error("AG Charts - Series.pickNodeMainAxisFirst() not implemented")},t.prototype.fireNodeClickEvent=function(e,t){var r=this.getNodeClickEvent(e,t);this.fireEvent(r)},t.prototype.fireNodeDoubleClickEvent=function(e,t){var r=this.getNodeDoubleClickEvent(e,t);this.fireEvent(r)},t.prototype.getNodeClickEvent=function(e,t){return new SeriesNodeClickEvent(e,t,this)},t.prototype.getNodeDoubleClickEvent=function(e,t){return new SeriesNodeDoubleClickEvent(e,t,this)},t.prototype.toggleSeriesItem=function(e,t){this.visible=t,this.nodeDataRefresh=!0},t.prototype.isEnabled=function(){return this.visible},t.prototype.fixNumericExtent=function(e,t){if(void 0===e)return[];var r=__read$L(e,2),o=r[0],i=r[1];if(i=+i,0===(o=+o)&&0===i)return[0,1];if(o===1/0&&i===-1/0)return[];if(o===1/0&&(o=0),i===-1/0&&(i=0),o===i)if(t instanceof TimeAxis)o-=1,i+=1;else{var n=Math.abs(.01*o);o-=n,i+=n}return isNumber$4(o)&&isNumber$4(i)?[o,i]:[]},t.highlightedZIndex=1e12,__decorate$1I([Validate(STRING)],t.prototype,"id",void 0),__decorate$1I([Validate(BOOLEAN)],t.prototype,"_visible",void 0),__decorate$1I([Validate(BOOLEAN)],t.prototype,"showInLegend",void 0),__decorate$1I([Validate(STRING)],t.prototype,"cursor",void 0),__decorate$1I([Validate(INTERACTION_RANGE)],t.prototype,"nodeClickRange",void 0),t}(Observable),__decorate$1H=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},Padding$1=function(){function e(e,t,r,o){void 0===e&&(e=0),void 0===t&&(t=e),void 0===r&&(r=e),void 0===o&&(o=t),this.top=e,this.right=t,this.bottom=r,this.left=o}return e.prototype.clear=function(){this.top=this.right=this.bottom=this.left=0},__decorate$1H([Validate(NUMBER(0))],e.prototype,"top",void 0),__decorate$1H([Validate(NUMBER(0))],e.prototype,"right",void 0),__decorate$1H([Validate(NUMBER(0))],e.prototype,"bottom",void 0),__decorate$1H([Validate(NUMBER(0))],e.prototype,"left",void 0),e}(),Gradient=function(){this.stops=[]},__extends$2s=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),LinearGradient=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.angle=0,t}return __extends$2s(t,e),t.prototype.createGradient=function(e,t){var r=this.stops,o=this.angle%360*Math.PI/180,i=Math.cos(o),n=Math.sin(o),a=t.width,s=t.height,l=t.x+.5*a,c=t.y+.5*s;if(a>0&&s>0){var u=Math.sqrt(s*s+a*a)*Math.abs(Math.cos(o-Math.atan(s/a)))/2,d=e.createLinearGradient(l+i*u,c+n*u,l-i*u,c-n*u);return r.forEach(function(e){d.addColorStop(e.offset,e.color)}),d}return"black"},t}(Gradient),__extends$2r=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$1G=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},Rect=function(e){function t(){var t=e.call(this,function(e){return t.renderRect(e)})||this;return t.borderPath=new Path2D,t.x=0,t.y=0,t.width=10,t.height=10,t.radiu
2s=0,t.crisp=!1,t.gradient=!1,t.lastUpdatePathStrokeWidth=Shape.defaultStyles.strokeWidth,t.effectiveStrokeWidth=Shape.defaultStyles.strokeWidth,t.microPixelEffectOpacity=1,t}return __extends$2r(t,e),t.prototype.updateGradientInstance=function(){var e=this.fill;if(this.gradient){if(e){var t=new LinearGradient;t.angle=270,t.stops=[{offset:0,color:Color.tryParseFromString(e).brighter().toString()},{offset:1,color:Color.tryParseFromString(e).darker().toString()}],this.gradientInstance=t}}else this.gradientInstance=void 0;this.gradientFill=e},t.prototype.isDirtyPath=function(){var e;return this.lastUpdatePathStrokeWidth!==this.strokeWidth||!!(this.path.isDirty()||this.borderPath.isDirty()||(null===(e=this.clipPath)||void 0===e?void 0:e.isDirty()))},t.prototype.updatePath=function(){var e,t,r,o=this,i=o.path,n=o.borderPath,a=o.crisp,s=this,l=s.x,c=s.y,u=s.width,d=s.height,p=s.strokeWidth,h=1/(null!==(t=null===(e=this.layerManager)||void 0===e?void 0:e.canvas.pixelRatio)&&void 0!==t?t:1),_=1;if(i.clear({trackChanges:!0}),n.clear({trackChanges:!0}),a&&(u<=h&&(_*=u/h),d<=h&&(_*=d/h),u=this.align(l,u),d=this.align(c,d),l=this.align(l),c=this.align(c)),p)if(u<h){var f=l+h/2;n.moveTo(f,c),n.lineTo(f,c+d),p=h,this.borderClipPath=void 0}else if(d<h){var g=c+h/2;n.moveTo(l,g),n.lineTo(l+u,g),p=h,this.borderClipPath=void 0}else if(p<u&&p<d){var y=p/2;l+=y,c+=y,u-=p,d-=p,this.borderClipPath=void 0,i.rect(l,c,u,d),n.rect(l,c,u,d)}else this.borderClipPath=null!==(r=this.borderClipPath)&&void 0!==r?r:new Path2D,this.borderClipPath.clear({trackChanges:!0}),this.borderClipPath.rect(l,c,u,d),n.rect(l,c,u,d);else this.borderClipPath=void 0,i.rect(l,c,u,d);this.effectiveStrokeWidth=p,this.lastUpdatePathStrokeWidth=p,this.microPixelEffectOpacity=_},t.prototype.computeBBox=function(){var e=this,t=e.x,r=e.y,o=e.width,i=e.height;return new BBox(t,r,o,i)},t.prototype.isPointInPath=function(e,t){var r=this.transformPoint(e,t);return this.computeBBox().containsPoint(r.x,r.y)},t.prototype.renderRect=function(e){var t,r,o=this,i=o.stroke,n=o.effectiveStrokeWidth,a=o.fill,s=o.path,l=o.borderPath,c=o.borderClipPath,u=o.opacity,d=o.microPixelEffectOpacity,p=!!i&&!!n;if(a){var h=this,_=h.gradientFill,f=h.fillOpacity,g=h.fillShadow;a!==_&&this.updateGradientInstance();var y=this.gradientInstance;if(e.fillStyle=y?y.createGradient(e,this.computeBBox()):a,e.globalAlpha=u*f*d,g&&g.enabled){var m=null!==(r=null===(t=this.layerManager)||void 0===t?void 0:t.canvas.pixelRatio)&&void 0!==r?r:1;e.shadowColor=g.color,e.shadowOffsetX=g.xOffset*m,e.shadowOffsetY=g.yOffset*m,e.shadowBlur=g.blur*m}s.draw(e),e.fill(),e.shadowColor="rgba(0, 0, 0, 0)"}if(p){var v=this,E=v.strokeOpacity,C=v.lineDash,O=v.lineDashOffset,P=v.lineCap,S=v.lineJoin;c&&(c.draw(e),e.clip()),l.draw(e),e.strokeStyle=i,e.globalAlpha=u*E*d,e.lineWidth=n,C&&e.setLineDash(C),O&&(e.lineDashOffset=O),P&&(e.lineCap=P),S&&(e.lineJoin=S),e.stroke()}},t.className="Rect",__decorate$1G([ScenePathChangeDetection()],t.prototype,"x",void 0),__decorate$1G([ScenePathChangeDetection()],t.prototype,"y",void 0),__decorate$1G([ScenePathChangeDetection()],t.prototype,"width",void 0),__decorate$1G([ScenePathChangeDetection()],t.prototype,"height",void 0),__decorate$1G([ScenePathChangeDetection()],t.prototype,"radius",void 0),__decorate$1G([ScenePathChangeDetection()],t.prototype,"crisp",void 0),__decorate$1G([ScenePathChangeDetection({changeCb:function(e){return e.updateGradientInstance()}})],t.prototype,"gradient",void 0),t}(Path),__decorate$1F=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a}
2,Background=function(){function e(e){this.image=void 0,this.node=new Group,this.rectNode=new Rect,this.node.appendChild(this.rectNode),this.visible=!0,this.imageLoadCallback=e}return e.prototype.performLayout=function(e,t){this.rectNode.width=e,this.rectNode.height=t,this.image&&this.image.performLayout(e,t)},__decorate$1F([Validate(BOOLEAN),ProxyPropertyOnWrite("node","visible")],e.prototype,"visible",void 0),__decorate$1F([Validate(OPT_COLOR_STRING),ProxyPropertyOnWrite("rectNode","fill")],e.prototype,"fill",void 0),__decorate$1F([ActionOnSet({newValue:function(e){this.node.appendChild(e.node),e.onload=this.imageLoadCallback},oldValue:function(e){this.node.removeChild(e.node),e.onload=void 0}})],e.prototype,"image",void 0),e}(),__extends$2q=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$1E=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},__values$q=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Marker=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.x=0,t.y=0,t.size=12,t}return __extends$2q(t,e),t.prototype.computeBBox=function(){var e=this,t=e.x,r=e.y,o=e.size,i=o/2;return new BBox(t-i,r-i,o,o)},t.prototype.applyPath=function(e,t){var r,o,i=this.path,n=this.x,a=this.y;i.clear();try{for(var s=__values$q(t),l=s.next();!l.done;l=s.next()){var c=l.value,u=c.x,d=c.y,p=c.t;n+=u*e,a+=d*e,"move"===p?i.moveTo(n,a):i.lineTo(n,a)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}i.closePath()},__decorate$1E([ScenePathChangeDetection()],t.prototype,"x",void 0),__decorate$1E([ScenePathChangeDetection()],t.prototype,"y",void 0),__decorate$1E([ScenePathChangeDetection({convertor:Math.abs})],t.prototype,"size",void 0),t}(Path),__extends$2p=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),Square=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$2p(t,e),t.prototype.updatePath=function(){var e=this,t=e.path,r=e.x,o=e.y,i=this.size/2;t.clear(),t.moveTo(this.align(r-i),this.align(o-i)),t.lineTo(this.align(r+i),this.align(o-i)),t.lineTo(this.align(r+i),this.align(o+i)),t.lineTo(this.align(r-i),this.align(o+i)),t.closePath()},t.className="Square",t}(Marker),__extends$2o=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$1D=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},MarkerLabel=function(e){function t(){var t=e.call(this,{name:"markerLabelGroup"})||this;t.label=new Text,t._marker=new Square,t._markerSize=15,t._spacing=8;var r=t.label;return r.textBaseline="middle",r.fontSize=12,r.fontFamily="Verdana, sans-serif",r.fill="black",r.y=HdpiCanvas.has.textMetrics?1:0,t.append([t.marker,r]),t.update(
2),t}return __extends$2o(t,e),Object.defineProperty(t.prototype,"marker",{get:function(){return this._marker},set:function(e){this._marker!==e&&(this.removeChild(this._marker),this._marker=e,this.appendChild(e),this.update())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"markerSize",{get:function(){return this._markerSize},set:function(e){this._markerSize!==e&&(this._markerSize=e,this.update())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"spacing",{get:function(){return this._spacing},set:function(e){this._spacing!==e&&(this._spacing=e,this.update())},enumerable:!1,configurable:!0}),t.prototype.update=function(){var e=this.marker,t=this.markerSize;e.size=t,this.label.x=t/2+this.spacing},t.prototype.render=function(t){this.marker.opacity=this.opacity,this.label.opacity=this.opacity,e.prototype.render.call(this,t)},t.className="MarkerLabel",__decorate$1D([ProxyPropertyOnWrite("label")],t.prototype,"text",void 0),__decorate$1D([ProxyPropertyOnWrite("label")],t.prototype,"fontStyle",void 0),__decorate$1D([ProxyPropertyOnWrite("label")],t.prototype,"fontWeight",void 0),__decorate$1D([ProxyPropertyOnWrite("label")],t.prototype,"fontSize",void 0),__decorate$1D([ProxyPropertyOnWrite("label")],t.prototype,"fontFamily",void 0),__decorate$1D([ProxyPropertyOnWrite("label","fill")],t.prototype,"color",void 0),__decorate$1D([ProxyPropertyOnWrite("marker","fill")],t.prototype,"markerFill",void 0),__decorate$1D([ProxyPropertyOnWrite("marker","stroke")],t.prototype,"markerStroke",void 0),__decorate$1D([ProxyPropertyOnWrite("marker","strokeWidth")],t.prototype,"markerStrokeWidth",void 0),__decorate$1D([ProxyPropertyOnWrite("marker","fillOpacity")],t.prototype,"markerFillOpacity",void 0),__decorate$1D([ProxyPropertyOnWrite("marker","strokeOpacity")],t.prototype,"markerStrokeOpacity",void 0),t}(Group),__extends$2n=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),Circle=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$2n(t,e),t.prototype.updatePath=function(){var e=this,t=e.x,r=e.y,o=e.path,i=e.size/2;o.clear(),o.arc(t,r,i,0,2*Math.PI),o.closePath()},t.className="Circle",t}(Marker),__extends$2m=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),Cross=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$2m(t,e),t.prototype.updatePath=function(){var r=this.size/4.2;e.prototype.applyPath.call(this,r,t.moves)},t.className="Cross",t.moves=[{x:-1,y:0,t:"move"},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1},{x:1,y:1},{x:-1,y:1},{x:-1,y:-1},{x:-1,y:1},{x:-1,y:-1}],t}(Marker),__extends$2l=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),Diamond=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$2l(t,e),t.prototype.updatePath=function(){var r=this.size/2;e.prototype.applyPath.call(this,r,t.moves)},t.className="Diamond",t.moves=[{x:0,y:-1,t:"move"},{x:1,y:1},{x:-1,y:1},{x:-1,y:-1},{x:1,y:-1}],t}(Marker),__extends$2k=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),Heart=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$2k(t,e),t.prototype.rad=function(e){return e/180*Math.PI},t.prototype.updatePath=function(){var e=this,t=e.x,r=e.path,o=e.size,i=e.rad,n=o/4,a=this.y+n/2;r.clear(),r.arc(t-n,a-n,n,i(130),i(330)),r.arc(t+n,a-n,n,i(220),i(50)),r.lineTo(t,a+n),r.closePath()},t.className="Heart",t}(Marker),__extends$2j=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),Plus=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$2j(t,e),t.prototype.updatePath=function(){var r=this.size/3;e.prototype.applyPath.call(this,r,t.moves)},t.className="Plus",t.moves=[{x:-.5,y:-.5,t:"move"},{x:0,y:-1},{x:1,y:0},{x:0,y:1},{x:1,y:0},{x:0,y:1},{x:-1,y:0},{x:0,y:1},{x:-1,y:0},{x:0,y:-1},{x:-1,y:0},{x:0,y:-1}],t}(Marker),__extends$2i=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),Triangle=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$2i(t,e),t.prototype.updatePath=function(){var r=1.1*this.size;e.prototype.applyPath.call(this,r,t.moves)},t.className="Triangle",t.moves=[{x:0,y:-.48,t:"move"},{x:.5,y:.87},{x:-1,y:0}],t}(Marker),ChartUpdateType;function getMarker$1(e){if(void 0===e&&(e=Square),"string"==typeof e)switch(e){case"circle":return Circle;case"cross":return Cross;case"diamond":return Diamond;case"heart":return Heart;case"plus":return Plus;case"triangle":return Triangle;default:return Square}return"function"==typeof e?e:Square}!function(e){e[e.FULL=0]="FULL",e[e.PROCESS_DATA=1]="PROCESS_DATA",e[e.PERFORM_LAYOUT=2]="PERFORM_LAYOUT",e[e.SERIES_UPDATE=3]="SERIES_UPDATE",e[e.TOOLTIP_RECALCULATION=4]="TOOLTIP_RECALCULATION",e[e.SCENE_RENDER=5]="SCENE_RENDER",e[e.NONE=6]="NONE"}(ChartUpdateType||(ChartUpdateType={}));var __values$p=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);
2if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function gridLayout(e){for(var t=e.orientation,r=e.bboxes,o=e.maxHeight,i=e.maxWidth,n=e.itemPaddingY,a=void 0===n?0:n,s=e.itemPaddingX,l=void 0===s?0:s,c=e.forceResult,u=void 0!==c&&c,d="horizontal"===t,p={max:d?i:o,fn:d?function(e){return e.width}:function(e){return e.height},padding:d?l:a},h={max:d?o:i,fn:d?function(e){return e.height}:function(e){return e.width},padding:d?a:l},_=0,f=[];_<r.length;){var g=processBBoxes(r.slice(_),_,p,h,u);if(!g)return;_+=g.processedBBoxCount,f.push(g.pageIndices)}return buildPages(f,t,r,a,l)}function processBBoxes(e,t,r,o,i){var n=estimateStartingGuess(e,r);if(n<1){if(!i)return;n=1}for(var a=n;a>=1;a--){var s=calculatePage(e,t,a,r,o,i);if(null==s&&a<=1)return;if(null!=s){if("number"!=typeof s)return{processedBBoxCount:s.length*s[0].length,pageIndices:s};if(s<=1)return;a=s<a&&s>1?s:a}}}function calculatePage(e,t,r,o,i,n){for(var a,s=[],l=0,c=0,u=[],d=[],p=0;p<e.length;p++){var h=(p+r)%r;0===h&&(l+=c,c=0,u.length>0&&s.push(u),u=[]);var _=o.fn(e[p])+o.padding;d[h]=Math.max(null!==(a=d[h])&&void 0!==a?a:0,_);var f=l+(c=Math.max(c,i.fn(e[p])+i.padding)),g=!n||s.length>0;if(f>i.max&&g){u=[];break}if(d.reduce(function(e,t){return e+t},0)>o.max&&!n)return d.length<r?d.length:void 0;u.push(p+t)}return u.length>0&&s.push(u),s.length>0?s:void 0}function buildPages(e,t,r,o,i){var n=0,a=0,s=e.map(function(e){"horizontal"===t&&(e=transpose(e));var s=0,l=e.map(function(e){var t=e.map(function(e){return s=Math.max(e,s),r[e]}),n=0,a=0;return t.forEach(function(e){n+=e.height+o,a=Math.max(a,e.width+i)}
2),{indices:e,bboxes:t,columnHeight:n,columnWidth:a}}),c=0,u=0;return l.forEach(function(e){c+=e.columnWidth,u=Math.max(u,e.columnHeight)}),n=Math.max(c,n),a=Math.max(u,a),{columns:l,startIndex:e[0][0],endIndex:s,pageWidth:c,pageHeight:u}});return{pages:s,maxPageWidth:n,maxPageHeight:a}}function transpose(e){var t,r,o=[];try{for(var i=__values$p(e[0]),n=i.next();!n.done;n=i.next())n.value,o.push([])}catch(e){t={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return e.forEach(function(e,t){e.forEach(function(e,r){o[r][t]=e})}),o}function estimateStartingGuess(e,t){for(var r=e.length,o=0,i=0;i<r;i++)if((o+=t.fn(e[i])+t.padding)>t.max)return r/i<2?Math.ceil(r/2):i;return r}var __decorate$1C=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},PaginationLabel=function(){function e(){this.color="black",this.fontStyle=void 0,this.fontWeight=void 0,this.fontSize=12,this.fontFamily="Verdana, sans-serif"}return __decorate$1C([Validate(COLOR_STRING)],e.prototype,"color",void 0),__decorate$1C([Validate(OPT_FONT_STYLE)],e.prototype,"fontStyle",void 0),__decorate$1C([Validate(OPT_FONT_WEIGHT)],e.prototype,"fontWeight",void 0),__decorate$1C([Validate(NUMBER(0))],e.prototype,"fontSize",void 0),__decorate$1C([Validate(STRING)],e.prototype,"fontFamily",void 0),e}(),PaginationMarkerStyle=function(){function e(){this.size=15,this.fill=void 0,this.fillOpacity=void 0,this.stroke=void 0,this.strokeWidth=1,this.strokeOpacity=1}return __decorate$1C([Validate(NUMBER(0))],e.prototype,"size",void 0),__decorate$1C([Validate(OPT_COLOR_STRING)],e.prototype,"fill",void 0),__decorate$1C([Validate(OPT_NUMBER(0,1))],e.prototype,"fillOpacity",void 0),__decorate$1C([Validate(OPT_COLOR_STRING)],e.prototype,"stroke",void 0),__decorate$1C([Validate(NUMBER(0))],e.prototype,"strokeWidth",void 0),__decorate$1C([Validate(NUMBER(0,1))],e.prototype,"strokeOpacity",void 0),e}(),PaginationMarker=function(){function e(){this.size=15,this._shape=Triangle,this.padding=8}return Object.defineProperty(e.prototype,"shape",{get:function(){return this._shape},set:function(e){var t;this._shape=e,null===(t=this.parent)||void 0===t||t.onMarkerShapeChange()},enumerable:!1,configurable:!0}),__decorate$1C([Validate(NUMBER(0))],e.prototype,"size",void 0),__decorate$1C([Validate(NUMBER(0))],e.prototype,"padding",void 0),e}(),Pagination=function(){function e(e,t,r,o){var i=this;this.chartUpdateCallback=e,this.pageUpdateCallback=t,this.interactionManager=r,this.cursorManager=o,this.id=createId$1(this),this.group=new Group({name:"pagination"}),this.labelNode=new Text,this.marker=new PaginationMarker,this.activeStyle=new PaginationMarkerStyle,this.inactiveStyle=new PaginationMarkerStyle,this.highlightStyle=new PaginationMarkerStyle,this.label=new PaginationLabel,this.totalPages=0,this.currentPage=0,this.nextButtonDisabled=!1,this.previousButtonDisabled=!1,this._visible=!0,this._enabled=!0,this._orientation="vertical",this._nextButton=new Triangle,this._previousButton=new Triangle;var n=this.labelNode;n.textBaseline="middle",n.fontSize=12,n.fontFamily="Verdana, sans-serif",n.fill="black",n.y=HdpiCanvas.has.textMetrics?1:0,this.group.append([this.nextButton,this.previousButton,n]),this.interactionManager.addListener("click",function(e){return i.onPaginationClick(e)}),this.interactionManager.addListener("hover",function(e){return i.onPaginationMouseMove(e)}),this.marker.parent=this,this.update(),this.updateMarkers()}return Object.defineProperty(e.prototype,"visible",{get:function(){return this._visible},set:function(e){this._visible=e,this.updateGroupVisibility()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"enabled",{get:function(){return this._enabled},set:function(e){this._enabled=e,this.updateGroupVisibility()},enumerable:!1,configurable:!0}),e.prototype.updateGroupVisibility=function(){this.group.visible=this.enabled&&this.visible},Object.defineProperty(e.prototype,"orientation",{get:function(){return this._orientation},set:function(e){this._orientation=e,"horizontal"===e?(this.previousButton.rotation=-Math.PI/2,this.nextButton.rotation=Math.PI/2):(this.previousButton.rotation=0,this.nextButton.rotation=Math.PI)}
2,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"translationX",{get:function(){return this.group.translationX},set:function(e){this.group.translationX=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"translationY",{get:function(){return this.group.translationY},set:function(e){this.group.translationY=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextButton",{get:function(){return this._nextButton},set:function(e){this._nextButton!==e&&(this.group.removeChild(this._nextButton),this._nextButton=e,this.group.appendChild(e))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousButton",{get:function(){return this._previousButton},set:function(e){this._previousButton!==e&&(this.group.removeChild(this._previousButton),this._previousButton=e,this.group.appendChild(e))},enumerable:!1,configurable:!0}),e.prototype.update=function(){this.updateLabel(),this.updatePositions(),this.enableOrDisableButtons()},e.prototype.updatePositions=function(){this.updateLabelPosition(),this.updateNextButtonPosition()},e.prototype.updateLabelPosition=function(){var e=this.marker,t=e.size,r=e.padding;this.nextButton.size=t,this.previousButton.size=t,this.labelNode.x=t/2+r},e.prototype.updateNextButtonPosition=function(){var e=this.labelNode.computeBBox();this.nextButton.translationX=e.x+e.width+this.marker.size/2+this.marker.padding},e.prototype.updateLabel=function(){var e=this,t=e.currentPage,r=e.totalPages,o=e.labelNode,i=e.label,n=i.color,a=i.fontStyle,s=i.fontWeight,l=i.fontSize,c=i.fontFamily;o.text=t+1+" / "+r,o.fill=n,o.fontStyle=a,o.fontWeight=s,o.fontSize=l,o.fontFamily=c},e.prototype.updateMarkers=function(){var e=this,t=e.nextButton,r=e.previousButton,o=e.nextButtonDisabled,i=e.previousButtonDisabled,n=e.activeStyle,a=e.inactiveStyle,s=e.highlightStyle,l=e.highlightActive,c=function(e,t){return t?a:e===l?s:n};this.updateMarker(t,c("next",o)),this.updateMarker(r,c("previous",i))},e.prototype.updateMarker=function(e,t){var r,o=this.marker.size;e.size=o,e.fill=t.fill,e.fillOpacity=null!==(r=t.fillOpacity)&&void 0!==r?r:1,e.stroke=t.stroke,e.strokeWidth=t.strokeWidth,e.strokeOpacity=t.strokeOpacity},e.prototype.enableOrDisableButtons=function(){var e=this.currentPage,t=this.totalPages,r=0===t,o=e===t-1,i=0===e;this.nextButtonDisabled=o||r,this.previousButtonDisabled=i||r},e.prototype.nextButtonContainsPoint=function(e,t){return!this.nextButtonDisabled&&this.nextButton.containsPoint(e,t)},e.prototype.previousButtonContainsPoint=function(e,t){return!this.previousButtonDisabled&&this.previousButton.containsPoint(e,t)},e.prototype.onPaginationClick=function(e){var t=e.offsetX,r=e.offsetY;this.nextButtonContainsPoint(t,r)?(this.incrementPage(),this.onPaginationChanged(),e.consume()):this.previousButtonContainsPoint(t,r)&&(this.decrementPage(),this.onPaginationChanged(),e.consume())},e.prototype.onPaginationMouseMove=function(e){var t=e.offsetX,r=e.offsetY;this.nextButtonContainsPoint(t,r)?(this.cursorManager.updateCursor(this.id,"pointer"),this.highlightActive="next"):this.previousButtonContainsPoint(t,r)?(this.cursorManager.updateCursor(this.id,"pointer"),this.highlightActive="previous"):(this.cursorManager.updateCursor(this.id),this.highlightActive=void 0),this.updateMarkers(),this.chartUpdateCallback(ChartUpdateType.SCENE_RENDER)},e.prototype.onPaginationChanged=function(){this.pageUpdateCallback(this.currentPage)},e.prototype.incrementPage=function(){this.currentPage=Math.min(this.currentPage+1,this.totalPages-1)},e.prototype.decrementPage=function(){this.currentPage=Math.max(this.currentPage-1,0)},e.prototype.onMarkerShapeChange=function(){var e=getMarker$1(this.marker.shape||Triangle);this.previousButton=new e,this.nextButton=new e,this.updatePositions(),this.updateMarkers(),this.chartUpdateCallback(ChartUpdateType.SCENE_RENDER)},e.prototype.attachPagination=function(e){e.append(this.group)},e.prototype.computeBBox=function(){return this.group.computeBBox()},e.className="Pagination",e}(),__decorate$1B=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},__values$o=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);
2if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},DEFAULT_TOOLTIP_CLASS="ag-chart-tooltip",defaultTooltipCss$1='\n.ag-chart-tooltip {\n    transition: transform 0.1s ease;\n    display: table;\n    position: fixed;\n    left: 0px;\n    top: 0px;\n    user-select: none;\n    pointer-events: none;\n    white-space: nowrap;\n    z-index: 99999;\n    font: 12px Verdana, sans-serif;\n    color: black;\n    background: rgb(244, 244, 244);\n    border-radius: 5px;\n    box-shadow: 0 0 1px rgba(3, 3, 3, 0.7), 0.5vh 0.5vh 1vh rgba(3, 3, 3, 0.25);\n}\n\n.ag-chart-tooltip-no-animation {\n    transition: none !important;\n}\n\n.ag-chart-tooltip-hidden {\n    visibility: hidden;\n}\n\n.ag-chart-tooltip-title {\n    font-weight: bold;\n    padding: 7px;\n    border-top-left-radius: 5px;\n    border-top-right-radius: 5px;\n    color: white;\n    background-color: #888888;\n    border-top-left-radius: 5px;\n    border-top-right-radius: 5px;\n}\n\n.ag-chart-tooltip-content {\n    padding: 7px;\n    line-height: 1.7em;\n    border-bottom-left-radius: 5px;\n    border-bottom-right-radius: 5px;\n    overflow: hidden;\n}\n\n.ag-chart-tooltip-content:empty {\n    padding: 0;\n    height: 7px;\n}\n\n.ag-chart-tooltip-arrow::before {\n    content: "";\n\n    position: absolute;\n    top: 100%;\n    left: 50%;\n    transform: translateX(-50%);\n\n    border: 6px solid #989898;\n\n    border-left-color: transparent;\n    border-right-color: transparent;\n    border-top-color: #989898;\n    border-bottom-color: transparent;\n\n    width: 0;\n    height: 0;\n\n    margin: 0 auto;\n}\n\n.ag-chart-tooltip-arrow::after {\n    content: "";\n\n    position: absolute;\n    top: 100%;\n    left: 50%;\n    transform: translateX(-50%);\n\n    border: 5px solid black;\n\n    border-left-color: transparent;\n    border-right-color: transparent;\n    border-top-color: rgb(244, 244, 244);\n    border-bottom-color: transparent;\n\n    width: 0;\n    height: 0;\n\n    margin: 0 auto;\n}\n\n.ag-chart-wrapper {\n    box-sizing: border-box;\n    overflow: hidden;\n}\n';function toTooltipHtml$1(e,t){if("string"==typeof e)return e;t=t||{};var r=e.content,o=void 0===r?t.content||"":r,i=e.title,n=void 0===i?t.title||void 0:i,a=e.color,s=void 0===a?t.color||"white":a,l=e.backgroundColor,c=void 0===l?t.backgroundColor||"#888":l;return(n?'<div class="'+DEFAULT_TOOLTIP_CLASS+'-title"\n        style="color: '+s+"; background-color: "+c+'">'+n+"</div>":"")+'<div class="'+DEFAULT_TOOLTIP_CLASS+'-content">'+o+"</div>"}var Tooltip=function(){function e(t,r,o){var i=this;this.enabled=!0,this.class=void 0,this.lastClass=void 0,this.delay=0,this.range="nearest",this.showTimeout=0,this.constrained=!1,this.tooltipRoot=o;var n=r.createElement("div");if(this.element=this.tooltipRoot.appendChild(n),this.element.classList.add(DEFAULT_TOOLTIP_CLASS),this.canvasElement=t,window.IntersectionObserver){var a=new IntersectionObserver(function(e){var t,r;try{for(var o=__values$o(e),n=o.next();!n.done;n=o.next()){var a=n.value;a.target===i.canvasElement&&0===a.intersectionRatio&&i.toggle(!1)}}catch(e){t={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}},{root:this.tooltipRoot});a.observe(this.canvasElement),this.observer=a}if(e.tooltipDocuments.indexOf(r)<0){var s=r.createElement("style");s.innerHTML=defaultTooltipCss$1,r.head.insertBefore(s,r.head.querySelector("style")),e.tooltipDocuments.push(r)}}return e.prototype.destroy=function(){var e=this.element.parentNode;e&&e.removeChild(this.element),this.observer&&this.observer.unobserve(this.canvasElement)},e.prototype.isVisible=function(){return!this.element.classList.contains(DEFAULT_TOOLTIP_CLASS+"-hidden")},e.prototype.updateClass=function(e,t){var r=this,o=r.element,i=r.class,n=r.lastClass,a=function(e,t){var r=DEFAULT_TOOLTIP_CLASS+"-"+e;t?o.classList.add(r):o.classList.remove(r)};a("no-animation",!!o.classList.contains(DEFAULT_TOOLTIP_CLASS+"-hidden")&&!!e),a("hidden",!e),a("arrow",!t),i!==n&&(n&&o.classList.remove(n),i&&o.classList.add(i),this.lastClass=i)},e.prototype.show=function(e,t,r){var o=this;void 0===r&&(r=!1);var i=this.element,n=this.canvasElement;if(void 0!==t)i.innerHTML=t;else if(!i.innerHTML)return;var a=function(e,t,r){return Math.max(Math.min(t,r),e)},s=n.getBoundingClientRect(),l=s.left+e.offsetX-i.clientWidth/2,c=s.top+e.offsetY-i.clientHeight-8,u=this.getWindowBoundingBox(),d=u.x+u.width-i.clientWidth-1,p=u.y+u.height-i.clientHeight,h=a(u.x,l,d),_=a(u.y,c,p);if(this.constrained=h!==l||_!==c,i.style.transform="translate("+Math.round(h)+"px, "+Math.round(_)+"px)",this.delay>0&&!r)return this.toggle(!1),void(this.showTimeout=window.setTimeout(function(){o.toggle(!0)},this.delay));this.toggle(!0)},e.prototype.getWindowBoundingBox=function(){return new BBox(0,0,window.innerWidth,window.innerHeight)},e.prototype.toggle=function(e){e||window.clearTimeout(this.showTimeout),this.updateClass(e,this.constrained)},e.tooltipDocuments=[],__decorate$1B([Validate(BOOLEAN)],e.prototype,"enabled",void 0),__decorate$1B([Validate(OPT_STRING)],e.prototype,"class",void 0),__decorate$1B([Validate(NUMBER(0))],e.prototype,"delay",void 0),__decorate$1B([DeprecatedAndRenamedTo("range",function(e){return e?"nearest":"exact"})],e.prototype,"tracking",void 0),__decorate$1B([Validate(INTERACTION_RANGE)],e.prototype,"range",void 0),e}(),__decorate$1A=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},__read$K=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},__spread$q=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read$K(arguments[t]));return e},__values$n=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);
2if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ORIENTATIONS=["horizontal","vertical"],OPT_ORIENTATION=predicateWithMessage(function(e,t){return OPTIONAL(e,t,function(e){return ORIENTATIONS.includes(e)})},"expecting an orientation keyword such as 'horizontal' or 'vertical'"),LegendLabel=function(){function e(){this.maxLength=void 0,this.color="black",this.fontStyle=void 0,this.fontWeight=void 0,this.fontSize=12,this.fontFamily="Verdana, sans-serif",this.formatter=void 0}return e.prototype.getFont=function(){return getFont(this.fontSize,this.fontFamily,this.fontStyle,this.fontWeight)},__decorate$1A([Validate(OPT_NUMBER(0))],e.prototype,"maxLength",void 0),__decorate$1A([Validate(COLOR_STRING)],e.prototype,"color",void 0),__decorate$1A([Validate(OPT_FONT_STYLE)],e.prototype,"fontStyle",void 0),__decorate$1A([Validate(OPT_FONT_WEIGHT)],e.prototype,"fontWeight",void 0),__decorate$1A([Validate(NUMBER(0))],e.prototype,"fontSize",void 0),__decorate$1A([Validate(STRING)],e.prototype,"fontFamily",void 0),__decorate$1A([Validate(OPT_FUNCTION)],e.prototype,"formatter",void 0),e}(),LegendMarker=function(){function e(){this.size=15,this._shape=void 0,this.padding=8,this.strokeWidth=1}return Object.defineProperty(e.prototype,"shape",{get:function(){return this._shape},set:function(e){var t;this._shape=e,null===(t=this.parent)||void 0===t||t.onMarkerShapeChange()},enumerable:!1,configurable:!0}),__decorate$1A([Validate(NUMBER(0))],e.prototype,"size",void 0),__decorate$1A([Validate(NUMBER(0))],e.prototype,"padding",void 0),__decorate$1A([Validate(NUMBER(0))],e.prototype,"strokeWidth",void 0),e}(),LegendItem=function(){function e(){this.marker=new LegendMarker,this.label=new LegendLabel,this.maxWidth=void 0,this.paddingX=16,this.paddingY=8,this.toggleSeriesVisible=!0}return __decorate$1A([Validate(OPT_NUMBER(0))],e.prototype,"maxWidth",void 0),__decorate$1A([Validate(NUMBER(0))],e.prototype,"paddingX",void 0),__decorate$1A([Validate(NUMBER(0))],e.prototype,"paddingY",void 0),__decorate$1A([Validate(BOOLEAN)],e.prototype,"toggleSeriesVisible",void 0),e}(),LegendListeners=function(){function e(){this.legendItemClick=void 0,this.legendItemDoubleClick=void 0}return __decorate$1A([Validate(OPT_FUNCTION)],e.prototype,"legendItemClick",void 0),e}(),Legend=function(){function e(e,t,r,o,i){var n=this;this.chart=e,this.interactionManager=t,this.cursorManager=r,this.highlightManager=o,this.tooltipManager=i,this.id=createId$1(this),this.group=new Group({name:"legend",layer:!0,zIndex:Layers.LEGEND_ZINDEX}),this.itemSelection=Selection.select(this.group,MarkerLabel),this.oldSize=[0,0],this.pages=[],this.maxPageSize=[0,0],this.paginationTrackingIndex=0,this.item=new LegendItem,this.listeners=new LegendListeners,this.truncatedItems=new Set,this._data=[],this._enabled=!0,this.position="right",this.maxWidth=void 0,this.maxHeight=void 0,this.reverseOrder=void 0,this.spacing=20,this.characterWidths=new Map,this.size=[0,0],this._visible=!0,this.item.marker.parent=this,this.pagination=new Pagination(function(e){return n.chart.update(e)},function(e){return n.updatePageNumber(e)},this.interactionManager,this.cursorManager),this.pagination.attachPagination(this.group),this.item.marker.parent=this,this.interactionManager.addListener("click",function(e){return n.checkLegendClick(e)}),this.interactionManager.addListener("dblclick",function(e){return n.checkLegendDoubleClick(e)}),this.interactionManager.addListener("hover",function(e){return n.handleLegendMouseMove(e)})}return Object.defineProperty(e.prototype,"translationX",{get:function(){return this.group.translationX},set:function(e){this.group.translationX=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"translationY",{get:function(){return this.group.translationY},set:function(e){this.group.translationY=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"data",{get:function(){return this._data},set:function(e){this._data=e,this.updateGroupVisibility()}
2,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"enabled",{get:function(){return this._enabled},set:function(e){this._enabled=e,this.updateGroupVisibility()},enumerable:!1,configurable:!0}),e.prototype.getOrientation=function(){if(void 0!==this.orientation)return this.orientation;switch(this.position){case"right":case"left":return"vertical";case"bottom":case"top":return"horizontal"}},e.prototype.onMarkerShapeChange=function(){this.itemSelection.clear(),this.group.markDirty(this.group,RedrawType.MINOR)},e.prototype.getCharacterWidths=function(e){var t=this.characterWidths;if(t.has(e))return t.get(e);var r={"...":HdpiCanvas.getTextSize("...",e).width};return t.set(e,r),r},Object.defineProperty(e.prototype,"visible",{get:function(){return this._visible},set:function(e){this._visible=e,this.updateGroupVisibility()},enumerable:!1,configurable:!0}),e.prototype.updateGroupVisibility=function(){this.group.visible=this.enabled&&this.visible&&this.data.length>0},e.prototype.attachLegend=function(e){e.append(this.group)},e.prototype.performLayout=function(e,t){var r=this,o=this.item,i=o.paddingX,n=o.paddingY,a=o.label,s=o.maxWidth,l=o.marker,c=l.size,u=l.padding,d=l.shape,p=o.label,h=p.maxLength,_=void 0===h?1/0:h,f=p.fontStyle,g=p.fontWeight,y=p.fontSize,m=p.fontFamily,v=__spread$q(this.data);this.reverseOrder&&v.reverse(),this.itemSelection.update(v,function(e){var t=e.datum,r=getMarker$1(d||t.marker.shape);e.marker=new r});var E=[],C=a.getFont(),O=null!=s?s:.8*e,P=c+u+i;if(this.itemSelection.each(function(e,t){var o;e.markerSize=c,e.spacing=u,e.fontStyle=f,e.fontWeight=g,e.fontSize=y,e.fontFamily=m;var i=t.itemId||t.id,n=(null!==(o=t.label.text)&&void 0!==o?o:"<unknown>").replace(/\r?\n/g," ");e.text=r.truncate(n,_,O,P,C,i),E.push(e.computeBBox())}),e=Math.max(1,e),t=Math.max(1,t),!isFinite(e))return!1;var S=this.size,b=this.oldSize;S[0]=e,S[1]=t,S[0]===b[0]&&S[1]===b[1]||(b[0]=S[0],b[1]=S[1]);var D=this.updatePagination(E,e,t),M=D.pages,T=D.maxPageHeight,A=D.maxPageWidth;this.pages=M,this.maxPageSize=[A-i,T-n];var x=this.pagination.currentPage,w=this.pages[x];this.pages.length<1||!w?this.visible=!1:(this.visible=!0,this.updatePositions(x),this.update())},e.prototype.truncate=function(e,t,r,o,i,n){var a,s,l=e.split(""),c=!1;if(e.length>t&&(e=""+e.substring(0,t),c=!0),Math.floor(o+HdpiCanvas.getTextSize(e,i).width)>r){var u="",d=this.getCharacterWidths(i),p=o+d["..."];try{for(var h=__values$n(l),_=h.next();!_.done;_=h.next()){var f=_.value;if(d[f]||(d[f]=HdpiCanvas.getTextSize(f,i).width),(p+=d[f])>r)break;u+=f}}catch(e){a={error:e}}finally{try{_&&!_.done&&(s=h.return)&&s.call(h)}finally{if(a)throw a.error}}e=u,c=!0}return c?(e+="...",this.truncatedItems.add(n)):this.truncatedItems.delete(n),e},e.prototype.updatePagination=function(e,t,r){var o=this.getOrientation(),i=Math.min(this.paginationTrackingIndex,e.length);this.pagination.orientation=o,this.pagination.translationX=0,this.pagination.translationY=0;var n=this.calculatePagination(e,t,r),a=n.pages,s=n.maxPageHeight,l=n.maxPageWidth,c=n.paginationBBox,u=n.paginationVertical,d=a.findIndex(function(e){return e.endIndex>=i});this.pagination.currentPage=Math.min(Math.max(d,0),a.length-1);var p=this.item,h=l-p.paddingX,_=s-p.paddingY,f=0,g=-c.y-this.item.marker.size/2;return u?g+=_+8:(f+=-c.x+h+8,g+=(_-c.height)/2),this.pagination.translationX=f,this.pagination.translationY=g,this.pagination.update(),this.pagination.updateMarkers(),{maxPageHeight:s,maxPageWidth:l,pages:a}},e.prototype.calculatePagination=function(e,t,r){var o,i,n,a=this.item,s=a.paddingX,l=a.paddingY,c=this.getOrientation(),u=["left","right"].includes(this.position),d=this.pagination.computeBBox(),p=new BBox(0,0,0,0),h=[],_=0,f=0,g=0,y=function(e){var t=e.width,r=e.height;return t===d.width&&r===d.height},m=void 0!==this.maxWidth||void 0!==this.maxHeight;do{if(g++>
210){Logger.warn("unable to find stable legend layout.");break}d=p;var v=t-(u?0:d.width),E=gridLayout({orientation:c,bboxes:e,maxHeight:r-(u?d.height:0),maxWidth:v,itemPaddingY:l,itemPaddingX:s,forceResult:m});h=null!==(o=null==E?void 0:E.pages)&&void 0!==o?o:[],_=null!==(i=null==E?void 0:E.maxPageWidth)&&void 0!==i?i:0,f=null!==(n=null==E?void 0:E.maxPageHeight)&&void 0!==n?n:0;var C=h.length;if(this.pagination.visible=C>1,this.pagination.totalPages=C,this.pagination.update(),p=this.pagination.computeBBox(),!this.pagination.visible)break}while(!y(p));return{maxPageWidth:_,maxPageHeight:f,pages:h,paginationBBox:d,paginationVertical:u}},e.prototype.updatePositions=function(e){void 0===e&&(e=0);var t=this,r=t.item.paddingY,o=t.itemSelection,i=t.pages;if(!(i.length<1)&&i[e]){var n=i[e],a=n.columns,s=n.startIndex,l=n.endIndex,c=0,u=0,d=a.length,p=a[0].indices.length,h="horizontal"===this.getOrientation(),_=a[0].bboxes[0].height+r,f=[];o.each(function(e,t,r){var o,i;if(r<s||r>l)e.visible=!1;else{var n=r-s,g=0,y=0;h?(g=n%d,y=Math.floor(n/d)):(g=Math.floor(n/p),y=n%p),e.visible=!0;var m=a[g];m&&(u=_*y,c=null!==(o=f[y])&&void 0!==o?o:0,f[y]=(null!==(i=f[y])&&void 0!==i?i:0)+m.columnWidth,e.translationX=Math.floor(c),e.translationY=Math.floor(u))}})}},e.prototype.updatePageNumber=function(e){var t=this.pages,r=t[e],o=r.startIndex,i=r.endIndex;0===o?this.paginationTrackingIndex=0:e===t.length-1?this.paginationTrackingIndex=i:this.paginationTrackingIndex=Math.floor((o+i)/2),this.pagination.update(),this.pagination.updateMarkers(),this.updatePositions(e),this.chart.update(ChartUpdateType.SCENE_RENDER)},e.prototype.update=function(){var e=this.item,t=e.marker.strokeWidth,r=e.label.color;this.itemSelection.each(function(e,o){var i=o.marker;e.markerFill=i.fill,e.markerStroke=i.stroke,e.markerStrokeWidth=t,e.markerFillOpacity=i.fillOpacity,e.markerStrokeOpacity=i.strokeOpacity,e.opacity=o.enabled?1:.5,e.color=r})},e.prototype.getDatumForPoint=function(e,t){var r,o,i=[],n={dist:1/0,datum:void 0};try{for(var a=__values$n(this.group.children),s=a.next();!s.done;s=a.next()){var l=s.value;if(l.visible&&l instanceof MarkerLabel){var c=l.computeBBox();if(c.grow(this.item.paddingX/2,"horizontal"),c.grow(this.item.paddingY/2,"vertical"),c.containsPoint(e,t))return l.datum;var u=e-c.x-this.item.paddingX/2,d=t-c.y-this.item.paddingY/2,p=Math.pow(u,2)+Math.pow(d,2);u>=0&&d>=0&&p<n.dist&&(n.dist=p,n.datum=l.datum),i.push(c)}}}catch(e){r={error:e}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}if(BBox.merge(i).containsPoint(e,t))return n.datum},e.prototype.computeBBox=function(){return this.group.computeBBox()},e.prototype.computePagedBBox=function(){var e=this.group.computeBBox();if(this.pages.length<=1)return e;var t=__read$K(this.maxPageSize,2),r=t[0],o=t[1];return e.height=Math.max(o,e.height),e.width=Math.max(r,e.width),e},e.prototype.checkLegendClick=function(e){var t=this,r=t.listeners.legendItemClick,o=t.chart,i=t.highlightManager,n=t.item.toggleSeriesVisible,a=this.getDatumForPoint(e.offsetX,e.offsetY);if(a){var s=a.id,l=a.itemId,c=a.enabled,u=o.series.find(function(e){return e.id===s});if(u){e.consume();var d=c;n&&(d=!c,u.toggleSeriesItem(l,d)),d?i.updateHighlight(this.id,{series:u,itemId:l,datum:void 0}):i.updateHighlight(this.id),this.chart.update(ChartUpdateType.PROCESS_DATA,{forceNodeDataRefresh:!0}),null==r||r({type:"click",enabled:d,itemId:l,seriesId:u.id})}}},e.prototype.checkLegendDoubleClick=function(e){var t=this,r=t.listeners.legendItemDoubleClick,o=t.chart,i=t.item.toggleSeriesVisible;if("integrated"!==o.mode){var n=this.getDatumForPoint(e.offsetX,e.offsetY);if(n){var a=n.id,s=n.itemId,l=n.seriesId,c=o.series.find(function(e){return e.id===a});if(c){if(e.consume(),i){var u=o.series.reduce(function(e,t){return __spread$q(e,t.getLegendData())},[]),d=u.filter(function(e){return e.enabled}).length,p=u.find(function(e){return e.itemId===s&&e.seriesId===l});o.series.forEach(function(e){e.getLegendData().forEach(function(t){var r,o=t.itemId===s&&t.seriesId===l,i=1===d&&null!==(r=null==p?void 0:p.enabled)&&void 0!==r&&r,n=o||i;e.toggleSeriesItem(t.itemId,n)})})}
2this.chart.update(ChartUpdateType.PROCESS_DATA,{forceNodeDataRefresh:!0}),null==r||r({type:"dblclick",enabled:!0,itemId:s,seriesId:c.id})}}}},e.prototype.handleLegendMouseMove=function(e){var t=this,r=t.enabled,o=t.item.toggleSeriesVisible,i=t.listeners;if(r){var n=this.computeBBox(),a=e.pageX,s=e.pageY,l=e.offsetX,c=e.offsetY,u=this.group.visible&&n.containsPoint(l,c);if(!u)return this.cursorManager.updateCursor(this.id),this.highlightManager.updateHighlight(this.id),void this.tooltipManager.updateTooltip(this.id);e.consume();var d=this.getDatumForPoint(l,c);if(!u||void 0===d)return this.cursorManager.updateCursor(this.id),void this.highlightManager.updateHighlight(this.id);var p=d?this.chart.series.find(function(e){return e.id===(null==d?void 0:d.id)}):void 0;d&&this.truncatedItems.has(d.itemId||d.id)?this.tooltipManager.updateTooltip(this.id,{pageX:a,pageY:s,offsetX:l,offsetY:c,event:e},toTooltipHtml$1({content:d.label.text})):this.tooltipManager.updateTooltip(this.id),(o||null!=i.legendItemClick)&&this.cursorManager.updateCursor(this.id,"pointer"),(null==d?void 0:d.enabled)&&p?this.highlightManager.updateHighlight(this.id,{series:p,itemId:null==d?void 0:d.itemId,datum:void 0}):this.highlightManager.updateHighlight(this.id)}},e.className="Legend",__decorate$1A([Validate(BOOLEAN)],e.prototype,"_enabled",void 0),__decorate$1A([Validate(POSITION)],e.prototype,"position",void 0),__decorate$1A([Validate(OPT_NUMBER(0))],e.prototype,"maxWidth",void 0),__decorate$1A([Validate(OPT_NUMBER(0))],e.prototype,"maxHeight",void 0),__decorate$1A([Validate(OPT_BOOLEAN)],e.prototype,"reverseOrder",void 0),__decorate$1A([Validate(OPT_ORIENTATION)],e.prototype,"orientation",void 0),__decorate$1A([Validate(NUMBER(0))],e.prototype,"spacing",void 0),e}(),__values$m=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},SizeMonitor=function(){function e(){}return e.init=function(){var e=this,t=window.ResizeObserver;t?this.resizeObserver=new t(function(t){var r,o;try{for(var i=__values$m(t),n=i.next();!n.done;n=i.next()){var a=n.value,s=a.contentRect,l=s.width,c=s.height;e.checkSize(e.elements.get(a.target),a.target,l,c)}}catch(e){r={error:e}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}}):window.setInterval(function(){e.elements.forEach(function(t,r){e.checkClientSize(r,t)})},100),this.ready=!0},e.checkSize=function(e,t,r,o){e&&(e.size&&r===e.size.width&&o===e.size.height||(e.size={width:r,height:o},e.cb(e.size,t)))},e.observe=function(e,t){this.ready||this.init(),this.unobserve(e),this.resizeObserver&&this.resizeObserver.observe(e),this.elements.set(e,{cb:t}),this.checkClientSize(e,{cb:t})},e.unobserve=function(e){this.resizeObserver&&this.resizeObserver.unobserve(e),this.elements.delete(e)},e.checkClientSize=function(e,t){var r=e.clientWidth?e.clientWidth:0,o=e.clientHeight?e.clientHeight:0;this.checkSize(t,e,r,o)},e.elements=new Map,e.ready=!1,e}(),__awaiter$e=function(e,t,r,o){return new(r||(r=Promise))(function(i,n){function a(e){try{l(o.next(e))}catch(e){n(e)}}function s(e){try{l(o.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})},__generator$e=function(e,t){var r,o,i,n,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return n={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function s(n){return function(s){return function(n){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(i=2&n[0]?o.return:n[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,n[1])).done)return i;switch(o=0,i&&(n=[2&n[0],i.value]),n[0]){case 0:case 1:i=n;break;case 4:return a.label++,{value:n[1],done:!1};case 5:a.label++,o=n[1],n=[0];continue;case 7:n=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==n[0]&&2!==n[0])){a=0;continue}if(3===n[0]&&(!i||n[1]>i[0]&&n[1]<i[3])){a.label=n[1];break}if(6===n[0]&&a.label<i[1]){a.label=i[1],i=n;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(n);break}i[2]&&a.ops.pop(),a.trys.pop();continue}n=t.call(e,a)}catch(e){n=[6,e],o=0}finally{r=i=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,s])}}};function debouncedAnimationFrame(e){return buildScheduler(function(e){return requestAnimationFrame(e)},e)}function debouncedCallback(e){return buildScheduler(function(e){return setTimeout(e,0)},e)}function buildScheduler(e,t){var r,o,i=0,n=!1,a=function(){return n},s=function(){n=!1,null==o||o(),o=void 0,r=void 0,i>0&&e(l)},l=function(){var e=i;i=0,n=!0;var r=t({count:e});r?r.then(s).catch(s):s()};return{schedule:function(){0!==i||a()||e(l),i++},await:function(){return __awaiter$e(this,void 0,void 0,function(){return __generator$e(this,function(e){switch(e.label){case 0:if(!a())return[2];r||(r=new Promise(function(e){o=e})),e.label=1;case 1:return a()?[4,r]:[3,3];case 2:return e.sent(),[3,1];case 3:return[2]}})})}}}var __extends$2h=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$1z=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},MARKER_SHAPES=["circle","cross","diamond","heart","plus","square","triangle"],MARKER_SHAPE=predicateWithMessage(function(e){return MARKER_SHAPES.includes(e)||Object.getPrototypeOf(e)===Marker},"expecting a marker shape keyword such as 'circle', 'diamond' or 'square' or an object extending the Marker class"),SeriesMarker=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.enabled=!0,t.shape=Circle,t.size=6,t.maxSize=30,t.domain=void 0,t.fill=void 0,t.stroke=void 0,t.strokeWidth=1,t.fillOpacity=void 0,t.strokeOpacity=void 0,t}return __extends$2h(t,e),__decorate$1z([Validate(BOOLEAN),SceneChangeDetection({redraw:RedrawType.MAJOR})],t.prototype,"enabled",void 0),__decorate$1z([Validate(MARKER_SHAPE),SceneChangeDetection({redraw:RedrawType.MAJOR})],t.prototype,"shape",void 0),__decorate$1z([Validate(NUMBER(0)),SceneChangeDetection({redraw:RedrawType.MAJOR})],t.prototype,"size",void 0),__decorate$1z([Validate(NUMBER(0)),SceneChangeDetection({redraw:RedrawType.MAJOR})],t.prototype,"maxSize",void 0),__decorate$1z([Validate(OPT_NUM
2BER_ARRAY),SceneChangeDetection({redraw:RedrawType.MAJOR})],t.prototype,"domain",void 0),__decorate$1z([Validate(OPT_COLOR_STRING),SceneChangeDetection({redraw:RedrawType.MAJOR})],t.prototype,"fill",void 0),__decorate$1z([Validate(OPT_COLOR_STRING),SceneChangeDetection({redraw:RedrawType.MAJOR})],t.prototype,"stroke",void 0),__decorate$1z([Validate(OPT_NUMBER(0)),SceneChangeDetection({redraw:RedrawType.MAJOR})],t.prototype,"strokeWidth",void 0),__decorate$1z([Validate(OPT_NUMBER(0,1)),SceneChangeDetection({redraw:RedrawType.MAJOR})],t.prototype,"fillOpacity",void 0),__decorate$1z([Validate(OPT_NUMBER(0,1)),SceneChangeDetection({redraw:RedrawType.MAJOR})],t.prototype,"strokeOpacity",void 0),t}(ChangeDetectable),__read$J=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a};function clamp(e,t,r){return Math.max(t,Math.min(r,e))}var BandScale$5=function(){function e(){this.type="band",this.cache=null,this.cacheProps=["_domain","range","_paddingInner","_paddingOuter","round","interval"],this.index=new Map,this.ordinalRange=[],this._domain=[],this.range=[0,1],this._bandwidth=1,this._rawBandwidth=1,this._paddingInner=0,this._paddingOuter=0,this.round=!1}return e.prototype.didChange=function(){var e=this,t=this.cache;return!(t&&!this.cacheProps.some(function(r){return e[r]!==t[r]})||(this.cache={},this.cacheProps.forEach(function(t){return e.cache[t]=e[t]}),0))},e.prototype.refresh=function(){this.didChange()&&this.update()},Object.defineProperty(e.prototype,"domain",{get:function(){return this._domain},set:function(e){var t=[];this.index=new Map;var r=this.index;e.forEach(function(e){void 0===r.get(e)&&r.set(e,t.push(e)-1)}),this._domain=t},enumerable:!1,configurable:!0}),e.prototype.ticks=function(){this.refresh();var e=this.interval,t=void 0===e?1:e,r=Math.abs(Math.round(t));return this._domain.filter(function(e,t){return t%r===0})},e.prototype.convert=function(e){this.refresh();var t=this.index.get(e);if(void 0===t)return NaN;var r=this.ordinalRange[t];return void 0===r?NaN:r},e.prototype.invert=function(e){this.refresh();var t=this.ordinalRange.findIndex(function(t){return t===e});return this.domain[t]},Object.defineProperty(e.prototype,"bandwidth",{get:function(){return this.refresh(),this._bandwidth},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rawBandwidth",{get:function(){return this.refresh(),this._rawBandwidth},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"padding",{get:function(){return this._paddingInner},set:function(e){e=clamp(e,0,1),this._paddingInner=e,this._paddingOuter=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"paddingInner",{get:function(){return this._paddingInner},set:function(e){this._paddingInner=clamp(e,0,1)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"paddingOuter",{get:function(){return this._paddingOuter},set:function(e){this._paddingOuter=clamp(e,0,1)},enumerable:!1,configurable:!0}),e.prototype.update=function(){var e=this._domain.length;if(0!==e){for(var t=this.round,r=this._paddingInner,o=this._paddingOuter,i=__read$J(this.range,2),n=i[0],a=i[1]-n,s=a/Math.max(1,e+2*o-r),l=t?Math.floor(s):s,c=n+(a-l*(e-r))/2,u=t?Math.round(c):c,d=l*(1-r),p=t?Math.round(d):d,h=s*(1-r),_=[],f=0;f<e;f++)_.push(u+l*f);this._bandwidth=p,this._rawBandwidth=h,this.ordinalRange=_}},e}(),__extends$2g=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$1y=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},__read$I=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},__spread$p=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read$I(arguments[t]));return e},CategoryAxis=function(e){function t(t){var r=e.call(this,t,new BandScale$5)||this;return r._paddingOverrideEnabled=!1,r.groupPaddingInner=.1,r.includeInvisibleDomains=!0,r}return __extends$2g(t,e),Object.defineProperty(t.prototype,"paddingInner",{get:function(){return this._paddingOverrideEnabled=!0,this.scale.paddingInner},set:function(e){this._paddingOverrideEnabled=!0,this.scale.paddingInner=e}
2,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"paddingOuter",{get:function(){return this.scale.paddingOuter},set:function(e){this.scale.paddingOuter=e},enumerable:!1,configurable:!0}),t.prototype.normaliseDataDomain=function(e){var t=new Set(e);return new(Array.bind.apply(Array,__spread$p([void 0],t.values())))},t.prototype.calculateDomain=function(){return this._paddingOverrideEnabled||(this.boundSeries.some(function(e){return["bar","column"].includes(e.type)})?(this.scale.paddingInner=.2,this.scale.paddingOuter=.3):(this.scale.paddingInner=1,this.scale.paddingOuter=0)),e.prototype.calculateDomain.call(this)},t.className="CategoryAxis",t.type="category",__decorate$1y([Validate(NUMBER(0,1))],t.prototype,"groupPaddingInner",void 0),t}(ChartAxis),__assign$C=function(){return __assign$C=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$C.apply(this,arguments)},__read$H=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},__spread$o=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read$H(arguments[t]));return e},__values$l=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function jsonDiff(e,t){var r,o,i=classify(e),n=classify(t);if("array"===n){var a=t;return"array"!==i||e.length!==a.length||a.some(function(t,r){var o;return null!=jsonDiff(null===(o=e)||void 0===o?void 0:o[r],t)})?__spread$o(a):null}if("primitive"===n)return"primitive"!==i?__assign$C({},t):e!==t?t:null;var s=e||{},l=t||{},c=new Set(__spread$o(Object.keys(s),Object.keys(l))),u=0,d={},p=function(e){if(s[e]===l[e])return"continue";var t=function(t){d[e]=t,u++},r=classify(s[e]),o=classify(l[e]);if(r!==o)return t(l[e]),"continue";if("primitive"===o||null===o)return t(l[e]),"continue";if("array"===o&&s[e].length!==l[e].length)return t(l[e]),"continue";if("class-instance"===o)return t(l[e]),"continue";if("function"===o&&s[e]!==l[e])return t(l[e]),"continue";var i=jsonDiff(s[e],l[e]);null!==i&&t(i)};try{for(var h=__values$l(c),_=h.next();!_.done;_=h.next())p(_.value)}catch(e){r={error:e}}finally{try{_&&!_.done&&(o=h.return)&&o.call(h)}finally{if(r)throw r.error}}return 0===u?null:d}var DELETE=Symbol("<delete-property>"),NOT_SPECIFIED=Symbol("<unspecified-property>");function jsonMerge(e,t){var r,o,i=(null==t?void 0:t.avoidDeepClone)||[];if(e.map(function(e){return classify(e)}).some(function(e){return"array"===e})){var n=e[e.length-1];return n instanceof Array?n.map(function(e){var r=classify(e);return"array"===r?jsonMerge([[],e],t):"object"===r?jsonMerge([{},e],t):e}):n}var a={},s=new Set(e.map(function(e){return null!=e?Object.keys(e):[]}).reduce(function(e,t){return e.concat(t)},[])),l=function(r){var o=e.map(function(e){return null!=e&&r in e?e[r]:NOT_SPECIFIED}).filter(function(e){return e!==NOT_SPECIFIED});if(0===o.length)return"continue";var n=o[o.length-1];if(n===DELETE)return"continue";var s=o.map(function(e){return classify(e)}),l=s[0];if(s.some(function(e){return e!==l}))return a[r]=n,"continue";"array"!==l&&"object"!==l||i.includes(r)?a[r]="array"===l?__spread$o(n):n:a[r]=jsonMerge(o,t)};try{for(var c=__values$l(s),u=c.next();!u.done;u=c.next())l(u.value)}catch(e){r={error:e}}finally{try{u&&!u.done&&(o=c.return)&&o.call(c)}finally{if(r)throw r.error}}return a}function jsonApply(e,t,r){var o;void 0===r&&(r={});var i=r.path,n=void 0===i?void 0:i,a=r.matcherPath,s=void 0===a?n?n.replace(/(\[[0-9+]+\])/i,"[]"):void 0:a,l=r.skip,c=void 0===l?[]:l,u=r.constructors,d=void 0===u?{}:u,p=r.allowedTypes,h=void 0===p?{}:p,_=r.idx;if(null==e)throw new Error("AG Charts - target is uninitialised: "+(n||"<root>"));if(null==t)return e;var f=e;null!=_&&"_declarationOrder"in f&&(f._declarationOrder=_);var g=classify(e),y=function(i){var a=(s?s+".":"")+i;
2if(c.indexOf(a)>=0)return"continue";var l=t[i],u=(n?n+".":"")+i,p=f.constructor,_=f[i],y=null!==(o=d[i])&&void 0!==o?o:d[a];try{var m=classify(_),v=classify(l);if("class-instance"===g&&!(i in e)&&!Object.prototype.hasOwnProperty.call(f,i))return Logger.warn("unable to set ["+u+"] in "+(null==p?void 0:p.name)+" - property is unknown"),"continue";var E=h[a]||[m];if("class-instance"===m&&"object"===v);else if(null!=m&&null!=v&&!E.includes(v))return Logger.warn("unable to set ["+u+"] in "+(null==p?void 0:p.name)+" - can't apply type of ["+v+"], allowed types are: ["+E+"]"),"continue";if("array"===v)if(null!=(y=null!=y?y:d[a+"[]"])){var C=l;f[i]=C.map(function(e,t){return jsonApply(new y,e,__assign$C(__assign$C({},r),{path:u,matcherPath:a+"[]",idx:t}))})}else f[i]=l;else"class-instance"===v?f[i]=l:"object"===v?null!=_?jsonApply(_,l,__assign$C(__assign$C({},r),{path:u,matcherPath:a,idx:void 0})):f[i]=null!=y?jsonApply(new y,l,__assign$C(__assign$C({},r),{path:u,matcherPath:a,idx:void 0})):l:f[i]=l}catch(e){var O=e;return Logger.warn("unable to set ["+u+"] in ["+(null==p?void 0:p.name)+"]; nested error is: "+O.message),"continue"}};for(var m in t)y(m);return e}function jsonWalk(e,t,r){for(var o=[],i=3;i<arguments.length;i++)o[i-3]=arguments[i];var n=classify(e),a=r.skip||[];if("array"!==n){if("object"===n){t.apply(void 0,__spread$o([n,e],o));var s=function(i){if(a.indexOf(i)>=0)return"continue";var n=e[i],s=null==o?void 0:o.map(function(e){return null==e?void 0:e[i]}),l=classify(n);"object"!==l&&"array"!==l||jsonWalk.apply(void 0,__spread$o([n,t,r],s))};for(var l in e)s(l)}}else e.forEach(function(e,i){jsonWalk.apply(void 0,__spread$o([e,t,r],(null!=o?o:[]).map(function(e){return null==e?void 0:e[i]})))})}function classify(e){return null==e?null:e instanceof HTMLElement?"primitive":e instanceof Array?"array":e instanceof Date?"primitive":"object"==typeof e&&e.constructor===Object?"object":"function"==typeof e?"function":"object"==typeof e&&null!=e.constructor?"class-instance":"primitive"}var __extends$2f=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$1x=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},__awaiter$d=function(e,t,r,o){return new(r||(r=Promise))(function(i,n){function a(e){try{l(o.next(e))}catch(e){n(e)}}function s(e){try{l(o.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})},__generator$d=function(e,t){var r,o,i,n,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return n={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function s(n){return function(s){return function(n){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(i=2&n[0]?o.return:n[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,n[1])).done)return i;switch(o=0,i&&(n=[2&n[0],i.value]),n[0]){case 0:case 1:i=n;break;case 4:return a.label++,{value:n[1],done:!1};case 5:a.label++,o=n[1],n=[0];continue;case 7:n=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==n[0]&&2!==n[0])){a=0;continue}if(3===n[0]&&(!i||n[1]>i[0]&&n[1]<i[3])){a.label=n[1];break}if(6===n[0]&&a.label<i[1]){a.label=i[1],i=n;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(n);break}i[2]&&a.ops.pop(),a.trys.pop();continue}n=t.call(e,a)}catch(e){n=[6,e],o=0}finally{r=i=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,s])}}},__read$G=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},__spread$n=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read$G(arguments[t]));return e},__values$k=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);
2if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},_a,DEFAULT_DIRECTION_KEYS=(_a={},_a[ChartAxisDirection.X]=["xKey"],_a[ChartAxisDirection.Y]=["yKey"],_a),CartesianSeriesNodeBaseClickEvent=function(e){function t(t,r,o,i,n){var a=e.call(this,o,i,n)||this;return a.xKey=t,a.yKey=r,a}return __extends$2f(t,e),t}(SeriesNodeBaseClickEvent),CartesianSeriesNodeClickEvent=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="nodeClick",t}return __extends$2f(t,e),t}(CartesianSeriesNodeBaseClickEvent),CartesianSeriesNodeDoubleClickEvent=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="nodeDoubleClick",t}return __extends$2f(t,e),t}(CartesianSeriesNodeBaseClickEvent),CartesianSeries=function(e){function t(t){var r;void 0===t&&(t={});var o=e.call(this,{useSeriesGroupLayer:!0,pickModes:t.pickModes,directionKeys:null!==(r=t.directionKeys)&&void 0!==r?r:DEFAULT_DIRECTION_KEYS})||this;o._contextNodeData=[],o.nodeDataDependencies={},o.highlightSelection=Selection.select(o.highlightNode,function(){return o.opts.hasMarkers?o.markerFactory():o.nodeFactory()}),o.highlightLabelSelection=Selection.select(o.highlightLabel,Text),o.subGroups=[],o.subGroupId=0,o.seriesItemEnabled=new Map;var i=t.pathsPerSeries,n=void 0===i?1:i,a=t.hasMarkers,s=void 0!==a&&a,l=t.pathsZIndexSubOrderOffset,c=void 0===l?[]:l,u=t.renderLayerPerSubSeries,d=void 0===u||u;return o.opts={pathsPerSeries:n,hasMarkers:s,pathsZIndexSubOrderOffset:c,renderLayerPerSubSeries:d},o}return __extends$2f(t,e),Object.defineProperty(t.prototype,"contextNodeData",{get:function(){var e;return null===(e=this._contextNodeData)||void 0===e?void 0:e.slice()},enumerable:!1,configurable:!0}),t.prototype.destroy=function(){e.prototype.destroy.call(this),this._contextNodeData.splice(0,this._contextNodeData.length),this.subGroups.splice(0,this.subGroups.length)},t.prototype.checkDomainXY=function(e,t,r,o){return(r&&isContinuous(e)||!r&&isDiscrete(e))&&(o&&isContinuous(t)||!o&&isDiscrete(t))?[e,t]:void 0},t.prototype.checkRangeXY=function(e,t,r,o){return!isNaN(e)&&!isNaN(t)&&r.inRange(e)&&o.inRange(t)},t.prototype.update=function(e){var t,r,o=e.seriesRect;return __awaiter$d(this,void 0,void 0,function(){var e,i,n,a,s,l,c;return __generator$d(this,function(u){switch(u.label){case 0:return i=(e=this).seriesItemEnabled,n=e.visible,a=(null!==(r=null===(t=this.highlightManager)||void 0===t?void 0:t.getActiveHighlight())&&void 0!==r?r:{}).series,s=a?a===this:void 0,l=n&&0===i.size||__spread$n(i.values()).some(function(e){return!0===e}),c={seriesRectWidth:null==o?void 0:o.width,seriesRectHeight:null==o?void 0:o.height},null!=jsonDiff(this.nodeDataDependencies,c)&&(this.nodeDataDependencies=c,this.markNodeDataDirty()),[4,this.updateSelections(s,l)];case 1:return u.sent(),[4,this.updateNodes(s,l)];case 2:return u.sent(),[2]}})})},t.prototype.updateSelections=function(e,t){return __awaiter$d(this,void 0,void 0,function(){var r,o=this;return __generator$d(this,function(i){switch(i.label){case 0:return[4,this.updateHighlightSelection(e)];case 1:return i.sent(),t&&(this.nodeDataRefresh||this.isPathOrSelectionDirty())?this.nodeDataRefresh?(this.nodeDataRefresh=!1,r=this,[4,this.createNodeData()]):[3,4]:[2];case 2:return r._contextNodeData=i.sent(),[4,this.updateSeriesGroups()];case 3:i.sent(),i.label=4;case 4:return[4,Promise.all(this.subGroups.map(function(t,r){return o.updateSeriesGroupSelections(t,r,e)}))];case 5:return i.sent(),[2]}})})},t.prototype.updateSeriesGroupSelections=function(e,t,r){return __awaiter$d(this,void 0,void 0,function(){var o,i,n,a,s,l,c,u,d,p,h;return __generator$d(this,function(_){switch(_.label){case 0:return o=e.datumSelection,i=e.labelSelection,n=e.markerSelection,a=e.paths,s=this._contextNodeData[t],l=s.nodeData,c=s.labelData,u=s.itemId,[4,this.updatePaths({seriesHighlighted:r,itemId:u,contextData:s,paths:a,seriesIdx:t})];case 1:return _.sent(),d=e,[4,this.updateDatumSelection({nodeData:l,datumSelection:o,seriesIdx:t})];case 2:return d.datumSelection=_.sent(),p=e,[4,this.updateLabelSelection({labelData:c,labelSelection:i,seriesIdx:t})];case 3:return p.labelSelection=_.sent(),n?(h=e,[4,this.updateMarkerSelection({nodeData:l,markerSelection:n,seriesIdx:t})]):[3,5];case 4:h.markerSelection=_.sent(),_.label=5;case 5:return[2]}})})},t.prototype.nodeFactory=function(){return new Group},t.prototype.markerFactory=function(){return new(getMarker$1())},t.prototype.updateSeriesGroups=function(){var e;return __awaiter$d(this,void 0,void 0,function(){var t,r,o,i,n,a,s,l,c,u,d,p,h,_,f,g,y,m,v,E=this;return __generator$d(this,function(C){if(r=(t=this)._contextNodeData,o=t.contentGroup,i=t.subGroups,n=t.opts,a=n.pathsPerSeries,s=n.hasMarkers,l=n.pathsZIndexSubOrderOffset,c=n.renderLayerPerSubSeries,r.length===i.length)return[2];
2for(r.length<i.length&&i.splice(r.length).forEach(function(e){var t,r,i=e.dataNodeGroup,n=e.markerGroup,a=e.labelGroup,s=e.paths;o.removeChild(i),n&&o.removeChild(n),a&&o.removeChild(a);try{for(var l=__values$k(s),c=l.next();!c.done;c=l.next()){var u=c.value;o.removeChild(u)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(t)throw t.error}}}),u=r.length;u>i.length;){for(d=c,p=this.subGroupId++,h=p,_=new Group({name:this.id+"-series-sub"+p+"-dataNodes",layer:d,zIndex:Layers.SERIES_LAYER_ZINDEX,zIndexSubOrder:[function(){return E._declarationOrder},h]}),f=s?new Group({name:this.id+"-series-sub"+this.subGroupId+++"-markers",layer:d,zIndex:Layers.SERIES_LAYER_ZINDEX,zIndexSubOrder:[function(){return E._declarationOrder},1e4+p]}):void 0,g=new Group({name:this.id+"-series-sub"+this.subGroupId+++"-labels",layer:d,zIndex:Layers.SERIES_LABEL_ZINDEX,zIndexSubOrder:[function(){return E._declarationOrder},p]}),o.appendChild(_),o.appendChild(g),f&&o.appendChild(f),y=c?_:o,m=[],v=0;v<a;v++)m[v]=new Path,m[v].zIndex=Layers.SERIES_LAYER_ZINDEX,m[v].zIndexSubOrder=[function(){return E._declarationOrder},(null!==(e=l[v])&&void 0!==e?e:0)+h],y.appendChild(m[v]);i.push({paths:m,dataNodeGroup:_,markerGroup:f,labelGroup:g,labelSelection:Selection.select(g,Text),datumSelection:Selection.select(_,function(){return E.nodeFactory()}),markerSelection:f?Selection.select(f,function(){return E.markerFactory()}):void 0})}return[2]})})},t.prototype.updateNodes=function(e,t){var r;return __awaiter$d(this,void 0,void 0,function(){var o,i,n,a,s,l,c,u,d,p,h,_,f=this;return __generator$d(this,function(g){switch(g.label){case 0:return i=(o=this).highlightSelection,n=o.highlightLabelSelection,a=o._contextNodeData,s=o.seriesItemEnabled,l=o.opts,c=l.hasMarkers,u=l.renderLayerPerSubSeries,d=this.visible&&(null===(r=this._contextNodeData)||void 0===r?void 0:r.length)>0&&t,this.rootGroup.visible=d,this.contentGroup.visible=d,this.highlightGroup.visible=d&&!!e,p=this.getOpacity(),h=this.subGroups.map(function(e,t){var r=a[t].itemId;return f.getOpacity({itemId:r})}),_=h.some(function(e){return e!==p}),this.contentGroup.opacity=_?1:p,c?[4,this.updateMarkerNodes({markerSelection:i,isHighlight:!0,seriesIdx:-1})]:[3,2];case 1:return g.sent(),[3,4];case 2:return[4,this.updateDatumNodes({datumSelection:i,isHighlight:!0,seriesIdx:-1})];case 3:g.sent(),g.label=4;case 4:return[4,this.updateLabelNodes({labelSelection:n,seriesIdx:-1})];case 5:return g.sent(),[4,Promise.all(this.subGroups.map(function(t,r){return __awaiter$d(f,void 0,void 0,function(){var o,i,n,l,p,f,g,y,m,v,E,C,O,P,S,b;return __generator$d(this,function(D){switch(D.label){case 0:o=t.dataNodeGroup,i=t.markerGroup,n=t.datumSelection,l=t.labelSelection,p=t.markerSelection,f=t.paths,g=t.labelGroup,y=a[r].itemId,m=d&&(null===(b=s.get(y))||void 0===b||b),v=_?h[r]:1,o.opacity=v,o.visible=m,g.visible=m,i&&(i.opacity=v,i.zIndex=o.zIndex>=Layers.SERIES_LAYER_ZINDEX?o.zIndex:o.zIndex+1,i.visible=m),g&&(g.opacity=v);try{for(E=__values$k(f),C=E.next();!C.done;C=E.next())O=C.value,u||(O.opacity=v,O.visible=m)}catch(e){P={error:e}}finally{try{C&&!C.done&&(S=E.return)&&S.call(E)}finally{if(P)throw P.error}}return o.visible?[4,this.updatePathNodes({seriesHighlighted:e,itemId:y,paths:f,seriesIdx:r})]:[2];case 1:return D.sent(),[4,this.updateDatumNodes({datumSelection:n,isHighlight:!1,seriesIdx:r})];case 2:return D.sent(),[4,this.updateLabelNodes({labelSelection:l,seriesIdx:r})];case 3:return D.sent(),c&&p?[4,this.updateMarkerNodes({markerSelection:p,isHighlight:!1,seriesIdx:r})]:[3,5];case 4:D.sent(),D.label=5;case 5:return[2]}})})}))];case 6:return g.sent(),[2]}})})},t.prototype.updateHighlightSelection=function(e){var t;return __awaiter$d(this,void 0,void 0,function(){var r,o,i,n,a,s,l,c,u,d,p,h,_,f,g,y;return __generator$d(this,function(m){switch(m.label){case 0:return o=(r=this).highlightSelection,i=r.highlightLabelSelection,n=r._contextNodeData,a=null===(t=this.highlightManager)||void 0===t?void 0:t.getActiveHighlight(),s=e&&(null==a?void 0:a.datum)?a:void 0,l=this,[4,this.updateHighlightSelectionItem({item:s,highlightSelection:o})];case 1:if(l.highlightSelection=m.sent(),this.isLabelEnabled()&&null!=s){u=s.itemId,d=void 0===u?void 0:u;try{for(p=__values$k(n),h=p.next();!h.done&&(_=h.value.labelData,null==(c=_.find(function(e){return e.datum===s.datum&&e.itemId===d})));h=p.next());}catch(e){g={error:e}}finally{try{h&&!h.done&&(y=p.return)&&y.call(p)}finally{if(g)throw g.error}}}return f=this,[4,this.updateHighlightSelectionLabel({item:c,highlightLabelSelection:i})];case 2:return f.highlightLabelSelection=m.sent(),[2]}})})},t.prototype.pickNodeExactShape=function(t){var r,o,i=e.prototype.pickNodeExactShape.call(this,t);if(i)return i;var n=t.x,a=t.y,s=this.opts.hasMarkers;try{for(var l=__values$k(this.subGroups),c=l.next();!c.done;c=l.next()){var u=c.value,d=u.dataNodeGroup,p=u.markerGroup,h=d.pickNode(n,a);if(!h&&s&&(h=null==p?void 0:p.pickNode(n,a)),h)return{datum:h.datum,distance:0}}}catch(e){r={error:e}}
2finally{try{c&&!c.done&&(o=l.return)&&o.call(l)}finally{if(r)throw r.error}}},t.prototype.pickNodeClosestDatum=function(e){var t,r,o,i,n,a,s,l=e.x,c=e.y,u=this,d=u.xAxis,p=u.yAxis,h=u.rootGroup,_=u._contextNodeData,f=h.transformPoint(l,c),g=1/0;try{for(var y=__values$k(_),m=y.next();!m.done;m=y.next()){var v=m.value;try{for(var E=(o=void 0,__values$k(v.nodeData)),C=E.next();!C.done;C=E.next()){var O,P=C.value,S=P.point,b=void 0===S?{}:S,D=b.x,M=void 0===D?NaN:D,T=b.y,A=void 0===T?NaN:T;isNaN(M)||isNaN(A)||(null==d?void 0:d.inRange(M))&&(null==p?void 0:p.inRange(A))&&(O=Math.max(Math.pow(f.x-M,2)+Math.pow(f.y-A,2),0))<g&&(g=O,s=P)}}catch(e){o={error:e}}finally{try{C&&!C.done&&(i=E.return)&&i.call(E)}finally{if(o)throw o.error}}}}catch(e){t={error:e}}finally{try{m&&!m.done&&(r=y.return)&&r.call(y)}finally{if(t)throw t.error}}if(s)return{datum:s,distance:O=Math.max(Math.sqrt(g)-(null!==(a=null===(n=s.point)||void 0===n?void 0:n.size)&&void 0!==a?a:0),0)}},t.prototype.pickNodeMainAxisFirst=function(e,t){var r,o,i,n,a,s,l=e.x,c=e.y,u=this,d=u.xAxis,p=u.yAxis,h=u.rootGroup,_=u._contextNodeData,f=[d,p].filter(function(e){return e instanceof CategoryAxis}).map(function(e){return e.direction});if(!t||0!==f.length){var g=__read$G(f,1)[0],y=void 0===g?ChartAxisDirection.X:g,m=h.transformPoint(l,c),v=y===ChartAxisDirection.X?[m.x,m.y]:[m.y,m.x],E=[1/0,1/0],C=void 0;try{for(var O=__values$k(_),P=O.next();!P.done;P=O.next()){var S=P.value;try{for(var b=(i=void 0,__values$k(S.nodeData)),D=b.next();!D.done;D=b.next()){var M=D.value,T=M.point,A=void 0===T?{}:T,x=A.x,w=void 0===x?NaN:x,R=A.y,I=void 0===R?NaN:R;if(!isNaN(w)&&!isNaN(I)&&(null==d?void 0:d.inRange(w))&&(null==p?void 0:p.inRange(I))){for(var L=y===ChartAxisDirection.X?[w,I]:[I,w],N=!0,k=0;k<L.length;k++){var B=Math.abs(L[k]-v[k]);if(B>E[k]){N=!1;break}B<E[k]&&(E[k]=B,E.fill(1/0,k+1,E.length))}N&&(C=M)}}}catch(e){i={error:e}}finally{try{D&&!D.done&&(n=b.return)&&n.call(b)}finally{if(i)throw i.error}}}}catch(e){r={error:e}}finally{try{P&&!P.done&&(o=O.return)&&o.call(O)}finally{if(r)throw r.error}}if(C)return{datum:C,distance:Math.max(Math.sqrt(Math.pow(E[0],2)+Math.pow(E[1],2))-(null!==(s=null===(a=C.point)||void 0===a?void 0:a.size)&&void 0!==s?s:0),0)}}},t.prototype.toggleSeriesItem=function(t,r){this.seriesItemEnabled.size>0?(this.seriesItemEnabled.set(t,r),this.nodeDataRefresh=!0):e.prototype.toggleSeriesItem.call(this,t,r)},t.prototype.isEnabled=function(){var t,r;if(this.seriesItemEnabled.size>0){try{for(var o=__values$k(this.seriesItemEnabled),i=o.next();!i.done;i=o.next())if(__read$G(i.value,2)[1])return!0}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return!1}return e.prototype.isEnabled.call(this)},t.prototype.isPathOrSelectionDirty=function(){return!1},t.prototype.getLabelData=function(){return[]},t.prototype.isAnySeriesVisible=function(){var e,t;try{for(var r=__values$k(this.seriesItemEnabled.values()),o=r.next();!o.done;o=r.next())if(o.value)return!0}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return!1},t.prototype.validateXYData=function(e,t,r,o,i,n,a,s){var l;if(void 0===s&&(s=1),"integrated"===(null===(l=this.chart)||void 0===l?void 0:l.mode))return!0;if(!o||!i||0===r.length||this.seriesItemEnabled.size>0&&!this.isAnySeriesVisible())return!0;var c=function(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=0),e.some(t===r?function(e){return isContinuous(e)}:function(e){return c(e,t+1,r)})},u=o.scale instanceof ContinuousScale,d=i.scale instanceof ContinuousScale,p=!0;return u&&!c(n)&&(Logger.warnOnce("the number axis has no numeric data supplied for xKey: ["+e+"]."),p=!1),d&&!c(a,0,s-1)&&(Logger.warnOnce("the number axis has no numeric data supplied for yKey: ["+t+"]."),p=!1),p},t.prototype.updatePaths=function(e){return __awaiter$d(this,void 0,void 0,function(){return __generator$d(this,function(t){return e.paths.forEach(function(e){return e.visible=!1}),[2]})})},t.prototype.updatePathNodes=function(e){return __awaiter$d(this,void 0,void 0,function(){return __generator$d(this,function(e){return[2]})})},t.prototype.updateHighlightSelectionItem=function(e){return __awaiter$d(this,void 0,void 0,function(){var t,r,o,i,n;return __generator$d(this,function(a){return t=this.opts.hasMarkers,r=e.item,o=e.highlightSelection,i=r?[r]:[],t?(n=o,[2,this.updateMarkerSelection({nodeData:i,markerSelection:n,seriesIdx:-1})]):[2,this.updateDatumSelection({nodeData:i,datumSelection:o,seriesIdx:-1})]})})},t.prototype.updateHighlightSelectionLabel=function(e){return __awaiter$d(this,void 0,void 0,function(){var t,r,o;return __generator$d(this,function(i){return t=e.item,r=e.highlightLabelSelection,o=t?[t]:[],[2,this.updateLabelSelection({labelData:o,labelSelection:r,seriesIdx:-1})]})})},t.prototype.updateDatumSelection=function(e){return __awaiter$d(this,void 0,void 0,function(){return __generator$d(this,function(t){return[2,e.datumSelection]})})},t.prototype.updateDatumNodes=function(e){return __awaiter$d(this,void 0,void 0,function(){return __generator$d(this,function(e){return[2]})})},t.prototype.updateMarkerSelection=function(e){return __awaiter$d(this,void 0,void 0,function(){return __generator$d(this,function(t){return[2,e.markerSelection]})})},t.prototype.updateMarkerNodes=function(e){return __awaiter$d(this,void 0,void 0,function(){return __generator$d(this,function(e){return[2]})})},t}
2(Series),CartesianSeriesMarker=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.formatter=void 0,t}return __extends$2f(t,e),__decorate$1x([Validate(OPT_FUNCTION),SceneChangeDetection({redraw:RedrawType.MAJOR})],t.prototype,"formatter",void 0),t}(SeriesMarker);function sleep(e){return new Promise(function(t){setTimeout(function(){return t(void 0)},e)})}var __decorate$1w=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},Overlay=function(){function e(e,t){this.renderer=void 0,this.text=void 0,this.className=e,this.parentElement=t}return e.prototype.show=function(e){var t,r,o=this.element;if(this.element||((o=document.createElement("div")).className=this.className,this.element=o),o.style.position="absolute",o.style.left=e.x+"px",o.style.top=e.y+"px",o.style.width=e.width+"px",o.style.height=e.height+"px",this.renderer)this.element.innerHTML=this.renderer();else{var i=document.createElement("div");i.style.alignItems="center",i.style.boxSizing="border-box",i.style.display="flex",i.style.justifyContent="center",i.style.margin="8px",i.style.height="100%",i.style.font="12px Verdana, sans-serif",i.innerText=null!==(t=this.text)&&void 0!==t?t:"No data to display",o.append(i)}null===(r=this.parentElement)||void 0===r||r.append(o)},e.prototype.hide=function(){var e;null===(e=this.element)||void 0===e||e.remove(),this.element=void 0},__decorate$1w([Validate(OPT_FUNCTION)],e.prototype,"renderer",void 0),__decorate$1w([Validate(OPT_STRING)],e.prototype,"text",void 0),e}(),ChartOverlays=function(e){this.noData=new Overlay("ag-chart-no-data-overlay",e)},__read$F=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},__spread$m=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read$F(arguments[t]));return e},__values$j=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Listeners=function(){function e(){this.registeredListeners={}}return e.prototype.addListener=function(e,t){var r,o=Symbol(e);return this.registeredListeners[e]||(this.registeredListeners[e]=[]),null===(r=this.registeredListeners[e])||void 0===r||r.push({symbol:o,handler:t}),o},e.prototype.dispatch=function(e){for(var t,r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];return(null!==(t=this.registeredListeners[e])&&void 0!==t?t:[]).map(function(e){return e.handler.apply(e,__spread$m(r))})},e.prototype.cancellableDispatch=function(e,t){for(var r,o,i,n=[],a=2;a<arguments.length;a++)n[a-2]=arguments[a];var s=null!==(i=this.registeredListeners[e])&&void 0!==i?i:[],l=[];try{for(var c=__values$j(s),u=c.next();!u.done;u=c.next()){var d=u.value;if(t())break;l.push(d.handler.apply(d,__spread$m(n)))}}catch(e){r={error:e}}finally{try{u&&!u.done&&(o=c.return)&&o.call(c)}finally{if(r)throw r.error}}return l},e.prototype.reduceDispatch=function(e,t){for(var r,o,i,n=[],a=2;a<arguments.length;a++)n[a-2]=arguments[a];var s=null!==(i=this.registeredListeners[e])&&void 0!==i?i:[],l=void 0;try{for(var c=__values$j(s),u=c.next();!u.done;u=c.next()){var d=u.value;l=d.handler.apply(d,__spread$m(n)),n=t.apply(void 0,__spread$m([l],n))}}catch(e){r={error:e}}finally{try{u&&!u.done&&(o=c.return)&&o.call(c)}finally{if(r)throw r.error}}return l},e.prototype.removeListener=function(e){for(var t in this.registeredListeners){var r=this.registeredListeners[t],o=null==r?void 0:r.findIndex(function(t){return t.symbol===e});null!=o&&o>=0&&(null==r||r.splice(o,1)),null!=o&&0===(null==r?void 0:r.length)&&delete this.registeredListeners[t]}},e}(),BaseManager=function(){function e(){this.listeners=new Listeners}return e.prototype.addListener=function(e,t){return this.listeners.addListener(e,t)},e.prototype.removeListener=function(e){this.listeners.removeListener(e)},e}(),__extends$2e=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__assign$B=function(){return __assign$B=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$B.apply(this,arguments)},__awaiter$c=function(e,t,r,o){return new(r||(r=Promise))(function(i,n){function a(e){try{l(o.next(e))}catch(e){n(e)}}function s(e){try{l(o.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})},__generator$c=function(e,t){var r,o,i,n,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return n={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function s(n){return function(s){return function(n){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(i=2&n[0]?o.return:n[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,n[1])).done)return i;switch(o=0,i&&(n=[2&n[0],i.value]),n[0]){case 0:case 1:i=n;break;case 4:return a.label++,{value:n[1],done:!1};case 5:a.label++,o=n[1],n=[0];continue;case 7:n=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==n[0]&&2!==n[0])){a=0;continue}if(3===n[0]&&(!i||n[1]>i[0]&&n[1]<i[3])){a.label=n[1];break}if(6===n[0]&&a.label<i[1]){a.label=i[1],i=n;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(n);break}i[2]&&a.ops.pop(),a.trys.pop();continue}n=t.call(e,a)}catch(e){n=[6,e],o=0}finally{r=i=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,s])}}},__values$i=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);
2if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},WINDOW_EVENT_HANDLERS=["pagehide","mousemove","mouseup","wheel"],EVENT_HANDLERS=["click","dblclick","mousedown","mouseout","mouseenter","touchstart","touchmove","touchend","touchcancel"],CSS="\n.ag-chart-wrapper {\n    touch-action: none;\n}\n",InteractionManager=function(e){function t(r,o){var i,n,a,s;void 0===o&&(o=document);var l=e.call(this)||this;l.eventHandler=function(e){return l.processEvent(e)},l.mouseDown=!1,l.touchDown=!1,l.rootElement=o.body,l.element=r;try{for(var c=__values$i(EVENT_HANDLERS),u=c.next();!u.done;u=c.next())(h=u.value).startsWith("touch")?r.addEventListener(h,l.eventHandler,{passive:!0}):r.addEventListener(h,l.eventHandler)}catch(e){i={error:e}}finally{try{u&&!u.done&&(n=c.return)&&n.call(c)}finally{if(i)throw i.error}}try{for(var d=__values$i(WINDOW_EVENT_HANDLERS),p=d.next();!p.done;p=d.next()){var h=p.value;window.addEventListener(h,l.eventHandler)}}catch(e){a={error:e}}finally{try{p&&!p.done&&(s=d.return)&&s.call(d)}finally{if(a)throw a.error}}if(t.interactionDocuments.indexOf(o)<0){var _=document.createElement("style");_.innerHTML=CSS,document.head.insertBefore(_,document.head.querySelector("style")),t.interactionDocuments.push(o)}return l}return __extends$2e(t,e),t.prototype.destroy=function(){var e,t,r,o;try{for(var i=__values$i(WINDOW_EVENT_HANDLERS),n=i.next();!n.done;n=i.next()){var a=n.value;window.removeEventListener(a,this.eventHandler)}}catch(t){e={error:t}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}try{for(var s=__values$i(EVENT_HANDLERS),l=s.next();!l.done;l=s.next())a=l.value,this.element.removeEventListener(a,this.eventHandler)}catch(e){r={error:e}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}},t.prototype.processEvent=function(e){var t=this.decideInteractionEventTypes(e);t.length>0&&this.dispatchEvent(e,t)},t.prototype.dispatchEvent=function(e,t){return __awaiter$c(this,void 0,void 0,function(){var r,o,i,n,a,s,l,c;return __generator$c(this,function(u){if(null==(r=this.calculateCoordinates(e)))return[2];o=function(t){var o=i.buildEvent(__assign$B(__assign$B({event:e},r),{type:t}));i.listeners.cancellableDispatch(t,function(){return o.consumed},o)},i=this;try{for(n=__values$i(t),a=n.next();!a.done;a=n.next())s=a.value,o(s)}catch(e){l={error:e}}finally{try{a&&!a.done&&(c=n.return)&&c.call(n)}finally{if(l)throw l.error}}return[2]})})},t.prototype.decideInteractionEventTypes=function(e){switch(e.type){case"click":return["click"];case"dblclick":return["dblclick"];case"mousedown":return this.mouseDown=!0,this.dragStartElement=e.target,["drag-start"];case"touchstart":return this.touchDown=!0,this.dragStartElement=e.target,["drag-start"];case"touchmove":case"mousemove":return this.mouseDown||this.touchDown||this.isEventOverElement(e)?this.mouseDown||this.touchDown?["drag"]:["hover"]:[];case"mouseup":return this.mouseDown||this.isEventOverElement(e)?(this.mouseDown=!1,this.dragStartElement=void 0,["drag-end"]):[];case"touchend":return this.touchDown||this.isEventOverElement(e)?(this.touchDown=!1,this.dragStartElement=void 0,["drag-end"]):[];case"mouseout":case"touchcancel":return["leave"];case"mouseenter":var t=e instanceof MouseEvent&&!(1&~e.buttons);return this.mouseDown!==t?(this.mouseDown=t,[t?"drag-start":"drag-end"]):[];case"pagehide":return["page-left"];case"wheel":return["wheel"]}return[]},t.prototype.isEventOverElement=function(e){var t;return e.target===this.element||(null===(t=e.target)||void 0===t?void 0:t.parentElement)===this.element},t.prototype.calculateCoordinates=function(e){var r;if(e instanceof MouseEvent){var o=e.clientX,i=e.clientY,n=e.pageX,a=e.pageY,s=e.offsetX,l=e.offsetY;return this.fixOffsets(e,{clientX:o,clientY:i,pageX:n,pageY:a,offsetX:s,offsetY:l})}if("undefined"!=typeof TouchEvent&&e instanceof TouchEvent){var c=null!==(r=e.touches[0])&&void 0!==r?r:e.changedTouches[0];return o=c.clientX,i=c.clientY,n=c.pageX,a=c.pageY,__assign$B(__assign$B({},t.NULL_COORDS),{clientX:o,clientY:i,pageX:n,pageY:a})}if(e instanceof PageTransitionEvent){if(e.persisted)return;return t.NULL_COORDS}},t.prototype.fixOffsets=function(e,t){var r=function(e){for(var t=0,r=0;e;)t+=e.offsetLeft,r+=e.offsetTop,e=e.offsetParent;return{x:t,y:r}};if(null!=this.dragStartElement&&e.target!==this.dragStartElement){var o=r(this.dragStartElement),i=r(e.target);t.offsetX-=o.x-i.x,t.offsetY-=o.y-i.y}return t},t.prototype.buildEvent=function(e){var t=e.type,r=e.event,o=e.clientX,i=e.clientY,n=e.offsetX,a=e.offsetY,s=e.pageX,l=e.pageY;if(!isNumber$4(n)||!isNumber$4(a)){var c=this.element.getBoundingClientRect();n=o-c.left,a=i-c.top}if(!isNumber$4(s)||!isNumber$4(l)){var u=this.rootElement.getBoundingClientRect();s=o-u.left,l=i-u.top}var d={type:t,offsetX:n,offsetY:a,pageX:s,pageY:l,sourceEvent:r,consumed:!1,consume:function(){return d.consumed=!0}};return d},t.interactionDocuments=[],t.NULL_COORDS={clientX:-1/0,clientY:-1/0,pageX:-1/0,pageY:-1/0,offsetX:-1/0,offsetY:-1/0},t}(BaseManager),__read$E=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},CursorManager=function(){function e(e){this.states={},this.element=e}return e.prototype.updateCursor=function(e,t){delete this.states[e],null!=t&&(this.states[e]={style:t}),this.applyStates()},e.prototype.applyStates=function(){var e="default";
2Object.entries(this.states).reverse().slice(0,1).forEach(function(t){var r=__read$E(t,2);r[0];var o=r[1].style;return e=o}),this.element.style.cursor=e},e}(),__extends$2d=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__read$D=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a};function isEqual$1(e,t){return e===t||(null==e?void 0:e.series)===(null==t?void 0:t.series)&&(null==e?void 0:e.itemId)===(null==t?void 0:t.itemId)&&(null==e?void 0:e.datum)===(null==t?void 0:t.datum)}var HighlightManager=function(e){function t(){var t=e.call(this)||this;return t.states={},t.activeHighlight=void 0,t}return __extends$2d(t,e),t.prototype.updateHighlight=function(e,t){delete this.states[e],null!=t&&(this.states[e]={highlightedDatum:t}),this.applyStates()},t.prototype.getActiveHighlight=function(){return this.activeHighlight},t.prototype.applyStates=function(){var e=this.activeHighlight,t=void 0;if(Object.entries(this.states).reverse().slice(0,1).forEach(function(e){var r=__read$D(e,2);r[0];var o=r[1].highlightedDatum;return t=o}),this.activeHighlight=t,!isEqual$1(e,this.activeHighlight)){var r={type:"highlight-change",previousHighlight:e,currentHighlight:this.activeHighlight};this.listeners.dispatch("highlight-change",r)}},t}(BaseManager),__read$C=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},TooltipManager=function(){function e(e){this.states={},this.tooltip=e}return e.prototype.updateTooltip=function(e,t,r){var o;null==r&&(r=null===(o=this.states[e])||void 0===o?void 0:o.content),delete this.states[e],null!=t&&null!=r&&(this.states[e]={content:r,meta:t}),this.applyStates()},e.prototype.getTooltipMeta=function(e){var t;return null===(t=this.states[e])||void 0===t?void 0:t.meta},e.prototype.applyStates=function(){var e,t=void 0,r=void 0;if(Object.entries(this.states).reverse().slice(0,1).forEach(function(e){var o=__read$C(e,2);o[0];var i=o[1],n=i.content,a=i.meta;t=n,r=a}),void 0===r||void 0===t)return this.appliedState=void 0,void this.tooltip.toggle(!1);if((null===(e=this.appliedState)||void 0===e?void 0:e.content)===t){var o=this.tooltip.isVisible();this.tooltip.show(r,void 0,o)}else this.tooltip.show(r,t);this.appliedState={content:t,meta:r}},e}(),__extends$2c=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__assign$A=function(){return __assign$A=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$A.apply(this,arguments)},__values$h=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},__read$B=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a};function isEqual(e,t){var r,o,i,n,a,s,l,c;return e===t||(null===(r=null==e?void 0:e.x)||void 0===r?void 0:r.min)===(null===(o=null==t?void 0:t.x)||void 0===o?void 0:o.min)&&(null===(i=null==e?void 0:e.x)||void 0===i?void 0:i.max)===(null===(n=null==t?void 0:t.x)||void 0===n?void 0:n.max)&&(null===(a=null==e?void 0:e.y)||void 0===a?void 0:a.max)===(null===(s=null==t?void 0:t.y)||void 0===s?void 0:s.max)&&(null===(l=null==e?void 0:e.y)||void 0===l?void 0:l.min)===(null===(c=null==t?void 0:t.y)||void 0===c?void 0:c.min)}var ZoomManager=function(e){function t(){var t=e.call(this)||this;return t.states={},t.currentZoom=void 0,t}return __extends$2c(t,e),t.prototype.updateZoom=function(e,t){delete this.states[e],null!=t&&(this.states[e]=__assign$A({},t)),this.applyStates()},t.prototype.getZoom=function(){return this.currentZoom},t.prototype.applyStates=function(){var e,t,r=this.currentZoom,o={};try{for(var i=__values$h(Object.entries(this.states)),n=i.next();!n.done;n=i.next()){var a=__read$B(n.value,2),s=(a[0],a[1]),l=s.x,c=s.y;o.x=null!=l?l:o.x,o.y=null!=c?c:o.y}}catch(t){e={error:t}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}if(this.currentZoom=null!=o.x||null!=o.y?o:void 0,!isEqual(r,this.currentZoom)){var u=__assign$A({type:"zoom
2-change"},null!=r?r:{});this.listeners.dispatch("zoom-change",u)}},t}(BaseManager),__assign$z=function(){return __assign$z=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$z.apply(this,arguments)};function isLayoutStage(e){return"layout-complete"!==e}function isLayoutComplete(e){return"layout-complete"===e}var LayoutService=function(){function e(){this.layoutProcessors=new Listeners,this.listeners=new Listeners}return e.prototype.addListener=function(e,t){if(isLayoutStage(e))return this.layoutProcessors.addListener(e,t);if(isLayoutComplete(e))return this.listeners.addListener(e,t);throw new Error("AG Charts - unsupported listener type: "+e)},e.prototype.removeListener=function(e){this.listeners.removeListener(e),this.layoutProcessors.removeListener(e)},e.prototype.dispatchPerformLayout=function(e,t){var r=this.layoutProcessors.reduceDispatch(e,function(e,t){var r=e.shrinkRect;return[__assign$z(__assign$z({},t),{shrinkRect:r})]},t);return null!=r?r:t},e.prototype.dispatchLayoutComplete=function(e){this.listeners.dispatch("layout-complete",e)},e}(),__decorate$1v=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},ChartHighlight=function(){function e(){this.range="tooltip"}return __decorate$1v([Validate(STRING_UNION("tooltip","node"))],e.prototype,"range",void 0),e}(),__extends$2b=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__assign$y=function(){return __assign$y=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$y.apply(this,arguments)},__decorate$1u=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},__awaiter$b=function(e,t,r,o){return new(r||(r=Promise))(function(i,n){function a(e){try{l(o.next(e))}catch(e){n(e)}}function s(e){try{l(o.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})},__generator$b=function(e,t){var r,o,i,n,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return n={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function s(n){return function(s){return function(n){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(i=2&n[0]?o.return:n[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,n[1])).done)return i;switch(o=0,i&&(n=[2&n[0],i.value]),n[0]){case 0:case 1:i=n;break;case 4:return a.label++,{value:n[1],done:!1};case 5:a.label++,o=n[1],n=[0];continue;case 7:n=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==n[0]&&2!==n[0])){a=0;continue}if(3===n[0]&&(!i||n[1]>i[0]&&n[1]<i[3])){a.label=n[1];break}if(6===n[0]&&a.label<i[1]){a.label=i[1],i=n;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(n);break}i[2]&&a.ops.pop(),a.trys.pop();continue}n=t.call(e,a)}catch(e){n=[6,e],o=0}finally{r=i=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,s])}}},__values$g=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);
2if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},__read$A=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},__spread$l=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read$A(arguments[t]));return e},Chart=function(e){function t(t,r,o){var i;void 0===t&&(t=window.document);var n=e.call(this)||this;n.id=createId$1(n),n.processedOptions={},n.userOptions={},n.queuedUserOptions=[],n.seriesRoot=new Group({name:n.id+"-Series-root"}),n.background=new Background(function(){return n.update(ChartUpdateType.SCENE_RENDER)}),n.extraDebugStats={},n._container=void 0,n.data=[],n.padding=new Padding$1(20),n.seriesAreaPadding=new Padding$1(0),n.title=void 0,n.subtitle=void 0,n.footnote=void 0,n.mode="standalone",n._destroyed=!1,n.modules={},n._pendingFactoryUpdates=[],n._performUpdateNoRenderCount=0,n._performUpdateType=ChartUpdateType.NONE,n.seriesToUpdate=new Set,n.performUpdateTrigger=debouncedCallback(function(e){var t=e.count;return __awaiter$b(n,void 0,void 0,function(){var e;return __generator$b(this,function(r){switch(r.label){case 0:if(this._destroyed)return[2];r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.performUpdate(t)];case 2:return r.sent(),[3,4];case 3:return e=r.sent(),this._lastPerformUpdateError=e,Logger.error("update error",e),[3,4];case 4:return[2]}})})}),n._axes=[],n._series=[],n.lastInteractionEvent=void 0,n.pointerScheduler=debouncedAnimationFrame(function(){n.lastInteractionEvent&&n.handlePointer(n.lastInteractionEvent),n.lastInteractionEvent=void 0}),n.onSeriesNodeClick=function(e){var t=__assign$y(__assign$y({},e),{type:"seriesNodeClick"});Object.defineProperty(t,"series",{enumerable:!1,get:function(){return e.series}}),n.fireEvent(t)},n.onSeriesNodeDoubleClick=function(e){var t=__assign$y(__assign$y({},e),{type:"seriesNodeDoubleClick"});n.fireEvent(t)};var a=null==o?void 0:o.scene,s=null!==(i=null==o?void 0:o.element)&&void 0!==i?i:t.createElement("div"),l=null==o?void 0:o.container,c=new Group({name:"root"});c.visible=!1,c.append(n.seriesRoot);var u=n.background;return u.fill="white",c.appendChild(u.node),n.axisGroup=new Group({name:"Axes",layer:!0,zIndex:Layers.AXIS_ZINDEX}),c.appendChild(n.axisGroup),n.element=s,s.classList.add("ag-chart-wrapper"),s.style.position="relative",n.scene=null!=a?a:new Scene({document:t,overrideDevicePixelRatio:r}),n.debug=!1,n.scene.debug.consoleLog=!1,n.scene.root=c,n.scene.container=s,n.autoSize=!0,n.interactionManager=new InteractionManager(s),n.cursorManager=new CursorManager(s),n.highlightManager=new HighlightManager,n.zoomManager=new ZoomManager,n.layoutService=new LayoutService,SizeMonitor.observe(n.element,function(e){var t=e.width,r=e.height;n.autoSize&&(0===t&&0===r||t===n.width&&r===n.height||(n._lastAutoSize=[t,r],n.resize(t,r)))}),n.tooltip=new Tooltip(n.scene.canvas.element,t,t.body),n.tooltipManager=new TooltipManager(n.tooltip),n.legend=new Legend(n,n.interactionManager,n.cursorManager,n.highlightManager,n.tooltipManager),n.overlays=new ChartOverlays(n.element),n.highlight=new ChartHighlight,n.container=l,n.interactionManager.addListener("click",function(e){return n.onClick(e)}),n.interactionManager.addListener("dblclick",function(e){return n.onDoubleClick(e)}),n.interactionManager.addListener("hover",function(e){return n.onMouseMove(e)}),n.interactionManager.addListener("leave",function(){return n.disablePointer()}),n.interactionManager.addListener("page-left",function(){return n.destroy()}),n.zoomManager.addListener("zoom-change",function(e){return n.update(ChartUpdateType.PROCESS_DATA,{forceNodeDataRefresh:!0})}),n.highlightManager.addListener("highlight-change",function(e){return n.changeHighlightDatum(e)}),n}return __extends$2b(t,e),t.prototype.getOptions=function(){var e,t=this.queuedUserOptions;return jsonMerge([null!==(e=t[t.length-1])&&void 0!==e?e:this.userOptions])},Object.defineProperty(t.prototype,"container",{get:function(){return this._container},set:function(e){if(this._container!==e){var t=this.element.parentNode;
2null!=t&&t.removeChild(this.element),e&&!this.destroyed&&e.appendChild(this.element),this._container=e}},enumerable:!1,configurable:!0}),t.prototype.autoSizeChanged=function(e){var t=this.element.style;if(e){if(t.display="block",t.width="100%",t.height="100%",!this._lastAutoSize)return;this.resize(this._lastAutoSize[0],this._lastAutoSize[1])}else t.display="inline-block",t.width="auto",t.height="auto"},t.prototype.download=function(e,t){this.scene.download(e,t)},Object.defineProperty(t.prototype,"destroyed",{get:function(){return this._destroyed},enumerable:!1,configurable:!0}),t.prototype.addModule=function(e){if(null!=this.modules[e.optionsKey])throw new Error("AG Charts - module already initialised: "+e.optionsKey);var t=e.initialiseModule(this.getModuleContext());this.modules[e.optionsKey]=t,this[e.optionsKey]=t.instance},t.prototype.removeModule=function(e){var t,r;null===(r=null===(t=this.modules[e.optionsKey])||void 0===t?void 0:t.instance)||void 0===r||r.destroy(),delete this.modules[e.optionsKey],delete this[e.optionsKey]},t.prototype.isModuleEnabled=function(e){return null!=this.modules[e.optionsKey]},t.prototype.getModuleContext=function(){var e=this;return{scene:e.scene,interactionManager:e.interactionManager,zoomManager:e.zoomManager,cursorManager:e.cursorManager,highlightManager:e.highlightManager,tooltipManager:e.tooltipManager,layoutService:e.layoutService}},t.prototype.destroy=function(e){var t,r;if(!this._destroyed){var o=null==e?void 0:e.keepTransferableResources,i=void 0;this._performUpdateType=ChartUpdateType.NONE,this._pendingFactoryUpdates.splice(0),this.tooltip.destroy(),SizeMonitor.unobserve(this.element);try{for(var n=__values$g(Object.entries(this.modules)),a=n.next();!a.done;a=n.next()){var s=__read$A(a.value,2),l=s[0];s[1].instance.destroy(),delete this.modules[l],delete this[l]}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return this.interactionManager.destroy(),o?(this.scene.strip(),i={container:this.container,scene:this.scene,element:this.element}):(this.scene.destroy(),this.container=void 0),this.series.forEach(function(e){return e.destroy()}),this.series=[],this.axes.forEach(function(e){return e.destroy()}),this.axes=[],this._destroyed=!0,i}},t.prototype.log=function(e){this.debug&&Logger.debug(e)},t.prototype.disablePointer=function(e){void 0===e&&(e=!1),e||this.tooltipManager.updateTooltip(this.id),this.highlightManager.updateHighlight(this.id),this.lastInteractionEvent&&(this.lastInteractionEvent=void 0)},t.prototype.requestFactoryUpdate=function(e){var t=this._pendingFactoryUpdates,r=t.length;0===r?(t.push(e),this._processCallbacks()):t.splice(1,r-1,e)},t.prototype._processCallbacks=function(){return __awaiter$b(this,void 0,void 0,function(){var e,t;return __generator$b(this,function(r){switch(r.label){case 0:e=this._pendingFactoryUpdates,r.label=1;case 1:return e.length>0?this.updatePending?[4,sleep(1)]:[3,3]:[3,7];case 2:return r.sent(),[3,1];case 3:return r.trys.push([3,5,,6]),[4,e[0]()];case 4:return r.sent(),[3,6];case 5:return t=r.sent(),Logger.error("update error",t),[3,6];case 6:return e.shift(),[3,1];case 7:return[2]}})})},Object.defineProperty(t.prototype,"performUpdateType",{get:function(){return this._performUpdateType},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"updatePending",{get:function(){return this._performUpdateType!==ChartUpdateType.NONE||null!=this.lastInteractionEvent},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastPerformUpdateError",{get:function(){return this._lastPerformUpdateError},enumerable:!1,configurable:!0}),t.prototype.awaitUpdateCompletion=function(){return __awaiter$b(this,void 0,void 0,function(){return __generator$b(this,function(e){switch(e.label){case 0:return[4,this.performUpdateTrigger.await()];case 1:return e.sent(),[2]}})})},t.prototype.update=function(e,t){var r,o;void 0===e&&(e=ChartUpdateType.FULL);var i=t||{},n=i.forceNodeDataRefresh,a=void 0!==n&&n,s=i.seriesToUpdate,l=void 0===s?this.series:s;a&&this.series.forEach(function(e){return e.markNodeDataDirty()});try{for(var c=__values$g(l),u=c.next();!u.done;u=c.next()){var d=u.value;this.seriesToUpdate.add(d)}}catch(e){r={error:e}}finally{try{u&&!u.done&&(o=c.return)&&o.call(c)}finally{if(r)throw r.error}}e<this._performUpdateType&&(this._performUpdateType=e,this.performUpdateTrigger.schedule())},t.prototype.performUpdate=function(e){var t;return __awaiter$b(this,void 0,void 0,function(){var r,o,i,n,a,s,l,c;return __generator$b(this,function(u){switch(u.label){case 0:switch(o=(r=this)._performUpdateType,i=r.extraDebugStats,n=[performance.now()],o){case ChartUpdateType.FULL:case ChartUpdateType.PROCESS_DATA:return[3,1];case ChartUpdateType.PERFORM_LAYOUT:return[3,3];case ChartUpdateType.SERIES_UPDATE:return[3,5];case ChartUpdateType.TOOLTIP_RECALCULATION:return[3,7];case ChartUpdateType.SCENE_RENDER:return[3,8];case ChartUpdateType.NONE:return[3,10]}return[3,11];case 1:return[4,this.processData()];case 2:u.sent(),this.disablePointer(!0),n.push(performance.now()),u.label=3;case 3:return this.autoSize&&!this._lastAutoSize&&this._performUpdateNoRenderCount++<5?(this._performUpdateType=ChartUpdateType.PERFORM_LAYOUT,this.performUpdateTrigger.schedule(),[3,11]):(this._performUpdateNoRenderCount=0,this.background.performLayout(this.scene.width,this.scene.height),[4,this.performLayout()]);case 4:u.sent(),this.handleOverlays(),n.push(performance.now()),u.label=5;case 5:return a=this.seriesRect,s=__spread$l(this.seriesToUpdate).map(function(e){return e.update({seriesRect:a})}),this.seriesToUpdate.clear(),[4,Promise.all(s)];case 6:u.sent(),n.push(performance.now()),u.label=7;case 7:l=this.tooltipManager.getTooltipMeta(this.id),o<ChartUpdateType.SERIES_UPDATE&&"hover"===(null===(t=null==l?void 0:l.event)||void 0===t?void 0:t.type)&&this.handlePointer(l.event),u.label=8;case 8:return[4,this.scene.render({debugSplitTimes:n,extraDebugStats:i})];case 9:u.sent(),this.extraDebugStats={},u.label=10;case 10:this._performUpdateType=ChartUpdateType.NONE,u.label=11;case 11:return c=performance.now(),this.log({chart:this,durationMs:Math.round(100*(c-n[0]))/100,count:e,performUpdateType:ChartUpdateType[o]}),[2]}})})},Object.defineProperty(t.prototype,"axes",{get:function(){return this._axes},set:function(e){var t=this,r=new Set;
2this._axes.forEach(function(e){e.detachAxis(t.axisGroup),r.add(e)}),this._axes=e.filter(function(e){return!e.linkedTo}).concat(e.filter(function(e){return e.linkedTo})),this._axes.forEach(function(e){e.attachAxis(t.axisGroup),r.delete(e)}),r.forEach(function(e){return e.destroy()})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"series",{get:function(){return this._series},set:function(e){var t=this;this.removeAllSeries(),e.forEach(function(e){return t.addSeries(e)})},enumerable:!1,configurable:!0}),t.prototype.addSeries=function(e,t){var r=this.series,o=this.seriesRoot;if(r.indexOf(e)<0){var i=t?r.indexOf(t):-1;return i>=0?(r.splice(i,0,e),o.insertBefore(e.rootGroup,t.rootGroup)):(r.push(e),o.append(e.rootGroup)),this.initSeries(e),!0}return!1},t.prototype.initSeries=function(e){e.chart=this,e.highlightManager=this.highlightManager,e.data||(e.data=this.data),this.hasEventListener("seriesNodeClick")&&e.addEventListener("nodeClick",this.onSeriesNodeClick),this.hasEventListener("seriesNodeDoubleClick")&&e.addEventListener("nodeDoubleClick",this.onSeriesNodeDoubleClick)},t.prototype.freeSeries=function(e){e.chart=void 0,e.removeEventListener("nodeClick",this.onSeriesNodeClick),e.removeEventListener("nodeDoubleClick",this.onSeriesNodeDoubleClick)},t.prototype.removeAllSeries=function(){var e=this;this.series.forEach(function(t){e.freeSeries(t),e.seriesRoot.removeChild(t.rootGroup)}),this._series=[]},t.prototype.assignSeriesToAxes=function(){var e=this;this.axes.forEach(function(t){t.boundSeries=e.series.filter(function(e){return(t.direction===ChartAxisDirection.X?e.xAxis:e.yAxis)===t})})},t.prototype.assignAxesToSeries=function(e){var t=this;void 0===e&&(e=!1);var r={};this.axes.forEach(function(e){var t=e.direction;(r[t]||(r[t]=[])).push(e)}),this.series.forEach(function(o){o.directions.forEach(function(i){if(!(i===ChartAxisDirection.X?o.xAxis:o.yAxis)||e){var n=r[i];if(n){var a=o.getKeys(i),s=t.findMatchingAxis(n,o.getKeys(i));s?i===ChartAxisDirection.X?o.xAxis=s:o.yAxis=s:Logger.warn("no matching axis for direction ["+i+"] and keys ["+a+"]; check series and axes configuration.")}else Logger.warn("no available axis for direction ["+i+"]; check series and axes configuration.")}})})},t.prototype.findMatchingAxis=function(e,t){var r,o,i,n;try{for(var a=__values$g(e),s=a.next();!s.done;s=a.next()){var l=s.value,c=l.keys;if(!c.length)return l;if(t)try{for(var u=(i=void 0,__values$g(t)),d=u.next();!d.done;d=u.next()){var p=d.value;if(c.indexOf(p)>=0)return l}}catch(e){i={error:e}}finally{try{d&&!d.done&&(n=u.return)&&n.call(u)}finally{if(i)throw i.error}}}}catch(e){r={error:e}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}},t.prototype.resize=function(e,t){e&&t&&Number.isFinite(e)&&Number.isFinite(t)&&this.scene.resize(e,t)&&(this.disablePointer(),this.update(ChartUpdateType.PERFORM_LAYOUT,{forceNodeDataRefresh:!0}))},t.prototype.processData=function(){return __awaiter$b(this,void 0,void 0,function(){return __generator$b(this,function(e){switch(e.label){case 0:return(this.axes.length>0||this.series.some(function(e){return e instanceof CartesianSeries}))&&(this.assignAxesToSeries(!0),this.assignSeriesToAxes()),[4,Promise.all(this.series.map(function(e){return e.processData()}))];case 1:return e.sent(),[4,this.updateLegend()];case 2:return e.sent(),[2]}})})},t.prototype.placeLabels=function(){var e,t,r=[],o=[];try{for(var i=__values$g(this.series),n=i.next();!n.done;n=i.next()){var a=n.value;if(a.visible){var s=a.getLabelData();s&&isPointLabelDatum(s[0])&&(o.push(s),r.push(a))}}}catch(t){e={error:t}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}var l=this.seriesRect,c=l&&o.length>0?placeLabels(o,{x:0,y:0,width:l.width,height:l.height}):[];return new Map(c.map(function(e,t){return[r[t],e]}))},t.prototype.updateLegend=function(){return __awaiter$b(this,void 0,void 0,function(){var e,t;return __generator$b(this,function(r){return e=[],this.series.filter(function(e){return e.showInLegend}).forEach(function(t){e.push.apply(e,__spread$l(t.getLegendData()))}),(t=this.legend.item.label.formatter)&&e.forEach(function(e){return e.label.text=t({get id(){return Logger.w
2arnOnce("LegendLabelFormatterParams.id is deprecated, use seriesId instead"),e.seriesId},itemId:e.itemId,value:e.label.text,seriesId:e.seriesId})}),this.legend.data=e,[2]})})},t.prototype.positionCaptions=function(e){var t=this,r=t.title,o=t.subtitle,i=t.footnote,n=e.clone(),a=function(e){var t,r=n.y;e.node.x=n.x+n.width/2,e.node.y=r,e.node.textBaseline="top";var o=e.node.computeBBox(),i=Math.ceil(o.y-r+o.height+(null!==(t=e.spacing)&&void 0!==t?t:0));n.shrink(i,"top")};return r&&(r.node.visible=r.enabled,r.node.visible&&a(r)),o&&(o.node.visible=void 0!==r&&r.enabled&&o.enabled,o.node.visible&&a(o)),i&&(i.node.visible=i.enabled,i.node.visible&&function(e){var t,r=n.y+n.height;e.node.x=n.x+n.width/2,e.node.y=r,e.node.textBaseline="bottom";var o=e.node.computeBBox(),i=Math.ceil(r-o.y+(null!==(t=e.spacing)&&void 0!==t?t:0));n.shrink(i,"bottom")}(i)),n},t.prototype.positionLegend=function(e){var t=this.legend,r=e.clone();if(!t.enabled||!t.data.length)return r;var o=__read$A(this.calculateLegendDimensions(e),2),i=o[0],n=o[1],a=0,s=0;t.translationX=0,t.translationY=0,t.performLayout(i,n);var l=t.computePagedBBox(),c=function(){switch(t.position){case"top":case"left":return 0;case"bottom":return e.height-l.height;default:return e.width-l.width}};if(t.visible){switch(t.position){case"top":case"bottom":a=(e.width-l.width)/2,s=c(),r.shrink(l.height,t.position);break;default:a=c(),s=(e.height-l.height)/2,r.shrink(l.width,t.position)}t.translationX=Math.floor(-l.x+e.x+a),t.translationY=Math.floor(-l.y+e.y+s)}return r},t.prototype.calculateLegendDimensions=function(e){var t=this.legend,r=e.width,o=e.height,i=r/o,n=0,a=0;switch(t.position){case"top":case"bottom":var s=i<1?Math.min(.5,1/i*.2):.2;n=t.maxWidth?Math.min(t.maxWidth,r):r,a=t.maxHeight?Math.min(t.maxHeight,o):Math.round(o*s);break;default:var l=i>1?Math.min(.5,.25*i):.25;n=t.maxWidth?Math.min(t.maxWidth,r):Math.round(r*l),a=t.maxHeight?Math.min(t.maxHeight,o):o}return[n,a]},t.prototype.getSeriesRect=function(){return this.seriesRect},t.prototype.pickSeriesNode=function(e,t,r){var o,i,n,a,s=performance.now(),l=t?[SeriesNodePickMode.EXACT_SHAPE_MATCH]:void 0,c=__spread$l(this.series).reverse(),u=void 0;try{for(var d=__values$g(c),p=d.next();!p.done;p=d.next()){var h=p.value;if(h.visible&&h.rootGroup.visible){var _=null!==(n=h.pickNode(e,l))&&void 0!==n?n:{},f=_.match,g=_.distance;if(f&&null!=g&&((!u||u.distance>g)&&g<=(null!=r?r:1/0)&&(u={series:h,distance:g,datum:f}),0===g))break}}}catch(e){o={error:e}}finally{try{p&&!p.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}return this.extraDebugStats.pickSeriesNode=Math.round((null!==(a=this.extraDebugStats.pickSeriesNode)&&void 0!==a?a:0)+(performance.now()-s)),u},t.prototype.onMouseMove=function(e){this.lastInteractionEvent=e,this.pointerScheduler.schedule(),this.extraDebugStats.mouseX=e.offsetX,this.extraDebugStats.mouseY=e.offsetY,this.update(ChartUpdateType.SCENE_RENDER)},t.prototype.handlePointer=function(e){var t,r=this,o=this.lastPick,i=e.offsetX,n=e.offsetY,a=function(e){void 0===e&&(e=!1),o&&r.disablePointer(e)},s=null===(t=this.seriesRect)||void 0===t?void 0:t.clone().grow(20).grow(this.seriesAreaPadding);(null==s?void 0:s.containsPoint(i,n))?(this.handlePointerTooltip(e,a),this.handlePointerNodeCursor(e)):a()},t.prototype.handlePointerTooltip=function(e,t){var r,o=this.lastPick,i=this.tooltip.range,n=e.pageX,a=e.pageY,s=e.offsetX,l=e.offsetY;"number"==typeof i&&Number.isFinite(i)&&(r=i);var c=this.pickSeriesNode({x:s,y:l},"exact"===i,r);if(!c)return this.tooltipManager.updateTooltip(this.id),void("tooltip"===this.highlight.range&&t(!0));var u,d="node"===this.highlight.range||!o||o.datum!==c.datum;d?(u=c.series.getTooltipHtml(c.datum),"tooltip"===this.highlight.range&&this.highlightManager.updateHighlight(this.id,c.datum)):o&&(o.event=e.sourceEvent);var p=null!=r,h=this.tooltip.enabled&&c.series.tooltip.enabled,_="exact"===i&&0===c.distance,f=h&&("nearest"===i||p||_)&&(!d||void 0!==u),g=this.mergePointerDatum({pageX:n,pageY:a,offsetX:s,offsetY:l,event:e},c.datum);f&&this.tooltipManager.updateTooltip(this.id,g,u)},t.prototype.handlePointerNodeCursor=function(e){var t=this;this.checkSeriesNodeRange(e,function(e,r){(e.hasEventListener("nodeClick")||e.hasEventListener("nodeDoubleClick"))&&(t.cursorManager.updateCursor("chart","pointer"),"node"===t.highlight.range&&t.highlightManager.updateHighlight(t.id,r))})||(this.cursorManager.updateCursor("chart"),"node"===this.highlight.range&&this.highlightManager.updateHighlight(this.id
2))},t.prototype.onClick=function(e){this.checkSeriesNodeClick(e)?this.update(ChartUpdateType.SERIES_UPDATE):this.fireEvent({type:"click",event:e.sourceEvent})},t.prototype.onDoubleClick=function(e){this.checkSeriesNodeDoubleClick(e)?this.update(ChartUpdateType.SERIES_UPDATE):this.fireEvent({type:"doubleClick",event:e.sourceEvent})},t.prototype.checkSeriesNodeClick=function(e){return this.checkSeriesNodeRange(e,function(t,r){return t.fireNodeClickEvent(e.sourceEvent,r)})},t.prototype.checkSeriesNodeDoubleClick=function(e){return this.checkSeriesNodeRange(e,function(t,r){return t.fireNodeDoubleClickEvent(e.sourceEvent,r)})},t.prototype.checkSeriesNodeRange=function(e,t){var r,o="nearest"===this.tooltip.range&&void 0!==this.lastPick?this.lastPick:this.pickSeriesNode({x:e.offsetX,y:e.offsetY},!1),i=null==o?void 0:o.datum,n=null==i?void 0:i.series.nodeClickRange;if(i&&"nearest"===n)return t(i.series,i),!0;"number"==typeof n&&Number.isFinite(n)&&(r=n);var a=this.pickSeriesNode({x:e.offsetX,y:e.offsetY},"exact"===n,r);if(!a)return!1;var s=null!=r,l="exact"===n&&0===a.distance;return!(!s&&!l||(t(a.series,a.datum),0))},t.prototype.mergePointerDatum=function(e,t){if(t.point){var r=t.point,o=r.x,i=r.y,n=this.scene.canvas,a=t.series.rootGroup.inverseTransformPoint(o,i),s=n.element.getBoundingClientRect();return __assign$y(__assign$y({},e),{pageX:Math.round(s.left+window.scrollX+a.x),pageY:Math.round(s.top+window.scrollY+a.y),offsetX:Math.round(a.x),offsetY:Math.round(a.y)})}return e},t.prototype.changeHighlightDatum=function(e){var t=new Set,r=e.currentHighlight||{},o=r.series,i=void 0===o?void 0:o,n=r.datum,a=e.previousHighlight||{},s=a.series,l=void 0===s?void 0:s,c=a.datum;l&&t.add(l),i&&t.add(i),(null==l?void 0:l.cursor)&&c&&this.cursorManager.updateCursor(l.id),(null==i?void 0:i.cursor)&&n&&this.cursorManager.updateCursor(i.id,i.cursor),this.lastPick=e.currentHighlight?{datum:e.currentHighlight}:void 0,null==i||null==l?this.update(ChartUpdateType.SERIES_UPDATE):this.update(ChartUpdateType.SERIES_UPDATE,{seriesToUpdate:t})},t.prototype.waitForUpdate=function(e){return void 0===e&&(e=5e3),__awaiter$b(this,void 0,void 0,function(){var t;return __generator$b(this,function(r){switch(r.label){case 0:t=performance.now(),r.label=1;case 1:if(!(this._pendingFactoryUpdates.length>0||this.updatePending))return[3,3];if(performance.now()-t>e)throw new Error("waitForUpdate() timeout reached.");return[4,sleep(5)];case 2:return r.sent(),[3,1];case 3:return[4,this.awaitUpdateCompletion()];case 4:return r.sent(),[2]}})})},t.prototype.handleOverlays=function(){this.handleNoDataOverlay()},t.prototype.handleNoDataOverlay=function(){var e=!this.series.some(function(e){return e.hasData()}),t=this.getSeriesRect();e&&t?this.overlays.noData.show(t):this.overlays.noData.hide()},__decorate$1u([ActionOnSet({newValue:function(e){this.scene.debug.consoleLog=e}})],t.prototype,"debug",void 0),__decorate$1u([ActionOnSet({newValue:function(e){var t;null===(t=this.series)||void 0===t||t.forEach(function(t){return t.data=e})}})],t.prototype,"data",void 0),__decorate$1u([ActionOnSet({newValue:function(e){this.autoSize=!1,this.resize(e,this.height)}})],t.prototype,"width",void 0),__decorate$1u([ActionOnSet({newValue:function(e){this.autoSize=!1,this.resize(this.width,e)}})],t.prototype,"height",void 0),__decorate$1u([ActionOnSet({changeValue:function(e){this.autoSizeChanged(e)}}),Validate(BOOLEAN)],t.prototype,"autoSize",void 0),__decorate$1u([ActionOnSet({newValue:function(e){var t;null===(t=this.scene.root)||void 0===t||t.appendChild(e.node)},oldValue:function(e){var t;null===(t=this.scene.root)||void 0===t||t.removeChild(e.node)}})],t.prototype,"title",void 0),__decorate$1u([ActionOnSet({newValue:function(e){var t;null===(t=this.scene.root)||void 0===t||t.appendChild(e.node)},oldValue:function(e){var t;null===(t=this.scene.root)||void 0===t||t.removeChild(e.node)}})],t.prototype,"subtitle",void 0),__decorate$1u([ActionOnSet({newValue:function(e){var t;null===(t=this.scene.root)||void 0===t||t.appendChild(e.node)},oldValue:function(e){var t;null===(t=this.scene.root)||void 0===t||t.removeChild(e.node)}})],t.prototype,"footnote",void 0),__decorate$1u([Validate(STRING_UNION("standalone","integrated"))],t.prototype,"mode",void 0),t}(Observable),TreeNode=function(){function e(e,t,r){void 0===e&&(e=""),void 0===r&&(r=0),this.x=0,this.y=0,this.subtreeLeft=NaN,this.subtreeRight=NaN,this.screenX=0,this.screenY=0,this.children=[],this.leafCount=0,this.prelim=0,this.mod=0,this.ancestor=this,this.change=0,this.shift=0,this.label=e,this.parent=t,this.depth=t?t.depth+1:0,this.number=r}return e.prototype.getLeftSibling=function(){return this.number>0&&this.parent?this.parent.children[this.number-1]:void 0},e.prototype.getLeftmostSibling=function(){return this.number>0&&this.parent?this.parent.children[0]:void 0},e.prototype.nextLeft=function(){return this.children?this.children[0]:this.thread},e.prototype.nextRight=function(){return this.children?this.children[this.children.length-1]:this.thread},e.prototype.getSiblings=function(){var e=this;return this.parent?this.parent.children.filter(function(t,r){return r!==e.number}):[]},e}();function ticksToTree(e,t){void 0===t&&(t=!0);var r=new TreeNode,o=0;return t&&e.forEach(function(e){return o=Math.max(o,e.labels.length)}),e.forEach(function(e){if(t)for(;e.labels.length<o;)e.labels.unshift("");insertTick(r,e)}),r}function insertTick(e,t){var r=t.labels.slice().reverse(),o=r.length-1;r.forEach(function(t,r){var i=e.children,n=i.find(function(e){return e.label===t}),a=r!==o;if(n&&a)e=n;else{var s=new TreeNode(t,e);s.number=i.length,i.push(s),a&&(e=s)}})}function moveSubtree(e,t,r){var o=r/(t.number-e.number);t.change-=o,t.shift+=r,e.change+=o,t.prelim+=r,t.mod+=r}function ancestor(e,t,r){return t.getSiblings().indexOf(e.ancestor)>=0?e.ancestor:r}function executeShifts(e){var t=e.children;if(t)for(var r=0,o=0,i=t.length-1;i>=0;i--){var n=t[i];n.prelim+=r,n.mod+=r,o+=n.change,r+=n.shift+o}}function apportion(e,t,r){var o=e.getLeftSibling();if(o){for(var i=e,n=e,a=o,s=n.getLeftmostSibling(),l=n.mod,c=i.mod,u=a.mod,d=s.mod;a.nextRight()&&n.nextLeft();){a=a.nextRight(),n=n.nextLeft(),s=s.nextLeft(),(i=i.nextRight()).ancestor=e;var p=a.prelim+u-(n.prelim+l)+r;p>
20&&(moveSubtree(ancestor(a,e,t),e,p),l+=p,c+=p),u+=a.mod,l+=n.mod,d+=s.mod,c+=i.mod}a.nextRight()&&!i.nextRight()?(i.thread=a.nextRight(),i.mod+=u-c):(n.nextLeft()&&!s.nextLeft()&&(s.thread=n.nextLeft(),s.mod+=l-d),t=e)}return t}function firstWalk(e,t){var r=e.children;if(r.length){var o=r[0];r.forEach(function(e){firstWalk(e,t),o=apportion(e,o,t)}),executeShifts(e);var i=(r[0].prelim+r[r.length-1].prelim)/2;(n=e.getLeftSibling())?(e.prelim=n.prelim+t,e.mod=e.prelim-i):e.prelim=i}else{var n=e.getLeftSibling();e.prelim=n?n.prelim+t:0}}var Dimensions=function(){function e(){this.top=1/0,this.right=-1/0,this.bottom=-1/0,this.left=1/0}return e.prototype.update=function(e,t){var r=t(e),o=r.x,i=r.y;o>this.right&&(this.right=o),o<this.left&&(this.left=o),i>this.bottom&&(this.bottom=i),i<this.top&&(this.top=i)},e}();function secondWalk(e,t,r){e.x=e.prelim+t,e.y=e.depth,r.update(e),e.children.forEach(function(o){return secondWalk(o,t+e.mod,r)})}function thirdWalk(e){var t=e.children,r=0;t.forEach(function(e){thirdWalk(e),e.children.length?r+=e.leafCount:r++}),e.leafCount=r,t.length?(e.subtreeLeft=t[0].subtreeLeft,e.subtreeRight=t[e.children.length-1].subtreeRight,e.x=(e.subtreeLeft+e.subtreeRight)/2):(e.subtreeLeft=e.x,e.subtreeRight=e.x)}function treeLayout(e){var t=new TreeLayout;return firstWalk(e,1),secondWalk(e,-e.prelim,t),thirdWalk(e),t}var TreeLayout=function(){function e(){this.dimensions=new Dimensions,this.leafCount=0,this.nodes=[],this.leafNodes=[],this.nonLeafNodes=[],this.depth=0}return e.prototype.update=function(e){this.dimensions.update(e,function(e){return{x:e.x,y:e.y}}),e.children.length?this.nonLeafNodes.push(e):(this.leafCount++,this.leafNodes.push(e)),e.depth>this.depth&&(this.depth=e.depth),this.nodes.push(e)},e.prototype.resize=function(e,t,r,o,i){void 0===r&&(r=0),void 0===o&&(o=0),void 0===i&&(i=!1);var n=this.leafCount-1,a=this.depth,s=this.dimensions,l=1,c=1;if(e>0&&n){var u=(s.right-s.left)/n;l=e/n/u,i&&(l=-l)}if(t>0&&a){var d=(s.bottom-s.top)/a;c=t/a/d}var p=new Dimensions;this.nodes.forEach(function(e){e.screenX=e.x*l,e.screenY=e.y*c,p.update(e,function(e){return{x:e.screenX,y:e.screenY}})});var h=-p.left,_=-p.top;this.nodes.forEach(function(e){e.screenX+=h+r,e.screenY+=_+o})},e}(),__extends$2a=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$1t=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},__read$z=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},__spread$k=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read$z(arguments[t]));return e},GroupedCategoryAxisLabel=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.grid=!1,t}return __extends$2a(t,e),__decorate$1t([Validate(BOOLEAN)],t.prototype,"grid",void 0),t}(AxisLabel),GroupedCategoryAxis=function(e){function t(t){var r=e.call(this,t,new BandScale$5)||this;r.tickScale=new BandScale$5,r.translation={x:0,y:0},r.line=new AxisLine,r.label=new GroupedCategoryAxisLabel,r.labelColor="rgba(87, 87, 87, 1)",r.includeInvisibleDomains=!0;var o=r,i=o.tickLineGroup,n=o.tickLabelGroup,a=o.gridLineGroup,s=o.tickScale,l=o.scale;return l.paddingOuter=.1,l.paddingInner=2*l.paddingOuter,r.requestedRange=l.range.slice(),r.refreshScale(),s.paddingInner=1,s.paddingOuter=0,r.gridLineSelection=Selection.select(a,Line),r.axisLineSelection=Selection.select(i,Line),r.separatorSelection=Selection.select(i,Line),r.labelSelection=Selection.select(n,Text),r}return __extends$2a(t,e),Object.defineProperty(t.prototype,"range",{get:function(){return this.requestedRange.slice()},set:function(e){this.requestedRange=e.slice(),this.updateRange()}
2,enumerable:!1,configurable:!0}),t.prototype.updateRange=function(){var e=this,t=e.requestedRange,r=e.visibleRange,o=e.scale,i=(t[1]-t[0])/(r[1]-r[0]),n=i*r[0],a=t[0]-n;this.tickScale.range=o.range=[a,a+i],this.resizeTickTree()},t.prototype.resizeTickTree=function(){var e=this.scale,t=e.domain.length?[e.convert(e.domain[0]),e.convert(e.domain[e.domain.length-1])]:e.range,r=this.tickTreeLayout,o=this.lineHeight;r&&r.resize(Math.abs(t[1]-t[0]),r.depth*o,(Math.min(t[0],t[1])||0)+(e.bandwidth||0)/2,-r.depth*o,t[1]-t[0]<0)},Object.defineProperty(t.prototype,"lineHeight",{get:function(){return 1.5*this.label.fontSize},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"gridLength",{get:function(){return this._gridLength},set:function(e){(this._gridLength&&!e||!this._gridLength&&e)&&(this.gridLineSelection.clear(),this.labelSelection.clear()),this._gridLength=e},enumerable:!1,configurable:!0}),t.prototype.calculateDomain=function(){var e,t=this.direction,r=this.boundSeries,o=[],i=void 0;r.filter(function(e){return e.visible}
2).forEach(function(e){if(t===ChartAxisDirection.X)if(void 0===i){var r=e.getDomain(t);o.push(r),i="number"==typeof r[0]}else i&&o.push(e.getDomain(t));else o.push(e.getDomain(t))});var n=(e=new Array).concat.apply(e,__spread$k(o)),a=extent$4(n)||n;this.dataDomain=this.normaliseDataDomain(a)},t.prototype.normaliseDataDomain=function(e){var t=e.filter(function(e,t,r){return r.indexOf(e)===t}),r=ticksToTree(t);this.tickTreeLayout=treeLayout(r);var o=t.slice();return o.push(""),this.tickScale.domain=o,this.resizeTickTree(),t},t.prototype.update=function(e){var t=this;this.calculateDomain();var r=this,o=r.scale,i=r.label,n=r.label.parallel,a=r.tickScale,s=r.requestedRange;o.domain=this.dataDomain;var l=o.range[0],c=o.range[1],u=Math.abs(c-l)/o.domain.length||0,d=toRadians$1(this.rotation),p=Math.abs(Math.cos(d))<1e-8;this.updatePosition();var h=this.title;h&&(h.node.visible=!1);var _=this.lineHeight,f=this.tickTreeLayout,g=o.ticks(),y=f?f.nodes:[],m=!!f&&f.depth>1,v=a.ticks(),E=i.mirrored?1:-1,C=calculateLabelRotation({rotation:i.rotation,parallel:n,regularFlipRotation:normalizeAngle360(d-Math.PI/2),parallelFlipRotation:normalizeAngle360(d)}),O=C.autoRotation,P=C.labelRotation,S=C.parallelFlipFlag,b=this.gridLineSelection.update(this.gridLength?v:[]),D=this.labelSelection.update(y),M=i.formatter,T=new Map,A=0;D.each(function(e,t,r){e.fontStyle=i.fontStyle,e.fontWeight=i.fontWeight,e.fontSize=i.fontSize,e.fontFamily=i.fontFamily,e.fill=i.color,e.textBaseline=-1===S?"bottom":"hanging",e.textAlign="center",e.translationX=t.screenY-.25*i.fontSize,e.translationY=t.screenX,0===r?h&&h.enabled&&g.length>0?(e.visible=!0,e.text=h.text,e.fontSize=h.fontSize,e.fontStyle=h.fontStyle,e.fontWeight=h.fontWeight,e.fontFamily=h.fontFamily,e.textBaseline="hanging"):e.visible=!1:(e.text=M?M({value:String(t.label),index:r}):String(t.label),e.visible=t.screenX>=s[0]&&t.screenX<=s[1]);var o=e.computeBBox();T.set(e.id,o),o.width>A&&(A=o.width)});var x=E*i.padding,w=this.label.grid,R=[];D.each(function(e,r,o){if(e.x=x,e.rotationCenterX=x,r.children.length){e.translationX-=A-_+t.label.padding;var i=r.leafCount*u;(n=T.get(e.id))&&n.width>i?e.visible=!1:e.rotation=p?O:-Math.PI/2}else{var n;e.rotation=P,e.textAlign="end",e.textBaseline="middle",(n=T.get(e.id))&&n.height>u&&(e.visible=!1)}if(r.parent&&m){var a=r.children.length?r.screenX-r.leafCount*u/2:r.screenX-u/2;if(r.children.length){var s=-A-2*t.label.padding+r.screenY;R.push({y:a,x1:s+_,x2:s,toString:function(){return String(o)}})}else(r.number!==r.children.length-1||w)&&R.push({y:a,x1:0,x2:-A-2*t.label.padding,toString:function(){return String(o)}})}});var I=0;R.forEach(function(e){return I=Math.min(I,e.x2)}),R.push({y:Math.max(l,c),x1:0,x2:I,toString:function(){return String(R.length)}}),this.separatorSelection.update(R).each(function(e,r){e.x1=r.x1,e.x2=r.x2,e.y1=r.y,e.y2=r.y,e.visible=r.y>=s[0]-1e-7&&r.y<=s[1]+1e-7,e.stroke=t.tick.color,e.fill=void 0,e.strokeWidth=1}),this.gridLineSelection=b,this.labelSelection=D;for(var L=f?f.depth+1:1,N=[],k=0;k<L;k++)N.push(k);if(this.axisLineSelection.update(N).each(function(e,r,o){var i=o>0?-A-2*t.label.padding-(o-1)*_:0;e.x1=i,e.x2=i,e.y1=s[0],e.y2=s[1],e.strokeWidth=t.line.width,e.stroke=t.line.color,e.visible=g.length>0&&(0===o||w&&m)}),this.gridLength){var B=this.gridStyle,F=B.length;b.each(function(e,r,o){var i=Math.round(a.convert(r));e.x1=0,e.x2=-E*t.gridLength,e.y1=i,e.y2=i,e.visible=i>=s[0]&&i<=s[1];var n=B[o%F];e.stroke=n.stroke,e.strokeWidth=t.tick.width,e.lineDash=n.lineDash,e.fill=void 0})}return e},t.className="GroupedCategoryAxis",t.type="groupedCategory",__decorate$1t([Validate(OPT_COLOR_STRING)],t.prototype,"labelColor",void 0),t}(ChartAxis),__extends$29=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__assign$x=function(){return __assign$x=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$x.apply(this,arguments)},__awaiter$a=function(e,t,r,o){return new(r||(r=Promise))(function(i,n){function a(e){try{l(o.next(e))}catch(e){n(e)}}function s(e){try{l(o.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})},__generator$a=function(e,t){var r,o,i,n,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return n={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function s(n){return function(s){return function(n){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(i=2&n[0]?o.return:n[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,n[1])).done)return i;switch(o=0,i&&(n=[2&n[0],i.value]),n[0]){case 0:case 1:i=n;break;case 4:return a.label++,{value:n[1],done:!1};case 5:a.label++,o=n[1],n=[0];continue;case 7:n=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==n[0]&&2!==n[0])){a=0;continue}if(3===n[0]&&(!i||n[1]>i[0]&&n[1]<i[3])){a.label=n[1];break}if(6===n[0]&&a.label<i[1]){a.label=i[1],i=n;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(n);break}i[2]&&a.ops.pop(),a.trys.pop();continue}n=t.call(e,a)}catch(e){n=[6,e],o=0}finally{r=i=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,s])}}},__values$f=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);
2if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},__read$y=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},directions=["top","right","bottom","left"],CartesianChart=function(e){function t(t,r,o){void 0===t&&(t=window.document);var i=e.call(this,t,r,o)||this;i.paired=!0,i._lastAxisWidths={top:0,bottom:0,left:0,right:0},i._lastVisibility={crossLines:!0,series:!0};var n=i.scene.root;return i.legend.attachLegend(n),i}return __extends$29(t,e),t.prototype.performLayout=function(){return __awaiter$a(this,void 0,void 0,function(){var e,t,r,o,i,n,a,s,l,c,u,d,p,h,_,f,g,y,m;return __generator$a(this,function(v){return this.scene.root.visible=!0,t=(e=this).legend,r=e.padding,o=e.scene,i=o.width,n=o.height,(a=new BBox(0,0,i,n)).x+=r.left,a.y+=r.top,a.width-=r.left+r.right,a.height-=r.top+r.bottom,a=this.positionCaptions(a),a=this.positionLegend(a),t.visible&&t.enabled&&t.data.length&&(s=t.spacing,a.shrink(s,t.position)),a=this.layoutService.dispatchPerformLayout("before-series",{shrinkRect:a}).shrinkRect,l=this.updateAxes(a),c=l.seriesRect,u=l.visibility,d=l.clipSeries,this.seriesRoot.visible=u.series,this.seriesRect=c,this.series.forEach(function(e){e.rootGroup.translationX=Math.floor(c.x),e.rootGroup.translationY=Math.floor(c.y)}),this.layoutService.dispatchLayoutComplete({type:"layout-complete",series:{rect:c,visible:u.series},axes:this.axes.map(function(e){return __assign$x({id:e.id},e.getLayoutState())})}),h=(p=this).seriesRoot,_=p.seriesAreaPadding,d?(f=c.x-_.left,g=c.y-_.top,y=_.left+c.width+_.right,m=_.top+c.height+_.bottom,h.setClipRectInGroupCoordinateSpace(new BBox(f,g,y,m))):h.setClipRectInGroupCoordinateSpace(),[2]})})},t.prototype.updateAxes=function(e){var t,r,o,i=__assign$x({},this._lastAxisWidths),n=__assign$x({},this._lastVisibility),a=new Set(this._axes.map(function(e){return e.position}));try{for(var s=__values$f(Object.keys(i)),l=s.next();!l.done;l=s.next()){var c=l.value;a.has(c)||delete i[c]}}catch(e){t={error:e}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}var u=function(e,t){return!Object.keys(e).some(function(e){return null==i[e]})&&n.crossLines===t.crossLines&&n.series===t.series&&Object.entries(i).every(function(t){var r=__read$y(t,2),o=r[0],i=r[1],n=e[o];return null==i&&null==n||i===n})},d=function(e){return Object.entries(e).reduce(function(e,t){var r=__read$y(t,2),o=r[0],i=r[1];return i&&Math.abs(i)===1/0&&(i=0),e[o]=null!=i?Math.ceil(i):i,e},{})},p={},h={},_=!1,f=null===(o=this.seriesRect)||void 0===o?void 0:o.clone(),g=0;do{Object.assign(i,p),Object.assign(n,h);var y=this.updateAxesPass(i,e.clone(),f);if(p=d(y.axisWidths),h=y.visibility,_=y.clipSeries,f=y.seriesRect,g++>
210){Logger.warn("unable to find stable axis layout.");break}}while(!u(p,h));return this.axes.forEach(function(t){if(t.setCrossLinesVisible(n.crossLines),f)switch(t.clipGrid(f.x,f.y,f.width+5,f.height+5),t.position){case"left":case"right":t.clipTickLines(e.x,f.y,e.width+5,f.height+5);break;case"top":case"bottom":t.clipTickLines(f.x,e.y,f.width+5,e.height+5)}}),this._lastAxisWidths=i,this._lastVisibility=n,{seriesRect:f,visibility:n,clipSeries:_}},t.prototype.updateAxesPass=function(e,t,r){var o=this,i=this.axes,n={},a={},s={series:!0,crossLines:!0},l=!1,c={},u=this.applySeriesPadding(t),d=r?this.buildCrossLinePadding(r,e):{},p=this.buildAxisBound(u,e,d,s),h=this.buildSeriesRect(p,e);return i.forEach(function(t){var r,i,s=t.position,u=o.calculateAxisDimensions({axis:t,seriesRect:h,axisWidths:e,newAxisWidths:a,primaryTickCounts:c,clipSeries:l,addInterAxisPadding:(null!==(r=n[s])&&void 0!==r?r:0)>0}),d=u.clipSeries,_=u.axisThickness,f=u.axisOffset;n[s]=(null!==(i=n[s])&&void 0!==i?i:0)+1,l=l||d,o.positionAxis({axis:t,axisBound:p,axisOffset:f,axisThickness:_,axisWidths:e,primaryTickCounts:c,seriesRect:h})}),{clipSeries:l,seriesRect:h,axisWidths:a,visibility:s}},t.prototype.buildCrossLinePadding=function(e,t){var r,o,i,n={};this.axes.forEach(function(t){t.crossLines&&t.crossLines.forEach(function(t){t.calculatePadding(n,e)})});try{for(var a=__values$f(Object.entries(n)),s=a.next();!s.done;s=a.next()){var l=__read$y(s.value,2),c=l[0],u=l[1],d=void 0===u?0:u;n[c]=Math.max(d-(null!==(i=t[c])&&void 0!==i?i:0),0)}}catch(e){r={error:e}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return n},t.prototype.applySeriesPadding=function(e){var t=this,r=e.clone(),o=this.axes.slice().reverse();return directions.forEach(function(e){var i=t.seriesAreaPadding[e],n=o.find(function(t){return t.position===e});n?n.seriesAreaPadding=i:r.shrink(i,e)}),r},t.prototype.buildAxisBound=function(e,t,r,o){var i,n,a,s,l=e.clone(),c=r.top,u=void 0===c?0:c,d=r.right,p=void 0===d?0:d,h=r.bottom,_=void 0===h?0:h,f=r.left,g=void 0===f?0:f,y=g+p,m=u+_,v=(null!==(i=t.left)&&void 0!==i?i:0)+(null!==(n=t.right)&&void 0!==n?n:0)+y,E=(null!==(a=t.top)&&void 0!==a?a:0)+(null!==(s=t.bottom)&&void 0!==s?s:0)+m;return l.width<=v||l.height<=E?(o.crossLines=!1,o.series=!1,l):(l.x+=g,l.y+=u,l.width-=y,l.height-=m,l)},t.prototype.buildSeriesRect=function(e,t){var r=e.clone(),o=t.top,i=t.bottom,n=t.left,a=t.right;return r.x+=null!=n?n:0,r.y+=null!=o?o:0,r.width-=(null!=n?n:0)+(null!=a?a:0),r.height-=(null!=o?o:0)+(null!=i?i:0),r.width=Math.max(0,r.width),r.height=Math.max(0,r.height),r},t.prototype.clampToOutsideSeriesRect=function(e,t,r,o){var i=e.x,n=e.y,a=[i,n,i+e.width,n+e.height];return(1===o?Math.min:Math.max)(t,a[("x"===r?0:1)+(1===o?0:2)])},t.prototype.calculateAxisDimensions=function(e){var t,r,o,i,n,a,s=e.axis,l=e.seriesRect,c=e.axisWidths,u=e.newAxisWidths,d=e.primaryTickCounts,p=e.addInterAxisPadding,h=e.clipSeries,_=s.position,f=s.direction;s.label.mirrored=["top","right"].includes(_);var g=null!==(t=u[_])&&void 0!==t?t:0;switch(_){case"top":case"bottom":s.range=[0,l.width],s.gridLength=l.height;break;case"right":case"left":s.range=function(e){return e instanceof CategoryAxis||e instanceof GroupedCategoryAxis?[0,l.height]:[l.height,0]}(s),s.gridLength=l.width}var y=null===(r=this.zoomManager.getZoom())||void 0===r?void 0:r[s.direction],m=null!=y?y:{},v=m.min,E=void 0===v?0:v,C=m.max,O=void 0===C?1:C;s.visibleRange=[E,O],!h&&(s.visibleRange[0]>0||s.visibleRange[1]<1)&&(h=!0);var P=s.nice?d[f]:void 0;P=s.update(P),d[f]=null!==(o=d[f])&&void 0!==o?o:P;var S=0;if(s.thickness)S=s.thickness;else{var b=s.computeBBox();S=f===ChartAxisDirection.X?b.height:b.width}return p&&(S+=15),S=Math.ceil(S),u[_]=(null!==(i=u[_])&&void 0!==i?i:0)+S,s.gridPadding=(null!==(n=c[_])&&void 0!==n?n:0)-(null!==(a=u[_])&&void 0!==a?a:0),{clipSeries:h,axisThickness:S,axisOffset:g}},t.prototype.positionAxis=function(e){var t,r,o,i,n=e.axis,a=e.axisBound,s=e.axisWidths,l=e.seriesRect,c=e.axisOffset,u=e.axisThickness;switch(n.position){case"top":n.translation.x=a.x+(null!==(t=s.left)&&void 0!==t?t:0),n.translation.y=this.clampToOutsideSeriesRect(l,a.y+1+c+u,"y",1);break;case"bottom":n.translation.x=a.x+(null!==(r=s.left)&&void 0!==r?r:0),n.translation.y=this.clampToOutsideSeriesRect(l,a.y+a.height+1-u-c,"y",-1);break;case"left":n.translation.y=a.y+(null!==(o=s.top)&&void 0!==o?o:0),n.translation.x=this.clampToOutsideSeriesRect(l,a.x+c+u,"x",1);break;case"right":n.translation.y=a.y+(null!==(i=s.top)&&void 0!==i?i:0),n.translation.x=this.clampToOutsideSeriesRect(l,a.x+a.width-u-c,"x",-1)}n.updatePosition()}
2,t.className="CartesianChart",t.type="cartesian",t}(Chart),__extends$28=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),PolarSeries=function(e){function t(t){var r,o=t.useLabelLayer,i=void 0!==o&&o,n=e.call(this,{useLabelLayer:i,pickModes:[SeriesNodePickMode.EXACT_SHAPE_MATCH],directionKeys:(r={},r[ChartAxisDirection.X]=["angleKey"],r[ChartAxisDirection.Y]=["radiusKey"],r)})||this;return n.centerX=0,n.centerY=0,n.radius=0,n}return __extends$28(t,e),t.prototype.getLabelData=function(){return[]},t.prototype.computeLabelsBBox=function(e){return null},t}(Series),__extends$27=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__awaiter$9=function(e,t,r,o){return new(r||(r=Promise))(function(i,n){function a(e){try{l(o.next(e))}catch(e){n(e)}}function s(e){try{l(o.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})},__generator$9=function(e,t){var r,o,i,n,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return n={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function s(n){return function(s){return function(n){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(i=2&n[0]?o.return:n[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,n[1])).done)return i;switch(o=0,i&&(n=[2&n[0],i.value]),n[0]){case 0:case 1:i=n;break;case 4:return a.label++,{value:n[1],done:!1};case 5:a.label++,o=n[1],n=[0];continue;case 7:n=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==n[0]&&2!==n[0])){a=0;continue}if(3===n[0]&&(!i||n[1]>i[0]&&n[1]<i[3])){a.label=n[1];break}if(6===n[0]&&a.label<i[1]){a.label=i[1],i=n;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(n);break}i[2]&&a.ops.pop(),a.trys.pop();continue}n=t.call(e,a)}catch(e){n=[6,e],o=0}finally{r=i=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,s])}}},PolarChart=function(e){function t(t,r,o){void 0===t&&(t=window.document);var i=e.call(this,t,r,o)||this;i.padding=new Padding$1(40);var n=i.scene.root;return i.legend.attachLegend(n),i}return __extends$27(t,e),t.prototype.performLayout=function(){return __awaiter$9(this,void 0,void 0,function(){var e,t,r,o,i,n;return __generator$9(this,function(a){return this.scene.root.visible=!0,t=(e=this).padding,r=e.scene,o=r.width,i=r.height,(n=new BBox(0,0,o,i)).shrink(t.left,"left"),n.shrink(t.top,"top"),n.shrink(t.right,"right"),n.shrink(t.bottom,"bottom"),n=this.positionCaptions(n),n=this.positionLegend(n),this.computeSeriesRect(n),this.computeCircle(),[2]})})},t.prototype.computeSeriesRect=function(e){var t=this.legend,r=this.seriesAreaPadding;if(t.visible&&t.enabled&&t.data.length){var o=t.spacing;e.shrink(o,t.position)}e.shrink(r.left,"left"),e.shrink(r.top,"top"),e.shrink(r.right,"right"),e.shrink(r.bottom,"bottom"),this.seriesRect=e},t.prototype.computeCircle=function(){var e=this,t=this.seriesRect,r=this.series.filter(function(e){return e instanceof PolarSeries}),o=function(e,t,o){r.forEach(function(r){r.centerX=e,r.centerY=t,r.radius=o})},i=t.x+t.width/2,n=t.y+t.height/2,a=Math.max(0,Math.min(t.width,t.height)/2),s=a;o(i,n,s);var l=function(t){var l=(void 0===t?{}:t).hideWhenNecessary,c=void 0!==l&&l,u=r.map(function(e){return e.computeLabelsBBox({hideWhenNecessary:c})}).filter(function(e){return null!=e});if(0!==u.length){var d=BBox.merge(u),p=e.refineCircle(d,s);o(p.centerX,p.centerY,p.radius),p.radius!==s&&(s=p.radius)}else o(i,n,a)};l(),l(),l({hideWhenNecessary:!0}),l({hideWhenNecessary:!0})},t.prototype.refineCircle=function(e,t){var r=this.seriesRect,o=-t,i=-t,n=t,a=t,
2s=Math.max(0,o-e.x),l=Math.max(0,i-e.y),c=Math.max(0,e.x+e.width-n),u=Math.max(0,e.y+e.height-a),d=r.width-s-c,p=r.height-l-u,h=Math.min(d,p)/2,_=.5*r.width/2,f=.5*r.height/2,g=Math.min(_,f);if(h<g){if((h=g)===f){var y=r.height/(2*h+l+u);l*=y,u*=y}if(h===_){var m=r.width-2*h;2*Math.min(s,c)>m?(s=m/2,c=m/2):s>c?s=m-c:c=m-s}}var v=s+2*h+c,E=l+2*h+u;return{centerX:r.x+(r.width-v)/2+s+h,centerY:r.y+(r.height-E)/2+l+h,radius:h}},t.className="PolarChart",t.type="polar",t}(Chart),__extends$26=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__awaiter$8=function(e,t,r,o){return new(r||(r=Promise))(function(i,n){function a(e){try{l(o.next(e))}catch(e){n(e)}}function s(e){try{l(o.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})},__generator$8=function(e,t){var r,o,i,n,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return n={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function s(n){return function(s){return function(n){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(i=2&n[0]?o.return:n[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,n[1])).done)return i;switch(o=0,i&&(n=[2&n[0],i.value]),n[0]){case 0:case 1:i=n;break;case 4:return a.label++,{value:n[1],done:!1};case 5:a.label++,o=n[1],n=[0];continue;case 7:n=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==n[0]&&2!==n[0])){a=0;continue}if(3===n[0]&&(!i||n[1]>i[0]&&n[1]<i[3])){a.label=n[1];break}if(6===n[0]&&a.label<i[1]){a.label=i[1],i=n;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(n);break}i[2]&&a.ops.pop(),a.trys.pop();continue}n=t.call(e,a)}catch(e){n=[6,e],o=0}finally{r=i=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,s])}}},HierarchyChart=function(e){function t(t,r,o){void 0===t&&(t=window.document);var i=e.call(this,t,r,o)||this;i._data={};var n=i.scene.root;return i.legend.attachLegend(n),i}return __extends$26(t,e),t.prototype.performLayout=function(){return __awaiter$8(this,void 0,void 0,function(){var e,t,r,o,i,n,a,s,l;return __generator$8(this,function(c){return this.scene.root.visible=!0,t=(e=this).scene,r=t.width,o=t.height,i=e.legend,n=e.padding,a=e.seriesAreaPadding,(s=new BBox(0,0,r,o)).shrink(n.left,"left"),s.shrink(n.top,"top"),s.shrink(n.right,"right"),s.shrink(n.bottom,"bottom"),s=this.positionCaptions(s),s=this.positionLegend(s),i.visible&&i.enabled&&i.data.length&&(l=i.spacing,s.shrink(l,i.position)),s.shrink(a.left,"left"),s.shrink(a.top,"top"),s.shrink(a.right,"right"),s.shrink(a.bottom,"bottom"),this.seriesRect=s,this.series.forEach(function(e){e.rootGroup.translationX=Math.floor(s.x),e.rootGroup.translationY=Math.floor(s.y),e.update({seriesRect:s})}),this.seriesRoot.setClipRectInGroupCoordinateSpace(new BBox(s.x,s.y,s.width,s.height)),[2]})})},t.className="HierarchyChart",t.type="hierarchy",t}(Chart),__read$x=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},interpolatePattern=/(#\{(.*?)\})/g;function interpolate(e,t,r){return e.replace(interpolatePattern,function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];var i=e[2],n=__read$x(i.split(":"),2),a=n[0],s=n[1],l=t[a];if("number"==typeof l){var c;if(c=s&&r&&r[s]){var u=c,d=u.locales,p=u.options;return l.toLocaleString(d,p)}return String(l)}return l instanceof Date?"string"==typeof(c=s&&r&&r[s])?buildFormatter(c)(l):l.toDateString():"string"==typeof l||l&&l.toString?String(l):""})}var element=null;function sanitizeHtml(e){return element=element||document.createElement("div"),e?(element.textContent=e,element.innerHTML):""}function calculateNiceSecondaryAxis(e,t){var r=Math.floor(e[0]),o=e[1],i=getTickStep(r=calculateNiceStart(r,o,t),o,t);return[[r,o=r+(t-1)*i],getTicks(r,i,t)]}function calculateNiceStart(e,t,r){var o=Math.abs(t-e)/(r-1),i=Math.floor(Math.log10(o)),n=Math.pow(10,i);return Math.floor(e/n)*n}function getTicks(e,t,r){for(var o=Math.floor(Math.log10(t)),i=t>0&&t<1?Math.abs(o):0,n=Math.pow(10,i),a=new NumericTicks(i),s=0;s<r;s++){var l=e+t*s;a[s]=Math.round(l*n)/n}return a}function getTickStep(e,t,r){return calculateNextNiceStep((t-e)/(r-1))}function calculateNextNiceStep(e){var t=Math.floor(Math.log10(e)),r=Math.pow(10,t),o=e/r*10;return o>0&&o<=1?r/10:o>1&&o<=2?2*r/10:o>1&&o<=5?5*r/10:o>5&&o<=10?10*r/10:o>10&&o<=20?20*r/10:o>20&&o<=40?40*r/10:o>40&&o<=50?50*r/10:o>50&&o<=100?100*r/10:o}var __extends$25=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$1s=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},__read$w=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},NumberAxis=function(e){function t(t,r){void 0===r&&(r=new LinearScale$1);var o=e.call(this,t,r)||this;return o.min=NaN,o.max=NaN,r.strictClampByDefault=!0,o}return __extends$25(t,e),t.prototype.normaliseDataDomain=function(e){var t=this.min,r=this.max;return e.length>2&&(e=extent$4(e)||[NaN,NaN]),isNaN(t)||(e=[t,e[1]]),isNaN(r)||(e=[e[0],r]),e[0]>e[1]&&(e=[]),e},t.prototype.formatDatum=function(e){return"number"==typeof e?e.toFixed(2):(Logger.warnOnce("data contains Date objects which are being plotted against a number axis, please only use a number axis for numbers."),String(e))},t.prototype.updateSecondaryAxisTicks=function(e){if(null==this.dataDomain)throw new Error("AG Charts - dataDomain not calculated, cannot perform tick calculation.");var t=__read$w(calculateNiceSecondaryAxis(this.dataDomain,null!=e?e:0),2),r=t[0],o=t[1];return this.scale.nice=!1,this.scale.domain=r,this.scale.update(
2),o},t.className="NumberAxis",t.type="number",__decorate$1s([Validate(AND(NUMBER_OR_NAN(),LESS_THAN("max"))),Default(NaN)],t.prototype,"min",void 0),__decorate$1s([Validate(AND(NUMBER_OR_NAN(),GREATER_THAN("min"))),Default(NaN)],t.prototype,"max",void 0),t}(ChartAxis),__extends$24=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$1r=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a};function NON_ZERO_NUMBER(){return predicateWithMessage(function(e){return"number"==typeof e&&0!==e},"expecting a non-zero Number")}var LogAxis=function(e){function t(t){var r=e.call(this,t,new LogScale)||this;return r.min=NaN,r.max=NaN,r.scale.strictClampByDefault=!0,r}return __extends$24(t,e),t.prototype.normaliseDataDomain=function(e){var t=this.min,r=this.max;e.length>2&&(e=extent$4(e)||[NaN,NaN]),isNaN(t)||(e=[t,e[1]]),isNaN(r)||(e=[e[0],r]);var o=e[0]>e[1],i=e[0]<0&&e[1]>0,n=0===e[0]&&0===e[1];return(o||i||n)&&(e=[],i?Logger.warn("the data domain crosses zero, the chart data cannot be rendered. See log axis documentation for more information."):n&&Logger.warn("the data domain has 0 extent, no data is rendered.")),0===e[0]&&(e[0]=1),0===e[1]&&(e[1]=-1),e},Object.defineProperty(t.prototype,"base",{get:function(){return this.scale.base},set:function(e){this.scale.base=e},enumerable:!1,configurable:!0}),t.className="LogAxis",t.type="log",__decorate$1r([Validate(AND(NUMBER_OR_NAN(),LESS_THAN("max"),NON_ZERO_NUMBER())),Default(NaN)],t.prototype,"min",void 0),__decorate$1r([Validate(AND(NUMBER_OR_NAN(),GREATER_THAN("min"),NON_ZERO_NUMBER())),Default(NaN)],t.prototype,"max",void 0),t}(NumberAxis),__extends$23=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$1q=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},__awaiter$7=function(e,t,r,o){return new(r||(r=Promise))(function(i,n){function a(e){try{l(o.next(e))}catch(e){n(e)}}function s(e){try{l(o.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})},__generator$7=function(e,t){var r,o,i,n,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return n={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function s(n){return function(s){return function(n){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(i=2&n[0]?o.return:n[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,n[1])).done)return i;switch(o=0,i&&(n=[2&n[0],i.value]),n[0]){case 0:case 1:i=n;break;case 4:return a.label++,{value:n[1],done:!1};case 5:a.label++,o=n[1],n=[0];continue;case 7:n=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==n[0]&&2!==n[0])){a=0;continue}if(3===n[0]&&(!i||n[1]>i[0]&&n[1]<i[3])){a.label=n[1];break}if(6===n[0]&&a.label<i[1]){a.label=i[1],i=n;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(n);break}i[2]&&a.ops.pop(),a.trys.pop();continue}n=t.call(e,a)}catch(e){n=[6,e],o=0}finally{r=i=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,s])}}},__values$e=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);
2if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},__read$v=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},__spread$j=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read$v(arguments[t]));return e},AreaSeriesLabel=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.formatter=void 0,t}return __extends$23(t,e),__decorate$1q([Validate(OPT_FUNCTION)],t.prototype,"formatter",void 0),t}(Label$1),AreaSeriesTooltip=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.renderer=void 0,t.format=void 0,t}return __extends$23(t,e),__decorate$1q([Validate(OPT_FUNCTION)],t.prototype,"renderer",void 0),__decorate$1q([Validate(OPT_STRING)],t.prototype,"format",void 0),t}(SeriesTooltip),AreaSeriesTag;!function(e){e[e.Fill=0]="Fill",e[e.Stroke=1]="Stroke",e[e.Marker=2]="Marker",e[e.Label=3]="Label"}(AreaSeriesTag||(AreaSeriesTag={}));var AreaSeries=function(e){function t(){var t=e.call(this,{pathsPerSeries:2,pathsZIndexSubOrderOffset:[0,1e3],hasMarkers:!0,renderLayerPerSubSeries:!1,directionKeys:{x:["xKey"],y:["yKeys"]}})||this;t.tooltip=new AreaSeriesTooltip,t.xData=[],t.yData=[],t.yDomain=[],t.xDomain=[],t.marker=new CartesianSeriesMarker,t.label=new AreaSeriesLabel,t.fills=["#c16068","#a2bf8a","#ebcc87","#80a0c3","#b58dae","#85c0d1"],t.strokes=["#874349","#718661","#a48f5f","#5a7088","#7f637a","#5d8692"],t.fillOpacity=1,t.strokeOpacity=1,t.lineDash=[0],t.lineDashOffset=0,t._xKey="",t.xName="",t._yKeys=[],t._visibles=[],t.yNames=[],t.strokeWidth=2,t.shadow=void 0;var r=t,o=r.marker,i=r.label;return o.enabled=!1,i.enabled=!1,t}return __extends$23(t,e),Object.defineProperty(t.prototype,"xKey",{get:function(){return this._xKey},set:function(e){this._xKey=e,this.xData=[]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"yKeys",{get:function(){return this._yKeys},set:function(e){areArrayItemsStrictlyEqual(this._yKeys,e)||(this._yKeys=e,this.yData=[],this.processSeriesItemEnabled())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"visibles",{get:function(){return this._visibles},set:function(e){this._visibles=e,this.processSeriesItemEnabled()},enumerable:!1,configurable:!0}),t.prototype.processSeriesItemEnabled=function(){var e=this.seriesItemEnabled,t=this._visibles,r=void 0===t?[]:t;e.clear(),this._yKeys.forEach(function(t,o){var i;return e.set(t,null===(i=r[o])||void 0===i||i)})},Object.defineProperty(t.prototype,"normalizedTo",{get:function(){return this._normalizedTo},set:function(e){var t=e?Math.abs(e):void 0;this._normalizedTo!==t&&(this._normalizedTo=t)},enumerable:!1,configurable:!0}),t.prototype.processData=function(){var e;return __awaiter$7(this,void 0,void 0,function(){var t,r,o,i,n,a,s,l,c,u,d,p,h,_,f,g,y,m,v,E,C,O,P,S,b,D,M,T,A,x,w,R,I,L,N,k,B,F,$;return __generator$7(this,function(U){if(r=(t=this).xKey,o=t.yKeys,i=t.seriesItemEnabled,n=t.xAxis,a=t.yAxis,s=t.normalizedTo,l=r&&o.length&&this.data?this.data:[],!n||!a)return[2];c=n.scale instanceof ContinuousScale,u=a.scale instanceof ContinuousScale,d=s&&isFinite(s),p=[],h=[],_=[],f=new Set(o),g=function(e){if(!(r in e))return Logger.warnOnce("the key '"+r+"' was not found in the data: ",e),"continue";var t=checkDatum(e[r],c);if(c&&void 0===t)return"continue";_.push(t),h.push({xDatum:t,seriesDatum:e}),o.forEach(function(t,r){var o=p[r]||(p[r]=[]);if(t in e){f.delete(t);var n=e[t];if(i.get(t)){var a=checkDatum(n,u);o.push(a)}else o.push(NaN)}else o.push(NaN)})};try{for(y=__values$e(l),m=y.next();!m.done;m=y.next())v=m.value,g(v)}catch(e){L={error:e}}finally{try{m&&!m.done&&(N=y.return)&&N.call(y)}finally{if(L)throw L.error}}if(f.size>0&&(E=JSON.stringify(__spread$j(f)),Logger.warnOnce("yKeys "+E+" were not found in the data.")),!this.validateXYData(this.xKey,this.yKeys.join(", "),l,n,a,h.map(function(e){return e.xDatum}),p,2))return this.xData=[],this.yData=[],this.yDomain=[],[2];for(this.yData=p,this.xData=h,this.xDomain=c?this.fixNumericExtent(extent$4(_),n):_,C=void 0,O=void 0,P=0;P<h.length;P++){S={sum:0,absSum:0};try{for(k=void 0,b=__values$e(p),D=b.next();!D.done;D=b.next())void 0===(w=D.value)[P]||isNaN(w[P])||(M=+w[P],S.absSum+=Math.abs(M),S.sum+=M,S.sum>=(null!=O?O:0)?O=S.sum:S.sum<=(null!=C?C:0)&&(C=S.sum))}catch(e){k={error:e}}finally{try{D&&!D.done&&(B=b.return)&&B.call(b)}finally{if(k)throw k.error}}if(d&&s){T=void 0;try{for(F=void 0,A=__values$e(p),x=A.next();!x.done;x=A.next())w=x.value,R=+w[P]/S.absSum*s,w[P]=R,isNaN(R)||((T=(null!=T?T:0)+R)>=(null!=O?O:0)?O=T:T<=(null!=C?C:0)&&(C=T))}catch(e){F={error:e}}finally{try{x&&!x.done&&($=A.return)&&$.call(A)}finally{if(F)throw F.error}}}}return d&&s&&(C=(null!=C?C:0)<.5*-s?-s:C,O=(null!=O?O:0)>.5*s?s:O),I=a instanceof LogAxis,void 0===C&&I&&(C=null===(e=extent$4(p[0]))||void 0===e?void 0:e[0]),this.yDomain=this.fixNumericExtent(void 0===C&&void 0===O?void 0:[null!=C?C:0,null!=O?O:0],a),[2]})})},t.prototype.getDomain=function(e){return e===ChartAxisDirection.X?this.xDomain:this.yDomain},t.prototype.createNodeData=function(){return __awaiter$7(this,void 0,void 0,function(){var e,t,r,o,i,n,a,s,l,c,u,d,p,h,_,f,g,y,m,v,E,C,O=this;return __generator$7(this,function(P){return t=(e=this).data,r=e.xAxis,o=e.yAxis,i=e.xData,n=e.yData,t&&r&&o&&i.length&&n.length?(a=[],l=(s=this).yKeys,c=s.marker,u=s.label,d=s.fills,p=s.strokes,h=s.id,_=r.scale,f=o.scale,g=f instanceof ContinuousScale,y=(_.bandwidth||0)/2,m=new Array(i.length).fill(null).map(function(){return{left:0,right:0}}),v=new Array(i.length).fill(0),E=function(e,t,r,o){var i=_.convert(e)+y,n=m[r][o],a=m[r][o]+t,s=f.convert(n,{strict:!1}),l=f.convert(a,{strict:!1});return m[r][o]=a,[{x:i,y:l,size:c.size},{x:i,y:s,size:c.size}]},C=function(e,t,r,o){var i,n=O.normalizedTo&&isFinite(O.normalizedTo),a=n&&g&&isContinuous(o);return(!n&&!isNaN(o)||a)&&(i=v[r]+=t),{x:_.convert(e)+y,y:f.convert(i,{strict:!1}),size:c.size}}
2,n.forEach(function(e,t){var r=l[t],o=[],n=[],s={itemId:r,points:[],yValues:[]},_={itemId:r,points:[]};if(a[t]={itemId:r,fillSelectionData:_,labelData:o,nodeData:n,strokeSelectionData:s},O.seriesItemEnabled.get(r)){var f=_.points,g=[],y=s.points,m=s.yValues;e.forEach(function(a,s){var l,_,v=isNaN(a)?void 0:a,P=i[s],S=P.xDatum,b=P.seriesDatum,D=null===(l=i[s+1])||void 0===l?void 0:l.xDatum,M=e[s+1],T=isNaN(M)?void 0:M,A=C(S,+v,s,b[r]);c&&n.push({index:s,series:O,itemId:r,datum:b,yValue:v,yKey:r,point:A,fill:d[t%d.length],stroke:p[t%p.length]}),_=u.formatter?u.formatter({value:v,seriesId:h}):isNumber$4(v)?Number(v).toFixed(2):String(v),u&&o.push({index:s,itemId:r,point:A,label:O.seriesItemEnabled.get(r)&&_?{text:_,fontStyle:u.fontStyle,fontWeight:u.fontWeight,fontSize:u.fontSize,fontFamily:u.fontFamily,textAlign:"center",textBaseline:"bottom",fill:u.color}:void 0});var x=[S,D],w=[v,T];if(!x.some(function(e){return null==e})){w.some(function(e){return null==e})&&(w[0]=0,w[1]=0);var R=E(x[0],+w[0],s,"right");f.push(R[0]),g.push(R[1]);var I=E(x[1],+w[1],s,"left");f.push(I[0]),g.push(I[1]),y.push({x:NaN,y:NaN}),m.push(void 0),y.push(R[0]),m.push(v),void 0!==T&&(y.push(I[0]),m.push(v))}});for(var v=g.length-1;v>=0;v--)f.push(g[v])}}),[2,a]):[2,[]]})})},t.prototype.isPathOrSelectionDirty=function(){return this.marker.isDirty()},t.prototype.updatePaths=function(e){return __awaiter$7(this,void 0,void 0,function(){var t,r,o,i,n,a;return __generator$7(this,function(s){return t=e.contextData,r=t.fillSelectionData,o=t.strokeSelectionData,i=__read$v(e.paths,2),n=i[0],a=i[1],n.datum=r,n.tag=AreaSeriesTag.Fill,n.lineJoin="round",n.stroke=void 0,n.pointerEvents=PointerEvents.None,a.datum=o,a.tag=AreaSeriesTag.Stroke,a.fill=void 0,a.lineJoin=a.lineCap="round",a.pointerEvents=PointerEvents.None,[2]})})},t.prototype.updatePathNodes=function(e){return __awaiter$7(this,void 0,void 0,function(){var t,r,o,i,n,a,s,l,c,u,d,p,h,_,f,g,y,m,v,E,C,O,P,S,b,D,M;return __generator$7(this,function(T){t=__read$v(e.paths,2),r=t[0],o=t[1],i=e.seriesIdx,n=e.itemId,s=(a=this).strokes,l=a.fills,c=a.fillOpacity,u=a.strokeOpacity,d=a.strokeWidth,p=a.shadow,g=r.datum.points,r.fill=l[i%l.length],r.fillOpacity=c,r.strokeOpacity=u,r.strokeWidth=d,r.lineDash=this.lineDash,r.lineDashOffset=this.lineDashOffset,r.fillShadow=p,(v=r.path).clear({trackChanges:!0}),E=0;try{for(h=__values$e(g),_=h.next();!_.done;_=h.next())P=_.value,E++>0?v.lineTo(P.x,P.y):v.moveTo(P.x,P.y)}catch(e){S={error:e}}finally{try{_&&!_.done&&(b=h.return)&&b.call(h)}finally{if(S)throw S.error}}v.closePath(),r.checkPathDirty(),f=o.datum,g=f.points,y=f.yValues,m=!0,o.stroke=s[i%s.length],o.strokeWidth=this.getStrokeWidth(this.strokeWidth,{itemId:n}),o.strokeOpacity=u,o.lineDash=this.lineDash,o.lineDashOffset=this.lineDashOffset,(v=o.path).clear({trackChanges:!0}),E=0;try{for(C=__values$e(g),O=C.next();!O.done;O=C.next())P=O.value,void 0===y[E++]?m=!0:m?(v.moveTo(P.x,P.y),m=!1):v.lineTo(P.x,P.y)}catch(e){D={error:e}}finally{try{O&&!O.done&&(M=C.return)&&M.call(C)}finally{if(D)throw D.error}}return o.checkPathDirty(),[2]})})},t.prototype.markerFactory=function(){return new(getMarker$1(this.marker.shape))},t.prototype.updateMarkerSelection=function(e){return __awaiter$7(this,void 0,void 0,function(){var t,r,o,i;return __generator$7(this,function(n){return t=e.nodeData,r=e.markerSelection,o=this.marker.enabled,i=o&&t?t:[],this.marker.isDirty()&&r.clear(),[2,r.update(i,function(e){e.tag=AreaSeriesTag.Marker})]})})},t.prototype.updateMarkerNodes=function(e){return __awaiter$7(this,void 0,void 0,function(){var t,r,o,i,n,a,s,l,c,u,d,p,h,_,f,g,y,m,v,E,C,O,P,S;return __generator$7(this,function(b){return t=e.markerSelection,r=e.isHighlight,i=(o=this).id,n=o.xKey,a=o.marker,s=o.seriesItemEnabled,l=o.yKeys,c=o.fills,u=o.strokes,d=o.fillOpacity,p=o.marker.fillOpacity,h=void 0===p?d:p,_=o.strokeOpacity,f=o.highlightStyle.item,g=f.fill,y=f.fillOpacity,m=void 0===y?h:y,v=f.stroke,E=f.strokeWidth,C=a.size,O=a.formatter,P=void 0!==a.strokeWidth?a.strokeWidth:this.strokeWidth,S="function"==typeof a.shape,t.each(function(e,t){var o,d,p=l.indexOf(t.yKey),f=r&&void 0!==g?g:a.fill||c[p%c.length],y=r?m:h,b=r&&void 0!==v?v:a.stroke||u[p%c.length],D=r&&void 0!==E?E:P,M=void 0;O&&(M=O({datum:t.datum,xKey:n,yKey:t.yKey,fill:f,stroke:b,strokeWidth:D,size:C,highlighted:r,seriesId:i})),e.fill=M&&M.fill||f,e.stroke=M&&M.stroke||b,e.strokeWidth=M&&void 0!==M.strokeWidth?M.strokeWidth:D,e.fillOpacity=null!=y?y:1,e.strokeOpacity=null!==(d=null!==(o=a.strokeOpacity)&&void 0!==o?o:_)&&void 0!==d?d:1,e.size=M&&void 0!==M.size?M.size:C,e.translationX=t.point.x,e.translationY=t.point.y,e.visible=e.size>0&&!!s.get(t.yKey)&&!isNaN(t.point.x)&&!isNaN(t.point.y),S&&!e.dirtyPath&&(e.path.clear({trackChanges:!0}),e.updatePath(),e.checkPathDirty())}),r||this.marker.markClean(),[2]})})},t.prototype.updateLabelSelection=function(e){return __awaiter$7(this,void 0,void 0,function(){var t;return __generator$7(this,function(r){return t=e.labelData,[2,e.labelSelection.update(t,function(e){e.tag=AreaSeriesTag.Label})]})})},t.prototype.updateLabelNodes=function(e){return __awaiter$7(this,void 0,void 0,function(){var t,r,o,i,n,a,s,l;return __generator$7(this,function(c){return t=e.labelSelection,r=this.label,o=r.enabled,i=r.fontStyle,n=r.fontWeight,a=r.fontSize,s=r.fontFamily,l=r.color,t.each(function(e,t){var r=t.point,c=t.label;c&&o?(e.fontStyle=i,e.fontWeight=n,e.fontSize=a,e.fontFamily=s,e.textAlign=c.textAlign,e.textBaseline=c.textBaseline,e.text=c.text,e.x=r.x,e.y=r.y-10,e.fill=l,e.visible=!0):e.visible=!1}),[2]})})},t.prototype.getNodeClickEvent=function(e,t){return new CartesianSeriesNodeClickEvent(this.xKey,t.yKey,e,t,this)},t.prototype.getNodeDoubleClickEvent=function(e,t){return new CartesianSeriesNodeDoubleClickEvent(this.xKey,t.yKey,e,t,this)},t.prototype.getTooltipHtml=function(e){var t=this.xKey,r=this.id,o=e.yKey;if(!t||!o||!this.seriesItemEnabled.get(o))return"";var i=e.datum,n=i[t],a=i[o],s=this.xAxis,l=this.yAxis;if(!(s&&l&&isNumber$4(a)))return"";var c=this,u=c.xName,d=c.yKeys,p=c.yNames,h=c.yData,_=c.fills,f=c.strokes,g=c.tooltip,y=c.marker,m=y.size,v=y.formatter,E=y.strokeWidth,C=y.fill,O=y.stroke,P=s.formatDatum(n),S=l.formatDatum(a),b=d.indexOf(o),D=h[b][e.index],M=p[b],T=sanitizeHtml(M),A=sanitizeHtml(P+": "+S),x=void 0!==E?E:this.strokeWidth,w=C||_[b%_.length],R=O||f[b%_.length],I=void 0;
2v&&(I=v({datum:i,xKey:t,yKey:o,fill:w,stroke:R,strokeWidth:x,size:m,highlighted:!1,seriesId:r}));var L=I&&I.fill||w,N={title:T,backgroundColor:L,content:A},k=g.renderer,B=g.format;if(B||k){var F={datum:i,xKey:t,xName:u,xValue:n,yKey:o,yValue:a,processedYValue:D,yName:M,color:L,title:T,seriesId:r};if(B)return toTooltipHtml$1({content:interpolate(B,F)},N);if(k)return toTooltipHtml$1(k(F),N)}return toTooltipHtml$1(N)},t.prototype.getLegendData=function(){var e,t,r=this,o=r.data,i=r.id,n=r.xKey,a=r.yKeys,s=r.yNames,l=r.seriesItemEnabled,c=r.marker,u=r.fills,d=r.strokes,p=r.fillOpacity,h=r.strokeOpacity;if(!(o&&o.length&&n&&a.length))return[];for(var _=[],f=a.length-1;f>=0;f--){var g=a[f];_.push({id:i,itemId:g,seriesId:i,enabled:l.get(g)||!1,label:{text:s[f]||a[f]},marker:{shape:c.shape,fill:c.fill||u[f%u.length],stroke:c.stroke||d[f%d.length],fillOpacity:null!==(e=c.fillOpacity)&&void 0!==e?e:p,strokeOpacity:null!==(t=c.strokeOpacity)&&void 0!==t?t:h}})}return _},t.prototype.isLabelEnabled=function(){return this.label.enabled},t.className="AreaSeries",t.type="area",__decorate$1q([Validate(COLOR_STRING_ARRAY)],t.prototype,"fills",void 0),__decorate$1q([Validate(COLOR_STRING_ARRAY)],t.prototype,"strokes",void 0),__decorate$1q([Validate(NUMBER(0,1))],t.prototype,"fillOpacity",void 0),__decorate$1q([Validate(NUMBER(0,1))],t.prototype,"strokeOpacity",void 0),__decorate$1q([Validate(OPT_LINE_DASH)],t.prototype,"lineDash",void 0),__decorate$1q([Validate(NUMBER(0))],t.prototype,"lineDashOffset",void 0),__decorate$1q([Validate(STRING)],t.prototype,"_xKey",void 0),__decorate$1q([Validate(STRING)],t.prototype,"xName",void 0),__decorate$1q([Validate(STRING_ARRAY)],t.prototype,"_yKeys",void 0),__decorate$1q([Validate(BOOLEAN_ARRAY)],t.prototype,"_visibles",void 0),__decorate$1q([Validate(STRING_ARRAY)],t.prototype,"yNames",void 0),__decorate$1q([Validate(OPT_NUMBER())],t.prototype,"_normalizedTo",void 0),__decorate$1q([Validate(NUMBER(0))],t.prototype,"strokeWidth",void 0),t}(CartesianSeries),__extends$22=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$1p=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},__awaiter$6=function(e,t,r,o){return new(r||(r=Promise))(function(i,n){function a(e){try{l(o.next(e))}catch(e){n(e)}}function s(e){try{l(o.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})},__generator$6=function(e,t){var r,o,i,n,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return n={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function s(n){return function(s){return function(n){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(i=2&n[0]?o.return:n[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,n[1])).done)return i;switch(o=0,i&&(n=[2&n[0],i.value]),n[0]){case 0:case 1:i=n;break;case 4:return a.label++,{value:n[1],done:!1};case 5:a.label++,o=n[1],n=[0];continue;case 7:n=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==n[0]&&2!==n[0])){a=0;continue}if(3===n[0]&&(!i||n[1]>i[0]&&n[1]<i[3])){a.label=n[1];break}if(6===n[0]&&a.label<i[1]){a.label=i[1],i=n;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(n);break}i[2]&&a.ops.pop(),a.trys.pop();continue}n=t.call(e,a)}catch(e){n=[6,e],o=0}finally{r=i=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,s])}}},__read$u=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},__spread$i=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read$u(arguments[t]));return e},__values$d=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);
2if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},BAR_LABEL_PLACEMENTS=["inside","outside"],OPT_BAR_LABEL_PLACEMENT=function(e,t){return OPTIONAL(e,t,function(e){return BAR_LABEL_PLACEMENTS.includes(e)})},BarSeriesNodeTag;!function(e){e[e.Bar=0]="Bar",e[e.Label=1]="Label"}(BarSeriesNodeTag||(BarSeriesNodeTag={}));var BarSeriesLabel=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.formatter=void 0,t.placement="inside",t}return __extends$22(t,e),__decorate$1p([Validate(OPT_FUNCTION)],t.prototype,"formatter",void 0),__decorate$1p([Validate(OPT_BAR_LABEL_PLACEMENT)],t.prototype,"placement",void 0),t}(Label$1),BarSeriesTooltip=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.renderer=void 0,t}return __extends$22(t,e),__decorate$1p([Validate(OPT_FUNCTION)],t.prototype,"renderer",void 0),t}(SeriesTooltip);function is2dArray$1(e){return e.length>0&&Array.isArray(e[0])}var BarSeries=function(e){function t(){var t,r=e.call(this,{pickModes:[SeriesNodePickMode.EXACT_SHAPE_MATCH],pathsPerSeries:0,directionKeys:(t={},t[ChartAxisDirection.X]=["xKey"],t[ChartAxisDirection.Y]=["yKeys"],t)})||this;return r.xData=[],r.yData=[],r.yDomain=[],r.label=new BarSeriesLabel,r.tooltip=new BarSeriesTooltip,r.flipXY=!1,r.fills=["#c16068","#a2bf8a","#ebcc87","#80a0c3","#b58dae","#85c0d1"],r.strokes=["#874349","#718661","#a48f5f","#5a7088","#7f637a","#5d8692"],r.fillOpacity=1,r.strokeOpacity=1,r.lineDash=[0],r.lineDashOffset=0,r.formatter=void 0,r.groupScale=new BandScale$5,r._xKey="",r.xName="",r.cumYKeyCount=[],r.flatYKeys=void 0,r.hideInLegend=[],r.yKeys=[],r.yKeysCache=[],r.visibles=[],r._grouped=!1,r.stackGroups={},r.yNames={},r.strokeWidth=1,r.shadow=void 0,r.smallestDataInterval=void 0,r.label.enabled=!1,r}return __extends$22(t,e),t.prototype.resolveKeyDirection=function(e){return this.flipXY?flipChartAxisDirection(e):e},Object.defineProperty(t.prototype,"xKey",{get:function(){return this._xKey},set:function(e){this._xKey=e,this.xData=[]},enumerable:!1,configurable:!0}),t.prototype.processYKeys=function(){var e=this,t=this.yKeys,r=void 0;is2dArray$1(t)||(r=t,t=this.grouped?r.map(function(e){return[e]}):[r]);var o=Object.values(this.stackGroups);if(o.length>0){var i=function(e){return e.reduce(function(e,t){return e.concat(t)},[])},n=i(t),a=new Set(i(o)),s=n.filter(function(e){return!a.has(e)});t=o.map(function(e){return e}),s.length>0&&t.push(s);var l=i(t).reduce(function(e,t,r){return e.set(t,r)},new Map),c=function(e){var t=Array.from({length:e.length});return e.forEach(function(e,r){var o=n[r],i=l.get(o);t[i]=e}),t};this.fills=c(this.fills),this.strokes=c(this.strokes),this.visibles=c(this.visibles)}if(!areArrayItemsStrictlyEqual(this.yKeysCache,t)){this.flatYKeys=r||void 0,this.yKeys=t;var u=0;this.cumYKeyCount=[];var d=[];t.forEach(function(t,r){t.length>0&&d.push(String(r)),e.cumYKeyCount.push(u),u+=t.length}),this.processSeriesItemEnabled(),this.groupScale.domain=d}this.yKeysCache=t},t.prototype.processSeriesItemEnabled=function(){var e=this.seriesItemEnabled,t=this.visibles.reduce(function(e,t){return e.concat.apply(e,__spread$i(Array.isArray(t)?t:[t]))},[]);e.clear();var r=0;this.yKeys.forEach(function(o){o.forEach(function(o){var i;return e.set(o,null===(i=t[r++])||void 0===i||i)})})},Object.defineProperty(t.prototype,"grouped",{get:function(){return this._grouped},set:function(e){this._grouped=e},enumerable:!1,configurable:!0}),t.prototype.getStackGroup=function(e){var t,r=this.stackGroups;return null===(t=Object.entries(r).find(function(t){var r=__read$u(t,2);return r[0],r[1].includes(e)}))||void 0===t?void 0:t[0]},t.prototype.processYNames=function(){var e=this.yNames;if(Array.isArray(e)&&this.flatYKeys){var t={};this.flatYKeys.forEach(function(r,o){t[r]=e[o]}),this.yNames=t}},Object.defineProperty(t.prototype,"normalizedTo",{get:function(){return this._normalizedTo},set:function(e){var t=e?Math.abs(e):void 0;this._normalizedTo=t}
2,enumerable:!1,configurable:!0}),t.prototype.processData=function(){return __awaiter$6(this,void 0,void 0,function(){var e,t,r,o,i,n,a,s,l,c,u,d,p,h,_,f,g,y,m,v,E,C=this;return __generator$6(this,function(O){return this.processYKeys(),this.processYNames(),t=(e=this).xKey,r=e.yKeys,o=e.seriesItemEnabled,i=t&&r.length&&this.data?this.data:[],n=this.getCategoryAxis(),a=this.getValueAxis(),n&&a?(s=function(e,t){void 0===C.smallestDataInterval&&(C.smallestDataInterval={x:1/0,y:1/0});var r=C.smallestDataInterval.x,o=Math.abs(e-t);o>0&&o<r&&(C.smallestDataInterval.x=o)},l=n.scale instanceof ContinuousScale,c=a.scale instanceof ContinuousScale,u=!0,d=1/0,this.xData=i.map(function(e){u&&!(t in e)&&(u=!1,Logger.warn("the key '"+t+"' was not found in the data: ",e));var r=checkDatum(e[t],l);return l&&s(r,d),d=r,r}),this.yData=i.map(function(e){return r.map(function(t){return t.map(function(t){u&&!(t in e)&&(u=!1,Logger.warn("the key '"+t+"' was not found in the data: ",e));var r=checkDatum(e[t],c);return o.get(t)&&void 0!==r?r:NaN}
2)})}),this.validateXYData(this.xKey,this.yKeys.join(", "),i,n,a,this.xData,this.yData,3)?(h=(p=a instanceof LogAxis)?this.yData.map(function(e){return e.map(function(e){var t,r=null!==(t=extent$4(e))&&void 0!==t?t:[];return{min:r[0],max:r[1]}})}):this.yData.map(function(e){return e.map(function(e){return findMinMax(e)})}),f=(_=this).yData,g=_.normalizedTo,y=this.yData.map(function(e){return e.map(function(e){return e.reduce(function(e,t){return e+(isNaN(t)?0:Math.abs(t))},0)})}),m=this.findLargestMinMax(h),v=m.min,E=m.max,v===1/0&&E===-1/0?(this.yDomain=[],[2]):(g&&isFinite(g)&&(v=v<0?-g:p?1:0,E=E>0?g:p?-1:0,f.forEach(function(e,t){e.forEach(function(e,r){e.forEach(function(o,i){e[i]=o/y[t][r]*g})})})),this.yDomain=this.fixNumericExtent([v,E],this.yAxis),[2])):(this.xData=[],this.yData=[],this.yDomain=[],[2])):[2]})})},t.prototype.findLargestMinMax=function(e){var t,r,o,i,n=1/0,a=-1/0;try{for(var s=__values$d(e),l=s.next();!l.done;l=s.next()){var c=l.value;try{for(var u=(o=void 0,__values$d(c)),d=u.next();!d.done;d=u.next()){var p=d.value,h=p.min,_=void 0===h?1/0:h,f=p.max,g=void 0===f?-1/0:f;_<n&&(n=_),g>a&&(a=g)}}catch(e){o={error:e}}finally{try{d&&!d.done&&(i=u.return)&&i.call(u)}finally{if(o)throw o.error}}}}catch(e){t={error:e}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}return{min:n,max:a}},t.prototype.getDomain=function(e){var t,r,o,i,n,a=this.flipXY;if(this.flipXY&&(e=flipChartAxisDirection(e)),e===ChartAxisDirection.X){if(!((null===(t=this.getCategoryAxis())||void 0===t?void 0:t.scale)instanceof ContinuousScale))return this.xData;var s=extent$4(this.xData)||[NaN,NaN];return a?s[0]=s[0]-(null!==(o=null===(r=this.smallestDataInterval)||void 0===r?void 0:r.x)&&void 0!==o?o:0):s[1]=s[1]+(null!==(n=null===(i=this.smallestDataInterval)||void 0===i?void 0:i.x)&&void 0!==n?n:0),s}return this.yDomain},t.prototype.getNodeClickEvent=function(e,t){return new CartesianSeriesNodeClickEvent(this.xKey,t.yKey,e,t,this)},t.prototype.getNodeDoubleClickEvent=function(e,t){return new CartesianSeriesNodeDoubleClickEvent(this.xKey,t.yKey,e,t,this)},t.prototype.getCategoryAxis=function(){return this.flipXY?this.yAxis:this.xAxis},t.prototype.getValueAxis=function(){return this.flipXY?this.xAxis:this.yAxis},t.prototype.calculateStep=function(e){var t,r=this.smallestDataInterval,o=this.getCategoryAxis();if(o){var i=(o.dataDomain[1]-o.dataDomain[0])/(null!==(t=null==r?void 0:r.x)&&void 0!==t?t:1)+1,n=Math.floor(e),a=Math.min(i,n);return e/Math.max(1,a)}},t.prototype.createNodeData=function(){return __awaiter$6(this,void 0,void 0,function(){var e,t,r,o,i,n,a,s,l,c,u,d,p,h,_,f,g,y,m,v,E,C,O,P,S,b,D,M,T,A,x,w,R=this;return __generator$6(this,function(I){return t=(e=this).data,r=e.visible,o=this.getCategoryAxis(),i=this.getValueAxis(),t&&r&&o&&i?(n=o.scale,a=i.scale,l=(s=this).groupScale,c=s.yKeys,u=s.cumYKeyCount,d=s.fills,p=s.strokes,h=s.strokeWidth,_=s.seriesItemEnabled,f=s.xData,g=s.yData,y=s.label,m=s.flipXY,v=s.id,E=y.fontStyle,C=y.fontWeight,O=y.fontSize,P=y.fontFamily,S=y.color,b=y.formatter,D=y.placement,M=n.bandwidth,n instanceof ContinuousScale&&(T=Math.max(o.range[0],o.range[1]),A=this.calculateStep(T),M=A),l.range=[0,M],l.padding=o instanceof CategoryAxis?o.groupPaddingInner:o instanceof GroupedCategoryAxis?.1:0,0===l.padding?l.round=!1:l.round=!0,x=l.bandwidth>=1?l.bandwidth:l.rawBandwidth,w=[],f.forEach(function(e,r){for(var i,s,f=t[r],y=n.convert(e),M=g[r],T=0;T<M.length;T++){var A=M[T];w[T]=null!==(i=w[T])&&void 0!==i?i:[];for(var I=0,L=0,N=0;N<A.length;N++){var k=+A[N],B=c[T][N],F=y+l.convert(String(T));if(w[T][N]=null!==(s=w[T][N])&&void 0!==s?s:{itemId:B,nodeData:[],labelData:[]},o.inRange(F,x)&&!isNaN(k)){var $,U=k<0?I:L,G=a.convert(U+k,{strict:!1}),W=a.convert(U,{strict:!1}),K=f[B];$=b?b({value:isNumber$4(K)?K:void 0,seriesId:v}):isNumber$4(K)?K.toFixed(2):"";var V=void 0,j=void 0;m?(j=F+x/2,V="inside"===D?G+(K>=0?-1:1)*Math.abs(W-G)/2:G+4*(K>=0?1:-1)):(V=F+x/2,j="inside"===D?G+(K>=0?1:-1)*Math.abs(W-G)/2:G+(K>=0?-3:4));var H=void 0,z=void 0;"inside"===D?(H="center",z="middle"):(H=m?K>=0?"start":"end":"center",z=m?"middle":K>=0?"bottom":"top");var Y=u[T]+N,X={index:r,series:R,itemId:B,datum:f,yValue:K,yKey:B,x:m?Math.min(G,W):F,y:m?F:Math.min(G,W),width:m?Math.abs(W-G):x,height:m?x:Math.abs(W-G),colorIndex:Y,fill:d[Y%d.length],stroke:p[Y%p.length],strokeWidth:h,label:_.get(B)&&$?{text:$,fontStyle:E,fontWeight:C,fontSize:O,fontFamily:P,textAlign:H,textBaseline:z,fill:S,x:V,y:j}:void 0};w[T][N].nodeData.push(X),w[T][N].labelData.push(X),k<0?I+=k:L+=k}}}}),[2,w.reduce(function(e,t){return e.concat.apply(e,__spread$i(t))},[])]):[2,[]]})})},t.prototype.nodeFactory=function(){return new Rect},t.prototype.updateDatumSelection=function(e){return __awaiter$6(this,void 0,void 0,function(){var t;return __generator$6(this,function(r){return t=e.nodeData,[2,e.datumSelection.update(t,function(e){return e.tag=BarSeriesNodeTag.Bar})]})})},t.prototype.updateDatumNodes=function(e){var t,r;return __awaiter$6(this,void 0,void 0,function(){var o,i,n,a,s,l,c,u,d,p,h,_,f,g,y,m,v,E,C,O,P,S,b=this;return __generator$6(this,function(D){return o=e.datumSelection,i=e.isHighlight,a=(n=this).fills,s=n.strokes,l=n.fillOpacity,c=n.strokeOpacity,u=n.shadow,d=n.formatter,p=n.xKey,h=n.flipXY,_=n.highlightStyle.item,f=_.fill,g=_.fillOpacity,y=void 0===g?l:g,m=_.stroke,v=_.strokeWidth,E=n.id,C=__read$u(null!==(r=null===(t=this.xAxis)||void 0===t?void 0:t.visibleRange)&&void 0!==r?r:[],2),O=C[0],P=C[1],S=!(0!==O||1!==P),o.each(function(e,t){var r=t.colorIndex,o=i&&void 0!==f?f:a[r%a.length],n=i&&void 0!==m?m:s[r%a.length],_=i&&void 0!==v?v:b.getStrokeWidth(b.strokeWidth,t),g=i?y:l,C=b.getStackGroup(t.yKey),O=void 0;d&&(O=d({datum:t.datum,fill:o,stroke:n,strokeWidth:_,highlighted:i,xKey:p,yKey:t.yKey,seriesId:E,stackGroup:C})),e.crisp=S,e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e.fill=O&&O.fill||o,e.stroke=O&&O.stroke||n,e.strokeWidth=O&&void 0!==O.strokeWidth?O.strokeWidth:_,e.fillOpacity=g,e.strokeOpacity=c,e.lineDash=b.lineDash,e.lineDashOffset=b.lineDashOffset,e.fillShadow=u,e.visible=h?t.width>0:t.height>0}),[2]})})},t.prototype.updateLabelSelection=function(e){return __awaiter$6(this,void 0,void 0,function(){var t,r,o,i;return __generator$6(this,function(n){return t=e.labelData,r=e.labelSelection,o=this.label.enabled,i=o?t:[],[2,r.update(i,function(e){e.tag=BarSeriesNodeTag.Label,e.pointerEvents=PointerEvents.None})]})})},t.prototype.updateLabelNodes=function(e){return __awaiter$6(this,void 0,void 0,function(){var t,r,o,i,n,a,s,l;return __generator$6(this,function(c){return t=e.labelSelection,r=this.label,o=r.enabled,i=r.fontStyle,n=r.fontWeight,a=r.fontSize,s=r.fontFamily,l=r.color,t.each(function(e,t){var r=t.label;r&&o?(e.fontStyle=i,e.fontWeight=n,e.fontSize=a,e.fontFamily=s,e.textAlign=r.textAlign,e.textBaseline=r.textBaseline,e.text=r.text,e.x=r.x,e.y=r.y,e.fill=l,e.visible=!0):e.visible=!1}),[2]})})},t.prototype.getTooltipHtml=function(e){var t=this,r=t.xKey,o=t.yKeys,i=t.yData,n=this.getCategoryAxis(),a=this.getValueAxis(),s=e.yKey;if(!(i.length&&r&&s&&n&&a))return"";for(var l=0,c=0,u=0;u<o.length;u++){var d=o[u];if((c=d.indexOf(s))>=0){l+=c;break}l+=d.length}var p=this,h=p.xName,_=p.yNames,f=p.fills,g=p.strokes,y=p.tooltip,m=p.formatter,v=p.id,E=y.renderer,C=e.datum,O=_[s],P=this.getStackGroup(s),S=f[l%f.length],b=g[l%f.length],D=this.getStrokeWidth(this.strokeWidth),M=C[r],T=C[s],A=sanitizeHtml(n.formatDatum(M)),x=sanitizeHtml(a.formatDatum(T)),w=sanitizeHtml(O),R=A+": "+x,I=void 0;m&&(I=m({datum:C,fill:S,stroke:b,strokeWidth:D,highlighted:!1,xKey:r,yKey:s,seriesId:v,stackGroup:P}));var L=I&&I.fill||S,N={title:w,backgroundColor:L,content:R};return E?toTooltipHtml$1(E({datum:C,xKey:r,xValue:M,xName:h,yKey:s,yValue:T,yName:O,color:L,title:w,seriesId:v,stackGroup:P}),N):toTooltipHtml$1(N)},t.prototype.getLegendData=function(){var e=this,t=e.id,r=e.data,o=e.xKey,i=e.yKeys,n=e.yNames,a=e.cumYKeyCount,s=e.seriesItemEnabled,l=e.hideInLegend,c=e.fills,u=e.strokes,d=e.fillOpacity,p=e.strokeOpacity,h=e.flipXY;if(!(r&&r.length&&o&&i.length))return[];var _=[];return this.yKeys.forEach(function(e,r){for(var o=h?0:e.length-1,i=h?1:-1,f=o,g=0;g<e.length;f+=i,g++){var y=e[f];if(l.indexOf(y)>=0)return;var m=a[r]+f;_.push({id:t,itemId:y,seriesId:t,enabled:s.get(y)||!1,label:{text:n[y]||y},marker:{fill:c[m%c.length],stroke:u[m%u.length],fillOpacity:d,strokeOpacity:p}})}}),_},t.prototype.toggleSeriesItem=function(t,r){e.prototype.toggleSeriesItem.call(this,t,r);var o=this.yKeys.map(function(e){return e.slice()});this.seriesItemEnabled.forEach(function(e,t){e||o.forEach(function(e){var r=e.indexOf(t);r>=0&&e.splice(r,1)})});var i=[];o.forEach(function(e,t){e.length>0&&i.push(String(t))}),this.groupScale.domain=i,this.nodeDataRefresh=!0},t.prototype.isLabelEnabled=function(){return this.label.enabled},t.className="BarSeries",t.type="bar",__decorate$1p([Validate(BOOLEAN)],t.prototype,"flipXY",void 0),__decorate$1p([Validate(COLOR_STRING_ARRAY)],t.prototype,"fills",void 0),__decorate$1p([Validate(COLOR_STRING_ARRAY)],t.prototype,"strokes",void 0),__decorate$1p([Validate(NUMBER(0,1))],t.prototype,"fillOpacity",void 0),__decorate$1p([Validate(NUMBER(0,1))],t.prototype,"strokeOpacity",void 0),__decorate$1p([Validate(OPT_LINE_DASH)],t.prototype,"lineDash",void 0),__decorate$1p([Validate(NUMBER(0))],t.prototype,"lineDashOffset",void 0),__decorate$1p([Validate(OPT_FUNCTION)],t.prototype,"formatter",void 0),__decorate$1p([Validate(STRING)],t.prototype,"_xKey",void 0),__decorate$1p([Validate(STRING)],t.prototype,"xName",void 0),__decorate$1p([Validate(STRING_ARRAY)],t.prototype,"hideInLegend",void 0),__decorate$1p([Validate(BOOLEAN_ARRAY)],t.prototype,"visibles",void 0),__decorate$1p([Validate(BOOLEAN)],t.prototype,"_grouped",void 0),__decorate$1p([Validate(OPT_NUM
2BER())],t.prototype,"_normalizedTo",void 0),__decorate$1p([Validate(NUMBER(0))],t.prototype,"strokeWidth",void 0),t}(CartesianSeries),__extends$21=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$1o=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},__awaiter$5=function(e,t,r,o){return new(r||(r=Promise))(function(i,n){function a(e){try{l(o.next(e))}catch(e){n(e)}}function s(e){try{l(o.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})},__generator$5=function(e,t){var r,o,i,n,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return n={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function s(n){return function(s){return function(n){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(i=2&n[0]?o.return:n[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,n[1])).done)return i;switch(o=0,i&&(n=[2&n[0],i.value]),n[0]){case 0:case 1:i=n;break;case 4:return a.label++,{value:n[1],done:!1};case 5:a.label++,o=n[1],n=[0];continue;case 7:n=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==n[0]&&2!==n[0])){a=0;continue}if(3===n[0]&&(!i||n[1]>i[0]&&n[1]<i[3])){a.label=n[1];break}if(6===n[0]&&a.label<i[1]){a.label=i[1],i=n;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(n);break}i[2]&&a.ops.pop(),a.trys.pop();continue}n=t.call(e,a)}catch(e){n=[6,e],o=0}finally{r=i=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,s])}}},__read$t=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},__spread$h=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read$t(arguments[t]));return e},HISTOGRAM_AGGREGATIONS=["count","sum","mean"],HISTOGRAM_AGGREGATION=predicateWithMessage(function(e){return HISTOGRAM_AGGREGATIONS.includes(e)},"expecting a histogram aggregation keyword such as 'count', 'sum' or 'mean"),HistogramSeriesNodeTag;!function(e){e[e.Bin=0]="Bin",e[e.Label=1]="Label"}(HistogramSeriesNodeTag||(HistogramSeriesNodeTag={}));var HistogramSeriesLabel=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.formatter=void 0,t}return __extends$21(t,e),__decorate$1o([Validate(OPT_FUNCTION)],t.prototype,"formatter",void 0),t}(Label$1),defaultBinCount=10,aggregationFunctions={count:function(e){return e.data.length},sum:function(e,t){return e.data.reduce(function(e,r){return e+r[t]},0)},mean:function(e,t){return aggregationFunctions.sum(e,t)/aggregationFunctions.count(e,t)}},HistogramBin=function(){function e(e){var t=__read$t(e,2),r=t[0],o=t[1];this.data=[],this.aggregatedValue=0,this.frequency=0,this.domain=[r,o]}return e.prototype.addDatum=function(e){this.data.push(e),this.frequency++},Object.defineProperty(e.prototype,"domainWidth",{get:function(){var e=__read$t(this.domain,2),t=e[0];return e[1]-t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"relativeHeight",{get:function(){return this.aggregatedValue/this.domainWidth},enumerable:!1,configurable:!0}),e.prototype.calculateAggregatedValue=function(e,t){t||(e="count");var r=aggregationFunctions[e];this.aggregatedValue=r(this,t)},e.prototype.getY=function(e){return e?this.relativeHeight:this.aggregatedValue},e}(),HistogramSeriesTooltip=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.renderer=void 0,t}return __extends$21(t,e),__decorate$1o([Validate(OPT_FUNCTION)],t.prototype,"renderer",void 0),t}(SeriesTooltip),HistogramSeries=function(e){function t(){var t=e.call(this,{pickModes:[SeriesNodePickMode.EXACT_SHAPE_MATCH]})||this;
2return t.binnedData=[],t.xDomain=[],t.yDomain=[],t.label=new HistogramSeriesLabel,t.tooltip=new HistogramSeriesTooltip,t.fill=void 0,t.stroke=void 0,t.fillOpacity=1,t.strokeOpacity=1,t.lineDash=[0],t.lineDashOffset=0,t.xKey="",t.areaPlot=!1,t.bins=void 0,t.aggregation="count",t.binCount=void 0,t.xName="",t.yKey="",t.yName="",t.strokeWidth=1,t.shadow=void 0,t.label.enabled=!1,t}return __extends$21(t,e),t.prototype.deriveBins=function(){var e=this,t=this.bins;if(!this.data)return[];var r=this.data.map(function(t){return t[e.xKey]}),o=this.fixNumericExtent(extent$4(r));if(void 0===this.binCount){if(t)return t;var i=ticks(o[0],o[1],defaultBinCount),n=tickStep(o[0],o[1],defaultBinCount),a=i[0];return __spread$h([[a-n,a]],i.map(function(e){return[e,e+n]}))}return this.calculateNiceBins(o,this.binCount)},t.prototype.calculateNiceBins=function(e,t){var r=Math.floor(e[0]),o=e[1],i=t||1,n=this.calculateNiceStart(r,o,i),a=n.start,s=n.binSize;return this.getBins(a,o,s,i)},t.prototype.getBins=function(e,t,r,o){for(var i=[],n=0;n<o;n++){var a=Math.round(10*(e+n*r))/10,s=Math.round(10*(e+(n+1)*r))/10;n===o-1&&(s=Math.max(s,t)),i[n]=[a,s]}return i},t.prototype.calculateNiceStart=function(e,t,r){var o=Math.abs(t-e)/r,i=Math.floor(Math.log10(o)),n=Math.pow(10,i);return{start:Math.floor(e/n)*n,binSize:o}},t.prototype.placeDataInBins=function(e){var t=this,r=this.xKey,o=this.deriveBins();this.bins=o;for(var i=e.slice().sort(function(e,t){return e[r]<t[r]?-1:e[r]>t[r]?1:0}),n=[new HistogramBin(o[0])],a=0,s=0;s<i.length&&a<o.length;s++){for(var l=i[s];l[r]>o[a][1]&&a<o.length;)a++,n.push(new HistogramBin(o[a]));a<o.length&&n[a].addDatum(l)}return n.forEach(function(e){return e.calculateAggregatedValue(t.aggregation,t.yKey)}),n},Object.defineProperty(t.prototype,"xMax",{get:function(){var e=this;return this.data&&this.data.reduce(function(t,r){return Math.max(t,r[e.xKey])},Number.NEGATIVE_INFINITY)},enumerable:!1,configurable:!0}),t.prototype.processData=function(){return __awaiter$5(this,void 0,void 0,function(){var e,t,r,o,i,n,a,s,l,c=this;return __generator$5(this,function(u){return t=(e=this).xKey,r=e.data,this.binnedData=this.placeDataInBins(t&&r?r:[]),o=this.binnedData.map(function(e){return e.getY(c.areaPlot)}),i=extent$4(o),this.yDomain=this.fixNumericExtent([0,i?i[1]:1]),n=this.binnedData[0],a=this.binnedData[this.binnedData.length-1],s=n.domain[0],l=a.domain[1],this.xDomain=[s,l],[2]})})},t.prototype.getDomain=function(e){return e===ChartAxisDirection.X?this.xDomain:this.yDomain},t.prototype.getNodeClickEvent=function(e,t){return new CartesianSeriesNodeClickEvent(this.xKey,this.yKey,e,t,this)},t.prototype.getNodeDoubleClickEvent=function(e,t){return new CartesianSeriesNodeDoubleClickEvent(this.xKey,this.yKey,e,t,this)},t.prototype.createNodeData=function(){return __awaiter$5(this,void 0,void 0,function(){var e,t,r,o,i,n,a,s,l,c,u,d,p,h,_,f,g,y,m,v,E=this;return __generator$5(this,function(C){return t=(e=this).xAxis,r=e.yAxis,this.seriesItemEnabled&&t&&r?(o=t.scale,i=r.scale,a=(n=this).fill,s=n.stroke,l=n.strokeWidth,c=n.id,u=[],d=function(e){return String(e.value)},p=this.label,h=p.formatter,_=void 0===h?d:h,f=p.fontStyle,g=p.fontWeight,y=p.fontSize,m=p.fontFamily,v=p.color,this.binnedData.forEach(function(e){var t=e.aggregatedValue,r=e.frequency,n=__read$t(e.domain,2),d=n[0],p=n[1],h=e.relativeHeight,C=o.convert(d),O=o.convert(p),P=E.areaPlot?h:E.yKey?t:r,S=i.convert(0),b=i.convert(P),D=O-C,M=Math.abs(b-S),T=0!==P?{text:_({value:e.aggregatedValue,seriesId:c}),fontStyle:f,fontWeight:g,fontSize:y,fontFamily:m,fill:v,x:C+D/2,y:b+M/2}:void 0;u.push({series:E,datum:e,x:C,y:b,width:D,height:M,fill:a,stroke:s,strokeWidth:l,label:T})}),[2,[{itemId:this.yKey,nodeData:u,labelData:u}]]):[2,[]]})})},t.prototype.nodeFactory=function(){return new Rect},t.prototype.updateDatumSelection=function(e){return __awaiter$5(this,void 0,void 0,function(){var t;return __generator$5(this,function(r){return t=e.nodeData,[2,e.datumSelection.update(t,function(e){e.tag=HistogramSeriesNodeTag.Bin,e.crisp=!0})]})})},t.prototype.updateDatumNodes=function(e){return __awaiter$5(this,void 0,void 0,function(){var t,r,o,i,n,a,s,l,c,u,d,p,h=this;return __generator$5(this,function(_){return t=e.datumSelection,r=e.isHighlight,i=(o=this).fillOpacity,n=o.strokeOpacity,a=o.shadow,s=o.highlightStyle.item,l=s.fill,c=s.fillOpacity,u=void 0===c?i:c,d=s.stroke,p=s.strokeWidth,t.each(function(e,t,o){var s=r&&void 0!==p?p:t.strokeWidth,c=r?u:i;e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e.fill=r&&void 0!==l?l:t.fill,e.stroke=r&&void 0!==d?d:t.stroke,e.fillOpacity=c,e.strokeOpacity=n,e.strokeWidth=s,e.lineDash=h.lineDash,e.lineDashOffset=h.lineDashOffset,e.fillShadow=a,e.zIndex=r?Series.highlightedZIndex:o,e.visible=t.height>0}),[2]})})},t.prototype.updateLabelSelection=function(e){return __awaiter$5(this,void 0,void 0,function(){var t;return __generator$5(this,function(r){return t=e.labelData,[2,e.labelSelection.update(t,function(e){e.tag=HistogramSeriesNodeTag.Label,e.pointerEvents=PointerEvents.None,e.textAlign="center",e.textBaseline="middle"})]})})},t.prototype.updateLabelNodes=function(e){return __awaiter$5(this,void 0,void 0,function(){var t,r;return __generator$5(this,function(o){return t=e.labelSelection,r=this.label.enabled,t.each(function(e,t){var o=t.label;o&&r?(e.text=o.text,e.x=o.x,e.y=o.y,e.fontStyle=o.fontStyle,e.fontWeight=o.fontWeight,e.fontSize=o.fontSize,e.fontFamily=o.fontFamily,e.fill=o.fill,e.visible=!0):e.visible=!1}),[2]})})},t.prototype.getTooltipHtml=function(e){var t=this,r=t.xKey,o=t.yKey,i=t.xAxis,n=t.yAxis;if(!r||!i||!n)return"";var a=this,s=a.xName,l=a.yName,c=a.fill,u=a.tooltip,d=a.aggregation,p=a.id,h=u.renderer,_=e.datum,f=_.aggregatedValue,g=_.frequency,y=__read$t(_.domain,2),m=y[0],v=y[1],E=sanitizeHtml(s||r)+": "+i.formatDatum(m)+" - "+i.formatDatum(v),C=o?"<b>"+sanitizeHtml(l||o)+" ("+d+")</b>: "+n.formatDatum(f)+"<br>":"",O={title:E,backgroundColor:c,content:C+="<b>Frequency</b>: "+g};return h?toTooltipHtml$1(h({datum:_,xKey:r,xValue:_.domain,xName:s,yKey:o,yValue:_.aggregatedValue,yName:l,color:c,title:E,seriesId:p}),O):toTooltipHtml$1(O)},t.prototype.getLegendData=function(){var e=this,t=e.id,r=e.data,o=e.xKey,i=e.yName,n=e.visible,a=e.fill,s=e.stroke,l=e.fillOpacity,c=e.strokeOpacity;return r&&0!==r.length?[{id:t,itemId:o,seriesId:t,enabled:n,label:{text:i||o||"Frequency"},marker:{fill:a||"rgba(0, 0, 0, 0)",stroke:s||"rgba(0, 0, 0, 0)",fillOpacity:l,strokeOpacity:c}}]:[]},t.prototype.isLabelEnabled=function(){return this.label.enabled},t.className="HistogramSeries",t.type="histogram",__decorate$1o([Validate(OPT_COLOR_STRING)],t.prototype,"fill",void 0),__decorate$1o([Validate(OPT_COLOR_STRING)],t.prototype,"stroke",void 0),__decorate$1o([Validate(NUMBER(0,1))],t.prototype,"fillOpacity",void 0),__decorate$1o([Validate(NUMBER(0,1))],t.prototype,"strokeOpacity",void 0),__decorate$1o([Validate(OPT_LINE_DASH)],t.prototype,"lineDash",void 0),__decorate$1o([Validate(NUMBER(0))],t.prototype,"lineDashOffset",void 0),__decorate$1o([Validate(STRING)],t.prototype,"xKey",void 0),__decorate$1o([Validate(BOOLEAN)],t.prototype,"areaPlot",void 0),__decorate$1o([Validate(OPT_ARRAY())],t.prototype,"bins",void 0),__decorate$1o([Validate(HISTOGRAM_AGGREGATION)],t.prototype,"aggregation",void 0),__decorate$1o([Validate(OPT_NUM
2BER(0))],t.prototype,"binCount",void 0),__decorate$1o([Validate(STRING)],t.prototype,"xName",void 0),__decorate$1o([Validate(STRING)],t.prototype,"yKey",void 0),__decorate$1o([Validate(STRING)],t.prototype,"yName",void 0),__decorate$1o([Validate(NUMBER(0))],t.prototype,"strokeWidth",void 0),t}(CartesianSeries),__extends$20=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$1n=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},__awaiter$4=function(e,t,r,o){return new(r||(r=Promise))(function(i,n){function a(e){try{l(o.next(e))}catch(e){n(e)}}function s(e){try{l(o.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})},__generator$4=function(e,t){var r,o,i,n,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return n={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function s(n){return function(s){return function(n){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(i=2&n[0]?o.return:n[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,n[1])).done)return i;switch(o=0,i&&(n=[2&n[0],i.value]),n[0]){case 0:case 1:i=n;break;case 4:return a.label++,{value:n[1],done:!1};case 5:a.label++,o=n[1],n=[0];continue;case 7:n=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==n[0]&&2!==n[0])){a=0;continue}if(3===n[0]&&(!i||n[1]>i[0]&&n[1]<i[3])){a.label=n[1];break}if(6===n[0]&&a.label<i[1]){a.label=i[1],i=n;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(n);break}i[2]&&a.ops.pop(),a.trys.pop();continue}n=t.call(e,a)}catch(e){n=[6,e],o=0}finally{r=i=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,s])}}},__values$c=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},__read$s=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},LineSeriesLabel=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.formatter=void 0,t}return __extends$20(t,e),__decorate$1n([Validate(OPT_FUNCTION)],t.prototype,"formatter",void 0),t}(Label$1),LineSeriesTooltip=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.renderer=void 0,t.format=void 0,t}return __extends$20(t,e),__decorate$1n([Validate(OPT_FUNCTION)],t.prototype,"renderer",void 0),__decorate$1n([Validate(OPT_STRING)],t.prototype,"format",void 0),t}(SeriesTooltip),LineSeries=function(e){function t(){var t=e.call(this,{hasMarkers:!0,pickModes:[SeriesNodePickMode.NEAREST_BY_MAIN_CATEGORY_AXIS_FIRST,SeriesNodePickMode.NEAREST_NODE,SeriesNodePickMode.EXACT_SHAPE_MATCH]})||this;t.xDomain=[],t.yDomain=[],t.pointsData=[],t.marker=new CartesianSeriesMarker,t.label=new LineSeriesLabel,t.title=void 0,t.stroke="#874349",t.lineDash=[0],t.lineDashOffset=0,t.strokeWidth=2,t.strokeOpacity=1,t.tooltip=new LineSeriesTooltip,t._xKey="",t.xName="",t._yKey="",t.yName="";var r=t,o=r.marker,i=r.label;return o.fill="#c16068",o.stroke="#874349",i.enabled=!1,t}return __extends$20(t,e),Object.defineProperty(t.prototype,"xKey",{get:function(){return this._xKey},set:function(e){this._xKey=e,this.pointsData.splice(0)}
2,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"yKey",{get:function(){return this._yKey},set:function(e){this._yKey=e,this.pointsData.splice(0)},enumerable:!1,configurable:!0}),t.prototype.getDomain=function(e){return e===ChartAxisDirection.X?this.xDomain:this.yDomain},t.prototype.processData=function(){return __awaiter$4(this,void 0,void 0,function(){var e,t,r,o,i,n,a,s,l,c,u,d,p,h,_,f,g,y,m,v;return __generator$4(this,function(E){if(t=(e=this).xAxis,r=e.yAxis,o=e.xKey,i=e.yKey,n=e.pointsData,a=o&&i&&this.data?this.data:[],!t||!r)return[2];s=t.scale instanceof ContinuousScale,l=r.scale instanceof ContinuousScale,c=[],u=[],n.splice(0);try{for(d=__values$c(a),p=d.next();!p.done;p=d.next())h=p.value,_=h[o],f=h[i],g=checkDatum(_,s),s&&void 0===g||(y=checkDatum(f,l),c.push(g),u.push(y),n.push({xDatum:g,yDatum:y,datum:h}))}catch(e){m={error:e}}finally{try{p&&!p.done&&(v=d.return)&&v.call(d)}finally{if(m)throw m.error}}return this.validateXYData(this.xKey,this.yKey,a,t,r,c,u,1),this.xDomain=s?this.fixNumericExtent(extent$4(c),t):c,this.yDomain=l?this.fixNumericExtent(extent$4(u),r):u,[2]})})},t.prototype.createNodeData=function(){var e;return __awaiter$4(this,void 0,void 0,function(){var t,r,o,i,n,a,s,l,c,u,d,p,h,_,f,g,y,m,v,E,C,O,P,S,b,D,M,T,A,x,w,R,I,L;return __generator$4(this,function(N){if(r=(t=this).data,o=t.xAxis,i=t.yAxis,n=t.marker,a=n.enabled,s=n.size,l=n.strokeWidth,!r||!o||!i)return[2,[]];for(u=(c=this).pointsData,d=c.label,p=c.yKey,h=c.id,_=o.scale,f=i.scale,g=(_.bandwidth||0)/2,y=(f.bandwidth||0)/2,m=new Array(r.length),v=a?s:0,E=!0,C=void 0,O=void 0,P=0,S=0;S<u.length;S++)if(void 0===(b=O||u[S]).yDatum)C=void 0,E=!0;else{if(D=b.xDatum,M=b.yDatum,T=b.datum,A=_.convert(D)+g,isNaN(A)){C=void 0,E=!0;continue}if(x=(_.bandwidth||.5*s+(l||0))+1,O=void 0===(null===(e=u[S+1])||void 0===e?void 0:e.yDatum)?void 0:u[S+1],w=o.inRangeEx(A,0,x),R=O&&o.inRangeEx(_.convert(O.xDatum)+g,0,x),-1===w&&-1===R){E=!0;continue}if(1===w&&1===C){E=!0;continue}C=w,I=f.convert(M)+y,void 0,L=d.formatter?d.formatter({value:M,seriesId:h}):"number"==typeof M&&isFinite(M)?M.toFixed(2):M?String(M):"",m[P++]={series:this,datum:T,point:{x:A,y:I,moveTo:E,size:v},label:L?{text:L,fontStyle:d.fontStyle,fontWeight:d.fontWeight,fontSize:d.fontSize,fontFamily:d.fontFamily,textAlign:"center",textBaseline:"bottom",fill:d.color}:void 0},E=!1}return m.length=P,[2,[{itemId:p,nodeData:m,labelData:m}]]})})},t.prototype.isPathOrSelectionDirty=function(){return this.marker.isDirty()},t.prototype.updatePaths=function(e){return __awaiter$4(this,void 0,void 0,function(){var t,r,o,i,n,a,s,l,c;return __generator$4(this,function(u){t=e.contextData.nodeData,r=__read$s(e.paths,1),o=r[0],i=o.path,o.fill=void 0,o.lineJoin="round",o.pointerEvents=PointerEvents.None,i.clear({trackChanges:!0});try{for(n=__values$c(t),a=n.next();!a.done;a=n.next())(s=a.value).point.moveTo?i.moveTo(s.point.x,s.point.y):i.lineTo(s.point.x,s.point.y)}catch(e){l={error:e}}finally{try{a&&!a.done&&(c=n.return)&&c.call(n)}finally{if(l)throw l.error}}return o.checkPathDirty(),[2]})})},t.prototype.updatePathNodes=function(e){return __awaiter$4(this,void 0,void 0,function(){var t,r;return __generator$4(this,function(o){return t=__read$s(e.paths,1),(r=t[0]).stroke=this.stroke,r.strokeWidth=this.getStrokeWidth(this.strokeWidth),r.strokeOpacity=this.strokeOpacity,r.lineDash=this.lineDash,r.lineDashOffset=this.lineDashOffset,[2]})})},t.prototype.markerFactory=function(){return new(getMarker$1(this.marker.shape))},t.prototype.updateMarkerSelection=function(e){return __awaiter$4(this,void 0,void 0,function(){var t,r,o,i,n;return __generator$4(this,function(a){return t=e.nodeData,r=e.markerSelection,o=this.marker,i=o.shape,n=o.enabled,t=i&&n?t:[],this.marker.isDirty()&&r.clear(),[2,r.update(t)]})})},t.prototype.updateMarkerNodes=function(e){return __awaiter$4(this,void 0,void 0,function(){var t,r,o,i,n,a,s,l,c,u,d,p,h,_,f,g,y,m,v,E;return __generator$4(this,function(C){return t=e.markerSelection,r=e.isHighlight,i=(o=this).marker,n=o.marker.fillOpacity,a=o.xKey,s=o.yKey,l=o.stroke,c=o.strokeOpacity,u=o.highlightStyle.item,d=u.f
2ill,p=u.fillOpacity,h=void 0===p?n:p,_=u.stroke,f=u.strokeWidth,g=o.id,y=i.size,m=i.formatter,v=void 0!==i.strokeWidth?i.strokeWidth:this.strokeWidth,E="function"==typeof i.shape,t.each(function(e,t){var o,u,p=r&&void 0!==d?d:i.fill,C=r?h:n,O=r&&void 0!==_?_:i.stroke||l,P=r&&void 0!==f?f:v,S=void 0;m&&(S=m({datum:t.datum,xKey:a,yKey:s,fill:p,stroke:O,strokeWidth:P,size:y,highlighted:r,seriesId:g})),e.fill=S&&S.fill||p,e.stroke=S&&S.stroke||O,e.strokeWidth=S&&void 0!==S.strokeWidth?S.strokeWidth:P,e.fillOpacity=null!=C?C:1,e.strokeOpacity=null!==(u=null!==(o=i.strokeOpacity)&&void 0!==o?o:c)&&void 0!==u?u:1,e.size=S&&void 0!==S.size?S.size:y,e.translationX=t.point.x,e.translationY=t.point.y,e.visible=e.size>0&&!isNaN(t.point.x)&&!isNaN(t.point.y),E&&!e.dirtyPath&&(e.path.clear({trackChanges:!0}),e.updatePath(),e.checkPathDirty())}),r||this.marker.markClean(),[2]})})},t.prototype.updateLabelSelection=function(e){return __awaiter$4(this,void 0,void 0,function(){var t,r,o,i,n;return __generator$4(this,function(a){return t=e.labelData,r=e.labelSelection,o=this.marker,i=o.shape,n=o.enabled,t=i&&n?t:[],[2,r.update(t)]})})},t.prototype.updateLabelNodes=function(e){return __awaiter$4(this,void 0,void 0,function(){var t,r,o,i,n,a,s,l;return __generator$4(this,function(c){return t=e.labelSelection,r=this.label,o=r.enabled,i=r.fontStyle,n=r.fontWeight,a=r.fontSize,s=r.fontFamily,l=r.color,t.each(function(e,t){var r=t.point,c=t.label;t&&c&&o?(e.fontStyle=i,e.fontWeight=n,e.fontSize=a,e.fontFamily=s,e.textAlign=c.textAlign,e.textBaseline=c.textBaseline,e.text=c.text,e.x=r.x,e.y=r.y-10,e.fill=l,e.visible=!0):e.visible=!1}),[2]})})},t.prototype.getNodeClickEvent=function(e,t){return new CartesianSeriesNodeClickEvent(this.xKey,this.yKey,e,t,this)},t.prototype.getNodeDoubleClickEvent=function(e,t){return new CartesianSeriesNodeDoubleClickEvent(this.xKey,this.yKey,e,t,this)},t.prototype.getTooltipHtml=function(e){var t=this,r=t.xKey,o=t.yKey,i=t.xAxis,n=t.yAxis;if(!(r&&o&&i&&n))return"";var a=this,s=a.xName,l=a.yName,c=a.tooltip,u=a.marker,d=a.id,p=c.renderer,h=c.format,_=e.datum,f=_[r],g=_[o],y=i.formatDatum(f),m=n.formatDatum(g),v=sanitizeHtml(this.title||l),E=sanitizeHtml(y+": "+m),C=u.formatter,O=u.fill,P=u.stroke,S=u.strokeWidth,b=u.size,D=void 0!==S?S:this.strokeWidth,M=void 0;C&&(M=C({datum:_,xKey:r,yKey:o,fill:O,stroke:P,strokeWidth:D,size:b,highlighted:!1,seriesId:d}));var T=M&&M.fill||O,A={title:v,backgroundColor:T,content:E};if(h||p){var x={datum:_,xKey:r,xValue:f,xName:s,yKey:o,yValue:g,yName:l,title:v,color:T,seriesId:d};if(h)return toTooltipHtml$1({content:interpolate(h,x)},A);if(p)return toTooltipHtml$1(p(x),A)}return toTooltipHtml$1(A)},t.prototype.getLegendData=function(){var e,t,r,o=this,i=o.id,n=o.data,a=o.xKey,s=o.yKey,l=o.yName,c=o.visible,u=o.title,d=o.marker,p=o.stroke,h=o.strokeOpacity;return n&&n.length&&a&&s?[{id:i,itemId:s,seriesId:i,enabled:c,label:{text:u||l||s},marker:{shape:d.shape,fill:d.fill||"rgba(0, 0, 0, 0)",stroke:d.stroke||p||"rgba(0, 0, 0, 0)",fillOpacity:null!==(e=d.fillOpacity)&&void 0!==e?e:1,strokeOpacity:null!==(r=null!==(t=d.strokeOpacity)&&void 0!==t?t:h)&&void 0!==r?r:1}}]:[]},t.prototype.isLabelEnabled=function(){return this.label.enabled},t.className="LineSeries",t.type="line",__decorate$1n([Validate(OPT_STRING)],t.prototype,"title",void 0),__decorate$1n([Validate(OPT_COLOR_STRING)],t.prototype,"stroke",void 0),__decorate$1n([Validate(OPT_LINE_DASH)],t.prototype,"lineDash",void 0),__decorate$1n([Validate(NUMBER(0))],t.prototype,"lineDashOffset",void 0),__decorate$1n([Validate(NUMBER(0))],t.prototype,"strokeWidth",void 0),__decorate$1n([Validate(NUMBER(0,1))],t.prototype,"strokeOpacity",void 0),__decorate$1n([Validate(STRING)],t.prototype,"_xKey",void 0),__decorate$1n([Validate(STRING)],t.prototype,"xName",void 0),__decorate$1n([Validate(STRING)],t.prototype,"_yKey",void 0),__decorate$1n([Validate(STRING)],t.prototype,"yName",void 0),t}(CartesianSeries),__extends$1$=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__assign$w=function(){return __assign$w=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$w.apply(this,arguments)},__decorate$1m=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},__awaiter$3=function(e,t,r,o){return new(r||(r=Promise))(function(i,n){function a(e){try{l(o.next(e))}catch(e){n(e)}}function s(e){try{l(o.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})},__generator$3=function(e,t){var r,o,i,n,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return n={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function s(n){return function(s){return function(n){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(i=2&n[0]?o.return:n[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,n[1])).done)return i;switch(o=0,i&&(n=[2&n[0],i.value]),n[0]){case 0:case 1:i=n;break;case 4:return a.label++,{value:n[1],done:!1};case 5:a.label++,o=n[1],n=[0];continue;case 7:n=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==n[0]&&2!==n[0])){a=0;continue}if(3===n[0]&&(!i||n[1]>i[0]&&n[1]<i[3])){a.label=n[1];break}if(6===n[0]&&a.label<i[1]){a.label=i[1],i=n;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(n);break}i[2]&&a.ops.pop(),a.trys.pop();continue}n=t.call(e,a)}catch(e){n=[6,e],o=0}finally{r=i=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,s])}}},ScatterSeriesNodeBaseClickEvent=function(e){function t(t,r,o,i,n,a){var s=e.call(this,r,o,i,n,a)||this;return s.sizeKey=t,s}return __extends$1$(t,e),t}(CartesianSeriesNodeBaseClickEvent),ScatterSeriesNodeClickEvent=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="nodeClick",t}return __extends$1$(t,e),t}(ScatterSeriesNodeBaseClickEvent),ScatterSeriesNodeDoubleClickEvent=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="nodeDoubleClick",t}return __extends$1$(t,e),t}(ScatterSeriesNodeBaseClickEvent),ScatterSeriesTooltip=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.renderer=void 0,t}return __extends$1$(t,e),__decorate$1m([Validate(OPT_FUNCTION)],t.prototype,"renderer",void 0),t}(SeriesTooltip),ScatterSeries=function(e){function t(){var t=e.call(this,{pickModes:[SeriesNodePickMode.NEAREST_BY_MAIN_CATEGORY_AXIS_FIRST,SeriesNodePickMode.NEAREST_NODE,SeriesNodePickMode.EXACT_SHAPE_MATCH],pathsPerSeries:0,hasMarkers:!0})||this;
2return t.xDomain=[],t.yDomain=[],t.xData=[],t.yData=[],t.validData=[],t.sizeData=[],t.sizeScale=new LinearScale$1,t.marker=new CartesianSeriesMarker,t.label=new Label$1,t.title=void 0,t.labelKey=void 0,t.xName="",t.yName="",t.sizeName="Size",t.labelName="Label",t._xKey="",t._yKey="",t._sizeKey=void 0,t.tooltip=new ScatterSeriesTooltip,t.label.enabled=!1,t}return __extends$1$(t,e),Object.defineProperty(t.prototype,"xKey",{get:function(){return this._xKey},set:function(e){this._xKey=e,this.xData=[]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"yKey",{get:function(){return this._yKey},set:function(e){this._yKey=e,this.yData=[]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeKey",{get:function(){return this._sizeKey},set:function(e){this._sizeKey=e,this.sizeData=[]},enumerable:!1,configurable:!0}),t.prototype.processData=function(){return __awaiter$3(this,void 0,void 0,function(){var e,t,r,o,i,n,a,s,l,c,u,d;return __generator$3(this,function(p){return t=(e=this).xKey,r=e.yKey,o=e.sizeKey,i=e.xAxis,n=e.yAxis,a=e.marker,i&&n?(s=t&&r&&this.data?this.data:[],l=i.scale,c=n.scale,u=l instanceof ContinuousScale,d=c instanceof ContinuousScale,this.validData=s.filter(function(e){return void 0!==checkDatum(e[t],u)&&void 0!==checkDatum(e[r],d)}),this.xData=this.validData.map(function(e){return e[t]}),this.yData=this.validData.map(function(e){return e[r]}),this.validateXYData(this.xKey,this.yKey,s,i,n,this.xData,this.yData,1),this.sizeData=o?this.validData.map(function(e){return e[o]}):[],this.sizeScale.domain=a.domain?a.domain:extent$4(this.sizeData)||[1,1],i.scale instanceof ContinuousScale?this.xDomain=this.fixNumericExtent(extent$4(this.xData),i):this.xDomain=this.xData,n.scale instanceof ContinuousScale?this.yDomain=this.fixNumericExtent(extent$4(this.yData),n):this.yDomain=this.yData,[2]):[2]})})},t.prototype.getDomain=function(e){return e===ChartAxisDirection.X?this.xDomain:this.yDomain},t.prototype.getNodeClickEvent=function(e,t){return new ScatterSeriesNodeClickEvent(this.sizeKey,this.xKey,this.yKey,e,t,this)},t.prototype.getNodeDoubleClickEvent=function(e,t){return new ScatterSeriesNodeDoubleClickEvent(this.sizeKey,this.xKey,this.yKey,e,t,this)},t.prototype.createNodeData=function(){return __awaiter$3(this,void 0,void 0,function(){var e,t,r,o,i,n,a,s,l,c,u,d,p,h,_,f,g,y,m,v,E,C,O,P,S,b,D,M,T,A,x;return __generator$3(this,function(w){if(t=(e=this).data,r=e.visible,o=e.xAxis,i=e.yAxis,n=e.yKey,a=e.label,s=e.labelKey,!(t&&r&&o&&i))return[2,[]];for(l=o.scale,c=i.scale,u=l instanceof ContinuousScale,d=c instanceof ContinuousScale,p=(l.bandwidth||0)/2,h=(c.bandwidth||0)/2,f=(_=this).xData,g=_.yData,y=_.validData,m=_.sizeData,v=_.sizeScale,E=_.marker,C=new Array(f.length),v.range=[E.size,E.maxSize],O=a.getFont(),P=0,S=0;S<f.length;S++)(b=this.checkDomainXY(f[S],g[S],u,d))&&(D=l.convert(b[0])+p,M=c.convert(b[1])+h,this.checkRangeXY(D,M,o,i)&&(T=s?String(y[S][s]):"",A=HdpiCanvas.getTextSize(T,O),x=m.length?v.convert(m[S]):E.size,C[P++]={series:this,itemId:n,datum:y[S],point:{x:D,y:M,size:x},label:__assign$w({text:T},A)}));return C.length=P,[2,[{itemId:this.yKey,nodeData:C,labelData:C}]]})})},t.prototype.isPathOrSelectionDirty=function(){return this.marker.isDirty()},t.prototype.getLabelData=function(){var e;return null===(e=this.contextNodeData)||void 0===e?void 0:e.reduce(function(e,t){return e.concat(t.labelData)},[])},t.prototype.markerFactory=function(){return new(getMarker$1(this.marker.shape))},t.prototype.updateMarkerSelection=function(e){return __awaiter$3(this,void 0,void 0,function(){var t,r,o,i;return __generator$3(this,function(n){return t=e.nodeData,r=e.markerSelection,o=this.marker.enabled,this.marker.isDirty()&&r.clear(),i=o?t:[],[2,r.update(i)]})})},t.prototype.updateMarkerNodes=function(e){return __awaiter$3(this,void 0,void 0,function(){var t,r,o,i,n,a,s,l,c,u,d,p,h,_,f,g,y,m,v,E;return __generator$3(this,function(C){return t=e.markerSelection,r=e.isHighlight,i=(o=this).marker,n=o.xKey,a=o.yKey,s=o.sizeScale,l=o.marker,c=l.fillOpacity,u=l.strokeOpacity,d=l.strokeWidth,p=o.highlightStyle.item,h=p.fill,_=p.fillOpacity,f=void 0===_?c:_,g=p.stroke,y=p.strokeWidth,m=o.id,v=i.formatter,s.range=[i.size,i.maxSize],E="function"==typeof i.shape,t.each(function(e,t){var o,s,l,p,_,C,O,P
2=r&&void 0!==h?h:i.fill,S=r?f:c,b=r&&void 0!==g?g:i.stroke,D=u,M=r&&void 0!==y?y:null!=d?d:1,T=null!==(s=null===(o=t.point)||void 0===o?void 0:o.size)&&void 0!==s?s:0,A=void 0;v&&(A=v({datum:t.datum,xKey:n,yKey:a,fill:P,stroke:b,strokeWidth:M,size:T,highlighted:r,seriesId:m})),e.fill=A&&A.fill||P,e.stroke=A&&A.stroke||b,e.strokeWidth=null!==(l=null==A?void 0:A.strokeWidth)&&void 0!==l?l:M,e.size=A&&void 0!==A.size?A.size:T,e.fillOpacity=null!=S?S:1,e.strokeOpacity=null!=D?D:1,e.translationX=null!==(_=null===(p=t.point)||void 0===p?void 0:p.x)&&void 0!==_?_:0,e.translationY=null!==(O=null===(C=t.point)||void 0===C?void 0:C.y)&&void 0!==O?O:0,e.visible=e.size>0,E&&!e.dirtyPath&&(e.path.clear({trackChanges:!0}),e.updatePath(),e.checkPathDirty())}),r||this.marker.markClean(),[2]})})},t.prototype.updateLabelSelection=function(e){var t,r;return __awaiter$3(this,void 0,void 0,function(){var o,i,n,a;return __generator$3(this,function(s){return o=e.labelSelection,i=this.label.enabled,n=i&&null!==(r=null===(t=this.chart)||void 0===t?void 0:t.placeLabels().get(this))&&void 0!==r?r:[],a=n.map(function(e){return __assign$w(__assign$w({},e.datum),{point:{x:e.x,y:e.y,size:e.datum.point.size}})}),[2,o.update(a)]})})},t.prototype.updateLabelNodes=function(e){return __awaiter$3(this,void 0,void 0,function(){var t,r;return __generator$3(this,function(o){return t=e.labelSelection,r=this.label,t.each(function(e,t){var o,i,n,a;e.text=t.label.text,e.fill=r.color,e.x=null!==(i=null===(o=t.point)||void 0===o?void 0:o.x)&&void 0!==i?i:0,e.y=null!==(a=null===(n=t.point)||void 0===n?void 0:n.y)&&void 0!==a?a:0,e.fontStyle=r.fontStyle,e.fontWeight=r.fontWeight,e.fontSize=r.fontSize,e.fontFamily=r.fontFamily,e.textAlign="left",e.textBaseline="top"}),[2]})})},t.prototype.getTooltipHtml=function(e){var t,r,o,i=this,n=i.xKey,a=i.yKey,s=i.xAxis,l=i.yAxis;if(!(n&&a&&s&&l))return"";var c=this,u=c.marker,d=c.tooltip,p=c.xName,h=c.yName,_=c.sizeKey,f=c.sizeName,g=c.labelKey,y=c.labelName,m=c.id,v=u.fill,E=u.stroke,C=this.getStrokeWidth(null!==(t=u.strokeWidth)&&void 0!==t?t:1),O=this.marker.formatter,P=void 0;O&&(P=O({datum:e,xKey:n,yKey:a,fill:v,stroke:E,strokeWidth:C,size:null!==(o=null===(r=e.point)||void 0===r?void 0:r.size)&&void 0!==o?o:0,highlighted:!1,seriesId:m}));var S=P&&P.fill||v||"gray",b=this.title||h,D=e.datum,M=D[n],T=D[a],A=sanitizeHtml(s.formatDatum(M)),x=sanitizeHtml(l.formatDatum(T)),w="<b>"+sanitizeHtml(p||n)+"</b>: "+A+"<br><b>"+sanitizeHtml(h||a)+"</b>: "+x;_&&(w+="<br><b>"+sanitizeHtml(f||_)+"</b>: "+sanitizeHtml(D[_])),g&&(w="<b>"+sanitizeHtml(y||g)+"</b>: "+sanitizeHtml(D[g])+"<br>"+w);var R={title:b,backgroundColor:S,content:w},I=d.renderer;return I?toTooltipHtml$1(I({datum:D,xKey:n,xValue:M,xName:p,yKey:a,yValue:T,yName:h,sizeKey:_,sizeName:f,labelKey:g,labelName:y,title:b,color:S,seriesId:m}),R):toTooltipHtml$1(R)},t.prototype.getLegendData=function(){var e=this,t=e.id,r=e.data,o=e.xKey,i=e.yKey,n=e.yName,a=e.title,s=e.visible,l=e.marker,c=l.fill,u=l.stroke,d=l.fillOpacity,p=l.strokeOpacity;return r&&r.length&&o&&i?[{id:t,itemId:i,seriesId:t,enabled:s,label:{text:a||n||i},marker:{shape:l.shape,fill:l.fill||c||"rgba(0, 0, 0, 0)",stroke:l.stroke||u||"rgba(0, 0, 0, 0)",fillOpacity:null!=d?d:1,strokeOpacity:null!=p?p:1}}]:[]},t.prototype.isLabelEnabled=function(){return this.label.enabled},t.className="ScatterSeries",t.type="scatter",__decorate$1m([Validate(OPT_STRING)],t.prototype,"title",void 0),__decorate$1m([Validate(OPT_STRING)],t.prototype,"labelKey",void 0),__decorate$1m([Validate(STRING)],t.prototype,"xName",void 0),__decorate$1m([Validate(STRING)],t.prototype,"yName",void 0),__decorate$1m([Validate(OPT_STRING)],t.prototype,"sizeName",void 0),__decorate$1m([Validate(OPT_STRING)],t.prototype,"labelName",void 0),__decorate$1m([Validate(STRING)],t.prototype,"_xKey",void 0),__decorate$1m([Validate(STRING)],t.prototype,"_yKey",void 0),__decorate$1m([Validate(OPT_STRING)],t.prototype,"_sizeKey",void 0),t}(CartesianSeries),__extends$1_=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$1l=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},Sector=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.centerX=0,t.centerY=0,t.innerRadius=10,t.outerRadius=20,t.startAngle=0,t.endAngle=2*Math.PI,t.angleOffset=0,t}return __extends$1_(t,e),t.prototype.computeBBox=function(){var e=this.outerRadius;return new BBox(this.centerX-e,this.centerY-e,2*e,2*e)},t.prototype.updatePath=function(){var e=this.path,t=this.angleOffset,r=Math.min(this.startAngle,this.endAngle)+t,o=Math.max(this.startAngle,this.endAngle)+t,i=Math.min(this.innerRadius,this.outerRadius),n=Math.max(this.innerRadius,this.outerRadius),a=isEqual$2(normalizeAngle360(this.startAngle),normalizeAngle360(this.endAngle)),s=this.centerX,l=this.centerY;e.clear(),a?(e.arc(s,l,n,r,o),i>0&&(e.moveTo(s+i*Math.cos(o),l+i*Math.sin(o)),e.arc(s,l,i,o,r,!0))):(e.moveTo(s+i*Math.cos(r),l+i*Math.sin(r)),e.arc(s,l,n,r,o),i>0?e.arc(s,l,i,o,r,!0):e.lineTo(s,l)),e.closePath(),this.dirtyPath=!1}
2,t.prototype.isPointInPath=function(e,t){var r=this.angleOffset,o=normalizeAngle360Inclusive(Math.min(this.startAngle,this.endAngle)+r),i=normalizeAngle360Inclusive(Math.max(this.startAngle,this.endAngle)+r),n=Math.min(this.innerRadius,this.outerRadius),a=Math.max(this.innerRadius,this.outerRadius),s=this.transformPoint(e,t),l=s.x-this.centerX,c=s.y-this.centerY,u=Math.sqrt(Math.pow(l,2)+Math.pow(c,2));if(u<n||u>a)return!1;var d=normalizeAngle360Inclusive(Math.atan2(c,l));return o>i?o<d||i>d:o===i||o<d&&i>d},t.className="Sector",__decorate$1l([ScenePathChangeDetection()],t.prototype,"centerX",void 0),__decorate$1l([ScenePathChangeDetection()],t.prototype,"centerY",void 0),__decorate$1l([ScenePathChangeDetection()],t.prototype,"innerRadius",void 0),__decorate$1l([ScenePathChangeDetection()],t.prototype,"outerRadius",void 0),__decorate$1l([ScenePathChangeDetection()],t.prototype,"startAngle",void 0),__decorate$1l([ScenePathChangeDetection()],t.prototype,"endAngle",void 0),__decorate$1l([ScenePathChangeDetection()],t.prototype,"angleOffset",void 0),t}(Path),__extends$1Z=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__assign$v=function(){return __assign$v=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$v.apply(this,arguments)},__decorate$1k=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},__awaiter$2=function(e,t,r,o){return new(r||(r=Promise))(function(i,n){function a(e){try{l(o.next(e))}catch(e){n(e)}}function s(e){try{l(o.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})},__generator$2=function(e,t){var r,o,i,n,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return n={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function s(n){return function(s){return function(n){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(i=2&n[0]?o.return:n[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,n[1])).done)return i;switch(o=0,i&&(n=[2&n[0],i.value]),n[0]){case 0:case 1:i=n;break;case 4:return a.label++,{value:n[1],done:!1};case 5:a.label++,o=n[1],n=[0];continue;case 7:n=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==n[0]&&2!==n[0])){a=0;continue}if(3===n[0]&&(!i||n[1]>i[0]&&n[1]<i[3])){a.label=n[1];break}if(6===n[0]&&a.label<i[1]){a.label=i[1],i=n;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(n);break}i[2]&&a.ops.pop(),a.trys.pop();continue}n=t.call(e,a)}catch(e){n=[6,e],o=0}finally{r=i=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,s])}}},__read$r=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},__spread$g=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read$r(arguments[t]));return e},PieSeriesNodeBaseClickEvent=function(e){function t(t,r,o,i,n,a,s){var l=e.call(this,n,a,s)||this;return l.angleKey=t,l.calloutLabelKey=r,l.sectorLabelKey=o,l.radiusKey=i,l}return __extends$1Z(t,e),__decorate$1k([DeprecatedAndRenamedTo("calloutLabelKey")],t.prototype,"labelKey",void 0),t}(SeriesNodeBaseClickEvent),PieSeriesNodeClickEvent=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="nodeClick",t}return __extends$1Z(t,e),t}(PieSeriesNodeBaseClickEvent),PieSeriesNodeDoubleClickEvent=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="nodeDoubleClick",t}return __extends$1Z(t,e),t}(PieSeriesNodeBaseClickEvent),PieNodeTag;!function(e){e[e.Sector=0]="Sector",e[e.Callout=1]="Callout",e[e.Label=2]="Label"}(PieNodeTag||(PieNodeTag={}));var PieSeriesCalloutLabel=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.offset=3,t.minAngle=20,t.formatter=void 0,t}return __extends$1Z(t,e),__decorate$1k([Validate(NUMBER(0))],t.prototype,"offset",void 0),__decorate$1k([Validate(NUMBER(0))],t.prototype,"minAngle",void 0),__decorate$1k([Validate(OPT_FUNCTION)],t.prototype,"formatter",void 0),t}(Label$1),PieSeriesSectorLabel=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.positionOffset=0,t.positionRatio=.5,t.formatter=void 0,t}return __extends$1Z(t,e),__decorate$1k([Validate(NUMBER())],t.prototype,"positionOffset",void 0),__decorate$1k([Validate(NUMBER(0,1))],t.prototype,"positionRatio",void 0),__decorate$1k([Validate(OPT_FUNCTION)],t.prototype,"formatter",void 0),t}(Label$1),PieSeriesCalloutLine=function(){function e(){this.colors=void 0,this.length=10,this.strokeWidth=1}return __decorate$1k([Validate(OPT_COLOR_STRING_ARRAY)],e.prototype,"colors",void 0),__decorate$1k([Validate(NUMBER(0))],e.prototype,"length",void 0),__decorate$1k([Validate(NUMBER(0))],e.prototype,"strokeWidth",void 0),e}(),PieSeriesTooltip=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.renderer=void 0,t}return __extends$1Z(t,e),__decorate$1k([Validate(OPT_FUNCTION)],t.prototype,"renderer",void 0),t}(SeriesTooltip),PieTitle=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.showInLegend=!1,t}return __extends$1Z(t,e),__decorate$1k([Validate(BOOLEAN)],t.prototype,"showInLegend",void 0),t}(Caption),DoughnutInnerLabel=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.text="",t.margin=2,t}return __extends$1Z(t,e),__decorate$1k([Validate(STRING)],t.prototype,"text",void 0),__decorate$1k([Validate(NUMBER())],t.prototype,"margin",void 0),t}(Label$1),DoughnutInnerCircle=function(){function e(){this.fill="transparent",this.fillOpacity=1}return __decorate$1k([Validate(COLOR_STRING)],e.prototype,"fill",void 0),__decorate$1k([Validate(OPT_NUM
2BER(0,1))],e.prototype,"fillOpacity",void 0),e}();function isPointInArc(e,t,r){var o=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),i=r.innerRadius,n=r.outerRadius;if(o<Math.min(i,n)||o>Math.max(i,n))return!1;var a=Math.atan2(t,e);a<-Math.PI/2&&(a+=2*Math.PI);var s=r.startAngle,l=r.endAngle;return l===-Math.PI/2?a<s:s===3*Math.PI/2?a>l:a>=l&&a<=s}var PieSeries=function(e){function t(){var t,r=e.call(this,{useLabelLayer:!0})||this;r.radiusScale=new LinearScale$1,r.groupSelection=Selection.select(r.contentGroup,Group),r.highlightSelection=Selection.select(r.highlightGroup,Group),r.groupSelectionData=[],r.sectorFormatData=[],r.angleScale=((t=new LinearScale$1).domain=[0,1],t.range=[-Math.PI,Math.PI].map(function(e){return e+Math.PI/2}),t),r.seriesItemEnabled=[],r.calloutLabel=new PieSeriesCalloutLabel,r.label=r.calloutLabel,r.sectorLabel=new PieSeriesSectorLabel,r.calloutLine=new PieSeriesCalloutLine,r.callout=r.calloutLine,r.tooltip=new PieSeriesTooltip,r.angleKey="",r.angleName="",r.innerLabels=[],r.radiusKey=void 0,r.radiusName=void 0,r.radiusMin=void 0,r.radiusMax=void 0,r.calloutLabelKey=void 0,r.calloutLabelName=void 0,r.labelKey=void 0,r.labelName=void 0,r.sectorLabelKey=void 0,r.sectorLabelName=void 0,r.fills=["#c16068","#a2bf8a","#ebcc87","#80a0c3","#b58dae","#85c0d1"],r.strokes=["#874349","#718661","#a48f5f","#5a7088","#7f637a","#5d8692"],r.fillOpacity=1,r.strokeOpacity=1,r.lineDash=[0],r.lineDashOffset=0,r.formatter=void 0,r.rotation=0,r.outerRadiusOffset=0,r.outerRadiusRatio=1,r.innerRadiusOffset=0,r.innerRadiusRatio=1,r.strokeWidth=1,r.shadow=void 0,r.highlightStyle=new HighlightStyle,r.datumSectorRefs=new WeakMap,r.backgroundGroup=r.rootGroup.appendChild(new Group({name:r.id+"-background",layer:!0,zIndex:Layers.SERIES_BACKGROUND_ZINDEX}));var o=new Group({name:"pieCalloutLabels"}),i=new Group({name:"pieSectorLabels"}),n=new Group({name:"innerLabels"});return r.labelGroup.append(o),r.labelGroup.append(i),r.labelGroup.append(n),r.calloutLabelSelection=Selection.select(o,Group),r.sectorLabelSelection=Selection.select(i,Text),r.innerLabelsSelection=Selection.select(n,Text),r}return __extends$1Z(t,e),Object.defineProperty(t.prototype,"title",{get:function(){return this._title},set:function(e){var t,r,o=this._title;o!==e&&(o&&(null===(t=this.labelGroup)||void 0===t||t.removeChild(o.node)),e&&(e.node.textBaseline="bottom",null===(r=this.labelGroup)||void 0===r||r.appendChild(e.node)),this._title=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"data",{get:function(){return this._data},set:function(e){this._data=e,this.processSeriesItemEnabled()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"innerCircle",{get:function(){return this._innerCircleConfig},set:function(e){var t;if(this._innerCircleConfig!==e){var r=this._innerCircleNode,o=void 0;r&&this.backgroundGroup.removeChild(r),e&&((o=new Circle).fill=e.fill,o.fillOpacity=null!==(t=e.fillOpacity)&&void 0!==t?t:1,this.backgroundGroup.appendChild(o)),this._innerCircleConfig=e,this._innerCircleNode=o}},enumerable:!1,configurable:!0}),t.prototype.visibleChanged=function(){this.processSeriesItemEnabled()},t.prototype.processSeriesItemEnabled=function(){var e=this.data,t=this.visible;this.seriesItemEnabled=(null==e?void 0:e.map(function(){return t}))||[]},t.prototype.getDomain=function(e){return e===ChartAxisDirection.X?this.angleScale.domain:this.radiusScale.domain},t.prototype.processData=function(){return __awaiter$2(this,void 0,void 0,function(){var e,t,r,o,i,n,a,s,l,c,u,d,p,h,_,f,g,y,m,v,E,C,O,P,S,b,D,M,T,A,x,w,R,I,L,N=this;return __generator$2(this,function(k){var B;return t=(e=this).angleKey,r=e.radiusKey,o=e.seriesItemEnabled,i=e.angleScale,n=e.groupSelectionData,a=e.sectorFormatData,s=e.calloutLabel,l=e.sectorLabel,c=e.id,u=t&&this.data?this.data:[],d=u.map(function(e,r){return o[r]&&Math.abs(+e[t])||0}),p=d.reduce(function(e,t){return e+t},0),B=0,h=d.map(function(e){return B+=e/p}),_=s.formatter,f=s.enabled?this.calloutLabelKey:void 0,g=l.enabled?this.sectorLabelKey:void 0,y=[],m=[],v=[],E=function(e){return{datum:e,angleKey:t,angleValue:e[t],angleName:N.angleName,radiusKey:r,radiusValue:r?e[r]:void 0,radiusName:N.radiusName,labelKey:f,labelValue:f?e[f]:void 0,labelName:N.calloutLabelName,calloutLabelKey:f,calloutLabelValue:f?e[f]:void 0,calloutLabelName:N.calloutLabelName,sectorLabelKey:g,
2sectorLabelValue:g?e[g]:void 0,sectorLabelName:N.sectorLabelName,seriesId:c}},f&&(_?(C=function(){return Logger.warnOnce("the use of { value } in the pie chart label formatter function is deprecated. Please use { datum, labelKey, ... } instead.")},y=u.map(function(e){var t=e[f],r=__assign$v(__assign$v({},E(e)),{get value(){return C(),t},set value(e){C(),t=e}});return _(r)})):y=u.map(function(e){return String(e[f])})),O=l.formatter,g&&(m=O?u.map(function(e){var t=E(e);return O(t)}):u.map(function(e){return String(e[g])})),r&&(S=(P=this).radiusMin,b=P.radiusMax,D=u.map(function(e){return Math.abs(e[r])}),M=null!=S?S:0,T=b||Math.max.apply(Math,__spread$g(D)),A=T-M,v=D.map(function(e){return A?(e-M)/A:1})),n.length=0,a.length=0,a.push.apply(a,__spread$g(u.map(function(e,t){return N.getSectorFormat(e,t,t,!1)}))),x=toRadians$1(this.rotation),w=Math.PI/2,R=0,I=[{textAlign:"center",textBaseline:"bottom"},{textAlign:"left",textBaseline:"middle"},{textAlign:"center",textBaseline:"hanging"},{textAlign:"right",textBaseline:"middle"}],L=0,h.forEach(function(e){if(!isNaN(e)){var t=r?v[R]:1,o=i.convert(e)+x,l=i.convert(L)+x,c=(o+l)/2,d=Math.abs(l-o),p=Math.cos(c),h=Math.sin(c),_=toRadians$1(s.minAngle),E=f&&d>_,C=normalizeAngle180(c)- -3*Math.PI/4,O=mod(Math.floor(C/w),I.length),P=I[O],S=P.textAlign,b=P.textBaseline,D=u[R],M=R;n.push({series:N,datum:D,itemId:M,index:R,radius:t,startAngle:o,endAngle:l,midAngle:c,midCos:p,midSin:h,calloutLabel:E?{text:y[R],textAlign:S,textBaseline:b,hidden:!1}:void 0,sectorLabel:g?{text:m[R]}:void 0,sectorFormat:a[R]}),R++,L=e}}),[2]})})},t.prototype.getSectorFormat=function(e,t,r,o){var i,n,a,s,l,c,u=this,d=u.angleKey,p=u.radiusKey,h=u.fills,_=u.strokes,f=u.fillOpacity,g=u.formatter,y=u.id,m=null===(i=this.highlightManager)||void 0===i?void 0:i.getActiveHighlight(),v=o&&(null==m?void 0:m.series)===this&&t===m.itemId,E=v?this.highlightStyle.item:null,C=(null==E?void 0:E.fill)||h[r%h.length],O=null!==(n=null==E?void 0:E.fillOpacity)&&void 0!==n?n:f,P=(null==E?void 0:E.stroke)||_[r%_.length],S=null!==(a=null==E?void 0:E.strokeWidth)&&void 0!==a?a:this.getStrokeWidth(this.strokeWidth);return g&&(c=g({datum:e,angleKey:d,radiusKey:p,fill:C,stroke:P,strokeWidth:S,highlighted:v,seriesId:y})),{fill:(null==c?void 0:c.fill)||C,fillOpacity:null!==(s=null==c?void 0:c.fillOpacity)&&void 0!==s?s:O,stroke:(null==c?void 0:c.stroke)||P,strokeWidth:null!==(l=null==c?void 0:c.strokeWidth)&&void 0!==l?l:S}},t.prototype.createNodeData=function(){return __awaiter$2(this,void 0,void 0,function(){return __generator$2(this,function(e){return[2,[]]})})},t.prototype.getInnerRadius=function(){var e=this,t=e.radius,r=e.innerRadiusRatio,o=t*(null!=r?r:1)+(e.innerRadiusOffset||0);return o===t||o<0?0:o},t.prototype.getOuterRadius=function(){var e=this,t=e.radius,r=e.outerRadiusRatio,o=t*(null!=r?r:1)+(e.outerRadiusOffset||0);return o<0?0:o},t.prototype.updateRadiusScale=function(){var e=this.getInnerRadius(),t=this.getOuterRadius();this.radiusScale.range=[e,t]},t.prototype.getTitleTranslationY=function(){var e=Math.max(0,this.radiusScale.range[1]);return 0===e?NaN:-e-2},t.prototype.update=function(){return __awaiter$2(this,void 0,void 0,function(){var e,t;return __generator$2(this,function(r){switch(r.label){case 0:return e=this.title,this.updateRadiusScale(),this.rootGroup.translationX=this.centerX,this.rootGroup.translationY=this.centerY,e&&(t=this.getTitleTranslationY(),isFinite(t)?(e.node.visible=e.enabled,e.node.translationY=t):e.node.visible=!1),[4,this.updateSelections()];case 1:return r.sent(),[4,this.updateNodes()];case 2:return r.sent(),[2]}})})},t.prototype.updateSelections=function(){return __awaiter$2(this,void 0,void 0,function(){return __generator$2(this,function(e){switch(e.label){case 0:return[4,this.updateGroupSelection()];case 1:return e.sent(),[2]}})})},t.prototype.updateGroupSelection=function(){return __awaiter$2(this,void 0,void 0,function(){var e,t,r,o,i,n,a,s=this;return __generator$2(this,function(l){return t=(e=this).groupSelection,r=e.highlightSelection,o=e.calloutLabelSelection,i=e.sectorLabelSelection,n=e.innerLabelsSelection,a=function(e){return e.update(s.groupSelectionData,function(e){var t=new Sector;t.tag=PieNodeTag.Sector,e.appendChild(t)})},this.groupSelection=a(t),this.highlightSelection=a(r),o.update(this.groupSelectionData,function(e){var t=new Line;t.tag=PieNodeTag.Callout,t.pointerEvents=PointerEvents.None,e.appendChild(t);var r=new Text;r.tag=PieNodeTag.Label,r.pointerEvents=PointerEvents.None,e.appendChild(r)}),i.update(this.groupSelectionData,function(e){e.pointerEvents=PointerEvents.None}),n.update(this.innerLabels,function(e){e.pointerEvents=PointerEvents.None}),[2]})})},t.prototype.updateNodes=function(){var e;return __awaiter$2(this,void 0,void 0,function(){var t,r,o,i,n,a=this;return __generator$2(this,function(s){return t=null===(e=this.highlightManager)||void 0===e?void 0:e.getActiveHighlight(),r=this.seriesItemEnabled.indexOf(!0)>=0,this.rootGroup.visible=r,this.backgroundGroup.visible=r,this.contentGroup.visible=r,this.highlightGroup.visible=r&&(null==t?void 0:t.series)===this,this.labelGroup.visible=r,this.contentGroup.opacity=this.getOpacity(),this.updateInnerCircle(),o=this.radiusScale,i=o.convert(0),n=function(e,t,r,n){var s=o.convert(t.radius),l=e.parent,c=null==l?void 0:l.parent;n&&l&&c&&(c.removeChild(l),c.appendChild(l)),e.innerRadius=Math.max(0,i),e.outerRadius=Math.max(0,s),e.startAngle=t.startAngle,e.endAngle=t.endAngle;
2var u=a.getSectorFormat(t.datum,t.itemId,r,n);e.fill=u.fill,e.stroke=u.stroke,e.strokeWidth=u.strokeWidth,e.fillOpacity=u.fillOpacity,e.strokeOpacity=a.strokeOpacity,e.lineDash=a.lineDash,e.lineDashOffset=a.lineDashOffset,e.fillShadow=a.shadow,e.lineJoin="round",e.visible=a.seriesItemEnabled[r],a.datumSectorRefs.set(t,e)},this.groupSelection.selectByTag(PieNodeTag.Sector).forEach(function(e,t){return n(e,e.datum,t,!1)}),this.highlightSelection.selectByTag(PieNodeTag.Sector).forEach(function(e,r){var o=(null==t?void 0:t.series)===a&&e.datum.itemId===t.itemId;e.visible=o,e.visible&&n(e,e.datum,r,o)}),this.updateCalloutLineNodes(),this.updateCalloutLabelNodes(),this.updateSectorLabelNodes(),this.updateInnerLabelNodes(),[2]})})},t.prototype.updateCalloutLineNodes=function(){var e=this.radiusScale,t=this.calloutLine,r=t.length,o=t.strokeWidth,i=t.colors||this.strokes;this.calloutLabelSelection.selectByTag(PieNodeTag.Callout).forEach(function(t,n){var a=t.datum,s=e.convert(a.radius),l=Math.max(0,s);a.calloutLabel&&0!==l&&!a.calloutLabel.hidden?(t.strokeWidth=o,t.stroke=i[n%i.length],t.x1=a.midCos*l,t.y1=a.midSin*l,t.x2=a.midCos*(l+r),t.y2=a.midSin*(l+r),t.visible=!0):t.visible=!1})},t.prototype.getLabelOverflow=function(e,t){var r=this.chart.getSeriesRect(),o=r.x-this.centerX,i=r.x+r.width-this.centerX,n=r.y-this.centerY,a=r.y+r.height-this.centerY,s=1;t.x+1<o?s=(t.x+t.width-o)/t.width:t.x+t.width-1>i&&(s=(i-t.x)/t.width);var l=t.y+1<n||t.y+t.height-1>a;return{visibleTextPart:s,textLength:Math.floor(e.length*s)-1,hasVerticalOverflow:l}},t.prototype.updateCalloutLabelNodes=function(){var e=this,t=this,r=t.radiusScale,o=t.calloutLabel,i=t.calloutLine.length,n=o.offset,a=o.color,s=new Text;this.calloutLabelSelection.selectByTag(PieNodeTag.Label).forEach(function(t){var o=t.datum,l=o.calloutLabel,c=r.convert(o.radius),u=Math.max(0,c);if(l&&0!==u&&!l.hidden){var d=u+i+n,p=o.midCos*d,h=o.midSin*d;e.setTextDimensionalProps(s,p,h,e.calloutLabel,l);var _=s.computeBBox(),f=e.getLabelOverflow(l.text,_),g=f.visibleTextPart,y=f.textLength,m=f.hasVerticalOverflow,v=1===g?l.text:l.text.substring(0,y)+"…";e.setTextDimensionalProps(t,p,h,e.calloutLabel,__assign$v(__assign$v({},l),{text:v})),t.fill=a,t.visible=!m}else t.visible=!1})},t.prototype.computeLabelsBBox=function(e){var t=this,r=this,o=r.radiusScale,i=r.calloutLabel,n=r.calloutLine.length,a=i.offset;this.updateRadiusScale();var s=new Text,l=this.groupSelectionData.map(function(r){var i=r.calloutLabel,l=o.convert(r.radius),c=Math.max(0,l);if(!i||0===c)return null;var u=c+n+a,d=r.midCos*u,p=r.midSin*u;t.setTextDimensionalProps(s,d,p,t.calloutLabel,i);var h=s.computeBBox();if(e.hideWhenNecessary){var _=t.getLabelOverflow(i.text,h),f=_.textLength;if(_.hasVerticalOverflow||f<2)return i.hidden=!0,null}return i.hidden=!1,h}).filter(function(e){return null!=e});if(this.title&&this.title.text){var c=this.getTitleTranslationY();if(isFinite(c)){this.setTextDimensionalProps(s,0,c,this.title,{text:this.title.text,textBaseline:"bottom",textAlign:"center",hidden:!1});var u=s.computeBBox();l.push(u)}}return 0===l.length?null:BBox.merge(l)},t.prototype.setTextDimensionalProps=function(e,t,r,o,i){var n=o.fontStyle,a=o.fontWeight,s=o.fontSize,l=o.fontFamily;e.fontStyle=n,e.fontWeight=a,e.fontSize=s,e.fontFamily=l,e.text=i.text,e.x=t,e.y=r,e.textAlign=i.textAlign,e.textBaseline=i.textBaseline},t.prototype.updateSectorLabelNodes=function(){var e=this,t=this.radiusScale,r=t.convert(0),o=this.sectorLabel,i=o.fontSize,n=o.fontStyle,a=o.fontWeight,s=o.fontFamily,l=o.positionOffset,c=o.positionRatio,u=o.color,d=r>0,p=1===this.seriesItemEnabled.filter(Boolean).length;this.sectorLabelSelection.each(function(o,h){var _=h.sectorLabel,f=t.convert(h.radius),g=Math.max(0,f),y=!1;if(_&&0!==g){var m=r*(1-c)+f*c+l;if(o.fill=u,o.fontStyle=n,o.fontWeight=a,o.fontSize=i,o.fontFamily=s,o.text=_.text,!d&&p?(o.x=0,o.y=0):(o.x=h.midCos*m,o.y=h.midSin*m),o.textAlign="center",o.textBaseline="middle",e.datumSectorRefs.get(h)){var v=o.computeBBox(),E=[[v.x,v.y],[v.x+v.width,v.y],[v.x+v.width,v.y+v.height],[v.x,v.y+v.height]],C={startAngle:h.startAngle,endAngle:h.endAngle,innerRadius:r,outerRadius:g};E.every(function(e){var t=__read$r(e,2);return isPointInArc(t[0],t[1],C)})&&(y=!0)}}o.visible=y})},t.prototype.updateInnerCircle=function(){var e=this._innerCircleNode;if(e){var t=this.getInnerRadius();if(0===t)e.size=0;else{var r=Math.min(t,this.getOuterRadius());e.size=Math.ceil(2*r+1)}}},t.prototype.updateInnerLabelNodes=function(){var e=[],t=[];this.innerLabelsSelection.each(function(r,o){var i=o.fontStyle,n=o.fontWeight,a=o.fontSize,s=o.fontFamily,l=o.color;r.fontStyle=i,r.fontWeight=n,r.fontSize=a,r.fontFamily=s,r.text=o.text,r.x=0,r.y=0,r.fill=l,r.textAlign="center",r.textBaseline="alphabetic",e.push(r.computeBBox()),t.push(o.margin)});for(var r=function(e){return 0===e?0:t[e]},o=function(e){return e===t.length-1?0:t[e]},i=e.reduce(function(e,t,i){return e+t.height+r(i)+o(i)},0),n=Math.max.apply(Math,__spread$g(e.map(function(e){return e.width}))),a=this.getInnerRadius(),s=Math.sqrt(Math.pow(n/2,2)+Math.pow(i/2,2))<=(a>0?a:this.getOuterRadius()),l=[],c=0,u=-i/2;c<e.length;c++){var d=e[c].height+u+r(c);l.push(d),u=d+o(c)}this.innerLabelsSelection.each(function(e,t,r){e.y=l[r],e.visible=s})},t.prototype.getNodeClickEvent=function(e,t){return new PieSeriesNodeClickEvent(this.angleKey,this.calloutLabelKey,this.sectorLabelKey,this.radiusKey,e,t,this)},t.prototype.getNodeDoubleClickEvent=function(e,t){return new PieSeriesNodeDoubleClickEvent(this.angleKey,this.calloutLabelKey,this.sectorLabelKey,this.radiusKey,e,t,this)},t.prototype.getTooltipHtml=function(e){var t=this.angleKey;if(!t)return"";var r=this,o=r.tooltip,i=r.angleName,n=r.radiusKey,a=r.radiusName,s=r.calloutLabelKey,l=r.sectorLabelKey,c=r.calloutLabelName,u=r.sectorLabelName,d=r.id,p=o.renderer,h=e.sectorFormat.fill,_=e.datum,f=s?_[s]+": ":"",g=_[t],y="number"==typeof g?toFixed(g):g.toString(),m=this.title?this.title.text:void 0,v={t
2itle:m,backgroundColor:h,content:f+y};return p?toTooltipHtml$1(p({datum:_,angleKey:t,angleValue:g,angleName:i,radiusKey:n,radiusValue:n?_[n]:void 0,radiusName:a,labelKey:s,labelName:c,calloutLabelKey:s,calloutLabelName:c,sectorLabelKey:l,sectorLabelName:u,title:m,color:h,seriesId:d}),v):toTooltipHtml$1(v)},t.prototype.getLegendData=function(){var e=this,t=this,r=t.calloutLabelKey,o=t.data,i=t.sectorFormatData;if(o&&o.length&&r){var n=this.id,a=[],s=this.title&&this.title.showInLegend&&this.title.text;return o.forEach(function(t,o){var l=[];s&&l.push(s),l.push(String(t[r])),a.push({id:n,itemId:o,seriesId:n,enabled:e.seriesItemEnabled[o],label:{text:l.join(" - ")},marker:{fill:i[o].fill,stroke:i[o].stroke,fillOpacity:e.fillOpacity,strokeOpacity:e.strokeOpacity}})}),a}return[]},t.prototype.toggleSeriesItem=function(e,t){this.seriesItemEnabled[e]=t,this.nodeDataRefresh=!0},t.className="PieSeries",t.type="pie",__decorate$1k([DeprecatedAndRenamedTo("calloutLabel")],t.prototype,"label",void 0),__decorate$1k([DeprecatedAndRenamedTo("calloutLine")],t.prototype,"callout",void 0),__decorate$1k([Validate(STRING)],t.prototype,"angleKey",void 0),__decorate$1k([Validate(STRING)],t.prototype,"angleName",void 0),__decorate$1k([Validate(OPT_STRING)],t.prototype,"radiusKey",void 0),__decorate$1k([Validate(OPT_STRING)],t.prototype,"radiusName",void 0),__decorate$1k([Validate(OPT_NUMBER(0))],t.prototype,"radiusMin",void 0),__decorate$1k([Validate(OPT_NUMBER(0))],t.prototype,"radiusMax",void 0),__decorate$1k([Validate(OPT_STRING)],t.prototype,"calloutLabelKey",void 0),__decorate$1k([Validate(OPT_STRING)],t.prototype,"calloutLabelName",void 0),__decorate$1k([DeprecatedAndRenamedTo("calloutLabelKey")],t.prototype,"labelKey",void 0),__decorate$1k([DeprecatedAndRenamedTo("calloutLabelName")],t.prototype,"labelName",void 0),__decorate$1k([Validate(OPT_STRING)],t.prototype,"sectorLabelKey",void 0),__decorate$1k([Validate(OPT_STRING)],t.prototype,"sectorLabelName",void 0),__decorate$1k([Validate(COLOR_STRING_ARRAY)],t.prototype,"fills",void 0),__decorate$1k([Validate(COLOR_STRING_ARRAY)],t.prototype,"strokes",void 0),__decorate$1k([Validate(NUMBER(0,1))],t.prototype,"fillOpacity",void 0),__decorate$1k([Validate(NUMBER(0,1))],t.prototype,"strokeOpacity",void 0),__decorate$1k([Validate(OPT_LINE_DASH)],t.prototype,"lineDash",void 0),__decorate$1k([Validate(NUMBER(0))],t.prototype,"lineDashOffset",void 0),__decorate$1k([Validate(OPT_FUNCTION)],t.prototype,"formatter",void 0),__decorate$1k([Validate(NUMBER(-360,360))],t.prototype,"rotation",void 0),__decorate$1k([Validate(NUMBER())],t.prototype,"outerRadiusOffset",void 0),__decorate$1k([Validate(NUMBER(0))],t.prototype,"outerRadiusRatio",void 0),__decorate$1k([Validate(NUMBER())],t.prototype,"innerRadiusOffset",void 0),__decorate$1k([Validate(NUMBER(0))],t.prototype,"innerRadiusRatio",void 0),__decorate$1k([Validate(NUMBER(0))],t.prototype,"strokeWidth",void 0),t}(PolarSeries),__extends$1Y=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),HierarchySeries=function(e){function t(){return e.call(this,{pickModes:[SeriesNodePickMode.EXACT_SHAPE_MATCH]})||this}return __extends$1Y(t,e),t.prototype.getLabelData=function(){return[]},t}(Series),__extends$1X=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$1j=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},DropShadow=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.enabled=!0,t.color="rgba(0, 0, 0, 0.5)",t.xOffset=0,t.yOffset=0,t.blur=5,t}return __extends$1X(t,e),__decorate$1j([Validate(BOOLEAN),SceneChangeDetection({redraw:RedrawType.MAJOR})],t.prototype,"enabled",void 0),__decorate$1j([Validate(COLOR_STRING),SceneChangeDetection({redraw:RedrawType.MAJOR})],t.prototype,"color",void 0),__decorate$1j([Validate(NUMBER()),SceneChangeDetection({redraw:RedrawType.MAJOR})],t.prototype,"xOffset",void 0),__decorate$1j([Validate(NUMBER()),SceneChangeDetection({redraw:RedrawType.MAJOR})],t.prototype,"yOffset",void 0),__decorate$1j([Validate(NUMBER(0)),SceneChangeDetection({redraw:RedrawType.MAJOR})],t.prototype,"blur",void 0),t}(ChangeDetectable);function number(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function interpolateColor(e,t){if("string"==typeof e)try{e=Color.fromString(e)}catch(t){e=Color.fromArray([0,0,0])}if("string"==typeof t)try{t=Color.fromString(t)}catch(e){t=Color.fromArray([0,0,0])}var r=number(e.r,t.r),o=number(e.g,t.g),i=number(e.b,t.b),n=number(e.a,t.a);return function(e){return Color.fromArray([r(e),o(e),i(e),n(e)]).toRgbaString()}}var ColorScale=function(){function e(){this.domain=[0,1],this._range=["red","green"],this.parsedRange=this._range.map(function(e){return Color.fromString(e)})}return Object.defineProperty(e.prototype,"range",{get:function(){return this._range},set:function(e){this._range=e,this.parsedRange=e.map(function(e){return Color.fromString(e)})}
2,enumerable:!1,configurable:!0}),e.prototype.convert=function(e){var t,r,o=this,i=o.domain,n=o.range,a=o.parsedRange,s=i[0],l=i[i.length-1],c=n[0],u=n[n.length-1];if(e<=s)return c;if(e>=l)return u;if(2===i.length){var d=(e-s)/(l-s),p=1/(n.length-1);r=(d-(t=n.length<=2?0:Math.min(Math.floor(d*(n.length-1)),n.length-2))*p)/p}else{for(t=0;t<i.length-2&&!(e<i[t+1]);t++);var h=i[t];r=(e-h)/(i[t+1]-h)}return interpolateColor(a[t],a[t+1])(r)},e}(),__extends$1W=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__assign$u=function(){return __assign$u=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$u.apply(this,arguments)},__decorate$1i=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},__awaiter$1=function(e,t,r,o){return new(r||(r=Promise))(function(i,n){function a(e){try{l(o.next(e))}catch(e){n(e)}}function s(e){try{l(o.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})},__generator$1=function(e,t){var r,o,i,n,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return n={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function s(n){return function(s){return function(n){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(i=2&n[0]?o.return:n[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,n[1])).done)return i;switch(o=0,i&&(n=[2&n[0],i.value]),n[0]){case 0:case 1:i=n;break;case 4:return a.label++,{value:n[1],done:!1};case 5:a.label++,o=n[1],n=[0];continue;case 7:n=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==n[0]&&2!==n[0])){a=0;continue}if(3===n[0]&&(!i||n[1]>i[0]&&n[1]<i[3])){a.label=n[1];break}if(6===n[0]&&a.label<i[1]){a.label=i[1],i=n;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(n);break}i[2]&&a.ops.pop(),a.trys.pop();continue}n=t.call(e,a)}catch(e){n=[6,e],o=0}finally{r=i=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,s])}}},TreemapSeriesTooltip=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.renderer=void 0,t}return __extends$1W(t,e),__decorate$1i([Validate(OPT_FUNCTION)],t.prototype,"renderer",void 0),t}(SeriesTooltip),TreemapSeriesNodeBaseClickEvent=function(e){function t(t,r,o,i,n,a){var s=e.call(this,i,n,a)||this;return s.labelKey=t,s.sizeKey=r,s.colorKey=o,s}return __extends$1W(t,e),t}(SeriesNodeBaseClickEvent),TreemapSeriesNodeClickEvent=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="nodeClick",t}return __extends$1W(t,e),t}(TreemapSeriesNodeBaseClickEvent),TreemapSeriesNodeDoubleClickEvent=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="nodeDoubleClick",t}return __extends$1W(t,e),t}(TreemapSeriesNodeBaseClickEvent),TreemapSeriesLabel=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.padding=10,t}return __extends$1W(t,e),__decorate$1i([Validate(NUMBER(0))],t.prototype,"padding",void 0),t}(Label$1),TreemapValueLabel=function(){function e(){var e;this.style=((e=new Label$1).color="white",e)}return __decorate$1i([Validate(OPT_STRING)],e.prototype,"key",void 0),__decorate$1i([Validate(OPT_STRING)],e.prototype,"name",void 0),__decorate$1i([Validate(OPT_FUNCTION)],e.prototype,"formatter",void 0),e}(),TextNodeTag;function getTextSize(e,t){return HdpiCanvas.getTextSize(e,[t.fontWeight,t.fontSize+"px",t.fontFamily].join(" "))}function validateColor(e){return"string"!=typeof e||Color.validColorString(e)?e:(Logger.warnOnce('invalid Treemap tile colour string "'+e+'". Affected treemap tiles will be coloured black.'),"black")}!function(e){e[e.Name=0]="Name",e[e.Value=1]="Value"}(TextNodeTag||(TextNodeTag={}));var TreemapTextHighlightStyle=function(){function e(){this.color="black"}return __decorate$1i([Validate(OPT_COLOR_STRING)],e.prototype,"color",void 0),e}(),TreemapHighlightStyle=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.text=new TreemapTextHighlightStyle,t}return __extends$1W(t,e),t}(HighlightStyle),TreemapSeries=function(e){function t(){var t,r=null!==e&&e.apply(this,arguments)||this;return r.groupSelection=Selection.select(r.contentGroup,Group),r.highlightSelection=Selection.select(r.highlightGroup,Group),r.title=((t=new TreemapSeriesLabel).color="white",t.fontWeight="bold",t.fontSize=12,t.fontFamily="Verdana, sans-serif",t.padding=15,t),r.subt
2itle=function(){var e=new TreemapSeriesLabel;return e.color="white",e.fontSize=9,e.fontFamily="Verdana, sans-serif",e.padding=13,e}(),r.labels={large:function(){var e=new Label$1;return e.color="white",e.fontWeight="bold",e.fontSize=18,e}(),medium:function(){var e=new Label$1;return e.color="white",e.fontWeight="bold",e.fontSize=14,e}(),small:function(){var e=new Label$1;return e.color="white",e.fontWeight="bold",e.fontSize=10,e}(),value:new TreemapValueLabel},r.nodePadding=2,r.labelKey="label",r.sizeKey="size",r.colorKey="color",r.colorDomain=[-5,5],r.colorRange=["#cb4b3f","#6acb64"],r.groupFill="#272931",r.groupStroke="black",r.groupStrokeWidth=1,r.tileStroke="black",r.tileStrokeWidth=1,r.gradient=!0,r.formatter=void 0,r.colorName="Change",r.rootName="Root",r.highlightGroups=!0,r.tileShadow=new DropShadow,r.labelShadow=new DropShadow,r.tooltip=new TreemapSeriesTooltip,r.highlightStyle=new TreemapHighlightStyle,r}return __extends$1W(t,e),t.prototype.getNodePaddingTop=function(e,t){var r=this,o=r.title,i=r.subtitle,n=r.nodePadding,a=e.label;if(e.isLeaf||!a||0===e.depth)return n;var s=e.depth>1?i:o,l=getTextSize(a,s);return s.fontSize>t.width/3||s.fontSize>t.height/3||l.height>=t.height?n:l.height+2*n},t.prototype.getNodePadding=function(e,t){var r=this.nodePadding;return{top:this.getNodePaddingTop(e,t),right:r,bottom:r,left:r}},t.prototype.squarify=function(e,t,r){void 0===r&&(r=new Map);var o=this.getNodePadding(e,t);r.set(e,t);var i=t.width-o.left-o.right,n=t.height-o.top-o.bottom;if(i<=0||n<=0||e.value<=0)return r;for(var a=0,s=0,l=1/0,c=e.value,u=e.children,d=new BBox(t.x+o.left,t.y+o.top,i,n),p=0;p<u.length;p++){var h=u[p].value,_=u[s].value,f=d.width<d.height;a+=h;var g=f?d.height:d.width,y=f?d.width:d.height,m=y*_/a,v=g*a/c,E=Math.max(m,v)/Math.min(m,v),C=Math.abs(1-E);if(C<l)l=C;else{v=g*(a-=h)/c;for(var O=f?d.x:d.y,P=s;P<p;P++){var S=u[P],b=f?O:d.x,D=f?d.y:O,M=y*S.value/a,T=new BBox(b,D,f?M:v,f?v:M);this.squarify(S,T,r),c-=S.value,O+=M}f?(d.y+=v,d.height-=v):(d.x+=v,d.width-=v),s=p,a=0,l=1/0,p--}}var A=d.width<d.height,x=A?d.x:d.y;for(p=s;p<u.length;p++){b=A?x:d.x,D=A?d.y:x;var w=u[p].value/c,R=d.width*(A?w:1),I=d.height*(A?1:w);T=new BBox(b,D,R,I),this.squarify(u[p],T,r),x+=A?R:I}return r},t.prototype.processData=function(){return __awaiter$1(this,void 0,void 0,function(){var e,t,r,o,i,n,a,s,l,c,u=this;return __generator$1(this,function(d){return this.data?(t=(e=this).data,r=e.sizeKey,o=e.labelKey,i=e.colorKey,n=e.colorDomain,a=e.colorRange,s=e.groupFill,(l=new ColorScale).domain=n,l.range=a,c=function(e,t,n){var a,d;void 0===t&&(t=0);var p=o&&e[o]||"",h=i&&null!==(a=e[i])&&void 0!==a?a:t;h=validateColor(h);var _=!e.children,f="string"==typeof h?h:_||!s?l.convert(h):s,g={datum:e,depth:t,parent:n,value:0,label:p,fill:f,series:u,isLeaf:_,children:[]};return _?g.value=r&&null!==(d=e[r])&&void 0!==d?d:1:(e.children.forEach(function(e){var r=c(e,t+1,g),o=r.value;!isNaN(o)&&isFinite(o)&&0!==o&&(g.value+=o,g.children.push(r))}),g.children.sort(function(e,t){return t.value-e.value})),g},this.dataRoot=c(t),[2]):[2]})})},t.prototype.createNodeData=function(){return __awaiter$1(this,void 0,void 0,function(){return __generator$1(this,function(e){return[2,[]]})})},t.prototype.update=function(){return __awaiter$1(this,void 0,void 0,function(){return __generator$1(this,function(e){switch(e.label){case 0:return[4,this.updateSelections()];case 1:return e.sent(),[4,this.updateNodes()];case 2:return e.sent(),[2]}})})},t.prototype.updateSelections=function(){return __awaiter$1(this,void 0,void 0,function(){var e,t,r,o,i,n,a,s,l;return __generator$1(this,function(c){return this.nodeDataRefresh?(this.nodeDataRefresh=!1,t=(e=this).chart,r=e.dataRoot,t&&r&&t.getSeriesRect()?(o=[],i=function(e){var t;o.push(e),null===(t=e.children)||void 0===t||t.forEach(i)},i(this.dataRoot),a=(n=this).groupSelection,s=n.highlightSelection,l=function(e){return e.update(o,function(e){var t=new Rect,r=new Text;r.tag=TextNodeTag.Name;var o=new Text;o.tag=TextNodeTag.Value,e.append([t,r,o])})},this.groupSelection=l(a),this.highlightSelection=l(s),[2]):[2]):[2]})})},t.prototype.isDatumHighlighted=function(e){var t;return e===(null===(t=this.highlightManager)||void 0===t?void 0:t.getActiveHighlight())&&
2(e.isLeaf||this.highlightGroups)},t.prototype.getTileFormat=function(e,t){var r,o=this.formatter;if(!o)return{};var i=this,n=i.gradient,a=i.colorKey,s=i.labelKey,l=i.sizeKey,c=i.tileStroke,u=i.tileStrokeWidth,d=i.groupStroke,p=i.groupStrokeWidth,h=e.isLeaf?c:d,_=e.isLeaf?u:p;return o({seriesId:this.id,datum:e.datum,depth:e.depth,parent:null===(r=e.parent)||void 0===r?void 0:r.datum,colorKey:a,sizeKey:l,labelKey:s,fill:e.fill,stroke:h,strokeWidth:_,gradient:n,highlighted:t})},t.prototype.updateNodes=function(){return __awaiter$1(this,void 0,void 0,function(){var e,t,r,o,i,n,a,s,l,c,u,d,p,h,_,f,g,y,m,v,E=this;return __generator$1(this,function(C){return this.chart?(t=(e=this).gradient,r=e.highlightStyle,o=r.item,i=o.fill,n=o.fillOpacity,a=o.stroke,s=o.strokeWidth,l=r.text.color,c=e.tileStroke,u=e.tileStrokeWidth,d=e.groupStroke,p=e.groupStrokeWidth,h=e.tileShadow,_=e.labelShadow,f=this.chart.getSeriesRect(),g=this.squarify(this.dataRoot,new BBox(0,0,f.width,f.height)),y=this.buildLabelMeta(g),m=function(e,r,o){var l,_,f,y,m,v,C=g.get(r);if(C){var O=o&&void 0!==i?i:r.fill,P=null!==(l=o?n:1)&&void 0!==l?l:1,S=o&&void 0!==a?a:r.isLeaf?c:d,b=o&&void 0!==s?s:r.isLeaf?u:p,D=E.getTileFormat(r,o);if(e.fill=validateColor(null!==(_=null==D?void 0:D.fill)&&void 0!==_?_:O),e.fillOpacity=null!==(f=null==D?void 0:D.fillOpacity)&&void 0!==f?f:P,e.stroke=validateColor(null!==(y=null==D?void 0:D.stroke)&&void 0!==y?y:S),e.strokeWidth=null!==(m=null==D?void 0:D.strokeWidth)&&void 0!==m?m:b,e.gradient=null!==(v=null==D?void 0:D.gradient)&&void 0!==v?v:t,e.fillShadow=h,e.crisp=!0,e.x=C.x,e.y=C.y,e.width=C.width,e.height=C.height,e.visible=!0,o&&!r.isLeaf){var M=E.getNodePadding(r,C),T=C.x+M.left,A=C.x+C.width-M.right,x=C.y+M.top,w=C.y+C.height-M.bottom;e.clipPath?e.clipPath.clear():e.clipPath=new Path2D,e.clipMode="punch-out",e.clipPath.moveTo(T,x),e.clipPath.lineTo(A,x),e.clipPath.lineTo(A,w),e.clipPath.lineTo(T,w),e.clipPath.lineTo(T,x),e.clipPath.closePath()}}else e.visible=!1},this.groupSelection.selectByClass(Rect).forEach(function(e){return m(e,e.datum,!1)}),this.highlightSelection.selectByClass(Rect).forEach(function(e){var t=E.isDatumHighlighted(e.datum);e.visible=t,e.visible&&m(e,e.datum,t)}),v=function(e,t,r,o){var i=y.get(t),n=null==i?void 0:i[o];n?(e.text=n.text,e.fontFamily=n.style.fontFamily,e.fontSize=n.style.fontSize,e.fontWeight=n.style.fontWeight,e.fill=r&&null!=l?l:n.style.color,e.fillShadow=r?void 0:_,e.textAlign=n.hAlign,e.textBaseline=n.vAlign,e.x=n.x,e.y=n.y,e.visible=!0):e.visible=!1},this.groupSelection.selectByTag(TextNodeTag.Name).forEach(function(e){return v(e,e.datum,!1,"label")}),this.highlightSelection.selectByTag(TextNodeTag.Name).forEach(function(e){var t=E.isDatumHighlighted(e.datum);e.visible=t,e.visible&&v(e,e.datum,t,"label")}),this.groupSelection.selectByTag(TextNodeTag.Value).forEach(function(e){return v(e,e.datum,!1,"value")}),this.highlightSelection.selectByTag(TextNodeTag.Value).forEach(function(e){var t=E.isDatumHighlighted(e.datum);e.visible=t,e.visible&&v(e,e.datum,t,"value")}),[2]):[2]})})},t.prototype.buildLabelMeta=function(e){var t=this,r=t.labels,o=t.title,i=t.subtitle,n=t.nodePadding,a=t.labelKey,s=new Map;return e.forEach(function(e,t){if(a&&0!==t.depth){var l,c=t.isLeaf?t.label:t.label.toUpperCase();l=t.isLeaf?[r.large,r.medium,r.small].find(function(t){var r=getTextSize(c,t),o=r.width,i=r.height;return o<e.width&&i<e.height})||r.small:1===t.depth?o:i;var u=getTextSize(c,l),d=e.width-2*n,p=e.height-2*n;if(!(l.fontSize>e.width/3||l.fontSize>e.height/3)){if(u.width>d){var h=Math.floor(c.length*d/u.width)-1;c=c.substring(0,h)+"…"}var _=r.value,f=_.style,g=(l.fontSize+f.fontSize)/8,y=String(t.isLeaf?_.formatter?_.formatter({datum:t.datum}):_.key?t.datum[_.key]:"":""),m=getTextSize(y,f),v=y&&m.width<d&&m.height+u.height+g<p;s.set(t,{label:__assign$u({text:c,style:l},t.isLeaf?{hAlign:"center",vAlign:"middle",x:e.x+e.width/2,y:e.y+e.height/2-(v?m.height/2+g/2:0)}:{hAlign:"left",vAlign:"top",x:e.x+n,y:e.y+n}),value:v?{text:y,style:f,hAlign:"center",vAlign:"middle",x:e.x+e.width/2,y:e.y+e.height/2+u.height/2+g/2}:void 0})}}}),s},t.prototype.getDomain=function(e){return[0,1]},t.prototype.getNodeClickEvent=function(e,t){return new TreemapSeriesNodeClickEvent(this.labelKey,this.sizeKey,this.colorKey,e,t,this)},t.prototype.getNodeDoubleClickEvent=function(e,t){return new TreemapSeriesNodeDoubleClickEvent(this.labelKey,this.sizeKey,this.colorKey,e,t,this)},t.prototype.getTooltipHtml=function(e){var t;if(!this.highlightGroups&&!e.isLeaf)return"";var r=this,o=r.tooltip,i=r.sizeKey,n=r.labelKey,a=r.colorKey,s=r.rootName,l=r.id,c=r.labels,u=e.datum,d=o.renderer,p=e.depth?u[n]:s||u[n],h="",_=this.getTileFormat(e,!1),f=(null==_?void 0:_.fill)||e.fill||"gray",g=c.value.key,y=c.value.formatter;if(g||y){var m="";if(y)m=y({datum:u});else{var v=u[g];"number"==typeof v&&isFinite(v)&&(m=toFixed(v))}m&&(c.value.name&&(h+="<b>"+c.value.name+":</b> "),h+=m)}var E={title:p,backgroundColor:f,content:h};return d?toTooltipHtml$1(d({datum:e.datum,parent:null===(t=e.parent)||void 0===t?void 0:t.datum,depth:e.depth,sizeKey:i,labelKey:n,colorKey:a,title:p,color:f,seriesId:l}),E):p||h?toTooltipHtml$1(E):""},t.prototype.getLegendData=function(){return[]},t.className="TreemapSeries",t.type="treemap",__decorate$1i([Validate(NUMBER(0))],t.prototype,"nodePadding",void 0),__decorate$1i([Validate(STRING)],t.prototype,"labelKey",void 0),__decorate$1i([Validate(OPT_STRING)],t.prototype,"sizeKey",void 0),__decorate$1i([Validate(OPT_STRING)],t.prototype,"colorKey",void 0),__decorate$1i([Validate(NUMBER_ARRAY)],t.prototype,"colorDomain",void 0),__decorate$1i([Validate(COLOR_STRING_ARRAY)],t.prototype,"colorRange",void 0),__decorate$1i([Validate(OPT_STRING)],t.prototype,"groupFill",void 0),__decorate$1i([Validate(OPT_COLOR_STRING)],t.prototype,"groupStroke",void 0),__decorate$1i([Validate(OPT_NUM
2BER(0))],t.prototype,"groupStrokeWidth",void 0),__decorate$1i([Validate(OPT_COLOR_STRING)],t.prototype,"tileStroke",void 0),__decorate$1i([Validate(OPT_NUMBER(0))],t.prototype,"tileStrokeWidth",void 0),__decorate$1i([Validate(BOOLEAN)],t.prototype,"gradient",void 0),__decorate$1i([Validate(OPT_FUNCTION)],t.prototype,"formatter",void 0),__decorate$1i([Validate(STRING)],t.prototype,"colorName",void 0),__decorate$1i([Validate(STRING)],t.prototype,"rootName",void 0),__decorate$1i([Validate(OPT_BOOLEAN)],t.prototype,"highlightGroups",void 0),t}(HierarchySeries),DEFAULT_CARTESIAN_CHART_OVERRIDES={axes:[{type:NumberAxis.type,position:"left"},{type:CategoryAxis.type,position:"bottom"}]},DEFAULT_BAR_CHART_OVERRIDES={axes:[{type:"number",position:"bottom"},{type:"category",position:"left"}]},DEFAULT_SCATTER_HISTOGRAM_CHART_OVERRIDES={axes:[{type:"number",position:"bottom"},{type:"number",position:"left"}]},__assign$t=function(){return __assign$t=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$t.apply(this,arguments)};function transform(e,t){var r={};for(var o in e){var i=t[o]||function(e){return e};r[o]=i(e[o],e)}return r}function is2dArray(e){return null!=e&&e instanceof Array&&e[0]instanceof Array}function yNamesMapping(e,t){if(null==e)return{};if(!(e instanceof Array))return e;var r=t.yKeys;if(null==r||is2dArray(r))throw new Error("AG Charts - yNames and yKeys mismatching configuration.");var o={};return r.forEach(function(t,r){o[t]=e[r]}),o}function yKeysMapping(e,t){return null==e?[[]]:is2dArray(e)?e:t.grouped?e.map(function(e){return[e]}):[e]}function barSeriesTransform(e){var t=__assign$t({},e);return delete t.yKey,delete t.yName,transform(t,{yNames:yNamesMapping,yKeys:yKeysMapping})}function identityTransform(e){return e}var SERIES_TRANSFORMS={area:identityTransform,bar:barSeriesTransform,column:barSeriesTransform,histogram:identityTransform,line:identityTransform,pie:identityTransform,scatter:identityTransform,treemap:identityTransform};function applySeriesTransform(e){var t=e.type;return(0,SERIES_TRANSFORMS[t||"line"])(e)}function deepMerge$1(e,t){if(isPlainObject(e)&&isPlainObject(t)){var r={};return Object.keys(e).forEach(function(o){r[o]=o in t?deepMerge$1(e[o],t[o]):e[o]}),Object.keys(t).forEach(function(o){o in e||(r[o]=t[o])}),r}return Array.isArray(e)&&!Array.isArray(t)||isObject(e)&&!isObject(t)?e:t}function isObject(e){return e&&"object"==typeof e}function isPlainObject(e){return isObject(e)&&e.constructor===Object}var __assign$s=function(){return __assign$s=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$s.apply(this,arguments)},__read$q=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},palette$8={fills:["#f3622d","#fba71b","#57b757","#41a9c9","#4258c9","#9a42c8","#c84164","#888888"],strokes:["#aa4520","#b07513","#3d803d","#2d768d","#2e3e8d","#6c2e8c","#8c2d46","#5f5f5f"]},BOLD="bold",INSIDE="inside",RIGHT="right",ChartTheme=function(){function e(t){var r=(t=deepMerge$1({},t||{})).overrides,o=void 0===r?null:r,i=t.palette,n=void 0===i?null:i,a=this.createChartConfigPerChartType(this.getDefaults());if(o){var s=o.common,l=o.cartesian,c=o.polar,u=o.hierarchy,d=function(e,t,r){r&&(a[e]=deepMerge$1(a[e],r),t.forEach(function(e){a[e]=deepMerge$1(a[e],r)}))};d("common",Object.keys(a),s),d("cartesian",e.cartesianSeriesTypes,l),d("polar",e.polarSeriesTypes,c),d("hierarchy",e.hierarchySeriesTypes,u),e.seriesTypes.forEach(function(e){var t,r=o[e];r&&(r.series&&(r.series=((t={})[e]=r.series,t)),a[e]=deepMerge$1(a[e],r))})}this.palette=null!=n?n:this.getPalette(),this.config=Object.freeze(a)}return e.prototype.getPalette=function(){return palette$8},e.getAxisDefaults=function(){return{top:{},right:{},bottom:{},left:{},thickness:0,title:{enabled:!1,text:"Axis Title",fontStyle:void 0,fontWeight:BOLD,fontSize:12,fontFamily:this.fontFamily,color:"rgb(70, 70, 70)"},label:{fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:this.fontFamily,padding:5,rotation:void 0,color:"rgb(87, 87, 87)",formatter:void 0,autoRotate:!1,avoidCollisions:!0},line:{width:1,color:"rgb(195, 195, 195)"},tick:{width:1,size:6,color:"rgb(195, 195, 195)"},gridStyle:[{stroke:"rgb(219, 219, 219)",lineDash:[4,2]}],crossLines:{enabled:!1,fill:"rgb(187,221,232)",stroke:"rgb(70,162,192)",strokeWidth:1,label:{enabled:!1,fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:this.fontFamily,padding:5,color:"rgb(87, 87, 87)",rotation:void 0}}}},e.getSeriesDefaults=function(){return{tooltip:{enabled:!0,renderer:void 0},visible:!0,showInLegend:!0,highlightStyle:{item:{fill:"yellow",fillOpacity:1},series:{dimOpacity:1},text:{color:"black"}},nodeClickRange:"exact"}},e.getBarSeriesDefaults=function(){return __assign$s(__assign$s({}
2,this.getSeriesDefaults()),{flipXY:!1,fillOpacity:1,strokeOpacity:1,xKey:"",xName:"",normalizedTo:void 0,strokeWidth:1,lineDash:[0],lineDashOffset:0,label:{enabled:!1,fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:this.fontFamily,color:"rgb(70, 70, 70)",formatter:void 0,placement:INSIDE},shadow:{enabled:!1,color:"rgba(0, 0, 0, 0.5)",xOffset:3,yOffset:3,blur:5}})},e.getLineSeriesDefaults=function(){var e=this.getSeriesDefaults();return __assign$s(__assign$s({},e),{tooltip:__assign$s(__assign$s({},e.tooltip),{format:void 0})})},e.getAreaSeriesDefaults=function(){var e=this.getSeriesDefaults();return __assign$s(__assign$s({},e),{nodeClickRange:"nearest"})},e.getCartesianSeriesMarkerDefaults=function(){return{enabled:!0,shape:"circle",size:6,maxSize:30,strokeWidth:1,formatter:void 0}},e.getChartDefaults=function(){return{background:{visible:!0,fill:"white"},padding:{top:20,right:20,bottom:20,left:20},title:{enabled:!1,text:"Title",fontStyle:void 0,fontWeight:BOLD,fontSize:16,fontFamily:this.fontFamily,color:"rgb(70, 70, 70)"},subtitle:{enabled:!1,text:"Subtitle",fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:this.fontFamily,color:"rgb(140, 140, 140)"},footnote:{enabled:!1,text:"Footnote",fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:this.fontFamily,color:"rgb(140, 140, 140)",spacing:30},legend:{enabled:!0,position:RIGHT,spacing:20,listeners:{},item:{paddingX:16,paddingY:8,marker:{shape:void 0,size:15,strokeWidth:1,padding:8},label:{color:"black",fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:this.fontFamily,formatter:void 0}},reverseOrder:!1,pagination:{marker:{size:12},activeStyle:{fill:"rgb(70, 70, 70)"},inactiveStyle:{fill:"rgb(219, 219, 219)"},highlightStyle:{fill:"rgb(70, 70, 70)"},label:{color:"rgb(70, 70, 70)"}}},tooltip:{enabled:!0,range:"nearest",delay:0,class:DEFAULT_TOOLTIP_CLASS},listeners:{}}},e.prototype.createChartConfigPerChartType=function(t){var r={cartesian:e.cartesianSeriesTypes,polar:e.polarSeriesTypes,hierarchy:e.hierarchySeriesTypes,groupedCategory:[]};return Object.entries(r).forEach(function(e){var r=__read$q(e,2),o=r[0];r[1].forEach(function(e){t[e]||(t[e]=deepMerge$1({},t[o]))})}),t},e.prototype.getDefaults=function(){return deepMerge$1({},e.defaults)},e.prototype.mergeWithParentDefaults=function(e,t){return deepMerge$1(e,t)},e.fontFamily="Verdana, sans-serif",e.cartesianDefaults=__assign$s(__assign$s({},e.getChartDefaults()),{axes:{number:__assign$s({},e.getAxisDefaults()),log:__assign$s(__assign$s({},e.getAxisDefaults()),{base:10}),category:__assign$s(__assign$s({},e.getAxisDefaults()),{groupPaddingInner:.1,label:__assign$s(__assign$s({},e.getAxisDefaults().label),{autoRotate:!0})}),groupedCategory:__assign$s({},e.getAxisDefaults()),time:__assign$s({},e.getAxisDefaults())},series:{column:__assign$s(__assign$s({},e.getBarSeriesDefaults()),{flipXY:!1}),bar:__assign$s(__assign$s({},e.getBarSeriesDefaults()),{flipXY:!0}),line:__assign$s(__assign$s({},e.getLineSeriesDefaults()),{title:void 0,xKey:"",xName:"",yKey:"",yName:"",strokeWidth:2,strokeOpacity:1,lineDash:[0],lineDashOffset:0,marker:__assign$s(__assign$s({},e.getCartesianSeriesMarkerDefaults()),{fillOpacity:1,strokeOpacity:1}),label:{enabled:!1,fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:e.fontFamily,color:"rgb(70, 70, 70)",formatter:void 0}}),scatter:__assign$s(__assign$s({},e.getSeriesDefaults()),{title:void 0,xKey:"",yKey:"",sizeKey:void 0,labelKey:void 0,xName:"",yName:"",sizeName:"Size",labelName:"Label",marker:__assign$s({},e.getCartesianSeriesMarkerDefaults()),label:{enabled:!1,fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:e.fontFamily,color:"rgb(70, 70, 70)"}}),area:__assign$s(__assign$s({},e.getAreaSeriesDefaults()),{xKey:"",xName:"",normalizedTo:void 0,fillOpacity:.8,strokeOpacity:1,strokeWidth:2,lineDash:[0],lineDashOffset:0,shadow:{enabled:!1,color:"rgba(0, 0, 0, 0.5)",xOffset:3,yOffset:3,blur:5},marker:__assign$s(__assign$s({},e.getCartesianSeriesMarkerDefaults()),{fillOpacity:1,strokeOpacity:1,enabled:!1}),label:{enabled:!1,fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:e.fontFamily,color:"rgb(70, 70, 70)",formatter:void 0}}),histogram:__assign$s(__assign$s({},e.getSeriesDefaults()),{xKey:"",yKey:"",xName:"",yName:"",strokeWidth:1,fillOpacity:1,strokeOpacity:1,lineDash:[0],lineDashOffset:0,areaPlot:!1,bins:void 0,aggregation:"sum",label:{enabled:!1,fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:e.fontFamily,color:"rgb(70, 70, 70)",formatter:void 0},shadow:{enabled:!0,color:"rgba(0, 0, 0, 0.5)",xOffset:0,yOffset:0,blur:5}})},navigator:{enabled:!1,height:30,mask:{fill:"#999999",stroke:"#999999",strokeWidth:1,fillOpacity:.2},minHandle:{fill:"#f2f2f2",stroke:"#999999",strokeWidth:1,width:8,height:16,gripLineGap:2,gripLineLength:8},maxHandle:{fill:"#f2f2f2",stroke:"#999999",strokeWidth:1,width:8,height:16,gripLineGap:2,gripLineLength:8}}}),e.polarDefaults=__assign$s(__assign$s({},e.getChartDefaults()),{series:{pie:__assign$s(__assign$s({},e.getSeriesDefaults()),{title:{enabled:!0,text:"",fontStyle:void 0,fontWeight:"bold",fontSize:14,fontFamily:e.fontFamily,color:"rgb(70, 70, 70)"},angleKey:"",angleName:"",radiusKey:void 0,radiusName:void 0,calloutLabelKey:void 0,calloutLabelName:void 0,sectorLabelKey:void 0,sectorLabelName:void 0,calloutLabel:{enabled:!0,fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:e.fontFamily,color:"rgb(70, 70, 70)",offset:3,minAngle:20},sectorLabel:{enabled:!0,fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:e.fontFamily,color:"rgb(70, 70, 70)",positionOffset:0,positionRatio:.5},calloutLine:{length:10,strokeWidth:2},fillOpacity:1,strokeOpacity:1,strokeWidth:1,lineDash:[0],lineDashOffset:0,rotation:0,outerRadiusOffset:0,innerRadiusOffset:0,shadow:{enabled:!1,color:"rgba(0, 0, 0, 0.5)",xOffset:3,yOffset:3,blur:5}
2,innerLabels:{fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:e.fontFamily,color:"rgb(70, 70, 70)",margin:2}})}}),e.hierarchyDefaults=__assign$s(__assign$s({},e.getChartDefaults()),{series:{treemap:__assign$s(__assign$s({},e.getSeriesDefaults()),{showInLegend:!1,labelKey:"label",sizeKey:"size",colorKey:"color",colorDomain:[-5,5],colorRange:["#cb4b3f","#6acb64"],groupFill:"#272931",groupStroke:"black",groupStrokeWidth:1,tileStroke:"black",tileStrokeWidth:1,gradient:!0,tileShadow:{enabled:!1,color:"rgba(0, 0, 0, 0.5)",xOffset:3,yOffset:3,blur:5},labelShadow:{enabled:!0,color:"rgba(0, 0, 0, 0.4)",xOffset:1.5,yOffset:1.5,blur:5},highlightGroups:!0,nodePadding:2,title:{enabled:!0,color:"white",fontStyle:void 0,fontWeight:"bold",fontSize:12,fontFamily:"Verdana, sans-serif",padding:15},subtitle:{enabled:!0,color:"white",fontStyle:void 0,fontWeight:void 0,fontSize:9,fontFamily:"Verdana, sans-serif",padding:13},labels:{large:{enabled:!0,fontStyle:void 0,fontWeight:"bold",fontSize:18,fontFamily:"Verdana, sans-serif",color:"white"},medium:{enabled:!0,fontStyle:void 0,fontWeight:"bold",fontSize:14,fontFamily:"Verdana, sans-serif",color:"white"},small:{enabled:!0,fontStyle:void 0,fontWeight:"bold",fontSize:10,fontFamily:"Verdana, sans-serif",color:"white"},value:{style:{enabled:!0,fontStyle:void 0,fontWeight:void 0,fontSize:12,fontFamily:"Verdana, sans-serif",color:"white"}}}})}}),e.defaults={cartesian:e.cartesianDefaults,groupedCategory:e.cartesianDefaults,polar:e.polarDefaults,hierarchy:e.hierarchyDefaults},e.cartesianSeriesTypes=["line","area","bar","column","scatter","histogram"],e.polarSeriesTypes=["pie"],e.hierarchySeriesTypes=["treemap"],e.seriesTypes=e.cartesianSeriesTypes.concat(e.polarSeriesTypes).concat(e.hierarchySeriesTypes),e}(),__extends$1V=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__assign$r=function(){return __assign$r=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$r.apply(this,arguments)},DarkTheme=function(e){function t(t){return e.call(this,t)||this}return __extends$1V(t,e),t.prototype.getDefaults=function(){var t="rgb(200, 200, 200)",r="rgb(150, 150, 150)",o={title:{color:t},label:{color:t},gridStyle:[{stroke:"rgb(88, 88, 88)",lineDash:[4,2]}]},i={label:{color:t}},n={axes:{number:__assign$r({},o),category:__assign$r({},o),time:__assign$r({},o)}},a={background:{fill:"rgb(34, 38, 41)"},title:{color:t},subtitle:{color:r},legend:{item:{label:{color:t}},pagination:{activeStyle:{fill:t},inactiveStyle:{fill:r},highlightStyle:{fill:t},label:{color:t}}}};return this.mergeWithParentDefaults(e.prototype.getDefaults.call(this),{cartesian:__assign$r(__assign$r(__assign$r({},a),n),{series:{bar:__assign$r({},i),column:__assign$r({},i),histogram:__assign$r({},i)}}),groupedCategory:__assign$r(__assign$r(__assign$r({},a),n),{series:{bar:__assign$r({},i),column:__assign$r({},i),histogram:__assign$r({},i)}}),polar:__assign$r(__assign$r({},a),{series:{pie:{calloutLabel:{color:t},sectorLabel:{color:t},title:{color:t},innerLabels:{color:t}}}}),hierarchy:__assign$r(__assign$r({},a),{series:{treemap:{tileStroke:"white",groupStroke:"white",title:{color:t},subtitle:{color:r},labels:{large:{color:t},medium:{color:t},small:{color:t},value:{style:{color:t}}}}}})})},t}(ChartTheme),__extends$1U=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),palette$7={fills:["#f44336","#e91e63","#9c27b0","#673ab7","#3f51b5","#2196f3","#03a9f4","#00bcd4","#009688","#4caf50","#8bc34a","#cddc39","#ffeb3b","#ffc107","#ff9800","#ff5722"],strokes:["#ab2f26","#a31545","#6d1b7b","#482980","#2c397f","#1769aa","#0276ab","#008494","#00695f","#357a38","#618834","#909a28","#b3a429","#b38705","#b36a00","#b33d18"]},MaterialLight=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$1U(t,e),t.prototype.getPalette=function(){return palette$7},t}(ChartTheme),__extends$1T=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),palette$6={fills:["#f44336","#e91e63","#9c27b0","#673ab7","#3f51b5","#2196f3","#03a9f4","#00bcd4","#009688","#4caf50","#8bc34a","#cddc39","#ffeb3b","#ffc107","#ff9800","#ff5722"],strokes:["#ab2f26","#a31545","#6d1b7b","#482980","#2c397f","#1769aa","#0276ab","#008494","#00695f","#357a38","#618834","#909a28","#b3a429","#b38705","#b36a00","#b33d18"]},MaterialDark=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$1T(t,e),t.prototype.getPalette=function(){return palette$6},t}(DarkTheme),__extends$1S=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}
2(),palette$5={fills:["#c16068","#a2bf8a","#ebcc87","#80a0c3","#b58dae","#85c0d1"],strokes:["#874349","#718661","#a48f5f","#5a7088","#7f637a","#5d8692"]},PastelLight=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$1S(t,e),t.prototype.getPalette=function(){return palette$5},t}(ChartTheme),__extends$1R=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),palette$4={fills:["#c16068","#a2bf8a","#ebcc87","#80a0c3","#b58dae","#85c0d1"],strokes:["#874349","#718661","#a48f5f","#5a7088","#7f637a","#5d8692"]},PastelDark=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$1R(t,e),t.prototype.getPalette=function(){return palette$4},t}(DarkTheme),__extends$1Q=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),palette$3={fills:["#febe76","#ff7979","#badc58","#f9ca23","#f0932b","#eb4c4b","#6ab04c","#7ed6df","#e056fd","#686de0"],strokes:["#b28553","#b35555","#829a3e","#ae8d19","#a8671e","#a43535","#4a7b35","#58969c","#9d3cb1","#494c9d"]},SolarLight=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$1Q(t,e),t.prototype.getPalette=function(){return palette$3},t}(ChartTheme),__extends$1P=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),palette$2={fills:["#febe76","#ff7979","#badc58","#f9ca23","#f0932b","#eb4c4b","#6ab04c","#7ed6df","#e056fd","#686de0"],strokes:["#b28553","#b35555","#829a3e","#ae8d19","#a8671e","#a43535","#4a7b35","#58969c","#9d3cb1","#494c9d"]},SolarDark=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$1P(t,e),t.prototype.getPalette=function(){return palette$2},t}(DarkTheme),__extends$1O=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),palette$1={fills:["#5BC0EB","#FDE74C","#9BC53D","#E55934","#FA7921","#fa3081"],strokes:["#4086a4","#b1a235","#6c8a2b","#a03e24","#af5517","#af225a"]},VividLight=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$1O(t,e),t.prototype.getPalette=function(){return palette$1},t}(ChartTheme),__extends$1N=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),palette={fills:["#5BC0EB","#FDE74C","#9BC53D","#E55934","#FA7921","#fa3081"],strokes:["#4086a4","#b1a235","#6c8a2b","#a03e24","#af5517","#af225a"]},VividDark=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$1N(t,e),t.prototype.getPalette=function(){return palette},t}(DarkTheme),__assign$q=function(){return __assign$q=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$q.apply(this,arguments)},lightTheme=new ChartTheme,darkTheme=new DarkTheme,lightThemes={undefined:lightTheme,
2null:lightTheme,"ag-default":lightTheme,"ag-material":new MaterialLight,"ag-pastel":new PastelLight,"ag-solar":new SolarLight,"ag-vivid":new VividLight},darkThemes={undefined:darkTheme,null:darkTheme,"ag-default-dark":darkTheme,"ag-material-dark":new MaterialDark,"ag-pastel-dark":new PastelDark,"ag-solar-dark":new SolarDark,"ag-vivid-dark":new VividDark},themes=__assign$q(__assign$q({},darkThemes),lightThemes);function getChartTheme(e){var t;if(e instanceof ChartTheme)return e;var r=themes[e];if(r)return r;for(var o,i=[];"object"==typeof e;)i.push(null!==(t=e.overrides)&&void 0!==t?t:{}),e.palette&&null==o&&(o=e.palette),e=e.baseTheme;i.reverse();var n=__assign$q({baseTheme:e,overrides:jsonMerge(i)},o?{palette:o}:{});return n.baseTheme||n.overrides?new(getChartTheme(n.baseTheme).constructor)(n):lightTheme}var __assign$p=function(){return __assign$p=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$p.apply(this,arguments)},__values$b=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},__read$p=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},__spread$f=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read$p(arguments[t]));return e};function groupSeriesByType(e){var t,r,o={},i=[];try{for(var n=__values$b(e),a=n.next();!a.done;a=n.next()){var s=a.value;if("column"===s.type||"bar"===s.type||"area"===s.type&&!0===s.stacked){var l=s.type||"line",c=s.stacked?"stacked":"grouped",u=l+"-"+s.xKey+"-"+c;null==o[u]&&(o[u]=[],i.push(o[u])),o[u].push(s)}else i.push([s])}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return i}var FAIL=Symbol(),SKIP=Symbol(),ARRAY_REDUCER=function(e){return function(t,r){var o;return t.concat.apply(t,__spread$f(null!==(o=r[e])&&void 0!==o?o:[]))}},BOOLEAN_OR_REDUCER=function(e,t){return function(r,o){return"boolean"==typeof o[e]?null!=r&&r||o[e]:null!=r?r:t}},DEFAULTING_ARRAY_REDUCER=function(e,t){return function(r,o,i,n){var a,s=t===SKIP||t===FAIL,l=null!==(a=o[e])&&void 0!==a?a:t;if(l===FAIL)throw new Error("AG Charts - missing value for property ["+e+"] on series config.");if(l===SKIP)return r;if(0===r.length&&!s)for(;r.length<n;)r=r.concat(t);return s?r.concat(l):(r[i]=l,r)}},YKEYS_REDUCER=function(e,t){return function(r,o){return o[e]===t?r.concat.apply(r,__spread$f(o.yKey?[o.yKey]:o.yKeys)):r}},STACK_GROUPS_REDUCER=function(){return function(e,t){var r;return __assign$p(__assign$p({},e),((r={})[t.stackGroup]=__spread$f(e[t.stackGroup]||[],[t.yKey]),r))}},REDUCE_CONFIG={hideInChart:{outputProp:"hideInChart",reducer:ARRAY_REDUCER("hideInChart"),start:[]},hideInLegend:{outputProp:"hideInLegend",reducer:ARRAY_REDUCER("hideInLegend"),start:[]},yKey:{outputProp:"yKeys",reducer:DEFAULTING_ARRAY_REDUCER("yKey",SKIP),start:[]},fill:{outputProp:"fills",reducer:DEFAULTING_ARRAY_REDUCER("fill",SKIP),start:[]},stroke:{outputProp:"strokes",reducer:DEFAULTING_ARRAY_REDUCER("stroke",SKIP),start:[]},yName:{outputProp:"yNames",reducer:DEFAULTING_ARRAY_REDUCER("yName",SKIP),start:[]},visible:{outputProp:"visibles",reducer:DEFAULTING_ARRAY_REDUCER("visible",!0),start:[]},grouped:{outputProp:"grouped",reducer:BOOLEAN_OR_REDUCER("grouped"),seriesType:["bar","column"],start:void 0},showInLegend:{outputProp:"hideInLegend",reducer:YKEYS_REDUCER("showInLegend",!1),seriesType:["bar","column"],start:[]},stackGroup:{outputProp:"stackGroups",reducer:STACK_GROUPS_REDUCER(),seriesType:["bar","column"],start:{}}};function reduceSeries(e){var t={};return e.forEach(function(r,o){Object.keys(r).forEach(function(i){var n,a=REDUCE_CONFIG[i],s=function(){var e,o;t[i]=null!==(o=null!==(e=r[i])&&void 0!==e?e:t[i])&&void 0!==o?o:void 0};if(a){var l=a.outputProp,c=a.reducer,u=a.start,d=void 0===u?void 0:u,p=a.seriesType;if((void 0===p?[r.type]:p).includes(r.type)){var h=c(null!==(n=t[l])&&void 0!==n?n:d,r,o,e.length);void 0!==h&&(t[l]=h)}else s()}else s()})}),t}function processSeriesOptions(e){var t,r,o=[],i=e.map(function(e){return"bar"!==e.type&&"column"!==e.type||null==e.yKey||e.stacked?e:__assign$p(__assign$p({},e),{grouped:null==e.grouped||e.grouped})});try{for(var n=__values$b(groupSeriesByType(i)),a=n.next();!a.done;a=n.next()){var s=a.value;switch(s[0].type){case"column":case"bar":case"area":o.push(reduceSeries(s));break;default:s.length>
21&&Logger.warn("unexpected grouping of series type: "+s[0].type),o.push(s[0])}}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return o}var __assign$o=function(){return __assign$o=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$o.apply(this,arguments)},__values$a=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},__read$o=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},__spread$e=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read$o(arguments[t]));return e};function optionsType(e){var t,r,o,i;return null!==(i=null!==(t=e.type)&&void 0!==t?t:null===(o=null===(r=e.series)||void 0===r?void 0:r[0])||void 0===o?void 0:o.type)&&void 0!==i?i:"line"}function isAgCartesianChartOptions(e){var t=optionsType(e);if(null==t)return!0;if("cartesian"===t)return Logger.warnOnce("type '"+t+"' is deprecated, use a series type instead"),!0;switch(t){case"area":case"bar":case"column":case"histogram":case"line":case"scatter":return!0;default:return!1}}function isAgHierarchyChartOptions(e){var t=optionsType(e);return null!=t&&("hierarchy"===t?(Logger.warnOnce("type '"+t+"' is deprecated, use a series type instead"),!0):"treemap"===t)}function isAgPolarChartOptions(e){var t=optionsType(e);return null!=t&&("polar"===t?(Logger.warnOnce("type '"+t+"' is deprecated, use a series type instead"),!0):"pie"===t)}var SERIES_OPTION_TYPES=["line","bar","column","histogram","scatter","area","pie","treemap"];function isSeriesOptionType(e){return null!=e&&SERIES_OPTION_TYPES.indexOf(e)>=0}function countArrayElements(e){var t,r,o=0;try{for(var i=__values$a(e),n=i.next();!n.done;n=i.next()){var a=n.value;a instanceof Array&&(o+=countArrayElements(a)),null!=a&&o++}}catch(e){t={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return o}function takeColours(e,t,r){for(var o=[],i=0;i<r;i++)o.push(t[(i+e.colourIndex)%t.length]);return o}var noDataCloneMergeOptions={avoidDeepClone:["data"]};function prepareOptions(e){for(var t,r,o,i,n=[],a=1;a<arguments.length;a++)n[a-1]=arguments[a];var s=jsonMerge(__spread$e(n,[e]),noDataCloneMergeOptions);sanityCheckOptions(s);var l=s.type,c=optionsType(s),u=function(e){if(null!=e&&!isSeriesOptionType(e))throw new Error("AG Charts - unknown series type: "+e+"; expected one of: "+SERIES_OPTION_TYPES.join(", "))};u(c);try{for(var d=__values$a(null!==(o=s.series)&&void 0!==o?o:[]),p=d.next();!p.done;p=d.next()){var h=p.value.type;null!=h&&u(h)}}catch(e){t={error:e}}finally{try{p&&!p.done&&(r=d.return)&&r.call(d)}finally{if(t)throw t.error}}s=__assign$o(__assign$o({},s),{type:c});var _="line";isAgCartesianChartOptions(s)?_="line":isAgHierarchyChartOptions(s)?_="treemap":isAgPolarChartOptions(s)&&(_="pie");var f={};"bar"===c?f=DEFAULT_BAR_CHART_OVERRIDES:"scatter"===c||"histogram"===c?f=DEFAULT_SCATTER_HISTOGRAM_CHART_OVERRIDES:isAgCartesianChartOptions(s)&&(f=DEFAULT_CARTESIAN_CHART_OVERRIDES);var g=prepareMainOptions(f,s),y=g.context,m=g.mergedOptions,v=g.axesThemes,E=g.seriesThemes;return m.series=processSeriesOptions((m.series||[]).map(function(e){var t=_;e.type?t=e.type:isSeriesOptionType(l)&&(t=l);var r=jsonMerge([E[t]||{},__assign$o(__assign$o({},e),{type:t})],noDataCloneMergeOptions);return"pie"===t&&preparePieOptions(E.pie,e,r),r})).map(function(e){return prepareSeries(y,e)}),isAgCartesianChartOptions(m)&&(m.axes=null===(i=m.axes)||void 0===i?void 0:i.map(function(e){var t,r=null!==(t=e.type)&&void 0!==t?t:"number";return prepareAxis(__assign$o(__assign$o({},e),{type:r}),jsonMerge([v[r],v[r][e.position||"unknown"]||{}]))})),prepareEnabledOptions(s,m),m}function sanityCheckOptions(e){Object.entries({yKeys:"yKey",yNames:"yName"}
2).forEach(function(t){var r,o=__read$o(t,2),i=o[0],n=o[1];(null===(r=e.series)||void 0===r?void 0:r.some(function(e){return null!=e[i]}))&&Logger.warnOnce("property [series."+i+"] is deprecated, please use [series."+n+"] and multiple series instead.")})}function prepareMainOptions(e,t){var r=prepareTheme(t),o=r.theme,i=r.cleanedTheme,n=r.axesThemes,a=r.seriesThemes;return{context:{colourIndex:0,palette:o.palette},mergedOptions:jsonMerge([e,i,t],noDataCloneMergeOptions),axesThemes:n,seriesThemes:a}}function prepareTheme(e){var t=getChartTheme(e.theme),r=t.config[optionsType(e)||"cartesian"],o=Object.entries(t.config).reduce(function(e,t){var r=__read$o(t,2),o=r[0],i=r[1].series;return e[o]=null==i?void 0:i[o],e},{});return{theme:t,axesThemes:r.axes||{},seriesThemes:o,cleanedTheme:jsonMerge([r,{axes:DELETE,series:DELETE}])}}function prepareSeries(e,t){for(var r=[],o=2;o<arguments.length;o++)r[o-2]=arguments[o];var i=calculateSeriesPalette(e,t);return applySeriesTransform(jsonMerge(__spread$e(r,[i,t,{stacked:DELETE}]),noDataCloneMergeOptions))}function calculateSeriesPalette(e,t){var r={},o=e.palette,i=o.fills,n=o.strokes,a=countArrayElements(t.yKeys||[])||1;switch(t.type){case"pie":a=Math.max(i.length,n.length);case"area":case"bar":case"column":r.fills=takeColours(e,i,a),r.strokes=takeColours(e,n,a);break;case"histogram":r.fill=takeColours(e,i,1)[0],r.stroke=takeColours(e,n,1)[0];break;case"scatter":r.marker={stroke:takeColours(e,n,1)[0],fill:takeColours(e,i,1)[0]};break;case"line":r.stroke=takeColours(e,i,1)[0],r.marker={stroke:takeColours(e,n,1)[0],fill:takeColours(e,i,1)[0]};break;case"treemap":break;default:throw new Error("AG Charts - unknown series type: "+t.type)}return e.colourIndex+=a,r}function prepareAxis(e,t){var r={top:DELETE,bottom:DELETE,left:DELETE,right:DELETE};if(e.crossLines){Array.isArray(e.crossLines)||(Logger.warn("axis[].crossLines should be an array."),e.crossLines=[]);var o=t.crossLines;e.crossLines=e.crossLines.map(function(e){return jsonMerge([o,e])})}return jsonMerge([t,{crossLines:DELETE},e,r],noDataCloneMergeOptions)}function prepareEnabledOptions(e,t){jsonWalk(e,function(e,t,r){if(r){var o=r._enabledFromTheme;null!=o&&delete r._enabledFromTheme,"enabled"in r&&(o||null==t.enabled&&(r.enabled=!0))}},{skip:["data","theme"]},t),jsonWalk(t,function(e,t){null!=t._enabledFromTheme&&delete t._enabledFromTheme},{skip:["data","theme"]})}function preparePieOptions(e,t,r){Array.isArray(t.innerLabels)?r.innerLabels=t.innerLabels.map(function(t){return jsonMerge([e.innerLabels,t])}):r.innerLabels=DELETE}var horizontalCrosslineTranslationDirections={top:{xTranslationDirection:0,yTranslationDirection:-1},bottom:{xTranslationDirection:0,yTranslationDirection:1},left:{xTranslationDirection:-1,yTranslationDirection:0},right:{xTranslationDirection:1,yTranslationDirection:0},topLeft:{xTranslationDirection:1,yTranslationDirection:-1},topRight:{xTranslationDirection:-1,yTranslationDirection:-1},bottomLeft:{xTranslationDirection:1,yTranslationDirection:1},bottomRight:{xTranslationDirection:-1,yTranslationDirection:1},inside:{xTranslationDirection:0,yTranslationDirection:0},insideLeft:{xTranslationDirection:1,yTranslationDirection:0},insideRight:{xTranslationDirection:-1,yTranslationDirection:0},insideTop:{xTranslationDirection:0,yTranslationDirection:1},insideBottom:{xTranslationDirection:0,yTranslationDirection:-1},insideTopLeft:{xTranslationDirection:1,yTranslationDirection:1},insideBottomLeft:{xTranslationDirection:1,yTranslationDirection:-1},insideTopRight:{xTranslationDirection:-1,yTranslationDirection:1},insideBottomRight:{xTranslationDirection:-1,yTranslationDirection:-1}},verticalCrossLineTranslationDirections={top:{xTranslationDirection:1,yTranslationDirection:0},bottom:{xTranslationDirection:-1,yTranslationDirection:0},left:{xTranslationDirection:0,yTranslationDirection:-1},right:{xTranslationDirection:0,yTranslationDirection:1},topLeft:{xTranslationDirection:-1,yTranslationDirection:-1},topRight:{xTranslationDirection:-1,yTranslationDirection:1},bottomLeft:{xTranslationDirection:1,yTranslationDirection:-1},bottomRight:{xTranslationDirection:1,yTranslationDirection:1},inside:{xTranslationDirection:0,yTranslationDirection:0},insideLeft:{xTranslationDirection:0,yTranslationDirection:1},insideRight:{xTranslationDirection:0,yTranslationDirection:-1},insideTop:{xTranslationDirection:-1,yTranslationDirection:0},insideBottom:{xTranslationDirection:1,yTranslationDirection:0},insideTopLeft:{xTranslationDirection:-1,yTranslationDirection:1},insideBottomLeft:{xTranslationDirection:1,yTranslationDirection:1},insideTopRight:{xTranslationDirection:-1,yTranslationDirection:-1},insideBottomRight:{xTranslationDirection:1,yTranslationDirection:-1}},calculateLabelTranslation=function(e){var t,r=e.yDirection,o=e.padding,i=void 0===o?0:o,n=e.position,a=e.bbox,s=r?horizontalCrosslineTranslationDirections:verticalCrossLineTranslationDirections,l=null!==(t=s[n])&&void 0!==t?t:s.top,c=l.xTranslationDirection,u=l.yTranslationDirection;return{xTranslation:c*(i+(r?a.width:a.height)/2),yTranslation:u*(i+(r?a.height:a.width)/2)}},POSITION_TOP_COORDINATES=function(e){var t=e.yDirection,r=e.xEnd,o=e.yStart,i=e.yEnd;return t?{x:r/2,y:o}:{x:r,y:isNaN(i)?o:(o+i)/2}},POSITION_LEFT_COORDINATES=function(e){var t=e.yDirection,r=e.xStart,o=e.xEnd,i=e.yStart,n=e.yEnd;return t?{x:r,y:isNaN(n)?i:(i+n)/2}:{x:o/2,y:i}},POSITION_RIGHT_COORDINATES=function(e){var t=e.yDirection,r=e.xEnd,o=e.yStart,i=e.yEnd;return t?{x:r,y:isNaN(i)?o:(o+i)/2}:{x:r/2,y:isNaN(i)?o:i}},POSITION_BOTTOM_COORDINATES=function(e){var t=e.yDirection,r=e.xStart,o=e.xEnd,i=e.yStart,n=e.yEnd;return t?{x:o/2,y:isNaN(n)?i:n}:{x:r,y:isNaN(n)?i:(i+n)/2}},POSITION_INSIDE_COORDINATES=function(e){var t=e.xEnd,r=e.yStart,o=e.yEnd;return{x:t/2,y:isNaN(o)?r:(r+o)/2}},POSITION_TOP_LEFT_COORDINATES=function(e){var t=e.yDirection,r=e.xStart,o=e.xEnd,i=e.yStart;return t?{x:r/2,y:i}:{x:o,y:i}},POSITION_BOTTOM_LEFT_COORDINATES=function(e){var t=e.yDirection,r=e.xStart,o=e.yStart,i=e.yEnd;return t?{x:r,y:isNaN(i)?o:i}:{x:r,y:o}},POSITION_TOP_RIGHT_COORDINATES=function(e){var t=e.yDirection,r=e.xEnd,o=e.yStart,i=e.yEnd;return t?{x:r,y:o}:{x:r,y:isNaN(i)?o:i}},POSITION_BOTTOM_RIGHT_COORDINATES=function(e){var t=e.yDirection,r=e.xStart,o=e.xEnd,i=e.yStart,n=e.yEnd;return t?{x:o,y:isNaN(n)?i:n}:{x:r,y:isNaN(n)?i:n}},labeldDirectionHandling={top:{c:POSITION_TOP_COORDINATES},bottom:{c:POSITION_BOTTOM_COORDINATES}
2,left:{c:POSITION_LEFT_COORDINATES},right:{c:POSITION_RIGHT_COORDINATES},topLeft:{c:POSITION_TOP_LEFT_COORDINATES},topRight:{c:POSITION_TOP_RIGHT_COORDINATES},bottomLeft:{c:POSITION_BOTTOM_LEFT_COORDINATES},bottomRight:{c:POSITION_BOTTOM_RIGHT_COORDINATES},inside:{c:POSITION_INSIDE_COORDINATES},insideLeft:{c:POSITION_LEFT_COORDINATES},insideRight:{c:POSITION_RIGHT_COORDINATES},insideTop:{c:POSITION_TOP_COORDINATES},insideBottom:{c:POSITION_BOTTOM_COORDINATES},insideTopLeft:{c:POSITION_TOP_LEFT_COORDINATES},insideBottomLeft:{c:POSITION_BOTTOM_LEFT_COORDINATES},insideTopRight:{c:POSITION_TOP_RIGHT_COORDINATES},insideBottomRight:{c:POSITION_BOTTOM_RIGHT_COORDINATES}},__extends$1M=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__assign$n=function(){return __assign$n=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$n.apply(this,arguments)},__decorate$1h=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},Range=function(e){function t(){var t=e.call(this)||this;return t.x1=0,t.y1=0,t.x2=0,t.y2=0,t.startLine=!1,t.endLine=!1,t.isRange=!1,t.restoreOwnStyles(),t}return __extends$1M(t,e),t.prototype.computeBBox=function(){return new BBox(this.x1,this.y1,this.x2-this.x1,this.y2-this.y1)},t.prototype.isPointInPath=function(e,t){return!1},t.prototype.render=function(t){var r,o=t.ctx,i=t.forceRender,n=t.stats;if(this.dirty!==RedrawType.NONE||i){this.computeTransformMatrix(),this.matrix.toContext(o);var a=this,s=a.x1,l=a.y1,c=a.x2,u=a.y2;s=this.align(s),l=this.align(l),c=this.align(c),u=this.align(u);var d=this,p=d.fill,h=d.opacity;if(d.isRange&&p){var _=this.fillOpacity;o.fillStyle=p,o.globalAlpha=h*_,o.beginPath(),o.moveTo(s,l),o.lineTo(c,l),o.lineTo(c,u),o.lineTo(s,u),o.closePath(),o.fill()}var f=this,g=f.stroke,y=f.strokeWidth,m=f.startLine,v=f.endLine;if((m||v)&&g&&y){var E=this,C=E.strokeOpacity,O=E.lineDash,P=E.lineDashOffset,S=E.lineCap,b=E.lineJoin;o.strokeStyle=g,o.globalAlpha=h*C,o.lineWidth=y,O&&o.setLineDash(O),P&&(o.lineDashOffset=P),S&&(o.lineCap=S),b&&(o.lineJoin=b),o.beginPath(),m&&(o.moveTo(s,l),o.lineTo(c,l)),v&&(o.moveTo(c,u),o.lineTo(s,u)),o.stroke()}null===(r=this.fillShadow)||void 0===r||r.markClean(),e.prototype.render.call(this,t)}else n&&(n.nodesSkipped+=this.nodeCount.count)},t.className="Range",t.defaultStyles=__assign$n(__assign$n({},Shape.defaultStyles),{strokeWidth:1}),__decorate$1h([SceneChangeDetection({redraw:RedrawType.MINOR})],t.prototype,"x1",void 0),__decorate$1h([SceneChangeDetection({redraw:RedrawType.MINOR})],t.prototype,"y1",void 0),__decorate$1h([SceneChangeDetection({redraw:RedrawType.MINOR})],t.prototype,"x2",void 0),__decorate$1h([SceneChangeDetection({redraw:RedrawType.MINOR})],t.prototype,"y2",void 0),__decorate$1h([SceneChangeDetection({redraw:RedrawType.MINOR})],t.prototype,"startLine",void 0),__decorate$1h([SceneChangeDetection({redraw:RedrawType.MINOR})],t.prototype,"endLine",void 0),__decorate$1h([SceneChangeDetection({redraw:RedrawType.MINOR})],t.prototype,"isRange",void 0),t}(Shape),__decorate$1g=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},__read$n=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},__spread$d=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read$n(arguments[t]));return e},CROSSLINE_LABEL_POSITIONS=["top","left","right","bottom","topLeft","topRight","bottomLeft","bottomRight","inside","insideLeft","insideRight","insideTop","insideBottom","insideTopLeft","insideBottomLeft","insideTopRight","insideBottomRight"],OPT_CROSSLINE_LABEL_POSITION=predicateWithMessage(function(e,t){return OPTIONAL(e,t,function(e){return CROSSLINE_LABEL_POSITIONS.includes(e)})},"expecting an optional crossLine label position keyword such as 'topLeft', 'topRight' or 'inside'"),OPT_CROSSLINE_TYPE=predicateWithMessage(function(e,t){return OPTIONAL(e,t,function(e){return"range"===e||"line"===e})},"expecting a crossLine type keyword such as 'range' or 'line'"),CrossLineLabel=function(){function e(){this.enabled=void 0,this.text=void 0,this.fontStyle=void 0,this.fontWeight=void 0,this.fontSize=14,this.fontFamily="Verdana, sans-serif",this.padding=5,this.color="rgba(87, 87, 87, 1)",this.position=void 0,this.rotation=void 0,this.parallel=void 0}return __decorate$1g([Validate(OPT_BOOLEAN)],e.prototype,"enabled",void 0),__decorate$1g([Validate(OPT_STRING)],e.prototype,"text",void 0),__decorate$1g([Validate(OPT_FONT_STYLE)],e.prototype,"fontStyle",void 0),__decorate$1g([Validate(OPT_FONT_WEIGHT)],e.prototype,"fontWeight",void 0),__decorate$1g([Validate(NUMBER(0))],e.prototype,"fontSize",void 0),__decorate$1g([Validate(STRING)],e.prototype,"fontFamily",void 0),__decorate$1g([Validate(NUMBER(0))],e.prototype,"padding",void 0),__decorate$1g([Validate(OPT_COLOR_STRING)],e.prototype,"color",void 0),__decorate$1g([Validate(OPT_CROSSLINE_LABEL_POSITION)],e.prototype,"position",void 0),__decorate$1g([Validate(OPT_NUM
2BER(-360,360))],e.prototype,"rotation",void 0),__decorate$1g([Validate(OPT_BOOLEAN)],e.prototype,"parallel",void 0),e}(),CrossLine=function(){function e(){this.id=createId$1(this),this.enabled=void 0,this.type=void 0,this.range=void 0,this.value=void 0,this.fill=void 0,this.fillOpacity=void 0,this.stroke=void 0,this.strokeWidth=void 0,this.strokeOpacity=void 0,this.lineDash=void 0,this.label=new CrossLineLabel,this.scale=void 0,this.clippedRange=[-1/0,1/0],this.gridLength=0,this.sideFlag=-1,this.parallelFlipRotation=0,this.regularFlipRotation=0,this.direction=ChartAxisDirection.X,this.group=new Group({name:""+this.id,layer:!0,zIndex:e.LINE_LAYER_ZINDEX}),this.crossLineRange=new Range,this.crossLineLabel=new Text,this.labelPoint=void 0,this.data=[],this.startLine=!1,this.endLine=!1,this.isRange=!1;var t=this,r=t.group,o=t.crossLineRange,i=t.crossLineLabel;r.append([o,i]),o.pointerEvents=PointerEvents.None}return e.prototype.update=function(e){this.enabled&&(this.group.visible=e,e&&(this.createNodeData()?(this.updateNodes(),this.group.zIndex=this.getZIndex(this.isRange)):this.group.visible=!1))},e.prototype.updateNodes=function(){this.updateRangeNode(),this.label.enabled&&(this.updateLabel(),this.positionLabel())},e.prototype.createNodeData=function(){var e,t,r,o,i,n=this,a=n.scale,s=n.gridLength,l=n.sideFlag,c=n.direction,u=n.label.position,d=void 0===u?"top":u,p=n.clippedRange,h=n.strokeWidth,_=void 0===h?0:h;if(!a)return!1;var f=null!==(o=a.bandwidth)&&void 0!==o?o:0,g=function(e){return Math.max(Math.min.apply(Math,__spread$d(p)),Math.min(Math.max.apply(Math,__spread$d(p)),e))},y=__read$n([0,l*s],2),m=y[0],v=y[1],E=__read$n(this.getRange(),2),C=E[0],O=E[1],P=__read$n([Number(a.convert(C,{strict:!1})),a.convert(O,{strict:!1})+f],2),S=P[0],b=P[1];S=g(S),b=g(b),C=(e=__read$n([Number(a.convert(C)),a.convert(O)+f],2))[0],O=e[1];var D=!isNaN(S)&&!isNaN(b)&&(C===S||O===b||S!==b)&&Math.abs(b-S)>0;if(D&&S!==Math.min(S,b)&&(S=(t=__read$n([Math.min(S,b),Math.max(S,b)],2))[0],b=t[1],C=(r=__read$n([O,C],2))[0],O=r[1]),this.isRange=D,this.startLine=!isNaN(C)&&_>0&&C===S,this.endLine=!isNaN(O)&&_>0&&O===b,!D&&!this.startLine&&!this.endLine)return!1;if(this.data=[S,b],this.label.enabled){var M=c===ChartAxisDirection.Y,T=(null!==(i=labeldDirectionHandling[d])&&void 0!==i?i:{}).c,A=(void 0===T?POSITION_TOP_COORDINATES:T)({yDirection:M,xStart:m,xEnd:v,yStart:S,yEnd:b}),x=A.x,w=A.y;this.labelPoint={x,y:w}}return!0},e.prototype.updateRangeNode=function(){var e,t=this,r=t.crossLineRange,o=t.sideFlag,i=t.gridLength,n=t.data,a=t.startLine,s=t.endLine,l=t.isRange,c=t.fill,u=t.fillOpacity,d=t.stroke,p=t.strokeWidth,h=t.lineDash;r.x1=0,r.x2=o*i,r.y1=n[0],r.y2=n[1],r.startLine=a,r.endLine=s,r.isRange=l,r.fill=c,r.fillOpacity=null!=u?u:1,r.stroke=d,r.strokeWidth=null!=p?p:1,r.strokeOpacity=null!==(e=this.strokeOpacity)&&void 0!==e?e:1,r.lineDash=h},e.prototype.updateLabel=function(){var e=this.crossLineLabel,t=this.label;t.text&&(e.fontStyle=t.fontStyle,e.fontWeight=t.fontWeight,e.fontSize=t.fontSize,e.fontFamily=t.fontFamily,e.fill=t.color,e.text=t.text)},e.prototype.positionLabel=function(){var e=this,t=e.crossLineLabel,r=e.labelPoint,o=void 0===r?{}:r,i=o.x,n=void 0===i?void 0:i,a=o.y,s=void 0===a?void 0:a,l=e.label,c=l.parallel,u=l.rotation,d=l.position,p=void 0===d?"top":d,h=l.padding,_=void 0===h?0:h,f=e.direction,g=e.parallelFlipRotation,y=e.regularFlipRotation;if(void 0!==n&&void 0!==s){var m=calculateLabelRotation({rotation:u,parallel:c,regularFlipRotation:y,parallelFlipRotation:g}),v=m.autoRotation,E=m.labelRotation;t.rotation=v+E,t.textBaseline="middle",t.textAlign="center";var C=this.computeLabelBBox();if(C){var O=f===ChartAxisDirection.Y,P=calculateLabelTranslation({yDirection:O,padding:_,position:p,bbox:C}),S=P.xTranslation,b=P.yTranslation;t.translationX=n+S,t.translationY=s+b}}},e.prototype.getZIndex=function(t){return void 0===t&&(t=!1),t?e.RANGE_LAYER_ZINDEX:e.LINE_LAYER_ZINDEX},e.prototype.getRange=function(){var e,t=this,r=t.value,o=t.range,i=t.scale instanceof ContinuousScale,n=__read$n(null!=o?o:[r,void 0],2),a=n[0],s=n[1];return i||void 0!==s||(s=a),a=(e=__read$n([checkDatum(a,i),checkDatum(s,i)],2))[0],s=e[1],i&&a===s&&(s=void 0),void 0===a&&void 0!==s&&(a=s,s=void 0),[a,s]},e.prototype.computeLabelBBox=function(){return this.crossLineLabel.computeTransformedBBox()},e.prototype.calculatePadding=function(e,t){var r,o,i,n,a,s,l=this,c=l.isRange,u=l.startLine,d=l.endLine;if(c||u||d){var p=this.computeLabelBBox(),h=null==p?void 0:p.x,_=null==p?void 0:p.y;if(null!=h&&null!=_){var f=null!==(r=null==p?void 0:p.width)&&void 0!==r?r:0,g=null!==(o=null==p?void 0:p.height)&&void 0!==o?o:0;if(!(f>t.width||g>t.height)){if(h+f>=t.x+t.width){var y=h+f-(t.x+t.width);e.right=(null!==(i=e.right)&&void 0!==i?i:0)>=y?e.right:y}else if(h<=t.x){var m=t.x-h;e.left=(null!==(n=e.left)&&void 0!==n?n:0)>=m?e.left:m}if(_+g>=t.y+t.height){var v=_+g-(t.y+t.height);e.bottom=(null!==(a=e.bottom)&&void 0!==a?a:0)>=v?e.bottom:v}else if(_<=t.y){var E=t.y-_;e.top=(null!==(s=e.top)&&void 0!==s?s:0)>=E?e.top:E}}}}},e.LINE_LAYER_ZINDEX=Layers.SERIES_CROSSLINE_LINE_ZINDEX,e.RANGE_LAYER_ZINDEX=Layers.SERIES_CROSSLINE_RANGE_ZINDEX,e.className="CrossLine",__decorate$1g([Validate(OPT_BOOLEAN)],e.prototype,"enabled",void 0),__decorate$1g([Validate(OPT_CROSSLINE_TYPE)],e.prototype,"type",void 0),__decorate$1g([Validate(OPT_ARRAY(2))],e.prototype,"range",void 0),__decorate$1g([Validate(OPT_COLOR_STRING)],e.prototype,"fill",void 0),__decorate$1g([Validate(OPT_NUM
2BER(0,1))],e.prototype,"fillOpacity",void 0),__decorate$1g([Validate(OPT_COLOR_STRING)],e.prototype,"stroke",void 0),__decorate$1g([Validate(OPT_NUMBER())],e.prototype,"strokeWidth",void 0),__decorate$1g([Validate(OPT_NUMBER(0,1))],e.prototype,"strokeOpacity",void 0),__decorate$1g([Validate(OPT_LINE_DASH)],e.prototype,"lineDash",void 0),e}(),__extends$1L=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$1f=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},Image=function(e){function t(t){var r=e.call(this)||this;return r.x=0,r.y=0,r.width=0,r.height=0,r.opacity=1,r.sourceImage=t,r}return __extends$1L(t,e),t.prototype.render=function(t){var r=t.ctx,o=t.forceRender,i=t.stats;if(this.dirty!==RedrawType.NONE||o){this.computeTransformMatrix(),this.matrix.toContext(r);var n=this.sourceImage;r.globalAlpha=this.opacity,r.drawImage(n,0,0,n.width,n.height,this.x,this.y,this.width,this.height),e.prototype.render.call(this,t)}else i&&i.nodesSkipped++},__decorate$1f([SceneChangeDetection({redraw:RedrawType.MAJOR})],t.prototype,"x",void 0),__decorate$1f([SceneChangeDetection({redraw:RedrawType.MAJOR})],t.prototype,"y",void 0),__decorate$1f([SceneChangeDetection({redraw:RedrawType.MAJOR})],t.prototype,"width",void 0),__decorate$1f([SceneChangeDetection({redraw:RedrawType.MAJOR})],t.prototype,"height",void 0),__decorate$1f([SceneChangeDetection({redraw:RedrawType.MAJOR})],t.prototype,"opacity",void 0),t}(Node),BackgroundImage=function(){function e(){var e=this;this._image=document.createElement("img"),this.loadedSynchronously=!0,this.left=void 0,this.top=void 0,this.right=void 0,this.bottom=void 0,this.width=void 0,this.height=void 0,this.opacity=1,this.containerWidth=0,this.containerHeight=0,this.onload=void 0,this.onImageLoad=function(){e.loadedSynchronously||(e.node.visible=!1,e.performLayout(e.containerWidth,e.containerHeight),e.onload&&e.onload())},this.node=new Image(this._image),this._image.onload=this.onImageLoad}return Object.defineProperty(e.prototype,"url",{get:function(){return this._image.src},set:function(e){this._image.src=e,this.loadedSynchronously=this.complete},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"complete",{get:function(){return this._image.width>0&&this._image.height>0},enumerable:!1,configurable:!0}),e.prototype.performLayout=function(e,t){if(this.containerWidth=e,this.containerHeight=t,this.complete){var r=this.calculatePosition(this._image.width,this._image.height);Object.assign(this.node,r),this.node.visible=!0,this.node.opacity=this.opacity}else this.node.visible=!1},e.prototype.calculatePosition=function(e,t){var r=this.left,o=this.right,i=this.width,n=this.top,a=this.bottom,s=this.height;return null!=r?null!=o?i=this.containerWidth-r-o:null!=i&&(o=this.containerWidth-r+i):null!=o&&null!=i&&(r=this.containerWidth-o-i),null!=n?null!=a?s=this.containerHeight-a-n:null!=s&&(a=this.containerHeight-n-s):null!=a&&null!=s&&(n=this.containerHeight-a-s),null==i?null==s?(i=e,s=t):i=Math.ceil(e*s/t):null==s&&(s=Math.ceil(t*i/e)),null==r&&(r=null==o?Math.floor((this.containerWidth-i)/2):this.containerWidth-o-i),null==n&&(n=null==a?Math.floor((this.containerHeight-s)/2):this.containerHeight-s-a),{x:r,y:n,width:i,height:s}},e}(),__values$9=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},BaseModuleInstance=function(){function e(){this.destroyFns=[]}return e.prototype.destroy=function(){var e,t;try{for(var r=__values$9(this.destroyFns),o=r.next();!o.done;o=r.next())(0,o.value)()}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}},e}(),REGISTERED_MODULES=[];function registerModule(e){REGISTERED_MODULES.push(e)}var __extends$1K=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$1e=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},RangeHandle$1=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._fill="#f2f2f2",t._stroke="#999999",t._strokeWidth=1,t._lineCap="square",t._centerX=0,t._centerY=0,t._width=8,t._gripLineGap=2,t._gripLineLength=8,t._height=16,t}return __extends$1K(t,e),Object.defineProperty(t.prototype,"centerX",{get:function(){return this._centerX},set:function(e){this._centerX!==e&&(this._centerX=e,this.dirtyPath=!0)}
2,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"centerY",{get:function(){return this._centerY},set:function(e){this._centerY!==e&&(this._centerY=e,this.dirtyPath=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this._width},set:function(e){this._width!==e&&(this._width=e,this.dirtyPath=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"gripLineGap",{get:function(){return this._gripLineGap},set:function(e){this._gripLineGap!==e&&(this._gripLineGap=e,this.dirtyPath=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"gripLineLength",{get:function(){return this._gripLineLength},set:function(e){this._gripLineLength!==e&&(this._gripLineLength=e,this.dirtyPath=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this._height},set:function(e){this._height!==e&&(this._height=e,this.dirtyPath=!0)},enumerable:!1,configurable:!0}),t.prototype.computeBBox=function(){var e=this,t=e.centerX,r=e.centerY,o=e.width,i=e.height;return new BBox(t-o/2,r-i/2,o,i)},t.prototype.isPointInPath=function(e,t){var r=this.transformPoint(e,t);return this.computeBBox().containsPoint(r.x,r.y)},t.prototype.updatePath=function(){var e=this,t=e.path,r=e.centerX,o=e.centerY,i=e.width,n=e.height;t.clear();var a=r-i/2,s=o-n/2,l=this.align(a),c=this.align(s),u=l+this.align(a,i),d=c+this.align(s,n);t.moveTo(l,c),t.lineTo(u,c),t.lineTo(u,d),t.lineTo(l,d),t.lineTo(l,c);var p=this.gripLineGap/2,h=this.gripLineLength/2;t.moveTo(this.align(r-p),this.align(o-h)),t.lineTo(this.align(r-p),this.align(o+h)),t.moveTo(this.align(r+p),this.align(o-h)),t.lineTo(this.align(r+p),this.align(o+h))},t.className="RangeHandle",__decorate$1e([Validate(COLOR_STRING)],t.prototype,"_fill",void 0),__decorate$1e([Validate(COLOR_STRING)],t.prototype,"_stroke",void 0),__decorate$1e([Validate(NUMBER(0))],t.prototype,"_strokeWidth",void 0),__decorate$1e([Validate(LINE_CAP)],t.prototype,"_lineCap",void 0),__decorate$1e([Validate(NUMBER(0))],t.prototype,"_width",void 0),__decorate$1e([Validate(NUMBER(0))],t.prototype,"_gripLineGap",void 0),__decorate$1e([Validate(NUMBER(0))],t.prototype,"_gripLineLength",void 0),__decorate$1e([Validate(NUMBER(0))],t.prototype,"_height",void 0),t}(Path),__extends$1J=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$1d=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},RangeMask=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._stroke="#999999",t._strokeWidth=1,t._fill="#999999",t._fillOpacity=.2,t._lineCap="square",t._x=0,t._y=0,t._width=200,t._height=30,t.minRange=.05,t._min=0,t._max=1,t}return __extends$1J(t,e),Object.defineProperty(t.prototype,"x",{get:function(){return this._x},set:function(e){this._x!==e&&(this._x=e,this.dirtyPath=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this._y},set:function(e){this._y!==e&&(this._y=e,this.dirtyPath=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this._width},set:function(e){this._width!==e&&(this._width=e,this.dirtyPath=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this._height},set:function(e){this._height!==e&&(this._height=e,this.dirtyPath=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"min",{get:function(){return this._min},set:function(e){var t;e=Math.min(Math.max(e,0),this.max-this.minRange),isNaN(e)||this._min!==e&&(this._min=e,this.dirtyPath=!0,null===(t=this.onRangeChange)||void 0===t||t.call(this))}
2,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"max",{get:function(){return this._max},set:function(e){var t;e=Math.max(Math.min(e,1),this.min+this.minRange),isNaN(e)||this._max!==e&&(this._max=e,this.dirtyPath=!0,null===(t=this.onRangeChange)||void 0===t||t.call(this))},enumerable:!1,configurable:!0}),t.prototype.computeBBox=function(){var e=this,t=e.x,r=e.y,o=e.width,i=e.height;return new BBox(t,r,o,i)},t.prototype.computeVisibleRangeBBox=function(){var e=this,t=e.x,r=e.y,o=e.width,i=e.height,n=e.min,a=e.max,s=t+o*n;return new BBox(s,r,t+o*a-s,i)},t.prototype.updatePath=function(){var e=this,t=e.path,r=e.x,o=e.y,i=e.width,n=e.height,a=e.min,s=e.max;t.clear();var l=this.align(r),c=this.align(o),u=l+this.align(r,i),d=c+this.align(o,n);t.moveTo(l,c),t.lineTo(u,c),t.lineTo(u,d),t.lineTo(l,d),t.lineTo(l,c);var p=this.align(r+i*a),h=this.align(r+i*s);t.moveTo(p,c),t.lineTo(p,d),t.lineTo(h,d),t.lineTo(h,c),t.lineTo(p,c)},t.className="RangeMask",__decorate$1d([Validate(COLOR_STRING)],t.prototype,"_stroke",void 0),__decorate$1d([Validate(NUMBER(0))],t.prototype,"_strokeWidth",void 0),__decorate$1d([Validate(COLOR_STRING)],t.prototype,"_fill",void 0),__decorate$1d([Validate(NUMBER(0,1))],t.prototype,"_fillOpacity",void 0),__decorate$1d([Validate(LINE_CAP)],t.prototype,"_lineCap",void 0),__decorate$1d([Validate(NUMBER(0))],t.prototype,"_width",void 0),__decorate$1d([Validate(NUMBER(0))],t.prototype,"_height",void 0),__decorate$1d([Validate(NUMBER())],t.prototype,"_min",void 0),__decorate$1d([Validate(NUMBER())],t.prototype,"_max",void 0),t}(Path),__extends$1I=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__assign$m=function(){return __assign$m=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$m.apply(this,arguments)},RangeSelector=function(e){function t(){var r=e.call(this,{name:"rangeSelectorGroup"})||this;return r.minHandle=new RangeHandle$1,r.maxHandle=new RangeHandle$1,r.mask=function(){var e=t.defaults,o=e.x,i=e.y,n=e.width,a=e.height,s=e.min,l=e.max,c=new RangeMask;c.x=o,c.y=i,c.width=n,c.height=a,c.min=s,c.max=l;var u=r,d=u.minHandle,p=u.maxHandle;return d.centerX=o,p.centerX=o+n,d.centerY=p.centerY=i+a/2,r.append([c,d,p]),c.onRangeChange=function(){var e;r.updateHandles(),null===(e=r.onRangeChange)||void 0===e||e.call(r)},c}(),r._x=t.defaults.x,r._y=t.defaults.y,r._width=t.defaults.width,r._height=t.defaults.height,r._min=t.defaults.min,r._max=t.defaults.max,r.isContainerNode=!0,r}return __extends$1I(t,e),Object.defineProperty(t.prototype,"x",{get:function(){return this.mask.x},set:function(e){this.mask.x=e,this.updateHandles()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this.mask.y},set:function(e){this.mask.y=e,this.updateHandles()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.mask.width},set:function(e){this.mask.width=e,this.updateHandles()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.mask.height},set:function(e){this.mask.height=e,this.updateHandles()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"min",{get:function(){return this.mask.min},set:function(e){this.mask.min=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"max",{get:function(){return this.mask.max},set:function(e){this.mask.max=e},enumerable:!1,configurable:!0}),t.prototype.updateHandles=function(){var e=this,t=e.minHandle,r=e.maxHandle,o=e.x,i=e.y,n=e.width,a=e.height,s=e.mask;t.centerX=o+n*s.min,r.centerX=o+n*s.max,t.centerY=r.centerY=i+a/2},t.prototype.computeBBox=function(){return this.mask.computeBBox()},t.prototype.computeVisibleRangeBBox=function(){return this.mask.computeVisibleRangeBBox()},t.prototype.render=function(e){var t=e.ctx,r=e.forceRender,o=e.stats;if(this.dirty!==RedrawType.NONE||r){this.computeTransformMatrix(),this.matrix.toContext(t);var i=this;[i.mask,i.minHandle,i.maxHandle].forEach(function(o){o.visible&&(r||o.dirty>RedrawType.NONE)&&(t.save(),o.render(__assign$m(__assign$m({},e),{ctx:t,forceRender:r}
2)),t.restore())}),this.markClean({force:!0}),o&&o.nodesRendered++}else o&&o.nodesSkipped++},t.className="Range",t.defaults={x:0,y:0,width:200,height:30,min:0,max:1},t}(Group),NavigatorMask=function(){function e(e){this.rm=e}return Object.defineProperty(e.prototype,"fill",{get:function(){return this.rm.fill},set:function(e){this.rm.fill=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"stroke",{get:function(){return this.rm.stroke},set:function(e){this.rm.stroke=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"strokeWidth",{get:function(){return this.rm.strokeWidth},set:function(e){this.rm.strokeWidth=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fillOpacity",{get:function(){return this.rm.fillOpacity},set:function(e){this.rm.fillOpacity=e},enumerable:!1,configurable:!0}),e}(),NavigatorHandle=function(){function e(e){this.rh=e}return Object.defineProperty(e.prototype,"fill",{get:function(){return this.rh.fill},set:function(e){this.rh.fill=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"stroke",{get:function(){return this.rh.stroke},set:function(e){this.rh.stroke=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"strokeWidth",{get:function(){return this.rh.strokeWidth},set:function(e){this.rh.strokeWidth=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this.rh.width},set:function(e){this.rh.width=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.rh.height},set:function(e){this.rh.height=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"gripLineGap",{get:function(){return this.rh.gripLineGap},set:function(e){this.rh.gripLineGap=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"gripLineLength",{get:function(){return this.rh.gripLineLength},set:function(e){this.rh.gripLineLength=e},enumerable:!1,configurable:!0}),e}(),__extends$1H=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$1c=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},Navigator=function(e){function t(t){var r=e.call(this)||this;return r.ctx=t,r.rs=new RangeSelector,r.mask=new NavigatorMask(r.rs.mask),r.minHandle=new NavigatorHandle(r.rs.minHandle),r.maxHandle=new NavigatorHandle(r.rs.maxHandle),r.minHandleDragging=!1,r.maxHandleDragging=!1,r.panHandleOffset=NaN,r._enabled=!1,r.margin=10,r._visible=!0,r.rs.onRangeChange=function(){return r.ctx.zoomManager.updateZoom("navigator",{x:{min:r.rs.min,max:r.rs.max}})},[t.interactionManager.addListener("drag-start",function(e){return r.onDragStart(e)}),t.interactionManager.addListener("drag",function(e){return r.onDrag(e)}),t.interactionManager.addListener("hover",function(e){return r.onDrag(e)}),t.interactionManager.addListener("drag-end",function(){return r.onDragStop()})].forEach(function(e){return r.destroyFns.push(function(){return t.interactionManager.removeListener(e)})}),[t.layoutService.addListener("before-series",function(e){return r.layout(e)}),t.layoutService.addListener("layout-complete",function(e){return r.layoutComplete(e)})].forEach(function(e){return r.destroyFns.push(function(){return t.layoutService.removeListener(e)})}),t.scene.root.appendChild(r.rs),r.destroyFns.push(function(){var e;return null===(e=t.scene.root)||void 0===e?void 0:e.removeChild(r.rs)}),r.updateGroupVisibility(),r}return __extends$1H(t,e),Object.defineProperty(t.prototype,"enabled",{get:function(){return this._enabled},set:function(e){this._enabled=e,this.updateGroupVisibility()}
2,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.rs.width},set:function(e){this.rs.width=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.rs.height},set:function(e){this.rs.height=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"min",{get:function(){return this.rs.min},set:function(e){this.rs.min=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"max",{get:function(){return this.rs.max},set:function(e){this.rs.max=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"visible",{get:function(){return this._visible},set:function(e){this._visible=e,this.updateGroupVisibility()},enumerable:!1,configurable:!0}),t.prototype.updateGroupVisibility=function(){this.rs.visible=this.enabled&&this.visible},t.prototype.layout=function(e){var t=e.shrinkRect;if(this.enabled){var r=this.rs.height+this.margin;t.shrink(r,"bottom"),this.rs.y=t.y+t.height+this.margin}return{shrinkRect:t}},t.prototype.layoutComplete=function(e){var t=e.series,r=t.rect,o=t.visible;this.enabled&&o&&(this.rs.x=r.x,this.rs.width=r.width),this.visible=o},t.prototype.update=function(){},t.prototype.onDragStart=function(e){if(this.enabled){var t=e.offsetX,r=e.offsetY,o=this.rs,i=o.minHandle,n=o.maxHandle,a=o.x,s=o.width,l=o.min,c=o.computeVisibleRangeBBox();this.minHandleDragging||this.maxHandleDragging||(i.containsPoint(t,r)?this.minHandleDragging=!0:n.containsPoint(t,r)?this.maxHandleDragging=!0:c.containsPoint(t,r)&&(this.panHandleOffset=(t-a)/s-l))}},t.prototype.onDrag=function(e){if(this.enabled){var t=this.rs,r=this.panHandleOffset,o=t.x,i=t.y,n=t.width,a=t.height,s=t.minHandle,l=t.maxHandle,c=e.offsetX,u=e.offsetY,d=o+n*t.min,p=o+n*t.max,h=new BBox(d,i,p-d,a),_=function(){return Math.min(Math.max((c-o)/n,0),1)};if(s.containsPoint(c,u)||l.containsPoint(c,u)?this.ctx.cursorManager.updateCursor("navigator","ew-resize"):h.containsPoint(c,u)?this.ctx.cursorManager.updateCursor("navigator","grab"):this.ctx.cursorManager.updateCursor("navigator"),this.minHandleDragging)t.min=_();else if(this.maxHandleDragging)t.max=_();else if(!isNaN(r)){var f=t.max-t.min,g=Math.min(_()-r,1-f);g<=t.min?(t.min=g,t.max=t.min+f):(t.max=g+f,t.min=t.max-f)}}},t.prototype.onDragStop=function(){this.stopHandleDragging()},t.prototype.stopHandleDragging=function(){this.minHandleDragging=this.maxHandleDragging=!1,this.panH
2andleOffset=NaN},__decorate$1c([Validate(BOOLEAN)],t.prototype,"_enabled",void 0),__decorate$1c([Validate(NUMBER(0))],t.prototype,"margin",void 0),t}(BaseModuleInstance),CHART_NAVIGATOR_MODULE={type:"root",optionsKey:"navigator",chartTypes:["cartesian"],initialiseModule:function(e){return{instance:new Navigator(e)}}};registerModule(CHART_NAVIGATOR_MODULE);var __assign$l=function(){return __assign$l=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$l.apply(this,arguments)},__awaiter=function(e,t,r,o){return new(r||(r=Promise))(function(i,n){function a(e){try{l(o.next(e))}catch(e){n(e)}}function s(e){try{l(o.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})},__generator=function(e,t){var r,o,i,n,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return n={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function s(n){return function(s){return function(n){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(i=2&n[0]?o.return:n[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,n[1])).done)return i;switch(o=0,i&&(n=[2&n[0],i.value]),n[0]){case 0:case 1:i=n;break;case 4:return a.label++,{value:n[1],done:!1};case 5:a.label++,o=n[1],n=[0];continue;case 7:n=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==n[0]&&2!==n[0])){a=0;continue}if(3===n[0]&&(!i||n[1]>i[0]&&n[1]<i[3])){a.label=n[1];break}if(6===n[0]&&a.label<i[1]){a.label=i[1],i=n;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(n);break}i[2]&&a.ops.pop(),a.trys.pop();continue}n=t.call(e,a)}catch(e){n=[6,e],o=0}finally{r=i=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,s])}}},__read$m=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},__spread$c=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read$m(arguments[t]));return e},__values$8=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function chartType(e){if(isAgCartesianChartOptions(e))return"cartesian";if(isAgPolarChartOptions(e))return"polar";if(isAgHierarchyChartOptions(e))return"hierarchy";throw new Error("AG Chart - unknown type of chart for options with type: "+e.type)}var AgChart=function(){function e(){}return e.create=function(e){return AgChartInternal.createOrUpdate(e)},e.update=function(e,t){if(!AgChartInstanceProxy.isInstance(e))throw new Error("AG Charts - invalid chart reference passed");AgChartInternal.createOrUpdate(t,e)},e.updateDelta=function(e,t){if(!AgChartInstanceProxy.isInstance(e))throw new Error("AG Charts - invalid chart reference passed");return AgChartInternal.updateUserDelta(e,t)},e.download=function(e,t){if(!(e instanceof AgChartInstanceProxy))throw new Error("AG Charts - invalid chart reference passed");return AgChartInternal.download(e,t)},e.getImageDataURL=function(e,t){if(!(e instanceof AgChartInstanceProxy))throw new Error("AG Charts - invalid chart reference passed");return AgChartInternal.getImageDataURL(e,t)},e}(),AgChartInstanceProxy=function(){function e(e){this.chart=e}return e.isInstance=function(t){var r,o;if(t instanceof e)return!0;if("AgChartInstanceProxy"===(null===(r=t.constructor)||void 0===r?void 0:r.name)&&null!=t.chart)return!0;var i=Object.keys(null===(o=t.constructor)||void 0===o?void 0:o.prototype);return!(!Object.keys(e.prototype).every(function(e){return i.includes(e)})||null==t.chart)},e.prototype.getOptions=function(){return this.chart.getOptions()},e.prototype.destroy=function(){this.chart.destroy()},e}(),AgChartInternal=function(){function e(){}return e.createOrUpdate=function(t,r){var o=this;debug(">>> createOrUpdate() user options",t);var i={};!0===e.DEBUG()&&(i.debug=!0);var n=t.overrideDevicePixelRatio;delete t.overrideDevicePixelRatio;var a=prepareOptions(t,i),s=null==r?void 0:r.chart;null!=s&&chartType(t)===chartType(s.processedOptions)||(s=e.createChartInstance(a,n,s)),null==r?r=new AgChartInstanceProxy(s):r.chart=s;var l=s;l.queuedUserOptions.push(t);var c=function(){var e=l.queuedUserOptions.indexOf(t);l.queuedUserOptions.splice(0,e)};return l.requestFactoryUpdate(function(){return __awaiter(o,void 0,void 0,function(){var r;return __generator(this,function(o){switch(o.label){case 0:return l.destroyed?[2]:null==(r=jsonDiff(l.processedOptions,a))?(c(),[2]):[4,e.updateDelta(l,r,t)];case 1:return o.sent(),c(),[2]}})})}),r},e.updateUserDelta=function(t,r){var o,i=t.chart,n=t.chart.queuedUserOptions,a=null!==(o=n[n.length-1])&&void 0!==o?o:i.userOptions,s=jsonMerge([a,r]);debug(">>> updateUserDelta() user delta",r),debug("base options",a),e.createOrUpdate(s,t)},e.download=function(t,r){__awaiter(this,void 0,void 0,function(){var o;return __generator(this,function(i){switch(i.label){case 0:return[4,e.prepareResizedChart(t,r)];case 1:return(o=i.sent()).chart.scene.download(null==r?void 0:r.fileName,null==r?void 0:r.fileFormat),o!==t&&o.destroy(),[2]}})})},e.getImageDataURL=function(t,r){return __awaiter(this,void 0,void 0,function(){var o,i,n;return __generator(this,function(a){switch(a.label){case 0:return[4,e.prepareResizedChart(t,r)];case 1:return o=a.sent(),i=o.chart,n=i.scene.canvas.getDataURL(null==r?void 0:r.fileFormat),o!==t&&o.destroy(),[2,n]}})})},e.prepareResizedChart=function(t,r){return __awaiter(this,void 0,void 0,function(){var o,i,n,a,s,l,c,u;return __generator(this,function(d){switch(d.label){case 0:return o=t.chart,n=(i=r||{}).width,a=i.height,s=o.width,l=o.height,void 0===n&&void 0===a||1===o.scene.canvas.pixelRatio&&s===n&&l===a?[2,t]:(n=null!=n?n:s,a=null!=a?a:l,c=__assign$l(__assign$l({},o.userOptions),{container:document.createElement("div"),width:n,height:a,autoSize:!1,overrideDevicePixelRatio:1}),[4,(u=e.createOrUpdate(c)).chart.waitForUpdate()]);case 1:return d.sent(),[2,u]}})})},e.createChartInstance=function(e,t,r){var o=null==r?void 0:r.destroy({keepTransferableResources:!0});if(isAgCartesianChartOptions(e))return new CartesianChart(document,t,o);if(isAgHierarchyChartOptions(e))return new HierarchyChart(document,t,o);if(isAgPolarChartOptions(e))return new PolarChart(document,t,o);throw new Error("AG Charts - couldn't apply configuration, check type of options: "+e.type)},e.updateDelta=function(e,t,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(o){switch(o.label){case 0:return null==t.type&&(t=__assign$l(__assign$l({},t),{type:e.processedOptions.type||optionsType(t)})),[4,e.awaitUpdateCompletion()];case 1:return o.sent(),e.destroyed||(debug("applying delta",t),applyChartOptions(e,t,r)),[2]}})})},e.DEBUG=function(){var e;return null!==(e=windowValue("agChartsDebug"))&&void 0!==e&&e},e}();function debug(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];[!0,"opts"].includes(AgChartInternal.DEBUG())&&Logger.debug.apply(Logger,__spread$c([e],t))}function applyChartOptions(e,t,r){var o,i,n,a,s=jsonMerge([null!==(o=e.processedOptions)&&void 0!==o?o:{},t],noDataCloneMergeOptions),l=applyModules(e,s),c=["type","data","series","autoSize","listeners","theme","legend.listeners"];
2if(isAgCartesianChartOptions(t))c.push("axes");else if(!isAgPolarChartOptions(t)&&!isAgHierarchyChartOptions(t))throw new Error("AG Charts - couldn't apply configuration, check type of options and chart: "+t.type);t.listeners&&registerListeners(e,t.listeners),applyOptionValues(e,t,{skip:c});var u=!1;t.series&&t.series.length>0&&(applySeries(e,t),u=!0),isAgCartesianChartOptions(t)&&t.axes&&applyAxes(e,t)&&(u=!0);var d=t.series,p=!!t.data||(null==d?void 0:d.some(function(e){return null!=e.data})),h=t.legend||t.title||t.subtitle;u=u||p||!!h,t.data&&(e.data=t.data),null!=t.autoSize&&(e.autoSize=t.autoSize),(null===(i=t.legend)||void 0===i?void 0:i.listeners)&&Object.assign(e.legend.listeners,null!==(n=t.legend.listeners)&&void 0!==n?n:{}),e.processedOptions=s,e.userOptions=jsonMerge([null!==(a=e.userOptions)&&void 0!==a?a:{},r],noDataCloneMergeOptions);var _=u||l?ChartUpdateType.PROCESS_DATA:ChartUpdateType.PERFORM_LAYOUT;debug("chart update type",{updateType:ChartUpdateType[_]}),e.update(_,{forceNodeDataRefresh:u})}function applyModules(e,t){var r,o,i=function(t){return e instanceof CartesianChart&&t.chartTypes.includes("cartesian")||e instanceof PolarChart&&t.chartTypes.includes("polar")||e instanceof HierarchyChart&&t.chartTypes.includes("hierarchy")},n=!1,a=REGISTERED_MODULES.filter(function(e){return"root"===e.type});try{for(var s=__values$8(a),l=s.next();!l.done;l=s.next()){var c=l.value,u=i(c)&&null!=t[c.optionsKey];u!==e.isModuleEnabled(c)&&(n=!0,u?e.addModule(c):e.removeModule(c))}}catch(e){r={error:e}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return n}function applySeries(e,t){var r=t.series;if(r){var o=e.series.length===r.length&&e.series.every(function(e,t){var o;return e.type===(null===(o=r[t])||void 0===o?void 0:o.type)});o?e.series.forEach(function(t,o){var i,n,a=jsonDiff((null===(n=null===(i=e.processedOptions)||void 0===i?void 0:i.series)||void 0===n?void 0:n[o])||{},r[o]||{});a&&(debug("applying series diff idx "+o,a),applySeriesValues(t,a,{path:"series["+o+"]",index:o}),t.markNodeDataDirty())}):e.series=createSeries(r)}}function applyAxes(e,t){var r=t.axes;if(!r)return!1;if(e.axes.length===r.length&&e.axes.every(function(e,t){return e.type===r[t].type})){var o=e.processedOptions;if(isAgCartesianChartOptions(o))return e.axes.forEach(function(e,t){var i,n=jsonDiff((null===(i=o.axes)||void 0===i?void 0:i[t])||{},r[t]);debug("applying axis diff idx "+t,n),applyOptionValues(e,n,{path:"axes["+t+"]",skip:["axes[].type"]})}),!0}return e.axes=createAxis(e,r),!0}function createSeries(e){var t,r,o=[],i=0;try{for(var n=__values$8(e||[]),a=n.next();!a.done;a=n.next()){var s=a.value,l="series["+i+++"]";switch(s.type){case"area":o.push(applySeriesValues(new AreaSeries,s,{path:l,index:i}));break;case"bar":case"column":o.push(applySeriesValues(new BarSeries,s,{path:l,index:i}));break;case"histogram":o.push(applySeriesValues(new HistogramSeries,s,{path:l,index:i}));break;case"line":o.push(applySeriesValues(new LineSeries,s,{path:l,index:i}));break;case"scatter":o.push(applySeriesValues(new ScatterSeries,s,{path:l,index:i}));break;case"pie":o.push(applySeriesValues(new PieSeries,s,{path:l,index:i}));break;case"treemap":o.push(applySeriesValues(new TreemapSeries,s,{path:l,index:i}));break;default:throw new Error("AG Charts - unknown series type: "+s.type)}}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return o}function createAxis(e,t){var r,o,i=[],n=["axes[].type"],a=e.getModuleContext(),s=0;try{for(var l=__values$8(t||[]),c=l.next();!c.done;c=l.next()){var u=c.value,d=void 0;switch(u.type){case"number":d=new NumberAxis(a);break;case LogAxis.type:d=new LogAxis(a);break;case CategoryAxis.type:d=new CategoryAxis(a);break;case GroupedCategoryAxis.type:d=new GroupedCategoryAxis(a);break;case TimeAxis.type:d=new TimeAxis(a);break;default:throw new Error("AG Charts - unknown axis type: "+u.type)}var p="axes["+s+++"]";applyAxisModules(d,u),applyOptionValues(d,u,{path:p,skip:n}),i.push(d)}}catch(e){r={error:e}}finally{try{c&&!c.done&&(o=l.return)&&o.call(l)}finally{if(r)throw r.error}}return i}function applyAxisModules(e,t){var r,o,i=!1,n=REGISTERED_MODULES.filter(function(e){return"axis"===e.type});try{for(var a=__values$8(n),s=a.next();!s.done;s=a.next()){var l=s.value,c=null!=t[l.optionsKey];c!==e.isModuleEnabled(l)&&(i=!0,c?e.addModule(l):e.removeModule(l))}}catch(e){r={error:e}}
2finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return i}function registerListeners(e,t){for(var r in e.clearEventListeners(),t){var o=t[r];"function"==typeof o&&e.addEventListener(r,o)}}var JSON_APPLY_OPTIONS={constructors:{title:Caption,subtitle:Caption,footnote:Caption,shadow:DropShadow,innerCircle:DoughnutInnerCircle,"axes[].crossLines[]":CrossLine,"series[].innerLabels[]":DoughnutInnerLabel,"background.image":BackgroundImage},allowedTypes:{"legend.pagination.marker.shape":["primitive","function"],"series[].marker.shape":["primitive","function"],"axis[].tick.count":["primitive","class-instance"]}};function applyOptionValues(e,t,r){var o=void 0===r?{}:r,i=o.skip,n=o.path;return jsonApply(e,t,__assign$l(__assign$l(__assign$l({},JSON_APPLY_OPTIONS),{skip:i}),n?{path:n}:{}))}function applySeriesValues(e,t,r){var o=void 0===r?{}:r,i=o.path,n=o.index,a=(null==JSON_APPLY_OPTIONS?void 0:JSON_APPLY_OPTIONS.constructors)||{},s={constructors:__assign$l(__assign$l({},a),{title:"pie"===e.type?PieTitle:a.title})},l=jsonApply(e,t,__assign$l(__assign$l(__assign$l(__assign$l(__assign$l({},JSON_APPLY_OPTIONS),s),{skip:__spread$c(["series[].type"],["series[].listeners"]||[])}),i?{path:i}:{}),{idx:null!=n?n:-1})),c=null==t?void 0:t.listeners;return null!=c&&registerListeners(e,c),l}var VERSION$b="7.2.0",__extends$1G=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$1b=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},ChartDatasource=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$1G(t,e),t.prototype.getData=function(e){if(e.crossFiltering){if(e.grouping)return console.warn("AG Grid: crossing filtering with row grouping is not supported."),{chartData:[],columnNames:{}};if(!this.gridOptionsService.isRowModelType("clientSide"))return console.warn("AG Grid: crossing filtering is only supported in the client side row model."),{chartData:[],columnNames:{}}}this.gridOptionsService.isRowModelType("serverSide")&&e.pivoting&&this.updatePivotKeysForSSRM();var t=this.extractRowsFromGridRowModel(e);return t.chartData=this.aggregateRowsByDimension(e,t.chartData),t},t.prototype.extractRowsFromGridRowModel=function(e){var r,o=this,i=[],n={},a={},s={},l={},c=[];if(e.crossFiltering)l=this.getFilteredRowNodes(),r=(c=this.getAllRowNodes()).length;else{var u=this.gridRowModel.getRowCount()-1;r=(e.endRow>=0?Math.min(e.endRow,u):u)-e.startRow+1}
2for(var d=function(r){var u={},d=e.crossFiltering?c[r]:p.gridRowModel.getRow(r+e.startRow);e.dimensionCols.forEach(function(i){var n=i.colId,l=o.columnModel.getGridColumn(n);if(l){var c=o.valueService.getValue(l,d);if(e.grouping){var p=c&&c.toString?String(c.toString()):"",h=t.getGroupLabels(d,p);u[n]={labels:h,toString:function(){return this.labels.filter(function(e){return!!e}).reverse().join(" - ")}},d.group&&(a[h.toString()]=r);var _=h.slice(1,h.length).toString();_&&(s[_]=a[_])}else u[n]=c}else u[ChartDataModel.DEFAULT_CATEGORY]=r+1}),e.valueCols.forEach(function(t){var r=[],i=t.getColDef().pivotKeys;i&&(r=i.slice());var a=t.getColDef().headerName;a&&r.push(a),r.length>0&&(n[t.getId()]=r);var s=t.getColId();if(e.crossFiltering){var c=s+"-filtered-out",p=null!=(h=o.valueService.getValue(t,d))&&"function"==typeof h.toNumber?h.toNumber():h;l[d.id]?(u[s]=p,u[c]=e.aggFunc||e.isScatter?void 0:0):(u[s]=e.aggFunc||e.isScatter?void 0:0,u[c]=p)}else{var h;(h=o.valueService.getValue(t,d))&&h.hasOwnProperty("toString")&&(h=parseFloat(h.toString())),u[s]=null!=h&&"function"==typeof h.toNumber?h.toNumber():h}}),d.footer&&(u.footer=!0),i.push(u)},p=this,h=0;h<r;h++)d(h);if(e.grouping){var _=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.values(s);i=i.filter(function(e,t){return!e.footer&&!ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.includes(_,t)})}return{chartData:i,columnNames:n}},t.prototype.aggregateRowsByDimension=function(e,t){var r=this,o=e.dimensionCols;if(!e.aggFunc||0===o.length)return t;var i=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.last(o),n=i&&i.colId,a={},s=[];return t.forEach(function(e){var t=a;o.forEach(function(r){var i=r.colId,a=e[i];if(i===n){var l=t[a];l||(l={__children:[]},o.forEach(function(t){var r=t.colId;l[r]=e[r]}),t[a]=l,s.push(l)),l.__children.push(e)}else t[a]||(t[a]={}),t=t[a]})}),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleRegistry.assertRegistered(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleNames.RowGroupingModule,"Charting Aggregation")&&s.forEach(function(t){return e.valueCols.forEach(function(o){if(e.crossFiltering)e.valueCols.forEach(function(o){var i=o.getColId(),n=t.__children.filter(function(e){return void 0!==e[i]}).map(function(e){return e[i]}),a=r.aggregationStage.aggregateValues(n,e.aggFunc);t[o.getId()]=a&&void 0!==a.value?a.value:a;var s=i+"-filtered-out",l=t.__children.filter(function(e){return void 0!==e[s]}).map(function(e){return e[s]}),c=r.aggregationStage.aggregateValues(l,e.aggFunc);t[s]=c&&void 0!==c.value?c.value:c});else{var i=t.__children.map(function(e){return e[o.getId()]}),n=0;ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleRegistry.assertRegistered(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleNames.RowGroupingModule,"Charting Aggregation")&&(n=r.aggregationStage.aggregateValues(i,e.aggFunc)),t[o.getId()]=n&&void 0!==n.value?n.value:n}})}),s},t.prototype.updatePivotKeysForSSRM=function(){var e=this.columnModel.getSecondaryColumns();if(e){var t=this.extractPivotKeySeparator(e);e.forEach(function(e){if(""===t)e.getColDef().pivotKeys=[];else{var r=e.getColId().split(t);e.getColDef().pivotKeys=r.slice(0,r.length-1)}})}},t.prototype.extractPivotKeySeparator=function(e){if(0===e.length)return"";var t=function(e,r){var o=e.getGroupId();return e.getParent()?t(e.getParent(),o):r.split(o)[1][0]},r=e[0];return null==r.getParent()?"":t(r.getParent(),r.getColId())},t.getGroupLabels=function(e,t){for(var r=[t];e&&0!==e.level;)(e=e.parent)&&r.push(e.key);return r},t.prototype.getFilteredRowNodes=function(){var e={};return this.gridRowModel.forEachNodeAfterFilterAndSort(function(t){e[t.id]=t}),e},t.prototype.getAllRowNodes=function(){var e=[];return this.gridRowModel.forEachNode(function(t){e.push(t)}),this.sortRowNodes(e)},t.prototype.sortRowNodes=function(e){var t=this.sortController.getSortOptions();return t&&0!=t.length?this.rowNodeSorter.doFullSort(e,t):e},__decorate$1b([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("rowModel")],t.prototype,"gridRowModel",void 0),__decorate$1b([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("valueService")],t.prototype,"valueService",void 0),__decorate$1b([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],t.prototype,"columnModel",void 0),__decorate$1b([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("rowNodeSorter")],t.prototype,"rowNodeSorter",void 0),__decorate$1b([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("sortController")],t.prototype,"sortController",void 0),__decorate$1b([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Optional)("aggregationStage")],t.prototype,"aggregationStage",void 0),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.BeanStub),__extends$1F=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$1a=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},__read$l=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},__spread$b=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read$l(arguments[t]));return e},ChartDataModel=function(e){function t(t){var r=e.call(this)||this;return r.unlinked=!1,r.chartData=[],r.valueColState=[],r.dimensionColState=[],r.columnNames={},r.grouping=!1,r.crossFiltering=!1,r.suppressComboChartWarnings=!1,r.chartId=t.chartId,r.chartType=t.chartType,r.pivotChart=t.pivotChart,r.chartThemeName=t.chartThemeName,r.aggFunc=t.aggFunc,r.referenceCellRange=t.cellRange,r.suppliedCellRange=t.cellRange,r.suppressChartRanges=t.suppressChartRanges,r.unlinked=!!t.unlinkChart,r.crossFiltering=!!t.crossFiltering,r.seriesChartTypes=t.seriesChartTypes||[],r.initComboCharts(t),r}return __extends$1F(t,e),t.prototype.initComboCharts=function(e){var t=this.seriesChartTypes&&this.seriesChartTypes.length>0;("customCombo"===e.chartType||t)&&(this.chartType="customCombo",this.savedCustomSeriesChartTypes=this.seriesChartTypes||[])},t.prototype.init=function(){this.datasource=this.createManagedBean(new ChartDatasource),this.updateCellRanges()},t.prototype.updateCellRanges=function(e){this.valueCellRange&&(this.referenceCellRange=this.valueCellRange);var t=this.getAllChartColumns(),r=t.dimensionCols,o=t.valueCols,i=this.getAllColumnsFromRanges();e&&this.updateColumnState(e),this.setDimensionCellRange(r,i,e),this.setValueCellRange(o,i,e),e||(this.resetColumnState(),this.syncDimensionCellRange()),this.updateSeriesChartTypes(),this.updateData()},t.prototype.updateSeriesChartTypes=function(){this.isComboChart()&&(this.seriesChartTypes=this.seriesChartTypes.map(function(e){var t=["groupedColumn","stackedColumn","stackedArea"].includes(e.chartType);return e.secondaryAxis=!t&&e.secondaryAxis,e}),"customCombo"!==this.chartType?this.updateChartSeriesTypesForBuiltInCombos():this.updateSeriesChartTypesForCustomCombo())},t.prototype.updateSeriesChartTypesForCustomCombo=function(){var e=this;this.seriesChartTypes&&this.seriesChartTypes.length>0||this.suppressComboChartWarnings||console.warn("AG Grid: 'seriesChartTypes' are required when the 'customCombo' chart type is specified."),this.seriesChartTypes=this.seriesChartTypes.map(function(e){return t.SUPPORTED_COMBO_CHART_TYPES.includes(e.chartType)||(console.warn("AG Grid: invali
2d chartType '"+e.chartType+"' supplied in 'seriesChartTypes', converting to 'line' instead."),e.chartType="line"),e});var r=this.valueColState.map(function(t){return e.savedCustomSeriesChartTypes&&0!==e.savedCustomSeriesChartTypes.length||(e.savedCustomSeriesChartTypes=e.seriesChartTypes),e.savedCustomSeriesChartTypes.find(function(e){return e.colId===t.colId})||(t.selected&&!e.suppressComboChartWarnings&&console.warn("AG Grid: no 'seriesChartType' found for colId = '"+t.colId+"', defaulting to 'line'."),{colId:t.colId,chartType:"line",secondaryAxis:!1})});this.seriesChartTypes=r,this.savedCustomSeriesChartTypes=r,this.suppressComboChartWarnings=!0},t.prototype.updateChartSeriesTypesForBuiltInCombos=function(){var e="columnLineCombo"===this.chartType?"groupedColumn":"stackedArea",t="columnLineCombo"===this.chartType?"line":"groupedColumn",r=this.valueColState.filter(function(e){return e.selected}),o=Math.ceil(r.length/2);this.seriesChartTypes=r.map(function(r,i){var n=i>=o?t:e;return{colId:r.colId,chartType:n,secondaryAxis:!1}})},t.prototype.updateData=function(){var e=this.getRowIndexes(),t=e.startRow,r=e.endRow;this.pivotChart&&this.resetColumnState(),this.grouping=this.isGrouping();
2var o={aggFunc:this.aggFunc,dimensionCols:[this.getSelectedDimension()],grouping:this.grouping,pivoting:this.isPivotActive(),crossFiltering:this.crossFiltering,valueCols:this.getSelectedValueCols(),startRow:t,endRow:r,isScatter:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.includes(["scatter","bubble"],this.chartType)},i=this.datasource.getData(o),n=i.chartData,a=i.columnNames;this.chartData=n,this.columnNames=a},t.prototype.isGrouping=function(){var e=this.gridOptionsService.isTreeData(),t=e?null:this.columnModel.getRowGroupColumns(),r=e||t&&t.length>0,o=this.getSelectedDimension().colId,i=this.columnModel.getGroupDisplayColumns().map(function(e){return e.getColId()}).some(function(e){return e===o});return!!r&&i},t.prototype.getSelectedValueCols=function(){return this.valueColState.filter(function(e){return e.selected}).map(function(e){return e.column})},t.prototype.getSelectedDimension=function(){return this.dimensionColState.filter(function(e){return e.selected})[0]},t.prototype.getColDisplayName=function(e){return this.columnModel.getDisplayNameForColumn(e,"chart")},t.prototype.isPivotMode=function(){return this.columnModel.isPivotMode()},t.prototype.getChartDataType=function(e){var t=this.columnModel.getPrimaryColumn(e);return t?t.getColDef().chartDataType:void 0},t.prototype.isPivotActive=function(){return this.columnModel.isPivotActive()},t.prototype.createCellRange=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return{id:this.chartId,startRow:this.referenceCellRange.startRow,endRow:this.referenceCellRange.endRow,columns:t,startColumn:e===ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.CellRangeType.DIMENSION?t[0]:this.referenceCellRange.startColumn,type:e}},t.prototype.getAllColumnsFromRanges=function(){if(this.pivotChart)return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.convertToSet(this.columnModel.getAllDisplayedColumns());var e=this.dimensionCellRange||this.valueCellRange?[]:this.referenceCellRange.columns;return this.dimensionCellRange&&e.push.apply(e,__spread$b(this.dimensionCellRange.columns)),this.valueCellRange&&e.push.apply(e,__spread$b(this.valueCellRange.columns)),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.convertToSet(e)},t.prototype.getRowIndexes=function(){var e=0,t=0,r=this.rangeService,o=this.valueCellRange;if(r&&o){e=r.getRangeStartRow(o).rowIndex;var i=r.getRangeEndRow(o);t="bottom"===i.rowPinned?-1:i.rowIndex}return{startRow:e,endRow:t}},t.prototype.getAllChartColumns=function(){var e=this,t=this.columnModel.getAllDisplayedColumns(),r=new Set,o=new Set;return t.forEach(function(t){var i=t.getColDef(),n=i.chartDataType;if(n)switch(n){case"category":case"time":return void r.add(t);case"series":return void o.add(t);case"excluded":return;default:console.warn("AG Grid: unexpected chartDataType value '"+n+"' supplied, instead use 'category', 'series' or 'excluded'")}"ag-Grid-AutoColumn"!==i.colId?t.isPrimary()?(e.isNumberCol(t)?o:r).add(t):o.add(t):r.add(t)}),{dimensionCols:r,valueCols:o}},t.prototype.isNumberCol=function(e){if("ag-Grid-AutoColumn"===e.getColId())return!1;var t=this.rowRenderer.getRowNode({rowIndex:0,rowPinned:null});if(!t)return!1;var r=this.valueService.getValue(e,t);return null==r&&(r=this.extractLeafData(t,e)),null!=r&&"function"==typeof r.toNumber&&(r=r.toNumber()),"number"==typeof r},t.prototype.extractLeafData=function(e,t){if(!e.allLeafChildren)return null;for(var r=0;r<e.allLeafChildren.length;r++){var o=e.allLeafChildren[r],i=this.valueService.getValue(t,o);if(null!=i)return i}return null},t.prototype.resetColumnState=function(){var e=this,r=this.getAllChartColumns(),o=r.dimensionCols,i=r.valueCols,n=this.getAllColumnsFromRanges(),a=this.valueColState.length<1;this.dimensionColState=[],this.valueColState=[];var s=!1,l=1,c=this.suppliedCellRange.columns[0];o.forEach(function(t){var r="ag-Grid-AutoColumn"===t.getColId(),o=!1;e.crossFiltering&&e.aggFunc?c.getColId()===t.getColId()&&(o=!0):o=!!r||!s&&n.has(t),e.dimensionColState.push({column:t,colId:t.getColId(),displayName:e.getColDisplayName(t),selected:o,order:l++}),o&&(s=!0)});var u={colId:t.DEFAULT_CATEGORY,displayName:this.chartTranslationService.translate("defaultCategory"),selected:!s,order:0};this.dimensionColState.unshift(u);var d=this.referenceCellRange.columns.filter(function(e){return i.has(e)});
2i.forEach(function(t){a&&ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.includes(e.referenceCellRange.columns,t)&&(t=d.shift()),e.valueColState.push({column:t,colId:t.getColId(),displayName:e.getColDisplayName(t),selected:n.has(t),order:l++})})},t.prototype.updateColumnState=function(e){var t=function(t){return t.colId===e.colId},r=this.dimensionColState,o=this.valueColState;r.filter(t).length>0?r.forEach(function(e){return e.selected=t(e)}):o.filter(t).forEach(function(t){return t.selected=e.selected});var i=__spread$b(r,o),n=[];i.forEach(function(t,r){r===e.order&&n.push(e.colId),t.colId!==e.colId&&n.push(t.colId)}),i.forEach(function(e){var t=n.indexOf(e.colId);e.order=t>=0?n.indexOf(e.colId):i.length-1}),this.reorderColState()},t.prototype.reorderColState=function(){var e=function(e,t){return e.order-t.order};this.dimensionColState.sort(e),this.valueColState.sort(e)},t.prototype.setDimensionCellRange=function(e,r,o){var i=this;if(this.dimensionCellRange=void 0,o||this.dimensionColState.length){var n=o;if(this.crossFiltering&&this.aggFunc){var a=this.suppliedCellRange.columns[0];n=this.dimensionColState.filter(function(e){return e.colId===a.getColId()})[0]}else n&&e.has(n.column)||(n=this.dimensionColState.filter(function(e){return e.selected})[0]);n&&n.colId!==t.DEFAULT_CATEGORY&&(this.dimensionCellRange=this.createCellRange(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.CellRangeType.DIMENSION,n.column))}else e.forEach(function(e){!i.dimensionCellRange&&r.has(e)&&(i.dimensionCellRange=i.createCellRange(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.CellRangeType.DIMENSION,e))})},t.prototype.setValueCellRange=function(e,t,r){this.valueCellRange=void 0;var o=[];if(e.forEach(function(e){r&&r.colId===e.getColId()?r.selected&&o.push(r.column):t.has(e)&&o.push(e)}),o.length>0){var i=[];this.valueColState.length>0?i=this.valueColState.map(function(e){return e.colId}):t.forEach(function(e){return i.push(e.getColId())}),o.sort(function(e,t){return i.indexOf(e.getColId())-i.indexOf(t.getColId())}),this.valueCellRange=this.createCellRange.apply(this,__spread$b([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.CellRangeType.VALUE],o))}},t.prototype.syncDimensionCellRange=function(){var e=this.getSelectedDimension();e&&e.column&&(this.dimensionCellRange=this.createCellRange(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.CellRangeType.DIMENSION,e.column))},t.prototype.isComboChart=function(){return["columnLineCombo","areaColumnCombo","customCombo"].includes(this.chartType)},t.DEFAULT_CATEGORY="AG-GRID-DEFAULT-CATEGORY",t.SUPPORTED_COMBO_CHART_TYPES=["line","groupedColumn","stackedColumn","area","stackedArea"],__decorate$1a([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],t.prototype,"columnModel",void 0),__decorate$1a([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("valueService")],t.prototype,"valueService",void 0),__decorate$1a([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("rangeService")],t.prototype,"rangeService",void 0),__decorate$1a([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("rowRenderer")],t.prototype,"rowRenderer",void 0),__decorate$1a([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("chartTranslationService")],t.prototype,"chartTranslationService",void 0),__decorate$1a([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"init",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.BeanStub),VALID_SERIES_TYPES=["area","bar","column","histogram","line","pie","scatter"];function getSeriesType(e){switch(e){case"bar":case"groupedBar":case"stackedBar":case"normalizedBar":return"bar";case"column":case"groupedColumn":case"stackedColumn":case"normalizedColumn":return"column";case"line":return"line";case"area":case"stackedArea":case"normalizedArea":return"area";case"scatter":case"bubble":return"scatter";case"histogram":return"histogram";case"pie":case"doughnut":return"pie";default:return"cartesian"}}var ALL_AXIS_TYPES=["number","category","groupedCategory","log","time"];function getLegacyAxisType(e){switch(e){case"bar":case"stackedBar":case"normalizedBar":return["number","category"];case"groupedBar":return["number","groupedCategory"];case"column":case"stackedColumn":case"normalizedColumn":case"line":case"area":case"stackedArea":case"normalizedArea":case"histogram":return["category","number"];case"groupedColumn":return["groupedCategory","number"];case"scatter":case"bubble":return["number","number"];default:return}}var __assign$k=function(){return __assign$k=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$k.apply(this,arguments)};function createAgChartTheme(e,t){var r,o,i=e.chartOptionsToRestore,n=e.chartPaletteToRestore,a=e.chartThemeToRestore,s=getSelectedTheme(e),l=isStockTheme(s),c=l?{baseTheme:s}:null!==(r=lookupCustomChartTheme(e,s))&&void 0!==r?r:{},u=e.getGridOptionsChartThemeOverrides(),d=e.apiChartThemeOverrides,p="pie"===getSeriesType(e.chartType)?"polar":"cartesian",h=e.crossFiltering?createCrossFilterThemeOverrides(t,e,p):void 0,_=__assign$k({},null!=i?i:{}),f=[l?inbuiltStockThemeOverrides(e,(o=function(e){return!!e&&Object.keys(e).some(function(t){return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.get(e[t],"title.enabled",!1)})},o(u)||o(d))):void 0,h,u,d,_].filter(function(e){return!!e}).reduce(function(e,t){return{baseTheme:e,overrides:t}},c);return n&&s===a&&(isIdenticalPalette(n,getChartTheme(c).palette)||(f.palette=n)),f}function isIdenticalPalette(e,t){var r=function(e,t){return e.length===t.length&&e.every(function(e,r){return e===t[r]})};return r(e.fills,t.fills)&&r(e.strokes,t.strokes)}function isStockTheme(e){return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.includes(Object.keys(themes),e)}function createCrossFilterThemeOverrides(e,t,r){var o,i={listeners:{legendItemClick:function(t){e.getChart().series.forEac
2h(function(e){e.toggleSeriesItem(t.itemId,t.enabled),e.toggleSeriesItem(t.itemId+"-filtered-out",t.enabled)})}}},n={};return"polar"===r&&(n.pie={tooltip:{renderer:function(e){var t=e.angleName,r=e.datum,o=e.calloutLabelKey,i=e.radiusKey,n=e.angleValue;return{title:t,content:r[o]+": "+n*r[i]}}}}),(o={})[r]={tooltip:{delay:500},legend:i,listeners:{click:function(e){return t.crossFilterCallback(e,!0)}},series:n},o}var STATIC_INBUILT_STOCK_THEME_AXES_OVERRIDES=ALL_AXIS_TYPES.reduce(function(e,t){var r;return __assign$k(__assign$k({},e),((r={})[t]={title:{_enabledFromTheme:!0}},r))},{});function inbuiltStockThemeOverrides(e,t){var r=e.getExtraPaddingDirections();return{common:{axes:STATIC_INBUILT_STOCK_THEME_AXES_OVERRIDES,padding:{top:!t&&r.includes("top")?40:20,right:r.includes("right")?30:20,bottom:r.includes("bottom")?40:20,left:r.includes("left")?30:20}},pie:{series:{title:{_enabledFromTheme:!0},calloutLabel:{_enabledFromTheme:!0},sectorLabel:{enabled:!1,_enabledFromTheme:!0}}}}}function getSelectedTheme(e){var t=e.getChartThemeName(),r=e.getChartThemes();return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.includes(r,t)||(t=r[0]),t}function lookupCustomChartTheme(e,t){var r=e.customChartThemes,o=r&&r[t];return o||console.warn("AG Grid: no stock theme exists with the name '"+t+"' and no custom chart theme with that name was supplied to 'customChartThemes'"),o}var __extends$1E=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$19=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},DEFAULT_THEMES=["ag-default","ag-material","ag-pastel","ag-vivid","ag-solar"],ChartController=function(e){function t(t){var r=e.call(this)||this;return r.model=t,r}return __extends$1E(t,e),t.prototype.init=function(){var e=this;this.setChartRange(),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_RANGE_SELECTION_CHANGED,function(t){t.id&&t.id===e.model.chartId&&e.updateForRangeChange()}),this.model.unlinked&&this.rangeService&&this.rangeService.setCellRanges([]),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_COLUMN_MOVED,this.updateForGridChange.bind(this)),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_COLUMN_PINNED,this.updateForGridChange.bind(this)),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_COLUMN_VISIBLE,this.updateForGridChange.bind(this)),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_COLUMN_ROW_GROUP_CHANGED,this.updateForGridChange.bind(this)),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_MODEL_UPDATED,this.updateForGridChange.bind(this)),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_CELL_VALUE_CHANGED,this.updateForDataChange.bind(this))},t.prototype.updateForGridChange=function(){this.model.unlinked||(this.model.updateCellRanges(),this.setChartRange())},t.prototype.updateForDataChange=function(){this.model.unlinked||(this.model.updateData(),this.raiseChartModelUpdateEvent())},t.prototype.updateForRangeChange=function(){this.updateForGridChange(),this.raiseChartRangeSelectionChangedEvent()},t.prototype.updateForPanelChange=function(e){this.model.updateCellRanges(e),this.setChartRange(),this.raiseChartRangeSelectionChangedEvent()},t.prototype.getChartUpdateParams=function(){var e=this.getSelectedValueColState().map(function(e){return{colId:e.colId,displayName:e.displayName}}),t=this.getChartData(),r=this.getSelectedDimension();return{data:t,grouping:this.isGrouping(),category:{id:r.colId,name:r.displayName,chartDataType:this.model.getChartDataType(r.colId)},fields:e,chartId:this.getChartId(),getCrossFilteringContext:function(){return{lastSelectedChartId:"xxx"}},seriesChartTypes:this.getSeriesChartTypes()}},t.prototype.getChartModel=function(){var e=this.model.pivotChart?"pivot":"range",t=this.isComboChart()?this.model.seriesChartTypes:void 0;return{modelType:e,chartId:this.model.chartId,chartType:this.model.chartType,chartThemeName:this.getChartThemeName(),chartOptions:this.chartProxy.getChartThemeOverrides(),chartPalette:this.chartProxy.getChartPalette(),cellRange:this.getCellRangeParams(),suppressChartRanges:this.model.suppressChartRanges,aggFunc:this.model.aggFunc,unlinkChart:this.model.unlinked,seriesChartTypes:t}},t.prototype.getChartId=function(){return this.model.chartId},t.prototype.getChartData=function(){return this.model.chartData},t.prototype.getChartType=function(){return this.model.chartType},t.prototype.setChartType=function(e){this.model.chartType=e,this.model.updateSeriesChartTypes(),this.raiseChartModelUpdateEvent(),this.raiseChartOptionsChangedEvent()},t.prototype.setChartThemeName=function(e){this.model.chartThemeName=e,this.raiseChartModelUpdateEvent(),this.raiseChartOptionsChangedEvent()},t.prototype.getChartThemeName=function(){return this.model.chartThemeName},t.prototype.isPivotChart=function(){return this.model.pivotChart},t.prototype.isPivotMode=function(){return this.model.isPivotMode()},t.prototype.isGrouping=function(){return this.model.isGrouping()},t.prototype.getThemes=function(){return this.gridOptionsService.get("
2chartThemes")||DEFAULT_THEMES},t.prototype.getPalettes=function(){var e=this;return this.getThemes().map(function(t){return getChartTheme(isStockTheme(t)?t:e.chartProxy.lookupCustomChartTheme(t)).palette})},t.prototype.getValueColState=function(){return this.model.valueColState.map(this.displayNameMapper.bind(this))},t.prototype.getSelectedValueColState=function(){return this.getValueColState().filter(function(e){return e.selected})},t.prototype.getDimensionColState=function(){return this.model.dimensionColState},t.prototype.getSelectedDimension=function(){return this.model.getSelectedDimension()},t.prototype.displayNameMapper=function(e){var t=this.model.columnNames[e.colId];return e.displayName=t?t.join(" - "):this.model.getColDisplayName(e.column),e},t.prototype.getColStateForMenu=function(){return{dimensionCols:this.model.dimensionColState,valueCols:this.getValueColState()}},t.prototype.isDefaultCategorySelected=function(){return this.model.getSelectedDimension().colId===ChartDataModel.DEFAULT_CATEGORY},t.prototype.setChartRange=function(e){void 0===e&&(e=!1),!this.rangeService||this.model.suppressChartRanges||this.model.unlinked||this.rangeService.setCellRanges(this.getCellRanges()),e||this.raiseChartModelUpdateEvent()},t.prototype.detachChartRange=function(){this.model.unlinked=!this.model.unlinked,this.model.unlinked?this.rangeService&&this.rangeService.setCellRanges([]):this.updateForGridChange()},t.prototype.setChartProxy=function(e){this.chartProxy=e},t.prototype.getChartProxy=function(){return this.chartProxy},t.prototype.isActiveXYChart=function(){return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.includes(["scatter","bubble"],this.getChartType())},t.prototype.isChartLinked=function(){return!this.model.unlinked},t.prototype.customComboExists=function(){return this.model.savedCustomSeriesChartTypes&&this.model.savedCustomSeriesChartTypes.length>0},t.prototype.getSeriesChartTypes=function(){return this.model.seriesChartTypes},t.prototype.isComboChart=function(){return this.model.isComboChart()},t.prototype.updateSeriesChartType=function(e,r,o){var i=this.model.seriesChartTypes.find(function(t){return t.colId===e});if(i){var n="customCombo"!==this.model.chartType;n&&(this.model.chartType="customCombo");var a=i.chartType;null!=r&&(i.chartType=r),null!=o&&(i.secondaryAxis=o),this.model.savedCustomSeriesChartTypes=this.model.seriesChartTypes,this.model.updateSeriesChartTypes(),this.updateForDataChange(),n&&this.dispatchEvent({type:t.EVENT_CHART_TYPE_CHANGED}),a!==r&&this.dispatchEvent({type:t.EVENT_CHART_SERIES_CHART_TYPE_CHANGED}),this.raiseChartOptionsChangedEvent()}},t.prototype.getActiveSeriesChartTypes=function(){var e=this.getSelectedValueColState().map(function(e){return e.colId});return this.getSeriesChartTypes().filter(function(t){return e.includes(t.colId)})},t.prototype.getChartSeriesTypes=function(){return this.isComboChart()?["line","column","area"]:[getSeriesType(this.getChartType())]},t.prototype.getCellRanges=function(){return[this.model.dimensionCellRange,this.model.valueCellRange].filter(function(e){return e})},t.prototype.getCellRangeParams=function(){var e=this.getCellRanges(),t=e[0],r=t&&t.startRow||null,o=t&&t.endRow||null;return{rowStartIndex:r&&r.rowIndex,rowStartPinned:r&&r.rowPinned,rowEndIndex:o&&o.rowIndex,rowEndPinned:o&&o.rowPinned,columns:e.reduce(function(e,t){return e.concat(t.columns.map(function(e){return e.getId()}))},[])}},t.prototype.raiseChartModelUpdateEvent=function(){var e={type:t.EVENT_CHART_MODEL_UPDATE};this.dispatchEvent(e)},t.prototype.raiseChartUpdatedEvent=function(){var e={type:t.EVENT_CHART_UPDATED};this.dispatchEvent(e)},t.prototype.raiseChartOptionsChangedEvent=function(){var e=this.getChartModel(),t=e.chartId,r=e.chartType,o={type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_CHART_OPTIONS_CHANGED,chartId:t,chartType:r,chartThemeName:this.getChartThemeName(),chartOptions:this.chartProxy.getChartThemeOverrides()};this.eventService.dispatchEvent(o)},t.prototype.raiseChartRangeSelectionChangedEvent=function(){var e={type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_CHART_RANGE_SELECTION_CHANGED,id:this.model.chartId,chartId:this.model.chartId,cellRange:this.getCellRangeParams()};this.eventService.dispatchEvent(e)},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.rangeService&&this.rangeService.setCellRanges([])},t.EVENT_CHART_UPDATED="chartUpdated",t.EVENT_CHART_MODEL_UPDATE="chartModelUpdate",t.EVENT_CHART_TYPE_CHANGED="chartTypeChanged",t.EVENT_CHART_SERIES_CHART_TYPE_CHANGED="chartSeriesChartTypeChanged",__decorate$19([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("rangeService")],t.prototype,"rangeService",void 0),__decorate$19([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"init",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.BeanStub),__extends$1D=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$18=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},__read$k=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},__spread$a=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read$k(arguments[t]));return e},__values$7=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);
2if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},DefaultDataPanelDef={groups:[{type:"categories",isOpen:!0},{type:"series",isOpen:!0},{type:"seriesChartType",isOpen:!0}]},ChartDataPanel=function(e){function t(r,o){var i=e.call(this,t.TEMPLATE)||this;return i.chartController=r,i.chartOptionsService=o,i.columnComps=new Map,i}return __extends$1D(t,e),t.prototype.init=function(){this.updatePanels(),this.addManagedListener(this.chartController,ChartController.EVENT_CHART_MODEL_UPDATE,this.updatePanels.bind(this)),this.createAutoScrollService()},t.prototype.destroy=function(){this.clearComponents(),e.prototype.destroy.call(this)},t.prototype.updatePanels=function(){var e,t,r=this,o=this.chartType,i=this.chartController.getColStateForMenu(),n=i.dimensionCols,a=i.valueCols,s=n.map(function(e){return e.colId}).concat(a.map(function(e){return e.colId}));this.chartType=this.chartController.getChartType();var l=this.getGroupExpandedState();if(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.areEqual(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.keys(this.columnComps),s)&&this.chartType===o){if(__spread$a(n,a).forEach(function(e){r.columnComps.get(e.colId).setValue(e.selected,!0)}),this.chartController.isActiveXYChart()){var c=this.generateGetSeriesLabel();a.forEach(function(e){r.columnComps.get(e.colId).setLabel(c(e))})}ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.removeFromParent(this.getGui().querySelector("#seriesChartTypeGroup")),this.seriesChartTypeGroupComp=this.destroyBean(this.seriesChartTypeGroupComp);var u=null===(e=this.getDataPanelDef().groups)||void 0===e?void 0:e.reduce(function(e,t,r){return"seriesChartType"===t.type?r:e},-1);-1!==u&&this.createSeriesChartTypeGroup(a,u)}else this.clearComponents(),null===(t=this.getDataPanelDef().groups)||void 0===t||t.forEach(function(e){var t=e.type;"categories"===t?r.createCategoriesGroup(n):"series"===t?r.createSeriesGroup(a):"seriesChartType"===t?r.createSeriesChartTypeGroup(a):console.warn("AG Grid: invalid charts data panel group name supplied: '"+t+"'")});this.restoreGroupExpandedState(l)},t.prototype.getGroupExpandedState=function(){var e=this;return[{groupType:"categories",comp:this.categoriesGroupComp},{groupType:"series",comp:this.seriesGroupComp},{groupType:"seriesChartType",comp:this.seriesChartTypeGroupComp}].map(function(t){var r,o,i=t.groupType,n=t.comp,a=Boolean(null===(o=null===(r=e.getDataPanelDef().groups)||void 0===r?void 0:r.find(function(e){return e.type===i}))||void 0===o?void 0:o.isOpen);return n?n.isExpanded():a})},t.prototype.restoreGroupExpandedState=function(e){[this.categoriesGroupComp,this.seriesGroupComp,this.seriesChartTypeGroupComp].forEach(function(t,r){t&&t.toggleGroupExpand(e[r])})},t.prototype.createAutoScrollService=function(){var e=this.getGui();this.autoScrollService=new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AutoScrollService({scrollContainer:e,scrollAxis:"y",getVerticalPosition:function(){return e.scrollTop},setVerticalPosition:function(t){return e.scrollTop=t}})},t.prototype.createComponent=function(e,t){var r=document.createElement("div");return r.id=t,r.className="ag-chart-data-section",r.appendChild(e.getGui()),r},t.prototype.addComponent=function(e,t,r){var o=this.createComponent(t,r);e.appendChild(o)},t.prototype.addComponentAtIndex=function(e,t,r,o){var i=this.createComponent(t,r);e.insertBefore(i,e.children[o])},t.prototype.addChangeListener=function(e,t){var r=this;this.addManagedListener(e,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgAbstractField.EVENT_CHANGED,function(){t.selected=e.getValue(),r.chartController.updateForPanelChange(t)})},t.prototype.createCategoriesGroup=function(e){var t=this;this.categoriesGroupComp=this.createBean(new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgGroupComponent({title:this.getCategoryGroupTitle(),enabled:!0,suppressEnabledCheckbox:!0,suppressOpenCloseIcons:!1,cssIdentifier:"charts-data"}));var r="chartDimension"+this.getCompId();e.forEach(function(e){var o=t.categoriesGroupComp.createManagedBean(new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgRadioButton);o.setLabel(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.escapeString(e.dis
2playName)),o.setValue(e.selected),o.setInputName(r),t.addChangeListener(o,e),t.categoriesGroupComp.addItem(o),t.columnComps.set(e.colId,o)}),this.addComponent(this.getGui(),this.categoriesGroupComp,"categoriesGroup")},t.prototype.createSeriesGroup=function(e){var t=this;if(this.seriesGroupComp=this.createManagedBean(new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgGroupComponent({title:this.getSeriesGroupTitle(),enabled:!0,suppressEnabledCheckbox:!0,suppressOpenCloseIcons:!1,cssIdentifier:"charts-data"})),this.chartController.isActiveXYChart()){var r=this.seriesGroupComp.createManagedBean(new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgToggleButton);r.setLabel(this.chartTranslationService.translate("paired")).setLabelAlignment("left").setLabelWidth("flex").setInputWidth(45).setValue(this.chartOptionsService.getPairedMode()).onValueChange(function(e){t.chartOptionsService.setPairedMode(!!e),t.chartController.updateForGridChange()}),this.seriesGroupComp.addItem(r)}var o=this.generateGetSeriesLabel();e.forEach(function(e){var r=t.seriesGroupComp.createManagedBean(new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgCheckbox);r.addCssClass("ag-data-select-checkbox");var i=o(e);r.setLabel(i),r.setValue(e.selected),t.addChangeListener(r,e),t.seriesGroupComp.addItem(r),t.columnComps.set(e.colId,r),t.addDragHandle(r,e)});var i=this.getGui(),n=this.seriesGroupComp.getGui();this.addComponent(i,this.seriesGroupComp,"seriesGroup");var a={getIconName:function(){return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.DragAndDropService.ICON_MOVE},getContainer:function(){return n},onDragging:function(e){return t.onDragging(e)},onDragLeave:function(){return t.onDragLeave()},isInterestedIn:this.isInterestedIn.bind(this),targetContainsSource:!0};this.dragAndDropService.addDropTarget(a),this.addDestroyFunc(function(){return t.dragAndDropService.removeDropTarget(a)})},t.prototype.createSeriesChartTypeGroup=function(e,t){var r=this;if(this.chartController.isComboChart()){this.seriesChartTypeGroupComp=this.createManagedBean(new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgGroupComponent({title:this.chartTranslationService.translate("seriesChartType"),enabled:!0,suppressEnabledCheckbox:!0,suppressOpenCloseIcons:!1,cssIdentifier:"charts-data"}));var o=this.chartController.getSeriesChartTypes();e.forEach(function(e){if(e.selected){var t=o.filter(function(t){return t.colId===e.colId})[0];if(t){var i=r.seriesChartTypeGroupComp.createManagedBean(new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgGroupComponent({title:e.displayName,enabled:!0,suppressEnabledCheckbox:!0,suppressOpenCloseIcons:!0,cssIdentifier:"charts-format-sub-level"})),n=r.seriesChartTypeGroupComp.createManagedBean(new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgCheckbox).setLabel(r.chartTranslationService.translate("secondaryAxis")).setLabelWidth("flex").setDisabled(["groupedColumn","stackedColumn","stackedArea"].includes(t.chartType)).setValue(!!t.secondaryAxis).onValueChange(function(t){return r.chartController.updateSeriesChartType(e.colId,void 0,t)});i.addItem(n);var a=function(e,t){return r.chartTranslationService.translate(e,t)},s=[{value:"line",text:a("line","Line")},{value:"area",text:a("area","Area")},{value:"stackedArea",text:a("stackedArea","StackedArea")},{value:"groupedColumn",text:a("groupedColumn","Grouped Column")},{value:"stackedColumn",text:a("stackedColumn","Stacked Column")}],l=i.createManagedBean(new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgSelect);l.setLabelAlignment("left").setLabelWidth("flex").addOptions(s).setValue(t.chartType).onValueChange(function(t){return r.chartController.updateSeriesChartType(e.colId,t)}),i.addItem(l),r.seriesChartTypeGroupComp.addItem(i)}}}),void 0===t?this.addComponent(this.getGui(),this.seriesChartTypeGroupComp,"seriesChartTypeGroup"):this.addComponentAtIndex(this.getGui(),this.seriesChartTypeGroupComp,"seriesChartTypeGroup",t)}},t.prototype.addDragHandle=function(e,t){var r=this,o=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.createIconNoSpan("columnDrag",this.gridOptionsService);o.classList.add("ag-drag-handle","ag-chart-data-column-drag-handle"),e.getGui().insertAdjacentElement("beforeend",o);var i={type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.DragSourceType.ChartPanel,eElement:o,dragItemName:t.displayName,getDragItem:function(){return{columns:[t.column]}},onDragStopped:function(){return r.onDragStop()}};this.dragAndDropService.addDragSource(i,!0),this.addDestroyFunc(function(){return r.dragAndDropService.removeDragSource(i)})},t.prototype.generateGetSeriesLabel=function(){if(!this.chartController.isActiveXYChart())return function(e){return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.escapeString(e.dis
2playName)};var e="bubble"===this.chartType,t=this.isInPairedMode(),r=0,o=new Map;return o.set(0,"X"),o.set(1,"Y"),o.set(2,"size"),function(i){var n,a=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.escapeString(i.displayName);return i.selected?(n=t?o.get(r%(e?3:2)):0===r?"X":e&&r%2==0?"size":"Y",r++,a+" ("+n+")"):a}},t.prototype.getCategoryGroupTitle=function(){return this.chartTranslationService.translate(this.chartController.isActiveXYChart()?"labels":"categories")},t.prototype.getSeriesGroupTitle=function(){return this.chartTranslationService.translate(this.chartController.isActiveXYChart()?"xyValues":"series")},t.prototype.getDataPanelDef=function(){var e;return(null===(e=this.gridOptionsService.get("chartToolPanelsDef"))||void 0===e?void 0:e.dataPanel)||DefaultDataPanelDef},t.prototype.isInPairedMode=function(){return this.chartController.isActiveXYChart()&&this.chartOptionsService.getSeriesOption("paired","scatter")},t.prototype.clearComponents=function(){ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.clearElement(this.getGui()),this.categoriesGroupComp=this.destroyBean(this.categoriesGroupComp),this.seriesGroupComp=this.destroyBean(this.seriesGroupComp),this.seriesChartTypeGroupComp=this.destroyBean(this.seriesChartTypeGroupComp),this.columnComps.clear()},t.prototype.onDragging=function(e){var t=this.checkHoveredItem(e);if(t){this.lastDraggedColumn=e.dragItem.columns[0];var r=t.comp,o=t.position,i=this.lastHoveredItem||{},n=i.comp,a=i.position;r===n&&o===a||(this.autoScrollService.check(e.event),this.clearHoveredItems(),this.lastHoveredItem={comp:r,position:o},r.getGui().classList.add("ag-list-item-hovered","ag-item-highlight-"+o))}},t.prototype.checkHoveredItem=function(e){var t,r;if(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.missing(e.vDirection))return null;var o=e.event;try{for(var i=__values$7(this.columnComps.values()),n=i.next();!n.done;n=i.next()){var a=n.value,s=a.getGui();if(s.querySelector(".ag-chart-data-column-drag-handle")){var l=s.getBoundingClientRect();if(o.clientY>=l.top&&o.clientY<=l.bottom){var c=s.clientHeight;return{comp:a,position:o.clientY>l.top+c/2?"bottom":"top"}}}}}catch(e){t={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return null},t.prototype.onDragLeave=function(){this.clearHoveredItems()},t.prototype.onDragStop=function(){var e=this;if(this.lastHoveredItem){var t=this.chartController.getColStateForMenu(),r=t.dimensionCols,o=t.valueCols,i=__spread$a(r,o).find(function(t){return t.column===e.lastDraggedColumn});if(i){var n=Array.from(this.columnComps.values()).indexOf(this.lastHoveredItem.comp);"bottom"===this.lastHoveredItem.position&&n++,i.order=n,this.chartController.updateForPanelChange(i)}}this.clearHoveredItems(),this.lastDraggedColumn=void 0,this.autoScrollService.ensureCleared()},t.prototype.clearHoveredItems=function(){this.columnComps.forEach(function(e){e.getGui().classList.remove("ag-list-item-hovered","ag-item-highlight-top","ag-item-highlight-bottom")}),this.lastHoveredItem=void 0},t.prototype.isInterestedIn=function(e){return e===ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.DragSourceType.ChartPanel},t.TEMPLATE='<div class="ag-chart-data-wrapper ag-scrollable-container"></div>',__decorate$18([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("dragAndDropService")],t.prototype,"dragAndDropService",void 0),__decorate$18([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("chartTranslationService")],t.prototype,"chartTranslationService",void 0),__decorate$18([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"init",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),__extends$1C=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$17=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},FontPanel=function(e){function t(t){var r=e.call(this)||this;return r.activeComps=[],r.params=t,r}return __extends$1C(t,e),t.prototype.init=function(){this.setTemplate(t.TEMPLATE,{fontGroup:{cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0}}),this.initGroup(),this.initFontFamilySelect(),this.initFontWeightStyleSelect(),this.initFontSizeSelect(),this.initFontColorPicker()},t.prototype.addCompToPanel=function(e){this.fontGroup.addItem(e),this.activeComps.push(e)},t.prototype.setEnabled=function(e){this.fontGroup.setEnabled(e)},t.prototype.initGroup=function(){var e=this;this.fontGroup.setTitle(this.params.name||this.chartTranslationService.translate("font")).setEnabled(this.params.enabled).hideEnabledCheckbox(!!this.params.suppressEnabledCheckbox).hideOpenCloseIcons(!0).onEnableChange(function(t){e.params.setEnabled&&e.params.setEnabled(t)})},t.prototype.initFontFamilySelect=function(){var e=this,t=["Arial, sans-serif","Aria Black, sans-serif","Book Antiqua,  serif","Charc
2oal, sans-serif","Comic Sans MS, cursive","Courier, monospace","Courier New, monospace","Gadget, sans-serif","Geneva, sans-serif","Helvetica, sans-serif","Impact, sans-serif","Lucida Console, monospace","Lucida Grande, sans-serif","Lucida Sans Unicode,  sans-serif","Monaco, monospace","Palatino Linotype, serif","Palatino, serif","Times New Roman, serif","Times, serif","Verdana, sans-serif"],r=this.params.initialFont.family,o=t[0];if(r){var i=t.map(function(e){return e.toLowerCase()}).indexOf(r.toLowerCase());if(i>=0)o=t[i];else{var n=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.capitalise(r);t.push(n),o=n}}var a=t.sort().map(function(e){return{value:e,text:e}});this.familySelect.addOptions(a).setInputWidth("flex").setValue(""+o).onValueChange(function(t){return e.params.setFont({family:t})})},t.prototype.initFontSizeSelect=function(){var e=this,t=[8,10,12,14,16,18,20,22,24,26,28,30,32,34,36],r=this.params.initialFont.size;ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.includes(t,r)||t.push(r);var o=t.sort(function(e,t){return e-t}).map(function(e){return{value:""+e,text:""+e}});this.sizeSelect.addOptions(o).setInputWidth("flex").setValue(""+r).onValueChange(function(t){return e.params.setFont({size:parseInt(t,10)})}),this.sizeSelect.setLabel(this.chartTranslationService.translate("size"))},t.prototype.initFontWeightStyleSelect=function(){var e=this,t=this.params.initialFont,r=t.weight,o=void 0===r?"normal":r,i=t.style,n=void 0===i?"normal":i,a=[{name:"normal",weight:"normal",style:"normal"},{name:"bold",weight:"bold",style:"normal"},{name:"italic",weight:"normal",style:"italic"},{name:"boldItalic",weight:"bold",style:"italic"}],s=a.find(function(e){return e.weight===o&&e.style===n});s||(s={name:"predefined",weight:o,style:n},a.unshift(s));var l=a.map(function(t){return{value:t.name,text:e.chartTranslationService.translate(t.name)}});this.weightStyleSelect.addOptions(l).setInputWidth("flex").setValue(s.name).onValueChange(function(t){var r=a.find(function(e){return e.name===t});e.params.setFont({weight:r.weight,style:r.style})})},t.prototype.initFontColorPicker=function(){var e=this;this.colorPicker.setLabel(this.chartTranslationService.translate("color")).setInputWidth(45).setValue(""+this.params.initialFont.color).onValueChange(function(t){return e.params.setFont({color:t})})},t.prototype.addItemToPanel=function(e){this.fontGroup.addItem(e),this.activeComps.push(e)},t.prototype.destroyActiveComps=function(){var e=this;this.activeComps.forEach(function(t){ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.removeFromParent(t.getGui()),e.destroyBean(t)})},t.prototype.destroy=function(){this.destroyActiveComps(),e.prototype.destroy.call(this)},t.TEMPLATE='<div class="ag-font-panel">\n            <ag-group-component ref="fontGroup">\n                <ag-select ref="familySelect"></ag-select>\n                <ag-select ref="weightStyleSelect"></ag-select>\n                <div class="ag-charts-font-size-color">\n                    <ag-select ref="sizeSelect"></ag-select>\n                    <ag-color-picker ref="colorPicker"></ag-color-picker>\n                </div>\n            </ag-group-component>\n        </div>',__decorate$17([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("fontGroup")],t.prototype,"fontGroup",void 0),__decorate$17([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("familySelect")],t.prototype,"familySelect",void 0),__decorate$17([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("weightStyleSelect")],t.prototype,"weightStyleSelect",void 0),__decorate$17([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("sizeSelect")],t.prototype,"sizeSelect",void 0),__decorate$17([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("colorPicker")],t.prototype,"colorPicker",void 0),__decorate$17([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("chartTranslationService")],t.prototype,"chartTranslationService",void 0),__decorate$17([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"init",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),__extends$1B=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$16=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},LegendPanel=function(e){function t(t){var r=t.chartOptionsService,o=t.isExpandedOnInit,i=void 0!==o&&o,n=e.call(this)||this;return n.activePanels=[],n.chartOptionsService=r,n.isExpandedOnInit=i,n}return __extends$1B(t,e),t.prototype.init=function(){this.setTemplate(t.TEMPLATE,{legendGroup:{cssIdentifier:"charts-format-top-level",direction:"vertical"}}),this.initLegendGroup(),this.initLegendPosition(),this.initLegendPadding(),this.initLegendItems(),this.initLabelPanel()},t.prototype.initLegendGroup=function(){var e=this;this.legendGroup.setTitle(this.chartTranslationService.translate("legend")).hideEnabledCheckbox(!1).setEnabled(this.chartOptionsService.getChartOption("legend.enabled")||!1).toggleGroupExpand(this.isExpandedOnInit).onEnableChange(function(t){e.chartOptionsService.setChartOption("legend.enabled",t),e.legendGroup.toggleGroupExpand(!0)})},t.prototype.initLegendPosition=function(){var e=this;this.legendPositionSelect.setLabel(this.chartTranslationService.translate("position")).setLabelWidth("flex").setInputWidth(80).addOptions(["top","right","bottom","left"].map(function(t){return{value:t,text:e.chartTranslationService.translate(t)}
2})).setValue(this.chartOptionsService.getChartOption("legend.position")).onValueChange(function(t){return e.chartOptionsService.setChartOption("legend.position",t)})},t.prototype.initLegendPadding=function(){var e=this,t=this.chartOptionsService.getChartOption("legend.spacing");this.legendPaddingSlider.setLabel(this.chartTranslationService.translate("spacing")).setMaxValue(getMaxValue(t,200)).setValue(""+t).setTextFieldWidth(45).onValueChange(function(t){return e.chartOptionsService.setChartOption("legend.spacing",t)})},t.prototype.initLegendItems=function(){var e=this,t=function(t,r,o,i){var n=e.chartOptionsService.getChartOption("legend."+t);o.setLabel(e.chartTranslationService.translate(r)).setMaxValue(getMaxValue(n,i)).setValue(""+n).setTextFieldWidth(45).onValueChange(function(r){e.chartOptionsService.setChartOption("legend."+t,r)})};t("item.marker.size","markerSize",this.markerSizeSlider,40),t("item.marker.strokeWidth","markerStroke",this.markerStrokeSlider,10),t("item.marker.padding","itemSpacing",this.markerPaddingSlider,20),t("item.paddingX","layoutHorizontalSpacing",this.itemPaddingXSlider,50),t("item.paddingY","layoutVerticalSpacing",this.itemPaddingYSlider,50)},t.prototype.initLabelPanel=function(){var e=this,t=this.chartOptionsService,r={enabled:!0,suppressEnabledCheckbox:!0,initialFont:{family:t.getChartOption("legend.item.label.fontFamily"),style:t.getChartOption("legend.item.label.fontStyle"),weight:t.getChartOption("legend.item.label.fontWeight"),size:t.getChartOption("legend.item.label.fontSize"),color:t.getChartOption("legend.item.label.color")},setFont:function(t){var r=e.chartOptionsService;t.family&&r.setChartOption("legend.item.label.fontFamily",t.family),t.weight&&r.setChartOption("legend.item.label.fontWeight",t.weight),t.style&&r.setChartOption("legend.item.label.fontStyle",t.style),t.size&&r.setChartOption("legend.item.label.fontSize",t.size),t.color&&r.setChartOption("legend.item.label.color",t.color)}},o=this.createBean(new FontPanel(r));this.legendGroup.addItem(o),this.activePanels.push(o)},t.prototype.destroyActivePanels=function(){var e=this;this.activePanels.forEach(function(t){ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.removeFromParent(t.getGui()),e.destroyBean(t)})},t.prototype.destroy=function(){this.destroyActivePanels(),e.prototype.destroy.call(this)},t.TEMPLATE='<div>\n            <ag-group-component ref="legendGroup">\n                <ag-select ref="legendPositionSelect"></ag-select>\n                <ag-slider ref="legendPaddingSlider"></ag-slider>\n                <ag-slider ref="markerSizeSlider"></ag-slider>\n                <ag-slider ref="markerStrokeSlider"></ag-slider>\n                <ag-slider ref="markerPaddingSlider"></ag-slider>\n                <ag-slider ref="itemPaddingXSlider"></ag-slider>\n                <ag-slider ref="itemPaddingYSlider"></ag-slider>\n            </ag-group-component>\n        </div>',__decorate$16([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("legendGroup")],t.prototype,"legendGroup",void 0),__decorate$16([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("legendPositionSelect")],t.prototype,"legendPositionSelect",void 0),__decorate$16([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("legendPaddingSlider")],t.prototype,"legendPaddingSlider",void 0),__decorate$16([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("markerSizeSlider")],t.prototype,"markerSizeSlider",void 0),__decorate$16([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("markerStrokeSlider")],t.prototype,"markerStrokeSlider",void 0),__decorate$16([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("markerPaddingSlider")],t.prototype,"markerPaddingSlider",void 0),__decorate$16([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("itemPaddingXSlider")],t.prototype,"itemPaddingXSlider",void 0),__decorate$16([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("itemPaddingYSlider")],t.prototype,"itemPaddingYSlider",void 0),__decorate$16([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("chartTranslationService")],t.prototype,"chartTranslationService",void 0),__decorate$16([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"init",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),__extends$1A=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$15=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},AxisTicksPanel=function(e){function t(t){var r=e.call(this)||this;return r.chartOptionsService=t,r}return __extends$1A(t,e),t.prototype.init=function(){this.setTemplate(t.TEMPLATE,{axisTicksGroup:{cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0}}),this.initAxisTicks()},t.prototype.initAxisTicks=function(){var e=this;this.axisTicksGroup.setTitle(this.chartTranslationService.translate("ticks")).hideOpenCloseIcons(!0).hideEnabledCheckbox(!0),this.axisTicksColorPicker.setLabel(this.chartTranslationService.translate("color")).setLabelWidth("flex").setInputWidth(45).setValue(this.chartOptionsService.getAxisProperty("tick.color")).onValueChange(function(t){return e.chartOptionsService.setAxisProperty("tick.color",t)});var t=function(t,r,o,i){var n=e.chartOptionsService.getAxisProperty(t);
2r.setLabel(o).setMaxValue(getMaxValue(n,i)).setValue(""+n).setTextFieldWidth(45).onValueChange(function(r){return e.chartOptionsService.setAxisProperty(t,r)})};t("tick.width",this.axisTicksWidthSlider,this.chartTranslationService.translate("width"),10),t("tick.size",this.axisTicksSizeSlider,this.chartTranslationService.translate("length"),30)},t.TEMPLATE='<div>\n            <ag-group-component ref="axisTicksGroup">\n                <ag-color-picker ref="axisTicksColorPicker"></ag-color-picker>\n                <ag-slider ref="axisTicksWidthSlider"></ag-slider>\n                <ag-slider ref="axisTicksSizeSlider"></ag-slider>\n            </ag-group-component>\n        </div>',__decorate$15([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("axisTicksGroup")],t.prototype,"axisTicksGroup",void 0),__decorate$15([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("axisTicksColorPicker")],t.prototype,"axisTicksColorPicker",void 0),__decorate$15([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("axisTicksWidthSlider")],t.prototype,"axisTicksWidthSlider",void 0),__decorate$15([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("axisTicksSizeSlider")],t.prototype,"axisTicksSizeSlider",void 0),__decorate$15([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("chartTranslationService")],t.prototype,"chartTranslationService",void 0),__decorate$15([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"init",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),__extends$1z=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$14=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},AgAngleSelect=function(e){function t(r){var o=e.call(this,r,t.TEMPLATE)||this;return o.radius=0,o.offsetX=0,o.offsetY=0,o}return __extends$1z(t,e),t.prototype.postConstruct=function(){var t=this;e.prototype.postConstruct.call(this),this.dragListener={eElement:this.eParentCircle,dragStartPixels:0,onDragStart:function(e){t.parentCircleRect=t.eParentCircle.getBoundingClientRect()},onDragging:function(e){return t.calculateAngleDrag(e)},onDragStop:function(){}},this.dragService.addDragSource(this.dragListener),this.eAngleValue.setLabel("").setLabelWidth(5).setInputWidth(45).setMin(0).setMax(360).setValue(""+this.degrees).onValueChange(function(e){null!=e&&""!==e||(e="0"),e=t.eAngleValue.normalizeValue(e);var r=parseFloat(e);r>180&&(r-=360),t.setValue(r)}),this.updateNumberInput(),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.exists(this.getValue())&&this.eAngleValue.setValue(this.normalizeNegativeValue(this.getValue()).toString()),this.addManagedListener(this,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgAbstractField.EVENT_CHANGED,function(){var e=t.gridOptionsService.getDocument();t.eAngleValue.getInputElement().contains(e.activeElement)||t.updateNumberInput()})},t.prototype.updateNumberInput=function(){var e=this.normalizeNegativeValue(this.getValue());this.eAngleValue.setValue(e.toString())},t.prototype.positionChildCircle=function(e){var t=this.parentCircleRect||{width:24,height:24},r=this.eChildCircle,o=t.width/2,i=t.height/2;r.style.left=o+8*Math.cos(e)+"px",r.style.top=i+8*Math.sin(e)+"px"},t.prototype.calculatePolar=function(){var e=this.offsetX,t=this.offsetY,r=Math.atan2(t,e);this.degrees=this.toDegrees(r),this.radius=Math.sqrt(e*e+t*t),this.positionChildCircle(r)},t.prototype.calculateCartesian=function(){var e=this.toRadians(this.getValue()),t=this.getRadius();this.setOffsetX(Math.cos(e)*t).setOffsetY(Math.sin(e)*t)},t.prototype.setOffsetX=function(e){return this.offsetX!==e&&(this.offsetX=e,this.calculatePolar()),this},t.prototype.setOffsetY=function(e){return this.offsetY!==e&&(this.offsetY=e,this.calculatePolar()),this},t.prototype.calculateAngleDrag=function(e){var t=this.parentCircleRect,r=t.width/2,o=t.height/2,i=e.clientX-t.left-r,n=e.clientY-t.top-o,a=Math.atan2(n,i);this.setValue(a,!0)},t.prototype.toDegrees=function(e){return e/Math.PI*180},t.prototype.toRadians=function(e){return e/180*Math.PI},t.prototype.normalizeNegativeValue=function(e){return e<0?360+e:e},t.prototype.normalizeAngle180=function(e){return(e%=2*Math.PI)<-Math.PI?e+=2*Math.PI:e>=Math.PI&&(e-=2*Math.PI),e},t.prototype.getRadius=function(){return this.radius},t.prototype.setRadius=function(e){return this.radius===e||(this.radius=e,this.calculateCartesian()),this},t.prototype.onValueChange=function(e){var t=this;return this.addManagedListener(this,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgAbstractField.EVENT_CHANGED,function(){e(t.degrees)}),this},t.prototype.getValue=function(e){return e?this.toRadians(this.degrees):this.degrees},t.prototype.setValue=function(e,t){var r;return r=t?e:this.normalizeAngle180(this.toRadians(e)),e=this.toDegrees(r),this.degrees!==e&&(this.degrees=Math.floor(e),this.calculateCartesian(),this.positionChildCircle(r),this.dispatchEvent({type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgAbstractField.EVENT_CHANGED})),this},t.prototype.setWidth=function(e){return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setFixedWidth(this.getGui(),e),this},t.prototype.setDisabled=function(t){return e.prototype.setDisabled.call(this,t),this.eAngleValue.setDisabled(t),this},t.prototype.destroy=function(){this.dragService.removeDragSource(this.dragListener),e.prototype.destroy.call(this)},t.TEMPLATE='<div class="ag-angle-select">\n            <div ref="eLabel"></div>\n            <div class="ag-wrapper ag-angle-select-wrapper">\n                <div ref="eAngleSelectField" class="ag-angle-select-field">\n                    <div ref="eParentCircle" class="ag-angle-select-parent-circle">\n                        <div ref="eChildCircle" class="ag-angle-select-child-circle"></div>\n                    </div>\n                </div>\n                <ag-input-number-field ref="eAngleValue"></ag-input-number-field>\n            </div>\n        </div>',__decorate$14([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eLabel")],t.prototype,"eLabel",void 0),__decorate$14([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eParentCircle")],t.prototype,"eParentCircle",void 0),__decorate$14([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eChildCircle")],t.prototype,"eChildCircle",void 0),__decorate$14([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eAngleValue")],t.prototype,"eAngleValue",void 0),__decorate$14([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("dragService")],t.prototype,"dragService",void 0),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgAbstractLabel),__extends$1y=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$13=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},AxisPanel=function(e){function t(t){var r=t.chartController,o=t.chartOptionsService,i=t.isExpandedOnInit,
2n=void 0!==i&&i,a=e.call(this)||this;return a.activePanels=[],a.axisLabelUpdateFuncs=[],a.prevXRotation=0,a.prevYRotation=0,a.chartController=r,a.chartOptionsService=o,a.isExpandedOnInit=n,a}return __extends$1y(t,e),t.prototype.init=function(){var e=this;this.setTemplate(t.TEMPLATE,{axisGroup:{cssIdentifier:"charts-format-top-level",direction:"vertical"}}),this.initAxis(),this.initAxisTicks(),this.initAxisLabels(),this.addManagedListener(this.chartController,ChartController.EVENT_CHART_UPDATED,function(){return e.axisLabelUpdateFuncs.forEach(function(e){return e()})})},t.prototype.initAxis=function(){var e=this;this.axisGroup.setTitle(this.translate("axis")).toggleGroupExpand(this.isExpandedOnInit).hideEnabledCheckbox(!0),this.axisColorInput.setLabel(this.translate("color")).setLabelWidth("flex").setInputWidth(45).setValue(this.chartOptionsService.getAxisProperty("line.color")).onValueChange(function(t){return e.chartOptionsService.setAxisProperty("line.color",t)});var t=this.chartOptionsService.getAxisProperty("line.width");this.axisLineWidthSlider.setMaxValue(getMaxValue(t,10)).setLabel(this.translate("thickness")).setTextFieldWidth(45).setValue(""+t).onValueChange(function(t){return e.chartOptionsService.setAxisProperty("line.width",t)})},t.prototype.initAxisTicks=function(){var e=this.createBean(new AxisTicksPanel(this.chartOptionsService));this.axisGroup.addItem(e),this.activePanels.push(e)},t.prototype.initAxisLabels=function(){var e=this,t={family:this.chartOptionsService.getAxisProperty("label.fontFamily"),style:this.chartOptionsService.getAxisProperty("label.fontStyle"),weight:this.chartOptionsService.getAxisProperty("label.fontWeight"),size:this.chartOptionsService.getAxisProperty("label.fontSize"),color:this.chartOptionsService.getAxisProperty("label.color")},r={name:this.translate("labels"),enabled:!0,suppressEnabledCheckbox:!0,initialFont:t,setFont:function(t){t.family&&e.chartOptionsService.setAxisProperty("label.fontFamily",t.family),t.weight&&e.chartOptionsService.setAxisProperty("label.fontWeight",t.weight),t.style&&e.chartOptionsService.setAxisProperty("label.fontStyle",t.style),t.size&&e.chartOptionsService.setAxisProperty("label.fontSize",t.size),t.color&&e.chartOptionsService.setAxisProperty("label.color",t.color)}},o=this.createBean(new FontPanel(r));this.axisGroup.addItem(o),this.activePanels.push(o),this.addAdditionalLabelComps(o)},t.prototype.addAdditionalLabelComps=function(e){this.addLabelPadding(e);var t=this.createRotationWidgets(),r=t.xRotationComp,o=t.yRotationComp,i=this.initLabelRotations(r,o);e.addCompToPanel(i),e.addCompToPanel(r),e.addCompToPanel(o)},t.prototype.initLabelRotations=function(e,t){var r,o,i=this,n=function(e){return i.chartOptionsService.getLabelRotation(e)},a=function(e,t){i.chartOptionsService.setLabelRotation(e,t)},s=(r=n("xAxis"),o=n("yAxis"),null==r&&null==o&&i.chartOptionsService.getAxisProperty("label.autoRotate")),l=this.createBean(new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgCheckbox).setLabel(this.translate("autoRotate")).setValue(s).onValueChange(function(r){i.chartOptionsService.setAxisProperty("label.autoRotate",r),r?(i.prevXRotation=n("xAxis"),i.prevYRotation=n("yAxis"),a("xAxis",void 0),a("yAxis",void 0)):(a("xAxis",i.prevXRotation),a("yAxis",i.prevYRotation)),e.setDisabled(r),t.setDisabled(r)});return e.setDisabled(s),t.setDisabled(s),l},t.prototype.createRotationWidgets=function(){var e=this,t=String.fromCharCode(176),r=function(r,o){var i=e.chartTranslationService.translate(r)+" "+t,n=e.chartOptionsService.getLabelRotation(o),a=(new AgAngleSelect).setLabel(i).setLabelWidth("flex").setValue(n||0).onValueChange(function(t){return e.chartOptionsService.setLabelRotation(o,t)});return e.axisLabelUpdateFuncs.push(function(){var t=e.chartOptionsService.getLabelRotation(o);a.setValue(t||0)}),e.createBean(a)};return{xRotationComp:r("xRotation","xAxis"),yRotationComp:r("yRotation","yAxis")}},t.prototype.addLabelPadding=function(e){var t=this,r=this.createBean(new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgSlider),o=this.chartOptionsService.getAxisProperty("label.padding");r.setLabel(this.chartTranslationService.translate("padding")).setMaxValue(getMaxValue(o,30)).setValue(""+o).setTextFieldWidth(45).onValueChange(function(e){return t.chartOptionsService.setAxisProperty("label.padding",e)}),e.addCompToPanel(r)},t.prototype.translate=function(e,t){return this.chartTranslationService.translate(e,t)},t.prototype.destroyActivePanels=function(){var e=this;
2this.activePanels.forEach(function(t){ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.removeFromParent(t.getGui()),e.destroyBean(t)})},t.prototype.destroy=function(){this.destroyActivePanels(),e.prototype.destroy.call(this)},t.TEMPLATE='<div>\n            <ag-group-component ref="axisGroup">\n                <ag-color-picker ref="axisColorInput"></ag-color-picker>\n                <ag-slider ref="axisLineWidthSlider"></ag-slider>\n            </ag-group-component>\n        </div>',__decorate$13([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("axisGroup")],t.prototype,"axisGroup",void 0),__decorate$13([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("axisColorInput")],t.prototype,"axisColorInput",void 0),__decorate$13([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("axisLineWidthSlider")],t.prototype,"axisLineWidthSlider",void 0),__decorate$13([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("chartTranslationService")],t.prototype,"chartTranslationService",void 0),__decorate$13([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"init",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),__extends$1x=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$12=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},NavigatorPanel=function(e){function t(t){var r=t.chartOptionsService,o=t.isExpandedOnInit,i=void 0!==o&&o,n=e.call(this)||this;return n.chartOptionsService=r,n.isExpandedOnInit=i,n}return __extends$1x(t,e),t.prototype.init=function(){this.setTemplate(t.TEMPLATE,{navigatorGroup:{cssIdentifier:"charts-format-top-level",direction:"vertical"}}),this.initNavigator()},t.prototype.initNavigator=function(){var e=this,t=this.chartTranslationService;this.navigatorGroup.setTitle(t.translate("navigator")).hideEnabledCheckbox(!1).setEnabled(this.chartOptionsService.getChartOption("navigator.enabled")||!1).onEnableChange(function(t){e.chartOptionsService.setChartOption("navigator.enabled",t),e.navigatorGroup.toggleGroupExpand(!0)}).toggleGroupExpand(this.isExpandedOnInit);var r=this.chartOptionsService.getChartOption("navigator.height");this.navigatorHeightSlider.setLabel(t.translate("height")).setMinValue(10).setMaxValue(getMaxValue(r,60)).setTextFieldWidth(45).setValue(""+(r||30)).onValueChange(function(t){return e.chartOptionsService.setChartOption("navigator.height",t)})},t.prototype.destroy=function(){e.prototype.destroy.call(this)},t.TEMPLATE='<div>\n            <ag-group-component ref="navigatorGroup">\n                <ag-slider ref="navigatorHeightSlider"></ag-slider>\n            </ag-group-component>\n        </div>',__decorate$12([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("navigatorGroup")],t.prototype,"navigatorGroup",void 0),__decorate$12([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("navigatorHeightSlider")],t.prototype,"navigatorHeightSlider",void 0),__decorate$12([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("chartTranslationService")],t.prototype,"chartTranslationService",void 0),__decorate$12([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"init",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),__extends$1w=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$11=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},PaddingPanel=function(e){function t(t,r){var o=e.call(this)||this;return o.chartOptionsService=t,o.chartController=r,o}return __extends$1w(t,e),t.prototype.init=function(){var e=this;this.setTemplate(t.TEMPLATE,{chartPaddingGroup:{cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0}}),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_CHART_OPTIONS_CHANGED,function(t){e.updateTopPadding(t.chartOptions)}),this.initGroup(),this.initChartPaddingItems()},t.prototype.initGroup=function(){this.chartPaddingGroup.setTitle(this.chartTranslationService.translate("padding")).hideOpenCloseIcons(!0).hideEnabledCheckbox(!0)},t.prototype.initChartPaddingItems=function(){var e=this,t=function(t,r){var o=e.chartOptionsService.getChartOption("padding."+t);r.setLabel(e.chartTranslationService.translate(t)).setMaxValue(getMaxValue(o,200)).setValue(""+o).setTextFieldWidth(45).onValueChange(function(r){return e.chartOptionsService.setChartOption("padding."+t,r)})};t("top",this.paddingTopSlider),t("right",this.paddingRightSlider),t("bottom",this.paddingBottomSlider),t("left",this.paddingLeftSlider)},t.prototype.updateTopPadding=function(e){var t,r,o=null===(r=null===(t=e[this.chartController.getChartSeriesTypes()[0]])||void 0===t?void 0:t.padding)||void 0===r?void 0:r.top;null!=o&&this.paddingTopSlider.setValue(o)},t.TEMPLATE='<div>\n            <ag-group-component ref="chartPaddingGroup">\n                <ag-slider ref="paddingTopSlider"></ag-slider>\n                <ag-slider ref="paddingRightSlider"></ag-slider>\n                <ag-slider ref="paddingBottomSlider"></ag-slider>\n                <ag-slider ref="paddingLeftSlider"></ag-slider>\n            </ag-group-component>\n        <div>',__decorate$11([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("chartPaddingGroup")],t.prototype,"chartPaddingGroup",void 0),__decorate$11([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("paddingTopSlider")],t.prototype,"paddingTopSlider",void 0),__decorate$11([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("paddingRightSlider")],t.prototype,"paddingRightSlider",void 0),__decorate$11([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("paddingBottomSlider")],t.prototype,"paddingBottomSlider",void 0),__decorate$11([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("paddingLeftSlider")],t.prototype,"paddingLeftSlider",void 0),__decorate$11([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("chartTranslationService")],t.prototype,"chartTranslationService",void 0),__decorate$11([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"init",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),__extends$1v=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$10=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a}
2,BackgroundPanel=function(e){function t(t){var r=e.call(this)||this;return r.chartOptionsService=t,r}return __extends$1v(t,e),t.prototype.init=function(){this.setTemplate(t.TEMPLATE,{chartBackgroundGroup:{cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0}}),this.initGroup(),this.initColorPicker()},t.prototype.initGroup=function(){var e=this;this.group.setTitle(this.chartTranslationService.translate("background")).setEnabled(this.chartOptionsService.getChartOption("background.visible")).hideOpenCloseIcons(!0).hideEnabledCheckbox(!1).onEnableChange(function(t){return e.chartOptionsService.setChartOption("background.visible",t)})},t.prototype.initColorPicker=function(){var e=this;this.colorPicker.setLabel(this.chartTranslationService.translate("color")).setLabelWidth("flex").setInputWidth(45).setValue(this.chartOptionsService.getChartOption("background.fill")).onValueChange(function(t){return e.chartOptionsService.setChartOption("background.fill",t)})},t.TEMPLATE='<div>\n            <ag-group-component ref="chartBackgroundGroup">\n                <ag-color-picker ref="colorPicker"></ag-color-picker>\n            </ag-group-component>\n        <div>',__decorate$10([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("chartBackgroundGroup")],t.prototype,"group",void 0),__decorate$10([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("colorPicker")],t.prototype,"colorPicker",void 0),__decorate$10([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("chartTranslationService")],t.prototype,"chartTranslationService",void 0),__decorate$10([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"init",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),__extends$1u=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$$=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},TitlePanel=function(e){function t(r){var o=e.call(this,t.TEMPLATE)||this;return o.chartOptionsService=r,o.activePanels=[],o}return __extends$1u(t,e),t.prototype.init=function(){this.initFontPanel(),this.titlePlaceholder=this.chartTranslationService.translate("titlePlaceholder")},t.prototype.hasTitle=function(){var e=this.getOption("title");return e&&e.enabled&&e.text&&e.text.length>0},t.prototype.initFontPanel=function(){var e=this,t=this.hasTitle(),r=function(t,r){t.family&&e.setOption("title.fontFamily",t.family,r),t.weight&&e.setOption("title.fontWeight",t.weight,r),t.style&&e.setOption("title.fontStyle",t.style,r),t.size&&e.setOption("title.fontSize",t.size,r),t.color&&e.setOption("title.color",t.color,r)},o={family:this.getOption("title.fontFamily"),style:this.getOption("title.fontStyle"),weight:this.getOption("title.fontWeight"),size:this.getOption("title.fontSize"),color:this.getOption("title.color")};t||r(o,!0);var i={name:this.chartTranslationService.translate("title"),enabled:t,suppressEnabledCheckbox:!1,initialFont:o,setFont:r,setEnabled:function(t){if(e.toolbarExists()){var r=e.getOption("padding.top");e.setOption("padding.top",t?r-20:r+20)}e.setOption("title.enabled",t);var o=e.getOption("title.text"),i="Title"===o||0===(null==o?void 0:o.trim().length);t&&i&&e.setOption("title.text",e.titlePlaceholder)}},n=this.createBean(new FontPanel(i));n.addItemToPanel(this.createSpacingSlicer()),this.getGui().appendChild(n.getGui()),this.activePanels.push(n),this.addManagedListener(this.eventService,"chartTitleEdit",function(){n.setEnabled(e.hasTitle())})},t.prototype.createSpacingSlicer=function(){var e=this,t=this.createBean(new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgSlider),r=this.chartOptionsService.getChartOption("title.spacing");return t.setLabel(this.chartTranslationService.translate("spacing")).setMaxValue(Math.max(r,100)).setValue(""+r).setTextFieldWidth(45).onValueChange(function(t){return e.chartOptionsService.setChartOption("title.spacing",t)}),t},t.prototype.toolbarExists=function(){var e=this.gridOptionsService.getCallback("getChartToolbarItems");if(!e)return!0;var t={defaultItems:["chartUnlink","chartDownload"]};return["chartLink","chartUnlink","chartDownload"].some(function(r){var o;return null===(o=e&&e(t))||void 0===o?void 0:o.includes(r)})},t.prototype.getOption=function(e){return this.chartOptionsService.getChartOption(e)},t.prototype.setOption=function(e,t,r){this.chartOptionsService.setChartOption(e,t,r)},t.prototype.destroyActivePanels=function(){var e=this;
2this.activePanels.forEach(function(t){ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.removeFromParent(t.getGui()),e.destroyBean(t)})},t.prototype.destroy=function(){this.destroyActivePanels(),e.prototype.destroy.call(this)},t.TEMPLATE="<div></div>",__decorate$$([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("chartTranslationService")],t.prototype,"chartTranslationService",void 0),__decorate$$([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"init",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),__extends$1t=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$_=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},ChartPanel=function(e){function t(t){var r=t.chartController,o=t.chartOptionsService,i=t.isExpandedOnInit,n=void 0!==i&&i,a=e.call(this)||this;return a.activePanels=[],a.chartController=r,a.chartOptionsService=o,a.isExpandedOnInit=n,a}return __extends$1t(t,e),t.prototype.init=function(){this.setTemplate(t.TEMPLATE,{chartGroup:{cssIdentifier:"charts-format-top-level",direction:"vertical"}}),this.initGroup(),this.initTitles(),this.initPaddingPanel(),this.initBackgroun
2dPanel()},t.prototype.initGroup=function(){this.chartGroup.setTitle(this.chartTranslationService.translate("chart")).toggleGroupExpand(this.isExpandedOnInit).hideEnabledCheckbox(!0)},t.prototype.initTitles=function(){var e=this.createBean(new TitlePanel(this.chartOptionsService));this.chartGroup.addItem(e),this.activePanels.push(e)},t.prototype.initPaddingPanel=function(){var e=this.createBean(new PaddingPanel(this.chartOptionsService,this.chartController));this.chartGroup.addItem(e),this.activePanels.push(e)},t.prototype.initBackgroundPanel=function(){var e=this.createBean(new BackgroundPanel(this.chartOptionsService));this.chartGroup.addItem(e),this.activePanels.push(e)},t.prototype.destroyActivePanels=function(){var e=this;this.activePanels.forEach(function(t){ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.removeFromParent(t.getGui()),e.destroyBean(t)})},t.prototype.destroy=function(){this.destroyActivePanels(),e.prototype.destroy.call(this)},t.TEMPLATE='<div>\n            <ag-group-component ref="chartGroup"></ag-group-component>\n        </div>',__decorate$_([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("chartGroup")],t.prototype,"chartGroup",void 0),__decorate$_([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("chartTranslationService")],t.prototype,"chartTranslationService",void 0),__decorate$_([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"init",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),__extends$1s=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$Z=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},ShadowPanel=function(e){function t(t,r){var o=e.call(this)||this;return o.chartOptionsService=t,o.getSelectedSeries=r,o}return __extends$1s(t,e),t.prototype.init=function(){this.setTemplate(t.TEMPLATE,{shadowGroup:{cssIdentifier:"charts-format-sub-level",direction:"vertical",suppressOpenCloseIcons:!0}}),this.shadowBlurSlider.setTextFieldWidth(45),this.shadowXOffsetSlider.setTextFieldWidth(45),this.shadowYOffsetSlider.setTextFieldWidth(45),this.initSeriesShadow()},t.prototype.initSeriesShadow=function(){var e=this;this.shadowGroup.setTitle(this.chartTranslationService.translate("shadow")).setEnabled(this.chartOptionsService.getSeriesOption("shadow.enabled",this.getSelectedSeries())).hideOpenCloseIcons(!0).hideEnabledCheckbox(!1).onEnableChange(function(t){return e.chartOptionsService.setSeriesOption("shadow.enabled",t,e.getSelectedSeries())}),this.shadowColorPicker.setLabel(this.chartTranslationService.translate("color")).setLabelWidth("flex").setInputWidth(45).setValue(this.chartOptionsService.getSeriesOption("shadow.color",this.getSelectedSeries())).onValueChange(function(t){return e.chartOptionsService.setSeriesOption("shadow.color",t,e.getSelectedSeries())});var t=function(t,r,o,i){var n=e.chartOptionsService.getSeriesOption("shadow."+r,e.getSelectedSeries());t.setLabel(e.chartTranslationService.translate(r)).setMinValue(o).setMaxValue(getMaxValue(n,i)).setValue(""+n).onValueChange(function(t){return e.chartOptionsService.setSeriesOption("shadow."+r,t,e.getSelectedSeries())})};t(this.shadowBlurSlider,"blur",0,20),t(this.shadowXOffsetSlider,"xOffset",-10,10),t(this.shadowYOffsetSlider,"yOffset",-10,10)},t.TEMPLATE='<div>\n            <ag-group-component ref="shadowGroup">\n                <ag-color-picker ref="shadowColorPicker"></ag-color-picker>\n                <ag-slider ref="shadowBlurSlider"></ag-slider>\n                <ag-slider ref="shadowXOffsetSlider"></ag-slider>\n                <ag-slider ref="shadowYOffsetSlider"></ag-slider>\n            </ag-group-component>\n        </div>',__decorate$Z([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("shadowGroup")],t.prototype,"shadowGroup",void 0),__decorate$Z([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("shadowColorPicker")],t.prototype,"shadowColorPicker",void 0),__decorate$Z([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("shadowBlurSlider")],t.prototype,"shadowBlurSlider",void 0),__decorate$Z([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("shadowXOffsetSlider")],t.prototype,"shadowXOffsetSlider",void 0),__decorate$Z([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("shadowYOffsetSlider")],t.prototype,"shadowYOffsetSlider",void 0),__decorate$Z([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("chartTranslationService")],t.prototype,"chartTranslationService",void 0),__decorate$Z([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"init",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component);
2function initFontPanelParams(e){var t=e.labelName,r=e.chartOptionsService,o=e.getSelectedSeries,i=e.seriesOptionLabelProperty,n=function(e){return i+"."+e},a=function(e){var t=n(e);return r.getSeriesOption(t,o())},s=function(e,t){var i=n(e);r.setSeriesOption(i,t,o())},l={family:a("fontFamily"),style:a("fontStyle"),weight:a("fontWeight"),size:a("fontSize"),color:a("color")},c={name:t,enabled:a("enabled")||!1,setEnabled:function(e){return s("enabled",e)},suppressEnabledCheckbox:!1,initialFont:l,setFont:function(e){e.family&&s("fontFamily",e.family),e.weight&&s("fontWeight",e.weight),e.style&&s("fontStyle",e.style),e.size&&s("fontSize",e.size),e.color&&s("color",e.color)}};return c}var __extends$1r=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$Y=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},MarkersPanel=function(e){function t(t,r){var o=e.call(this)||this;return o.chartOptionsService=t,o.getSelectedSeries=r,o}return __extends$1r(t,e),t.prototype.init=function(){this.setTemplate(t.TEMPLATE,{seriesMarkersGroup:{cssIdentifier:"charts-format-sub-level",direction:"vertical"}}),this.initMarkers()},t.prototype.initMarkers=function(){var e=this;this.seriesMarkerShapeSelect.addOptions([{value:"square",text:"Square"},{value:"circle",text:"Circle"},{value:"cross",text:"Cross"},{value:"diamond",text:"Diamond"},{value:"plus",text:"Plus"},{value:"triangle",text:"Triangle"},{value:"heart",text:"Heart"}]).setLabel(this.chartTranslationService.translate("shape")).setValue(this.getSeriesOption("marker.shape")).onValueChange(function(t){return e.setSeriesOption("marker.shape",t)});var t=this.chartOptionsService.getChartType(),r=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.includes(["scatter","bubble"],t);this.seriesMarkersGroup.setTitle(this.chartTranslationService.translate("markers")).hideEnabledCheckbox(r).setEnabled(this.getSeriesOption("marker.enabled")||!1).hideOpenCloseIcons(!0).onEnableChange(function(t){return e.setSeriesOption("marker.enabled",t)});var o=function(t,r,o,i){var n=e.getSeriesOption(t);r.setLabel(e.chartTranslationService.translate(o)).setMaxValue(getMaxValue(n,i)).setValue(""+n).setTextFieldWidth(45).onValueChange(function(r){return e.setSeriesOption(t,r)})};"bubble"===t?(o("marker.maxSize",this.seriesMarkerMinSizeSlider,"maxSize",60),o("marker.size",this.seriesMarkerSizeSlider,"minSize",60)):(this.seriesMarkerMinSizeSlider.setDisplayed(!1),o("marker.size",this.seriesMarkerSizeSlider,"size",60)),o("marker.strokeWidth",this.seriesMarkerStrokeWidthSlider,"strokeWidth",10)},t.prototype.getSeriesOption=function(e){return this.chartOptionsService.getSeriesOption(e,this.getSelectedSeries())},t.prototype.setSeriesOption=function(e,t){this.chartOptionsService.setSeriesOption(e,t,this.getSelectedSeries())},t.TEMPLATE='<div>\n            <ag-group-component ref="seriesMarkersGroup">\n                <ag-select ref="seriesMarkerShapeSelect"></ag-select>\n                <ag-slider ref="seriesMarkerMinSizeSlider"></ag-slider>\n                <ag-slider ref="seriesMarkerSizeSlider"></ag-slider>\n                <ag-slider ref="seriesMarkerStrokeWidthSlider"></ag-slider>\n            </ag-group-component>\n        </div>',__decorate$Y([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("seriesMarkersGroup")],t.prototype,"seriesMarkersGroup",void 0),__decorate$Y([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("seriesMarkerShapeSelect")],t.prototype,"seriesMarkerShapeSelect",void 0),__decorate$Y([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("seriesMarkerSizeSlider")],t.prototype,"seriesMarkerSizeSlider",void 0),__decorate$Y([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("seriesMarkerMinSizeSlider")],t.prototype,"seriesMarkerMinSizeSlider",void 0),__decorate$Y([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("seriesMarkerStrokeWidthSlider")],t.prototype,"seriesMarkerStrokeWidthSlider",void 0),__decorate$Y([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("chartTranslationService")],t.prototype,"chartTranslationService",void 0),__decorate$Y([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"init",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),__extends$1q=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$X=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},CalloutPanel=function(e){function t(t,r){var o=e.call(this)||this;return o.chartOptionsService=t,o.getSelectedSeries=r,o}return __extends$1q(t,e),t.prototype.init=function(){this.setTemplate(t.TEMPLATE,{calloutGroup:{cssIdentifier:"charts-format-sub-level",direction:"vertical"}}),this.initCalloutOptions()},t.prototype.initCalloutOptions=function(){var e=this;this.calloutGroup.setTitle(this.chartTranslationService.translate("callout")).setEnabled(!0).hideOpenCloseIcons(!0).hideEnabledCheckbox(!0);var t=function(t,r,o,i){var n=e.chartOptionsService.getSeriesOption(t,e.getSelectedSeries());
2r.setLabel(e.chartTranslationService.translate(o)).setMaxValue(getMaxValue(n,i)).setValue(""+n).setTextFieldWidth(45).onValueChange(function(r){return e.chartOptionsService.setSeriesOption(t,r,e.getSelectedSeries())})};t("calloutLine.length",this.calloutLengthSlider,"length",40),t("calloutLine.strokeWidth",this.calloutStrokeWidthSlider,"strokeWidth",10),t("calloutLabel.offset",this.labelOffsetSlider,"offset",30)},t.TEMPLATE='<div>\n            <ag-group-component ref="calloutGroup">\n                <ag-slider ref="calloutLengthSlider"></ag-slider>\n                <ag-slider ref="calloutStrokeWidthSlider"></ag-slider>\n                <ag-slider ref="labelOffsetSlider"></ag-slider>\n            </ag-group-component>\n        </div>',__decorate$X([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("calloutGroup")],t.prototype,"calloutGroup",void 0),__decorate$X([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("calloutLengthSlider")],t.prototype,"calloutLengthSlider",void 0),__decorate$X([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("calloutStrokeWidthSlider")],t.prototype,"calloutStrokeWidthSlider",void 0),__decorate$X([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("labelOffsetSlider")],t.prototype,"labelOffsetSlider",void 0),__decorate$X([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("chartTranslationService")],t.prototype,"chartTranslationService",void 0),__decorate$X([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"init",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),__extends$1p=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$W=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},SeriesPanel=function(e){function t(t){var r=t.chartController,o=t.chartOptionsService,i=t.seriesType,n=t.isExpandedOnInit,a=void 0!==n&&n,s=e.call(this)||this;return s.activePanels=[],s.widgetFuncs={lineWidth:function(){return s.initLineWidth()},strokeWidth:function(){return s.initStrokeWidth()},lineDash:function(){return s.initLineDash()},lineOpacity:function(){return s.initLineOpacity()},fillOpacity:function(){return s.initFillOpacity()},markers:function(){return s.initMarkers()},labels:function(){return s.initLabels()},shadow:function(){return s.initShadow()},tooltips:function(){return s.initTooltips()},bins:function(){return s.initBins()}},s.seriesWidgetMappings={area:["tooltips","lineWidth","lineDash","lineOpacity","fillOpacity","markers","labels","shadow"],bar:["tooltips","strokeWidth","lineDash","lineOpacity","fillOpacity","labels","shadow"],column:["tooltips","strokeWidth","lineDash","lineOpacity","fillOpacity","labels","shadow"],line:["tooltips","lineWidth","lineDash","lineOpacity","markers","labels"],histogram:["tooltips","bins","strokeWidth","lineDash","lineOpacity","fillOpacity","labels","shadow"],scatter:["tooltips","markers","labels"],pie:["tooltips","strokeWidth","lineOpacity","fillOpacity","labels","shadow"]},s.chartController=r,s.chartOptionsService=o,s.seriesType=i||s.getChartSeriesType(),s.isExpandedOnInit=a,s}return __extends$1p(t,e),t.prototype.init=function(){this.setTemplate(t.TEMPLATE,{seriesGroup:{cssIdentifier:"charts-format-top-level",direction:"vertical"}}),this.seriesGroup.setTitle(this.translate("series")).toggleGroupExpand(this.isExpandedOnInit).hideEnabledCheckbox(!0),this.addManagedListener(this.chartController,ChartController.EVENT_CHART_SERIES_CHART_TYPE_CHANGED,this.refreshWidgets.bind(this)),this.refreshWidgets()},t.prototype.refreshWidgets=function(){var e=this;this.destroyActivePanels(),this.chartController.getChartProxy().getChart().waitForUpdate().then(function(){e.chartController.isComboChart()&&(e.updateSeriesType(),e.initSeriesSelect()),e.seriesWidgetMappings[e.seriesType].forEach(function(t){return e.widgetFuncs[t]()})})},t.prototype.initSeriesSelect=function(){var e=this,t=this.seriesGroup.createManagedBean(new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgSelect);t.setLabel(this.translate("seriesType")).setLabelAlignment("left").setLabelWidth("flex").setInputWidth(100).addOptions(this.getSeriesSelectOptions()).setValue(""+this.seriesType).onValueChange(function(t){e.seriesType=t,e.refreshWidgets()}),this.seriesGroup.addItem(t),this.activePanels.push(t)},t.prototype.initTooltips=function(){var e=this,t=this.createBean(new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgToggleButton);t.setLabel(this.translate("tooltips")).setLabelAlignment("left").setLabelWidth("flex").setInputWidth(45).setValue(this.getSeriesOption("tooltip.enabled")||!1).onValueChange(function(t){return e.setSeriesOption("tooltip.enabled",t)}),this.addWidget(t)},t.prototype.initStrokeWidth=function(){var e=this,t=this.getSeriesOption("strokeWidth"),r=this.createBean(new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgSlider);r.setLabel(this.translate("strokeWidth")).setMaxValue(getMaxValue(t,10)).setTextFieldWidth(45).setValue(""+t).onValueChange(function(t){return e.setSeriesOption("strokeWidth",t)}),this.addWidget(r)},t.prototype.initLineWidth=function(){var e=this,t=this.getSeriesOption("strokeWidth"),r=this.createBean(new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgSlider);r.setLabel(this.translate("lineWidth")).setMaxValue(getMaxValue(t,10)).setTextFieldWidth(45).setValue(""+t).onValueChange(function(t){return e.setSeriesOption("strokeWidth",t)}),this.addWidget(r)},t.prototype.initLineDash=function(){var e=this,t=this.getSeriesOption("lineDash"),r=t?t[0]:0,o=this.createBean(new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgSlider);o.setLabel(this.translate("lineDash")).setMaxValue(getMaxValue(r,30)).setTextFieldWidth(45).setValue(""+r).onValueChange(function(t){return e.setSeriesOption("lineDash",[t])}),this.addWidget(o)},t.prototype.initLineOpacity=function(){var e=this,t=this.getSeriesOption("strokeOpacity"),r=this.createBean(new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgSlider);
2r.setLabel(this.translate("strokeOpacity")).setStep(.05).setMaxValue(getMaxValue(t,1)).setTextFieldWidth(45).setValue(""+t).onValueChange(function(t){return e.setSeriesOption("strokeOpacity",t)}),this.addWidget(r)},t.prototype.initFillOpacity=function(){var e=this,t=this.getSeriesOption("fillOpacity"),r=this.createBean(new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgSlider);r.setLabel(this.translate("fillOpacity")).setStep(.05).setMaxValue(getMaxValue(t,1)).setTextFieldWidth(45).setValue(""+t).onValueChange(function(t){return e.setSeriesOption("fillOpacity",t)}),this.addWidget(r)},t.prototype.initLabels=function(){var e=this,t="pie"===this.seriesType?"calloutLabel":"label",r=initFontPanelParams({labelName:"pie"===this.seriesType?this.chartTranslationService.translate("calloutLabels"):this.chartTranslationService.translate("labels"),chartOptionsService:this.chartOptionsService,getSelectedSeries:function(){return e.seriesType},seriesOptionLabelProperty:t}),o=this.createBean(new FontPanel(r));if("pie"===this.seriesType){var i=this.createBean(new CalloutPanel(this.chartOptionsService,function(){return e.seriesType}));o.addCompToPanel(i),this.activePanels.push(i)}if(this.addWidget(o),"pie"===this.seriesType){var n=initFontPanelParams({labelName:this.chartTranslationService.translate("sectorLabels"),chartOptionsService:this.chartOptionsService,getSelectedSeries:function(){return e.seriesType},seriesOptionLabelProperty:"sectorLabel"}),a=this.createBean(new FontPanel(n)),s=this.getSectorLabelPositionRatio();a.addCompToPanel(s),this.addWidget(a)}},t.prototype.getSectorLabelPositionRatio=function(){var e=this,t="sectorLabel.positionRatio",r=this.chartOptionsService.getSeriesOption(t,this.seriesType);return this.createBean(new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgSlider).setLabel(this.translate("positionRatio")).setStep(.05).setMaxValue(getMaxValue(r,1)).setTextFieldWidth(45).setValue(""+r).onValueChange(function(r){return e.chartOptionsService.setSeriesOption(t,r,e.seriesType)})},t.prototype.initShadow=function(){var e=this,t=this.createBean(new ShadowPanel(this.chartOptionsService,function(){return e.seriesType}));this.addWidget(t)},t.prototype.initMarkers=function(){var e=this,t=this.createBean(new MarkersPanel(this.chartOptionsService,function(){return e.seriesType}));this.addWidget(t)},t.prototype.initBins=function(){var e=this,t=this.getSeriesOption("bins").length,r=this.createBean(new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgSlider);r.setLabel(this.translate("histogramBinCount")).setMinValue(0).setMaxValue(getMaxValue(t,20)).setTextFieldWidth(45).setValue(""+t).onValueChange(function(t){return e.setSeriesOption("binCount",t)}),this.addWidget(r)},t.prototype.addWidget=function(e){this.seriesGroup.addItem(e),this.activePanels.push(e)},t.prototype.getSeriesOption=function(e){return this.chartOptionsService.getSeriesOption(e,this.seriesType)},t.prototype.setSeriesOption=function(e,t){this.chartOptionsService.setSeriesOption(e,t,this.seriesType)},t.prototype.getChartSeriesType=function(){if(0===this.chartController.getSeriesChartTypes().length)return"column";var e=this.chartController.getSeriesChartTypes()[0].chartType;return"columnLineCombo"===e?"column":"areaColumnCombo"===e?"area":getSeriesType(e)},t.prototype.getSeriesSelectOptions=function(){var e=this;this.seriesSelectOptions||(this.seriesSelectOptions=new Map([["area",{value:"area",text:this.translate("area","Area")}],["bar",{value:"bar",text:this.translate("bar","Bar")}],["column",{value:"column",text:this.translate("column","Column")}],["line",{value:"line",text:this.translate("line","Line")}],["scatter",{value:"scatter",text:this.translate("scatter","Scatter")}],["histogram",{value:"histogram",text:this.translate("histogram","Histogram")}],["pie",{value:"pie",text:this.translate("pie","Pie")}]]));var t=new Set;return this.chartController.getActiveSeriesChartTypes().forEach(function(r){var o=getSeriesType(r.chartType);t.add(e.seriesSelectOptions.get(o))}),Array.from(t)},t.prototype.updateSeriesType=function(){var e=this.chartController.getActiveSeriesChartTypes().map(function(e){return getSeriesType(e.chartType)});!e.includes(this.seriesType)&&e.length>0&&(this.seriesType=e[0])},t.prototype.translate=function(e,t){return this.chartTranslationService.translate(e,t)},t.prototype.destroyActivePanels=function(){var e=this;
2this.activePanels.forEach(function(t){ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.removeFromParent(t.getGui()),e.destroyBean(t)})},t.prototype.destroy=function(){this.destroyActivePanels(),e.prototype.destroy.call(this)},t.TEMPLATE='<div>\n            <ag-group-component ref="seriesGroup">\n            </ag-group-component>\n        </div>',__decorate$W([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("seriesGroup")],t.prototype,"seriesGroup",void 0),__decorate$W([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("chartTranslationService")],t.prototype,"chartTranslationService",void 0),__decorate$W([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"init",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),__extends$1o=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$V=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a};function getMaxValue(e,t){return Math.max(e,t)}var DefaultFormatPanelDef={groups:[{type:"chart"},{type:"legend"},{type:"series"},{type:"axis"},{type:"navigator"}]},FormatPanel=function(e){function t(r,o){var i=e.call(this,t.TEMPLATE)||this;return i.chartController=r,i.chartOptionsService=o,i.panels=[],i.isGroupPanelShownInSeries=function(e,t){return!!["chart","legend","series"].includes(e)||!(!["axis","navigator"].includes(e)||!["bar","column","line","area","scatter","histogram","cartesian"].includes(t))},i}return __extends$1o(t,e),t.prototype.init=function(){this.createPanels(),this.addManagedListener(this.chartController,ChartController.EVENT_CHART_UPDATED,this.createPanels.bind(this))},t.prototype.createPanels=function(){var e,t=this,r=this.chartController.getChartType(),o=this.chartController.isGrouping(),i=getSeriesType(r);r===this.chartType&&o===this.isGrouping||(this.destroyPanels(),null===(e=this.getFormatPanelDef().groups)||void 0===e||e.forEach(function(e){var r=e.type;if(t.isGroupPanelShownInSeries(r,i)){var o={chartController:t.chartController,chartOptionsService:t.chartOptionsService,isExpandedOnInit:e.isOpen,seriesType:i};"chart"===r?t.addComponent(new ChartPanel(o)):"legend"===r?t.addComponent(new LegendPanel(o)):"axis"===r?t.addComponent(new AxisPanel(o)):"series"===r?t.addComponent(new SeriesPanel(o)):"navigator"===r?t.addComponent(new NavigatorPanel(o)):console.warn("AG Grid: invalid charts format panel group name supplied: '"+e.type+"'")}}),this.chartType=r,this.isGrouping=o)},t.prototype.getFormatPanelDef=function(){var e;return(null===(e=this.gridOptionsService.get("chartToolPanelsDef"))||void 0===e?void 0:e.formatPanel)||DefaultFormatPanelDef},t.prototype.addComponent=function(e){this.createBean(e),this.panels.push(e),e.addCssClass("ag-chart-format-section"),this.getGui().appendChild(e.getGui())},t.prototype.destroyPanels=function(){var e=this;this.panels.forEach(function(t){ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.removeFromParent(t.getGui()),e.destroyBean(t)})},t.prototype.destroy=function(){this.destroyPanels(),e.prototype.destroy.call(this)},t.TEMPLATE='<div class="ag-chart-format-wrapper"></div>',__decorate$V([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"init",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),__extends$1n=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$U=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},MiniChart=function(e){function t(t,r){var o=e.call(this)||this;o.size=58,o.padding=5,o.root=new Group;var i=new Scene({document:window.document,width:o.size,height:o.size});return i.canvas.element.classList.add("ag-chart-mini-thumbnail-canvas"),i.root=o.root,i.container=t,o.scene=i,o.tooltipName=r,o}return __extends$1n(t,e),t.prototype.init=function(){this.scene.canvas.element.title=this.chartTranslationService.translate(this.tooltipName),this.scene.render()},__decorate$U([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("chartTranslationService")],t.prototype,"chartTranslationService",void 0),__decorate$U([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"init",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),__extends$1m=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$T=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},MiniChartWithAxes=function(e){function t(t,r){var o=e.call(this,t,r)||this;return o.stroke="gray",o.axisOvershoot=3,o}return __extends$1m(t,e),t.prototype.addAxes=function(){var e=this.size,t=this.padding,r=new Line;r.x1=t,r.y1=t,r.x2=t,r.y2=e-t+this.axisOvershoot,r.stroke=this.stroke;var o=new Line;o.x1=t-this.axisOvershoot+1,o.y1=e-t,o.x2=e-t+1,o.y2=e-t,o.stroke=this.stroke;var i=this.root;i.append(r),i.append(o)},__decorate$T([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"addAxes",null),t}(MiniChart);function createColumnRects(e){var t=e.stacked,r=e.size,o=e.padding,i=e.xScalePadding,n=e.xScaleDomain,a=e.
2yScaleDomain,s=new BandScale$5;s.domain=n,s.range=[o,r-o],s.paddingInner=i,s.paddingOuter=i;var l=new LinearScale$1;l.domain=a,l.range=[r-o,o];var c=function(e,t,r){return e.map(function(e,o){var i=r.convert(e),n=new Rect;return n.x=t.convert(o),n.y=i,n.width=t.bandwidth,n.height=r.convert(0)-i,n.strokeWidth=1,n.crisp=!0,n})};return t?e.data.map(function(e){return c(e,s,l)}):c(e.data,s,l)}function createLinePaths(e,t,r,o){var i=new LinearScale$1;i.domain=[0,4],i.range=[o,r-o];var n=new LinearScale$1;n.domain=[0,10],n.range=[r-o,o];var a=t.map(function(e){var t=new Path;return t.strokeWidth=3,t.lineCap="round",t.fill=void 0,e.forEach(function(e,r){t.path[r>0?"lineTo":"moveTo"](i.convert(r),n.convert(e))}),t}),s=new Group;return s.setClipRectInGroupCoordinateSpace(new BBox(o,o,r-2*o,r-2*o)),s.append(a),e.append(s),a}var __extends$1l=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),MiniColumn=function(e){function t(t,r,o){var i=e.call(this,t,"groupedColumnTooltip")||this;i.columnData=[2,3,4];var n=i,a=n.root,s=n.columnData,l=n.size,c=n.padding;return i.columns=createColumnRects({stacked:!1,root:a,data:s,size:l,padding:c,xScaleDomain:[0,1,2],yScaleDomain:[0,4],xScalePadding:.3}),a.append(i.columns),i.updateColors(r,o),i}return __extends$1l(t,e),t.prototype.updateColors=function(e,t){this.columns.forEach(function(r,o){r.fill=e[o],r.stroke=t[o]})},t.chartType="groupedColumn",t}(MiniChartWithAxes),__extends$1k=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),MiniStackedColumn=function(e){function t(r,o,i,n,a,s){void 0===n&&(n=t.data),void 0===a&&(a=[0,16]),void 0===s&&(s="stackedColumnTooltip");var l=e.call(this,r,s)||this,c=l,u=c.root,d=c.size,p=c.padding;return l.stackedColumns=createColumnRects({stacked:!0,root:u,data:n,size:d,padding:p,xScaleDomain:[0,1,2],yScaleDomain:a,xScalePadding:.3}),u.append([].concat.apply([],l.stackedColumns)),l.updateColors(o,i),l}return __extends$1k(t,e),t.prototype.updateColors=function(e,t){this.stackedColumns.forEach(function(r,o){return r.forEach(function(r){r.fill=e[o],r.stroke=t[o]})})},t.chartType="stackedColumn",t.data=[[8,12,16],[6,9,12],[2,3,4]],t}(MiniChartWithAxes),__extends$1j=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),MiniNormalizedColumn=function(e){function t(r,o,i){return e.call(this,r,o,i,t.data,[0,10],"normalizedColumnTooltip")||this}return __extends$1j(t,e),t.chartType="normalizedColumn",t.data=[[10,10,10],[6,7,8],[2,4,6]],t}(MiniStackedColumn),__extends$1i=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),MiniBar=function(e){function t(t,r,o){var i=e.call(this,t,"groupedBarTooltip")||this,n=i.padding,a=i.size,s=new BandScale$5;s.domain=[0,1,2],s.range=[n,a-n],s.paddingInner=.3,s.paddingOuter=.3;var l=new LinearScale$1;l.domain=[0,4],l.range=[a-n,n];var c=l.convert(0),u=s.bandwidth;return i.bars=[2,3,4].map(function(e,t){var r=new Rect;return r.x=n,r.y=s.convert(t),r.width=c-l.convert(e),r.height=u,r.strokeWidth=1,r.crisp=!0,r}),i.updateColors(r,o),i.root.append(i.bars),i}return __extends$1i(t,e),t.prototype.updateColors=function(e,t){this.bars.forEac
2h(function(r,o){r.fill=e[o],r.stroke=t[o]})},t.chartType="groupedBar",t}(MiniChartWithAxes),__extends$1h=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),MiniStackedBar=function(e){function t(r,o,i,n,a,s){void 0===n&&(n=t.data),void 0===a&&(a=[0,16]),void 0===s&&(s="stackedBarTooltip");var l=e.call(this,r,s)||this,c=l.size,u=l.padding,d=new BandScale$5;d.domain=[0,1,2],d.range=[u,c-u],d.paddingInner=.3,d.paddingOuter=.3;var p=new LinearScale$1;p.domain=a,p.range=[c-u,u];var h=p.convert(0),_=d.bandwidth;return l.bars=n.map(function(e){return e.map(function(e,t){var r=new Rect;return r.x=u,r.y=d.convert(t),r.width=h-p.convert(e),r.height=_,r.strokeWidth=1,r.crisp=!0,r})}),l.updateColors(o,i),l.root.append([].concat.apply([],l.bars)),l}return __extends$1h(t,e),t.prototype.updateColors=function(e,t){this.bars.forEach(function(r,o){return r.forEach(function(r){r.fill=e[o],r.stroke=t[o]})})},t.chartType="stackedBar",t.data=[[8,12,16],[6,9,12],[2,3,4]],t}(MiniChartWithAxes),__extends$1g=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),MiniNormalizedBar=function(e){function t(r,o,i){return e.call(this,r,o,i,t.data,[0,10],"normalizedBarTooltip")||this}return __extends$1g(t,e),t.chartType="normalizedBar",t.data=[[10,10,10],[6,7,8],[2,4,6]],t}(MiniStackedBar),__extends$1f=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__read$j=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},toRadians=toRadians$1,MiniDoughnut=function(e){function t(t,r,o,i,n){void 0===i&&(i=.6),void 0===n&&(n="doughnutTooltip");var a=e.call(this,t,n)||this,s=(a.size-2*a.padding)/2,l=s+a.padding,c=[[toRadians(-90),toRadians(30)],[toRadians(30),toRadians(120)],[toRadians(120),toRadians(180)],[toRadians(180),toRadians(210)],[toRadians(210),toRadians(240)],[toRadians(240),toRadians(270)]];return a.sectors=c.map(function(e){var t=__read$j(e,2),r=t[0],o=t[1],n=new Sector;return n.centerX=l,n.centerY=l,n.innerRadius=s*i,n.outerRadius=s,n.startAngle=r,n.endAngle=o,n.stroke=void 0,n.strokeWidth=1,n}),a.updateColors(r,o),a.root.append(a.sectors),a}return __extends$1f(t,e),t.prototype.updateColors=function(e,t){this.sectors.forEach(function(r,o){r.fill=e[o%e.length],r.stroke=t[o%t.length]})},t.chartType="doughnut",t}(MiniChart),__extends$1e=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),MiniPie=function(e){function t(t,r,o){return e.call(this,t,r,o,0,"pieTooltip")||this}return __extends$1e(t,e),t.chartType="pie",t}(MiniDoughnut),__extends$1d=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),MiniLine=function(e){function t(t,r,o){var i=e.call(this,t,"lineTooltip")||this;return i.data=[[9,7,8,5,6],[5,6,3,4,1],[1,3,4,8,7]],i.lines=createLinePaths(i.root,i.data,i.size,i.padding),i.updateColors(r,o),i}return __extends$1d(t,e),t.prototype.updateColors=function(e,t){this.lines.forEac
2h(function(t,r){t.stroke=e[r]})},t.chartType="line",t}(MiniChartWithAxes),__extends$1c=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__read$i=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},MiniScatter=function(e){function t(t,r,o){var i=e.call(this,t,"scatterTooltip")||this,n=i.size,a=i.padding,s=new LinearScale$1;s.domain=[-.5,4],s.range=[2*a,n-a];var l=new LinearScale$1;l.domain=[-.5,3.5],l.range=[n-a,a];var c=[];[[[.3,3],[1.1,.9],[2,.4],[3.4,2.4]],[[0,.3],[1,2],[2.4,1.4],[3,0]]].forEach(function(e){e.forEach(function(e){var t=__read$i(e,2),r=t[0],o=t[1],i=new Arc;i.strokeWidth=1,i.centerX=s.convert(r),i.centerY=l.convert(o),i.radius=2.5,c.push(i)})}),i.points=c,i.updateColors(r,o);var u=new Group;return u.setClipRectInGroupCoordinateSpace(new BBox(a,a,n-2*a,n-2*a)),u.append(i.points),i.root.append(u),i}return __extends$1c(t,e),t.prototype.updateColors=function(e,t){this.points.forEach(function(r,o){r.stroke=t[o%t.length],r.fill=e[o%e.length]})},t.chartType="scatter",t}(MiniChartWithAxes),__extends$1b=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__read$h=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},MiniBubble=function(e){function t(t,r,o){var i=e.call(this,t,"bubbleTooltip")||this,n=i.size,a=i.padding,s=new LinearScale$1;s.domain=[0,1],s.range=[2*a,n-a];var l=new LinearScale$1;l.domain=[0,1],l.range=[n-a,a];var c=[];[[[.1,.3,5],[.5,.4,7],[.2,.8,7]],[[.8,.7,5],[.7,.3,9]]].forEach(function(e){e.forEach(function(e){var t=__read$h(e,3),r=t[0],o=t[1],i=t[2],n=new Arc;n.strokeWidth=1,n.centerX=s.convert(r),n.centerY=l.convert(o),n.radius=i,n.fillOpacity=.7,c.push(n)})}),i.points=c,i.updateColors(r,o);var u=new Group;return u.setClipRectInGroupCoordinateSpace(new BBox(a,a,n-2*a,n-2*a)),u.append(i.points),i.root.append(u),i}return __extends$1b(t,e),t.prototype.updateColors=function(e,t){this.points.forEach(function(r,o){r.stroke=t[o%t.length],r.fill=e[o%e.length]})},t.chartType="bubble",t}(MiniChartWithAxes),__extends$1a=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),MiniArea=function(e){function t(r,o,i,n){void 0===n&&(n=t.data);var a=e.call(this,r,"groupedAreaTooltip")||this,s=a.size,l=a.padding,c=new BandScale$5;c.domain=[0,1,2],c.paddingInner=1,c.paddingOuter=0,c.range=[l+.5,s-l-.5];var u=new LinearScale$1;u.domain=[0,6],u.range=[s-l+.5,l];var d=2*n.length-1,p=[],h=u.convert(0);return n.forEach(function(e,t){var r=c.convert(t);e.forEach(function(e,o){var i=u.convert(e),n=p[o]||(p[o]=[]);n[t]={x:r,y:i},n[d-t]={x:r,y:h}})}),a.areas=p.reverse().map(function(e){var t=new Path;t.strokeWidth=1,t.fillOpacity=.7;var r=t.path;return r.clear(),e.forEach(function(e,t){return r[t>0?"lineTo":"moveTo"](e.x,e.y)}),r.closePath(),t}),a.updateColors(o,i),a.root.append(a.areas),a}return __extends$1a(t,e),t.prototype.updateColors=function(e,t){this.areas.forEach(function(r,o){r.fill=e[o],r.stroke=t[o]})},t.chartType="area",t.data=[[1,3,5],[2,6,4],[5,3,1]],t}(MiniChartWithAxes),__extends$19=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),MiniStackedArea=function(e){function t(r,o,i,n,a){void 0===n&&(n=t.data),void 0===a&&(a="stackedAreaTooltip");var s=e.call(this,r,a)||this,l=s.size,c=s.padding,u=new BandScale$5;u.domain=[0,1,2],u.paddingInner=1,u.paddingOuter=0,u.range=[c+.5,l-c-.5];var d=new LinearScale$1;d.domain=[0,16],d.range=[l-c+.5,c+.5];var p=2*n.length-1,h=[];
2return n.forEach(function(e,t){var r=u.convert(t),o=0;e.forEach(function(e,i){var n=d.convert(o+e),a=h[i]||(h[i]=[]);a[t]={x:r,y:n},a[p-t]={x:r,y:d.convert(o)},o+=e})}),s.areas=h.map(function(e){var t=new Path;t.strokeWidth=1;var r=t.path;return r.clear(),e.forEach(function(e,t){return r[t>0?"lineTo":"moveTo"](e.x,e.y)}),r.closePath(),t}),s.updateColors(o,i),s.root.append(s.areas),s}return __extends$19(t,e),t.prototype.updateColors=function(e,t){this.areas.forEach(function(r,o){r.fill=e[o],r.stroke=t[o]})},t.chartType="stackedArea",t.data=[[2,3,2],[3,6,5],[6,2,2]],t}(MiniChartWithAxes),__extends$18=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),MiniNormalizedArea=function(e){function t(r,o,i,n){return void 0===n&&(n=t.data),e.call(this,r,o,i,n,"normalizedAreaTooltip")||this}return __extends$18(t,e),t.chartType="normalizedArea",t.data=MiniStackedArea.data.map(function(e){var t=e.reduce(function(e,t){return e+t},0);return e.map(function(e){return e/t*16})}),t}(MiniStackedArea),__extends$17=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__read$g=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},MiniHistogram=function(e){function t(t,r,o){var i=e.call(this,t,"histogramTooltip")||this,n=i.padding,a=i.size,s=[2,5,11,13,10,6,1],l=new LinearScale$1;l.domain=[0,s.length],l.range=[n,a-n];var c=new LinearScale$1;c.domain=[0,s.reduce(function(e,t){return Math.max(e,t)},0)],c.range=[a-n,n];var u=c.convert(0);return i.bars=s.map(function(e,t){var r=c.convert(e),o=l.convert(t),i=l.convert(t+1),n=new Rect;return n.x=o,n.y=r,n.width=i-o,n.height=u-r,n.strokeWidth=1,n.crisp=!0,n}),i.updateColors(r,o),i.root.append(i.bars),i}return __extends$17(t,e),t.prototype.updateColors=function(e,t){var r=__read$g(e,1)[0],o=__read$g(t,1)[0];this.bars.forEach(function(e){e.fill=r,e.stroke=o})},t.chartType="histogram",t}(MiniChartWithAxes),__extends$16=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),MiniColumnLineCombo=function(e){function t(t,r,o){var i=e.call(this,t,"columnLineComboTooltip")||this;i.columnData=[3,4],i.lineData=[[5,4,6,5,4]];var n=i,a=n.root,s=n.columnData,l=n.lineData,c=n.size,u=n.padding;return i.columns=createColumnRects({stacked:!1,root:a,data:s,size:c,padding:u,xScaleDomain:[0,1],yScaleDomain:[0,4],xScalePadding:.5}),a.append(i.columns),i.lines=createLinePaths(a,l,c,u),i.updateColors(r,o),i}return __extends$16(t,e),t.prototype.updateColors=function(e,t){this.columns.forEach(function(r,o){r.fill=e[o],r.stroke=t[o]}),this.lines.forEach(function(t,r){t.stroke=e[r+2]})},t.chartType="columnLineCombo",t}(MiniChartWithAxes),__extends$15=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),MiniAreaColumnCombo=function(e){function t(t,r,o){var i=e.call(this,t,"areaColumnComboTooltip")||this;i.columnData=[3,4.5],i.areaData=[[5,4,6,5,4]];
2var n=i,a=n.root,s=n.columnData,l=n.areaData,c=n.size,u=n.padding;i.columns=createColumnRects({stacked:!1,root:a,data:s,size:c,padding:u,xScaleDomain:[0,1],yScaleDomain:[0,6],xScalePadding:.5});var d=new BandScale$5;d.range=[u,c-u],d.domain=[0,1,2,3,4],d.paddingInner=1,d.paddingOuter=0;var p=new LinearScale$1;p.range=[c-u,u],p.domain=[0,6];var h=[],_=p.convert(0),f=d.convert(0);return l.forEach(function(e,t){var r=h[t]||(h[t]=[]);e.forEach(function(e,t){var o=e,i=t,n=d.convert(i),a=p.convert(o);r[t]={x:n,y:a}});var o=d.convert(e.length-1);h[t].push({x:o,y:_},{x:f,y:_})}),i.areas=h.map(function(e){var t=new Path;t.strokeWidth=1,t.fillOpacity=.8;var r=t.path;return e.forEach(function(e,t){return r[t>0?"lineTo":"moveTo"](e.x,e.y)}),t}),a.append(i.areas),a.append([].concat.apply([],i.columns)),i.updateColors(r,o),i}return __extends$15(t,e),t.prototype.updateColors=function(e,t){this.areas.forEach(function(r,o){r.fill=e[o],r.stroke=t[o]}),this.columns.forEach(function(r,o){r.fill=e[o+1],r.stroke=t[o+1]})},t.chartType="areaColumnCombo",t}(MiniChartWithAxes),__extends$14=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),MiniCustomCombo=function(e){function t(t,r,o){var i=e.call(this,t,"customComboTooltip")||this;i.columnData=[3,4],i.lineData=[[5,4,6,5,4]];var n=i,a=n.root,s=n.columnData,l=n.lineData,c=n.size,u=n.padding;i.columns=createColumnRects({stacked:!1,root:a,data:s,size:c,padding:u,xScaleDomain:[0,1],yScaleDomain:[0,4],xScalePadding:.5}),a.append(i.columns),i.lines=createLinePaths(a,l,c,u);var d="grey",p=new Line;p.x1=u,p.y1=u,p.x2=u,p.y2=c-u+3,p.stroke=d;var h=new Line;h.x1=u-3+1,h.y1=c-u,h.x2=c-u+1,h.y2=c-u,h.stroke=d;var _=new Path;return i.buildPenIconPath(_),_.fill="whitesmoke",_.stroke="darkslategrey",_.strokeWidth=1,a.append([h,p,_]),i.updateColors(r,o),i}return __extends$14(t,e),t.prototype.updateColors=function(e,t){this.columns.forEach(function(r,o){r.fill=e[o],r.stroke=t[o]}),this.lines.forEach(function(t,r){t.stroke=e[r+2]})},t.prototype.buildPenIconPath=function(e){var t=e.path;t.moveTo(25.76,43.46),t.lineTo(31.27,48.53),t.moveTo(49.86,22),t.lineTo(49.86,22),t.cubicCurveTo(49.01994659053345,21.317514933510974,47.89593834348529,21.09645997825817,46.86,21.41),t.lineTo(46.86,21.41),t.cubicCurveTo(45.55460035985361,21.77260167850787,44.38777081121966,22.517979360321792,43.51,23.55),t.lineTo(25.51,43.8),t.lineTo(25.43,43.89),t.lineTo(23.01,51.89),t.lineTo(22.83,52.46),t.lineTo(31.02,48.86),t.lineTo(49.02,28.52),t.lineTo(49.02,28.52),t.cubicCurveTo(49.940716461596224,27.521914221246085,50.54302631059587,26.2720342455763,50.75,24.93),t.lineTo(50.75,24.93),t.cubicCurveTo(50.95363374988308,23.866379846512814,50.62080640232334,22.77066734274871,49.86,22),t.closePath(),t.moveTo(41.76,25.5),t.lineTo(47.34,30.5),t.moveTo(40.74,26.65),t.lineTo(46.25,31.71)},t.chartType="customCombo",t}(MiniChart),__extends$13=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__assign$j=function(){return __assign$j=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$j.apply(this,arguments)},__decorate$S=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},miniChartMapping={columnGroup:{column:MiniColumn,stackedColumn:MiniStackedColumn,normalizedColumn:MiniNormalizedColumn},barGroup:{bar:MiniBar,stackedBar:MiniStackedBar,normalizedBar:MiniNormalizedBar},pieGroup:{pie:MiniPie,doughnut:MiniDoughnut},lineGroup:{line:MiniLine},scatterGroup:{scatter:MiniScatter,bubble:MiniBubble},areaGroup:{area:MiniArea,stackedArea:MiniStackedArea,normalizedArea:MiniNormalizedArea},histogramGroup:{histogram:MiniHistogram},combinationGroup:{columnLineCombo:MiniColumnLineCombo,areaColumnCombo:MiniAreaColumnCombo,customCombo:MiniCustomCombo}},MiniChartsContainer=function(e){function t(r,o,i,n){void 0===n&&(n=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.DEFAULT_CHART_GROUPS);var a=e.call(this,t.TEMPLATE)||this;return a.wrappers={},a.chartController=r,a.fills=o,a.strokes=i,a.chartGroups=__assign$j({},n),a}return __extends$13(t,e),t.prototype.init=function(){var e=this;!this.chartController.customComboExists()&&this.chartGroups.combinationGroup&&(this.chartGroups.combinationGroup=this.chartGroups.combinationGroup.filter(function(e){return"customCombo"!==e}));var t=this.getGui();
2Object.keys(this.chartGroups).forEach(function(r){var o=e.chartGroups[r],i=e.createBean(new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgGroupComponent({title:e.chartTranslationService.translate(r),suppressEnabledCheckbox:!0,enabled:!0,suppressOpenCloseIcons:!0,cssIdentifier:"charts-settings",direction:"horizontal"}));o.forEach(function(t){var o,n=null===(o=miniChartMapping[r])||void 0===o?void 0:o[t];if(n){var a=document.createElement("div");a.classList.add("ag-chart-mini-thumbnail");var s=n.chartType;e.addManagedListener(a,"click",function(){e.chartController.setChartType(s),e.updateSelectedMiniChart()}),e.wrappers[s]=a,e.createBean(new n(a,e.fills,e.strokes)),i.addItem(a)}else miniChartMapping[r]?ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.doOnce(function(){return console.warn("AG Grid - invalid chartGroupsDef config '"+r+"."+t+"'")},"invalid_chartGroupsDef"+t+"_"+r):ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.doOnce(function(){return console.warn("AG Grid - invalid chartGroupsDef config '"+r+"'")},"invalid_chartGroupsDef"+r)}),t.appendChild(i.getGui())}),this.updateSelectedMiniChart()},t.prototype.updateSelectedMiniChart=function(){var e=this.chartController.getChartType();for(var t in this.wrappers){var r=t===e;this.wrappers[t].classList.toggle("ag-selected",r)}},t.TEMPLATE='<div class="ag-chart-settings-mini-wrapper"></div>',__decorate$S([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("chartTranslationService")],t.prototype,"chartTranslationService",void 0),__decorate$S([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"init",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),__extends$12=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$R=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},ChartSettingsPanel=function(e){function t(r){var o=e.call(this,t.TEMPLATE)||this;return o.miniCharts=[],o.cardItems=[],o.activePaletteIndex=0,o.palettes=[],o.themes=[],o.chartController=r,o}return __extends$12(t,e),t.prototype.postConstruct=function(){var e=this;this.resetPalettes(),this.ePrevBtn.insertAdjacentElement("afterbegin",ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.createIconNoSpan("previous",this.gridOptionsService)),this.eNextBtn.insertAdjacentElement("afterbegin",ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.createIconNoSpan("next",this.gridOptionsService)),this.addManagedListener(this.ePrevBtn,"click",function(){return e.setActivePalette(e.getPrev(),"left")}),this.addManagedListener(this.eNextBtn,"click",function(){return e.setActivePalette(e.getNext(),"right")}),this.addManagedListener(this.chartController,ChartController.EVENT_CHART_TYPE_CHANGED,function(){return e.resetPalettes(!0)}),this.scrollSelectedIntoView()},t.prototype.scrollSelectedIntoView=function(){var e=this;setTimeout(function(){var t=e.miniCharts.find(function(e){return!e.getGui().classList.contains("ag-hidden")}).getGui().querySelector(".ag-selected");t&&t.scrollIntoView({block:"nearest"})},250)},t.prototype.resetPalettes=function(e){var t,r,o=this,i=this.chartController.getPalettes(),n=null===(r=null===(t=this.gridOptionsService.get("chartToolPanelsDef"))||void 0===t?void 0:t.settingsPanel)||void 0===r?void 0:r.chartGroupsDef;ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.shallowCompare(i,this.palettes)&&!e||this.isAnimating||(this.palettes=i,this.themes=this.chartController.getThemes(),this.activePaletteIndex=this.themes.findIndex(function(e){return e===o.chartController.getChartThemeName()}),this.cardItems=[],ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.clearElement(this.eCardSelector),this.destroyMiniCharts(),this.palettes.forEac
2h(function(e,t){var r=o.activePaletteIndex===t,i=e.fills,a=e.strokes,s=o.createBean(new MiniChartsContainer(o.chartController,i,a,n));o.miniCharts.push(s),o.eMiniChartsContainer.appendChild(s.getGui()),o.addCardLink(t),r?s.updateSelectedMiniChart():s.setDisplayed(!1)}),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setDisplayed(this.eNavBar,this.palettes.length>1),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.radioCssClass(this.cardItems[this.activePaletteIndex],"ag-selected","ag-not-selected"))},t.prototype.addCardLink=function(e){var t=this,r=document.createElement("div");r.classList.add("ag-chart-settings-card-item"),this.addManagedListener(r,"click",function(){t.setActivePalette(e,e<t.activePaletteIndex?"left":"right")}),this.eCardSelector.appendChild(r),this.cardItems.push(r)},t.prototype.getPrev=function(){var e=this.activePaletteIndex-1;return e<0&&(e=this.palettes.length-1),e},t.prototype.getNext=function(){var e=this.activePaletteIndex+1;return e>=this.palettes.length&&(e=0),e},t.prototype.setActivePalette=function(e,t){var r=this;if(!this.isAnimating&&this.activePaletteIndex!==e){ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.radioCssClass(this.cardItems[e],"ag-selected","ag-not-selected");var o=this.miniCharts[this.activePaletteIndex],i=o.getGui(),n=this.miniCharts[e],a=n.getGui();o.updateSelectedMiniChart(),n.updateSelectedMiniChart();var s="left"===t?-1:1,l=a.style.left=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.getAbsoluteWidth(this.getGui())*s+"px";this.activePaletteIndex=e,this.isAnimating=!0;var c="ag-animating";n.setDisplayed(!0),o.addCssClass(c),n.addCssClass(c),this.chartController.setChartThemeName(this.themes[e]),window.setTimeout(function(){i.style.left=-parseFloat(l)+"px",a.style.left="0px"},0),window.setTimeout(function(){r.isAnimating=!1,o.removeCssClass(c),n.removeCssClass(c),o.setDisplayed(!1)},300)}},t.prototype.destroyMiniCharts=function(){ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.clearElement(this.eMiniChartsContainer),this.miniCharts=this.destroyBeans(this.miniCharts)},t.prototype.destroy=function(){this.destroyMiniCharts(),e.prototype.destroy.call(this)},t.TEMPLATE='<div class="ag-chart-settings-wrapper">\n            <div ref="eMiniChartsContainer" class="ag-chart-settings-mini-charts-container ag-scrollable-container"></div>\n            <div ref="eNavBar" class="ag-chart-settings-nav-bar">\n                <div ref="ePrevBtn" class="ag-chart-settings-prev">\n                    <button type="button" class="ag-chart-settings-prev-button"></button>\n                </div>\n                <div ref="eCardSelector" class="ag-chart-settings-card-selector"></div>\n                <div ref="eNextBtn" class="ag-chart-settings-next">\n                    <button type="button" class="ag-chart-settings-next-button"></button>\n                </div>\n            </div>\n        </div>',__decorate$R([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("resizeObserverService")],t.prototype,"resizeObserverService",void 0),__decorate$R([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eMiniChartsContainer")],t.prototype,"eMiniChartsContainer",void 0),__decorate$R([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eNavBar")],t.prototype,"eNavBar",void 0),__decorate$R([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eCardSelector")],t.prototype,"eCardSelector",void 0),__decorate$R([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("ePrevBtn")],t.prototype,"ePrevBtn",void 0),__decorate$R([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eNextBtn")],t.prototype,"eNextBtn",void 0),__decorate$R([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"postConstruct",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),__extends$11=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$Q=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},TabbedChartMenu=function(e){function t(t){var r=e.call(this)||this;r.tabs=[];var o=t.controller,i=t.panels,n=t.chartOptionsService;return r.chartController=o,r.chartOptionsService=n,r.panels=i,r}return __extends$11(t,e),t.prototype.init=function(){var e=this;
2this.panels.forEach(function(t){var r=t.replace("chart","").toLowerCase(),o=e.createTab(t,r,e.getPanelClass(r)),i=o.comp,n=o.tab;e.tabs.push(n),e.addDestroyFunc(function(){return e.destroyBean(i)})}),this.tabbedLayout=new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.TabbedLayout({items:this.tabs,cssClass:"ag-chart-tabbed-menu",keepScrollPosition:!0}),this.getContext().createBean(this.tabbedLayout)},t.prototype.createTab=function(e,t,r){var o=document.createElement("div");o.classList.add("ag-chart-tab","ag-chart-"+t);var i=new r(this.chartController,this.chartOptionsService);this.getContext().createBean(i),o.appendChild(i.getGui());var n=document.createElement("div"),a=this.chartTranslationService.translate(t);return n.innerText=a,{comp:i,tab:{title:n,titleLabel:a,bodyPromise:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgPromise.resolve(o),getScrollableContainer:function(){return o.querySelector(".ag-scrollable-container")||o},name:e}}},t.prototype.showTab=function(e){var t=this.tabs[e];this.tabbedLayout.showItem(t)},t.prototype.getGui=function(){return this.tabbedLayout&&this.tabbedLayout.getGui()},t.prototype.destroy=function(){this.parentComponent&&this.parentComponent.isAlive()&&this.destroyBean(this.parentComponent),e.prototype.destroy.call(this)},t.prototype.getPanelClass=function(e){switch(e){case t.TAB_DATA:return ChartDataPanel;case t.TAB_FORMAT:return FormatPanel;default:return ChartSettingsPanel}},t.TAB_DATA="data",t.TAB_FORMAT="format",__decorate$Q([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("chartTranslationService")],t.prototype,"chartTranslationService",void 0),__decorate$Q([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"init",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),__extends$10=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$P=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},__read$f=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},__spread$9=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read$f(arguments[t]));return e},ChartMenu=function(e){function t(r,o,i,n){var a=e.call(this,t.TEMPLATE)||this;return a.eChartContainer=r,a.eMenuPanelContainer=o,a.chartController=i,a.chartOptionsService=n,a.buttons={chartSettings:["menu",function(){return a.showMenu(a.defaultPanel)}],chartData:["menu",function(){return a.showMenu("chartData")}],chartFormat:["menu",function(){return a.showMenu("chartFormat")}],chartLink:["linked",function(e){return a.toggleDetached(e)}],chartUnlink:["unlinked",function(e){return a.toggleDetached(e)}],chartDownload:["save",function(){return a.saveChart()}]},a.panels=[],a.menuVisible=!1,a}return __extends$10(t,e),t.prototype.postConstruct=function(){var e=this;this.createButtons(),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_CHART_CREATED,function(t){var r;t.chartId===e.chartController.getChartId()&&Boolean(null===(r=e.gridOptionsService.get("chartToolPanelsDef"))||void 0===r?void 0:r.defaultToolPanel)&&e.showMenu(e.defaultPanel,!1)}),this.refreshMenuClasses(),!this.gridOptionsService.is("suppressChartToolPanelsButton")&&this.panels.length>0&&(this.getGui().classList.add("ag-chart-tool-panel-button-enable"),this.addManagedListener(this.eHideButton,"click",this.toggleMenu.bind(this)))},t.prototype.isVisible=function(){return this.menuVisible},t.prototype.getExtraPaddingDirections=function(){var e=this,t=[];return["chartLink","chartUnlink","chartDownload"].some(function(t){return e.chartToolbarOptions.includes(t)}
2)&&t.push("top"),["chartSettings","chartData","chartFormat"].some(function(t){return e.chartToolbarOptions.includes(t)})&&t.push(this.gridOptionsService.is("enableRtl")?"left":"right"),t},t.prototype.getToolbarOptions=function(){var e,t,r,o=this;if(Boolean(this.gridOptionsService.get("chartToolPanelsDef"))){var i=[this.chartController.isChartLinked()?"chartLink":"chartUnlink","chartDownload"],n={defaultItems:i},a=(c=this.gridOptionsService.getCallback("getChartToolbarItems"))?c(n).filter(function(e){if(!ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.CHART_TOOLBAR_ALLOW_LIST.includes(e)){var t=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.CHART_TOOL_PANEL_ALLOW_LIST.includes(e)?"AG Grid: '"+e+"' is a Chart Tool Panel option and will be ignored since 'chartToolPanelsDef' is used. Please use 'chartToolPanelsDef.panels' grid option instead":"AG Grid: '"+e+"' is not a valid Chart Toolbar Option";return console.warn(t),!1}return!0}):i,s=null===(t=null===(e=this.gridOptionsService.get("chartToolPanelsDef"))||void 0===e?void 0:e.panels)||void 0===t?void 0:t.map(function(e){var t=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.CHART_TOOL_PANEL_MENU_OPTIONS[e];return t||console.warn("AG Grid - invalid panel in chartToolPanelsDef.panels: '"+e+"'"),t}).filter(function(e){return Boolean(e)});this.panels=s||Object.values(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.CHART_TOOL_PANEL_MENU_OPTIONS),this.chartController.isPivotChart()&&(this.panels=this.panels.filter(function(e){return"chartData"!==e}));var l=null===(r=this.gridOptionsService.get("chartToolPanelsDef"))||void 0===r?void 0:r.defaultToolPanel;return this.defaultPanel=l&&ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.CHART_TOOL_PANEL_MENU_OPTIONS[l]||this.panels[0],this.panels.length>0?__spread$9([this.panels[0]],a):a}var c,u=["chartSettings","chartData","chartFormat",this.chartController.isChartLinked()?"chartLink":"chartUnlink","chartDownload"];if(c=this.gridOptionsService.getCallback("getChartToolbarItems")){var d=this.gridOptionsService.is("suppressChartToolPanelsButton");u=c(n={defaultItems:d?u:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.CHART_TOOLBAR_ALLOW_LIST}).filter(function(e){if(!o.buttons[e])return console.warn("AG Grid: '"+e+"' is not a valid Chart Toolbar Option"),!1;if(!d&&ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.CHART_TOOL_PANEL_ALLOW_LIST.includes(e)){var t="AG Grid: '"+e+"' is a Chart Tool Panel option and will be ignored. Please use 'chartToolPanelsDef.panels' grid option instead";return console.warn(t),!1}return!0}),d||(u=u.concat(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.CHART_TOOL_PANEL_ALLOW_LIST))}this.chartController.isPivotChart()&&(u=u.filter(function(e){return"chartData"!==e}));var p=["chartUnlink","chartLink","chartDownload"];return this.panels=u.filter(function(e){return-1===p.indexOf(e)}),this.defaultPanel=this.panels[0],u.filter(function(e){return-1!==p.indexOf(e)||o.panels.length&&e===o.panels[0]})},t.prototype.toggleDetached=function(e){var t=e.target,r=t.classList.contains("ag-icon-linked");t.classList.toggle("ag-icon-linked",!r),t.classList.toggle("ag-icon-unlinked",r);var o=r?"chartUnlinkToolbarTooltip":"chartLinkToolbarTooltip",i=this.chartTranslationService.translate(o);i&&(t.title=i),this.chartController.detachChartRange()},t.prototype.createButtons=function(){var e=this;this.chartToolbarOptions=this.getToolbarOptions();var t=this.eMenu;this.chartToolbarOptions.forEach(function(r){var o=e.buttons[r],i=__read$f(o,2),n=i[0],a=i[1],s=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.createIconNoSpan(n,e.gridOptionsService,void 0,!0);s.classList.add("ag-chart-menu-icon");var l=e.chartTranslationService.translate(r+"ToolbarTooltip");l&&(s.title=l),e.addManagedListener(s,"click",a),t.appendChild(s)})},t.prototype.saveChart=function(){var e={type:t.EVENT_DOWNLOAD_CHART};this.dispatchEvent(e)},t.prototype.createMenuPanel=function(e){var t=this,r=this.environment.chartMenuPanelWidth(),o=this.menuPanel=this.createBean(new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgPanel({minWidth:r,width:r,height:"100%",closable:!0,hideTitleBar:!0,cssIdentifier:"chart-menu"}));return o.setParentComponent(this),this.eMenuPanelContainer.appendChild(o.getGui()),this.tabbedMenu=this.createBean(new TabbedChartMenu({controller:this.chartController,type:this.chartController.getChartType(),panels:this.panels,chartOptionsService:this.chartOptionsService})),this.addManagedListener(o,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component.EVENT_DESTROYED,function(){return t.destroyBean(t.tabbedMenu)}),new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgPromise(function(r){window.setTimeout(function(){o.setBodyComponent(t.tabbedMenu),t.tabbedMenu.showTab(e),r(o),t.addManagedListener(t.eChartContainer,"click",function(e){t.getGui().contains(e.target)||t.menuVisible&&t.hideMenu()})},100)})},t.prototype.showContainer=function(){this.menuPanel&&(this.menuVisible=!0,this.showParent(this.menuPanel.getWidth()),this.refreshMenuClasses())},t.prototype.toggleMenu=function(){this.menuVisible?this.hideMenu():this.showMenu()},t.prototype.showMenu=function(e,t){var r=this;if(void 0===t&&(t=!0),t||this.eMenuPanelContainer.classList.add("ag-no-transition"),this.menuPanel&&!e)this.showContainer();else{var o=e||this.defaultPanel,i=this.panels.indexOf(o);i<0&&(console.warn("AG Grid: '"+e+"' is not a valid Chart Tool Panel name"),i=this.panels.indexOf(this.defaultPanel)),this.menuPanel?(this.tabbedMenu.showTab(i),this.showContainer()):this.createMenuPanel(i).then(this.showContainer.bind(this))}t||setTimeout(function(){r.isAlive()&&r.eMenuPanelContainer.classList.remove("ag-no-transition")},500)},t.prototype.hideMenu=function(){var e=this;this.hideParent(),window.setTimeout(function(){e.menuVisible=!1,e.refreshMenuClasses()},500)},t.prototype.refreshMenuClasses=function(){this.eChartContainer.classList.toggle("ag-chart-menu-visible",this.menuVisible),this.eChartContainer.classList.toggle("ag-chart-menu-hidden",!this.menuVisible),this.gridOptionsService.is("suppressChartToolPanelsButton")||(this.eHideButtonIcon.classList.toggle("ag-icon-contracted",this.menuVisible),this.eHideButtonIcon.classList.toggle("ag-icon-expanded",!this.menuVisible))},t.prototype.showParent=function(e){this.eMenuPanelContainer.style.minWidth=e+"px"},t.prototype.hideParent=function(){this.eMenuPanelContainer.style.minWidth="0"},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.menuPanel&&this.menuPanel.isAlive()&&this.destroyBean(this.menuPanel),this.tabbedMenu&&this.tabbedMenu.isAlive()&&this.destroyBean(this.tabbedMenu)},t.EVENT_DOWNLOAD_CHART="downloadChart",t.TEMPLATE='<div>\n        <div class="ag-chart-menu" ref="eMenu"></div>\n        <button class="ag-chart-menu-close" ref="eHideButton">
2\n            <span class="ag-icon ag-icon-contracted" ref="eHideButtonIcon"></span>\n        </button>\n    </div>',__decorate$P([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("chartTranslationService")],t.prototype,"chartTranslationService",void 0),__decorate$P([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eMenu")],t.prototype,"eMenu",void 0),__decorate$P([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eHideButton")],t.prototype,"eHideButton",void 0),__decorate$P([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eHideButtonIcon")],t.prototype,"eHideButtonIcon",void 0),__decorate$P([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"postConstruct",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),__extends$$=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__assign$i=function(){return __assign$i=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$i.apply(this,arguments)},__decorate$O=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},__values$6=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},TitleEdit=function(e){function t(r){var o=e.call(this,t.TEMPLATE)||this;return o.chartMenu=r,o.destroyableChartListeners=[],o.editing=!1,o}return __extends$$(t,e),t.prototype.init=function(){var e=this;this.addManagedListener(this.getGui(),"keypress",function(t){e.editing&&"Enter"===t.key&&!t.shiftKey&&(e.handleEndEditing(),t.preventDefault())}),this.addManagedListener(this.getGui(),"input",function(){e.editing&&e.updateHeight()}),this.addManagedListener(this.getGui(),"blur",function(){return e.endEditing()})},t.prototype.refreshTitle=function(e,t){var r,o,i=this;this.chartController=e,this.chartOptionsService=t;try{for(var n=__values$6(this.destroyableChartListeners),a=n.next();!a.done;a=n.next())(0,a.value)()}catch(e){r={error:e}}finally{try{a&&!a.done&&(o=n.return)&&o.call(n)}finally{if(r)throw r.error}}this.destroyableChartListeners=[];var s=this.chartController.getChartProxy().getChart(),l=s.scene.canvas.element,c=this.addManagedListener(l,"dblclick",function(e){var t=s.title;if(t&&t.node.containsPoint(e.offsetX,e.offsetY)){var r=t.node.computeBBox(),o=t.node.inverseTransformPoint(r.x,r.y);i.startEditing(__assign$i(__assign$i({},r),o),l.width)}}),u=!1,d=this.addManagedListener(l,"mousemove",function(e){var t=s.title,r=!!(t&&t.enabled&&t.node.containsPoint(e.offsetX,e.offsetY));u!==r&&(l.style.cursor=r?"pointer":""),u=r});this.destroyableChartListeners=[c,d]},t.prototype.startEditing=function(e,t){if(!(this.chartMenu&&this.chartMenu.isVisible()||this.editing)){this.editing=!0;var r=Math.max(Math.min(e.width+20,t),300),o=this.getGui();o.classList.add("currently-editing");var i=o.style;i.fontFamily=this.chartOptionsService.getChartOption("title.fontFamily"),i.fontWeight=this.chartOptionsService.getChartOption("title.fontWeight"),i.fontStyle=this.chartOptionsService.getChartOption("title.fontStyle"),i.fontSize=this.chartOptionsService.getChartOption("title.fontSize")+"px",i.color=this.chartOptionsService.getChartOption("title.color");var n=this.chartOptionsService.getChartOption("title.text"),a=n===this.chartTranslationService.translate("titlePlaceholder");o.value=a?"":n;var s=n.split(/\r?\n/g).length;i.left=Math.round(e.x+e.width/2-r/2-1)+"px",i.top=Math.round(e.y+e.height/2-s*this.getLineHeight()/2-2)+"px",i.width=Math.round(r)+"px",i.lineHeight=this.getLineHeight()+"px",this.updateHeight(),o.focus()}},t.prototype.updateHeight=function(){var e=this.getGui(),t=this.chartOptionsService.getChartOption("title.text").split(/\r?\n/g).length,r=e.value.split(/\r?\n/g).length;e.style.height=Math.round(Math.max(t,r)*this.getLineHeight())+4+"px"},t.prototype.getLineHeight=function(){var e=this.chartOptionsService.getChartOption("title.lineHeight");return e?parseInt(e):Math.round(1.2*parseInt(this.chartOptionsService.getChartOption("title.fontSize")))},t.prototype.handleEndEditing=function(){var e=this,t=this.chartOptionsService.getChartOption("title.color");this.chartOptionsService.setChartOption("title.color","rgba(0, 0, 0, 0)"),this.chartOptionsService.awaitChartOptionUpdate(function(){return e.endEditing()}),this.chartOptionsService.awaitChartOptionUpdate(function(){e.chartOptionsService.setChartOption("title.color",t)})},t.prototype.endEditing=function(){var e=this;if(this.editing){this.editing=!1;var t=this.getGui().value;t&&""!==t.trim()?(this.chartOptionsService.setChartOption("title.text",t),this.chartOptionsService.setChartOption("title.enabled",!0)):(this.chartOptionsService.setChartOption("title.text",""),this.chartOptionsService.setChartOption("title.enabled",!1)),this.getGui().classList.remove("currently-editing"),this.chartOptionsService.awaitChartOptionUpdate(function(){e.eventService.dispatchEvent({type:"chartTitleEdit"})})}},t.TEMPLATE='<textarea\n             class="ag-chart-title-edit"\n             style="padding:0; border:none; border-radius: 0; min-height: 0; text-align: center; resize: none;" />\n        ',__decorate$O([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("chartTranslationService")],t.prototype,"chartTranslationService",void 0),__decorate$O([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"init",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component);function deproxy(e){return null!=e.chart?e.chart:e}var __assign$h=function(){return __assign$h=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$h.apply(this,arguments)},ChartProxy=function(){function e(e){this.chartProxyParams=e,this.clearThemeOverrides=!1,this.chart=e.chartInstance,this.chartType=e.chartType,this.crossFiltering=e.crossFiltering,this.crossFilterCallback=e.crossFilterCallback,this.standaloneChartType=getSeriesType(this.chartType),null==this.chart?this.chart=AgChart.create(this.getCommonChartOptions()):this.clearThemeOverrides=!0}return e.prototype.getChart=function(){return deproxy(this.chart)},e.prototype.getChartRef=function(){return this.chart},e.prototype.downloadChart=function(e,t,r){var o=this.chart,i=deproxy(o),n=t||(i.title?i.title.text:"chart"),a=e||{},s=a.width,l=a.height;AgChart.download(o,{width:s,height:l,fileName:n,fileFormat:r})},e.prototype.getChartImageDataURL=function(e){return this.getChart().scene.getDataURL(e)},e.prototype.getChartOptions=function(){return this.chart.getOptions()},e.prototype.getChartThemeOverrides=function(){var e;return null!==(e=this.getChartOptions().theme.overrides)&&void 0!==e?e:{}},e.prototype.getChartPalette=function(){return getChartTheme(this.getChartOptions().theme).palette},e.prototype.setPaired=function(e){var t,r=getSeriesType(this.chartProxyParams.chartType);AgChart.updateDelta(this.chart,{theme:{overrides:(t={},t[r]={paired:e},t)}})},e.prototype.isPaired=function(){var e=getSeriesType(this.chartProxyParams.chartType);return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.get(this.getChartThemeOverrides(),e+".paired",!0)},e.prototype.lookupCustomChartTheme=function(e){return lookupCustomChartTheme(this.chartProxyParams,e)},e.prototype.transformData=function(e,t,r){return r?e.map(function(e,r){var o=e[t],i=o&&o.toString?o.toString():"",n=__assign$h({},e);return n[t]={id:r,value:o,toString:function(){return i}},n}):e},e.prototype.getCommonChartOptions=function(){var e,t,r=this.clearThemeOverrides?{}:null!==(t=null===(e=this.chart)||void 0===e?void 0:e.getOptions())&&void 0!==t?t:{},o=null!=this.chart?{overrides:this.getActiveFormattingPanelOverrides()}:{};return this.clearThemeOverrides=!1,__assign$h(__assign$h({},r),{theme:__assign$h(__assign$h({},createAgChartTheme(this.chartProxyParams,this)),o),container:this.chartProxyParams.parentElement,mode:"integrated"})},e.prototype.getActiveFormattingPanelOverrides=function(){var e,t;if(this.clearThemeOverrides)return{};var r=null===(e=this.chart)||void 0===e?void 0:e.getOptions().theme;return null!==(t=null==r?void 0:r.overrides)&&void 0!==t?t:{}},e.prototype.destroy=function(e){var t=(void 0===e?{}:e).keepChartInstance;if(void 0!==t&&t)return this.chart;this.destroyChart()},e.prototype.destroyChart=function(){this.chart&&(this.chart.destroy(),this.chart=void 0)},e}(),__extends$_=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__assign$g=function(){return __assign$g=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$g.apply(this,arguments)},CartesianChartProxy=function(e){function t(t){var r=e.call(this,t)||this;return r.crossFilteringAllPoints=new Set,r.crossFilteringSelectedPoints=[],r}return __extends$_(t,e),t.prototype.update=function(e){var t=this.getAxes(e),r=__assign$g(__assign$g({},this.getCommonChartOptions()),{data:this.getData(e,t),axes:t,series:this.getSeries(e)});AgChart.update(this.getChartRef(),r)},t.prototype.getData=function(e,t){var r,o=["area","line"].includes(this.standaloneChartType),i="bar"===this.standaloneChartType?"left"
2:"bottom",n="category"===(null===(r=t.find(function(e){return e.position===i}))||void 0===r?void 0:r.type);return this.crossFiltering&&o?this.getCrossFilterData(e):this.getDataTransformedData(e,n)},t.prototype.getDataTransformedData=function(e,t){return this.transformData(e.data,e.category.id,t)},t.prototype.getXAxisType=function(e){return e.grouping?"groupedCategory":t.isTimeAxis(e)?"time":"category"},t.isTimeAxis=function(e){if(e.category&&e.category.chartDataType)return"time"===e.category.chartDataType;var t=e.data[0];return(t&&t[e.category.id])instanceof Date},t.prototype.crossFilteringReset=function(){this.crossFilteringSelectedPoints=[],this.crossFilteringAllPoints.clear()},t.prototype.crossFilteringPointSelected=function(e){return 0==this.crossFilteringSelectedPoints.length||this.crossFilteringSelectedPoints.includes(e)},t.prototype.crossFilteringDeselectedPoints=function(){return this.crossFilteringSelectedPoints.length>0&&this.crossFilteringAllPoints.size!==this.crossFilteringSelectedPoints.length},t.prototype.extractLineAreaCrossFilterSeries=function(e,t){var r=this;return e.map(function(e){var o;return e.yKey=(o=e.yKey,"area"===r.standaloneChartType?t.getCrossFilteringContext().lastSelectedChartId===t.chartId?o+"-total":o:o+"-total"),e.listeners={nodeClick:function(t){var o=t.datum[e.xKey],i=t.event.metaKey||t.event.ctrlKey;r.crossFilteringAddSelectedPoint(i,o),r.crossFilterCallback(t)}},e.marker={formatter:function(e){var o=e.datum[t.category.id];return{fill:e.highlighted?"yellow":e.fill,size:e.highlighted?14:r.crossFilteringPointSelected(o)?8:0}}},"area"===r.standaloneChartType&&(e.fillOpacity=r.crossFilteringDeselectedPoints()?.3:1),"line"===r.standaloneChartType&&(e.strokeOpacity=r.crossFilteringDeselectedPoints()?.3:1),e})},t.prototype.getCrossFilterData=function(e){var t=this;this.crossFilteringAllPoints.clear();var r=e.fields[0].colId,o=r+"-filtered-out",i=e.getCrossFilteringContext().lastSelectedChartId;return e.data.map(function(n){var a=n[e.category.id];t.crossFilteringAllPoints.add(a);var s=t.crossFilteringPointSelected(a);return"area"===t.standaloneChartType&&i===e.chartId&&(n[r+"-total"]=s?n[r]:n[r]+n[o]),"line"===t.standaloneChartType&&(n[r+"-total"]=s?n[r]:n[r]+n[o]),n})},t.prototype.crossFilteringAddSelectedPoint=function(e,t){e?this.crossFilteringSelectedPoints.push(t):this.crossFilteringSelectedPoints=[t]},t}(ChartProxy);function emptyTarget(e){return Array.isArray(e)?[]:{}}function cloneUnlessOtherwiseSpecified(e,t){return!1!==t.clone&&t.isMergeableObject(e)?deepMerge(emptyTarget(e),e,t):e}function defaultArrayMerge(e,t,r){return e.concat(t).map(function(e){return cloneUnlessOtherwiseSpecified(e,r)})}function getMergeFunction(e,t){if(!t.customMerge)return deepMerge;var r=t.customMerge(e);return"function"==typeof r?r:deepMerge}function getEnumerableOwnPropertySymbols(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return e.propertyIsEnumerable(t)}):[]}function getKeys(e){return Object.keys(e).concat(getEnumerableOwnPropertySymbols(e))}function propertyIsOnObject(e,t){try{return t in e}catch(e){return!1}}function propertyIsUnsafe(e,t){return propertyIsOnObject(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function mergeObject(e,t,r){void 0===e&&(e={}),void 0===t&&(t={});var o={};return r.isMergeableObject(e)&&getKeys(e).forEach(function(t){o[t]=cloneUnlessOtherwiseSpecified(e[t],r)}),getKeys(t).forEach(function(i){propertyIsUnsafe(e,i)||(propertyIsOnObject(e,i)&&r.isMergeableObject(t[i])?o[i]=getMergeFunction(i,r)(e[i],t[i],r):o[i]=cloneUnlessOtherwiseSpecified(t[i],r))}),o}function defaultIsMergeableObject(e){return isNonNullObject(e)&&!isSpecial(e)}function isNonNullObject(e){return!!e&&"object"==typeof e}function isSpecial(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t}function deepMerge(e,t,r){(r=r||{}).arrayMerge=r.arrayMerge||defaultArrayMerge,r.isMergeableObject=r.isMergeableObject||defaultIsMergeableObject,r.cloneUnlessOtherwiseSpecified=cloneUnlessOtherwiseSpecified;var o=Array.isArray(t);return o===Array.isArray(e)?o?r.arrayMerge(e,t,r):mergeObject(e,t,r):cloneUnlessOtherwiseSpecified(t,r)}function hexToRGBA(e,t){var r=parseInt(e.slice(1,3),16),o=parseInt(e.slice(3,5),16),i=parseInt(e.slice(5,7),16);return t?"rgba("+r+", "+o+", "+i+", "+t+")":"rgba("+r+", "+o+", "+i+")"}function changeOpacity(e,t){return e.map(function(e){var r=Color.fromString(e);return new Color(r.r,r.g,r.b,t).toHexString()})}var __extends$Z=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__assign$f=function(){return __assign$f=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$f.apply(this,arguments)},BarChartProxy=function(e){function t(t){return e.call(this,t)||this}return __extends$Z(t,e),t.prototype.getAxes=function(e){var t="bar"===this.standaloneChartType,r=[{type:this.getXAxisType(e),position:t?"left":"bottom"},{type:"number",position:t?"bottom":"left"}];if(this.isNormalised()){var o=r[1];o.label=__assign$f(__assign$f({},o.label),{formatter:function(e){return Math.round(e.value)+"%"}})}return r},t.prototype.getSeries=function(e){var t=this,r=!this.crossFiltering&&ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.includes(["groupedColumn","groupedBar"],this.chartType),o=e.fields.map(function(o){return{type:t.standaloneChartType,grouped:r,normalizedTo:t.isNormalised()?100:void 0,xKey:e.category.id,xName:e.category.name,yKey:o.colId,yName:o.displayName}});return this.crossFiltering?this.extractCrossFilterSeries(o):o},t.prototype.extractCrossFilterSeries=function(e){for(var t=this,r=this.getChartPalette(),o=function(e,o){return __assign$f(__assign$f({},e),{highlightStyle:{item:{fill:void 0}},fill:null==r?void 0:r.fills[o],stroke:null==r?void 0:r.strokes[o],listeners:{nodeClick:t.crossFilterCallback}})},i=function(e){var t=e.yKey+"-filtered-out";return __assign$f(__assign$f({},deepMerge({},e)),{yKey:t,fill:hexToRGBA(e.fill,"0.3"),stroke:hexToRGBA(e.stroke,"0.3"),hideInLegend:[t]})},n=[],a=0;a<e.length;a++){var s=o(e[a],a);n.push(s),n.push(i(s))}return n},t.prototype.isNormalised=function(){return!this.crossFiltering&&ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.includes(["normalizedColumn","normalizedBar"],this.chartType)},t}(CartesianChartProxy),__extends$Y=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__assign$e=function(){return __assign$e=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$e.apply(this,arguments)},AreaChartProxy=function(e){function t(t){return e.call(this,t)||this}return __extends$Y(t,e),t.prototype.getAxes=function(e){var t=[{type:this.getXAxisType(e),position:"bottom"},{type:"number",position:"left"}];if(this.isNormalised()){var r=t[1];r.label=__assign$e(__assign$e({},r.label),{formatter:function(e){return Math.round(e.value)+"%"}})}return t},t.prototype.getSeries=function(e){var t=this,r=e.fields.map(function(r){return{type:t.standaloneChartType,xKey:e.category.id,xName:e.category.name,yKey:r.colId,yName:r.displayName,normalizedTo:"normalizedArea"===t.chartType?100:void 0,stacked:["normalizedArea","stackedArea"].includes(t.chartType)}});return this.crossFiltering?this.extractLineAreaCrossFilterSeries(r,e):r},t.prototype.isNormalised=function(){return!this.crossFiltering&&"normalizedArea"===this.chartType},t}(CartesianChartProxy),__extends$X=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),LineChartProxy=function(e){function t(t){return e.call(this,t)||this}return __extends$X(t,e),t.prototype.getAxes=function(e){return[{type:this.getXAxisType(e),position:"bottom"},{type:"number",position:"left"}]},t.prototype.getSeries=function(e){var t=this,r=e.fields.map(function(r){return{type:t.standaloneChartType,xKey:e.category.id,xName:e.category.name,yKey:r.colId,yName:r.displayName}});return this.crossFiltering?this.extractLineAreaCrossFilterSeries(r,e):r},t}(CartesianChartProxy),__extends$W=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__assign$d=function(){return __assign$d=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$d.apply(this,arguments)},PieChartProxy=function(e){function t(t){return e.call(this,t)||this}return __extends$W(t,e),t.prototype.update=function(e){var t=e.data,r=e.category,o=__assign$d(__assign$d({},this.getCommonChartOptions()),{data:this.crossFiltering?this.getCrossFilterData(e):this.transformData(t,r.id),series:this.getSeries(e)});AgChart.update(this.getChartRef(),o)},t.prototype.getSeries=function(e){var r=this,o=e.fields.length,i={currentOffset:0,offsetAmount:o>1?20:40},n=this.getFields(e).map(function(n){var a,s={type:r.standaloneChartType,angleKey:n.colId,angleName:n.displayName,sectorLabelKey:n.colId,calloutLabelKey:e.category.id,calloutLabelName:e.category.name};if("doughnut"===r.chartType){var l=t.calculateOffsets(i),c=l.outerRadiusOffset,u=l.innerRadiusOffset,d=n.displayName?{title:{text:n.displayName,showInLegend:o>1}}:void 0;return __assign$d(__assign$d(__assign$d(__assign$d({},s),{outerRadiusOffset:c,innerRadiusOffset:u}),d),{calloutLine:{colors:null===(a=r.getChartPalette())||void 0===a?void 0:a.strokes}})}return s});return this.crossFiltering?this.extractCrossFilterSeries(n):n},t.prototype.getCrossFilterData=function(e){var t=e.fields[0].colId,r=t+"-filtered-out";return e.data.map(function(e){var o=e[t]+e[r];return e[t+"-total"]=o,e[r]=1,e[t]=e[t]/o,e})},t.prototype.extractCrossFilterSeries=function(e){var t,r=this.getChartPalette(),o=e[0],i=o.angleKey,n=__assign$d(__assign$d({},t=o),{calloutLabel:{enabled:!1},highlightStyle:{item:{fill:void 0}}
2,radiusKey:t.angleKey,angleKey:t.angleKey+"-total",radiusMin:0,radiusMax:1,listeners:{nodeClick:this.crossFilterCallback}});return[function(e,t){var o,i;return __assign$d(__assign$d({},deepMerge({},n)),{radiusKey:t+"-filtered-out",fills:changeOpacity(null!==(o=e.fills)&&void 0!==o?o:r.fills,.3),strokes:changeOpacity(null!==(i=e.strokes)&&void 0!==i?i:r.strokes,.3),showInLegend:!1})}(o,i),n]},t.calculateOffsets=function(e){var t=e.currentOffset;e.currentOffset-=e.offsetAmount;var r=e.currentOffset;return e.currentOffset-=e.offsetAmount,{outerRadiusOffset:t,innerRadiusOffset:r}},t.prototype.getFields=function(e){return"pie"===this.chartType?e.fields.slice(0,1):e.fields},t.prototype.crossFilteringReset=function(){},t}(ChartProxy),__extends$V=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__assign$c=function(){return __assign$c=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$c.apply(this,arguments)},__values$5=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},__read$e=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},__spread$8=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read$e(arguments[t]));return e},ScatterChartProxy=function(e){function t(t){return e.call(this,t)||this}return __extends$V(t,e),t.prototype.getAxes=function(e){return[{type:"number",position:"bottom"},{type:"number",position:"left"}]},t.prototype.getSeries=function(e){var t=this,r=this.isPaired(),o=this.getSeriesDefinitions(e.fields,r),i=e.category.id===ChartDataModel.DEFAULT_CATEGORY?void 0:e.category,n=o.map(function(e){return{type:t.standaloneChartType,xKey:e.xField.colId,xName:e.xField.displayName,yKey:e.yField.colId,yName:e.yField.displayName,title:e.yField.displayName+" vs "+e.xField.displayName,sizeKey:e.sizeField?e.sizeField.colId:void 0,sizeName:e.sizeField?e.sizeField.displayName:void 0,labelKey:i?i.id:e.yField.colId,labelName:i?i.name:void 0}});return this.crossFiltering?this.extractCrossFilterSeries(n,e):n},t.prototype.extractCrossFilterSeries=function(e,t){var r=this,o=t.data,i=this.getChartPalette(),n=function(e){return e+"-filtered-out"},a=e.map(function(e,t){var a=e.sizeKey,s=null==i?void 0:i.fills[t],l=null==i?void 0:i.strokes[t],c=function(e,t){var r,o,i,a=[1/0,-1/0];if(null!=t)try{for(var s=__values$5(e),l=s.next();!l.done;l=s.next()){var c=l.value,u=null!==(i=c[t])&&void 0!==i?i:c[n(t)];u<a[0]&&(a[0]=u),u>a[1]&&(a[1]=u)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}if(a[0]<=a[1])return a}(o,a),u=__assign$c(__assign$c({},e.marker),{fill:s,stroke:l,domain:c});return __assign$c(__assign$c({},e),{marker:u,highlightStyle:{item:{fill:"yellow"}},listeners:__assign$c(__assign$c({},e.listeners),{nodeClick:r.crossFilterCallback})})});return __spread$8(a,a.map(function(e){var t=e.sizeKey,o=e.yKey,i=e.xKey;return null!=t&&(t=n(t)),__assign$c(__assign$c({},e),{yKey:n(o),xKey:n(i),marker:__assign$c(__assign$c({},e.marker),{fillOpacity:.3,strokeOpacity:.3}),sizeKey:t,showInLegend:!1,listeners:__assign$c(__assign$c({},e.listeners),{nodeClick:function(e){var t,o=e.datum[n(i)],a=__assign$c(__assign$c({},e),{xKey:i,datum:__assign$c(__assign$c({},e.datum),(t={},t[i]=o,t))});r.crossFilterCallback(a)}})})}))},t.prototype.getSeriesDefinitions=function(e,t){if(e.length<2)return[];var r="bubble"===this.chartType;if(t)return r?e.map(function(t,r){return r%3==0?{xField:t,yField:e[r+1],sizeField:e[r+2]}:null}).filter(function(e){return e&&e.yField&&e.sizeField}
2):e.map(function(t,r){return r%2==0?{xField:t,yField:e[r+1]}:null}).filter(function(e){return e&&e.yField});var o=e[0];return r?e.map(function(t,r){return r%2==1?{xField:o,yField:t,sizeField:e[r+1]}:null}).filter(function(e){return e&&e.sizeField}):e.filter(function(e,t){return t>0}).map(function(e){return{xField:o,yField:e}})},t}(CartesianChartProxy),__extends$U=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),HistogramChartProxy=function(e){function t(t){return e.call(this,t)||this}return __extends$U(t,e),t.prototype.getSeries=function(e){var t=e.fields[0];return[{type:this.standaloneChartType,xKey:t.colId,xName:t.displayName,yName:this.chartProxyParams.translate("histogramFrequency"),areaPlot:!1}]},t.prototype.getAxes=function(e){return[{type:"number",position:"bottom"},{type:"number",position:"left"}]},t}(CartesianChartProxy),__extends$T=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),ChartOptionsService=function(e){function t(t){var r=e.call(this)||this;return r.chartController=t,r}return __extends$T(t,e),t.prototype.getChartOption=function(e){return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.get(this.getChart(),e,void 0)},t.prototype.setChartOption=function(e,t,r){var o=this,i=this.chartController.getChartSeriesTypes();this.chartController.isComboChart()&&i.push("cartesian");var n={};i.forEach(function(r){n=deepMerge(n,o.createChartOptions({seriesType:r,expression:e,value:t}))}),this.updateChart(n),r||this.raiseChartOptionsChangedEvent()},t.prototype.awaitChartOptionUpdate=function(e){this.chartController.getChartProxy().getChart().waitForUpdate().then(function(){return e()})},t.prototype.getAxisProperty=function(e){var t;return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.get(null===(t=this.getChart().axes)||void 0===t?void 0:t[0],e,void 0)},t.prototype.setAxisProperty=function(e,t){var r,o=this,i=this.getChart(),n={};null===(r=i.axes)||void 0===r||r.forEach(function(r){n=deepMerge(n,o.getUpdateAxisOptions(r,e,t))}),this.updateChart(n),this.raiseChartOptionsChangedEvent()},t.prototype.getLabelRotation=function(e){var t=this.getAxis(e);return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.get(t,"label.rotation",void 0)},t.prototype.setLabelRotation=function(e,t){var r=this.getAxis(e);if(r){var o=this.getUpdateAxisOptions(r,"label.rotation",t);this.updateChart(o),this.raiseChartOptionsChangedEvent()}},t.prototype.getSeriesOption=function(e,r){var o=this.getChart().series.find(function(e){return t.isMatchingSeries(r,e)});return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.get(o,e,void 0)},t.prototype.setSeriesOption=function(e,t,r){var o=this.createChartOptions({seriesType:r,expression:"series."+e,value:t});this.updateChart(o),this.raiseChartOptionsChangedEvent()},t.prototype.getPairedMode=function(){return this.chartController.getChartProxy().isPaired()},t.prototype.setPairedMode=function(e){this.chartController.getChartProxy().setPaired(e)},t.prototype.getAxis=function(e){var t=this.getChart();if(t.axes&&!(t.axes.length<1))return"xAxis"===e?t.axes&&"x"===t.axes[0].direction?t.axes[0]:t.axes[1]:t.axes&&"y"===t.axes[1].direction?t.axes[1]:t.axes[0]},t.prototype.getUpdateAxisOptions=function(e,t,r){var o=getSeriesType(this.getChartType());return["number","category","time","groupedCategory"].includes(e.type)?this.createChartOptions({seriesType:o,expression:"axes."+e.type+"."+t,value:r}):{}},t.prototype.getChartType=function(){return this.chartController.getChartType()},t.prototype.getChart=function(){return this.chartController.getChartProxy().getChart()},t.prototype.updateChart=function(e){var t=this.chartController.getChartProxy().getChartRef();AgChart.updateDelta(t,e)},t.prototype.createChartOptions=function(e){var t=e.seriesType,r=e.expression,o=e.value,i={},n={theme:{overrides:i}};return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.set(i,t+"."+r,o),n},t.prototype.raiseChartOptionsChangedEvent=function(){var e=this.chartController.getChartModel(),t={type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_CHART_OPTIONS_CHANGED,chartId:e.chartId,chartType:e.chartType,chartThemeName:this.chartController.getChartThemeName(),chartOptions:e.chartOptions};this.eventService.dispatchEvent(t)},t.isMatchingSeries=function(e,t){var r;return VALID_SERIES_TYPES.includes(e)&&t.type===("column"===(r=e)?"bar":r)},t.prototype.destroy=function(){e.prototype.destroy.call(this)},t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.BeanStub),__extends$S=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),ComboChartProxy=function(e){function t(t){return e.call(this,t)||this}return __extends$S(t,e),t.prototype.getAxes=function(e){var t=e?e.fields:[],r=new Map(t.map(function(e){return[e.colId,e]})),o=this.getYKeys(t,e.seriesChartTypes),i=o.primaryYKeys,n=o.secondaryYKeys,a=[{type:this.getXAxisType(e),position:"bottom",gridStyle:[{stroke:void 0}]}];return i.length>0&&a.push({type:"number",keys:i,position:"left",title:{text:i.map(function(e){var t=r.get(e);return t?t.displayName:e}).join(" / ")}}),n.length>
20&&n.forEach(function(e,t){var o=r.get(e);if(o&&o.colId===e){var s={type:"number",keys:[e],position:"right",title:{text:o?o.displayName:e}},l=i.some(function(e){return!!r.get(e)}),c=t===n.length-1;!l&&c||(s.gridStyle=[{stroke:void 0}]),a.push(s)}}),a},t.prototype.getSeries=function(e){var t=e.fields,r=e.category,o=e.seriesChartTypes;return t.map(function(e){var t=o.find(function(t){return t.colId===e.colId});if(t){var i=t.chartType;return{type:getSeriesType(i),xKey:r.id,yKey:e.colId,yName:e.displayName,grouped:["groupedColumn","groupedBar","groupedArea"].includes(i),stacked:["stackedArea","stackedColumn"].includes(i)}}})},t.prototype.getYKeys=function(e,t){var r=[],o=[];return e.forEach(function(e){var i=e.colId,n=t.find(function(e){return e.colId===i});n&&(n.secondaryAxis?o.push(i):r.push(i))}),{primaryYKeys:r,secondaryYKeys:o}},t}(CartesianChartProxy),__extends$R=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$N=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},GridChartComp=function(e){function t(r){var o=e.call(this,t.TEMPLATE)||this;return o.params=r,o}return __extends$R(t,e),t.prototype.init=function(){var e=this,t=this.gridOptionsService.get("chartThemes")||DEFAULT_THEMES;if(t.length<1)throw new Error("Cannot create chart: no chart themes are available to be used.");var r=this.params.chartThemeName;ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.includes(t,r)||(r=t[0]);var o={chartId:this.params.chartId,pivotChart:this.params.pivotChart,chartType:this.params.chartType,chartThemeName:r,aggFunc:this.params.aggFunc,cellRange:this.params.cellRange,suppressChartRanges:this.params.suppressChartRanges,unlinkChart:this.params.unlinkChart,crossFiltering:this.params.crossFiltering,
2seriesChartTypes:this.params.seriesChartTypes},i=this.gridOptionsService.is("enableRtl");this.addCssClass(i?"ag-rtl":"ag-ltr");var n=this.createBean(new ChartDataModel(o));this.chartController=this.createManagedBean(new ChartController(n)),this.validateCustomThemes(),this.createChart(),this.params.insideDialog&&this.addDialog(),this.addMenu(),this.addTitleEditComp(),this.addManagedListener(this.getGui(),"focusin",this.setActiveChartCellRange.bind(this)),this.addManagedListener(this.chartController,ChartController.EVENT_CHART_MODEL_UPDATE,this.update.bind(this)),this.chartMenu&&this.addManagedListener(this.chartMenu,ChartMenu.EVENT_DOWNLOAD_CHART,function(){return e.downloadChart()}),this.update(),this.raiseChartCreatedEvent()},t.prototype.validateCustomThemes=function(){var e=this.getChartThemes(),t=this.gridOptionsService.get("customChartThemes");t&&ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.getAllKeysInObjects([t]).forEach(function(t){ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.includes(e,t)||console.warn("AG Grid: a custom chart theme with the name '"+t+"' has been supplied but not added to the 'chartThemes' list")})},t.prototype.createChart=function(){var e=this,r=void 0;this.chartProxy&&(r=this.chartProxy.destroy({keepChartInstance:!0}));var o=this.chartController.getChartType(),i={chartType:o,chartInstance:r,getChartThemeName:this.getChartThemeName.bind(this),getChartThemes:this.getChartThemes.bind(this),customChartThemes:this.gridOptionsService.get("customChartThemes"),getGridOptionsChartThemeOverrides:function(){return e.getGridOptionsChartThemeOverrides()},getExtraPaddingDirections:function(){var t,r;return null!==(r=null===(t=e.chartMenu)||void 0===t?void 0:t.getExtraPaddingDirections())&&void 0!==r?r:[]},apiChartThemeOverrides:this.params.chartThemeOverrides,crossFiltering:this.params.crossFiltering,crossFilterCallback:function(t,r){e.params.crossFilteringContext.lastSelectedChartId=r?"":e.chartController.getChartId(),r&&e.params.crossFilteringResetCallback(),e.crossFilterService.filter(t,r)},parentElement:this.eChart,grouping:this.chartController.isGrouping(),chartThemeToRestore:this.params.chartThemeName,chartOptionsToRestore:this.params.chartOptionsToRestore,chartPaletteToRestore:this.params.chartPaletteToRestore,seriesChartTypes:this.chartController.getSeriesChartTypes(),translate:function(t,r){return e.chartTranslationService.translate(t,r)}};if(this.params.chartOptionsToRestore=void 0,this.chartType=o,this.chartThemeName=this.chartController.getChartThemeName(),this.chartProxy=t.createChartProxy(i),this.chartProxy){var n=this.eChart.querySelector("canvas");n&&n.classList.add("ag-charts-canvas"),this.chartController.setChartProxy(this.chartProxy),this.chartOptionsService=this.createBean(new ChartOptionsService(this.chartController)),this.titleEdit&&this.titleEdit.refreshTitle(this.chartController,this.chartOptionsService)}else console.warn("AG Grid: invalid chart type supplied: ",i.chartType)},t.prototype.getChartThemeName=function(){return this.chartController.getChartThemeName()},t.prototype.getChartThemes=function(){return this.chartController.getThemes()},t.prototype.getGridOptionsChartThemeOverrides=function(){return this.gridOptionsService.get("chartThemeOverrides")},t.createChartProxy=function(e){switch(e.chartType){case"column":case"bar":case"groupedColumn":case"stackedColumn":case"normalizedColumn":case"groupedBar":case"stackedBar":case"normalizedBar":return new BarChartProxy(e);case"pie":case"doughnut":return new PieChartProxy(e);case"area":case"stackedArea":case"normalizedArea":return new AreaChartProxy(e);case"line":return new LineChartProxy(e);case"scatter":case"bubble":return new ScatterChartProxy(e);case"histogram":return new HistogramChartProxy(e);case"columnLineCombo":case"areaColumnCombo":case"customCombo":return new ComboChartProxy(e);default:throw"AG Grid: Unable to create chart as an invalid chartType = '"+e.chartType+"' was supplied."}},t.prototype.addDialog=function(){var e=this,t=this.chartTranslationService.translate(this.params.pivotChart?"pivotChartTitle":"rangeChartTitle"),r=this.getBestDialogSize(),o=r.width,i=r.height;this.chartDialog=new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgDialog({resizable:!0,movable:!0,maximizable:!0,title:t,width:o,height:i,component:this,centered:!0,closable:!0}),this.getContext().createBean(this.chartDialog),this.chartDialog.addEventListener(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgDialog.EVENT_DESTROYED,function(){return e.destroy()})},t.prototype.getBestDialogSize=function(){var e=this.popupService.getPopupParent(),t=.75*ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.getAbsoluteWidth(e),r=.75*
2ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.getAbsoluteHeight(e),o=this.chartProxy.getChart(),i=this.params.insideDialog?850:o.width,n=this.params.insideDialog?470:o.height;return(i>t||n>r)&&(i=Math.min(i,t),(n=Math.round(.553*i))>r&&(n=r,i=Math.min(i,Math.round(n/.553)))),{width:i,height:n}},t.prototype.addMenu=function(){this.params.crossFiltering||(this.chartMenu=this.createBean(new ChartMenu(this.eChartContainer,this.eMenuContainer,this.chartController,this.chartOptionsService)),this.eChartContainer.appendChild(this.chartMenu.getGui()))},t.prototype.addTitleEditComp=function(){this.titleEdit=this.createBean(new TitleEdit(this.chartMenu)),this.eTitleEditContainer.appendChild(this.titleEdit.getGui()),this.chartProxy&&this.titleEdit.refreshTitle(this.chartController,this.chartOptionsService)},t.prototype.update=function(){this.shouldRecreateChart()&&this.createChart(),this.updateChart()},t.prototype.shouldRecreateChart=function(){return this.chartType!==this.chartController.getChartType()||this.chartThemeName!==this.chartController.getChartThemeName()},t.prototype.getCurrentChartType=function(){return this.chartType},t.prototype.getChartModel=function(){return this.chartController.getChartModel()},t.prototype.getChartImageDataURL=function(e){return this.chartProxy.getChartImageDataURL(e)},t.prototype.updateChart=function(){var e=this,t=this.chartProxy,r=this.chartController.getSelectedValueColState().map(function(e){return{colId:e.colId,displayName:e.displayName}}),o=this.chartController.getChartData();if(!this.handleEmptyChart(o,r)){var i=this.chartController.getChartUpdateParams();t.update(i),this.chartProxy.getChart().waitForUpdate().then(function(){e.chartController.raiseChartUpdatedEvent()}),this.titleEdit.refreshTitle(this.chartController,this.chartOptionsService)}},t.prototype.handleEmptyChart=function(e,t){var r=this.chartController.isPivotChart()&&!this.chartController.isPivotMode(),o=1;this.chartController.isActiveXYChart()&&(o="bubble"===this.chartController.getChartType()?3:2);var i=t.length<o||0===e.length;if(this.eChart){var n=r||i;ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setDisplayed(this.eChart,!n),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setDisplayed(this.eEmpty,n)}return r?(this.eEmpty.innerText=this.chartTranslationService.translate("pivotChartRequiresPivotMode"),!0):!!i&&(this.eEmpty.innerText=this.chartTranslationService.translate("noDataToChart"),!0)},t.prototype.downloadChart=function(e,t,r){this.chartProxy.downloadChart(e,t,r)},t.prototype.openChartToolPanel=function(e){var t=e?ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.CHART_TOOL_PANEL_MENU_OPTIONS[e]:e;this.chartMenu.showMenu(t)},t.prototype.closeChartToolPanel=function(){this.chartMenu.hideMenu()},t.prototype.getChartId=function(){return this.chartController.getChartId()},t.prototype.getUnderlyingChart=function(){return this.chartProxy.getChartRef()},t.prototype.crossFilteringReset=function(){this.chartProxy.crossFilteringReset()},t.prototype.setActiveChartCellRange=function(e){this.getGui().contains(e.relatedTarget)||(this.chartController.setChartRange(!0),this.gridApi.focusService.clearFocusedCell())},t.prototype.raiseChartCreatedEvent=function(){var e=this,t={type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_CHART_CREATED,chartId:this.chartController.getChartId()};this.chartProxy.getChart().waitForUpdate().then(function(){e.eventService.dispatchEvent(t)})},t.prototype.raiseChartDestroyedEvent=function(){var e={type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_CHART_DESTROYED,chartId:this.chartController.getChartId()};this.eventService.dispatchEvent(e)},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.chartProxy&&this.chartProxy.destroy(),this.destroyBean(this.chartMenu),this.destroyBean(this.titleEdit),this.chartDialog&&this.chartDialog.isAlive()&&this.destroyBean(this.chartDialog);var t=this.getGui();ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.clearElement(t),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.removeFromParent(t),this.raiseChartDestroyedEvent()},t.TEMPLATE='<div class="ag-chart" tabindex="-1">\n            <div ref="eChartContainer" tabindex="-1" class="ag-chart-components-wrapper">\n                <div ref="eChart" class="ag-chart-canvas-wrapper"></div>\n                <div ref="eEmpty" class="ag-chart-empty-text ag-unselectable"></div>\n            </div>\n            <div ref="eTitleEditContainer"></div>\n            <div ref="eMenuContainer" class="ag-chart-docked-container"></div>\n        </div>',__decorate$N([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eChart")],t.prototype,"eChart",void 0),__decorate$N([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eChartContainer")],t.prototype,"eChartContainer",void 0),__decorate$N([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eMenuContainer")],t.prototype,"eMenuContainer",void 0),__decorate$N([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eEmpty")],t.prototype,"eEmpty",void 0),__decorate$N([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eTitleEditContainer")],t.prototype,"eTitleEditContainer",void 0),__decorate$N([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("chartCrossFilterService")],t.prototype,"crossFilterService",void 0),__decorate$N([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("chartTranslationService")],t.prototype,"chartTranslationService",void 0),__decorate$N([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("gridApi")],t.prototype,"gridApi",void 0),__decorate$N([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("popupService")],t.prototype,"popupService",void 0),__decorate$N([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"init",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),VERSION$a="29.2.0",__assign$b=function(){return __assign$b=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$b.apply(this,arguments)},__rest=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(r[o[i]]=e[o[i]])}return r},__read$d=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},__values$4=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);
2if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function upgradeChartModel(e){return e.version,null==e.version&&(e.version=heuristicVersionDetection(e)),e=migrateIfBefore("23.0.0",e,migrateV23),e=migrateIfBefore("24.0.0",e,migrateV24),e=migrateIfBefore("25.1.0",e,migrateV25_1),e=migrateIfBefore("26.0.0",e,migrateV26),e=migrateIfBefore("26.1.0",e,migrateV26_1),e=migrateIfBefore("26.2.0",e,migrateV26_2),e=migrateIfBefore("28.0.0",e,migrateV28),e=migrateIfBefore("28.2.0",e,migrateV28_2),e=cleanup(e=migrateIfBefore("29.0.0",e,migrateV29)),migrateIfBefore(VERSION$a,e,function(e){return e})}function migrateV23(e){return e=jsonRename("chartOptions.legend.item.marker.type","shape",e),e=jsonRename("chartOptions.seriesDefaults.marker.type","shape",e),jsonRename("chartOptions.legend.padding","spacing",e)}function migrateV24(e){var t,r=e=jsonDelete("chartOptions.seriesDefaults.marker.minSize",e),o=r.chartType,i=r.chartPalette,n=r.chartOptions,a=n.xAxis,s=n.yAxis,l=__rest(n,["xAxis","yAxis"]),c=__rest(r,["chartType","chartPalette","chartOptions"]),u=getLegacyAxisType(o),d=null==u?void 0:u.map(function(e,t){return __assign$b({type:e},0===t?a:s)});return __assign$b({chartType:o,chartThemeName:null!==(t=LEGACY_PALETTES[i])&&void 0!==t?t:"ag-default",chartOptions:__assign$b(__assign$b({},l),{axes:d,xAxis:a,yAxis:s})},c)}function migrateV25_1(e){return jsonRename("chartOptions.seriesDefaults.label.minRequiredA
2ngle","minAngle",e)}function migrateV26(e){return e=jsonMutate("chartOptions.seriesDefaults.highlightStyle",e,function(e){var t=e.dimOpacity,r=__rest(e,["dimOpacity"]);return __assign$b(__assign$b({},r),null!=t?{series:{dimOpacity:t}}:{})}),e=jsonDelete("chart",e),e=jsonDelete("chartOptions.seriesDefaults.tooltipClass",e),e=jsonDeleteDefault("chartOptions.axes[].label.rotation",0,e=jsonDelete("chartOptions.seriesDefaults.tooltipTracking",e)),jsonDeleteDefault("chartOptions.axes[].label.rotation",335,e)}function migrateV26_1(e){var t=function(e){var t=e.item,r=e.series,o=__rest(e,["item","series"]);return __assign$b({item:__assign$b(__assign$b({},o),t)},r?{series:r}:{})};return e=jsonMutate("chartOptions.seriesDefaults.highlightStyle",e,t),jsonMutate("chartOptions.series[].highlightStyle",e,t)}function migrateV26_2(e){e=jsonMove("chartOptions.seriesDefaults.fill.opacity","chartOptions.seriesDefaults.fillOpacity",e),e=jsonMove("chartOptions.seriesDefaults.stroke.opacity","chartOptions.seriesDefaults.strokeOpacity",e),e=jsonDelete("chartOptions.seriesDefaults.fill",e=jsonMove("chartOptions.seriesDefaults.stroke.width","chartOptions.seriesDefaults.strokeWidth",e)),e=jsonDelete("chartOptions.seriesDefaults.stroke",e),e=jsonDelete("chartOptions.seriesDefaults.callout.colors",e),e=jsonDelete("chartOptions.xAxis",e);var t=e=jsonDelete("chartOptions.yAxis",e),r=t.chartType,o=t.chartOptions,i=o.axes;o.series;var n=o.seriesDefaults,a=__rest(o,["axes","series","seriesDefaults"]),s=__rest(t,["chartType","chartOptions"]),l=[getSeriesType(r)],c={};if(!l.includes("pie")){var u={top:{},bottom:{},left:{},right:{}},d=i.map(function(e){var t,r=e.type,o=__rest(e,["type"]);return(t={})[r]=__assign$b(__assign$b({},u),o),t}).reduce(merge,{});ALL_AXIS_TYPES.filter(function(e){return null==d[e]}).forEach(function(e){d[e]=__assign$b({},u)}),c.axes=d}var p=l.map(function(e){var t;return(t={})[e]=__assign$b(__assign$b(__assign$b({},c),{series:n}),a),t}).reduce(merge,{});return __assign$b(__assign$b({},s),{chartType:r,chartOptions:p})}function migrateV28(e){return e=jsonDelete("chartOptions.*.title.padding",e),e=jsonDelete("chartOptions.*.subtitle.padding",e),jsonBackfill("chartOptions.*.axes.*.title.enabled",!1,e=jsonDelete("chartOptions.*.axes.*.title.padding",e))}function migrateV28_2(e){return e=jsonRename("chartOptions.pie.series.callout","calloutLine",e),jsonRename("chartOptions.pie.series.label","calloutLabel",e)}function migrateV29(e){return e=jsonMoveIfMissing("chartOptions.scatter.series.fill","chartOptions.scatter.series.marker.fill",e),e=jsonMoveIfMissing("chartOptions.scatter.series.fillOpacity","chartOptions.scatter.series.marker.fillOpacity",e),e=jsonMoveIfMissing("chartOptions.scatter.series.stroke","chartOptions.scatter.series.marker.stroke",e),e=jsonMoveIfMissing("chartOptions.scatter.series.strokeOpacity","chartOptions.scatter.series.marker.strokeOpacity",e),jsonMove("chartOptions.scatter.series.paired","chartOptions.scatter.paired",e=jsonMoveIfMissing("chartOptions.scatter.series.strokeWidth","chartOptions.scatter.series.marker.strokeWidth",e))}function cleanup(e){return e=jsonDelete("chartOptions.*.width",e),jsonBackfill("chartOptions.*.axes.category.label.autoRotate",!0,e=jsonDelete("chartOptions.*.height",e))}function heuristicVersionDetection(e){var t,r,o=e;if(null!=e.version)return e.version;var i=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return Object.keys(e||{}).some(function(e){return t.includes(e)})},n=o.chartOptions,a=i(n,"seriesDefaults")?null==n?void 0:n.seriesDefaults:null==n?void 0:n[Object.keys(n)[0]],s={"27.0.0":i(o,"seriesChartTypes"),"26.2.0":!i(n,"seriesDefaults"),"26.1.0":i(null==a?void 0:a.highlightStyle,"item"),"26.0.0":i(null==a?void 0:a.highlightStyle,"series"),"25.1.0":i(null==a?void 0:a.label,"minAngle"),"25.0.0":i(o,"modelType","aggFunc","unlinkChart","suppressChartRanges")||i(a,"lineDash","lineDashOffset"),"24.0.0":i(o,"chartThemeName","chart")||i(n,"series"),"23.2.0":i(n,"navigator"),"23.0.0":i(null===(r=null===(t=null==n?void 0:n.legend)||void 0===t?void 0:t.item)||void 0===r?void 0:r.marker,"shape"),"22.1.0":i(o,"chartPalette","chartType")},l=Object.entries(s).filter(function(e){var t=__read$d(e,2);return t[0],t[1]}),c=__read$d(l[0],1)[0];return void 0===c?"27.1.0":c}function migrateIfBefore(e,t,r){if(versionNumber(e)>versionNumber(t.version)){var o=r(t);return o.version=e,o}return t}function versionParts(e){var t="string"==typeof e?e.split(".").map(function(e){return Number(e)}):[];if(3!==t.length||t.some(function(e){return isNaN(e)}))throw new Error("AG Grid - Illegal version string: "+e);return{major:t[0],minor:t[1],patch:t[2]}}function versionNumber(e){var t=versionParts(e);return 1e4*t.major+100*t.minor+t.patch}function jsonDeleteDefault(e,t,r){return jsonMutateProperty(e,!0,r,function(e,r){e[r]===t&&delete e[r]})}function jsonBackfill(e,t,r){return jsonMutateProperty(e,!1,r,function(e,r){null==e[r]&&(e[r]=t)})}function jsonMove(e,t,r){var o=void 0,i=!1;return r=jsonMutateProperty(e,!0,r,function(e,t){i=!0,o=e[t],delete e[t]}),i?jsonMutateProperty(t,!1,r,function(e,t){e[t]=o}):r}function jsonMoveIfMissing(e,t,r){var o=void 0,i=!1;return r=jsonMutateProperty(e,!0,r,function(e,t){i=!0,o=e[t],delete e[t]}),i?jsonMutateProperty(t,!1,r,function(e,t){void 0===e[t]&&(e[t]=o)}):r}function jsonRename(e,t,r){return jsonMutateProperty(e,!0,r,function(e,r){e[t]=e[r],delete e[r]})}function jsonDelete(e,t){return jsonMutateProperty(e,!0,t,function(e,t){return delete e[t]})}function jsonMutateProperty(e,t,r,o){var i=e instanceof Array?e:e.split("."),n=i.slice(0,i.length-1),a=i[i.length-1];return jsonMutate(n,r,function(e){var r=Object.keys(e).includes(a);if(t&&!r)return e;var i=__assign$b({},e);return o(i,a),i})}function jsonMutate(e,t,r){var o,i,n=e instanceof Array?e:e.split(".");if(t=__assign$b({},t),0===n.length)return r(t);if(n[0].startsWith("{")){var a=n[0].substring(1,n[0].lastIndexOf("}")).split(",");try{for(var s=__values$4(a),l=s.next();!l.done;l=s.next()){var c=l.value;null!=t[c]&&(t[c]=jsonMutate(n.slice(1),t[c],r))}}catch(e){o={error:e}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}}else if(n[0].endsWith("[]")){var u=n[0].substring(0,e[0].indexOf("["));t[u]instanceof Array&&(t[u]=t[u].map(function(e){return jsonMutate(n.slice(1),e,r)}))}else if("*"===n[0])for(var d in t)t[d]=jsonMutate(n.slice(1),t[d],r);else null!=t[n[0]]&&(t[n[0]]=jsonMutate(n.slice(1),t[n[0]],r));return t}var merge=function(e,t){return __assign$b(__assign$b({},e),t)},LEGACY_PALETTES={borneo:"ag-default",material:"ag-material",pastel:"ag-pastel",bright:"ag-vivid",flat:"ag-solar"},__extends$Q=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__assign$a=function(){return __assign$a=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$a.apply(this,arguments)},__decorate$M=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},ChartService=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.activeCharts=new Set,t.activeChartComps=new Set,t.crossFilteringContext={lastSelectedChartId:""},t}return __extends$Q(t,e),t.prototype.getChartModels=function(){var e=[];return this.activeChartComps.forEach(function(t){return e.push(function(e){return __assign$a(__assign$a({},e),{version:VERSION$a})}(t.getChartModel()))}),e},t.prototype.getChartRef=function(e){var t;
2return this.activeCharts.forEach(function(r){r.chartId===e&&(t=r)}),t},t.prototype.getChartImageDataURL=function(e){var t;return this.activeChartComps.forEach(function(r){r.getChartId()===e.chartId&&(t=r.getChartImageDataURL(e.fileFormat))}),t},t.prototype.downloadChart=function(e){var t=Array.from(this.activeChartComps).find(function(t){return t.getChartId()===e.chartId});null==t||t.downloadChart(e.dimensions,e.fileName,e.fileFormat)},t.prototype.openChartToolPanel=function(e){var t=Array.from(this.activeChartComps).find(function(t){return t.getChartId()===e.chartId});null==t||t.openChartToolPanel(e.panel)},t.prototype.closeChartToolPanel=function(e){var t=Array.from(this.activeChartComps).find(function(t){return t.getChartId()===e});null==t||t.closeChartToolPanel()},t.prototype.createChartFromCurrentRange=function(e){void 0===e&&(e="groupedColumn");var t=this.getSelectedRange();return this.createChart(t,e)},t.prototype.restoreChart=function(e,t){var r=this;if(e){e.version!==VERSION$a&&(e=upgradeChartModel(e));var o={cellRange:e.cellRange,chartType:e.chartType,chartThemeName:e.chartThemeName,chartContainer:t,suppressChartRanges:e.suppressChartRanges,aggFunc:e.aggFunc,unlinkChart:e.unlinkChart,seriesChartTypes:e.seriesChartTypes},i=function(e){return r.rangeService?r.rangeService.createCellRangeFromCellRangeParams(e):void 0};if("pivot"===e.modelType){this.columnModel.isPivotMode()||this.columnModel.setPivotMode(!0,"pivotChart");var n=i({rowStartIndex:null,rowStartPinned:void 0,rowEndIndex:null,rowEndPinned:void 0,columns:this.columnModel.getAllDisplayedColumns().map(function(e){return e.getColId()})});return n?this.createChart(n,o.chartType,o.chartThemeName,!0,!0,o.chartContainer,void 0,void 0,o.unlinkChart,!1,e.chartOptions):void console.warn("AG Grid - unable to create chart as there are no columns in the grid.")}var a=i(o.cellRange);if(a)return this.createChart(a,o.chartType,o.chartThemeName,!1,o.suppressChartRanges,o.chartContainer,o.aggFunc,void 0,o.unlinkChart,!1,e.chartOptions,e.chartPalette,o.seriesChartTypes);console.warn("AG Grid - unable to create chart as no range is selected")}else console.warn("AG Grid - unable to restore chart as no chart model is provided")},t.prototype.createRangeChart=function(e){var t=this.rangeService?this.rangeService.createCellRangeFromCellRangeParams(e.cellRange):void 0;if(t)return this.createChart(t,e.chartType,e.chartThemeName,!1,e.suppressChartRanges,e.chartContainer,e.aggFunc,e.chartThemeOverrides,e.unlinkChart,void 0,void 0,void 0,e.seriesChartTypes);console.warn("AG Grid - unable to create chart as no range is selected")},t.prototype.createPivotChart=function(e){this.columnModel.isPivotMode()||this.columnModel.setPivotMode(!0,"pivotChart");var t={rowStartIndex:null,rowStartPinned:void 0,rowEndIndex:null,rowEndPinned:void 0,columns:this.columnModel.getAllDisplayedColumns().map(function(e){return e.getColId()})},r=this.rangeService?this.rangeService.createCellRangeFromCellRangeParams(t):void 0;if(r)return this.createChart(r,e.chartType,e.chartThemeName,!0,!0,e.chartContainer,void 0,e.chartThemeOverrides,e.unlinkChart);console.warn("AG Grid - unable to create chart as there are no columns in the grid.")},t.prototype.createCrossFilterChart=function(e){var t=this.rangeService?this.rangeService.createCellRangeFromCellRangeParams(e.cellRange):void 0;if(t){var r=!(void 0!==e.suppressChartRanges&&null!==e.suppressChartRanges)||e.suppressChartRanges;return this.createChart(t,e.chartType,e.chartThemeName,!1,r,e.chartContainer,e.aggFunc,e.chartThemeOverrides,e.unlinkChart,!0)}console.warn("AG Grid - unable to create chart as no range is selected")},t.prototype.createChart=function(e,t,r,o,i,n,a,s,l,c,u,d,p){var h=this;void 0===o&&(o=!1),void 0===i&&(i=!1),void 0===l&&(l=!1),void 0===c&&(c=!1);var _=this.gridOptionsService.getCallback("createChartContainer"),f={chartId:this.generateId(),pivotChart:o,cellRange:e,chartType:t,chartThemeName:r,insideDialog:!(n||_),suppressChartRanges:i,aggFunc:a,chartThemeOverrides:s,unlinkChart:l,crossFiltering:c,crossFilteringContext:this.crossFilteringContext,chartOptionsToRestore:u,chartPaletteToRestore:d,seriesChartTypes:p,crossFilteringResetCallback:function(){return h.activeChartComps.forEach(function(e){return e.crossFilteringReset()})}},g=new GridChartComp(f);this.context.createBean(g);var y=this.createChartRef(g);if(n){n.appendChild(g.getGui());var m=this.environment.getTheme();m.el&&!m.el.contains(n)&&n.classList.add(m.theme)}else _?_(y):g.addEventListener(GridChartComp.EVENT_DESTROYED,function(){h.activeChartComps.delete(g),h.activeCharts.delete(y)});return y},t.prototype.createChartRef=function(e){var t=this,r={destroyChart:function(){t.activeCharts.has(r)&&(t.context.destroyBean(e),t.activeChartComps.delete(e),t.activeCharts.delete(r))},chartElement:e.getGui(),chart:e.getUnderlyingChart(),chartId:e.getChartModel().chartId};return this.activeCharts.add(r),this.activeChartComps.add(e),r},t.prototype.getSelectedRange=function(){var e=this.rangeService.getCellRanges();return e.length>0?e[0]:{}},t.prototype.generateId=function(){return"id-"+Math.random().toString(36).substr(2,16)},t.prototype.destroyAllActiveCharts=function(){this.activeCharts.forEac
2h(function(e){return e.destroyChart()})},t.CHARTS_VERSION=VERSION$b,__decorate$M([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Optional)("rangeService")],t.prototype,"rangeService",void 0),__decorate$M([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],t.prototype,"columnModel",void 0),__decorate$M([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PreDestroy],t.prototype,"destroyAllActiveCharts",null),__decorate$M([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Bean)("chartService")],t)}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.BeanStub),__extends$P=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$L=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},ChartTranslationService=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}var r;return __extends$P(t,e),r=t,t.prototype.translate=function(e,t){return this.localeService.getLocaleTextFunc()(e,r.DEFAULT_TRANSLATIONS[e]||t)},t.DEFAULT_TRANSLATIONS={pivotChartTitle:"Pivot Chart",rangeChartTitle:"Range Chart",settings:"Settings",data:"Data",format:"Format",categories:"Categories",defaultCategory:"(None)",series:"Series",xyValues:"X Y Values",paired:"Paired Mode",axis:"Axis",navigator:"Navigator",color:"Color",thickness:"Thickness",xType:"X Type",automatic:"Automatic",category:"Category",number:"Number",time:"Time",autoRotate:"Auto Rotate",xRotation:"X Rotation",yRotation:"Y Rotation",ticks:"Ticks",width:"Width",height:"Height",length:"Length",padding:"Padding",spacing:"Spacing",chart:"Chart",title:"Title",titlePlaceholder:"Chart title - double click to edit",background:"Backgroun
2d",font:"Font",top:"Top",right:"Right",bottom:"Bottom",left:"Left",labels:"Labels",calloutLabels:"Callout Labels",sectorLabels:"Sector Labels",positionRatio:"Position Ratio",size:"Size",shape:"Shape",minSize:"Minimum Size",maxSize:"Maximum Size",legend:"Legend",position:"Position",markerSize:"Marker Size",markerStroke:"Marker Stroke",markerPadding:"Marker Padding",itemSpacing:"Item Spacing",itemPaddingX:"Item Padding X",itemPaddingY:"Item Padding Y",layoutHorizontalSpacing:"Horizontal Spacing",layoutVerticalSpacing:"Vertical Spacing",strokeWidth:"Stroke Width",offset:"Offset",offsets:"Offsets",tooltips:"Tooltips",callout:"Callout",markers:"Markers",shadow:"Shadow",blur:"Blur",xOffset:"X Offset",yOffset:"Y Offset",lineWidth:"Line Width",lineDash:"Line Dash",normal:"Normal",bold:"Bold",italic:"Italic",boldItalic:"Bold Italic",predefined:"Predefined",fillOpacity:"Fill Opacity",strokeOpacity:"Line Opacity",histogramBinCount:"Bin count",columnGroup:"Column",barGroup:"Bar",pieGroup:"Pie",lineGroup:"Line",scatterGroup:"X Y (Scatter)",areaGroup:"Area",histogramGroup:"Histogram",combinationGroup:"Combination",groupedColumnTooltip:"Grouped",stackedColumnTooltip:"Stacked",normalizedColumnTooltip:"100% Stacked",groupedBarTooltip:"Grouped",stackedBarTooltip:"Stacked",normalizedBarTooltip:"100% Stacked",pieTooltip:"Pie",doughnutTooltip:"Doughnut",lineTooltip:"Line",groupedAreaTooltip:"Area",stackedAreaTooltip:"Stacked",normalizedAreaTooltip:"100% Stacked",scatterTooltip:"Scatter",bubbleTooltip:"Bubble",histogramTooltip:"Histogram",columnLineComboTooltip:"Column & Line",areaColumnComboTooltip:"Area & Column",customComboTooltip:"Custom Combination",noDataToChart:"No data available to be charted.",pivotChartRequiresPivotMode:"Pivot Chart requires Pivot Mode enabled.",chartSettingsToolbarTooltip:"Menu",chartLinkToolbarTooltip:"Linked to Grid",chartUnlinkToolbarTooltip:"Unlinked from Grid",chartDownloadToolbarTooltip:"Download Chart",histogramFrequency:"Frequency",seriesChartType:"Series Chart Type",seriesType:"Series Type",secondaryAxis:"Secondary Axis"},r=__decorate$L([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Bean)("chartTranslationService")],t)}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.BeanStub),__extends$O=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$K=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},ChartCrossFilterService=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}var r;return __extends$O(t,e),r=t,t.prototype.filter=function(e,t){void 0===t&&(t=!1);var o=this.gridApi.getFilterModel();if(t)this.resetFilters(o);else{var i=r.extractFilterColId(e);this.isValidColumnFilter(i)?this.updateFilters(o,e,i):console.warn("AG Grid: cross filtering requires a 'agSetColumnFilter' or 'agMultiColumnFilter' to be defined on the column with id: '"+i+"'")}},t.prototype.resetFilters=function(e){Object.keys(e).length>0&&(this.gridApi.setFilterModel(null),this.gridApi.onFilterChanged())},t.prototype.updateFilters=function(e,t,o){var i,n=r.extractFilterColId(t),a=t.datum[n];if(void 0!==a){var s=a.toString();if(t.event.metaKey||t.event.ctrlKey){var l=this.getCurrentGridValuesForCategory(o),c=void 0;ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.includes(l,s)?c=l.filter(function(e){return e!==s}):(c=l).push(s),e[o]=this.getUpdatedFilterModel(o,c)}else c=[s],(i={})[o]=this.getUpdatedFilterModel(o,c),e=i;this.gridApi.setFilterModel(e)}},t.prototype.getUpdatedFilterModel=function(e,t){return"agMultiColumnFilter"===this.getColumnFilterType(e)?{filterType:"multi",filterModels:[null,{filterType:"set",values:t}]}:{filterType:"set",values:t}},t.prototype.getCurrentGridValuesForCategory=function(e){var t=this,r=[],o=this.getColumnById(e);return this.gridApi.forEachNodeAfterFilter(function(e){if(o&&!e.group){var i=t.valueService.getValue(o,e)+"";r.includes(i)||r.push(i)}}),r},t.extractFilterColId=function(e){return e.xKey||e.calloutLabelKey},t.prototype.isValidColumnFilter=function(e){e.indexOf("-filtered-out")&&(e=e.replace("-filtered-out",""));var t=this.getColumnFilterType(e);return"boolean"==typeof t?t:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.includes(["agSetColumnFilter","agMultiColumnFilter"],t)},t.prototype.getColumnFilterType=function(e){var t=this.getColumnById(e);if(t){var r=t.getColDef();return null!=r.filter?r.filter:r.filterFramework}},t.prototype.getColumnById=function(e){return this.columnModel.getGridColumn(e)},__decorate$K([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("gridApi")],t.prototype,"gridApi",void 0),__decorate$K([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],t.prototype,"columnModel",void 0),__decorate$K([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("valueService")],t.prototype,"valueService",void 0),r=__decorate$K([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Bean)("chartCrossFilterService")],t)}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.BeanStub),__extends$N=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__assign$9=function(){return __assign$9=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$9.apply(this,arguments)},__decorate$J=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},__read$c=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},__spread$7=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read$c(arguments[t]));return e},__values$3=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);
2if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},RangeService=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.cellRanges=[],t.bodyScrollListener=t.onBodyScroll.bind(t),t.dragging=!1,t.intersectionRange=!1,t}return __extends$N(t,e),t.prototype.init=function(){var e=this;this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_NEW_COLUMNS_LOADED,function(){return e.onColumnsChanged()}),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_COLUMN_VISIBLE,this.onColumnsChanged.bind(this)),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_COLUMN_VALUE_CHANGED,this.onColumnsChanged.bind(this)),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED,function(){return e.removeAllCellRanges()}),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_COLUMN_ROW_GROUP_CHANGED,function(){return e.removeAllCellRanges()}),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_COLUMN_PIVOT_CHANGED,function(){return e.removeAllCellRanges()}),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_COLUMN_GROUP_OPENED,this.refreshLastRangeStart.bind(this)),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_COLUMN_MOVED,this.refreshLastRangeStart.bind(this)),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_COLUMN_PINNED,this.refreshLastRangeStart.bind(this)),this.ctrlsService.whenReady(function(){var t=e.ctrlsService.getGridBodyCtrl();e.autoScrollService=new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AutoScrollService({scrollContainer:t.getBodyViewportElement(),scrollAxis:"xy",getVerticalPosition:function(){return t.getScrollFeature().getVScrollPosition().top},setVerticalPosition:function(e){return t.getScrollFeature().setVerticalScrollPosition(e)},getHorizontalPosition:function(){return t.getScrollFeature().getHScrollPosition().left},setHorizontalPosition:function(e){return t.getScrollFeature().setHorizontalScrollPosition(e)},shouldSkipVerticalScroll:function(){return!e.gridOptionsService.isDomLayout("normal")},shouldSkipHorizontalScroll:function(){return!t.getScrollFeature().isHorizontalScrollShowing()}})})},t.prototype.onColumnsChanged=function(){var e=this;this.refreshLastRangeStart();var t=this.columnModel.getAllDisplayedColumns();
2this.cellRanges.forEach(function(r){var o=r.columns;r.columns=r.columns.filter(function(e){return e.isVisible()&&-1!==t.indexOf(e)}),!ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.areEqual(o,r.columns)&&e.dispatchChangedEvent(!1,!0,r.id)});var r=this.cellRanges.length;this.cellRanges=this.cellRanges.filter(function(e){return e.columns.length>0}),r>this.cellRanges.length&&this.dispatchChangedEvent(!1,!0)},t.prototype.refreshLastRangeStart=function(){var e=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.last(this.cellRanges);e&&this.refreshRangeStart(e)},t.prototype.isContiguousRange=function(e){var t=e.columns;if(!t.length)return!1;var r=this.columnModel.getAllDisplayedColumns(),o=t.map(function(e){return r.indexOf(e)}).sort(function(e,t){return e-t});return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.last(o)-o[0]+1===t.length},t.prototype.getRangeStartRow=function(e){return e.startRow&&e.endRow?this.rowPositionUtils.before(e.startRow,e.endRow)?e.startRow:e.endRow:{rowIndex:0,rowPinned:this.pinnedRowModel.getPinnedTopRowCount()>0?"top":null}},t.prototype.getRangeEndRow=function(e){if(e.startRow&&e.endRow)return this.rowPositionUtils.before(e.startRow,e.endRow)?e.endRow:e.startRow;var t=this.pinnedRowModel.getPinnedBottomRowCount();return t>0?{rowIndex:t-1,rowPinned:"bottom"}:{rowIndex:this.rowModel.getRowCount()-1,rowPinned:null}},t.prototype.setRangeToCell=function(e,t){if(void 0===t&&(t=!1),this.gridOptionsService.isEnableRangeSelection()){var r=this.calculateColumnsBetween(e.column,e.column);if(r){(this.gridOptionsService.is("suppressMultiRangeSelection")||!t||ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.missing(this.cellRanges))&&this.removeAllCellRanges(!0);var o={rowIndex:e.rowIndex,rowPinned:e.rowPinned},i={startRow:o,endRow:o,columns:r,startColumn:e.column};this.cellRanges.push(i),this.setNewestRangeStartCell(e),this.onDragStop(),this.dispatchChangedEvent(!0,!0)}}},t.prototype.extendLatestRangeToCell=function(e){if(!this.isEmpty()&&this.newestRangeStartCell){var t=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.last(this.cellRanges);this.updateRangeEnd(t,e)}},t.prototype.updateRangeEnd=function(e,t,r){void 0===r&&(r=!1);var o=t.column,i=this.calculateColumnsBetween(e.startColumn,o);i&&!this.isLastCellOfRange(e,t)&&(e.columns=i,e.endRow={rowIndex:t.rowIndex,rowPinned:t.rowPinned},r||this.dispatchChangedEvent(!0,!0,e.id))},t.prototype.refreshRangeStart=function(e){var t=e.startColumn,r=e.columns,o=function(t,r){var o=e.columns.filter(function(e){return e!==t});t?(e.startColumn=t,e.columns=r?__spread$7([t],o):__spread$7(o,[t])):e.columns=o},i=this.getRangeEdgeColumns(e),n=i.left,a=i.right;t===r[0]&&t!==n?o(n,!0):t===ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.last(r)&&t===a&&o(a,!1)},t.prototype.getRangeEdgeColumns=function(e){var t=this.columnModel.getAllDisplayedColumns(),r=e.columns.map(function(e){return t.indexOf(e)}).filter(function(e){return e>-1}).sort(function(e,t){return e-t});return{left:t[r[0]],right:t[ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.last(r)]}},t.prototype.extendLatestRangeInDirection=function(e){if(!this.isEmpty()&&this.newestRangeStartCell){var t=e.key,r=e.ctrlKey||e.metaKey,o=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.last(this.cellRanges),i=this.newestRangeStartCell,n=o.columns[0],a=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.last(o.columns),s=o.endRow.rowIndex,l=o.endRow.rowPinned,c={column:i.column===n?a:n,rowIndex:s,rowPinned:l},u=this.cellNavigationService.getNextCellToFocus(t,c,r);if(u)return this.setCellRange({rowStartIndex:i.rowIndex,rowStartPinned:i.rowPinned,rowEndIndex:u.rowIndex,rowEndPinned:u.rowPinned,columnStart:i.column,columnEnd:u.column}),u}},t.prototype.setCellRange=function(e){this.gridOptionsService.isEnableRangeSelection()&&(this.removeAllCellRanges(!0),this.addCellRange(e))},t.prototype.setCellRanges=function(e){var t=this;ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.shallowCompare(this.cellRanges,e)||(this.removeAllCellRanges(!0),e.forEach(function(e){e.columns&&e.startRow&&t.setNewestRangeStartCell({rowIndex:e.startRow.rowIndex,rowPinned:e.startRow.rowPinned,column:e.columns[0]}),t.cellRanges.push(e)}),this.dispatchChangedEvent(!1,!0))},t.prototype.setNewestRangeStartCell=function(e){this.newestRangeStartCell=e},t.prototype.clearCellRangeCellValues=function(e,t){var r=this;void 0===t&&(t="rangeService"),e||(e=this.cellRanges),e.forEach(function(e){r.forEachRowInRange(e,function(o){var i=r.rowPositionUtils.getRowNode(o);if(i)for(var n=0;n<e.columns.length;n++){var a=r.columnModel.getGridColumn(e.columns[n]);if(!a||!a.isCellEditable(i))return;i.setDataValue(a,null,t)}})})},t.prototype.createCellRangeFromCellRangeParams=function(e){var t,r=this,o=!1;if(e.columns)t=e.columns.map(function(e){return r.columnModel.getColumnWithValidation(e)}).filter(function(e){return e});else{var i=this.columnModel.getColumnWithValidation(e.columnStart),n=this.columnModel.getColumnWithValidation(e.columnEnd);if(!i||!n)return;(t=this.calculateColumnsBetween(i,n))&&t.length&&(o=t[0]!==i)}if(t)return{startRow:null!=e.rowStartIndex?{rowIndex:e.rowStartIndex,rowPinned:e.rowStartPinned||null}:void 0,endRow:null!=e.rowEndIndex?{rowIndex:e.rowEndIndex,rowPinned:e.rowEndPinned||null}:void 0,columns:t,startColumn:o?ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.last(t):t[0]}},t.prototype.addCellRange=function(e){if(this.gridOptionsService.isEnableRangeSelection()){var t=this.createCellRangeFromCellRangeParams(e);t&&(t.startRow&&this.setNewestRangeStartCell({rowIndex:t.startRow.rowIndex,rowPinned:t.startRow.rowPinned,column:t.startColumn}),this.cellRanges.push(t),this.dispatchChangedEvent(!1,!0,t.id))}},t.prototype.getCellRanges=function(){return this.cellRanges},t.prototype.isEmpty=function(){return 0===this.cellRanges.length},t.prototype.isMoreThanOneCell=function(){var e=this.cellRanges.length;if(0===e)return!1;if(e>1)return!0;var t=this.cellRanges[0],r=this.getRangeStartRow(t),o=this.getRangeEndRow(t);return r.rowPinned!==o.rowPinned||r.rowIndex!==o.rowIndex||1!==t.columns.length},t.prototype.areAllRangesAbleToMerge=function(){var e,t,r,o=this,i=new Map;if(this.cellRanges.length<=1)return!0;
2this.cellRanges.forEach(function(e){o.forEachRowInRange(e,function(t){var r=(t.rowPinned||"normal")+"_"+t.rowIndex,o=i.get(r),n=e.columns.map(function(e){return e.getId()});if(o){var a=n.filter(function(e){return-1===o.indexOf(e)});o.push.apply(o,__spread$7(a))}else i.set(r,n)})});try{for(var n=__values$3(i.values()),a=n.next();!a.done;a=n.next()){var s=a.value.sort().join();if(void 0!==r){if(r!==s)return!1}else r=s}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return!0},t.prototype.forEachRowInRange=function(e,t){for(var r=this.getRangeStartRow(e),o=this.getRangeEndRow(e),i=r;i&&(t(i),!this.rowPositionUtils.sameRow(i,o));)i=this.cellNavigationService.getRowBelow(i)},t.prototype.removeAllCellRanges=function(e){this.isEmpty()||(this.onDragStop(),this.cellRanges.length=0,e||this.dispatchChangedEvent(!1,!0))},t.prototype.onBodyScroll=function(){this.dragging&&this.lastMouseEvent&&this.onDragging(this.lastMouseEvent)},t.prototype.isCellInAnyRange=function(e){return this.getCellRangeCount(e)>0},t.prototype.isCellInSpecificRange=function(e,t){var r=null!==t.columns&&ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.includes(t.columns,e.column),o=this.isRowInRange(e.rowIndex,e.rowPinned,t);return r&&o},t.prototype.isLastCellOfRange=function(e,t){var r=e.startRow,o=e.endRow,i=this.rowPositionUtils.before(r,o)?o:r,n=t.rowIndex===i.rowIndex&&t.rowPinned===i.rowPinned,a=e.columns[0],s=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.last(e.columns),l=e.startColumn===a?s:a;return t.column===l&&n},t.prototype.isBottomRightCell=function(e,t){var r=this.columnModel.getAllDisplayedColumns(),o=e.columns.map(function(e){return r.indexOf(e)}).sort(function(e,t){return e-t}),i=e.startRow,n=e.endRow,a=this.rowPositionUtils.before(i,n)?n:i,s=r.indexOf(t.column)===ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.last(o),l=t.rowIndex===a.rowIndex&&ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.makeNull(t.rowPinned)===ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.makeNull(a.rowPinned);return s&&l},t.prototype.getCellRangeCount=function(e){var t=this;return this.isEmpty()?0:this.cellRanges.filter(function(r){return t.isCellInSpecificRange(e,r)}).length},t.prototype.isRowInRange=function(e,t,r){var o=this.getRangeStartRow(r),i=this.getRangeEndRow(r),n={rowIndex:e,rowPinned:t||null},a=n.rowIndex===o.rowIndex&&n.rowPinned==o.rowPinned,s=n.rowIndex===i.rowIndex&&n.rowPinned==i.rowPinned;if(a||s)return!0;var l=!this.rowPositionUtils.before(n,o),c=this.rowPositionUtils.before(n,i);return l&&c},t.prototype.getDraggingRange=function(){return this.draggingRange},t.prototype.onDragStart=function(e){if(this.gridOptionsService.isEnableRangeSelection()){var t=e.ctrlKey,r=e.metaKey,o=e.shiftKey,i=t||r,n=!this.gridOptionsService.is("suppressMultiRangeSelection")&&i,a=o&&ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.existsAndNotEmpty(this.cellRanges);if(n||a&&!ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.exists(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.last(this.cellRanges).type)||this.removeAllCellRanges(!0),this.cellHoverListener=this.addManagedListener(this.ctrlsService.getGridCtrl().getGui(),"mousemove",this.updateValuesOnMove.bind(this)),this.updateValuesOnMove(e),this.lastCellHovered){if(this.dragging=!0,this.lastMouseEvent=e,this.intersectionRange=n&&this.getCellRangeCount(this.lastCellHovered)>1,a||this.setNewestRangeStartCell(this.lastCellHovered),this.cellRanges.length>0)this.draggingRange=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.last(this.cellRanges);else{var s={rowIndex:this.lastCellHovered.rowIndex,rowPinned:this.lastCellHovered.rowPinned};this.draggingRange={startRow:s,endRow:s,columns:[this.lastCellHovered.column],startColumn:this.newestRangeStartCell.column},this.cellRanges.push(this.draggingRange)}this.ctrlsService.getGridBodyCtrl().addScrollEventListener(this.bodyScrollListener),this.dispatchChangedEvent(!0,!1,this.draggingRange.id)}}},t.prototype.intersectLastRange=function(e){var t=this;if(!(e&&this.dragging||this.gridOptionsService.is("suppressMultiRangeSelection")||this.isEmpty())){var r=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.last(this.cellRanges),o=this.getRangeStartRow(r),i=this.getRangeEndRow(r),n=[];
2this.cellRanges.slice(0,-1).forEach(function(e){var a=t.getRangeStartRow(e),s=t.getRangeEndRow(e),l=e.columns,c=l.filter(function(e){return-1===r.columns.indexOf(e)});if(c.length!==l.length)if(t.rowPositionUtils.before(i,a)||t.rowPositionUtils.before(s,o))n.push(e);else{var u=n.length;if(t.rowPositionUtils.before(a,o)){var d={columns:__spread$7(l),startColumn:r.startColumn,startRow:__assign$9({},a),endRow:t.cellNavigationService.getRowAbove(o)};n.push(d)}if(c.length>0){var p={columns:c,startColumn:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.includes(c,r.startColumn)?r.startColumn:c[0],startRow:t.rowPositionUtils.rowMax([__assign$9({},o),__assign$9({},a)]),endRow:t.rowPositionUtils.rowMin([__assign$9({},i),__assign$9({},s)])};n.push(p)}t.rowPositionUtils.before(i,s)&&n.push({columns:__spread$7(l),startColumn:r.startColumn,startRow:t.cellNavigationService.getRowBelow(i),endRow:__assign$9({},s)}),n.length-u===1&&(n[n.length-1].id=e.id)}else n.push(e)}),this.cellRanges=n,e&&this.dispatchChangedEvent(!1,!0)}},t.prototype.updateValuesOnMove=function(e){var t=this.mouseEventService.getCellPositionForEvent(e);this.cellHasChanged=!1,!t||this.lastCellHovered&&this.cellPositionUtils.equals(t,this.lastCellHovered)||(this.lastCellHovered&&(this.cellHasChanged=!0),this.lastCellHovered=t)},t.prototype.onDragging=function(e){var t=this;if(this.dragging&&e){this.lastMouseEvent=e;var r=this.lastCellHovered,o=function(e){return r&&r.rowPinned===e&&t.newestRangeStartCell.rowPinned===e},i=o("top")||o("bottom");if(this.autoScrollService.check(e,i),this.cellHasChanged){var n=this.calculateColumnsBetween(this.newestRangeStartCell.column,r.column);n&&(this.draggingRange.endRow={rowIndex:r.rowIndex,rowPinned:r.rowPinned},this.draggingRange.columns=n,this.dispatchChangedEvent(!1,!1,this.draggingRange.id))}}},t.prototype.onDragStop=function(){if(this.cellHoverListener&&(this.cellHoverListener(),this.cellHoverListener=void 0),this.dragging){var e=this.draggingRange.id;this.autoScrollService.ensureCleared(),this.ctrlsService.getGridBodyCtrl().removeScrollEventListener(this.bodyScrollListener),this.lastMouseEvent=null,this.dragging=!1,this.draggingRange=void 0,this.lastCellHovered=void 0,this.intersectionRange&&(this.intersectionRange=!1,this.intersectLastRange()),this.dispatchChangedEvent(!1,!0,e)}},t.prototype.dispatchChangedEvent=function(e,t,r){var o={type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_RANGE_SELECTION_CHANGED,started:e,finished:t,id:r};this.eventService.dispatchEvent(o)},t.prototype.calculateColumnsBetween=function(e,t){var r=this.columnModel.getAllDisplayedColumns(),o=e===t,i=r.indexOf(e);if(i<0)console.warn("AG Grid: column "+e.getId()+" is not visible");else{var n=o?i:r.indexOf(t);if(!(n<0)){if(o)return[e];for(var a=Math.min(i,n),s=a===i?n:i,l=[],c=a;c<=s;c++)l.push(r[c]);return l}console.warn("AG Grid: column "+t.getId()+" is not visible")}},__decorate$J([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("rowModel")],t.prototype,"rowModel",void 0),__decorate$J([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],t.prototype,"columnModel",void 0),__decorate$J([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("mouseEventService")],t.prototype,"mouseEventService",void 0),__decorate$J([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("cellNavigationService")],t.prototype,"cellNavigationService",void 0),__decorate$J([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("pinnedRowModel")],t.prototype,"pinnedRowModel",void 0),__decorate$J([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("rowPositionUtils")],t.prototype,"rowPositionUtils",void 0),__decorate$J([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("cellPositionUtils")],t.prototype,"cellPositionUtils",void 0),__decorate$J([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("ctrlsService")],t.prototype,"ctrlsService",void 0),__decorate$J([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"init",null),__decorate$J([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Bean)("rangeService")],t)}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.BeanStub),__extends$M=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$I=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},AbstractSelectionHandle=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.changedCalculatedValues=!1,t.dragging=!1,t.shouldDestroyOnEndDragging=!1,t}return __extends$M(t,e),t.prototype.init=function(){var e=this;this.dragService.addDragSource({dragStartPixels:0,eElement:this.getGui(),onDragStart:this.onDragStart.bind(this),onDragging:function(t){e.dragging=!0,e.rangeService.autoScrollService.check(t),e.changedCalculatedValues&&(e.onDrag(t),e.changedCalculatedValues=!1)},onDragStop:function(t){e.dragging=!1,e.onDragEnd(t),e.clearValues(),e.rangeService.autoScrollService.ensureCleared(),document.body.classList.remove(e.getDraggingCssClass()),e.shouldDestroyOnEndDragging&&e.destroy()}}),this.addManagedListener(this.getGui(),"mousedown",this.preventRangeExtension.bind(this))},t.prototype.isDragging=function(){return this.dragging},t.prototype.getCellCtrl=function(){return this.cellCtrl},t.prototype.setCellCtrl=function(e){this.cellCtrl=e},t.prototype.getCellRange=function(){return this.cellRange},t.prototype.setCellRange=function(e){this.cellRange=e},t.prototype.getRangeStartRow=function(){return this.rangeStartRow},t.prototype.setRangeStartRow=function(e){this.rangeStartRow=e},t.prototype.getRangeEndRow=function(){return this.rangeEndRow},t.prototype.setRangeEndRow=function(e){this.rangeEndRow=e},t.prototype.getLastCellHovered=function(){return this.lastCellHovered},t.prototype.preventRangeExtension=function(e){e.stopPropagation()},t.prototype.onDragStart=function(e){this.cellHoverListener=this.addManagedListener(this.ctrlsService.getGridCtrl().getGui(),"mousemove",this.updateV
2aluesOnMove.bind(this)),document.body.classList.add(this.getDraggingCssClass())},t.prototype.getDraggingCssClass=function(){return"ag-dragging-"+(this.type===ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.SelectionHandleType.FILL?"fill":"range")+"-handle"},t.prototype.updateValuesOnMove=function(e){var t=this.mouseEventService.getCellPositionForEvent(e);!t||this.lastCellHovered&&this.cellPositionUtils.equals(t,this.lastCellHovered)||(this.lastCellHovered=t,this.changedCalculatedValues=!0)},t.prototype.getType=function(){return this.type},t.prototype.refresh=function(e){var t=this.getCellCtrl(),r=this.getGui(),o=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.last(this.rangeService.getCellRanges()),i=o.startRow,n=o.endRow;if(i&&n&&(this.rowPositionUtils.before(n,i)?(this.setRangeStartRow(n),this.setRangeEndRow(i)):(this.setRangeStartRow(i),this.setRangeEndRow(n))),t!==e||!ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.isVisible(r)){this.setCellCtrl(e);var a=e.getComp().getParentOfValue();a&&a.appendChild(r)}this.setCellRange(o)},t.prototype.clearValues=function(){this.lastCellHovered=void 0,this.removeListeners()},t.prototype.removeListeners=function(){this.cellHoverListener&&(this.cellHoverListener(),this.cellHoverListener=void 0)},t.prototype.destroy=function(){if(!this.shouldDestroyOnEndDragging&&this.isDragging())return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setDisplayed(this.getGui(),!1),void(this.shouldDestroyOnEndDragging=!0);this.shouldDestroyOnEndDragging=!1,e.prototype.destroy.call(this),this.removeListeners();var t=this.getGui();t.parentElement&&t.parentElement.removeChild(t)},__decorate$I([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("rowRenderer")],t.prototype,"rowRenderer",void 0),__decorate$I([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("dragService")],t.prototype,"dragService",void 0),__decorate$I([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("rangeService")],t.prototype,"rangeService",void 0),__decorate$I([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("mouseEventService")],t.prototype,"mouseEventService",void 0),__decorate$I([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],t.prototype,"columnModel",void 0),__decorate$I([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("cellNavigationService")],t.prototype,"cellNavigationService",void 0),__decorate$I([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("navigationService")],t.prototype,"navigationService",void 0),__decorate$I([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("rowPositionUtils")],t.prototype,"rowPositionUtils",void 0),__decorate$I([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("cellPositionUtils")],t.prototype,"cellPositionUtils",void 0),__decorate$I([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("ctrlsService")],t.prototype,"ctrlsService",void 0),__decorate$I([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"init",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component);function findLineByLeastSquares(e){var t=e.length,r=0;if(t<=1)return e;for(var o=0;o<e.length;o++){var i=e[o],n=i.toString().split("e-");n.length>1?r=Math.max(r,parseInt(n[1],10)):Math.floor(i)!==i&&(r=Math.max(r,i.toString().split(".")[1].length))}for(var a=0,s=0,l=0,c=0,u=0,d=0;d<t;d++)a+=d,s+=u=e[d],c+=d*d,l+=d*u;var p=(t*l-a*s)/(t*c-a*a),h=s/t-p*a/t,_=[];for(d=0;d<=t;d++)_.push(parseFloat((d*p+h).toFixed(r)));return _}var __extends$L=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__assign$8=function(){return __assign$8=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$8.apply(this,arguments)},__decorate$H=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},__read$b=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},__spread$6=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read$b(arguments[t]));return e},FillHandle=function(e){function t(){var r=e.call(this,t.TEMPLATE)||this;return r.markedCells=[],r.cellValues=[],r.isUp=!1,r.isLeft=!1,r.isReduce=!1,r.type=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.SelectionHandleType.FILL,r}return __extends$L(t,e),t.prototype.updateValuesOnMove=function(t){e.prototype.updateValuesOnMove.call(this,t),this.initialXY||(this.initialXY=this.mouseEventService.getNormalisedPosition(t));var r,o=this.initialXY,i=o.x,n=o.y,a=this.mouseEventService.getNormalisedPosition(t),s=a.x,l=a.y,c=Math.abs(i-s),u=Math.abs(n-l),d=this.getFillHandleDirection();(r="xy"===d?c>u?"x":"y":d)!==this.dragAxis&&(this.dragAxis=r,this.changedCalculatedValues=!0)},t.prototype.onDrag=function(e){if(!this.initialPosition){var t=this.getCellCtrl();if(!t)return;this.initialPosition=t.getCellPosition()}
2var r=this.getLastCellHovered();r&&this.markPathFrom(this.initialPosition,r)},t.prototype.onDragEnd=function(e){if(this.initialXY=null,this.markedCells.length){var t,r="x"===this.dragAxis,o=this.getCellRange(),i=o.columns.length,n=this.getRangeStartRow(),a=this.getRangeEndRow();if(this.isUp||this.isLeft){var s=r?n:this.lastCellMarked;t=this.rangeService.createCellRangeFromCellRangeParams({rowStartIndex:s.rowIndex,rowStartPinned:s.rowPinned,columnStart:r?this.lastCellMarked.column:o.columns[0],rowEndIndex:a.rowIndex,rowEndPinned:a.rowPinned,columnEnd:o.columns[i-1]})}else t=this.rangeService.createCellRangeFromCellRangeParams({rowStartIndex:n.rowIndex,rowStartPinned:n.rowPinned,columnStart:o.columns[0],rowEndIndex:r?a.rowIndex:this.lastCellMarked.rowIndex,rowEndPinned:r?a.rowPinned:this.lastCellMarked.rowPinned,columnEnd:r?this.lastCellMarked.column:o.columns[i-1]});t&&(this.raiseFillStartEvent(),this.handleValueChanged(o,t,e),this.rangeService.setCellRanges([t]),this.raiseFillEndEvent(o,t))}},t.prototype.getFillHandleDirection=function(){var e=this.gridOptionsService.get("fillHandleDirection");return e?"x"!==e&&"y"!==e&&"xy"!==e?(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.doOnce(function(){return console.warn("AG Grid: valid values for fillHandleDirection are 'x', 'y' and 'xy'. Default to 'xy'.")},"warn invalid fill direction"),"xy"):e:"xy"},t.prototype.raiseFillStartEvent=function(){var e={type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_FILL_START};this.eventService.dispatchEvent(e)},t.prototype.raiseFillEndEvent=function(e,t){var r={type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_FILL_END,initialRange:e,finalRange:t};this.eventService.dispatchEvent(r)},t.prototype.handleValueChanged=function(e,t,r){var o=this,i=this.rangeService.getRangeEndRow(e),n=this.rangeService.getRangeStartRow(e),a=this.rangeService.getRangeEndRow(t),s=this.rangeService.getRangeStartRow(t),l="y"===this.dragAxis;if(!this.isReduce||this.gridOptionsService.is("suppressClearOnFillReduction")){var c=!0,u=[],d=[],p=0,h=function(){u.length=0,d.length=0,p=0},_=function(t,r){var d=o.isUp?i:n,p=!1;l&&(c=!0,h());for(var _=function(){var _=o.rowPositionUtils.getRowNode(d);if(!_)return"break";l&&t?f(u,t,_,function(){return!o.rowPositionUtils.sameRow(d,o.isUp?n:i)}):r&&(c=!0,h(),r.forEach(function(t){return f(u,t,_,function(){return t!==(o.isLeft?e.columns[0]:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.last(e.columns))})})),p=o.rowPositionUtils.sameRow(d,o.isUp?s:a),d=o.isUp?o.cellNavigationService.getRowAbove(d):o.cellNavigationService.getRowBelow(d)};!p&&d&&"break"!==_(););},f=function(e,t,i,n){var a,s=!1;if(c)a=o.valueService.getValue(t,i),d.push(a),c=n();else{var l=o.processValues(r,e,d,t,i,p++),u=l.value,h=l.fromUserFunction;if(a=u,t.isCellEditable(i)){var _=o.valueService.getValue(t,i);h&&_===a?s=!0:i.setDataValue(t,a,"rangeService")}}s||e.push(a)};l?e.columns.forEach(function(e){_(e)}):(g=this.isLeft?__spread$6(t.columns).reverse():t.columns,_(void 0,g))}else{var g=l?e.columns:e.columns.filter(function(e){return t.columns.indexOf(e)<0}),y=l?this.cellNavigationService.getRowBelow(a):s;y&&this.clearCellsInRange(y,i,g)}},t.prototype.clearCellsInRange=function(e,t,r){var o={startRow:e,endRow:t,columns:r,startColumn:r[0]};this.rangeService.clearCellRangeCellValues([o])},t.prototype.processValues=function(e,t,r,o,i,n){var a,s=this.gridOptionsService.getCallback("fillOperation");if(a="y"===this.dragAxis?this.isUp?"up":"down":this.isLeft?"left":"right",s){var l=s({event:e,values:t,initialValues:r,currentIndex:n,currentCellValue:this.valueService.getValue(o,i),direction:a,column:o,rowNode:i});if(!1!==l)return{value:l,fromUserFunction:!0}}var c=!t.some(function(e){var t=parseFloat(e);return isNaN(t)||t.toString()!==e.toString()});if(e.altKey||!c){if(c&&1===r.length){var u=this.isUp||this.isLeft?-1:1;return{value:parseFloat(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.last(t))+1*u,fromUserFunction:!1}}return{value:t[n%t.length],fromUserFunction:!1}}return{value:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.last(findLineByLeastSquares(t.map(Number))),fromUserFunction:!1}},t.prototype.clearValues=function(){this.clearMarkedPath(),this.clearCellV
2alues(),this.lastCellMarked=void 0,e.prototype.clearValues.call(this)},t.prototype.clearMarkedPath=function(){this.markedCells.forEach(function(e){if(e.isAlive()){var t=e.getComp();t.addOrRemoveCssClass("ag-selection-fill-top",!1),t.addOrRemoveCssClass("ag-selection-fill-right",!1),t.addOrRemoveCssClass("ag-selection-fill-bottom",!1),t.addOrRemoveCssClass("ag-selection-fill-left",!1)}}),this.markedCells.length=0,this.isUp=!1,this.isLeft=!1,this.isReduce=!1},t.prototype.clearCellValues=function(){this.cellValues.length=0},t.prototype.markPathFrom=function(e,t){if(this.clearMarkedPath(),this.clearCellValues(),"y"===this.dragAxis){if(this.rowPositionUtils.sameRow(t,e))return;var r=this.rowPositionUtils.before(t,e),o=this.getRangeStartRow(),i=this.getRangeEndRow();r&&(t.rowPinned==o.rowPinned&&t.rowIndex>=o.rowIndex||o.rowPinned!=i.rowPinned&&t.rowPinned==i.rowPinned&&t.rowIndex<=i.rowIndex)?(this.reduceVertical(e,t),this.isReduce=!0):(this.extendVertical(e,t,r),this.isReduce=!1)}else{var n=e.column,a=t.column;if(n===a)return;var s=this.columnModel.getAllDisplayedColumns(),l=s.indexOf(n),c=s.indexOf(a);c<=l&&c>=s.indexOf(this.getCellRange().columns[0])?(this.reduceHorizontal(e,t),this.isReduce=!0):(this.extendHorizontal(e,t,c<l),this.isReduce=!1)}this.lastCellMarked=t},t.prototype.extendVertical=function(e,t,r){var o=this.navigationService,i=this.rangeService,n=e;do{for(var a=this.getCellRange(),s=a.columns.length,l=0;l<s;l++){var c=a.columns[l],u={rowIndex:n.rowIndex,rowPinned:n.rowPinned},d=__assign$8(__assign$8({},u),{column:c}),p=i.isCellInSpecificRange(d,a),h=this.rowPositionUtils.sameRow(n,e);if(r&&(this.isUp=!0),!h){var _=o.getCellByPosition(d);if(_){this.markedCells.push(_);var f=_.getComp();p||(f.addOrRemoveCssClass("ag-selection-fill-left",0===l),f.addOrRemoveCssClass("ag-selection-fill-right",l===s-1)),f.addOrRemoveCssClass(r?"ag-selection-fill-top":"ag-selection-fill-bottom",this.rowPositionUtils.sameRow(n,t))}}}if(this.rowPositionUtils.sameRow(n,t))break}while(n=r?this.cellNavigationService.getRowAbove(n):this.cellNavigationService.getRowBelow(n))},t.prototype.reduceVertical=function(e,t){var r=e;do{for(var o=this.getCellRange(),i=o.columns.length,n=this.rowPositionUtils.sameRow(r,t),a=0;a<i;a++){var s={rowIndex:r.rowIndex,rowPinned:r.rowPinned},l=__assign$8(__assign$8({},s),{column:o.columns[a]}),c=this.navigationService.getCellByPosition(l);c&&(this.markedCells.push(c),c.getComp().addOrRemoveCssClass("ag-selection-fill-bottom",this.rowPositionUtils.sameRow(r,t)))}if(n)break}while(r=this.cellNavigationService.getRowAbove(r))},t.prototype.extendHorizontal=function(e,t,r){var o=this,i=this.columnModel.getAllDisplayedColumns(),n=i.indexOf(r?t.column:e.column),a=i.indexOf(r?this.getCellRange().columns[0]:t.column),s=r?0:1,l=i.slice(n+s,a+s),c=this.getRangeStartRow(),u=this.getRangeEndRow();l.forEach(function(e){var t=c,i=!1;do{i=o.rowPositionUtils.sameRow(t,u);var n=o.navigationService.getCellByPosition({rowIndex:t.rowIndex,rowPinned:t.rowPinned,column:e});if(n){o.markedCells.push(n);var a=n.getComp();a.addOrRemoveCssClass("ag-selection-fill-top",o.rowPositionUtils.sameRow(t,c)),a.addOrRemoveCssClass("ag-selection-fill-bottom",o.rowPositionUtils.sameRow(t,u)),r?(o.isLeft=!0,a.addOrRemoveCssClass("ag-selection-fill-left",e===l[0])):a.addOrRemoveCssClass("ag-selection-fill-right",e===ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.last(l))}t=o.cellNavigationService.getRowBelow(t)}while(!i)})},t.prototype.reduceHorizontal=function(e,t){var r=this,o=this.columnModel.getAllDisplayedColumns(),i=o.indexOf(t.column),n=o.indexOf(e.column),a=o.slice(i,n),s=this.getRangeStartRow(),l=this.getRangeEndRow();a.forEach(function(e){var t=s,o=!1;do{o=r.rowPositionUtils.sameRow(t,l);var i=r.navigationService.getCellByPosition({rowIndex:t.rowIndex,rowPinned:t.rowPinned,column:e});i&&(r.markedCells.push(i),i.getComp().addOrRemoveCssClass("ag-selection-fill-right",e===a[0])),t=r.cellNavigationService.getRowBelow(t)}while(!o)})},t.prototype.refresh=function(t){var r=this.rangeService.getCellRanges()[0];r.startRow&&r.endRow?e.prototype.refresh.call(this,t):this.destroy()},t.TEMPLATE='<div class="ag-fill-handle"></div>',__decorate$H([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("valueService")],t.prototype,"valueService",void 0),t}(AbstractSelectionHandle),__extends$K=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__assign$7=function(){return __assign$7=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$7.apply(this,arguments)},RangeHandle=function(e){function t(){var r=e.call(this,t.TEMPLATE)||this;return r.type=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.SelectionHandleType.RANGE,r.rangeFixed=!1,r}return __extends$K(t,e),t.prototype.onDrag=function(e){var t=this.getLastCellHovered();if(t){var r=this.rangeService.getCellRanges(),o=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.last(r);this.rangeFixed||(this.fixRangeStartEnd(o),this.rangeFixed=!0),this.endPosition={rowIndex:t.rowIndex,rowPinned:t.rowPinned,column:t.column},2===r.length&&r[0].type===ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.CellRangeType.DIMENSION&&o.type===ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.CellRangeType.VALUE&&!this.rowPositionUtils.sameRow(this.endPosition,this.rangeService.getRangeEndRow(o))&&this.rangeService.updateRangeEnd(r[0],__assign$7(__assign$7({},this.endPosition),{column:r[0].columns[0]}),!0),this.rangeService.extendLatestRangeToCell(this.endPosition)}},t.prototype.onDragEnd=function(e){var t=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.last(this.rangeService.getCellRanges());this.fixRangeStartEnd(t),this.rangeFixed=!1},t.prototype.fixRangeStartEnd=function(e){var t=this.rangeService.getRangeStartRow(e),r=this.rangeService.getRangeEndRow(e),o=e.columns[0];e.startRow=t,e.endRow=r,e.startColumn=o},t.TEMPLATE='<div class="ag-range-handle"></div>',t}(AbstractSelectionHandle),__extends$J=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$G=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},SelectionHandleFactory=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$J(t,e),t.prototype.createSelectionHandle=function(e){return this.createBean(e===ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.SelectionHandleType.RANGE?new RangeHandle:new FillHandle)},__decorate$G([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Bean)("selectionHandleFactory")],t)}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.BeanStub),VERSION$9="29.2.0",RangeSelectionModule={version:VERSION$9,moduleName:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleNames.RangeSelectionModule,beans:[RangeService,SelectionHandleFactory],agStackComponents:[{componentName:"AgFillHandle",componentClass:FillHandle},{componentName:"AgRangeHandle",componentClass:RangeHandle}],dependantModules:[EnterpriseCoreModule]},__extends$I=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$F=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},__read$a=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},AgColorPanel=function(e){function t(r){var o=e.call(this,t.TEMPLATE)||this;return o.H=1,o.S=1,o.B=1,o.A=1,o.isSpectrumDragging=!1,o.isSpectrumHueDragging=!1,o.isSpectrumAlp
2haDragging=!1,o.colorChanged=!1,o.picker=r.picker,o}return __extends$I(t,e),t.prototype.postConstruct=function(){var e=this.getGui();this.initRecentColors(),this.addManagedListener(this.spectrumVal,"mousedown",this.onSpectrumDraggerDown.bind(this)),this.addManagedListener(e,"mousemove",this.onSpectrumDraggerMove.bind(this)),this.addManagedListener(this.spectrumHue,"mousedown",this.onSpectrumHueDown.bind(this)),this.addManagedListener(e,"mousemove",this.onSpectrumHueMove.bind(this)),this.addManagedListener(this.spectrumAlpha,"mousedown",this.onSpectrumAlphaDown.bind(this)),this.addManagedListener(e,"mousemove",this.onSpectrumAlphaMove.bind(this)),this.addManagedListener(document,"mouseup",this.onMouseUp.bind(this)),this.addManagedListener(this.recentColors,"click",this.onRecentColorClick.bind(this))},t.prototype.refreshSpectrumRect=function(){return this.spectrumValRect=this.spectrumVal.getBoundingClientRect()},t.prototype.refreshHueRect=function(){return this.spectrumHueRect=this.spectrumHue.getBoundingClientRect()},t.prototype.refreshAlphaRect=function(){return this.spectrumAlphaRect=this.spectrumAlpha.getBoundingClientRect()},t.prototype.onSpectrumDraggerDown=function(e){this.refreshSpectrumRect(),this.isSpectrumDragging=!0,this.moveDragger(e)},t.prototype.onSpectrumDraggerMove=function(e){this.isSpectrumDragging&&this.moveDragger(e)},t.prototype.onSpectrumHueDown=function(e){this.refreshHueRect(),this.isSpectrumHueDragging=!0,this.moveHueSlider(e)},t.prototype.onSpectrumHueMove=function(e){this.isSpectrumHueDragging&&this.moveHueSlider(e)},t.prototype.onSpectrumAlphaDown=function(e){this.refreshAlphaRect(),this.isSpectrumAlphaDragging=!0,this.moveAlphaSlider(e)},t.prototype.onSpectrumAlphaMove=function(e){this.isSpectrumAlphaDragging&&this.moveAlphaSlider(e)},t.prototype.onMouseUp=function(){this.isSpectrumDragging=!1,this.isSpectrumHueDragging=!1,this.isSpectrumAlphaDragging=!1},t.prototype.moveDragger=function(e){var t=this.spectrumValRect;if(t){var r=e.clientX-t.left,o=e.clientY-t.top;r=Math.max(r,0),r=Math.min(r,t.width),o=Math.max(o,0),o=Math.min(o,t.height),this.setSpectrumValue(r/t.width,1-o/t.height)}},t.prototype.moveHueSlider=function(e){var t=this.spectrumHueRect;if(t){var r=this.spectrumHueSlider,o=r.getBoundingClientRect(),i=e.clientX-t.left;i=Math.max(i,0),i=Math.min(i,t.width),this.H=1-i/t.width,r.style.left=i+o.width/2+"px",this.update()}},t.prototype.moveAlphaSlider=function(e){var t=this.spectrumAlphaRect;if(t){var r=this.spectrumAlphaSlider,o=r.getBoundingClientRect(),i=e.clientX-t.left;i=Math.max(i,0),i=Math.min(i,t.width),this.A=i/t.width,r.style.left=i+o.width/2+"px",this.update()}},t.prototype.update=function(){var e=Color.fromHSB(360*this.H,this.S,this.B,this.A),t=Color.fromHSB(360*this.H,1,1),r=e.toRgbaString(),o=this.picker;Color.fromString(o.getValue()).toRgbaString()!==r&&(this.colorChanged=!0),o.setValue(r),this.spectrumColor.style.backgroundColor=t.toRgbaString(),this.spectrumDragger.style.backgroundColor=r},t.prototype.setSpectrumValue=function(e,t){var r=this.spectrumValRect||this.refreshSpectrumRect();if(r){var o=this.spectrumDragger,i=o.getBoundingClientRect();e=Math.max(0,e),e=Math.min(1,e),t=Math.max(0,t),t=Math.min(1,t),this.S=e,this.B=t,o.style.left=e*r.width-i.width/2+"px",o.style.top=(1-t)*r.height-i.height/2+"px",this.update()}},t.prototype.initRecentColors=function(){var e=t.recentColors.map(function(e,t){return'<div class="ag-recent-color" id='+t+' style="background-color: '+e+'; width: 15px; height: 15px;" recent-color="'+e+'"></div>'});this.recentColors.innerHTML=e.join("")},t.prototype.setValue=function(e){var t=Color.fromString(e),r=__read$a(t.toHSB(),3),o=r[0],i=r[1],n=r[2];this.H=(isNaN(o)?0:o)/360,this.A=t.a;var a=this.spectrumHueRect||this.refreshHueRect(),s=this.spectrumAlphaRect||this.refreshAlphaRect();this.spectrumHueSlider.style.left=(this.H-1)*-a.width+"px",this.spectrumAlphaSlider.style.left=this.A*s.width+"px",this.setSpectrumValue(i,n)},t.prototype.onRecentColorClick=function(e){var r=e.target;if(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.exists(r.id)){var o=parseInt(r.id,10);
2this.setValue(t.recentColors[o]),this.destroy()}},t.prototype.addRecentColor=function(){var e=Color.fromHSB(360*this.H,this.S,this.B,this.A).toRgbaString(),r=t.recentColors;this.colorChanged&&r[0]!==e&&(r=r.filter(function(t){return t!=e}),(r=[e].concat(r)).length>t.maxRecentColors&&(r=r.slice(0,t.maxRecentColors)),t.recentColors=r)},t.prototype.destroy=function(){this.addRecentColor(),e.prototype.destroy.call(this)},t.maxRecentColors=8,t.recentColors=[],t.TEMPLATE='<div class="ag-color-panel">\n            <div ref="spectrumColor" class="ag-spectrum-color">\n                <div class="ag-spectrum-sat ag-spectrum-fill">\n                    <div ref="spectrumVal" class="ag-spectrum-val ag-spectrum-fill">\n                        <div ref="spectrumDragger" class="ag-spectrum-dragger"></div>\n                    </div>\n                </div>\n            </div>\n            <div class="ag-spectrum-tools">\n                <div ref="spectrumHue" class="ag-spectrum-hue ag-spectrum-tool">\n                    <div class="ag-spectrum-hue-background"></div>\n                    <div ref="spectrumHueSlider" class="ag-spectrum-slider"></div>\n                </div>\n                <div ref="spectrumAlpha" class="ag-spectrum-alpha ag-spectrum-tool">\n                    <div class="ag-spectrum-alpha-background"></div>\n                    <div ref="spectrumAlphaSlider" class="ag-spectrum-slider"></div>\n                </div>\n                <div ref="recentColors" class="ag-recent-colors"></div>\n            </div>\n        </div>',__decorate$F([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("spectrumColor")],t.prototype,"spectrumColor",void 0),__decorate$F([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("spectrumVal")],t.prototype,"spectrumVal",void 0),__decorate$F([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("spectrumDragger")],t.prototype,"spectrumDragger",void 0),__decorate$F([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("spectrumHue")],t.prototype,"spectrumHue",void 0),__decorate$F([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("spectrumHueSlider")],t.prototype,"spectrumHueSlider",void 0),__decorate$F([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("spectrumAlpha")],t.prototype,"spectrumAlpha",void 0),__decorate$F([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("spectrumAlphaSlider")],t.prototype,"spectrumAlphaSlider",void 0),__decorate$F([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("recentColors")],t.prototype,"recentColors",void 0),__decorate$F([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"postConstruct",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),__extends$H=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),AgColorPicker=function(e){function t(t){var r=e.call(this,t,"ag-color-picker","colorPicker")||this;return t&&t.color&&(r.value=t.color),r}return __extends$H(t,e),t.prototype.postConstruct=function(){e.prototype.postConstruct.call(this),this.value&&this.setValue(this.value)},t.prototype.showPicker=function(){var e=this,t=this.getGui().getBoundingClientRect(),r=this.createBean(new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgDialog({closable:!1,modal:!0,hideTitleBar:!0,minWidth:190,width:190,height:250,x:t.right-190,y:t.top-250}));this.isPickerDisplayed=!0,r.addCssClass("ag-color-dialog"),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setAriaExpanded(this.eWrapper,!0);var o=this.createBean(new AgColorPanel({picker:this}));return o.addDestroyFunc(function(){r.isAlive()&&e.destroyBean(r)}),r.setParentComponent(this),r.setBodyComponent(o),o.setValue(this.getValue()),r.addDestroyFunc(function(){e.isDestroyingPicker?e.isDestroyingPicker=!1:(e.isDestroyingPicker=!0,o.isAlive()&&e.destroyBean(o)),e.isAlive()&&(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setAriaExpanded(e.eWrapper,!1),e.getFocusableElement().focus()),e.isPickerDisplayed=!1}),r},t.prototype.setValue=function(t){return this.value===t?this:(this.eDisplayField.style.backgroundColor=t,e.prototype.setValue.call(this,t))},t.prototype.getValue=function(){return this.value},t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgPickerField),__read$9=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},VERSION_CHECKING_FIRST_GRID_MAJOR_VERSION=28,VERSION_CHECKING_FIRST_CHARTS_MAJOR_VERSION=6;function isValidVersion(e){return e&&e.match(/\d+\.\d+\.\d+/)}function isValidMajorVersion(e){var t=e.gridMajorVersion,r=e.chartsMajorVersion,o=parseInt(t,10),i=parseInt(r,10),n=o-VERSION_CHECKING_FIRST_GRID_MAJOR_VERSION;return n===i-VERSION_CHECKING_FIRST_CHARTS_MAJOR_VERSION&&n>=0}function gridChartVersion(e){if(e&&isValidVersion(e)){var t=__read$9(e.split(".")||[],2),r=t[0],o=t[1],i=r+"."+o+".x",n=parseInt(r,10)-VERSION_CHECKING_FIRST_GRID_MAJOR_VERSION+VERSION_CHECKING_FIRST_CHARTS_MAJOR_VERSION;if(!(n<0))return{gridMajorMinor:i,chartsMajorMinor:n+"."+o+".x"}}}function validGridChartsVersionErrorMessage(e){var t=e.type,r=e.gridVersion,o=e.chartsVersion,i="AG Grid: AG Grid version is incompatible. Please see https://www.ag-grid.com/javascript-data-grid/modules/ for more information.";if(!r)return i;var n=gridChartVersion(r);if(!n)return i;var a=n.gridMajorMinor,s=n.chartsMajorMinor;return"incompatible"===t?"AG Grid version "+r+" and AG Charts version "+o+" is not supported. AG Grid version "+a+" should be used with AG Chart "+s+". Please see https://www.ag-grid.com/javascript-data-grid/modules/ for more information.":"invalidCharts"===t?"AG Grid version "+a+" should be used with AG Chart "+s+". Please see https://www.ag-grid.com/javascript-data-grid/modules/ for more information.":i}function validGridChartsVersion(e){var t=e.gridVersion,r=e.chartsVersion;if(!isValidVersion(r))return{isValid:!1,message:validGridChartsVersionErrorMessage({type:"invalidCharts",gridVersion:t,chartsVersion:r})};if(!isValidVersion(t))return{isValid:!1,message:validGridChartsVersionErrorMessage({type:"invalidGrid",gridVersion:t,chartsVersion:r})};var o=__read$9(t.split(".")||[],2),i=o[0],n=o[1],a=__read$9(r.split(".")||[],2),s=a[0],l=a[1],c=isValidMajorVersion({gridMajorVersion:i,chartsMajorVersion:s});return c&&n===l?{isValid:!0}:c&&n===l?{isValid:!1,message:validGridChartsVersionErrorMessage({type:"invalid",gridVersion:t,chartsVersion:r})}:{isValid:!1,message:validGridChartsVersionErrorMessage({type:"incompatible",gridVersion:t,chartsVersion:r})}}var GridChartsModule={version:VERSION$a,validate:function(){return validGridChartsVersion({gridVersion:VERSION$a,chartsVersion:ChartService.CHARTS_VERSION})},moduleName:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleNames.GridChartsModule,beans:[ChartService,ChartTranslationService,ChartCrossFilterService],agStackComponents:[{componentName:"AgColorPicker",componentClass:AgColorPicker},{componentName:"AgAngleSelect",componentClass:AgAngleSelect}],dependantModules:[RangeSelectionModule,EnterpriseCoreModule]},__FORCE_MODULE_DETECTION_AG_GRID_CORE_EXT=0,agCharts={time,AgChart},__extends$G=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__assign$6=function(){return __assign$6=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$6.apply(this,arguments)},__decorate$E=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},DetailCellRendererCtrl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.loadRowDataVersion=0,t.needRefresh=!1,t}return __extends$G(t,e),t.prototype.init=function(e,t){var r=this;this.params=t,this.comp=e,null!=t.pinned||(this.setAutoHeightClasses(),this.setupRefreshStrategy(),this.addThemeToDetailGrid(),this.createDetailGrid(),this.loadRowData(),this.addManagedListener(t.node.parent,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RowNode.EVENT_DATA_CHANGED,function(){r.needRefresh=!0}),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_FULL_WIDTH_ROW_FOCUSED,this.onFullWidthRowFocused.bind(this)))},t.prototype.onFullWidthRowFocused=function(e){var t=this.params,r={rowIndex:t.node.rowIndex,rowPinned:t.node.rowPinned},o={rowIndex:e.rowIndex,rowPinned:e.rowPinned};this.rowPositionUtils.sameRow(r,o)&&this.focusService.focusInto(this.comp.getGui(),e.fromBelow)},t.prototype.setAutoHeightClasses=function(){var e=this.gridOptionsService.is("detailRowAutoHeight"),t=e?"ag-details-row-auto-height":"ag-details-row-fixed-height",r=e?"ag-details-grid-auto-height":"ag-details-grid-fixed-height";this.comp.addOrRemoveCssClass(t,!0),this.comp.addOrRemoveDetailGridCssClass(r,!0)},t.prototype.setupRefreshStrategy=function(){var e=this.params.refreshStrategy;"everything"==e||"nothing"==e||"rows"==e?this.refreshStrategy=e:(null!=e&&console.warn("AG Grid: invali
2d cellRendererParams.refreshStrategy = '"+e+"' supplied, defaulting to refreshStrategy = 'rows'."),this.refreshStrategy="rows")},t.prototype.addThemeToDetailGrid=function(){var e=this.environment.getTheme().theme;e&&this.comp.addOrRemoveDetailGridCssClass(e,!0)},t.prototype.createDetailGrid=function(){if(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.missing(this.params.detailGridOptions))console.warn("AG Grid: could not find detail grid options for master detail, please set gridOptions.detailCellRendererParams.detailGridOptions");else{var e=this.gridOptionsService.is("detailRowAutoHeight"),t=__assign$6({},this.params.detailGridOptions);e&&(t.domLayout="autoHeight"),this.comp.setDetailGrid(t)}},t.prototype.registerDetailWithMaster=function(e,t){var r=this.params.node.id,o=this.params.api,i={id:r,api:e,columnApi:t},n=this.params.node;o.addDetailGridInfo(r,i),n.detailGridInfo=i,this.addDestroyFunc(function(){n.detailGridInfo===i&&(o.removeDetailGridInfo(r),n.detailGridInfo=null)})},t.prototype.loadRowData=function(){var e=this;this.loadRowDataVersion++;var t=this.loadRowDataVersion,r=this.params.getDetailRowData;r?r({node:this.params.node,data:this.params.node.data,successCallback:function(r){e.loadRowDataVersion===t&&e.comp.setRowData(r)},context:this.gridOptionsService.context}):console.warn("AG Grid: could not find getDetailRowData for master / detail, please set gridOptions.detailCellRendererParams.getDetailRowData")},t.prototype.refresh=function(){var e=!0;return this.needRefresh&&"nothing"!==this.refreshStrategy?(this.needRefresh=!1,"everything"!==this.refreshStrategy&&(this.loadRowData(),e)):e},__decorate$E([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("rowPositionUtils")],t.prototype,"rowPositionUtils",void 0),__decorate$E([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("focusService")],t.prototype,"focusService",void 0),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.BeanStub),__extends$F=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$D=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},DetailCellRenderer=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$F(t,e),t.prototype.init=function(e){var t=this;this.params=e,this.selectAndSetTemplate();var r={addOrRemoveCssClass:function(e,r){return t.addOrRemoveCssClass(e,r)},addOrRemoveDetailGridCssClass:function(e,r){return t.eDetailGrid.classList.toggle(e,r)},setDetailGrid:function(e){return t.setDetailGrid(e)},setRowData:function(e){return t.setRowData(e)},getGui:function(){return t.eDetailGrid}};this.ctrl=this.createManagedBean(new DetailCellRendererCtrl),this.ctrl.init(r,e)},t.prototype.refresh=function(){return this.ctrl&&this.ctrl.refresh()},t.prototype.destroy=function(){e.prototype.destroy.call(this)},t.prototype.selectAndSetTemplate=function(){var e=this;if(this.params.pinned)this.setTemplate('<div class="ag-details-row"></div>');else{var r=function(){e.setTemplate(t.TEMPLATE)};if(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.missing(this.params.template))r();else if("string"==typeof this.params.template)this.setTemplate(this.params.template);else if("function"==typeof this.params.template){var o=(0,this.params.template)(this.params);this.setTemplate(o)}else console.warn("AG Grid: detailCellRendererParams.template should be function or string"),r();null==this.eDetailGrid&&console.warn('AG Grid: reference to eDetailGrid was missing from the details template. Please add ref="eDetailGrid" to the template.')}},t.prototype.setDetailGrid=function(e){if(this.eDetailGrid){var t=this.context.getBean("agGridReact"),r=t?ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.cloneObject(t):void 0,o=this.context.getBean("frameworkComponentWrapper"),i=this.getFrameworkOverrides();new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Grid(this.eDetailGrid,e,{frameworkOverrides:i,providedBeanInstances:{agGridReact:r,frameworkComponentWrapper:o}}),this.detailApi=e.api,this.ctrl.registerDetailWithMaster(e.api,e.columnApi),this.addDestroyFunc(function(){e.api&&e.api.destroy()})}},t.prototype.setRowData=function(e){this.detailApi&&this.detailApi.setRowData(e)},t.TEMPLATE='<div class="ag-details-row" role="gridcell">\n            <div ref="eDetailGrid" class="ag-details-grid" role="presentation"></div>\n        </div>',__decorate$D([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eDetailGrid")],t.prototype,"eDetailGrid",void 0),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),VERSION$8="29.2.0",MasterDetailModule={version:VERSION$8,moduleName:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleNames.MasterDetailModule,beans:[],userComponents:[{componentName:"agDetailCellRenderer",componentClass:DetailCellRenderer}],controllers:[{controllerName:"detailCellRenderer",controllerClass:DetailCellRendererCtrl}],dependantModules:[EnterpriseCoreModule]},__extends$E=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$C=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},EnterpriseMenuFactory=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$E(t,e),t.prototype.hideActiveMenu=function(){this.destroyBean(this.activeMenu)},t.prototype.showMenuAfterMouseEvent=function(e,t,r){var o=this;this.showMenu(e,function(i){var n=i.getGui();o.popupService.positionPopupUnderMouseEvent({type:"columnMenu",column:e,mouseEvent:t,ePopup:n}),r&&i.showTab(r)},"columnMenu",r,void 0,t.target)},t.prototype.showMenuAfterButtonClick=function(e,t,r,o,i){var n=this,a=-1,s="left";this.gridOptionsService.is("enableRtl")&&(a=1,s="right"),this.showMenu(e,function(i){var l=i.getGui();n.popupService.positionPopupByComponent({type:r,column:e,eventSource:t,ePopup:l,alignSide:s,nudgeX:9*a,nudgeY:-23,position:"under",keepWithinBounds:!0,shouldSetMaxHeight:!0}),o&&i.showTab(o)},r,o,i,t)},t.prototype.showMenu=function(e,t,r,o,i,n){var a=this,s=this.getMenuParams(e,i,n),l=s.menu,c=s.eMenuGui,u=s.currentHeaderPosition,d=s.currentColumnIndex,p=s.anchorToElement,h=[];h.push(this.getClosedCallback(e,l,u,d,n));var _=this.localeService.getLocaleTextFunc(),f=this.popupService.addPopup({modal:!0,e
2Child:c,closeOnEsc:!0,closedCallback:function(e){h.forEach(function(t){return t(e)})},afterGuiAttached:function(e){return l.afterGuiAttached(Object.assign({},{container:r},e))},positionCallback:o?function(){return t(l)}:void 0,anchorToElement:p,ariaLabel:_("ariaLabelColumnMenu","Column Menu")});this.addStopAnchoring(null==f?void 0:f.stopAnchoringPromise,e,h),o||(l.showTabBasedOnPreviousSelection(),t(l)),l.addEventListener(EnterpriseMenu.EVENT_TAB_SELECTED,function(e){a.lastSelectedTab=e.key}),e.setMenuVisible(!0,"contextMenu"),this.activeMenu=l,l.addEventListener(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.BeanStub.EVENT_DESTROYED,function(){a.activeMenu===l&&(a.activeMenu=null)})},t.prototype.getClosedCallback=function(e,t,r,o,i){var n=this;return function(a){if(n.destroyBean(t),e.setMenuVisible(!1,"contextMenu"),a instanceof KeyboardEvent&&i)if(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.isVisible(i)){var s=n.focusService.findTabbableParent(i);s&&(e&&n.headerNavigationService.scrollToColumn(e),s.focus())}else if(r&&-1!==o){var l=n.columnModel.getAllDisplayedColumns(),c=l[o]||ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.last(l);c&&n.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:r.headerRowIndex,column:c}})}}},t.prototype.addStopAnchoring=function(e,t,r){e&&e.then(function(e){t.addEventListener("leftChanged",e),t.addEventListener("visibleChanged",e),r.push(function(){t.removeEventListener("leftChanged",e),t.removeEventListener("visibleChanged",e)})})},t.prototype.getMenuParams=function(e,t,r){var o=this.createBean(new EnterpriseMenu(e,this.lastSelectedTab,t));return{menu:o,eMenuGui:o.getGui(),currentHeaderPosition:this.focusService.getFocusedHeader(),currentColumnIndex:this.columnModel.getAllDisplayedColumns().indexOf(e),anchorToElement:r||this.ctrlsService.getGridBodyCtrl().getGui()}},t.prototype.isMenuEnabled=function(e){return e.getMenuTabs(EnterpriseMenu.TABS_DEFAULT).length>0},__decorate$C([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("popupService")],t.prototype,"popupService",void 0),__decorate$C([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("focusService")],t.prototype,"focusService",void 0),__decorate$C([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("headerNavigationService")],t.prototype,"headerNavigationService",void 0),__decorate$C([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("ctrlsService")],t.prototype,"ctrlsService",void 0),__decorate$C([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],t.prototype,"columnModel",void 0),__decorate$C([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Bean)("menuFactory")],t)}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.BeanStub),EnterpriseMenu=function(e){function t(r,o,i){var n=e.call(this)||this;return n.tabFactories={},n.includeChecks={},n.column=r,n.initialSelection=o,n.tabFactories[t.TAB_GENERAL]=n.createMainPanel.bind(n),n.tabFactories[t.TAB_FILTER]=n.createFilterPanel.bind(n),n.tabFactories[t.TAB_COLUMNS]=n.createColumnsPanel.bind(n),n.includeChecks[t.TAB_GENERAL]=function(){return!0},n.includeChecks[t.TAB_FILTER]=function(){return n.filterManager.isFilterAllowed(r)},n.includeChecks[t.TAB_COLUMNS]=function(){return!0},n.restrictTo=i,n}return __extends$E(t,e),t.prototype.init=function(){var e=this,t=this.getTabsToCreate().map(function(t){return e.createTab(t)});this.tabbedLayout=new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.TabbedLayout({items:t,cssClass:"ag-menu",onActiveItemClicked:this.onHidePopup.bind(this),onItemClicked:this.onTabItemClicked.bind(this)}),this.createBean(this.tabbedLayout),this.mainMenuList&&this.mainMenuList.setParentComponent(this.tabbedLayout),this.addDestroyFunc(function(){return e.destroyBean(e.tabbedLayout)})},t.prototype.getTabsToCreate=function(){var e=this;return this.restrictTo?this.restrictTo:this.column.getMenuTabs(t.TABS_DEFAULT).filter(function(t){return e.isValidMenuTabItem(t)}).filter(function(t){return e.isNotSuppressed(t)}).filter(function(t){return e.isModuleLoaded(t)})},t.prototype.isModuleLoaded=function(e){return e!==t.TAB_COLUMNS||ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleRegistry.isRegistered(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleNames.ColumnsToolPanelModule)},t.prototype.isValidMenuTabItem=function(e){var r=!0,o=t.TABS_DEFAULT;return null!=this.restrictTo&&(r=this.restrictTo.indexOf(e)>-1,o=this.restrictTo),(r=r&&t.TABS_DEFAULT.indexOf(e)>
2-1)||console.warn("AG Grid: Trying to render an invalid menu item '"+e+"'. Check that your 'menuTabs' contains one of ["+o+"]"),r},t.prototype.isNotSuppressed=function(e){return this.includeChecks[e]()},t.prototype.createTab=function(e){return this.tabFactories[e]()},t.prototype.showTabBasedOnPreviousSelection=function(){this.showTab(this.initialSelection)},t.prototype.showTab=function(e){this.tabItemColumns&&e===t.TAB_COLUMNS?this.tabbedLayout.showItem(this.tabItemColumns):this.tabItemFilter&&e===t.TAB_FILTER?this.tabbedLayout.showItem(this.tabItemFilter):this.tabItemGeneral&&e===t.TAB_GENERAL?this.tabbedLayout.showItem(this.tabItemGeneral):this.tabbedLayout.showFirstItem()},t.prototype.onTabItemClicked=function(e){var r=null;switch(e.item){case this.tabItemColumns:r=t.TAB_COLUMNS;break;case this.tabItemFilter:r=t.TAB_FILTER;break;case this.tabItemGeneral:r=t.TAB_GENERAL}r&&this.activateTab(r)},t.prototype.activateTab=function(e){var r={type:t.EVENT_TAB_SELECTED,key:e};this.dispatchEvent(r)},t.prototype.getMenuItems=function(){var e,r=this.getDefaultMenuOptions(),o=this.gridOptionsService.getCallback("getMainMenuItems");return e=o?o({column:this.column,defaultItems:r}):r,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.removeRepeatsFromArray(e,t.MENU_ITEM_SEPARATOR),e},t.prototype.getDefaultMenuOptions=function(){var e=[],r=!this.column.getColDef().lockPinned,o=this.columnModel.getRowGroupColumns().length,i=o>0,n=this.columnModel.getRowGroupColumns().indexOf(this.column)>=0,a=this.column.isAllowValue(),s=this.column.isAllowRowGroup(),l=this.column.isPrimary(),c=this.columnModel.isPivotMode(),u="clientSide"===this.rowModel.getType(),d=this.gridOptionsService.isTreeData(),p=l&&i&&a||!l;return r&&e.push("pinSubMenu"),p&&e.push("valueAggSubMenu"),(r||p)&&e.push(t.MENU_ITEM_SEPARATOR),e.push("autoSizeThis"),e.push("autoSizeAll"),e.push(t.MENU_ITEM_SEPARATOR),s&&this.column.isPrimary()&&(n?e.push("rowUnGroup"):e.push("rowGroup")),e.push(t.MENU_ITEM_SEPARATOR),e.push("resetColumns"),u&&(d||o>(c?1:0))&&(e.push("expandAll"),e.push("contractAll")),e},t.prototype.createMainPanel=function(){this.mainMenuList=this.createManagedBean(new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgMenuList);var e=this.getMenuItems(),r=this.menuItemMapper.mapWithStockItems(e,this.column);return this.mainMenuList.addMenuItems(r),this.mainMenuList.addEventListener(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgMenuItemComponent.EVENT_MENU_ITEM_SELECTED,this.onHidePopup.bind(this)),this.tabItemGeneral={title:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.createIconNoSpan("menu",this.gridOptionsService,this.column),titleLabel:t.TAB_GENERAL.replace("MenuTab",""),bodyPromise:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgPromise.resolve(this.mainMenuList.getGui()),name:t.TAB_GENERAL},this.tabItemGeneral},t.prototype.onHidePopup=function(e){var t;e&&e.event&&e.event instanceof KeyboardEvent&&(t=e.event),this.hidePopupFunc(t&&{keyboardEvent:t});var r=this.focusService.getFocusedCell(),o=this.gridOptionsService.getDocument();if(o.activeElement===o.body&&r){var i=r.rowIndex,n=r.rowPinned,a=r.column;this.focusService.setFocusedCell({rowIndex:i,column:a,rowPinned:n,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}},t.prototype.createFilterPanel=function(){var e=this.filterManager.getOrCreateFilterWrapper(this.column,"COLUMN_MENU");if(!e)throw new Error("AG Grid - Unable to instantiate filter");return this.tabItemFilter={title:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.createIconNoSpan("filter",this.gridOptionsService,this.column),titleLabel:t.TAB_FILTER.replace("MenuTab",""),bodyPromise:null==e?void 0:e.guiPromise,afterAttachedCallback:function(t){(null==e?void 0:e.filterPromise)&&e.filterPromise.then(function(e){e&&e.afterGuiAttached&&e.afterGuiAttached(t)})},afterDetachedCallback:function(){var t;return null===(t=null==e?void 0:e.filterPromise)||void 0===t?void 0:t.then(function(e){var t;return null===(t=null==e?void 0:e.afterGuiDetached)||void 0===t?void 0:t.call(e)})},name:t.TAB_FILTER},this.tabItemFilter},t.prototype.createColumnsPanel=function(){var e=document.createElement("div");e.classList.add("ag-menu-column-select-wrapper");var r=this.createManagedBean(new PrimaryColsPanel),o=this.column.getColDef().columnsMenuParams;o||(o={});var i=o.contractColumnSelection,n=o.suppressColumnExpandAll,a=o.suppressColumnFilter,s=o.suppressColumnSelectAll,l=o.suppressSyncLayoutWithGri
2d,c=o.columnLayout;r.init(!1,{suppressColumnMove:!1,suppressValues:!1,suppressPivots:!1,suppressRowGroups:!1,suppressPivotMode:!1,contractColumnSelection:!!i,suppressColumnExpandAll:!!n,suppressColumnFilter:!!a,suppressColumnSelectAll:!!s,suppressSyncLayoutWithGrid:!!c||!!l,api:this.gridApi,columnApi:this.columnApi,context:this.gridOptionsService.context},"columnMenu"),c&&r.setColumnLayout(c);var u=r.getGui();return u.classList.add("ag-menu-column-select"),e.appendChild(u),this.tabItemColumns={title:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.createIconNoSpan("columns",this.gridOptionsService,this.column),titleLabel:t.TAB_COLUMNS.replace("MenuTab",""),bodyPromise:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgPromise.resolve(e),name:t.TAB_COLUMNS},this.tabItemColumns},t.prototype.afterGuiAttached=function(e){var t=e.container,r=e.hidePopup;this.tabbedLayout.setAfterAttachedParams({container:t,hidePopup:r}),r&&(this.hidePopupFunc=r,this.addDestroyFunc(r))},t.prototype.getGui=function(){return this.tabbedLayout.getGui()},t.EVENT_TAB_SELECTED="tabSelected",t.TAB_FILTER="filterMenuTab",t.TAB_GENERAL="generalMenuTab",t.TAB_COLUMNS="columnsMenuTab",t.TABS_DEFAULT=[t.TAB_GENERAL,t.TAB_FILTER,t.TAB_COLUMNS],t.MENU_ITEM_SEPARATOR="separator",__decorate$C([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],t.prototype,"columnModel",void 0),__decorate$C([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("filterManager")],t.prototype,"filterManager",void 0),__decorate$C([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("gridApi")],t.prototype,"gridApi",void 0),__decorate$C([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnApi")],t.prototype,"columnApi",void 0),__decorate$C([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("menuItemMapper")],t.prototype,"menuItemMapper",void 0),__decorate$C([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("rowModel")],t.prototype,"rowModel",void 0),__decorate$C([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("focusService")],t.prototype,"focusService",void 0),__decorate$C([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"init",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.BeanStub),__extends$D=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__assign$5=function(){return __assign$5=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$5.apply(this,arguments)},__decorate$B=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},CSS_MENU="ag-menu",CSS_CONTEXT_MENU_OPEN="ag-context-menu-open",ContextMenuFactory=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$D(t,e),t.prototype.hideActiveMenu=function(){this.destroyBean(this.activeMenu)},t.prototype.getMenuItems=function(e,t,r){var o=[];if(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.exists(e)&&ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleRegistry.isRegistered(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleNames.ClipboardModule)&&t&&(this.gridOptionsService.is("suppressCutToClipboard")||o.push("cut"),o.push("copy","copyWithHeaders","copyWithGroupHeaders","paste","separator")),this.gridOptionsService.is("enableCharts")&&ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleRegistry.isRegistered(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleNames.GridChartsModule)&&(this.columnModel.isPivotMode()&&o.push("pivotChart"),this.rangeService&&!this.rangeService.isEmpty()&&o.push("chartRange")),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.exists(e)){var i=!ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleRegistry.isRegistered(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleNames.CsvExportModule),n=!ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleRegistry.isRegistered(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleNames.ExcelExportModule),a=this.gridOptionsService.is("suppressExcelExport")||n,s=this.gridOptionsService.is("suppressCsvExport")||i;!(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.isIOSUserAgent()||a&&s)&&o.push("export")}var l=this.gridOptionsService.getCallback("getContextMenuItems");return l?l({node:e,column:t,value:r,defaultItems:o.length?o:void 0}):o},t.prototype.onContextMenu=function(e,t,r,o,i,n){if((this.gridOptionsService.is("allowContextMenuWithControlKey")||!e||!e.ctrlKey&&!e.metaKey)&&(e&&this.blockMiddleClickScrollsIfNeeded(e),!this.gridOptionsService.is("suppressContextMenu"))){var a=e||t.touches[0];this.showMenu(r,o,i,a,n)&&(e||t).preventDefault()}},t.prototype.blockMiddleClickScrollsIfNeeded=function(e){var t=this.gridOptionsService,r=e.which;t.is("suppressMiddleClickScrolls")&&2===r&&e.preventDefault()},t.prototype.showMenu=function(e,t,r,o,i){var n=this,a=this.getMenuItems(e,t,r),s=this.ctrlsService.getGridBodyCtrl().getGui();if(void 0===a||ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.missingOrEmpty(a))return!1;var l=new ContextMenu(a);this.createBean(l);var c=l.getGui(),u={column:t,rowNode:e,type:"contextMenu",mouseEvent:o,ePopup:c,nudgeY:1},d=this.localeService.getLocaleTextFunc(),p=this.popupService.addPopup({modal:!0,e
2Child:c,closeOnEsc:!0,closedCallback:function(){s.classList.remove(CSS_CONTEXT_MENU_OPEN),n.destroyBean(l)},click:o,positionCallback:function(){var e=n.gridOptionsService.is("enableRtl");n.popupService.positionPopupUnderMouseEvent(__assign$5(__assign$5({},u),{nudgeX:e?-1*(c.offsetWidth+1):1}))},anchorToElement:i,ariaLabel:d("ariaLabelContextMenu","Context Menu")});return p&&(s.classList.add(CSS_CONTEXT_MENU_OPEN),l.afterGuiAttached({container:"contextMenu",hidePopup:p.hideFunc})),this.activeMenu&&this.hideActiveMenu(),this.activeMenu=l,l.addEventListener(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.BeanStub.EVENT_DESTROYED,function(){n.activeMenu===l&&(n.activeMenu=null)}),p&&l.addEventListener(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgMenuItemComponent.EVENT_MENU_ITEM_SELECTED,p.hideFunc),!0},__decorate$B([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("popupService")],t.prototype,"popupService",void 0),__decorate$B([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Optional)("rangeService")],t.prototype,"rangeService",void 0),__decorate$B([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("ctrlsService")],t.prototype,"ctrlsService",void 0),__decorate$B([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],t.prototype,"columnModel",void 0),__decorate$B([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Bean)("contextMenuFactory")],t)}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.BeanStub),ContextMenu=function(e){function t(t){var r=e.call(this,'<div class="'+CSS_MENU+'" role="presentation"></div>')||this;return r.menuList=null,r.focusedCell=null,r.menuItems=t,r}return __extends$D(t,e),t.prototype.addMenuItems=function(){var e=this,t=this.createManagedBean(new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgMenuList),r=this.menuItemMapper.mapWithStockItems(this.menuItems,null);t.addMenuItems(r),this.appendChild(t),this.menuList=t,t.addEventListener(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgMenuItemComponent.EVENT_MENU_ITEM_SELECTED,function(t){return e.dispatchEvent(t)})},t.prototype.afterGuiAttached=function(e){e.hidePopup&&this.addDestroyFunc(e.hidePopup),this.focusedCell=this.focusService.getFocusedCell(),this.menuList&&this.focusService.focusInto(this.menuList.getGui())},t.prototype.restoreFocusedCell=function(){var e=this.focusService.getFocusedCell();if(e&&this.focusedCell&&this.cellPositionUtils.equals(e,this.focusedCell)){var t=this.focusedCell,r=t.rowIndex,o=t.rowPinned,i=t.column,n=this.gridOptionsService.getDocument();n.activeElement===n.body&&this.focusService.setFocusedCell({rowIndex:r,column:i,rowPinned:o,forceBrowserFocus:!0})}},t.prototype.destroy=function(){this.restoreFocusedCell(),e.prototype.destroy.call(this)},__decorate$B([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("menuItemMapper")],t.prototype,"menuItemMapper",void 0),__decorate$B([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("focusService")],t.prototype,"focusService",void 0),__decorate$B([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("cellPositionUtils")],t.prototype,"cellPositionUtils",void 0),__decorate$B([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"addMenuItems",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),__extends$C=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__assign$4=function(){return __assign$4=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$4.apply(this,arguments)},__decorate$A=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},MenuItemMapper=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$C(t,e),t.prototype.mapWithStockItems=function(e,t){var r=this;if(!e)return[];var o=[];return e.forEach(function(e){var i;if(i="string"==typeof e?r.getStockMenuItem(e,t):__assign$4({},e)){var n=i,a=n.subMenu;a&&a instanceof Array&&(n.subMenu=r.mapWithStockItems(a,t)),null!=i&&o.push(i)}}),o},t.prototype.getStockMenuItem=function(e,t){var r,o=this,i=this.localeService.getLocaleTextFunc(),n=this.gridOptionsService.is("skipHeaderOnAutoSize");
2switch(e){case"pinSubMenu":return{name:i("pinColumn","Pin Column"),icon:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.createIconNoSpan("menuPin",this.gridOptionsService,null),subMenu:["clearPinned","pinLeft","pinRight"]};case"pinLeft":return{name:i("pinLeft","Pin Left"),action:function(){return o.columnModel.setColumnPinned(t,"left","contextMenu")},checked:!!t&&t.isPinnedLeft()};case"pinRight":return{name:i("pinRight","Pin Right"),action:function(){return o.columnModel.setColumnPinned(t,"right","contextMenu")},checked:!!t&&t.isPinnedRight()};case"clearPinned":return{name:i("noPin","No Pin"),action:function(){return o.columnModel.setColumnPinned(t,null,"contextMenu")},checked:!!t&&!t.isPinned()};case"valueAggSubMenu":return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleRegistry.assertRegistered(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleNames.RowGroupingModule,"Aggregation from Menu")&&((null==t?void 0:t.isPrimary())||(null==t?void 0:t.getColDef().pivotValueColumn))?{name:i("valueAggregation","Value Aggregation"),icon:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.createIconNoSpan("menuValue",this.gridOptionsService,null),subMenu:this.createAggregationSubMenu(t)}:null;case"autoSizeThis":return{name:i("autosizeThiscolumn","Autosize This Column"),action:function(){return o.columnModel.autoSizeColumn(t,n,"contextMenu")}};case"autoSizeAll":return{name:i("autosizeAllColumns","Autosize All Columns"),action:function(){return o.columnModel.autoSizeAllColumns(n,"contextMenu")}};case"rowGroup":return{name:i("groupBy","Group by")+" "+ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.escapeString(this.columnModel.getDisplayNameForColumn(t,"header")),action:function(){return o.columnModel.addRowGroupColumn(t,"contextMenu")},icon:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.createIconNoSpan("menuAddRowGroup",this.gridOptionsService,null)};case"rowUnGroup":return{name:i("ungroupBy","Un-Group by")+" "+ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.escapeString(this.columnModel.getDisplayNameForColumn(t,"header")),action:function(){return o.columnModel.removeRowGroupColumn(t,"contextMenu")},icon:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.createIconNoSpan("menuRemoveRowGroup",this.gridOptionsService,null)};case"resetColumns":return{name:i("resetColumns","Reset Columns"),action:function(){return o.columnModel.resetColumnState("contextMenu")}};case"expandAll":return{name:i("expandAll","Expand All"),action:function(){return o.gridApi.expandAll()}};case"contractAll":return{name:i("collapseAll","Collapse All"),action:function(){return o.gridApi.collapseAll()}};case"copy":return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleRegistry.assertRegistered(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleNames.ClipboardModule,"Copy from Menu")?{name:i("copy","Copy"),shortcut:i("ctrlC","Ctrl+C"),icon:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.createIconNoSpan("clipboardCopy",this.gridOptionsService,null),action:function(){return o.clipboardService.copyToClipboard()}}:null;case"copyWithHeaders":return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleRegistry.assertRegistered(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleNames.ClipboardModule,"Copy with Headers from Menu")?{name:i("copyWithHeaders","Copy with Headers"),icon:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.createIconNoSpan("clipboardCopy",this.gridOptionsService,null),action:function(){return o.clipboardService.copyToClipboard({includeHeaders:!0})}}:null;case"copyWithGroupHeaders":return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleRegistry.assertRegistered(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleNames.ClipboardModule,"Copy with Group Headers from Menu")?{name:i("copyWithGroupHeaders","Copy with Group Headers"),icon:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.createIconNoSpan("clipboardCopy",this.gridOptionsService,null),action:function(){return o.clipboardService.copyToClipboard({includeHeaders:!0,includeGroupHeaders:!0})}}:null;case"cut":if(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleRegistry.assertRegistered(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleNames.ClipboardModule,"Cut from Menu")){var a=this.focusService.getFocusedCell(),s=a?this.rowPositionUtils.getRowNode(a):null,l=!!s&&(null==a?void 0:a.column.isCellEditable(s));return{name:i("cut","Cut"),shortcut:i("ctrlX","Ctrl+X"),icon:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.createIconNoSpan("clipboardCut",this.gridOptionsService,null),disabled:!l||this.gridOptionsService.is("suppressCutToClipboard"),action:function(){return o.clipboardService.cutToClipboard()}}}return null;case"paste":return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleRegistry.assertRegistered(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleNames.ClipboardModule,"Paste from Clipboard")?{name:i("paste","Paste"),shortcut:i("ctrlV","Ctrl+V"),disabled:!0,icon:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.createIconNoSpan("clipboardPaste",this.gridOptionsService,null),action:function(){return o.clipboardService.pasteFromClipboard()}}:null;case"export":var c=[],u=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleRegistry.isRegistered(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleNames.CsvExportModule),d=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleRegistry.isRegistered(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleNames.ExcelExportModule);return!this.gridOptionsService.is("suppressCsvExport")&&u&&c.push("csvExport"),!this.gridOptionsService.is("suppressExcelExport")&&d&&c.push("excelExport"),{name:i("export","Export"),subMenu:c,icon:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.createIconNoSpan("save",this.gridOptionsService,null)};case"csvExport":return{name:i("csvExport","CSV Export"),icon:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.createIconNoSpan("csvExport",this.gridOptionsService,null),action:function(){return o.gridApi.exportDataAsCsv({})}};case"excelExport":return{name:i("excelExport","Excel Export"),icon:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.createIconNoSpan("excelExport",this.gridOptionsService,null),action:function(){return o.gridApi.exportDataAsExcel()}};case"separator":return"separator";case"pivotChart":case"chartRange":return null!==(r=this.chartMenuItemMapper.getChartItems(e))&&void 0!==r?r:null;default:return console.warn("AG Grid: unknown menu item type "+e),null}},t.prototype.createAggregationSubMenu=function(e){var t,r=this,o=this.localeService.getLocaleTextFunc();if(e.isPrimary())t=e;else{var i=e.getColDef().pivotValueColumn;t=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.exists(i)?i:void 0}var n=[];if(t){var a=t.isValueActive(),s=this.aggFuncService.getFuncNames(t);n.push({name:o("noAggregation","None"),action:function(){r.columnModel.removeValueColumn(t,"contextMenu"),r.columnModel.setColumnAggFu
2nc(t,void 0,"contextMenu")},checked:!a}),s.forEach(function(e){n.push({name:o(e,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.capitalise(e)),action:function(){r.columnModel.setColumnAggFunc(t,e,"contextMenu"),r.columnModel.addValueColumn(t,"contextMenu")},checked:a&&t.getAggFunc()===e})})}return n},__decorate$A([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],t.prototype,"columnModel",void 0),__decorate$A([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("gridApi")],t.prototype,"gridApi",void 0),__decorate$A([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Optional)("clipboardService")],t.prototype,"clipboardService",void 0),__decorate$A([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Optional)("aggFuncService")],t.prototype,"aggFuncService",void 0),__decorate$A([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("focusService")],t.prototype,"focusService",void 0),__decorate$A([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("rowPositionUtils")],t.prototype,"rowPositionUtils",void 0),__decorate$A([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("chartMenuItemMapper")],t.prototype,"chartMenuItemMapper",void 0),__decorate$A([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Bean)("menuItemMapper")],t)}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.BeanStub),VERSION$7="29.2.0",__extends$B=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__assign$3=function(){return __assign$3=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$3.apply(this,arguments)},__decorate$z=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},__read$8=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},ChartMenuItemMapper=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}var r;return __extends$B(t,e),r=t,t.prototype.getChartItems=function(e){var t,o;if(this.chartService){var i="pivotChart"===e?new PivotMenuItemMapper(this.gridOptionsService,this.chartService,this.localeService):new RangeMenuItemMapper(this.gridOptionsService,this.chartService,this.localeService),n=i.getMenuItem(),a=null===(o=null===(t=this.gridOptionsService.get("chartToolPanelsDef"))||void 0===t?void 0:t.settingsPanel)||void 0===o?void 0:o.chartGroupsDef;return a&&(n=r.filterAndOrderChartMenu(n,a,i.getConfigLookup())),this.cleanInternals(n)}ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleRegistry.assertRegistered(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleNames.GridChartsModule,'the Context Menu key "'+e+'"')},t.prototype.cleanInternals=function(e){if(!e)return e;var t=function(e){var r;return null==e||delete e._key,null===(r=null==e?void 0:e.subMenu)||void 0===r||r.forEach(function(e){return t(e)}),e};return t(e)},t.buildLookup=function(e){var t={},r=function(e){t[e._key]=e,e.subMenu&&e.subMenu.forEach(function(e){return r(e)})};return r(e),t},t.filterAndOrderChartMenu=function(e,t,r){var o,i=this.buildLookup(e),n=__assign$3(__assign$3({},e),{subMenu:[]});if(Object.entries(t).forEach(function(e){var t,o,a=__read$8(e,2),s=a[0],l=a[1],c=r[s];if(null!=c){var u=i[c._key];if(u)if(u.subMenu){var d=l.map(function(e){var t=c[e];if(null!=t)return i[t];ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.doOnce(function(){return console.warn("AG Grid - invalid chartGroupsDef config '"+s+"."+e+"'")},"invalid_chartGroupsDef"+e+"_"+s)}).filter(function(e){return void 0!==e});d.length>0&&(u.subMenu=d,null===(t=n.subMenu)||void 0===t||t.push(u))}else null===(o=n.subMenu)||void 0===o||o.push(u)}else ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.doOnce(function(){return console.warn("AG Grid - invalid chartGroupsDef config '"+s+"'")},"invalid_chartGroupsDef"+s)}),0!=(null===(o=n.subMenu)||void 0===o?void 0:o.length))return n},__decorate$z([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Optional)("chartService")],t.prototype,"chartService",void 0),r=__decorate$z([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Bean)("chartMenuItemMapper")],t)}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.BeanStub),PivotMenuItemMapper=function(){function e(e,t,r){this.gridOptionsService=e,this.chartService=t,this.localeService=r}return e.prototype.getMenuItem=function(){var e=this,t=this.localeService.getLocaleTextFunc(),r=function(r,o,i,n){return{name:t(r,o),action:function(){return e.chartService.createPivotChart({chartType:i})},_key:n}};return{name:t("pivotChart","Pivot Chart"),_key:"pivotChart",subMenu:[{_key:"pivotColumnChart",name:t("columnChart","Column"),subMenu:[r("groupedColumn","Grouped&lrm;","groupedColumn","pivotGroupedColumn"),r("stackedColumn","Stacked&lrm;","stackedColumn","pivotStackedColumn"),r("normalizedColumn","100% Stacked&lrm;","normalizedColumn","pivotNormalizedColumn")]},{_key:"pivotBarChart",name:t("barChart","Bar"),subMenu:[r("groupedBar","Grouped&lrm;","groupedBar","pivotGroupedBar"),r("stackedBar","Stacked&lrm;","stackedBar","pivotStackedBar"),r("normalizedBar","100% Stacked&lrm;","normalizedBar","pivotNormalizedBar")]},{_key:"pivotPieChart",name:t("pieChart","Pie"),subMenu:[r("pie","Pie&lrm;","pie","pivotPie"),r("doughnut","Doughnut&lrm;","doughnut","pivotDoughnut")]},r("line","Line&lrm;","line","pivotLineChart"),{_key:"pivotXYChart",name:t("xyChart","X Y (Scatter)"),subMenu:[r("scatter","Scatter&lrm;","scatter","pivotScatter"),r("bubble","Bubble&lrm;","bubble","pivotBubble")]},{_key:"pivotAreaChart",name:t("areaChart","Area"),subMenu:[r("area","Area&lrm;","area","pivotArea"),r("stackedArea","Stacked&lrm;","stackedArea","pivotStackedArea"),r("normalizedArea","100% Stacked&lrm;","normalizedArea","pivotNormalizedArea")]},r("histogramChart","Histogram&lrm;","histogram","pivotHistogramChart"),{_key:"pivotCombinationChart",name:t("combinationChart","Combination"),subMenu:[r("columnLineCombo","Column & Line&lrm;","columnLineCombo","pivotColumnLineCombo"),r("AreaColumnCombo","Area & Column&lrm;","areaColumnCombo","pivotAreaColumnCombo")]}],icon:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.createIconNoSpan("chart",this.gridOptionsService,void 0)}},e.prototype.getConfigLookup=function(){return{columnGroup:{_key:"pivotColumnChart",column:"pivotGroupedColumn",stackedColumn:"pivotStackedColumn",normalizedColumn:"pivotNormalizedColumn"},barGroup:{_key:"pivotBarChart",bar:"pivotGroupedBar",stackedBar:"pivotStackedBar",normalizedBar:"pivotNormalizedBar"},pieGroup:{_key:"pivotPieChart",pie:"pivotPie",doughnut:"pivotDoughnut"},lineGroup:{_key:"pivotLineChart",line:"pivotLineChart"},scatterGroup:{_key:"pivotXYChart",bubble:"pivotBubble",scatter:"pivotScatter"},areaGroup:{_key:"pivotAreaChart",area:"pivotArea",stackedArea:"pivotStackedArea",normalizedArea:"pivotNormalizedArea"},histogramGroup:{_key:"pivotHistogramChart",histogram:"pivotHistogramChart"},combinationGroup:{_key:"pivotCombinationChart",columnLineCombo:"pivotColumnLineCombo",areaColumnCombo:"pivotAreaColumnCombo",customCombo:""}}},e}(),RangeMenuItemMapper=function(){function e(e,t,r){this.gridOptionsService=e,this.chartService=t,this.localeService=r}return e.prototype.getMenuItem=function(){var e=this,t=this.localeService.getLocaleTextFunc(),r=function(r,o,i,n){return{name:t(r,o),action:function(){return e.chartService.createChartFromCurrentRange(i)},_key:n}};return{name:t("chartRange","Chart Range"),_key:"chartRange",subMenu:[{name:t("columnChart","Column"),subMenu:[r("groupedColumn","Grouped&lrm;","groupedColumn","rangeGroupedColumn"),r("stackedColumn","Stacked&lrm;","stackedColumn","rangeStackedColumn"),r("normalizedColumn","100% Stacked&lrm;","normalizedColumn","rangeNormalizedColumn")],_key:"rangeColumnChart"},{name:t("barChart","Bar"),subMenu:[r("groupedBar","Grouped&lrm;","groupedBar","rangeGroupedBar"),r("stackedBar","Stacked&lrm;","stackedBar","rangeStackedBar"),r("normalizedBar","100% Stacked&lrm;","normalizedBar","rangeNormalizedBar")],_key:"rangeBarChart"},{name:t("pieChart","Pie"),subMenu:[r("pie","Pie&lrm;","pie","rangePie"),r("doughnut","Doughnut&lrm;","doughnut","rangeDoughnut")],_key:"rangePieChart"},r("line","Line&lrm;","line","rangeLineChart"),{name:t("xyChart","X Y (Scatter)"),subMenu:[r("scatter","Scatter&lrm;","scatter","rangeScatter"),r("bubble","Bubble&lrm;","bubble","rangeBubble")],_key:"rangeXYChart"},{name:t("areaChart","Area"),subMenu:[r("area","Area&lrm;","area","rangeArea"),r("stackedArea","Stacked&lrm;","stackedArea","rangeStackedArea"),r("normalizedArea","100% Stacked&lrm;","normalizedArea","rangeNormalizedArea")],_key:"rangeAreaChart"},r("histogramChart","Histogram&lrm;","histogram","rangeHistogramChart"),{name:t("combinationChart","Combination"),subMenu:[r("columnLineCombo","Column & Line&lrm;","columnLineCombo","rangeColumnLineCombo"),r("AreaColumnCombo","Area & Column&lrm;","areaColumnCombo","rangeAreaColumnCombo")],_key:"rangeCombinationChart"}],icon:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.createIconNoSpan("chart",this.gridOptionsService,void 0)}},e.prototype.getConfigLookup=function(){return{columnGroup:{_key:"rangeColumnChart",column:"rangeGroupedColumn",stackedColumn:"rangeStackedColumn",normalizedColumn:"rangeNormalizedColumn"},barGroup:{_key:"rangeBarChart",bar:"rangeGroupedBar",stackedBar:"rangeStackedBar",normalizedBar:"rangeNormalizedBar"},pieGroup:{_key:"rangePieChart",pie:"rangePie",doughnut:"rangeDoughnut"},lineGroup:{_key:"rangeLineChart",line:"rangeLineChart"},scatterGroup:{_key:"rangeXYChart",bubble:"rangeBubble",scatter:"rangeScatter"},areaGroup:{_key:"rangeAreaChart",area:"rangeArea",stackedArea:"rangeStackedArea",normalizedArea:"rangeNormalizedArea"},histogramGroup:{_key:"rangeHistogramChart",histogram:"rangeHistogramChart"},combinationGroup:{_key:"rangeCombinationChart",columnLineCombo:"rangeColumnLineCombo",areaColumnCombo:"rangeAreaColumnCombo",customCombo:""}}},e}(),MenuModule={version:VERSION$7,moduleName:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleNames.MenuModule,beans:[EnterpriseMenuFactory,ContextMenuFactory,MenuItemMapper,ChartMenuItemMapper],dependantModules:[EnterpriseCoreModule]},__extends$A=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__assign$2=function(){return __assign$2=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$2.apply(this,arguments)},__decorate$y=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},MultiFilter=function(e){function t(){var t=e.call(this,'<div class="ag-multi-filter ag-menu-list-compact"></div>')||this;return t.filterDefs=[],t.filters=[],t.guiDestroyFuncs=[],t.activeFilterIndices=[],t.lastActivatedMenuItem=null,t.afterFiltersReadyFuncs=[],t}return __extends$A(t,e),t.prototype.postConstruct=function(){var e=this;this.initialiseTabGuard({onFocusIn:function(t){return e.onFocusIn(t)}})}
2,t.getFilterDefs=function(e){var t=e.filters;return t&&t.length>0?t:[{filter:"agTextColumnFilter"},{filter:"agSetColumnFilter"}]},t.prototype.init=function(e){var r=this;this.params=e,this.filterDefs=t.getFilterDefs(e);var o=e.column,i=e.filterChangedCallback;this.column=o,this.filterChangedCallback=i;var n=[];return this.filterDefs.forEach(function(e,t){var o=r.createFilter(e,t);null!=o&&n.push(o)}),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgPromise.all(n).then(function(e){r.filters=e,r.refreshGui("columnMenu"),r.afterFiltersReadyFuncs.forEach(function(e){return e()}),r.afterFiltersReadyFuncs.length=0})},t.prototype.refreshGui=function(e){var t=this;e!==this.lastOpenedInContainer&&(this.removeAllChildrenExceptTabGuards(),this.destroyChildren(),this.filters.forEach(function(r,o){o>0&&t.appendChild(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.loadTemplate('<div class="ag-filter-separator"></div>'));var i,n=t.filterDefs[o],a=t.getFilterTitle(r,n);i="subMenu"===n.display&&"toolPanel"!==e?t.insertFilterMenu(r,a).getGui():"subMenu"===n.display||"accordion"===n.display?t.insertFilterGroup(r,a).getGui():r.getGui(),t.appendChild(i)}),this.lastOpenedInContainer=e)},t.prototype.getFilterTitle=function(e,t){if(null!=t.title)return t.title;var r=e;return"function"==typeof r.getFilterTitle?r.getFilterTitle():"Filter"},t.prototype.destroyChildren=function(){this.guiDestroyFuncs.forEach(function(e){return e()}),this.guiDestroyFuncs.length=0},t.prototype.insertFilterMenu=function(e,t){var r=this,o=this.createBean(new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgMenuItemComponent({name:t,subMenu:e,cssClasses:["ag-multi-filter-menu-item"],isCompact:!0,isAnotherSubMenuOpen:function(){return!1},shouldSetMaxHeight:!0}));return o.setParentComponent(this),this.guiDestroyFuncs.push(function(){return r.destroyBean(o)}),this.addManagedListener(o,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgMenuItemComponent.EVENT_MENU_ITEM_ACTIVATED,function(e){r.lastActivatedMenuItem&&r.lastActivatedMenuItem!==e.menuItem&&r.lastActivatedMenuItem.deactivate(),r.lastActivatedMenuItem=e.menuItem}),o.addGuiEventListener("focusin",function(){return o.activate()}),o.addGuiEventListener("focusout",function(){o.isSubMenuOpen()||o.deactivate()}),o},t.prototype.insertFilterGroup=function(e,t){var r=this,o=this.createBean(new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgGroupComponent({title:t,cssIdentifier:"multi-filter"}));if(this.guiDestroyFuncs.push(function(){return r.destroyBean(o)}),o.addItem(e.getGui()),o.toggleGroupExpand(!1),e.afterGuiAttached){var i={container:this.lastOpenedInContainer,suppressFocus:!0};o.addManagedListener(o,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgGroupComponent.EVENT_EXPANDED,function(){return e.afterGuiAttached(i)})}return o},t.prototype.isFilterActive=function(){return this.filters.some(function(e){return e.isFilterActive()})},t.prototype.getLastActiveFilterIndex=function(){return this.activeFilterIndices.length>0?this.activeFilterIndices[this.activeFilterIndices.length-1]:null},t.prototype.doesFilterPass=function(e,t){var r=!0;return this.filters.forEach(function(o){r&&o!==t&&o.isFilterActive()&&(r=o.doesFilterPass(e))}),r},t.prototype.getFilterType=function(){return"multi"},t.prototype.getModelFromUi=function(){return{filterType:this.getFilterType(),filterModels:this.filters.map(function(e){var t=e;return"function"==typeof t.getModelFromUi?t.getModelFromUi():null})}},t.prototype.getModel=function(){return this.isFilterActive()?{filterType:this.getFilterType(),filterModels:this.filters.map(function(e){return e.isFilterActive()?e.getModel():null})}:null},t.prototype.setModel=function(e){var t=this,r=function(e,t){return new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgPromise(function(r){var o=e.setModel(t);o?o.then(function(){return r()}):r()})},o=[];return null==e?o=this.filters.map(function(e,o){return r(e,null).then(function(){t.updateActiveList(o)})}):this.filters.forEach(function(i,n){var a=e.filterModels.length>n?e.filterModels[n]:null,s=r(i,a).then(function(){t.updateActiveList(n)});o.push(s)}),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgPromise.all(o).then(function(){})},t.prototype.applyModel=function(e){void 0===e&&(e="api");var t=!1;
2return this.filters.forEach(function(r){r instanceof ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ProvidedFilter&&(t=r.applyModel(e)||t)}),t},t.prototype.getChildFilterInstance=function(e){return this.filters[e]},t.prototype.afterGuiAttached=function(e){e&&this.refreshGui(e.container);var t=this.params.filters,r=t&&t.some(function(e){return e.display&&"inline"!==e.display});this.executeFunctionIfExists("afterGuiAttached",__assign$2(__assign$2({},e||{}),{suppressFocus:r}));var o=this.gridOptionsService.getDocument(),i=o.activeElement;r&&(i===o.body||this.getGui().contains(i))&&this.forceFocusOutOfContainer(!0)},t.prototype.afterGuiDetached=function(){this.executeFunctionIfExists("afterGuiDetached")},t.prototype.onAnyFilterChanged=function(){this.executeFunctionIfExists("onAnyFilterChanged")},t.prototype.onNewRowsLoaded=function(){this.executeFunctionIfExists("onNewRowsLoaded")},t.prototype.destroy=function(){var t=this;this.filters.forEach(function(e){e.setModel(null),t.destroyBean(e)}),this.filters.length=0,this.destroyChildren(),e.prototype.destroy.call(this)},t.prototype.executeFunctionIfExists=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.forEachReverse(this.filters,function(r){var o=r[e];"function"==typeof o&&o.apply(r,t)})},t.prototype.createFilter=function(e,t){var r,o=this,i=this.params,n=i.filterModifiedCallback,a=i.doesRowPassOtherFilter,s=__assign$2(__assign$2({},this.filterManager.createFilterParams(this.column,this.column.getColDef())),{filterModifiedCallback:n,filterChangedCallback:function(e){o.executeWhenAllFiltersReady(function(){return o.filterChanged(t,e)})},doesRowPassOtherFilter:function(e){return a(e)&&o.doesFilterPass({node:e,data:e.data},r)}}),l=this.userComponentFactory.getFilterDetails(e,s,"agTextColumnFilter");if(!l)return null;var c=l.newAgStackInstance();return c&&c.then(function(e){return r=e}),c},t.prototype.executeWhenAllFiltersReady=function(e){this.filters&&this.filters.length>0?e():this.afterFiltersReadyFuncs.push(e)},t.prototype.updateActiveList=function(e){var t=this.filters[e];ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.removeFromArray(this.activeFilterIndices,e),t.isFilterActive()&&this.activeFilterIndices.push(e)},t.prototype.filterChanged=function(e,t){this.updateActiveList(e),this.filterChangedCallback(t);var r=this.filters[e];this.filters.forEach(function(e){e!==r&&"function"==typeof e.onAnyFilterChanged&&e.onAnyFilterChanged()})},t.prototype.onFocusIn=function(e){return null==this.lastActivatedMenuItem||this.lastActivatedMenuItem.getGui().contains(e.target)||(this.lastActivatedMenuItem.deactivate(),this.lastActivatedMenuItem=null),!0},t.prototype.getModelAsString=function(e){var t,r,o,i;if(!this.filters||!(null===(t=null==e?void 0:e.filterModels)||void 0===t?void 0:t.length))return"";var n=null!==(r=this.getLastActiveFilterIndex())&&void 0!==r?r:0,a=this.filters[n];return null!==(i=null===(o=a.getModelAsString)||void 0===o?void 0:o.call(a,e.filterModels[n]))&&void 0!==i?i:""},__decorate$y([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("filterManager")],t.prototype,"filterManager",void 0),__decorate$y([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("userComponentFactory")],t.prototype,"userComponentFactory",void 0),__decorate$y([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"postConstruct",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.TabGuardComp),__extends$z=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__assign$1=function(){return __assign$1=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$1.apply(this,arguments)},__decorate$x=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},MultiFloatingFilterComp=function(e){function t(){var t=e.call(this,'<div class="ag-multi-floating-filter ag-floating-filter-input"></div>')||this;return t.floatingFilters=[],t}return __extends$z(t,e),t.prototype.init=function(e){var t=this;this.params=e;var r=e.filterParams,o=[];
2return MultiFilter.getFilterDefs(r).forEach(function(r,i){var n=__assign$1(__assign$1({},e),{parentFilterInstance:function(e){t.parentMultiFilterInstance(function(t){var r=t.getChildFilterInstance(i);null!=r&&e(r)})}});ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.mergeDeep(n.filterParams,r.filterParams);var a=t.createFloatingFilter(r,n);null!=a&&o.push(a)}),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgPromise.all(o).then(function(e){e.forEach(function(e,r){t.floatingFilters.push(e);var o=e.getGui();t.appendChild(o),r>0&&ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setDisplayed(o,!1)})})},t.prototype.onParentModelChanged=function(e,t){var r=this;t&&t.afterFloatingFilter||this.parentMultiFilterInstance(function(o){if(null==e)r.floatingFilters.forEach(function(e,r){e.onParentModelChanged(null,t),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setDisplayed(e.getGui(),0===r)});else{var i=o.getLastActiveFilterIndex();r.floatingFilters.forEach(function(r,o){var n=e.filterModels.length>o?e.filterModels[o]:null;r.onParentModelChanged(n,t);var a=null==i?0===o:o===i;ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setDisplayed(r.getGui(),a)})}})},t.prototype.destroy=function(){this.destroyBeans(this.floatingFilters),this.floatingFilters.length=0,e.prototype.destroy.call(this)},t.prototype.createFloatingFilter=function(e,t){var r,o=null!==(r=this.userComponentFactory.getDefaultFloatingFilterType(e))&&void 0!==r?r:"agReadOnlyFloatingFilter",i=this.userComponentFactory.getFloatingFilterCompDetails(e,t,o);return i?i.newAgStackInstance():null},t.prototype.parentMultiFilterInstance=function(e){this.params.parentFilterInstance(function(t){if(!(t instanceof MultiFilter))throw new Error("AG Grid - MultiFloatingFilterComp expects MultiFilter as its parent");e(t)})},__decorate$x([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("userComponentFactory")],t.prototype,"userComponentFactory",void 0),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),VERSION$6="29.2.0",MultiFilterModule={version:VERSION$6,moduleName:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleNames.MultiFilterModule,beans:[],userComponents:[{componentName:"agMultiColumnFilter",componentClass:MultiFilter},{componentName:"agMultiColumnFloatingFilter",componentClass:MultiFloatingFilterComp}],dependantModules:[EnterpriseCoreModule]};function bindCellRendererToHtmlElement(e,t){e.then(function(e){var r=e.getGui();null!=r&&("object"==typeof r?t.appendChild(r):t.innerHTML=r)})}var __extends$y=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$w=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},RichSelectRow=function(e){function t(t){var r=e.call(this,'<div class="ag-rich-select-row" role="presentation"></div>')||this;return r.params=t,r}return __extends$y(t,e),t.prototype.setState=function(e,t,r){this.populateWithRenderer(e,t)||this.populateWithoutRenderer(e,t),this.updateSelected(r)},t.prototype.updateSelected=function(e){this.addOrRemoveCssClass("ag-rich-select-row-selected",e)},t.prototype.populateWithoutRenderer=function(e,t){var r=null!=t?t:e;ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.exists(r)&&""!==r?this.getGui().textContent=r.toString():this.getGui().innerHTML="&nbsp;"},t.prototype.populateWithRenderer=function(e,t){var r=this,o={value:e,valueFormatted:t,api:this.gridOptionsService.api},i=this.userComponentFactory.getCellRendererDetails(this.params,o),n=i?i.newAgStackInstance():void 0;return null!=n?bindCellRendererToHtmlElement(n,this.getGui()):this.getGui().innerText=null!=o.valueFormatted?o.valueFormatted:o.value,!!n&&(n.then(function(e){r.addDestroyFunc(function(){r.getContext().destroyBean(e)})}),!0)},__decorate$w([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("userComponentFactory")],t.prototype,"userComponentFactory",void 0),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),__extends$x=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$v=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},RichSelectCellEditor=function(e){function t(){var r=e.call(this,t.TEMPLATE)||this;return r.selectionConfirmed=!1,r.searchString="",r}return __extends$x(t,e),t.prototype.init=function(e){this.params=e,this.selectedValue=e.value,this.originalSelectedValue=e.value,this.focusAfterAttached=e.cellStartedEdit;var t=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.createIconNoSpan("smallDown",this.gridOptionsService);if(t.classList.add("ag-rich-select-value-icon"),this.eValue.appendChild(t),this.virtualList=this.createManagedBean(new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.VirtualList("rich-select")),this.virtualList.setComponentCreator(this.createRowComponent.bind(this)),this.eList.appendChild(this.virtualList.getGui()),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.exists(this.params.cellHeight)&&this.virtualList.setRowHeight(this.params.cellHeight),this.renderSelectedValue(),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.missing(e.values))console.warn("AG Grid: ric
2hSelectCellEditor requires values for it to work");else{var r=e.values;this.virtualList.setModel({getRowCount:function(){return r.length},getRow:function(e){return r[e]}}),this.addGuiEventListener("keydown",this.onKeyDown.bind(this));var o=this.virtualList.getGui();this.addManagedListener(o,"click",this.onClick.bind(this)),this.addManagedListener(o,"mousemove",this.onMouseMove.bind(this));var i=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.exists(e.searchDebounceDelay)?e.searchDebounceDelay:300;this.clearSearchString=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.debounce(this.clearSearchString,i),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.exists(e.charPress)&&this.searchText(e.charPress)}},t.prototype.onKeyDown=function(e){var t=e.key;switch(e.preventDefault(),t){case ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.KeyCode.ENTER:this.onEnterKeyDown();break;case ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.KeyCode.TAB:this.confirmSelection();break;case ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.KeyCode.DOWN:case ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.KeyCode.UP:this.onNavigationKeyPressed(e,t);break;default:this.searchText(e)}},t.prototype.confirmSelection=function(){this.selectionConfirmed=!0},t.prototype.onEnterKeyDown=function(){this.confirmSelection(),this.params.stopEditing()},t.prototype.onNavigationKeyPressed=function(e,t){e.preventDefault();var r=this.params.values.indexOf(this.selectedValue),o=t===ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.KeyCode.UP?r-1:r+1;if(o>=0&&o<this.params.values.length){var i=this.params.values[o];this.setSelectedValue(i)}},t.prototype.searchText=function(e){if("string"==typeof e)this.searchString+=e,this.runSearch(),this.clearSearchString();else{var t=e.key;if(t===ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.KeyCode.BACKSPACE)this.searchString=this.searchString.slice(0,-1),t="";else if(!ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.isEventFromPrintableCharacter(e))return;this.searchText(t)}},t.prototype.runSearch=function(){var e,t=this,r=this.params.values;if("number"!=typeof r[0]&&"string"!=typeof r[0]||(e=r.map(function(e){return t.params.formatValue(e)})),"object"==typeof r[0]&&this.params.colDef.keyCreator&&(e=r.map(function(e){var r={value:e,colDef:t.params.colDef,column:t.params.column,node:t.params.node,data:t.params.data,api:t.gridOptionsService.api,columnApi:t.gridOptionsService.columnApi,context:t.gridOptionsService.context};return t.params.colDef.keyCreator(r)})),e){var o=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.fuzzySuggestions(this.searchString,e,!0)[0];if(o){var i=r[e.indexOf(o)];this.setSelectedValue(i)}}},t.prototype.clearSearchString=function(){this.searchString=""},t.prototype.renderSelectedValue=function(){var e=this,t=this.params.formatValue(this.selectedValue),r=this.eValue,o={value:this.selectedValue,valueFormatted:t,api:this.gridOptionsService.api},i=this.userComponentFactory.getCellRendererDetails(this.params,o),n=i?i.newAgStackInstance():void 0;n?(bindCellRendererToHtmlElement(n,r),n.then(function(t){e.addDestroyFunc(function(){return e.getContext().destroyBean(t)})})):ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.exists(this.selectedValue)?r.innerText=t:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.clearElement(r)},t.prototype.setSelectedValue=function(e){if(this.selectedValue!==e){var t=this.params.values.indexOf(e);-1!==t&&(this.selectedValue=e,this.virtualList.ensureIndexVisible(t),this.virtualList.forEachRenderedRow(function(e,r){e.updateSelected(t===r)}),this.virtualList.focusRow(t))}},t.prototype.createRowComponent=function(e){var t=this.params.formatValue(e),r=new RichSelectRow(this.params);return this.getContext().createBean(r),r.setState(e,t,e===this.selectedValue),r},t.prototype.onMouseMove=function(e){var t=this.virtualList.getGui().getBoundingClientRect(),r=this.virtualList.getScrollTop(),o=e.clientY-t.top+r,i=Math.floor(o/this.virtualList.getRowHeight()),n=this.params.values[i];void 0!==n&&this.setSelectedValue(n)},t.prototype.onClick=function(){this.confirmSelection(),this.params.stopEditing()},t.prototype.afterGuiAttached=function(){var e=this.params.values.indexOf(this.selectedValue);if(this.virtualList.refresh(),e>=0&&this.virtualList.ensureIndexVisible(e),this.virtualList.refresh(),this.focusAfterAttached){var t=-1!==e?e:0;this.params.values.length?this.virtualList.focusRow(t):this.getGui().focus()}},t.prototype.getValue=function(){return this.selectionConfirmed?this.selectedValue:this.originalSelectedValue},t.TEMPLATE='<div class="ag-rich-select" tabindex="-1">\n            <div ref="eValue" class="ag-rich-select-value"></div>\n            <div ref="eList" class="ag-rich-select-list"></div>\n        </div>',__decorate$v([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("userComponentFactory")],t.prototype,"userComponentFactory",void 0),__decorate$v([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eValue")],t.prototype,"eValue",void 0),__decorate$v([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eList")],t.prototype,"eList",void 0),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PopupComponent),VERSION$5="29.2.0",RichSelectModule={version:VERSION$5,moduleName:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleNames.RichSelectModule,beans:[],userComponents:[{componentName:"agRichSelect",componentClass:RichSelectCellEditor},{componentName:"agRichSelectCellEditor",componentClass:RichSelectCellEditor}],dependantModules:[EnterpriseCoreModule]},__extends$w=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$u=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},FullStore=function(e){function t(t,r,o){var i=e.call(this,0)||this;return i.nodeIdSequence=new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.NumberSequence,i.info={},i.ssrmParams=t,i.parentRowNode=o,i.level=o.level+1,i.groupLevel=t.rowGroupCols?i.level<t.rowGroupCols.length:void 0,i.leafGroup=!!t.rowGroupCols&&i.level===t.rowGroupCols.length-1,i}return __extends$w(t,e),t.prototype.postConstruct=function(){var e=this;if(this.usingTreeData=this.gridOptionsService.isTreeData(),this.nodeIdPrefix=this.blockUtils.createNodeIdPrefix(this.parentRowNode),!this.usingTreeData&&this.groupLevel){var t=this.ssrmParams.rowGroupCols[this.level];this.groupField=t.field,this.rowGroupColumn=this.columnModel.getRowGroupColumns()[this.level]}var r=1,o=-1===this.parentRowNode.level,i=this.storeUtils.getServerSideInitialRowCount();o&&void 0!==i&&(r=i),this.initialiseRowNodes(r),this.rowNodeBlockLoader.addBlock(this),this.addDestroyFunc(function(){return e.rowNodeBlockLoader.removeBlock(e)})},t.prototype.destroyRowNodes=function(){this.blockUtils.destroyRowNodes(this.allRowNodes),this.allRowNodes=[],this.nodesAfterSort=[],this.nodesAfterFilter=[],this.allNodesMap={}},t.prototype.initialiseRowNodes=function(e,t){void 0===t&&(t=!1),this.destroyRowNodes();for(var r=0;r<e;r++){var o=this.blockUtils.createRowNode({field:this.groupField,group:this.groupLevel,leafGroup:this.leafGroup,level:this.level,parent:this.parentRowNode,rowGroupColumn:this.rowGroupColumn});t&&(o.failedLoad=!0),this.allRowNodes.push(o),this.nodesAfterFilter.push(o),this.nodesAfterSort.push(o)}},t.prototype.getBlockStateJson=function(){return{id:this.nodeIdPrefix?this.nodeIdPrefix:"",state:this.getState()}},t.prototype.loadFromDatasource=function(){this.storeUtils.loadFromDatasource({startRow:void 0,endRow:void 0,parentBlock:this,parentNode:this.parentRowNode,storeParams:this.ssrmParams,successCallback:this.pageLoaded.bind(this,this.getVersion()),success:this.success.bind(this,this.getVersion()),failCallback:this.pageLoadFailed.bind(this,this.getVersion()),fail:this.pageLoadFailed.bind(this,this.getVersion())})},t.prototype.getStartRow=function(){return 0},t.prototype.getEndRow=function(){return this.nodesAfterSort.length},t.prototype.createDataNode=function(e,t){var r=this.blockUtils.createRowNode({field:this.groupField,group:this.groupLevel,leafGroup:this.leafGroup,level:this.level,parent:this.parentRowNode,rowGroupColumn:this.rowGroupColumn});null!=t?ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.insertIntoArray(this.allRowNodes,r,t):this.allRowNodes.push(r);var o=this.prefixId(this.nodeIdSequence.next());return this.blockUtils.setDataIntoRowNode(r,e,o,void 0),this.nodeManager.addRowNode(r),this.blockUtils.checkOpenByDefault(r),this.allNodesMap[r.id]=r,r},t.prototype.prefixId=function(e){return this.nodeIdPrefix?this.nodeIdPrefix+"-"+e:e.toString()},t.prototype.processServerFail=function(){this.initialiseRowNodes(1,!0),this.fireStoreUpdatedEvent(),this.flushAsyncTransactions()},t.prototype.processServerResult=function(e){if(this.isAlive()){var t=e.storeInfo||e.groupLevelInfo;t&&Object.assign(this.info,t);var r=this.allRowNodes.length>0?this.allNodesMap:void 0;this.allRowNodes=[],this.nodesAfterSort=[],this.nodesAfterFilter=[],this.allNodesMap={},e.rowData||ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.doOnce(function(){return console.warn('AG Grid: "params.data" is missing from Server-Side Row Model success() callback. Please use the "data" attribute. If no data is returned, set an empty list.',e)},"FullStore.noData"),this.createOrRecycleNodes(r,e.rowData),r&&this.blockUtils.destroyRowNodes(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.getAllValuesInObject(r)),this.filterAndSortNodes(),this.fireStoreUpdatedEvent(),this.flushAsyncTransactions()}},t.prototype.createOrRecycleNodes=function(e,t){var r=this;t&&t.forEach(function(t){var o=function(t){if(e){var o=r.gridOptionsService.getRowIdFunc();if(o){var i=r.parentRowNode.getGroupKeys(),n=r.level,a=o({data:t,parentKeys:i.length>0?i:void 0,level:n}),s=e[a];if(s)return delete e[a],s}}}(t);o?function(e,t){r.allNodesMap[e.id]=e,r.blockUtils.updateDataIntoRowNode(e,t),r.allRowNodes.push(e)}(o,t):r.createDataNode(t)})},t.prototype.flushAsyncTransactions=function(){var e=this;window.setTimeout(function(){return e.transactionManager.flushAsyncTransactions()},0)},t.prototype.filterAndSortNodes=function(){this.filterRowNodes(),this.sortRowNodes()},t.prototype.sortRowNodes=function(){var e=this.storeUtils.isServerSideSortAllLevels()||this.storeUtils.isServerSideSortOnServer(),t=this.sortController.getSortOptions(),r=!t||0==t.length;this.nodesAfterSort=e||r?this.nodesAfterFilter:this.rowNodeSorter.doFullSort(this.nodesAfterFilter,t)},t.prototype.filterRowNodes=function(){var e=this,t=this.storeUtils.isServerSideFilterAllLevels()||this.storeUtils.isServerSideFilterOnServer(),r=this.groupLevel;this.nodesAfterFilter=t||r?this.allRowNodes:this.allRowNodes.filter(function(t){return e.filterManager.doesRowPassFilter({rowNode:t})})},t.prototype.clearDisplayIndexes=function(){var e=this;this.displayIndexStart=void 0,this.displayIndexEnd=void 0,this.allRowNodes.forEac
2h(function(t){return e.blockUtils.clearDisplayIndex(t)})},t.prototype.getDisplayIndexEnd=function(){return this.displayIndexEnd},t.prototype.isDisplayIndexInStore=function(e){return 0!==this.getRowCount()&&e>=this.displayIndexStart&&e<this.displayIndexEnd},t.prototype.setDisplayIndexes=function(e,t){var r=this;this.displayIndexStart=e.peek(),this.topPx=t.value;var o={};this.nodesAfterSort.forEach(function(i){r.blockUtils.setDisplayIndex(i,e,t),o[i.id]=!0}),this.allRowNodes.forEach(function(e){o[e.id]||r.blockUtils.clearDisplayIndex(e)}),this.displayIndexEnd=e.peek(),this.heightPx=t.value-this.topPx},t.prototype.forEachStoreDeep=function(e,t){void 0===t&&(t=new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.NumberSequence),e(this,t.next()),this.allRowNodes.forEach(function(r){var o=r.childStore;o&&o.forEachStoreDeep(e,t)})},t.prototype.forEachNodeDeep=function(e,t){void 0===t&&(t=new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.NumberSequence),this.allRowNodes.forEach(function(r){e(r,t.next());var o=r.childStore;o&&o.forEachNodeDeep(e,t)})},t.prototype.forEachNodeDeepAfterFilterAndSort=function(e,t){void 0===t&&(t=new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.NumberSequence),this.nodesAfterSort.forEach(function(r){e(r,t.next());var o=r.childStore;o&&o.forEachNodeDeepAfterFilterAndSort(e,t)})},t.prototype.getRowUsingDisplayIndex=function(e){if(this.isDisplayIndexInStore(e))return this.blockUtils.binarySearchForDisplayIndex(e,this.nodesAfterSort)},t.prototype.getRowBounds=function(e){for(var t=0;t<this.nodesAfterSort.length;t++){var r=this.nodesAfterSort[t],o=this.blockUtils.extractRowBounds(r,e);if(o)return o}return null},t.prototype.isPixelInRange=function(e){return e>=this.topPx&&e<this.topPx+this.heightPx},t.prototype.getRowIndexAtPixel=function(e){var t=this;if(e<=this.topPx)return this.nodesAfterSort[0].rowIndex;if(e>=this.topPx+this.heightPx){var r=this.nodesAfterSort[this.nodesAfterSort.length-1],o=r.rowTop+r.rowHeight;if(e>=o&&r.expanded){if(r.childStore&&r.childStore.getRowCount()>0)return r.childStore.getRowIndexAtPixel(e);if(r.detailNode)return r.detailNode.rowIndex}return r.rowIndex}var i=null;return this.nodesAfterSort.forEach(function(r){var o=t.blockUtils.getIndexAtPixel(r,e);null!=o&&(i=o)}),i??this.displayIndexEnd-1},t.prototype.getChildStore=function(e){var t=this;return this.storeUtils.getChildStore(e,this,function(e){return t.allRowNodes.find(function(t){return t.key==e})})},t.prototype.forEachChildStoreShallow=function(e){this.allRowNodes.forEach(function(t){var r=t.childStore;r&&e(r)})},t.prototype.refreshAfterFilter=function(e){var t=this.storeUtils.isServerSideFilterOnServer(),r=this.storeUtils.isServerRefreshNeeded(this.parentRowNode,this.ssrmParams.rowGroupCols,e);if(this.storeUtils.isServerSideFilterAllLevels()||t&&r)return this.refreshStore(!0),void this.sortRowNodes();this.filterRowNodes(),this.sortRowNodes(),this.forEachChildStoreShallow(function(t){return t.refreshAfterFilter(e)})},t.prototype.refreshAfterSort=function(e){var t=this.storeUtils.isServerSideSortOnServer(),r=this.storeUtils.isServerRefreshNeeded(this.parentRowNode,this.ssrmParams.rowGroupCols,e);if(this.storeUtils.isServerSideSortAllLevels()||t&&r)return this.refreshStore(!0),void this.filterRowNodes();this.filterRowNodes(),this.sortRowNodes(),this.forEachChildStoreShallow(function(t){return t.refreshAfterSort(e)})},t.prototype.applyTransaction=function(e){switch(this.getState()){case ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RowNodeBlock.STATE_FAILED:return{status:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ServerSideTransactionResultStatus.StoreLoadingFailed};case ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RowNodeBlock.STATE_LOADING:return{status:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ServerSideTransactionResultStatus.StoreLoading};case ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RowNodeBlock.STATE_WAITING_TO_LOAD:return{status:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ServerSideTransactionResultStatus.StoreWaitingToLoad}}var t=this.gridOptionsService.getCallback("isApplyServerSideTransaction");if(t&&!t({transaction:e,parentNode:this.parentRowNode,storeInfo:this.info,groupLevelInfo:this.info}))return{status:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ServerSideTransactionResultStatus.Cancelled};var r={status:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ServerSideTransactionResultStatus.Applied,remove:[],update:[],add:[]},o=[];return this.executeAdd(e,r),this.executeRemove(e,r,o),this.executeUpdate(e,r,o),this.filterAndSortNodes(),this.updateSelection(o),r},t.prototype.updateSelection=function(e){if(e.length>0){e.forEach(function(e){e.setSelected(!1,!1,!0,"rowDataChanged")});var t={type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_SELECTION_CHANGED,source:"rowDataChanged"};this.eventService.dispatchEvent(t)}},t.prototype.executeAdd=function(e,t){var r=this,o=e.add,i=e.addIndex;ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.missingOrEmpty(o)||("number"==typeof i&&i>
2=0?o.reverse().forEach(function(e){var o=r.createDataNode(e,i);t.add.push(o)}):o.forEach(function(e){var o=r.createDataNode(e);t.add.push(o)}))},t.prototype.executeRemove=function(e,t,r){var o=this,i=e.remove;if(null!=i){var n={};i.forEach(function(e){var i=o.lookupRowNode(e);i&&(i.isSelected()&&r.push(i),i.clearRowTopAndRowIndex(),n[i.id]=!0,delete o.allNodesMap[i.id],t.remove.push(i),o.nodeManager.removeNode(i))}),this.allRowNodes=this.allRowNodes.filter(function(e){return!n[e.id]})}},t.prototype.executeUpdate=function(e,t,r){var o=this,i=e.update;null!=i&&i.forEach(function(e){var i=o.lookupRowNode(e);i&&(o.blockUtils.updateDataIntoRowNode(i,e),!i.selectable&&i.isSelected()&&r.push(i),t.update.push(i))})},t.prototype.lookupRowNode=function(e){var t,r=this.gridOptionsService.getRowIdFunc();if(null!=r){var o=this.level,i=this.parentRowNode.getGroupKeys(),n=r({data:e,parentKeys:i.length>0?i:void 0,level:o});if(!(t=this.allNodesMap[n]))return console.error("AG Grid: could not find row id="+n+", data item was not found for this id"),null}else if(!(t=this.allRowNodes.find(function(t){return t.data===e})))return console.error("AG Grid: could not find data item as object was not found",e),null;return t},t.prototype.addStoreStates=function(e){e.push({suppressInfiniteScroll:!0,route:this.parentRowNode.getGroupKeys(),rowCount:this.allRowNodes.length,info:this.info}),this.forEachChildStoreShallow(function(t){return t.addStoreStates(e)})},t.prototype.refreshStore=function(e){if(e){var t=this.nodesAfterSort?this.nodesAfterSort.length:1;this.initialiseRowNodes(t)}this.scheduleLoad(),this.fireStoreUpdatedEvent()},t.prototype.retryLoads=function(){this.getState()===ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RowNodeBlock.STATE_FAILED&&(this.initialiseRowNodes(1),this.scheduleLoad()),this.forEachChildStoreShallow(function(e){return e.retryLoads()})},t.prototype.scheduleLoad=function(){this.setStateWaitingToLoad(),this.rowNodeBlockLoader.checkBlockToLoad()},t.prototype.fireStoreUpdatedEvent=function(){var e={type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_STORE_UPDATED};this.eventService.dispatchEvent(e)},t.prototype.getRowCount=function(){return this.nodesAfterSort.length},t.prototype.getTopLevelRowDisplayedIndex=function(e){return this.nodesAfterSort[e].rowIndex},t.prototype.isLastRowIndexKnown=function(){return this.getState()==ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RowNodeBlock.STATE_LOADED},t.prototype.getRowNodesInRange=function(e,t){var r=[],o=!1;return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.missing(e)&&(o=!0),this.nodesAfterSort.forEach(function(i){var n=i===e||i===t;(o||n)&&r.push(i),n&&(o=!o)}),o?[]:r},__decorate$u([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("ssrmStoreUtils")],t.prototype,"storeUtils",void 0),__decorate$u([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("ssrmBlockUtils")],t.prototype,"blockUtils",void 0),__decorate$u([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],t.prototype,"columnModel",void 0),__decorate$u([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("rowNodeBlockLoader")],t.prototype,"rowNodeBlockLoader",void 0),__decorate$u([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("rowNodeSorter")],t.prototype,"rowNodeSorter",void 0),__decorate$u([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("sortController")],t.prototype,"sortController",void 0),__decorate$u([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("ssrmNodeManager")],t.prototype,"nodeManager",void 0),__decorate$u([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("filterManager")],t.prototype,"filterManager",void 0),__decorate$u([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("ssrmTransactionManager")],t.prototype,"transactionManager",void 0),__decorate$u([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"postConstruct",null),__decorate$u([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PreDestroy],t.prototype,"destroyRowNodes",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RowNodeBlock),__extends$v=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$t=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},__read$7=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},__spread$5=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read$7(arguments[t]));return e},LazyBlockLoader=function(e){function t(t,r,o){var i=e.call(this)||this;return i.loadingNodes=new Set,i.loaderTimeout=void 0,i.nextBlockToLoad=void 0,i.parentNode=r,i.c
2ache=t,i.storeParams=o,i}return __extends$v(t,e),t.prototype.init=function(){var e=this;this.addManagedListener(this.rowNodeBlockLoader,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RowNodeBlockLoader.BLOCK_LOADED_EVENT,function(){return e.queueLoadAction()})},t.prototype.isRowLoading=function(e){return this.loadingNodes.has(e)},t.prototype.doesRowNeedLoaded=function(e){if(this.loadingNodes.has(e))return!1;var t=this.cache.getRowByStoreIndex(e);if(!t)return!1;if(t.__needsRefresh)return!0;var r=this.api.getFirstDisplayedRow(),o=this.api.getLastDisplayedRow();return!!(null!=t.rowIndex&&t.rowIndex>=r&&t.rowIndex<=o)&&(t.stub&&!t.failedLoad||t.__needsRefreshWhenVisible)},t.prototype.getBlocksToLoad=function(){var e=this,t=new Set;return this.cache.getNodeMapEntries().forEach(function(r){var o=__read$7(r,2),i=o[0];o[1];var n=Number(i),a=e.getBlockStartIndexForIndex(n);e.doesRowNeedLoaded(n)&&t.add(a)}),__spread$5(t)},t.prototype.getNodeRanges=function(){var e=this,r={};return this.getBlocksToLoad().forEach(function(o){var i=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.oneOrGreater(e.gridOptionsService.getNum("cacheBlockSize"))||t.DEFAULT_BLOCK_SIZE,n=o-o%i;r[n]=n+i}),r},t.prototype.reset=function(){this.loadingNodes.clear(),clearTimeout(this.loaderTimeout),this.loaderTimeout=void 0},t.prototype.executeLoad=function(e,t){var r,o=this,i=this.cache.getSsrmParams(),n={startRow:e,endRow:t,rowGroupCols:i.rowGroupCols,valueCols:i.valueCols,pivotCols:i.pivotCols,pivotMode:i.pivotMode,groupKeys:this.parentNode.getGroupKeys(),filterModel:i.filterModel,sortModel:i.sortModel},a=function(){for(var r=0;r<t-e;r++)o.loadingNodes.delete(e+r)},s=function(r){o.rowNodeBlockLoader.loadComplete(),o.cache.onLoadSuccess(e,t-e,r),a(),o.queueLoadAction()},l=function(){o.rowNodeBlockLoader.loadComplete(),o.cache.onLoadFailed(e,t-e),a(),o.queueLoadAction()},c={request:n,successCallback:function(e,t){return s({rowData:e,rowCount:t})},success:s,failCallback:l,fail:l,parentNode:this.parentNode,api:this.api,columnApi:this.columnApi,context:this.gridOptionsService.context};!function(){for(var r=0;r<t-e;r++)o.loadingNodes.add(e+r)}(),null===(r=this.cache.getSsrmParams().datasource)||void 0===r||r.getRows(c)},t.prototype.isBlockInViewport=function(e,t){var r=this.api.getFirstDisplayedRow(),o=this.api.getLastDisplayedRow();return e<=r&&t>=o||t>r&&t<o||e>r&&e<o},t.prototype.getNextBlockToLoad=function(){var e=this,t=this.getNodeRanges(),r=Object.entries(t);if(0===r.length)return null;var o=this.api.getFirstDisplayedRow();return r.sort(function(t,r){var i=__read$7(t,2),n=i[0],a=i[1],s=__read$7(r,2),l=s[0],c=s[1],u=e.isBlockInViewport(Number(n),a),d=e.isBlockInViewport(Number(l),c);return u?-1:d?1:Math.abs(o-Number(n))-Math.abs(o-Number(l))}),r[0]},t.prototype.queueLoadAction=function(){var e,t=this,r=this.getNextBlockToLoad();if(!r)return window.clearTimeout(this.loaderTimeout),this.loaderTimeout=void 0,void(this.nextBlockToLoad=void 0);if(!this.nextBlockToLoad||this.nextBlockToLoad[0]!==r[0]&&this.nextBlockToLoad[1]!==r[1]){this.nextBlockToLoad=r,window.clearTimeout(this.loaderTimeout);var o=__read$7(this.nextBlockToLoad,2),i=o[0],n=o[1],a=Number(i);this.loaderTimeout=window.setTimeout(function(){t.cache.isAlive()&&(t.loaderTimeout=void 0,t.attemptLoad(a,n),t.nextBlockToLoad=void 0)},null!==(e=this.gridOptionsService.getNum("blockLoadDebounceMillis"))&&void 0!==e?e:0)}},t.prototype.attemptLoad=function(e,t){var r=this.rowNodeBlockLoader.getAvailableLoadingCount();null!=r&&0===r||(this.rowNodeBlockLoader.registerLoads(1),this.executeLoad(e,t),this.queueLoadAction())},t.prototype.getBlockSize=function(){return this.storeParams.cacheBlockSize||t.DEFAULT_BLOCK_SIZE},t.prototype.getBlockStartIndexForIndex=function(e){return e-e%this.getBlockSize()},t.prototype.getBlockBoundsForIndex=function(e){var t=this.getBlockStartIndexForIndex(e);return[t,t+this.getBlockSize()]},t.DEFAULT_BLOCK_SIZE=100,__decorate$t([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("gridApi")],t.prototype,"api",void 0),__decorate$t([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnApi")],t.prototype,"columnApi",void 0),__decorate$t([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("rowNodeBlockLoader")],t.prototype,"rowNodeBlockLoader",void 0),__decorate$t([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"init",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.BeanStub),__extends$u=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$s=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},__read$6=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},__spread$4=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read$6(arguments[t]));return e},LazyCache=function(e){function t(t,r,o){var i=e.call(this)||this;return i.live=!0,i.store=t,i.numberOfRows=r,i.isLastRowKnown=!1,i.storeParams=o,i}return __extends$u(t,e),t.prototype.init=function(){this.nodeIndexMap={},this.nodeIds=new Set,this.defaultNodeIdPrefix=this.blockUtils.createNodeIdPrefix(this.store.getParentNode()),this.rowLoader=this.createManagedBean(new LazyBlockLoader(this,this.store.getParentNode(),this.storeParams))},t.prototype.destroyRowNodes=function(){this.numberOfRows=0,this.blockUtils.destroyRowNodes(this.getAllNodes()),this.nodeIndexMap={},this.nodeIds.clear(),this.live=!1},t.prototype.getRowByDisplayIndex=function(e){var t;if(this.store.isDisplayIndexInStore(e)){for(var r,o=this.getNodeMapEntries(),i=0;i<o.length;i++){var n=__read$6(o[i],2),a=n[0],s=n[1];if(s.rowIndex===e)return(s.stub||s.__needsRefreshWhenVisible)&&this.rowLoader.queueLoadAction(),s;var l=s.master&&s.expanded,c=s.detailNode;if(l&&c&&c.rowIndex===e)return c;if(null===(t=s.childStore)||void 0===t?void 0:t.isDisplayIndexInStore(e))return s.childStore.getRowUsingDisplayIndex(e);if(s.rowIndex>e){r=a;break}}if(null==r){var u=this.store.getRowCount()-(this.store.getDisplayIndexEnd()-e);return this.createStubNode(u,e)}var d=Number(r),p=d-(this.nodeIndexMap[d].rowIndex-e);return this.createStubNode(p,e)}},t.prototype.createStubNode=function(e,t){var r=this.store.getRowBounds(t),o=this.createRowAtIndex(e,null,function(e){e.setRowIndex(t),e.setRowTop(r.rowTop)});return this.rowLoader.queueLoadAction(),o},t.prototype.getRowByStoreIndex=function(e){return this.nodeIndexMap[e]},t.prototype.skipDisplayIndexes=function(e,t,r){var o=this.gridOptionsService.getRowHeightAsNumber();t.skip(e),r.value+=e*o},t.prototype.setDisplayIndexes=function(e,t){var r=this,o=this.getNodeMapEntries(),i=-1;o.forEach(function(o){var n=__read$6(o,2),a=n[0],s=n[1],l=Number(a),c=l-1-i;r.skipDisplayIndexes(c,e,t),r.blockUtils.setDisplayIndex(s,e,t),i=l});var n=this.numberOfRows-1-i;this.skipDisplayIndexes(n,e,t),this.purgeExcessRows()},t.prototype.getRowCount=function(){return this.numberOfRows},t.prototype.setRowCount=function(e,t){if(e<0)throw new Error("AG Grid: setRowCount can only accept a positive row count.");this.numberOfRows=e,null!=t&&(this.isLastRowKnown=t),this.fireStoreUpdatedEvent()},t.prototype.getNodeMapEntries=function(){return Object.entries(this.nodeIndexMap)},t.prototype.getAllNodes=function(){return Object.values(this.nodeIndexMap)},t.prototype.getDisplayIndexFromStoreIndex=function(e){var t,r=this.nodeIndexMap[e],o=this.store.getDisplayIndexStart();if(null==o)return null;if(r&&null!=r.rowIndex)return r.rowIndex;for(var i=this.getNodeMapEntries(),n=void 0,a=-1,s=0;s<i.length;s++){var l=__read$6(i[s],2),c=l[0],u=l[1],d=Number(c);if(d>e)break;n=u,a=d}if(null==n)return o+e;var p=e-a,h=null===(t=n.childStore)||void 0===t?void 0:t.getDisplayIndexEnd();return null!=h?h+p-1:null!=n.rowIndex?n.rowIndex+p:o+e},t.prototype.createRowAtIndex=function(e,t,r){var o=this,i=this.isUsingRowIds(),n=this.nodeIndexMap[e];if(n){if(n.__needsRefresh=!1,n.__needsRefreshWhenVisible=!1,this.doesNodeMatch(t,n))return this.blockUtils.updateDataIntoRowNode(n,t),n;if(!i&&n.group&&n.expanded)return n;this.destroyRowAtIndex(e)}if(t&&i){var a=this.getNodeMapEntries().find(function(e){var r=__read$6(e,2);r[0];var i=r[1];return o.doesNodeMatch(t,i)});if(a){var s=__read$6(a,2),l=s[0],c=s[1],u=Number(l);return this.blockUtils.updateDataIntoRowNode(c,t),delete this.nodeIndexMap[u],this.nodeIndexMap[e]=c,this.markBlockForVerify(u),c}}
2var d=this.blockUtils.createRowNode(this.store.getRowDetails());if(null!=t){var p=this.getPrefixedId(this.store.getIdSequence().next());this.blockUtils.setDataIntoRowNode(d,t,p,void 0),this.blockUtils.checkOpenByDefault(d),this.nodeManager.addRowNode(d),this.nodeIds.add(d.id)}return this.nodeIndexMap[e]=d,r&&r(d),d.stub&&this.rowLoader.queueLoadAction(),d},t.prototype.getBlockStates=function(){var e=this,t={},r={},o=new Set;this.getNodeMapEntries().forEach(function(i){var n,a=__read$6(i,2),s=a[0],l=a[1],c=Number(s),u=e.rowLoader.getBlockStartIndexForIndex(c);l.stub||l.failedLoad||(t[u]=(null!==(n=t[u])&&void 0!==n?n:0)+1);var d="loaded";l.failedLoad?d="failed":e.rowLoader.isRowLoading(u)?d="loading":l.__needsRefresh&&(d="needsLoading"),(l.__needsRefreshWhenVisible||l.stub)&&o.add(u),r[u]||(r[u]=new Set),r[u].add(d)});var i={loading:4,failed:3,needsLoading:2,loaded:1},n=this.blockUtils.createNodeIdPrefix(this.store.getParentNode()),a={};return Object.entries(r).forEach(function(r){var o,s=__read$6(r,2),l=s[0],c=s[1],u=__spread$4(c).sort(function(e,t){var r,o;return(null!==(r=i[e])&&void 0!==r?r:0)-(null!==(o=i[t])&&void 0!==o?o:0)}),d=u[0],p=Number(l)/e.rowLoader.getBlockSize(),h=n?n+"-"+p:String(p);a[h]={blockNumber:p,startRow:Number(l),endRow:Number(l)+e.rowLoader.getBlockSize(),pageStatus:d,loadedRowCount:null!==(o=t[l])&&void 0!==o?o:0}}),a},t.prototype.destroyRowAtIndex=function(e){var t=this.nodeIndexMap[e];this.nodeIds.delete(t.id),this.blockUtils.destroyRowNode(t),delete this.nodeIndexMap[e]},t.prototype.getSsrmParams=function(){return this.store.getSsrmParams()},t.prototype.getPrefixedId=function(e){return this.defaultNodeIdPrefix?this.defaultNodeIdPrefix+"-"+e:e.toString()},t.prototype.markBlockForVerify=function(e){for(var t=__read$6(this.rowLoader.getBlockBoundsForIndex(e),2),r=t[0],o=t[1],i=r;i<o;i++){var n=this.nodeIndexMap[i];n&&(n.__needsRefreshWhenVisible=!0)}},t.prototype.doesNodeMatch=function(e,t){if(t.stub)return!1;if(this.isUsingRowIds()){var r=this.getRowId(e);return t.id===r}return t.data===e},t.prototype.purgeStubsOutsideOfViewport=function(){var e=this,t=this.api.getFirstDisplayedRow(),r=this.api.getLastDisplayedRow(),o=this.rowLoader.getBlockStartIndexForIndex(t),i=__read$6(this.rowLoader.getBlockBoundsForIndex(r),2);i[0];var n=i[1];this.getNodeMapEntries().forEach(function(t){var r=__read$6(t,2),i=r[0],a=r[1],s=Number(i);e.rowLoader.isRowLoading(s)||a.stub&&(s<o||s>n)&&e.destroyRowAtIndex(s)})},t.prototype.getNumberOfRowsToRetain=function(e,t){var r=this.storeParams.maxBlocksInCache;if(null==r)return null;var o=this.rowLoader.getBlockSize(),i=Math.ceil((t-e)/o);return Math.max(r,i)*o},t.prototype.getBlocksDistanceFromRow=function(e,t){var r=this,o={};return e.forEach(function(e){var i=__read$6(e,2),n=i[0],a=i[1],s=__read$6(r.rowLoader.getBlockBoundsForIndex(Number(n)),2),l=s[0],c=s[1];if(!(l in o)){var u,d=Math.abs(a.rowIndex-t);r.nodeIndexMap[c-1]&&(u=Math.abs(r.nodeIndexMap[c-1].rowIndex-t));var p=null==u||d<u?d:u;o[l]=p}}),Object.entries(o)},t.prototype.purgeExcessRows=function(){var e=this;this.purgeStubsOutsideOfViewport();var t=this.api.getFirstDisplayedRow(),r=this.api.getLastDisplayedRow(),o=this.rowLoader.getBlockStartIndexForIndex(t),i=__read$6(this.rowLoader.getBlockBoundsForIndex(r),2);i[0];var n=i[1],a=this.getNumberOfRowsToRetain(o,n);if(null!=this.store.getDisplayIndexEnd()&&null!=a){var s=this.getNodeMapEntries().filter(function(t){var r=__read$6(t,2);r[0];var o=r[1];return!o.stub&&!e.isNodeCached(o)});if(!(s.length<=a)){var l=s.filter(function(e){var o=__read$6(e,2);o[0];var i=o[1].rowIndex;if(!i)return!0;if(t<=i&&i<=r)return!1;var n=i+d;return!(t<=n&&n<=r||i<t&&n>r)});if(l.length){var c=t+(r-t)/2,u=this.getBlocksDistanceFromRow(l,c),d=this.rowLoader.getBlockSize(),p=Math.ceil(a/d);if(!(u.length<=p)){u.sort(function(e,t){return Math.sign(t[1]-e[1])});for(var h=u.length-p,_=0;_<h;_++)for(var f=Number(u[_][0]),g=f;g<f+d;g++){var y=this.nodeIndexMap[g];y&&!this.isNodeCached(y)&&this.destroyRowAtIndex(g)}}}}}},t.prototype.isNodeFocused=function(e){var t=this.focusService.getFocusCellToUseAfterRefresh();return!!t&&null==t.rowPinned&&t.rowIndex===e.rowIndex},t.prototype.isNodeCached=function(e){return!!e.group&&e.expanded||this.isNodeFocused(e)},t.prototype.extractDuplicateIds=function(e){var t=this;if(!this.isUsingRowIds())return[];var r=new Set,o=new Set;return e.forEach(function(e){var i=t.getRowId(e);r.has(i)?o.add(i):r.add(i)}),__spread$4(o)},t.prototype.onLoadSuccess=function(e,t,r){var o=this;if(this.live){if(this.isUsingRowIds()){var i=this.extractDuplicateIds(r.rowData);if(i.length>0){var n=i.join(", ");return console.warn("AG Grid: Unable to display rows as duplicate row ids ("+n+") were returned by the getRowId callback. Please modify the getRowId callback to provide unique ids."),void this.onLoadFailed(e,t)}}if(r.rowData.forEach(function(t,r){var i=e+r,n=o.nodeIndexMap[i];if(!(null==n?void 0:n.stub))return n&&o.doesNodeMatch(t,n)?(o.blockUtils.updateDataIntoRowNode(n,t),n.__needsRefresh=!1,void(n.__needsRefreshWhenVisible=!1)):void o.createRowAtIndex(i,t);o.createRowAtIndex(i,t)}),null!=r.rowCount&&-1!==r.rowCount)this.numberOfRows=r.rowCount,this.isLastRowKnown=!0;else if(t>r.rowData.length)this.numberOfRows=e+r.rowData.length,this.isLastRowKnown=!0;else if(!this.isLastRowKnown){var a=e+r.rowData.length+1;a>this.numberOfRows&&(this.numberOfRows=a)}if(this.isLastRowKnown)for(var s=this.getNodeMapEntries(),l=s.length-1;l>=0;l--){var c=Number(s[l][0]);if(c<this.numberOfRows)break;this.destroyRowAtIndex(c)}this.fireStoreUpdatedEvent()}},t.prototype.isLastRowIndexKnown=function(){return this.isLastRowKnown},t.prototype.onLoadFailed=function(e,t){if(this.live){for(var r=e;r<e+t;r++){var o=this.nodeIndexMap[r];o&&(o.failedLoad=!0)}this.fireStoreUpdatedEvent()}},t.prototype.markNodesForRefresh=function(){this.getAllNodes().forEac
2h(function(e){return e.__needsRefresh=!0}),this.rowLoader.queueLoadAction()},t.prototype.isNodeInCache=function(e){return this.nodeIds.has(e)},t.prototype.fireStoreUpdatedEvent=function(){this.live&&this.store.fireStoreUpdatedEvent()},t.prototype.isUsingRowIds=function(){return null!=this.gridOptionsService.getRowIdFunc()},t.prototype.getRowId=function(e){var t=this.gridOptionsService.getRowIdFunc();if(null==t)return null;var r=this.store.getRowDetails().level,o=this.store.getParentNode().getGroupKeys(),i=t({data:e,parentKeys:o.length>0?o:void 0,level:r});return String(i)},t.prototype.lookupRowNode=function(e){var t;if(!this.isUsingRowIds())throw new Error("AG Grid: Insert transactions can only be applied when row ids are supplied.");var r=this.getRowId(e);return null!==(t=this.getAllNodes().find(function(e){return e.id===r}))&&void 0!==t?t:null},t.prototype.updateRowNodes=function(e){var t=this,r=[];return e.forEach(function(e){var o=t.lookupRowNode(e);o&&(t.blockUtils.updateDataIntoRowNode(o,e),r.push(o))}),r},t.prototype.insertRowNodes=function(e,t){var r=this,o=null==t&&this.isLastRowKnown?this.store.getRowCount():t;if(null==o||this.store.getRowCount()<o)return[];if(!this.isUsingRowIds())throw new Error("AG Grid: Insert transactions can only be applied when row ids are supplied.");var i={};e.forEach(function(e){var t=r.getRowId(e);t&&r.isNodeInCache(t)||(i[t]=e)});var n=Object.values(i),a=n.length;if(0===a)return[];for(var s=this.getNodeMapEntries(),l=s.length-1;l>=0;l--){var c=__read$6(s[l],2),u=c[0],d=c[1],p=Number(u);if(p<o)break;var h=p+a;if(this.getRowByStoreIndex(h))throw new Error("AG Grid: Something went wrong, node in wrong place.");this.nodeIndexMap[p+a]=d,delete this.nodeIndexMap[p]}return this.numberOfRows+=a,n.map(function(e,t){return r.createRowAtIndex(o+t,e)})},t.prototype.removeRowNodes=function(e){if(!this.isUsingRowIds())throw new Error("AG Grid: Insert transactions can only be applied when row ids are supplied.");for(var t=[],r=this.getNodeMapEntries(),o=0,i=__spread$4(e),n=[],a=function(e){var a=__read$6(r[e],2),l=a[0],c=a[1],u=i.findIndex(function(e){return e===c.id});if(-1!==u)return i.splice(u,1),s.destroyRowAtIndex(Number(l)),t.push(c),o+=1,"continue";if(0===o)return"continue";var d=Number(l);e!==d&&n.push(c),s.nodeIndexMap[d-o]=s.nodeIndexMap[d],delete s.nodeIndexMap[d]},s=this,l=0;l<r.length;l++)a(l);return this.numberOfRows-=this.isLastRowIndexKnown()?e.length:o,i.length>0&&n.length>0&&(n.forEach(function(e){return e.__needsRefreshWhenVisible=!0}),this.rowLoader.queueLoadAction()),t},__decorate$s([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("gridApi")],t.prototype,"api",void 0),__decorate$s([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("ssrmBlockUtils")],t.prototype,"blockUtils",void 0),__decorate$s([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("focusService")],t.prototype,"focusService",void 0),__decorate$s([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("ssrmNodeManager")],t.prototype,"nodeManager",void 0),__decorate$s([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"init",null),__decorate$s([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PreDestroy],t.prototype,"destroyRowNodes",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.BeanStub),__extends$t=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$r=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},__read$5=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},__spread$3=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read$5(arguments[t]));return e},LazyStore=function(e){function t(t,r,o){var i=e.call(this)||this;return i.idSequence=new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.NumberSequence,i.ssrmParams=t,i.parentRowNode=o,i.storeParams=r,i.level=o.level+1,i.group=!!t.rowGroupCols&&i.level<t.rowGroupCols.length,i.leafGroup=!!t.rowGroupCols&&i.level===t.rowGroupCols.length-1,i}return __extends$t(t,e),t.prototype.init=function(){var e=1;if(0===this.level&&(e=this.storeUtils.getServerSideInitialRowCount()),this.cache=this.createManagedBean(new LazyCache(this,e,this.storeParams)),!this.gridOptionsService.isTreeData()&&this.group){var t=this.ssrmParams.rowGroupCols[this.level];this.groupField=t.field,this.rowGroupColumn=this.columnModel.getRowGroupColumns()[this.level]}},t.prototype.destroyRowNodes=function(){this.displayIndexStart=void 0,this.displayIndexEnd=void 0,this.destroyBean(this.cache)},t.prototype.applyTransaction=function(e){var t,r,o,i=this,n=this.gridOptionsService.getRowIdFunc();if(!n)return console.warn("AG Grid: getRowId callback must be implemented for transactions to work. Transaction was ignored."),{status:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ServerSideTransactionResultStatus.Cancelled};var a=this.gridOptionsService.getCallback("isApplyServerSideTransaction");if(a&&!a({transaction:e,parentNode:this.parentRowNode,storeInfo:this.info,groupLevelInfo:this.info}))return{status:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ServerSideTransactionResultStatus.Cancelled};var s=void 0;(null===(t=e.update)||void 0===t?void 0:t.length)&&(s=this.cache.updateRowNodes(e.update));var l=void 0;if(null===(r=e.add)||void 0===r?void 0:r.length){var c=e.addIndex;null!=c&&c<0&&(c=void 0),l=this.cache.insertRowNodes(e.add,c)}var u=void 0;if(null===(o=e.remove)||void 0===o?void 0:o.length){var d=e.remove.map(function(e){return n({level:i.level,parentKeys:i.parentRowNode.getGroupKeys(),data:e})}),p=__spread$3(new Set(d));u=this.cache.removeRowNodes(p)}return this.updateSelectionAfterTransaction(s,u),{status:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ServerSideTransactionResultStatus.Applied,update:s,add:l,remove:u}}
2,t.prototype.updateSelectionAfterTransaction=function(e,t){var r=!1;if(null==e||e.forEach(function(e){e.isSelected()&&!e.selectable&&(e.setSelected(!1,!1,!0,"rowDataChanged"),r=!0)}),null==t||t.forEach(function(e){e.isSelected()&&(e.setSelected(!1,!1,!0,"rowDataChanged"),r=!0)}),r){var o={type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_SELECTION_CHANGED,source:"rowDataChanged"};this.eventService.dispatchEvent(o)}},t.prototype.clearDisplayIndexes=function(){var e=this;this.displayIndexStart=void 0,this.displayIndexEnd=void 0,this.cache.getAllNodes().forEach(function(t){return e.blockUtils.clearDisplayIndex(t)})},t.prototype.getDisplayIndexStart=function(){return this.displayIndexStart},t.prototype.getDisplayIndexEnd=function(){return this.displayIndexEnd},t.prototype.getRowCount=function(){return this.cache.getRowCount()},t.prototype.setRowCount=function(e,t){this.cache.setRowCount(e,t)},t.prototype.isDisplayIndexInStore=function(e){return 0!==this.cache.getRowCount()&&this.displayIndexStart<=e&&e<this.getDisplayIndexEnd()},t.prototype.setDisplayIndexes=function(e,t){this.displayIndexStart=e.peek(),this.topPx=t.value,this.cache.setDisplayIndexes(e,t),this.displayIndexEnd=e.peek(),this.heightPx=t.value-this.topPx},t.prototype.forEachStoreDeep=function(e,t){void 0===t&&(t=new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.NumberSequence),e(this,t.next()),this.cache.getAllNodes().forEach(function(r){var o=r.childStore;o&&o.forEachStoreDeep(e,t)})},t.prototype.forEachNodeDeep=function(e,t){void 0===t&&(t=new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.NumberSequence),this.cache.getAllNodes().forEach(function(r){e(r,t.next());var o=r.childStore;o&&o.forEachNodeDeep(e,t)})},t.prototype.forEachNodeDeepAfterFilterAndSort=function(e,t){void 0===t&&(t=new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.NumberSequence),this.cache.getAllNodes().forEach(function(r){e(r,t.next());var o=r.childStore;o&&o.forEachNodeDeepAfterFilterAndSort(e,t)})},t.prototype.retryLoads=function(){this.cache.getAllNodes().forEach(function(e){e.failedLoad&&(e.failedLoad=!1,e.__needsRefreshWhenVisible=!0,e.stub=!0)}),this.forEachChildStoreShallow(function(e){return e.retryLoads()}),this.fireStoreUpdatedEvent()},t.prototype.getRowUsingDisplayIndex=function(e){return this.cache.getRowByDisplayIndex(e)},t.prototype.getRowBounds=function(e){if(!this.isDisplayIndexInStore(e))return null;for(var t=this.cache.getAllNodes(),r=null,o=null,i=0;i<t.length;i++){var n=t[i];if(n.rowIndex>e){o=n;break}r=n}if(r){var a=this.blockUtils.extractRowBounds(r,e);if(null!=a)return a}var s=this.gridOptionsService.getRowHeightAsNumber();if(o){var l=Math.floor((o.rowIndex-e)*s);return{rowTop:o.rowTop-l,rowHeight:s}}return{rowTop:this.topPx+this.heightPx-Math.floor((this.getDisplayIndexEnd()-e)*s),rowHeight:s}},t.prototype.isPixelInRange=function(e){return e>=this.topPx&&e<this.topPx+this.heightPx},t.prototype.getRowIndexAtPixel=function(e){if(e<this.topPx)return this.getDisplayIndexStart();if(e>=this.topPx+this.heightPx)return this.getDisplayIndexEnd()-1;for(var t=this.cache.getAllNodes(),r=null,o=null,i=0;i<t.length;i++){var n=t[i];if(n.rowTop>e){o=n;break}r=n}if(r){var a=this.blockUtils.getIndexAtPixel(r,e);if(null!=a)return a}var s=this.gridOptionsService.getRowHeightAsNumber();if(o){var l=o.rowTop,c=Math.ceil((l-e)/s);return o.rowIndex-c}var u=this.topPx+this.heightPx,d=Math.floor((u-e)/s);return this.getDisplayIndexEnd()-d},t.prototype.getChildStore=function(e){var t=this;return this.storeUtils.getChildStore(e,this,function(e){return t.cache.getAllNodes().find(function(t){return t.key==e})})},t.prototype.forEachChildStoreShallow=function(e){this.cache.getAllNodes().forEach(function(t){t.childStore&&e(t.childStore)})},t.prototype.refreshAfterSort=function(e){if(this.storeUtils.isServerSideSortAllLevels()||this.storeUtils.isServerRefreshNeeded(this.parentRowNode,this.ssrmParams.rowGroupCols,e)){var t=this.cache.getRowCount();return this.destroyBean(this.cache),this.cache=this.createManagedBean(new LazyCache(this,t,this.storeParams)),void this.fireStoreUpdatedEvent()}this.forEachChildStoreShallow(function(t){return t.refreshAfterSort(e)})},t.prototype.refreshAfterFilter=function(e){this.storeUtils.isServerSideFilterAllLevels()||this.storeUtils.isServerRefreshNeeded(this.parentRowNode,this.ssrmParams.rowGroupCols,e)?this.refreshStore(!0):this.forEachChildStoreShallow(function(t){return t.refreshAfterFilter(e)})},t.prototype.refreshStore=function(e){if(e)return this.destroyBean(this.cache),this.cache=this.createManagedBean(new LazyCache(this,1,this.storeParams)),void this.fireStoreUpdatedEvent();this.cache.markNodesForRefresh()},t.prototype.getTopLevelRowDisplayedIndex=function(e){var t=this.cache.getDisplayIndexFromStoreIndex(e);return null!=t?t:e},t.prototype.isLastRowIndexKnown=function(){return this.cache.isLastRowIndexKnown()},t.prototype.getRowNodesInRange=function(e,t){var r=[],o=!1;return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.missing(e)&&(o=!0),this.cache.getAllNodes().forEac
2h(function(i){var n=i===e||i===t;(o||n)&&r.push(i),n&&(o=!o)}),o?[]:r},t.prototype.addStoreStates=function(e){e.push({suppressInfiniteScroll:!1,route:this.parentRowNode.getGroupKeys(),rowCount:this.getRowCount(),lastRowIndexKnown:this.isLastRowIndexKnown(),info:this.info,maxBlocksInCache:this.storeParams.maxBlocksInCache,cacheBlockSize:this.storeParams.cacheBlockSize}),this.forEachChildStoreShallow(function(t){return t.addStoreStates(e)})},t.prototype.getIdSequence=function(){return this.idSequence},t.prototype.getParentNode=function(){return this.parentRowNode},t.prototype.getRowDetails=function(){return{field:this.groupField,group:this.group,leafGroup:this.leafGroup,level:this.level,parent:this.parentRowNode,rowGroupColumn:this.rowGroupColumn}},t.prototype.getSsrmParams=function(){return this.ssrmParams},t.prototype.setStoreInfo=function(e){this.info=e},t.prototype.fireStoreUpdatedEvent=function(){var e={type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_STORE_UPDATED};this.eventService.dispatchEvent(e)},t.prototype.getBlockStates=function(){return this.cache.getBlockStates()},__decorate$r([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("ssrmBlockUtils")],t.prototype,"blockUtils",void 0),__decorate$r([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("ssrmStoreUtils")],t.prototype,"storeUtils",void 0),__decorate$r([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],t.prototype,"columnModel",void 0),__decorate$r([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"init",null),__decorate$r([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PreDestroy],t.prototype,"destroyRowNodes",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.BeanStub),__extends$s=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$q=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},__read$4=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},ServerSideRowModel=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onRowHeightChanged_debounced=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.debounce(t.onRowHeightChanged.bind(t),100),t.pauseStoreUpdateListening=!1,t.started=!1,t}return __extends$s(t,e),t.prototype.ensureRowHeightsValid=function(){return!1},t.prototype.start=function(){this.started=!0;var e=this.gridOptionsService.get("serverSideDatasource");e&&this.setDatasource(e)},t.prototype.destroyDatasource=function(){this.datasource&&(this.datasource.destroy&&this.datasource.destroy(),this.rowRenderer.datasourceChanged(),this.datasource=void 0)},t.prototype.addEventListeners=function(){this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_NEW_COLUMNS_LOADED,this.onColumnEverything.bind(this)),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_STORE_UPDATED,this.onStoreUpdated.bind(this));var e=this.resetRootStore.bind(this);this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_COLUMN_VALUE_CHANGED,e),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_COLUMN_PIVOT_CHANGED,e),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_COLUMN_ROW_GROUP_CHANGED,e),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED,e),this.verifyProps()},t.prototype.verifyProps=function(){(this.gridOptionsService.exists("initialGroupOrderComparator")||this.gridOptionsService.exists("defaultGroupOrderComparator"))&&ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.doOnce(function(){return console.warn("AG Grid: initialGroupOrderComparator cannot be used with Server Side Row Model. If using Full Store, then provide the rows to the grid in the desired sort order. If using Infinite Scroll, then sorting is done on the server side, nothing to do with the client.")},"SSRM.InitialGroupOrderComparator"),this.gridOptionsService.isRowSelection()&&
2!this.gridOptionsService.exists("getRowId")&&ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.doOnce(function(){return console.warn("AG Grid: getRowId callback must be provided for Server Side Row Model selection to work correctly.")},"SSRM.SelectionNeedsRowNodeIdFunc")},t.prototype.setDatasource=function(e){this.started&&(this.destroyDatasource(),this.datasource=e,this.resetRootStore())},t.prototype.isLastRowIndexKnown=function(){var e=this.getRootStore();return!!e&&e.isLastRowIndexKnown()},t.prototype.onColumnEverything=function(){if(this.storeParams){var e=this.columnsToValueObjects(this.columnModel.getRowGroupColumns()),t=this.columnsToValueObjects(this.columnModel.getValueColumns()),r=this.columnsToValueObjects(this.columnModel.getPivotColumns()),o=function(e){var t={};e.oldCols.forEach(function(e){return t[e.id]=e});var r=e.newCols.every(function(e){var r=t[e.id];return r&&delete t[e.id],r&&r.field===e.field&&r.aggFunc===e.aggFunc}),o=!e.allowRemovedColumns&&!!Object.values(t).length;return r&&!o},i=!ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.jsonEquals(this.storeParams.sortModel,this.sortListener.extractSortModel()),n=!o({oldCols:this.storeParams.rowGroupCols,newCols:e}),a=!o({oldCols:this.storeParams.pivotCols,newCols:r}),s=!!(null==e?void 0:e.length)&&!o({oldCols:this.storeParams.valueCols,newCols:t,allowRemovedColumns:!0});if(i||n||a||s)this.resetRootStore();else{var l=this.createStoreParams();this.storeParams.rowGroupCols=l.rowGroupCols,this.storeParams.pivotCols=l.pivotCols,this.storeParams.valueCols=l.valueCols}}else this.resetRootStore()},t.prototype.destroyRootStore=function(){this.rootNode&&this.rootNode.childStore&&(this.rootNode.childStore=this.destroyBean(this.rootNode.childStore),this.nodeManager.clear())},t.prototype.refreshAfterSort=function(e,t){this.storeParams&&(this.storeParams.sortModel=e);var r=this.getRootStore();r&&(r.refreshAfterSort(t),this.onStoreUpdated())},t.prototype.resetRootStore=function(){this.destroyRootStore(),this.rootNode=new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RowNode(this.beans),this.rootNode.group=!0,this.rootNode.level=-1,this.datasource&&(this.storeParams=this.createStoreParams(),this.rootNode.childStore=this.createBean(this.storeFactory.createStore(this.storeParams,this.rootNode)),this.updateRowIndexesAndBounds());var e={type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_ROW_DATA_UPDATED};this.eventService.dispatchEvent(e),this.dispatchModelUpdated(!0)},t.prototype.columnsToValueObjects=function(e){var t=this;return e.map(function(e){return{id:e.getId(),aggFunc:e.getAggFunc(),displayName:t.columnModel.getDisplayNameForColumn(e,"model"),field:e.getColDef().field}})},t.prototype.createStoreParams=function(){var e=this.columnsToValueObjects(this.columnModel.getRowGroupColumns()),t=this.columnsToValueObjects(this.columnModel.getValueColumns()),r=this.columnsToValueObjects(this.columnModel.getPivotColumns()),o=this.gridOptionsService.isGetRowHeightFunction();return{valueCols:t,rowGroupCols:e,pivotCols:r,pivotMode:this.columnModel.isPivotMode(),filterModel:this.filterManager.getFilterModel(),sortModel:this.sortListener.extractSortModel(),datasource:this.datasource,lastAccessedSequence:new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.NumberSequence,dynamicRowHeight:o}},t.prototype.getParams=function(){return this.storeParams},t.prototype.dispatchModelUpdated=function(e){void 0===e&&(e=!1);var t={type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_MODEL_UPDATED,animate:!e,keepRenderedRows:!e,newPage:!1,newData:!1};this.eventService.dispatchEvent(t)},t.prototype.onStoreUpdated=function(){this.pauseStoreUpdateListening||(this.updateRowIndexesAndBounds(),this.dispatchModelUpdated())},t.prototype.onRowHeightChangedDebounced=function(){this.onRowHeightChanged_debounced()},t.prototype.onRowHeightChanged=function(){this.updateRowIndexesAndBounds(),this.dispatchModelUpdated()},t.prototype.updateRowIndexesAndBounds=function(){var e=this.getRootStore();e&&e.setDisplayIndexes(new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.NumberSequence,{value:0})},t.prototype.retryLoads=function(){var e=this.getRootStore();e&&(e.retryLoads(),this.onStoreUpdated())},t.prototype.getRow=function(e){var t=this.getRootStore();if(t)return t.getRowUsingDisplayIndex(e)},t.prototype.expandAll=function(e){this.pauseStoreUpdateListening=!0,this.forEachNode(function(t){t.stub||t.hasChildren()&&t.setExpanded(e)}),this.pauseStoreUpdateListening=!1,this.onStoreUpdated()},t.prototype.refreshAfterFilter=function(e,t){this.storeParams&&(this.storeParams.filterModel=e);var r=this.getRootStore();r&&(r.refreshAfterFilter(t),this.onStoreUpdated())},t.prototype.getRootStore=function(){if(this.rootNode&&this.rootNode.childStore)return this.rootNode.childStore},t.prototype.getRowCount=function(){var e=this.getRootStore();return e?e.getDisplayIndexEnd():0},t.prototype.getTopLevelRowCount=function(){var e=this.getRootStore();return e?e.getRowCount():1},t.prototype.getTopLevelRowDisplayedIndex=function(e){var t=this.getRootStore();return t?t.getTopLevelRowDisplayedIndex(e):e},t.prototype.getRowBounds=function(e){var t=this.getRootStore();return t?t.getRowBounds(e):{rowTop:0,rowHeight:this.gridOptionsService.getRowHeightAsNumber()}},t.prototype.getBlockStates=function(){var e=this.getRootStore();if(e){var t={};return e.forEachStoreDeep(function(e){if(e instanceof FullStore){var r=e.getBlockStateJson(),o=r.id,i=r.state;t[o]=i}else{if(!(e instanceof LazyStore))throw new Error("AG Grid: Unsupported store type");
2Object.entries(e.getBlockStates()).forEach(function(e){var r=__read$4(e,2),o=r[0],i=r[1];t[o]=i})}}),t}},t.prototype.getRowIndexAtPixel=function(e){var t=this.getRootStore();return e<=0||!t?0:t.getRowIndexAtPixel(e)},t.prototype.isEmpty=function(){return!1},t.prototype.isRowsToRender=function(){return null!=this.getRootStore()&&this.getRowCount()>0},t.prototype.getType=function(){return"serverSide"},t.prototype.forEachNode=function(e){var t=this.getRootStore();t&&t.forEachNodeDeep(e)},t.prototype.forEachNodeAfterFilterAndSort=function(e){var t=this.getRootStore();t&&t.forEachNodeDeepAfterFilterAndSort(e)},t.prototype.executeOnStore=function(e,t){var r=this.getRootStore();if(r){var o=r.getChildStore(e);o&&t(o)}},t.prototype.refreshStore=function(e){void 0===e&&(e={});var t=e.route?e.route:[];this.executeOnStore(t,function(t){return t.refreshStore(1==e.purge)})},t.prototype.getStoreState=function(){var e=[],t=this.getRootStore();return t&&t.addStoreStates(e),e},t.prototype.getNodesInRangeForSelection=function(e,t){if(!ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.exists(e))return[];if(!t)return[e];var r=e.rowIndex,o=t.rowIndex;if(null===r||null===o)return[e];var i=[],n=__read$4([r,o].sort(function(e,t){return e-t}),2),a=n[0],s=n[1];return this.forEachNode(function(e){var t=e.rowIndex;null==t||e.stub||t>=a&&t<=s&&i.push(e)}),i.every(function(e,t,r){return 0===t?e.rowIndex===a:r[t-1].rowIndex===e.rowIndex-1})&&i.length===s-a+1?i:[e]},t.prototype.getRowNode=function(e){var t;return this.forEachNode(function(r){r.id===e&&(t=r),r.detailNode&&r.detailNode.id===e&&(t=r.detailNode)}),t},t.prototype.isRowPresent=function(e){return!!this.getRowNode(e.id)},t.prototype.setRowCount=function(e,t){var r=this.getRootStore();if(r){if(r instanceof LazyStore)return void r.setRowCount(e,t);console.error("AG Grid: Infinite scrolling must be enabled in order to set the row count.")}},__decorate$q([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],t.prototype,"columnModel",void 0),__decorate$q([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("filterManager")],t.prototype,"filterManager",void 0),__decorate$q([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("rowRenderer")],t.prototype,"rowRenderer",void 0),__decorate$q([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("ssrmSortService")],t.prototype,"sortListener",void 0),__decorate$q([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("ssrmNodeManager")],t.prototype,"nodeManager",void 0),__decorate$q([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("ssrmStoreFactory")],t.prototype,"storeFactory",void 0),__decorate$q([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("beans")],t.prototype,"beans",void 0),__decorate$q([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PreDestroy],t.prototype,"destroyDatasource",null),__decorate$q([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"addEventListeners",null),__decorate$q([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PreDestroy],t.prototype,"destroyRootStore",null),__decorate$q([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Bean)("rowModel")],t)}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.BeanStub),__extends$r=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$p=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},StoreUtils=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$r(t,e),t.prototype.loadFromDatasource=function(e){var t=e.storeParams,r=e.parentBlock,o=e.parentNode.getGroupKeys();if(t.datasource){var i={startRow:e.startRow,endRow:e.endRow,rowGroupCols:t.rowGroupCols,valueCols:t.valueCols,pivotCols:t.pivotCols,pivotMode:t.pivotMode,groupKeys:o,filterModel:t.filterModel,sortModel:t.sortModel},n={successCallback:e.successCallback,success:e.success,failCallback:e.failCallback,fail:e.fail,request:i,parentNode:e.parentNode,api:this.gridApi,columnApi:this.columnApi,context:this.gridOptionsService.context};window.setTimeout(function(){t.datasource&&r.isAlive()?t.datasource.getRows(n):e.failCallback()},0)}},t.prototype.getChildStore=function(e,t,r){if(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.missingOrEmpty(e))return t;var o=r(e[0]);if(o){var i=e.slice(1,e.length),n=o.childStore;return n?n.getChildStore(i):null}return null},t.prototype.isServerRefreshNeeded=function(e,t,r){if(r.valueColChanged||r.secondaryColChanged)return!0;var o=e.level+1;if(!(o<t.length))return!0;var i=t[o].id;if(r.changedColumns.indexOf(i)>-1)return!0;var n=this.columnModel.getAllGridColumns().filter(function(e){return e.getColDef().showRowGroup&&r.changedColumns.includes(e.getId())}).map(function(e){return e.getColDef().showRowGroup}).some(function(e){return!0===e||e===i});return n},t.prototype.getServerSideInitialRowCount=function(){var e=this.gridOptionsService.getNum("serverSideInitialRowCount");return"number"==typeof e&&e>0?e:1},t.prototype.assertRowModelIsServerSide=function(e){return!!this.gridOptionsService.isRowModelType("serverSide")||(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.doOnce(function(){return console.warn("AG Grid: The '"+e+"' property can only be used with the Server Side Row Model.")},e),!1)},t.prototype.assertNotTreeData=function(e){return!this.gridOptionsService.is("treeData")||(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.doOnce(function(){return console.warn("AG Grid: The '"+e+"' property cannot be used while using tree data.")},e+"_TreeData"),!1)},t.prototype.isServerSideSortAllLevels=function(){return this.gridOptionsService.is("serverSideSortAllLevels")&&this.assertRowModelIsServerSide("serverSideSortAllLevels")}
2,t.prototype.isServerSideFilterAllLevels=function(){return this.gridOptionsService.is("serverSideFilterAllLevels")&&this.assertRowModelIsServerSide("serverSideFilterAllLevels")},t.prototype.isServerSideSortOnServer=function(){return this.gridOptionsService.is("serverSideSortOnServer")&&this.assertRowModelIsServerSide("serverSideSortOnServer")&&this.assertNotTreeData("serverSideSortOnServer")},t.prototype.isServerSideFilterOnServer=function(){return this.gridOptionsService.is("serverSideFilterOnServer")&&this.assertRowModelIsServerSide("serverSideFilterOnServer")&&this.assertNotTreeData("serverSideFilterOnServer")},__decorate$p([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnApi")],t.prototype,"columnApi",void 0),__decorate$p([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],t.prototype,"columnModel",void 0),__decorate$p([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("gridApi")],t.prototype,"gridApi",void 0),__decorate$p([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Bean)("ssrmStoreUtils")],t)}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.BeanStub),__extends$q=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$o=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},GROUP_MISSING_KEY_ID="ag-Grid-MissingKey",BlockUtils=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$q(t,e),t.prototype.postConstruct=function(){this.rowHeight=this.gridOptionsService.getRowHeightAsNumber(),this.usingTreeData=this.gridOptionsService.isTreeData(),this.usingMasterDetail=this.gridOptionsService.isMasterDetail()},t.prototype.createRowNode=function(e){var t=new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RowNode(this.beans),r=null!=e.rowHeight?e.rowHeight:this.rowHeight;return t.setRowHeight(r),t.group=e.group,t.leafGroup=e.leafGroup,t.level=e.level,t.uiLevel=e.level,t.parent=e.parent,t.stub=!0,t.__needsRefresh=!1,t.__needsRefreshWhenVisible=!1,t.group&&(t.expanded=!1,t.field=e.field,t.rowGroupColumn=e.rowGroupColumn),t},t.prototype.destroyRowNodes=function(e){var t=this;e&&e.forEach(function(e){return t.destroyRowNode(e)})},t.prototype.destroyRowNode=function(e,t){void 0===t&&(t=!1),e.childStore&&!t&&(this.destroyBean(e.childStore),e.childStore=null),e.clearRowTopAndRowIndex(),null!=e.id&&this.nodeManager.removeNode(e)},t.prototype.setTreeGroupInfo=function(e){e.updateHasChildren();var t=this.gridOptionsService.get("getServerSideGroupKey");e.hasChildren()&&null!=t&&(e.key=t(e.data)),e.hasChildren()||null==e.childStore||(this.destroyBean(e.childStore),e.childStore=null,e.expanded=!1)},t.prototype.setRowGroupInfo=function(e){e.key=this.valueService.getValue(e.rowGroupColumn,e),null!==e.key&&void 0!==e.ke
2y||ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.doOnce(function(){console.warn("AG Grid: null and undefined values are not allowed for server side row model keys"),e.rowGroupColumn&&console.warn("column = "+e.rowGroupColumn.getId()),console.warn("data is ",e.data)},"ServerSideBlock-CannotHaveNullOrUndefinedForKey")},t.prototype.setMasterDetailInfo=function(e){var t=this.gridOptionsService.get("isRowMaster");e.master=null==t||t(e.data)},t.prototype.updateDataIntoRowNode=function(e,t){e.updateData(t),this.usingTreeData?(this.setTreeGroupInfo(e),this.setChildCountIntoRowNode(e)):e.group?this.setChildCountIntoRowNode(e):this.usingMasterDetail},t.prototype.setDataIntoRowNode=function(e,t,r,o){e.stub=!1,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.exists(t)?(e.setDataAndId(t,r),this.usingTreeData?this.setTreeGroupInfo(e):e.group?this.setRowGroupInfo(e):this.usingMasterDetail&&this.setMasterDetailInfo(e)):(e.setDataAndId(void 0,void 0),e.key=null),(this.usingTreeData||e.group)&&(this.setGroupDataIntoRowNode(e),this.setChildCountIntoRowNode(e)),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.exists(t)&&e.setRowHeight(this.gridOptionsService.getRowHeightForNode(e,!1,o).height)},t.prototype.setChildCountIntoRowNode=function(e){var t=this.gridOptionsService.get("getChildCount");t&&e.setAllChildrenCount(t(e.data))},t.prototype.setGroupDataIntoRowNode=function(e){var t=this,r=this.columnModel.getGroupDisplayColumns(),o=this.gridOptionsService.isTreeData();r.forEach(function(r){if(null==e.groupData&&(e.groupData={}),o)e.groupData[r.getColId()]=e.key;else if(r.isRowGroupDisplayed(e.rowGroupColumn.getId())){var i=t.valueService.getValue(e.rowGroupColumn,e);e.groupData[r.getColId()]=i}})},t.prototype.clearDisplayIndex=function(e){e.clearRowTopAndRowIndex(),e.hasChildren()&&ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.exists(e.childStore)&&e.childStore.clearDisplayIndexes(),e.master&&e.detailNode&&e.detailNode.clearRowTopAndRowIndex()},t.prototype.setDisplayIndex=function(e,t,r){if(e.setRowIndex(t.next()),e.setRowTop(r.value),r.value+=e.rowHeight,e.master&&(e.expanded&&e.detailNode?(e.detailNode.setRowIndex(t.next()),e.detailNode.setRowTop(r.value),r.value+=e.detailNode.rowHeight):e.detailNode&&e.detailNode.clearRowTopAndRowIndex()),e.hasChildren()&&ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.exists(e.childStore)){var o=e.childStore;e.expanded?o.setDisplayIndexes(t,r):o.clearDisplayIndexes()}},t.prototype.binarySearchForDisplayIndex=function(e,t){var r=0,o=t.length-1;if(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.missing(o)||ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.missing(r))console.warn("AG Grid: error: topPointer = "+o+", bottomPointer = "+r);else for(;;){var i=Math.floor((r+o)/2),n=t[i];if(n.rowIndex===e)return n;var a=n.master&&n.expanded,s=n.detailNode;if(a&&s&&s.rowIndex===e)return n.detailNode;var l=n.childStore;if(n.expanded&&l&&l.isDisplayIndexInStore(e))return l.getRowUsingDisplayIndex(e);if(n.rowIndex<e)r=i+1;else{if(!(n.rowIndex>e))return void console.warn("AG Grid: error: unable to locate rowIndex = "+e+" in cache");o=i-1}}},t.prototype.extractRowBounds=function(e,t){var r=function(e){return{rowHeight:e.rowHeight,rowTop:e.rowTop}};if(e.rowIndex===t)return r(e);if(e.hasChildren()&&e.expanded&&ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.exists(e.childStore)){var o=e.childStore;if(o.isDisplayIndexInStore(t))return o.getRowBounds(t)}else if(e.master&&e.expanded&&ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.exists(e.detailNode)&&e.detailNode.rowIndex===t)return r(e.detailNode)},t.prototype.getIndexAtPixel=function(e,t){if(e.isPixelInRange(t))return e.rowIndex;var r=e.master&&e.expanded,o=e.detailNode;if(r&&o&&o.isPixelInRange(t))return e.detailNode.rowIndex;if(e.hasChildren()&&e.expanded&&ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.exists(e.childStore)){var i=e.childStore;if(i.isPixelInRange(t))return i.getRowIndexAtPixel(t)}return null},t.prototype.createNodeIdPrefix=function(e){for(var t=[],r=e;r&&r.level>=0;)""===r.key?t.push(GROUP_MISSING_KEY_ID):t.push(r.key),r=r.parent;if(t.length>0)return t.reverse().join("-")},t.prototype.checkOpenByDefault=function(e){if(e.isExpandable()){var t=this.gridOptionsService.getCallback("isServerSideGroupOpenByDefault");t&&t({data:e.data,rowNode:e})&&window.setTimeout(function(){return e.setExpanded(!0)},0)}},__decorate$o([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("valueService")],t.prototype,"valueService",void 0),__decorate$o([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],t.prototype,"columnModel",void 0),__decorate$o([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("ssrmNodeManager")],t.prototype,"nodeManager",void 0),__decorate$o([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("beans")],t.prototype,"beans",void 0),__decorate$o([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"postConstruct",null),__decorate$o([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Bean)("ssrmBlockUtils")],t)}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.BeanStub),__decorate$n=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},NodeManager=function(){function e(){this.rowNodes={}}return e.prototype.addRowNode=function(e){var t=e.id;this.rowNodes[t]&&(console.warn("AG Grid: Duplicate node id "+e.id+". Row ID's are provided via the getRowId() callback. Please modify the getRowId() callback code to provide unique row id values."),console.warn("first instance",this.rowNodes[t].data),console.warn("second instance",e.data)),this.rowNodes[t]=e},e.prototype.removeNode=function(e){var t=e.id;this.rowNodes[t]&&(this.rowNodes[t]=void 0)},e.prototype.clear=function(){this.rowNodes={}},__decorate$n([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PreDestroy],e.prototype,"clear",null),__decorate$n([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Bean)("ssrmNodeManager")],e)}(),__extends$p=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$m=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},TransactionManager=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.asyncTransactions=[],t}return __extends$p(t,e),t.prototype.postConstruct=function(){this.gridOptionsService.isRowModelType("serverSide")},t.prototype.applyTransactionAsync=function(e,t){null==this.asyncTransactionsTimeout&&this.scheduleExecuteAsync(),this.asyncTransactions.push({transaction:e,callback:t})},t.prototype.scheduleExecuteAsync=function(){var e=this,t=this.gridOptionsService.getAsyncTransactionWaitMillis();this.asyncTransactionsTimeout=window.setTimeout(function(){e.executeAsyncTransactions()},t)},t.prototype.executeAsyncTransactions=function(){var e=this;if(this.asyncTransactions){var t=[],r=[],o=[],i=!1;if(this.asyncTransactions.forEach(function(n){var a;
2e.serverSideRowModel.executeOnStore(n.transaction.route,function(e){a=e.applyTransaction(n.transaction)}),null==a&&(a={status:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ServerSideTransactionResultStatus.StoreNotFound}),r.push(a),a.status==ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ServerSideTransactionResultStatus.StoreLoading?o.push(n):(n.callback&&t.push(function(){return n.callback(a)}),a.status===ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ServerSideTransactionResultStatus.Applied&&(i=!0))}),t.length>0&&window.setTimeout(function(){t.forEach(function(e){return e()})},0),this.asyncTransactionsTimeout=void 0,this.asyncTransactions=o,i&&(this.valueCache.onDataChanged(),this.eventService.dispatchEvent({type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_STORE_UPDATED})),r.length>0){var n={type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_ASYNC_TRANSACTIONS_FLUSHED,results:r};this.eventService.dispatchEvent(n)}}},t.prototype.flushAsyncTransactions=function(){null!=this.asyncTransactionsTimeout&&clearTimeout(this.asyncTransactionsTimeout),this.executeAsyncTransactions()},t.prototype.applyTransaction=function(e){var t,r=this;if(this.serverSideRowModel.executeOnStore(e.route,function(r){t=r.applyTransaction(e)}),t){if(this.valueCache.onDataChanged(),t.remove){var o=t.remove.map(function(e){return e.id});this.selectionService.deleteSelectionStateFromParent(e.route||[],o)}return this.eventService.dispatchEvent({type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_STORE_UPDATED}),t.update&&t.update.length&&setTimeout(function(){r.rowRenderer.refreshFullWidthRows(t.update)},0),t}return{status:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ServerSideTransactionResultStatus.StoreNotFound}},__decorate$m([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("rowNodeBlockLoader")],t.prototype,"rowNodeBlockLoader",void 0),__decorate$m([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("valueCache")],t.prototype,"valueCache",void 0),__decorate$m([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("rowModel")],t.prototype,"serverSideRowModel",void 0),__decorate$m([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("rowRenderer")],t.prototype,"rowRenderer",void 0),__decorate$m([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("selectionService")],t.prototype,"selectionService",void 0),__decorate$m([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"postConstruct",null),__decorate$m([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Bean)("ssrmTransactionManager")],t)}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.BeanStub),__extends$o=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$l=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},ExpandListener=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$o(t,e),t.prototype.postConstruct=function(){this.gridOptionsService.isRowModelType("serverSide")&&this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_ROW_GROUP_OPENED,this.onRowGroupOpened.bind(this))},t.prototype.onRowGroupOpened=function(e){var t=e.node;if(t.expanded){if(t.master)this.createDetailNode(t);else if(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.missing(t.childStore)){var r=this.serverSideRowModel.getParams();t.childStore=this.createBean(this.storeFactory.createStore(r,t))}}else this.gridOptionsService.is("purgeClosedRowNodes")&&ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.exists(t.childStore)&&(t.childStore=this.destroyBean(t.childStore));var o={type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_STORE_UPDATED};this.eventService.dispatchEvent(o)},t.prototype.createDetailNode=function(e){if(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.exists(e.detailNode))return e.detailNode;var t=new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RowNode(this.beans);t.detail=!0,t.selectable=!1,t.parent=e,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.exists(e.id)&&(t.id="detail_"+e.id),t.data=e.data,t.level=e.level+1;var r=this.gridOptionsService.getRowHeightForNode(t).height;return t.rowHeight=r||200,e.detailNode=t,t},__decorate$l([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("rowModel")],t.prototype,"serverSideRowModel",void 0),__decorate$l([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("ssrmStoreFactory")],t.prototype,"storeFactory",void 0),__decorate$l([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("beans")],t.prototype,"beans",void 0),__decorate$l([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"postConstruct",null),__decorate$l([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Bean)("ssrmExpandListener")],t)}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.BeanStub),__extends$n=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$k=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},SortListener=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$n(t,e),t.prototype.postConstruct=function(){this.gridOptionsService.isRowModelType("serverSide")&&this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_SORT_CHANGED,this.onSortChanged.bind(this))},t.prototype.extractSortModel=function(){var e=this.sortController.getSortModel();return this.gridOptionsService.isTreeData()||(this.replaceAutoGroupColumnWithActualRowGroupColumns(e),this.removeMultiColumnPrefixOnColumnIds(e)),e},t.prototype.removeMultiColumnPrefixOnColumnIds=function(e){if(this.gridOptionsService.isGroupMultiAutoColumn())for(var t=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.GROUP_AUTO_COLUMN_ID+"-",r=0;r<e.length;++r)e[r].colId.indexOf(t)>-1&&(e[r].colId=e[r].colId.substr(t.length))},t.prototype.replaceAutoGroupColumnWithActualRowGroupColumns=function(e){var t=e.find(function(e){return e.colId==ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.GROUP_AUTO_COLUMN_ID});if(t){var r=e.indexOf(t);ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.removeFromArray(e,t);var o=this.columnModel.getRowGroupColumns().filter(function(t){return 0==e.filter(function(e){return e.colId===t.getColId()}).length}).map(function(e){return{colId:e.getId(),sort:t.sort}});ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.insertArrayIntoArray(e,o,r)}},t.prototype.onSortChanged=function(){var e=this.serverSideRowModel.getParams();if(e){var t=this.extractSortModel(),r=e.sortModel,o=this.findChangedColumnsInSort(t,r),i={valueColChanged:this.listenerUtils.isSortingWithValueColumn(o),secondaryColChanged:this.listenerUtils.isSortingWithSecondaryColumn(o),changedColumns:o};this.serverSideRowModel.refreshAfterSort(t,i)}},t.prototype.findChangedColumnsInSort=function(e,t){var r=[];return[e,t].forEach(function(e){if(e){var t=e.map(function(e){return e.colId});r=r.concat(t)}}),r.filter(function(r){var o=t.find(function(e){return e.colId===r}),i=e.find(function(e){return e.colId===r});return function(e,t){return(e?e.sort:null)!==(t?t.sort:null)}(o,i)||function(r,o){return(r?t.indexOf(r):-1)!==(o?e.indexOf(o):-1)}(o,i)})},__decorate$k([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("sortController")],t.prototype,"sortController",void 0),__decorate$k([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],t.prototype,"columnModel",void 0),__decorate$k([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("rowModel")],t.prototype,"serverSideRowModel",void 0),__decorate$k([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("ssrmListenerUtils")],t.prototype,"listenerUtils",void 0),__decorate$k([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"postConstruct",null),__decorate$k([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Bean)("ssrmSortService")],t)}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.BeanStub),__extends$m=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$j=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},FilterListener=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$m(t,e),t.prototype.postConstruct=function(){this.gridOptionsService.isRowModelType("serverSide")&&this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this))},t.prototype.onFilterChanged=function(){var e=this.serverSideRowModel.getParams();if(e){var t=this.filterManager.getFilterModel(),r=e?e.filterModel:{},o=this.findChangedColumns(t,r),i={valueColChanged:this.listenerUtils.isSortingWithValueColumn(o),secondaryColChanged:this.listenerUtils.isSortingWithSecondaryColumn(o),changedColumns:o};this.serverSideRowModel.refreshAfterFilter(t,i)}},t.prototype.findChangedColumns=function(e,t){var r={};Object.keys(e).forEach(function(e){return r[e]=!0}),Object.keys(t).forEach(function(e){return r[e]=!0});var o=[];return Object.keys(r).forEach(function(r){JSON.stringify(e[r])!=JSON.stringify(t[r])&&o.push(r)}),o},__decorate$j([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("rowModel")],t.prototype,"serverSideRowModel",void 0),__decorate$j([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("filterManager")],t.prototype,"filterManager",void 0),__decorate$j([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("ssrmListenerUtils")],t.prototype,"listenerUtils",void 0),__decorate$j([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"postConstruct",null),__decorate$j([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Bean)("ssrmFilterListener")],t)}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.BeanStub),__decorate$i=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},StoreFactory=function(){function e(){}return e.prototype.createStore=function(e,t){var r=this.getStoreParams(e,t);return new(r.suppressInfiniteScroll?FullStore:LazyStore)(e,r,t)},e.prototype.getStoreParams=function(e,t){var r=this.getLevelSpecificParams(t),o=this.isInfiniteScroll(r);return{suppressInfiniteScroll:!o,cacheBlockSize:this.getBlockSize(o,r),maxBlocksInCache:this.getMaxBlocksInCache(o,e,r)}},e.prototype.getMaxBlocksInCache=function(e,t,r){if(e){var o=r&&null!=r.maxBlocksInCache?r.maxBlocksInCache:this.gridOptionsService.getNum("maxBlocksInCache");if(null!=o&&o>=0)if(t.dynamicRowHeight)ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.doOnce(function(){return console.warn("AG Grid: Server Side Row Model does not support Dynamic Row Height and Cache Purging. Either a) remove getRowHeight() callback or b) remove maxBlocksInCache property. Purging has been disabled.")},"storeFactory.maxBlocksInCache.dynamicRowHeight");else{if(!this.columnModel.isAutoRowHeightActive())return o;ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.doOnce(function(){return console.warn("AG Grid: Server Side Row Model does not support Auto Row Height and Cache Purging. Either a) remove colDef.autoHeight or b) remove maxBlocksInCache property. Purging has been disabled.")},"storeFactory.maxBlocksInCache.autoRowHeightActive")}}},e.prototype.getBlockSize=function(e,t){if(e){var r=t&&null!=t.cacheBlockSize?t.cac
2heBlockSize:this.gridOptionsService.getNum("cacheBlockSize");return null!=r&&r>0?r:100}},e.prototype.getLevelSpecificParams=function(e){var t=this.gridOptionsService.getCallback("getServerSideGroupLevelParams");if(t){var r=t({level:e.level+1,parentRowNode:e.level>=0?e:void 0,rowGroupColumns:this.columnModel.getRowGroupColumns(),pivotColumns:this.columnModel.getPivotColumns(),pivotMode:this.columnModel.isPivotMode()});return null!=r.storeType&&(r.suppressInfiniteScroll="partial"!==r.storeType),r}},e.prototype.isInfiniteScroll=function(e){return!(e&&null!=e.suppressInfiniteScroll?e.suppressInfiniteScroll:this.isSuppressServerSideInfiniteScroll())},e.prototype.isSuppressServerSideInfiniteScroll=function(){return this.gridOptionsService.is("suppressServerSideInfiniteScroll")},__decorate$i([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("gridOptionsService")],e.prototype,"gridOptionsService",void 0),__decorate$i([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],e.prototype,"columnModel",void 0),__decorate$i([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Bean)("ssrmStoreFactory")],e)}(),__decorate$h=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},ListenerUtils=function(){function e(){}return e.prototype.isSortingWithValueColumn=function(e){for(var t=this.columnModel.getValueColumns().map(function(e){return e.getColId()}),r=0;r<e.length;r++)if(t.indexOf(e[r])>-1)return!0;return!1},e.prototype.isSortingWithSecondaryColumn=function(e){if(!this.columnModel.getSecondaryColumns())return!1;for(var t=this.columnModel.getSecondaryColumns().map(function(e){return e.getColId()}),r=0;r<e.length;r++)if(t.indexOf(e[r])>-1)return!0;return!1},__decorate$h([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],e.prototype,"columnModel",void 0),__decorate$h([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Bean)("ssrmListenerUtils")],e)}(),__extends$l=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$g=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},__read$3=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},__spread$2=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read$3(arguments[t]));return e},DefaultStrategy=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.selectedState={selectAll:!1,toggledNodes:new Set},t.lastSelected=null,t.selectAllUsed=!1,t.selectedNodes={},t}return __extends$l(t,e),t.prototype.init=function(){var e=this;this.rowSelection=this.gridOptionsService.get("rowSelection"),this.addManagedPropertyListener("rowSelection",function(t){e.rowSelection=t.currentValue})},t.prototype.getSelectedState=function(){return{selectAll:this.selectedState.selectAll,toggledNodes:__spread$2(this.selectedState.toggledNodes)}},t.prototype.setSelectedState=function(e){var t={selectAll:!1,toggledNodes:new Set};"object"==typeof e?"selectAll"in e&&"boolean"==typeof e.selectAll?(t.selectAll=e.selectAll,"toggledNodes"in e&&Array.isArray(e.toggledNodes)?(e.toggledNodes.forEac
2h(function(e){"string"==typeof e?t.toggledNodes.add(e):console.warn("AG Grid: Provided ids must be of string type. Invalid id provided: "+e)}),this.selectedState=t):console.error("AG Grid: `toggledNodes` must be an array of string ids.")):console.error("AG Grid: Select all status should be of boolean type."):console.error("AG Grid: The provided selection state should be an object.")},t.prototype.deleteSelectionStateFromParent=function(e,t){var r=this;if(0===this.selectedState.toggledNodes.size)return!1;var o=!1;return t.forEach(function(e){r.selectedState.toggledNodes.delete(e)&&(o=!0)}),o},t.prototype.setNodeSelected=function(e){var t,r=this,o=e.clearSelection&&e.newValue&&!e.rangeSelect;if("multiple"!==this.rowSelection||o)return e.newValue?(this.selectedNodes=((t={})[e.node.id]=e.node,t),this.selectedState={selectAll:!1,toggledNodes:new Set([e.node.id])}):(this.selectedNodes={},this.selectedState={selectAll:!1,toggledNodes:new Set}),this.lastSelected=e.node.id,1;var i=function(t){e.newValue?r.selectedNodes[t.id]=t:delete r.selectedNodes[t.id],e.newValue===r.selectedState.selectAll?r.selectedState.toggledNodes.delete(t.id):r.selectedState.toggledNodes.add(t.id)};if(e.rangeSelect&&this.lastSelected){var n=this.rowModel.getRowNode(this.lastSelected);return this.rowModel.getNodesInRangeForSelection(e.node,null!=n?n:null).forEach(i),this.lastSelected=e.node.id,1}return i(e.node),this.lastSelected=e.node.id,1},t.prototype.processNewRow=function(e){this.selectedNodes[e.id]&&(this.selectedNodes[e.id]=e)},t.prototype.isNodeSelected=function(e){var t=this.selectedState.toggledNodes.has(e.id);return this.selectedState.selectAll?!t:t},t.prototype.getSelectedNodes=function(){return this.selectAllUsed&&console.warn("AG Grid: getSelectedNodes and getSelectedRows functions cannot be used with select all functionality with the server-side row model.\n                Use `api.getServerSideSelectionState()` instead."),Object.values(this.selectedNodes)},t.prototype.getSelectedRows=function(){return this.getSelectedNodes().map(function(e){return e.data})},t.prototype.getSelectionCount=function(){return this.selectedState.selectAll?-1:this.selectedState.toggledNodes.size},t.prototype.clearOtherNodes=function(e,t){var r=this.selectedState.selectAll?1:this.selectedState.toggledNodes.size-1;this.selectedState={selectAll:!1,toggledNodes:new Set([e.id])},this.rowModel.forEachNode(function(r){r!==e&&r.selectThisNode(!1,void 0,t)});var o={type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_SELECTION_CHANGED,source:t};return this.eventService.dispatchEvent(o),r},t.prototype.isEmpty=function(){var e;return!this.selectedState.selectAll&&!(null===(e=this.selectedState.toggledNodes)||void 0===e?void 0:e.size)},t.prototype.selectAllRowNodes=function(e){this.selectedState={selectAll:!0,toggledNodes:new Set},this.selectedNodes={},this.selectAllUsed=!0},t.prototype.deselectAllRowNodes=function(e){this.selectedState={selectAll:!1,toggledNodes:new Set},this.selectedNodes={}},t.prototype.getSelectAllState=function(e,t){return this.selectedState.selectAll?!(this.selectedState.toggledNodes.size>0)||null:this.selectedState.toggledNodes.size>0&&null},__decorate$g([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("rowModel")],t.prototype,"rowModel",void 0),__decorate$g([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"init",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.BeanStub),__extends$k=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$f=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},__read$2=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},__spread$1=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read$2(arguments[t]));return e},GroupSelectsChildrenStrategy=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.selectedState={selectAllChildren:!1,toggledNodes:new Map},t.lastSelected=null,t}return __extends$k(t,e),t.prototype.init=function(){var e=this;this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_MODEL_UPDATED,function(){return e.removeRedundantState()}),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_COLUMN_ROW_GROUP_CHANGED,function(){return e.selectionService.reset()})},t.prototype.getSelectedState=function(){var e=this,t=function(r,o,i){var n={nodeId:i};if(o<=e.columnModel.getRowGroupColumns().length&&(n.selectAllChildren=r.selectAllChildren),r.toggledNodes.size){var a=[];
2r.toggledNodes.forEach(function(e,r){var i=t(e,o+1,r);a.push(i)}),n.toggledNodes=a}return n};return t(this.selectedState,0)},t.prototype.setSelectedState=function(e){var t=function(e,r){var o,i;if("object"!=typeof e)throw new Error("AG Grid: Each provided state object must be an object.");if("selectAllChildren"in e&&"boolean"!=typeof e.selectAllChildren)throw new Error("AG Grid: `selectAllChildren` must be a boolean value or undefined.");if("toggledNodes"in e){if(!Array.isArray(e.toggledNodes))throw new Error("AG Grid: `toggledNodes` must be an array.");if(!e.toggledNodes.every(function(e){return"object"==typeof e&&"nodeId"in e&&"string"==typeof e.nodeId}))throw new Error("AG Grid: Every `toggledNode` requires an associated string id.")}var n=null!==(o=e.selectAllChildren)&&void 0!==o?o:!r,a=null===(i=e.toggledNodes)||void 0===i?void 0:i.map(function(e){return[e.nodeId,t(e,n)]}),s=null==a?void 0:a.some(function(e){var t=__read$2(e,2);t[0];var r=t[1];return n===r.selectAllChildren&&0===r.toggledNodes.size});if(s)throw new Error("\n                    AG Grid: AG Grid: Row selection state could not be parsed due to invalid data. Ensure all child state has toggledNodes or does not conform with the parent rule.\n                    Please rebuild the selection state and reapply it.\n                ");return{selectAllChildren:n,toggledNodes:new Map(a)}};try{this.selectedState=t(e,!!e.selectAllChildren)}catch(e){console.error(e.message)}},t.prototype.deleteSelectionStateFromParent=function(e,t){for(var r=this.selectedState,o=__spread$1(e);r&&o.length;)r=r.toggledNodes.get(o.pop());if(!r)return!1;var i=!1;return t.forEach(function(e){(null==r?void 0:r.toggledNodes.delete(e))&&(i=!0)}),i&&this.removeRedundantState(),i},t.prototype.setNodeSelected=function(e){var t=this;if(e.rangeSelect){var r=this.rowModel.getNodesInRangeForSelection(e.node,this.lastSelected).map(this.getRouteToNode).sort(function(e,t){return t.length-e.length}),o=new Set;return r.forEach(function(r){o.has(r[r.length-1])||(r.forEach(function(e){return o.add(e)}),t.recursivelySelectNode(r,t.selectedState,e))}),this.removeRedundantState(),this.lastSelected=e.node,1}var i=this.getRouteToNode(e.node);return this.recursivelySelectNode(i,this.selectedState,e),this.removeRedundantState(),this.lastSelected=e.node,1},t.prototype.isNodeSelected=function(e){var t=this.getRouteToNode(e);return this.isNodePathSelected(t,this.selectedState)},t.prototype.isNodePathSelected=function(e,t){var r=__read$2(e),o=r[0],i=r.slice(1);if(0===i.length){var n=t.toggledNodes.has(o.id);if(o.hasChildren()){var a=t.toggledNodes.get(o.id);if(a&&a.toggledNodes.size)return}return t.selectAllChildren?!n:n}if(t.toggledNodes.has(o.id)){var s=t.toggledNodes.get(o.id);if(s)return this.isNodePathSelected(i,s)}return!!t.selectAllChildren},t.prototype.getRouteToNode=function(e){for(var t=[],r=e;r.parent;)t.push(r),r=r.parent;return t.reverse()},t.prototype.removeRedundantState=function(){var e=this;if(!this.filterManager.isAnyFilterPresent()){var t=function(r,o,i){void 0===r&&(r=e.selectedState),void 0===o&&(o=e.serverSideRowModel.getRootStore());var n=!0,a=!0;return r.toggledNodes.forEach(function(o,i){var s=e.rowModel.getRowNode(i);s||(n=!1);var l=null==s?void 0:s.childStore;l?(t(o,l,s)&&r.selectAllChildren===o.selectAllChildren&&r.toggledNodes.delete(i),o.toggledNodes.size>0&&(a=!1)):o.toggledNodes.size>0&&(a=!1)}),!(!o||!o.isLastRowIndexKnown()||o.getRowCount()!==r.toggledNodes.size||!a||!n||(r.toggledNodes.clear(),r.selectAllChildren=!r.selectAllChildren,i&&(null==i?void 0:i.isSelected())!==r.selectAllChildren&&i.selectThisNode(r.selectAllChildren,void 0,"api"),0))};t()}},t.prototype.recursivelySelectNode=function(e,t,r){var o=__read$2(e),i=o[0],n=o.slice(1);if(i)if(n.length){var a=t.toggledNodes.has(i.id),s=a?t.toggledNodes.get(i.id):{selectAllChildren:t.selectAllChildren,toggledNodes:new Map};a||t.toggledNodes.set(i.id,s),this.recursivelySelectNode(n,s,r),t.selectAllChildren===s.selectAllChildren&&0===s.toggledNodes.size&&t.toggledNodes.delete(i.id)}else{if(t.selectAllChildren===r.newValue)return void t.toggledNodes.delete(i.id);var l={selectAllChildren:r.newValue,toggledNodes:new Map};t.toggledNodes.set(i.id,l)}},t.prototype.getSelectedNodes=function(){console.warn("AG Grid: `getSelectedNodes` and `getSelectedRows` functions cannot be used with `groupSelectsChildren` and the server-side row model.\n            Use `api.getServerSideSelectionState()` instead.");var e=[];return this.rowModel.forEachNode(function(t){t.isSelected()&&e.push(t)}),e},t.prototype.processNewRow=function(e){}
2,t.prototype.getSelectedRows=function(){return this.getSelectedNodes().map(function(e){return e.data})},t.prototype.getSelectionCount=function(){return-1},t.prototype.isEmpty=function(){var e;return!this.selectedState.selectAllChildren&&!(null===(e=this.selectedState.toggledNodes)||void 0===e?void 0:e.size)},t.prototype.selectAllRowNodes=function(e){this.selectedState={selectAllChildren:!0,toggledNodes:new Map}},t.prototype.deselectAllRowNodes=function(e){this.selectedState={selectAllChildren:!1,toggledNodes:new Map}},t.prototype.getSelectAllState=function(e,t){return this.selectedState.selectAllChildren?!(this.selectedState.toggledNodes.size>0)||null:this.selectedState.toggledNodes.size>0&&null},__decorate$f([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("rowModel")],t.prototype,"rowModel",void 0),__decorate$f([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],t.prototype,"columnModel",void 0),__decorate$f([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("filterManager")],t.prototype,"filterManager",void 0),__decorate$f([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("rowModel")],t.prototype,"serverSideRowModel",void 0),__decorate$f([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("selectionService")],t.prototype,"selectionService",void 0),__decorate$f([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"init",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.BeanStub),__extends$j=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$e=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},ServerSideSelectionService=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$j(t,e),t.prototype.init=function(){var e=this,t=this.gridOptionsService.is("groupSelectsChildren");this.addManagedPropertyListener("groupSelectsChildren",function(t){e.destroyBean(e.selectionStrategy);var r=t.currentValue?GroupSelectsChildrenStrategy:DefaultStrategy;e.selectionStrategy=e.createManagedBean(new r),e.shotgunResetNodeSelectionState();var o={type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_SELECTION_CHANGED,source:"api"};e.eventService.dispatchEvent(o)});var r=t?GroupSelectsChildrenStrategy:DefaultStrategy;this.selectionStrategy=this.createManagedBean(new r)},t.prototype.getServerSideSelectionState=function(){return this.selectionStrategy.getSelectedState()},t.prototype.setServerSideSelectionState=function(e){this.selectionStrategy.setSelectedState(e),this.shotgunResetNodeSelectionState();var t={type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_SELECTION_CHANGED,source:"api"};this.eventService.dispatchEvent(t)},t.prototype.setNodeSelected=function(e){var t=this.selectionStrategy.setNodeSelected(e);this.shotgunResetNodeSelectionState(e.source);var r={type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_SELECTION_CHANGED,source:e.source};return this.eventService.dispatchEvent(r),t},t.prototype.deleteSelectionStateFromParent=function(e,t){if(this.selectionStrategy.deleteSelectionStateFromParent(e,t)){this.shotgunResetNodeSelectionState();var r={type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_SELECTION_CHANGED,source:"api"};this.eventService.dispatchEvent(r)}},t.prototype.shotgunResetNodeSelectionState=function(e){var t=this;this.rowModel.forEachNode(function(r){if(!r.stub){var o=t.selectionStrategy.isNodeSelected(r);o!==r.isSelected()&&r.selectThisNode(o,void 0,e)}})},t.prototype.getSelectedNodes=function(){return this.selectionStrategy.getSelectedNodes()},t.prototype.getSelectedRows=function(){return this.selectionStrategy.getSelectedRows()},t.prototype.getSelectionCount=function(){return this.selectionStrategy.getSelectionCount()},t.prototype.syncInRowNode=function(e,t){this.selectionStrategy.processNewRow(e);var r=this.selectionStrategy.isNodeSelected(e);e.setSelectedInitialValue(r)},t.prototype.reset=function(){this.selectionStrategy.deselectAllRowNodes({source:"api"})},t.prototype.isEmpty=function(){return this.selectionStrategy.isEmpty()},t.prototype.selectAllRowNodes=function(e){(e.justCurrentPage||e.justFiltered)&&console.warn("AG Grid: selecting just filtered only works when gridOptions.rowModelType='clientSide'"),this.selectionStrategy.selectAllRowNodes(e),this.rowModel.forEachNode(function(t){t.stub||t.selectThisNode(!0,void 0,e.source)});var t={type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_SELECTION_CHANGED,source:e.source};this.eventService.dispatchEvent(t)},t.prototype.deselectAllRowNodes=function(e){(e.justCurrentPage||e.justFiltered)&&console.warn("AG Grid: selecting just filtered only works when gridOptions.rowModelType='clientSide'"),this.selectionStrategy.deselectAllRowNodes(e),this.rowModel.forEachNode(function(t){t.stub||t.selectThisNode(!1,void 0,e.source)});var t={type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_SELECTION_CHANGED,source:e.source};this.eventService.dispatchEvent(t)},t.prototype.getSelectAllState=function(e,t){return this.selectionStrategy.getSelectAllState(e,t)},t.prototype.updateGroupsFromChildrenSelections=function(e,t){return!1},t.prototype.getBestCostNodeSelection=function(){console.warn("AG Grid: calling gridApi.getBestCostNodeSelection() is only possible when using rowModelType=`clientSide`.")},t.prototype.filterFromSelection=function(){},__decorate$e([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("rowModel")],t.prototype,"rowModel",void 0),__decorate$e([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"init",null),__decorate$e([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Bean)("selectionService")],t)}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.BeanStub),VERSION$4="29.2.0",ServerSideRowModelModule={version:VERSION$4,moduleName:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleNames.ServerSideRowModelModule,rowModel:"serverSide",beans:[ServerSideRowModel,ExpandListener,SortListener,StoreUtils,BlockUtils,NodeManager,TransactionManager,FilterListener,StoreFactory,ListenerUtils,ServerSideSelectionService],dependantModules:[EnterpriseCoreModule]},ClientSideValuesExtractor=function(){function e(e,t,r,o,i,n,a,s,l){this.rowModel=e,this.filterParams=t,this.createKey=r,this.caseFormat=o,this.columnModel=i,this.valueService=n,this.treeDataOrGrouping=a,this.treeData=s,this.getDataPath=l}return e.prototype.extractUniqueValues=function(e,t){var r=this,o=new Map,i=this.extractExistingFormattedKeys(t),n=new Set,a=this.treeData&&!!this.getDataPath,s=this.columnModel.getRowGroupColumns(),l=function(e,a){var s=r.caseFormat(e);if(!n.has(s)){n.add(s);var l=e,c=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.makeNull(
2a),u=null==i?void 0:i.get(s);null!=u&&(l=u,c=t.get(u)),o.set(l,c)}};return this.rowModel.forEachLeafNode(function(t){if(t.data&&e(t))if(r.treeDataOrGrouping)r.addValueForTreeDataOrGrouping(t,a,s,l);else{var o=r.getValue(t);r.filterParams.convertValuesToStrings?r.addValueForConvertValuesToString(t,o,l):null!=o&&Array.isArray(o)?(o.forEach(function(e){l(r.createKey(e,t),e)}),0===o.length&&l(null,null)):l(r.createKey(o,t),o)}}),o},e.prototype.addValueForConvertValuesToString=function(e,t,r){var o=this.createKey(t,e);null!=o&&Array.isArray(o)?(o.forEach(function(e){var t=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.toStringOrNull(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.makeNull(e));r(t,t)}),0===o.length&&r(null,null)):r(o,o)},e.prototype.addValueForTreeDataOrGrouping=function(e,t,r,o){var i,n,a=this;if(t){if(null===(i=e.childrenAfterGroup)||void 0===i?void 0:i.length)return;n=this.getDataPath(e.data)}else(n=r.map(function(t){return a.valueService.getKeyForNode(t,e)})).push(this.getValue(e));n&&(n=n.map(function(e){return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.toStringOrNull(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.makeNull(e))})),(null==n?void 0:n.some(function(e){return null==e}))&&(n=null),o(this.createKey(n),n)},e.prototype.getValue=function(e){var t=this.filterParams,r=t.api,o=t.colDef,i=t.column,n=t.columnApi,a=t.context;return this.filterParams.valueGetter({api:r,colDef:o,column:i,columnApi:n,context:a,data:e.data,getValue:function(t){return e.data[t]},node:e})},e.prototype.extractExistingFormattedKeys=function(e){var t=this;if(!e)return null;var r=new Map;return e.forEach(function(e,o){r.set(t.caseFormat(o),o)}),r},e}(),SetFilterDisplayValue=function(){function e(){}return e.SELECT_ALL="__AG_SELECT_ALL__",e}(),__values$2=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},FlatSetDisplayValueModel=function(){function e(e,t,r,o){this.valueFormatterService=e,this.valueFormatter=t,this.formatter=r,this.column=o,this.displayedKeys=[]}return e.prototype.updateDisplayedValuesToAllAvailable=function(e,t,r){this.displayedKeys=Array.from(r)},e.prototype.updateDisplayedValuesToMatchMiniFilter=function(e,t,r,o,i){var n,a;this.displayedKeys=[];try{for(var s=__values$2(r),l=s.next();!l.done;l=s.next()){var c=l.value;if(null==c)i&&this.displayedKeys.push(c);else{var u=e(c),d=this.valueFormatterService.formatValue(this.column,null,u,this.valueFormatter,!1);o(this.formatter(d))&&this.displayedKeys.push(c)}}}catch(e){n={error:e}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(n)throw n.error}}},e.prototype.getDisplayedValueCount=function(){return this.displayedKeys.length},e.prototype.getDisplayedItem=function(e){return this.displayedKeys[e]},e.prototype.getSelectAllItem=function(){return SetFilterDisplayValue.SELECT_ALL},e.prototype.getDisplayedKeys=function(){return this.displayedKeys},e.prototype.forEachDisplayedKey=function(e){this.displayedKeys.forEach(e)},e.prototype.someDisplayedKey=function(e){return this.displayedKeys.some(e)},e.prototype.hasGroups=function(){return!1},e.prototype.refresh=function(){},e}(),__read$1=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},__spread=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read$1(arguments[t]));return e},__values$1=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},TreeSetDisplayValueModel=function(){function e(e,t,r,o){this.formatter=e,this.treeListPathGetter=t,this.treeListFormatter=r,this.treeDataOrGrouping=o,this.allDisplayedItemsTree=[],this.activeDisplayedItemsFlat=[],this.selectAllItem={depth:0,filterPasse
2s:!0,available:!0,treeKey:SetFilterDisplayValue.SELECT_ALL,children:this.allDisplayedItemsTree,expanded:!0,key:SetFilterDisplayValue.SELECT_ALL,parentTreeKeys:[]}}return e.prototype.updateDisplayedValuesToAllAvailable=function(e,t,r,o){"reload"===o?this.generateItemTree(e,t,r):"otherFilter"===o?(this.updateAvailable(r),this.updateExpandAll()):"miniFilter"===o&&(this.resetFilter(),this.updateExpandAll()),this.flattenItems()},e.prototype.updateDisplayedValuesToMatchMiniFilter=function(e,t,r,o,i,n){"reload"===n?this.generateItemTree(e,t,r):"otherFilter"===n&&this.updateAvailable(r),this.updateFilter(o,i),this.updateExpandAll(),this.flattenItems()},e.prototype.generateItemTree=function(e,t,r){var o,i,n;this.allDisplayedItemsTree=[],this.groupsExist=!1;var a=this.getTreeListPathGetter(e,r),s=function(t){var o=e(t),i=null!==(n=a(o))&&void 0!==n?n:[null];i.length>1&&(l.groupsExist=!0);var s,c=r.has(t),u=l.allDisplayedItemsTree,d=[];i.forEach(function(e,r){u||(u=[],s.children=u),s=u.find(function(t){var r;return(null===(r=t.treeKey)||void 0===r?void 0:r.toUpperCase())===(null==e?void 0:e.toUpperCase())}),s||(s={treeKey:e,depth:r,filterPasses:!0,expanded:!1,available:c,parentTreeKeys:d},r===i.length-1&&(s.key=t),u.push(s)),u=s.children,d=__spread(d,[e])})},l=this;try{for(var c=__values$1(t),u=c.next();!u.done;u=c.next())s(u.value)}catch(e){o={error:e}}finally{try{u&&!u.done&&(i=c.return)&&i.call(c)}finally{if(o)throw o.error}}this.updateAvailable(r),this.selectAllItem.children=this.allDisplayedItemsTree,this.selectAllItem.expanded=!1},e.prototype.getTreeListPathGetter=function(t,r){var o,i;if(this.treeListPathGetter)return this.treeListPathGetter;if(this.treeDataOrGrouping)return function(e){return e};var n=!1;try{for(var a=__values$1(r),s=a.next();!s.done;s=a.next()){var l=t(s.value);if(l instanceof Date){n=!0;break}if(null!=l)break}}catch(e){o={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(o)throw o.error}}return n?e.DATE_TREE_LIST_PATH_GETTER:(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.doOnce(function(){return console.warn("AG Grid: property treeList=true for Set Filter params, but you did not provide a treeListPathGetter or values of type Date.")},"getTreeListPathGetter"),function(e){return[String(e)]})},e.prototype.flattenItems=function(){var e=this;this.activeDisplayedItemsFlat=[];var t=function(r){r.forEach(function(r){r.filterPasses&&r.available&&(e.activeDisplayedItemsFlat.push(r),r.children&&r.expanded&&t(r.children))})};t(this.allDisplayedItemsTree)},e.prototype.resetFilter=function(){var e=function(t){t.children&&t.children.forEach(function(t){e(t)}),t.filterPasses=!0};this.allDisplayedItemsTree.forEach(function(t){return e(t)})},e.prototype.updateFilter=function(e,t){var r=this,o=function(o){return!!o.available&&(null==o.treeKey?t:e(r.formatter(r.treeListFormatter?r.treeListFormatter(o.treeKey,o.depth,o.parentTreeKeys):o.treeKey)))};this.allDisplayedItemsTree.forEach(function(e){return r.recursiveItemCheck(e,!1,o,"filterPasses")})},e.prototype.getDisplayedValueCount=function(){return this.activeDisplayedItemsFlat.length},e.prototype.getDisplayedItem=function(e){return this.activeDisplayedItemsFlat[e]},e.prototype.getSelectAllItem=function(){return this.selectAllItem},e.prototype.getDisplayedKeys=function(){var e=[];return this.forEachDisplayedKey(function(t){return e.push(t)}),e},e.prototype.forEachDisplayedKey=function(e){var t=function(r,o){r.children?r.expanded&&o||r.children.forEach(function(e){e.filterPasses&&t(e,!1)}):e(r.key)};this.activeDisplayedItemsFlat.forEach(function(e){return t(e,!0)})},e.prototype.someDisplayedKey=function(e){var t=function(r,o){return r.children?(!r.expanded||!o)&&r.children.some(function(e){return!!e.filterPasses&&t(e,!1)}):e(r.key)};return this.activeDisplayedItemsFlat.some(function(e){return t(e,!0)})},e.prototype.hasGroups=function(){return this.groupsExist},e.prototype.refresh=function(){this.updateExpandAll(),this.flattenItems()},e.prototype.updateExpandAll=function(){var e=function(t,r,o){var i,n;try{for(var a=__values$1(t),s=a.next();!s.done;s=a.next()){var l=s.value;
2if(l.filterPasses&&l.available&&l.children){if(r=r||!!l.expanded,o=o||!l.expanded,r&&o)return;var c=e(l.children,r,o);if(void 0===c)return;c?r=!0:o=!0}}}catch(e){i={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return r&&o?void 0:r},t=this.getSelectAllItem();t.expanded=e(t.children,!1,!1)},e.prototype.recursiveItemCheck=function(e,t,r,o){var i=this,n=!1;e.children&&e.children.forEach(function(a){var s=i.recursiveItemCheck(a,t||r(e),r,o);n=n||s});var a=t||n||r(e);return e[o]=a,a},e.prototype.updateAvailable=function(e){var t=this,r=function(t){return e.has(t.key)};this.allDisplayedItemsTree.forEach(function(e){return t.recursiveItemCheck(e,!1,r,"available")})},e.DATE_TREE_LIST_PATH_GETTER=function(e){return e?[String(e.getFullYear()),String(e.getMonth()+1),String(e.getDate())]:null},e}(),__read=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,i,n=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a},SetFilterModelValuesType;!function(e){e[e.PROVIDED_LIST=0]="PROVIDED_LIST",e[e.PROVIDED_CALLBACK=1]="PROVIDED_CALLBACK",e[e.TAKEN_FROM_GRID_VALUES=2]="TAKEN_FROM_GRID_VALUES"}(SetFilterModelValuesType||(SetFilterModelValuesType={}));var SetValueModel=function(){function e(e){var t,r=this;this.localEventService=new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.EventService,this.miniFilterText=null,this.providedValues=null,this.allValues=new Map,this.availableKeys=new Set,this.selectedKeys=new Set,this.initialised=!1;var o=e.usingComplexObjects,i=e.columnModel,n=e.valueService,a=e.treeDataTreeList,s=e.groupingTreeList,l=e.filterParams,c=e.gridOptionsService,u=e.valueFormatterService,d=e.valueFormatter,p=l.column,h=l.colDef,_=l.textFormatter,f=l.doesRowPassOtherFilter,g=l.suppressSorting,y=l.comparator,m=l.rowModel,v=l.values,E=l.caseSensitive,C=l.convertValuesToStrings,O=l.treeList,P=l.treeListPathGetter,S=l.treeListFormatter;this.filterParams=l,this.setIsLoading=e.setIsLoading,this.translate=e.translate,this.caseFormat=e.caseFormat,this.createKey=e.createKey,this.usingComplexObjects=!!e.usingComplexObjects,this.formatter=_||ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.TextFilter.DEFAULT_FORMATTER,this.doesRowPassOtherFilters=f,this.suppressSorting=g||!1,this.convertValuesToStrings=!!C;var b=null!=y?y:h.comparator,D=!!a||!!s;this.compareByValue=!!(o&&b||D||O&&!P),this.entryComparator=D&&!b?this.createTreeDataOrGroupingComparator():!O||P||b?function(e,t){var r=__read(e,2);r[0];var o=r[1],i=__read(t,2);i[0];var n=i[1];return b(o,n)}:function(e,t){var r=__read(e,2);r[0];var o=r[1],i=__read(t,2);i[0];var n=i[1];return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.defaultComparator(o,n)},this.keyComparator=null!==(t=b)&&void 0!==t?t:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.defaultComparator,this.caseSensitive=!!E;var M=c.get("getDataPath");"clientSide"===m.getType()&&(this.clientSideValuesExtractor=new ClientSideValuesExtractor(m,this.filterParams,this.createKey,this.caseFormat,i,n,D,!!a,M)),null==v?this.valuesType=SetFilterModelValuesType.TAKEN_FROM_GRID_VALUES:(this.valuesType=Array.isArray(v)?SetFilterModelValuesType.PROVIDED_LIST:SetFilterModelValuesType.PROVIDED_CALLBACK,this.providedValues=v),this.displayValueModel=O?new TreeSetDisplayValueModel(this.formatter,P,S,a||s):new FlatSetDisplayValueModel(u,d,this.formatter,p),this.updateAllValues().then(function(e){return r.resetSelectionState(e||[])})}return e.prototype.addEventListener=function(e,t,r){this.localEventService.addEventListener(e,t,r)},e.prototype.removeEventListener=function(e,t,r){this.localEventService.removeEventListener(e,t,r)},e.prototype.refreshValues=function(){var e=this.getModel();return this.updateAllValues(),this.setModel(e)},e.prototype.overrideValues=function(e){var t=this;return new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgPromise(function(r){t.allValuesPromise.then(function(){t.valuesType=SetFilterModelValuesType.PROVIDED_LIST,t.providedValues=e,t.refreshValues().then(function(){return r()})})})},e.prototype.refreshAfterAnyFilterChanged=function(){var e=this;return this.showAvailableOnly()?this.allValuesPromise.then(function(t){return e.updateAvailableKeys(null!=t?t:[],"otherFilter"),!0}):ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgPromise.resolve(!1)},e.prototype.isInitialised=function(){return this.initialised},e.prototype.updateAllValues=function(){var e=this;return this.allValuesPromise=new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgPromise(function(t){switch(e.valuesType){case SetFilterModelValuesType.TAKEN_FROM_GRID_VALUES:case SetFilterModelValuesType.PROVIDED_LIST:t(e.processAllKeys(e.valuesType===SetFilterModelValuesType.TAKEN_FROM_GRID_VALUES,e.providedValues));break;case SetFilterModelValuesType.PROVIDED_CALLBACK:e.setIsLoading(!0);var r=e.providedValues,o=e.filterParams,i=o.columnApi,n=o.api,a=o.context,s=o.column,l={success:function(r){e.setIsLoading(!1),t(e.processAllKeys(!1,r))},colDef:o.colDef,column:s,columnApi:i,api:n,context:a};window.setTimeout(function(){return r(l)},0);break;default:throw new Error("Unrecognised valuesType")}}),this.allValuesPromise.then(function(t){return e.updateAvailableKeys(t||[],"reload")}).then(function(){return e.initialised=!0}),this.allValuesPromise},e.prototype.processAllKeys=function(e,t){var r=e?this.getValuesFromRows(!1):this.uniqueValues(this.validateProvidedValues(t)),o=this.sortKeys(r);return this.allValues=null!=r?r:new Map,o},e.prototype.validateProvidedValues=function(e){if(this.usingComplexObjects&&(null==e?void 0:e.length)){var t=e[0];t&&"object"!=typeof t&&"function"!=typeof t&&(null==this.createKey(t)?ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.doOnce(function(){return console.warn("Set Filter Key Creator is returning null for provided values and provided values are primitives. Please provide complex objects or set convertValuesToStrings=true in the filterParams. See https://www.ag-grid.com/javascript-data-grid/filter-set-filter-list/#filter-value-types")},"setFilterComplexObjectsProvidedNull"):ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.doOnce(function(){return console.warn("AG Grid: Set Filter has a Key Creator, but provided values are primitives. Did 
2you mean to provide complex objects or enable convertValuesToStrings?")},"setFilterComplexObjectsProvidedPrimitive"))}return e},e.prototype.setValuesType=function(e){this.valuesType=e},e.prototype.getValuesType=function(){return this.valuesType},e.prototype.isKeyAvailable=function(e){return this.availableKeys.has(e)},e.prototype.showAvailableOnly=function(){return this.valuesType===SetFilterModelValuesType.TAKEN_FROM_GRID_VALUES},e.prototype.updateAvailableKeys=function(t,r){var o=this.showAvailableOnly()?this.sortKeys(this.getValuesFromRows(!0)):t;this.availableKeys=new Set(o),this.localEventService.dispatchEvent({type:e.EVENT_AVAILABLE_VALUES_CHANGED}),this.updateDisplayedValues(r,t)},e.prototype.sortKeys=function(e){var t,r=null!=e?e:new Map;return this.suppressSorting?Array.from(r.keys()):(t=this.compareByValue?Array.from(r.entries()).sort(this.entryComparator).map(function(e){return __read(e,1)[0]}):Array.from(r.keys()).sort(this.keyComparator),this.filterParams.excelMode&&r.has(null)&&(t=t.filter(function(e){return null!=e})).push(null),t)},e.prototype.getValuesFromRows=function(e){var t=this;return void 0===e&&(e=!1),this.clientSideValuesExtractor?this.clientSideValuesExtractor.extractUniqueValues(function(r){return!e||t.doesRowPassOtherFilters(r)},e&&!this.caseSensitive?this.allValues:void 0):(console.error("AG Grid: Set Filter cannot initialise because you are using a row model that does not contain all rows in the browser. Either use a different filter type, or configure Set Filter such that you provide it with values"),null)},e.prototype.setMiniFilter=function(e){return e=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.makeNull(e),this.miniFilterText!==e&&(this.miniFilterText=e,this.updateDisplayedValues("miniFilter"),!0)},e.prototype.getMiniFilter=function(){return this.miniFilterText},e.prototype.updateDisplayedValues=function(e,t){var r=this;if("expansion"!==e)if(null!=this.miniFilterText){var o=this.caseFormat(this.formatter(this.miniFilterText)||""),i=function(e){return null!=e&&r.caseFormat(e).indexOf(o)>=0},n=!!this.filterParams.excelMode&&i(this.translate("blanks"));this.displayValueModel.updateDisplayedValuesToMatchMiniFilter(function(e){return r.getValue(e)},t,this.availableKeys,i,n,e)}else this.displayValueModel.updateDisplayedValuesToAllAvailable(function(e){return r.getValue(e)},t,this.availableKeys,e);else this.displayValueModel.refresh()},e.prototype.getDisplayedValueCount=function(){return this.displayValueModel.getDisplayedValueCount()},e.prototype.getDisplayedItem=function(e){return this.displayValueModel.getDisplayedItem(e)},e.prototype.getSelectAllItem=function(){return this.displayValueModel.getSelectAllItem()},e.prototype.hasSelections=function(){return this.filterParams.defaultToNothingSelected?this.selectedKeys.size>0:this.allValues.size!==this.selectedKeys.size},e.prototype.getKeys=function(){return Array.from(this.allValues.keys())},e.prototype.getValues=function(){return Array.from(this.allValues.values())},e.prototype.getValue=function(e){return this.allValues.get(e)},e.prototype.selectAllMatchingMiniFilter=function(e){var t=this;void 0===e&&(e=!1),null==this.miniFilterText?this.selectedKeys=new Set(this.allValues.keys()):(e&&this.selectedKeys.clear(),this.displayValueModel.forEachDisplayedKey(function(e){return t.selectedKeys.add(e)}))},e.prototype.deselectAllMatchingMiniFilter=function(){var e=this;null==this.miniFilterText?this.selectedKeys.clear():this.displayValueModel.forEachDisplayedKey(function(t){return e.selectedKeys.delete(t)})},e.prototype.selectKey=function(e){this.selectedKeys.add(e)},e.prototype.deselectKey=function(e){this.filterParams.excelMode&&this.isEverythingVisibleSelected()&&this.resetSelectionState(this.displayValueModel.getDisplayedKeys()),this.selectedKeys.delete(e)},e.prototype.isKeySelected=function(e){return this.selectedKeys.has(e)},e.prototype.isEverythingVisibleSelected=function(){var e=this;return!this.displayValueModel.someDisplayedKey(function(t){return!e.isKeySelected(t)})},e.prototype.isNothingVisibleSelected=function(){var e=this;return!this.displayValueModel.someDisplayedKey(function(t){return e.isKeySelected(t)})},e.prototype.getModel=function(){return this.hasSelections()?Array.from(this.selectedKeys):null},e.prototype.setModel=function(e){var t=this;return this.allValuesPromise.then(function(r){if(null==e)t.resetSelectionState(null!=r?r:[]);else{t.selectedKeys.clear();var o=new Map;
2t.allValues.forEach(function(e,r){o.set(t.caseFormat(r),r)}),e.forEach(function(e){var r=t.caseFormat(e),i=o.get(r);void 0!==i&&t.selectKey(i)})}})},e.prototype.uniqueValues=function(e){var t=this,r=new Map,o=new Set;return(null!=e?e:[]).forEach(function(e){var i=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.makeNull(e),n=t.convertAndGetKey(i),a=t.caseFormat(n);o.has(a)||(o.add(a),r.set(n,i))}),r},e.prototype.convertAndGetKey=function(e){return this.convertValuesToStrings?e:this.createKey(e)},e.prototype.resetSelectionState=function(e){this.filterParams.defaultToNothingSelected?this.selectedKeys.clear():this.selectedKeys=new Set(e)},e.prototype.hasGroups=function(){return this.displayValueModel.hasGroups()},e.prototype.createTreeDataOrGroupingComparator=function(){return function(e,t){var r=__read(e,2);r[0];var o=r[1],i=__read(t,2);i[0];var n=i[1];if(null==o)return null==n?0:-1;if(null==n)return 1;for(var a=0;a<o.length;a++){if(a>=n.length)return 1;var s=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.defaultComparator(o[a],n[a]);if(0!==s)return s}return 0}},e.EVENT_AVAILABLE_VALUES_CHANGED="availableValuesChanged",e}(),__extends$i=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$d=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},SetFilterListItem=function(e){function t(r){var o,i=e.call(this,r.isGroup?t.GROUP_TEMPLATE:t.TEMPLATE)||this;return i.focusWrapper=r.focusWrapper,i.value=r.value,i.params=r.params,i.translate=r.translate,i.valueFormatter=r.valueFormatter,i.item=r.item,i.isSelected=r.isSelected,i.isTree=r.isTree,i.depth=null!==(o=r.depth)&&void 0!==o?o:0,i.isGroup=r.isGroup,i.groupsExist=r.groupsExist,i.isExpanded=r.isExpanded,i.hasIndeterminateExpandState=r.hasIndeterminateExpandState,i}return __extends$i(t,e),t.prototype.init=function(){var e=this;this.render(),this.eCheckbox.setLabelEllipsis(!0),this.eCheckbox.setValue(this.isSelected,!0),this.eCheckbox.setDisabled(!!this.params.readOnly),this.eCheckbox.getInputElement().setAttribute("tabindex","-1"),this.refreshVariableAriaLabels(),this.isTree&&(this.depth>0&&this.addCssClass("ag-set-filter-indent-"+this.depth),this.isGroup?this.setupExpansion():this.groupsExist&&this.addCssClass("ag-set-filter-add-group-indent"),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setAriaLevel(this.focusWrapper,this.depth+1)),this.params.readOnly||this.eCheckbox.onValueChange(function(t){return e.onCheckboxChanged(!!t)})},t.prototype.setupExpansion=function(){this.eGroupClosedIcon.appendChild(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.createIcon("setFilterGroupClosed",this.gridOptionsService,null)),this.eGroupOpenedIcon.appendChild(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.createIcon("setFilterGroupOpen",this.gridOptionsService,null)),this.addManagedListener(this.eGroupClosedIcon,"click",this.onExpandOrContractClicked.bind(this)),this.addManagedListener(this.eGroupOpenedIcon,"click",this.onExpandOrContractClicked.bind(this)),this.hasIndeterminateExpandState&&(this.eGroupIndeterminateIcon.appendChild(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.createIcon("setFilterGroupIndeterminate",this.gridOptionsService,null)),this.addManagedListener(this.eGroupIndeterminateIcon,"click",this.onExpandOrContractClicked.bind(this))),this.setExpandedIcons(),this.refreshAriaExpanded()},t.prototype.onExpandOrContractClicked=function(){this.setExpanded(!this.isExpanded)},t.prototype.setExpanded=function(e,r){if(this.isGroup&&e!==this.isExpanded){this.isExpanded=e;var o={type:t.EVENT_EXPANDED_CHANGED,isExpanded:!!e,item:this.item};r||this.dispatchEvent(o),this.setExpandedIcons(),this.refreshAriaExpanded()}},t.prototype.refreshAriaExpanded=function(){ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setAriaExpanded(this.focusWrapper,!!this.isExpanded)},t.prototype.setExpandedIcons=function(){ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setDisplayed(this.eGroupClosedIcon,this.hasIndeterminateExpandState?!1===this.isExpanded:!this.isExpanded),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setDisplayed(this.eGroupOpenedIcon,!0===this.isExpanded),this.hasIndeterminateExpandState&&ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setDisplayed(this.eGroupIndeterminateIcon,void 0===this.isExpanded)},t.prototype.onCheckboxChanged=function(e){this.isSelected=e;var r={type:t.EVENT_SELECTION_CHANGED,isSelected:e,item:this.item};this.dispatchEvent(r),this.refreshVariableAriaLabels()},t.prototype.toggleSelected=function(){this.params.readOnly||this.setSelected(!this.isSelected)},t.prototype.setSelected=function(e,t){this.isSelected=e,this.eCheckbox.setValue(this.isSelected,t)},t.prototype.refreshVariableAriaLabels=function(){if(this.isTree){var e=this.localeService.getLocaleTextFunc(),t=this.eCheckbox.getValue(),r=void 0===t?e("ariaIndeterminate","indeterminate"):t?e("ariaVisible","visible"):e("ariaHidden","hidden"),o=e("ariaToggleVisibility","Press SPACE to toggle visibility");ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setAriaLabelledBy(this.eCheckbox.getInputElement(),void 0),this.eCheckbox.setInputAriaLabel(o+" ("+r+")")}},t.prototype.setupFixedAriaLabels=function(e){if(this.isTree){var t=this.localeService.getLocaleTextFunc()("ariaFilterValue","Filter Value");ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setAriaLabel(this.focusWrapper,e+" "+t),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setAriaDescribedBy(this.focusWrapper,this.eCheckbox.getInputElement().id)}},t.prototype.refresh=function(e,t,r){var o,i;if(this.item=e,t!==this.isSelected&&this.setSelected(t,!0),this.setExpanded(r,!0),this.valueFunction){var n=this.valueFunction();this.setTooltipAndCellRendererParams(n,n),this.cellRendererComponent||this.renderCellWithoutCellRenderer()}null===(i=null===(o=this.cellRendererComponent)||void 0===o?void 0:o.refresh)||void 0===i||i.call(o,this.cellRendererParams)},t.prototype.render=function(){var e=this.params.column,t=this.value,r=null;"function"==typeof t?(this.valueFunction=t,t=r=this.valueFunction()):r=this.isTree?ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.toStringOrNull(t):this.getFormattedValue(e,t),this.setTooltipAndCellRendererParams(t,r),this.renderCell()},t.prototype.setTooltipAndCellRendererParams=function(e,t){if(this.params.showTooltips){var r=null!=t?t:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.toStringOrNull(e);this.setTooltip(r)}this.cellRendererParams={value:e,valueFormatted:t,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context,colDef:this.params.colDef,column:this.params.column}},t.prototype.getTooltipParams=function(){var t=e.prototype.getTooltipParams.call(this);return t.location="setFilterValue",t.colDef=this.getComponentHolder(),this.isTree&&(t.level=this.depth),t},t.prototype.getFormattedValue=function(e,t){return this.valueFormatterService.formatValue(e,null,t,this.valueFormatter,!1)},t.prototype.renderCell=function(){var e=this,t=this.userComponentFactory.getSetFilterCellRendererDetails(this.params,this.cellRendererParams),r=t?t.newAgStackInstance():void 0;null!=r?r.then(function(t){t&&(e.cellRendererComponent=t,e.eCheckbox.setLabel(t.getGui()),e.addDestroyFunc(function(){return e.destroyBean(t)}))}):this.renderCellWithoutCellRenderer()},t.prototype.renderCellWithoutCellRenderer=function(){var e,t=null!==(e=null==this.cellRendererParams.valueFormatted?this.cellRendererParams.value:this.cellRendererParams.valueFormatted)&&void 0!==e?e:this.translate("blanks");"string"!=typeof t&&(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.doOnce(function(){return console.warn("AG Grid: Set Filter Value Formatter must return string values. Please ensure the Set Filter Value Formatter returns string values for complex objects, or set convertValuesToStrings=true in the filterParams. See https://www.ag-grid.com/javascript-data-grid/filter-set-filter-list/#filter-value-types")},"setFilterComplexObjectsValueFormatter"),t=""),this.eCheckbox.setLabel(t),this.setupFixedAriaLabels(t)},t.prototype.getComponentHolder=function(){return this.params.column.getColDef()},t.EVENT_SELECTION_CHANGED="selectionChanged",t.EVENT_EXPANDED_CHANGED="expandedChanged",t.GROUP_TEMPLATE='\n        <div class="ag-set-filter-item" aria-hidden="true">
2\n            <span class="ag-set-filter-group-icons">\n                <span class="ag-set-filter-group-closed-icon" ref="eGroupClosedIcon"></span>\n                <span class="ag-set-filter-group-opened-icon" ref="eGroupOpenedIcon"></span>\n                <span class="ag-set-filter-group-indeterminate-icon" ref="eGroupIndeterminateIcon"></span>\n            </span>\n            <ag-checkbox ref="eCheckbox" class="ag-set-filter-item-checkbox"></ag-checkbox>\n        </div>',t.TEMPLATE='\n        <div class="ag-set-filter-item">\n            <ag-checkbox ref="eCheckbox" class="ag-set-filter-item-checkbox"></ag-checkbox>\n        </div>',__decorate$d([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("valueFormatterService")],t.prototype,"valueFormatterService",void 0),__decorate$d([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("userComponentFactory")],t.prototype,"userComponentFactory",void 0),__decorate$d([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eCheckbox")],t.prototype,"eCheckbox",void 0),__decorate$d([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eGroupOpenedIcon")],t.prototype,"eGroupOpenedIcon",void 0),__decorate$d([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eGroupClosedIcon")],t.prototype,"eGroupClosedIcon",void 0),__decorate$d([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eGroupIndeterminateIcon")],t.prototype,"eGroupIndeterminateIcon",void 0),__decorate$d([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"init",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),DEFAULT_LOCALE_TEXT={loadingOoo:"Loading...",blanks:"(Blanks)",searchOoo:"Search...",selectAll:"(Select All)",selectAllSearchResults:"(Select All Search Results)",noMatches:"No matches."},SetFilterModelFormatter=function(){function e(){}return e.prototype.getModelAsString=function(e,t){var r=(e||t.getModel()||{}).values,o=t.getValueModel();if(null==r||null==o)return"";var i=r.filter(function(e){return o.isKeyAvailable(e)}),n=i.length;return"("+n+") "+i.slice(0,10).map(function(e){return t.getFormattedValue(e)}).join(",")+(n>10?",...":"")},e}(),__extends$h=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$c=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},SetFilter=function(e){function t(){var t=e.call(this,"setFilter")||this;return t.valueModel=null,t.setFilterParams=null,t.virtualList=null,t.caseSensitive=!1,t.convertValuesToStrings=!1,t.treeDataTreeList=!1,t.groupingTreeList=!1,t.hardRefreshVirtualList=!1,t.appliedModelKeys=null,t.noAppliedModelKeys=!1,t.filterModelFormatter=new SetFilterModelFormatter,t}return __extends$h(t,e),t.prototype.postConstruct=function(){e.prototype.postConstruct.call(this)},t.prototype.updateUiVisibility=function(){},t.prototype.createBodyTemplate=function(){return'\n            <div class="ag-set-filter">\n                <div ref="eFilterLoading" class="ag-filter-loading ag-hidden">'+this.translateForSetFilter("loadingOoo")+'</div>\n                <ag-input-text-field class="ag-mini-filter" ref="eMiniFilter"></ag-input-text-field>\n                <div ref="eFilterNoMatches" class="ag-filter-no-matches ag-hidden">'+this.translateForSetFilter("noMatches")+'</div>\n                <div ref="eSetFilterList" class="ag-set-filter-list" role="presentation"></div>\n            </div>'},t.prototype.handleKeyDown=function(t){if(e.prototype.handleKeyDown.call(this,t),!t.defaultPrevented)switch(t.key){case ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.KeyCode.SPACE:this.handleKeySpace(t);break;case ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.KeyCode.ENTER:this.handleKeyEnter(t);break;case ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.KeyCode.LEFT:this.handleKeyLeft(t);break;case ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.KeyCode.RIGHT:this.handleKeyRight(t)}},t.prototype.handleKeySpace=function(e){var t;null===(t=this.getComponentForKeyEvent(e))||void 0===t||t.toggleSelected()},t.prototype.handleKeyEnter=function(e){if(this.setFilterParams){var t=this.setFilterParams||{},r=t.excelMode,o=t.readOnly;r&&!o&&(e.preventDefault(),this.onBtApply(!1,!1,e),"mac"===this.setFilterParams.excelMode&&this.eMiniFilter.getInputElement().select())}},t.prototype.handleKeyLeft=function(e){var t;null===(t=this.getComponentForKeyEvent(e))||void 0===t||t.setExpanded(!1)},t.prototype.handleKeyRight=function(e){var t;null===(t=this.getComponentForKeyEvent(e))||void 0===t||t.setExpanded(!0)},t.prototype.getComponentForKeyEvent=function(e){var t,r=this.gridOptionsService.getDocument();if(this.eSetFilterList.contains(r.activeElement)&&this.virtualList){var o=this.virtualList.getLastFocusedRow();if(null!=o){var i=this.virtualList.getComponentAt(o);if(null!=i&&(e.preventDefault(),!(null!==(t=this.setFilterParams)&&void 0!==t?t:{}).readOnly))return i}}},t.prototype.getCssIdentifier=function(){return"set-filter"},t.prototype.setModel=function(t){var r;return null==t&&null==(null===(r=this.valueModel)||void 0===r?void 0:r.getModel())?(this.setMiniFilter(null),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgPromise.resolve()):e.prototype.setModel.call(this,t)},t.prototype.setModelAndRefresh=function(e){var t=this;return this.valueModel?this.valueModel.setModel(e).then(function(){return t.refresh()}):ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgPromise.resolve()},t.prototype.resetUiToDefaults=function(){return this.setMiniFilter(null),this.setModelAndRefresh(null)},t.prototype.setModelIntoUi=function(e){this.setMiniFilter(null);var t=null==e?null:e.values;return this.setModelAndRefresh(t)},t.prototype.getModelFromUi=function(){if(!this.valueModel)throw new Error("Value model has not been created.");var e=this.valueModel.getModel();return e?{values:e,filterType:this.getFilterType()}:null},t.prototype.getFilterType=function(){return"set"},t.prototype.getValueModel=function(){return this.valueModel},t.prototype.areModelsEqual=function(e,t){return null==e&&null==t||null!=e&&null!=t&&ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.areEqual(e.values,t.values)},t.prototype.setParams=function(t){var r,o=this;this.applyExcelModeOptions(t),e.prototype.setParams.call(this,t),this.setFilterParams=t,this.convertValuesToStrings=!!t.convertValuesToStrings,this.caseSensitive=!!t.caseSensitive;var i=null!==(r=t.keyCreator)&&void 0!==r?r:t.colDef.keyCreator;this.setValueFormatter(t.valueFormatter,i,this.convertValuesToStrings,!!t.treeList,!!t.colDef.refData);var n=t.column.getId().startsWith(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.GROUP_AUTO_COLUMN_ID);this.treeDataTreeList=this.gridOptionsService.is("treeData")&&!!t.treeList&&n,this.getDataPath=this.gridOptionsService.get("getDataPath"),this.groupingTreeList=!!this.columnModel.getRowGroupColumns().length&&!!t.treeList&&n,this.createKey=this.generateCreateKey(i,this.convertValuesToStrings,this.treeDataTreeList||this.groupingTreeList),this.valueModel=new SetValueModel({filterParams:t,setIsLoading:function(e){return o.setIsLoading(e)},valueFormatterService:this.valueFormatterService,translate:function(e){return o.translateForSetFilter(e)},caseFormat:function(e){return o.caseFormat(e)},createKey:this.createKey,valueFormatter:this.valueFormatter,usingComplexObjects:!!i,gridOptionsService:this.gridOptionsService,columnModel:this.columnModel,valueService:this.valueService,treeDataTreeList:this.treeDataTreeList,groupingTreeList:this.groupingTreeList}),this.initialiseFilterBodyUi(),this.addEventListenersForDataChanges()},t.prototype.setValueFormatter=function(e,t,r,o,i){var n=e;if(!n){if(t&&!r&&!o)throw new Error("AG Grid: Must supply a Value Formatter in Set Filter params when using a Key Creator unless convertValuesToStrings is enabled");i||(n=function(e){return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.toStringOrNull(e.value)})}this.valueFormatter=n},t.prototype.generateCreateKey=function(e,t,r){var o=this;if(r&&!e)throw new Error("AG Grid: Must supply a Key Creator in Set Filter params when `treeList = true` on a group column, and Tree Data or Row Grouping is enabled.");return e?function(t,r){void 0===r&&(r=null);var i=o.getKeyCreatorParams(t,r);return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.makeNull(e(i))}:t?function(e){return Array.isArray(e)?e:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.makeNull(
2ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.toStringOrNull(e))}:function(e){return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.makeNull(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.toStringOrNull(e))}},t.prototype.getFormattedValue=function(e){var t,r=this.valueModel.getValue(e);return null!==(t=this.valueFormatterService.formatValue(this.setFilterParams.column,null,r,this.valueFormatter,!1)??ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.toStringOrNull(r))&&void 0!==t?t:this.translateForSetFilter("blanks")},t.prototype.applyExcelModeOptions=function(e){"windows"===e.excelMode?(e.buttons||(e.buttons=["apply","cancel"]),null==e.closeOnApply&&(e.closeOnApply=!0)):"mac"===e.excelMode&&(e.buttons||(e.buttons=["reset"]),null==e.applyMiniFilterWhileTyping&&(e.applyMiniFilterWhileTyping=!0),null==e.debounceMs&&(e.debounceMs=500)),e.excelMode&&e.defaultToNothingSelected&&ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.doOnce(function(){return console.warn('AG Grid: The Set Filter Parameter "defaultToNothingSelected" does not work with "excelMode".')},"setFilterExcelModeDefaultToNothingSelect")},t.prototype.addEventListenersForDataChanges=function(){var e=this;this.isValuesTakenFromGrid()&&this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_CELL_VALUE_CHANGED,function(t){e.setFilterParams&&t.column===e.setFilterParams.column&&e.syncAfterDataChange()})},t.prototype.syncAfterDataChange=function(){var e=this;if(!this.valueModel)throw new Error("Value model has not been created.");return this.valueModel.refreshValues().then(function(){e.refresh(),e.onBtApply(!1,!0)})},t.prototype.setIsLoading=function(e){ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setDisplayed(this.eFilterLoading,e),e||(this.hardRefreshVirtualList=!0)},t.prototype.initialiseFilterBodyUi=function(){this.initVirtualList(),this.initMiniFilter()},t.prototype.initVirtualList=function(){var e=this;if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");var t=this.localeService.getLocaleTextFunc()("ariaFilterList","Filter List"),r=!!this.setFilterParams.treeList,o=this.virtualList=this.createBean(new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.VirtualList("filter",r?"tree":"listbox",t)),i=this.getRefElement("eSetFilterList");r&&i.classList.add("ag-set-filter-tree-list"),i&&i.appendChild(o.getGui());var n,a=this.setFilterParams.cellHeight;null!=a&&o.setRowHeight(a),o.setComponentCreator(function(t,o){return e.createSetListItem(t,r,o)}),o.setComponentUpdater(function(t,r){return e.updateSetListItem(t,r)}),n=this.setFilterParams.suppressSelectAll?new ModelWrapper(this.valueModel):new ModelWrapperWithSelectAll(this.valueModel,function(){return e.isSelectAllSelected()}),r&&(n=new TreeModelWrapper(n)),o.setModel(n)},t.prototype.getSelectAllLabel=function(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");var e=null!=this.valueModel.getMiniFilter()&&this.setFilterParams.excelMode?"selectAllSearchResults":"selectAll";return this.translateForSetFilter(e)},t.prototype.createSetListItem=function(e,t,r){var o,i,n,a,s,l,c=this;if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");var u,d,p,h,_,f,g=this.valueModel.hasGroups();this.isSetFilterModelTreeItem(e)?(d=e.depth,e.key===SetFilterDisplayValue.SELECT_ALL?(u=function(){return c.getSelectAllLabel()},p=g,h=!0,_=function(e){return c.onSelectAll(e.isSelected)},f=function(e){return c.onExpandAll(e.item,e.isExpanded)}):e.children?(u=null!==(n=null===(i=(o=this.setFilterParams).treeListFormatter)||void 0===i?void 0:i.call(o,e.treeKey,e.depth,e.parentTreeKeys))&&void 0!==n?n:e.treeKey,p=!0,_=function(e){return c.onGroupItemSelected(e.item,e.isSelected)},f=function(e){return c.onExpandedChanged(e.item,e.isExpanded)}):(u=null!==(l=null===(s=(a=this.setFilterParams).treeListFormatter)||void 0===s?void 0:s.call(a,e.treeKey,e.depth,e.parentTreeKeys))&&void 0!==l?l:e.treeKey,_=function(e){return c.onItemSelected(e.item.key,e.isSelected)})):e===SetFilterDisplayValue.SELECT_ALL?(u=function(){return c.getSelectAllLabel()},_=function(e){return c.onSelectAll(e.isSelected)}):(u=this.valueModel.getValue(e),_=function(e){return c.onItemSelected(e.item,e.isSelected)});var y=this.isSelectedExpanded(e),m=y.isSelected,v=y.isExpanded,E={focu
2sWrapper:r,value:u,params:this.setFilterParams,translate:function(e){return c.translateForSetFilter(e)},valueFormatter:this.valueFormatter,item:e,isSelected:m,isTree:t,depth:d,groupsExist:g,isGroup:p,isExpanded:v,hasIndeterminateExpandState:h},C=this.createBean(new SetFilterListItem(E));return C.addEventListener(SetFilterListItem.EVENT_SELECTION_CHANGED,_),f&&C.addEventListener(SetFilterListItem.EVENT_EXPANDED_CHANGED,f),C},t.prototype.updateSetListItem=function(e,t){var r=this.isSelectedExpanded(e),o=r.isSelected,i=r.isExpanded;t.refresh(e,o,i)},t.prototype.isSelectedExpanded=function(e){var t,r;return this.isSetFilterModelTreeItem(e)?(r=e.expanded,t=e.key===SetFilterDisplayValue.SELECT_ALL?this.isSelectAllSelected():e.children?this.areAllChildrenSelected(e):this.valueModel.isKeySelected(e.key)):t=e===SetFilterDisplayValue.SELECT_ALL?this.isSelectAllSelected():this.valueModel.isKeySelected(e),{isSelected:t,isExpanded:r}},t.prototype.isSetFilterModelTreeItem=function(e){return void 0!==(null==e?void 0:e.treeKey)},t.prototype.initMiniFilter=function(){var e=this;if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");var t=this.eMiniFilter,r=this.localeService.getLocaleTextFunc();t.setDisplayed(!this.setFilterParams.suppressMiniFilter),t.setValue(this.valueModel.getMiniFilter()),t.onValueChange(function(){return e.onMiniFilterInput()}),t.setInputAriaLabel(r("ariaSearchFilterValues","Search filter values")),this.addManagedListener(t.getInputElement(),"keypress",function(t){return e.onMiniFilterKeyPress(t)})},t.prototype.afterGuiAttached=function(t){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");e.prototype.afterGuiAttached.call(this,t),this.resetExpansion(),this.refreshVirtualList();var r=this.eMiniFilter;r.setInputPlaceholder(this.translateForSetFilter("searchOoo")),t&&t.suppressFocus||r.getFocusableElement().focus()},t.prototype.afterGuiDetached=function(){var t,r;e.prototype.afterGuiDetached.call(this),(null===(t=this.setFilterParams)||void 0===t?void 0:t.excelMode)&&this.resetMiniFilter();var o=this.getModel();!(null===(r=this.setFilterParams)||void 0===r?void 0:r.excelMode)&&this.areModelsEqual(o,this.getModelFromUi())||(this.resetUiToActiveModel(o),this.showOrHideResults())},t.prototype.applyModel=function(t){var r=this;if(void 0===t&&(t="api"),!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");this.setFilterParams.excelMode&&"rowDataUpdated"!==t&&this.valueModel.isEverythingVisibleSelected()&&this.valueModel.selectAllMatchingMiniFilter();var o=e.prototype.applyModel.call(this,t),i=this.getModel();return i?(this.appliedModelKeys=new Set,i.values.forEach(function(e){r.appliedModelKeys.add(r.caseFormat(e))})):this.appliedModelKeys=null,this.noAppliedModelKeys=0===(null==i?void 0:i.values.length),o},t.prototype.isModelValid=function(e){return!this.setFilterParams||!this.setFilterParams.excelMode||null==e||e.values.length>0},t.prototype.doesFilterPass=function(e){var t=this;if(!this.setFilterParams||!this.valueModel||!this.appliedModelKeys)return!0;if(this.noAppliedModelKeys)return!1;var r=e.node,o=e.data;if(this.treeDataTreeList)return this.doesFilterPassForTreeData(r,o);if(this.groupingTreeList)return this.doesFilterPassForGrouping(r,o);var i=this.getValueFromNode(r,o);return this.convertValuesToStrings?this.doesFilterPassForConvertValuesToString(r,i):null!=i&&Array.isArray(i)?0===i.length?this.appliedModelKeys.has(null):i.some(function(e){return t.isInAppliedModel(t.createKey(e,r))}):this.isInAppliedModel(this.createKey(i,r))},t.prototype.doesFilterPassForConvertValuesToString=function(e,t){var r=this,o=this.createKey(t,e);return null!=o&&Array.isArray(o)?0===o.length?this.appliedModelKeys.has(null):o.some(function(e){return r.isInAppliedModel(e)}):this.isInAppliedModel(o)},t.prototype.doesFilterPassForTreeData=function(e,t){var r;return!(null===(r=e.childrenAfterGroup)||void 0===r?void 0:r.length)&&this.isInAppliedModel(this.createKey(this.checkMakeNullDataPath(this.getDataPath(t))))},t.prototype.doesFilterPassForGrouping=function(e,t){var r=this,o=this.columnModel.getRowGroupColumns().map(function(t){return r.valueService.getKeyForNode(t,e)});return o.push(this.getValueFromNode(e,t)),this.isInAppliedModel(this.createKey(this.checkMakeNullDataPath(o)))},t.prototype.checkMakeNullDataPath=function(e){return e&&(e=e.map(function(e){return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.toStringOrNull(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.makeNull(e))})),(null==e?void 0:e.some(function(e){return null==e}))?null:e},t.prototype.isInAppliedModel=function(e){return this.appliedModelKeys.has(this.caseFormat(e))},t.prototype.getValueFromNode=function(e,t){var r=this.setFilterParams;return(0,r.valueGetter)({api:r.api,colDef:r.colDef,column:r.column,columnApi:r.columnApi,context:r.context,data:t,getValue:function(e){return t[e]},node:e})},t.prototype.getKeyCreatorParams=function(e,t){return void 0===t&&(t=null),{value:e,colDef:this.setFilterParams.colDef,column:this.setFilterParams.column,node:t,data:null==t?void 0:t.data,api:this.setFilterParams.api,columnApi:this.setFilterParams.columnApi,context:this.setFilterParams.context}},t.prototype.onNewRowsLoaded=function(){this.isValuesTakenFromGrid()&&this.syncAfterDataChange()},t.prototype.isValuesTakenFromGrid=function(){return!!this.valueModel&&this.valueModel.getValuesType()===SetFilterModelValuesType.TAKEN_FROM_GRID_VALUES},t.prototype.setFilterValues=function(e){var t=this;if(!this.valueModel)throw new Error("Value model has not been created.");this.valueModel.overrideValues(e).then(function(){t.refresh(),t.onUiChanged()})},t.prototype.resetFilterValues=function(){if(!this.valueModel)throw new Error("Value model has not been created.");this.valueModel.setValuesType(SetFilterModelValuesType.TAKEN_FROM_GRID_VALUES),this.syncAfterDataChange()},t.prototype.refreshFilterValues=function(){var e=this;if(!this.valueModel)throw new Error("Value model has not been created.");this.valueModel.isInitialised()&&this.valueModel.refreshValues().then(function(){e.refresh(),e.onUiChanged()})},t.prototype.onAnyFilterChanged=function(){var e=this;setTimeout(function(){if(e.isAlive()){if(!e.valueModel)throw new Error("Value model has not been created.");e.valueModel.refreshAfterAnyFilterChanged().then(function(t){t&&(e.refresh(),e.showOrHideResults())})}},0)},t.prototype.onMiniFilterInput=function(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");
2if(this.valueModel.setMiniFilter(this.eMiniFilter.getValue())){var e=this.setFilterParams||{},t=e.applyMiniFilterWhileTyping;!e.readOnly&&t?this.filterOnAllVisibleValues(!1):this.updateUiAfterMiniFilterChange()}},t.prototype.updateUiAfterMiniFilterChange=function(){if(!this.setFilterParams)throw new Error("Set filter params have not been provided.");if(!this.valueModel)throw new Error("Value model has not been created.");var e=this.setFilterParams||{},t=e.excelMode,r=e.readOnly;null==t||r?this.refresh():null==this.valueModel.getMiniFilter()?this.resetUiToActiveModel(this.getModel()):(this.valueModel.selectAllMatchingMiniFilter(!0),this.refresh(),this.onUiChanged()),this.showOrHideResults()},t.prototype.showOrHideResults=function(){if(!this.valueModel)throw new Error("Value model has not been created.");var e=null!=this.valueModel.getMiniFilter()&&this.valueModel.getDisplayedValueCount()<1;ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setDisplayed(this.eNoMatches,e),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.setDisplayed(this.eSetFilterList,!e)},t.prototype.resetMiniFilter=function(){var e;this.eMiniFilter.setValue(null,!0),null===(e=this.valueModel)||void 0===e||e.setMiniFilter(null)},t.prototype.resetUiToActiveModel=function(e){var t=this;this.setModelAndRefresh(null==e?null:e.values).then(function(){return t.onUiChanged(!1,"prevent")})},t.prototype.onMiniFilterKeyPress=function(e){var t=this.setFilterParams||{},r=t.excelMode,o=t.readOnly;e.key!==ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.KeyCode.ENTER||r||o||this.filterOnAllVisibleValues()},t.prototype.filterOnAllVisibleValues=function(e){void 0===e&&(e=!0);var t=(this.setFilterParams||{}).readOnly;if(!this.valueModel)throw new Error("Value model has not been created.");if(t)throw new Error("Unable to filter in readOnly mode.");this.valueModel.selectAllMatchingMiniFilter(!0),this.refresh(),this.onUiChanged(!1,e?"immediately":"debounce"),this.showOrHideResults()},t.prototype.focusRowIfAlive=function(e){var t=this;null!=e&&window.setTimeout(function(){if(!t.virtualList)throw new Error("Virtual list has not been created.");t.isAlive()&&t.virtualList.focusRow(e)},0)},t.prototype.onSelectAll=function(e){if(!this.valueModel)throw new Error("Value model has not been created.");if(!this.virtualList)throw new Error("Virtual list has not been created.");e?this.valueModel.selectAllMatchingMiniFilter():this.valueModel.deselectAllMatchingMiniFilter(),this.refreshAfterSelection()},t.prototype.onGroupItemSelected=function(e,t){var r=this,o=function(e){e.children?e.children.forEach(function(e){return o(e)}):r.selectItem(e.key,t)};o(e),this.refreshAfterSelection()},t.prototype.onItemSelected=function(e,t){if(!this.valueModel)throw new Error("Value model has not been created.");if(!this.virtualList)throw new Error("Virtual list has not been created.");this.selectItem(e,t),this.refreshAfterSelection()},t.prototype.selectItem=function(e,t){t?this.valueModel.selectKey(e):this.valueModel.deselectKey(e)},t.prototype.onExpandAll=function(e,t){var r=function(e){e.filterPasses&&e.available&&e.children&&(e.children.forEach(function(e){return r(e)}),e.expanded=t)};r(e),this.refreshAfterExpansion()},t.prototype.onExpandedChanged=function(e,t){e.expanded=t,this.refreshAfterExpansion()},t.prototype.refreshAfterExpansion=function(){var e=this.virtualList.getLastFocusedRow();this.valueModel.updateDisplayedValues("expansion"),this.refresh(),this.focusRowIfAlive(e)},t.prototype.refreshAfterSelection=function(){var e=this.virtualList.getLastFocusedRow();this.refresh(),this.onUiChanged(),this.focusRowIfAlive(e)},t.prototype.setMiniFilter=function(e){this.eMiniFilter.setValue(e),this.onMiniFilterInput()},t.prototype.getMiniFilter=function(){return this.valueModel?this.valueModel.getMiniFilter():null},t.prototype.refresh=function(){if(!this.virtualList)throw new Error("Virtual list has not been created.");this.virtualList.refresh(!this.hardRefreshVirtualList),this.hardRefreshVirtualList&&(this.hardRefreshVirtualList=!1)},t.prototype.getFilterKeys=function(){return this.valueModel?this.valueModel.getKeys():[]},t.prototype.getFilterValues=function(){return this.valueModel?this.valueModel.getValues():[]},t.prototype.getValues=function(){return this.getFilterKeys()},t.prototype.refreshVirtualList=function(){this.setFilterParams&&this.setFilterParams.refreshValuesOnOpen?this.refreshFilterValues():this.refresh()},t.prototype.translateForSetFilter=function(e){return this.localeService.getLocaleTextFunc()(e,DEFAULT_LOCALE_TEXT[e])},t.prototype.isSelectAllSelected=function(){if(!this.setFilterParams||!this.valueModel)return!1;if(this.setFilterParams.defaultToNothingSelected){if(this.valueModel.hasSelections()&&this.valueModel.isEverythingVisibleSelected())return!0;
2if(this.valueModel.isNothingVisibleSelected())return!1}else{if(this.valueModel.hasSelections()&&this.valueModel.isNothingVisibleSelected())return!1;if(this.valueModel.isEverythingVisibleSelected())return!0}},t.prototype.areAllChildrenSelected=function(e){var t=this,r=function(e){if(e.children){var o=!1,i=!1;return e.children.some(function(e){if(!e.filterPasses||!e.available)return!1;var t=r(e);return void 0===t||(t?o=!0:i=!0,o&&i)})?void 0:o}return t.valueModel.isKeySelected(e.key)};return this.setFilterParams.defaultToNothingSelected?this.valueModel.hasSelections()&&r(e):r(e)},t.prototype.destroy=function(){null!=this.virtualList&&(this.virtualList.destroy(),this.virtualList=null),e.prototype.destroy.call(this)},t.prototype.caseFormat=function(e){return null==e||"string"!=typeof e||this.caseSensitive?e:e.toUpperCase()},t.prototype.resetExpansion=function(){var e,t;if(null===(e=this.setFilterParams)||void 0===e?void 0:e.treeList){var r=null===(t=this.valueModel)||void 0===t?void 0:t.getSelectAllItem();if(this.isSetFilterModelTreeItem(r)){var o=function(e){e.children&&(e.children.forEach(function(e){return o(e)}),e.expanded=!1)};o(r),this.valueModel.updateDisplayedValues("expansion")}}},t.prototype.getModelAsString=function(e){return this.filterModelFormatter.getModelAsString(e,this)},t.prototype.getPositionableElement=function(){return this.eSetFilterList},__decorate$c([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eMiniFilter")],t.prototype,"eMiniFilter",void 0),__decorate$c([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eFilterLoading")],t.prototype,"eFilterLoading",void 0),__decorate$c([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eSetFilterList")],t.prototype,"eSetFilterList",void 0),__decorate$c([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eFilterNoMatches")],t.prototype,"eNoMatches",void 0),__decorate$c([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("valueFormatterService")],t.prototype,"valueFormatterService",void 0),__decorate$c([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],t.prototype,"columnModel",void 0),__decorate$c([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("valueService")],t.prototype,"valueService",void 0),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ProvidedFilter),ModelWrapper=function(){function e(e){this.model=e}return e.prototype.getRowCount=function(){return this.model.getDisplayedValueCount()},e.prototype.getRow=function(e){return this.model.getDisplayedItem(e)},e.prototype.isRowSelected=function(e){return this.model.isKeySelected(this.getRow(e))},e.prototype.areRowsEqual=function(e,t){return e===t},e}(),ModelWrapperWithSelectAll=function(){function e(e,t){this.model=e,this.isSelectAllSelected=t}return e.prototype.getRowCount=function(){return this.model.getDisplayedValueCount()+1},e.prototype.getRow=function(e){return 0===e?this.model.getSelectAllItem():this.model.getDisplayedItem(e-1)},e.prototype.isRowSelected=function(e){return 0===e?this.isSelectAllSelected():this.model.isKeySelected(this.getRow(e))},e.prototype.areRowsEqual=function(e,t){return e===t},e}(),TreeModelWrapper=function(){function e(e){this.model=e}return e.prototype.getRowCount=function(){return this.model.getRowCount()},e.prototype.getRow=function(e){return this.model.getRow(e)},e.prototype.areRowsEqual=function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.treeKey===t.treeKey&&e.depth===t.depth},e}(),__extends$g=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$b=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},SetFloatingFilterComp=function(e){function t(){var t=e.call(this,'\n            <div class="ag-floating-filter-input" role="presentation">\n                <ag-input-text-field ref="eFloatingFilterText"></ag-input-text-field>\n            </div>')||this;return t.availableValuesListenerAdded=!1,t.filterModelFormatter=new SetFilterModelFormatter,t}return __extends$g(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t.prototype.init=function(e){var t=this.columnModel.getDisplayNameForColumn(e.column,"header",!0),r=this.localeService.getLocaleTextFunc();this.eFloatingFilterText.setDisabled(!0).setInputAriaLabel(t+" "+r("ariaFilterInput","Filter Input")).addGuiEventListener("click",function(){return e.showParentFilter()}),this.params=e},t.prototype.onParentModelChanged=function(e){this.updateFloatingFilterText(e)},t.prototype.parentSetFilterInstance=function(e){this.params.parentFilterInstance(function(t){if(!(t instanceof SetFilter))throw new Error("AG Grid - SetFloatingFilter expects SetFilter as its parent");e(t)})},t.prototype.addAvailableValuesListener=function(){var e=this;this.parentSetFilterInstance(function(t){var r=t.getValueModel();r&&e.addManagedListener(r,SetValueModel.EVENT_AVAILABLE_VALUES_CHANGED,function(){return e.updateFloatingFilterText()})}),this.availableValuesListenerAdded=!0},t.prototype.updateFloatingFilterText=function(e){var t=this;this.availableValuesListenerAdded||this.addAvailableValuesListener(),this.parentSetFilterInstance(function(r){t.eFloatingFilterText.setValue(t.filterModelFormatter.getModelAsString(e,r))})},__decorate$b([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eFloatingFilterText")],t.prototype,"eFloatingFilterText",void 0),__decorate$b([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("columnModel")],t.prototype,"columnModel",void 0),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),VERSION$3="29.2.0",SetFilterModule={version:VERSION$3,moduleName:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleNames.SetFilterModule,beans:[],userComponents:[{componentName:"agSetColumnFilter",componentClass:SetFilter},{componentName:"agSetColumnFloatingFilter",componentClass:SetFloatingFilterComp}],dependantModules:[EnterpriseCoreModule]},__extends$f=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$a=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},StatusBarService=function(e){function t(){var t=e.call(this)||this;return t.allComponents={},t}return __extends$f(t,e),t.prototype.registerStatusPanel=function(e,t){this.allComponents[e]=t},t.prototype.getStatusPanel=function(e){return this.allComponents[e]},__decorate$a([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Bean)("statusBarService")],t)}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.BeanStub),__extends$e=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$9=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},StatusBar=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return __extends$e(t,e),t.prototype.postConstruct=function(){var e,t=null===(e=this.gridOptionsService.get("statusBar"))||void 0===e?void 0:e.statusPanels;if(t){var r=t.filter(function(e){return"left"===e.align});this.createAndRenderComponents(r,this.eStatusBarLeft);var o=t.filter(function(e){return"center"===e.align});this.createAndRenderComponents(o,this.eStatusBarCenter);var i=t.filter(function(e){return!e.align||"right"===e.align});this.createAndRenderComponents(i,this.eStatusBarRight)}else this.setDisplayed(!1)},t.prototype.createAndRenderComponents=function(e,t){var r=this,o=[];e.forEach(function(e){var t=r.userComponentFactory.getStatusPanelCompDetail
vendor: 13,980 bytes, line 2
2s(e,{}).newAgStackInstance();t&&o.push({key:e.key||e.statusPanel,promise:t})}),ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AgPromise.all(o.map(function(e){return e.promise})).then(function(){o.forEach(function(e){e.promise.then(function(o){var i=function(){r.getContext().destroyBean(o)};r.isAlive()?(r.statusBarService.registerStatusPanel(e.key,o),t.appendChild(o.getGui()),r.addDestroyFunc(i)):i()})})})},t.TEMPLATE='<div class="ag-status-bar">\n            <div ref="eStatusBarLeft" class="ag-status-bar-left" role="status"></div>\n            <div ref="eStatusBarCenter" class="ag-status-bar-center" role="status"></div>\n            <div ref="eStatusBarRight" class="ag-status-bar-right" role="status"></div>\n        </div>',__decorate$9([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("userComponentFactory")],t.prototype,"userComponentFactory",void 0),__decorate$9([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("statusBarService")],t.prototype,"statusBarService",void 0),__decorate$9([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eStatusBarLeft")],t.prototype,"eStatusBarLeft",void 0),__decorate$9([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eStatusBarCenter")],t.prototype,"eStatusBarCenter",void 0),__decorate$9([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eStatusBarRight")],t.prototype,"eStatusBarRight",void 0),__decorate$9([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"postConstruct",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),__extends$d=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$8=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},NameValueComp=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return __extends$d(t,e),t.prototype.setLabel=function(e,t){this.setDisplayed(!1);var r=this.localeService.getLocaleTextFunc();this.eLabel.innerHTML=r(e,t)},t.prototype.setValue=function(e){this.eValue.innerHTML=e},t.TEMPLATE='<div class="ag-status-name-value">\n            <span ref="eLabel"></span>:&nbsp;\n            <span ref="eValue" class="ag-status-name-value-value"></span>\n        </div>',__decorate$8([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eLabel")],t.prototype,"eLabel",void 0),__decorate$8([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eValue")],t.prototype,"eValue",void 0),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),__extends$c=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$7=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},TotalAndFilteredRowsComp=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$c(t,e),t.prototype.postConstruct=function(){"clientSide"===this.gridApi.getModel().getType()?(this.setLabel("totalAndFilteredRows","Rows"),this.addCssClass("ag-status-panel"),this.addCssClass("ag-status-panel-total-and-filtered-row-count"),this.setDisplayed(!0),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_MODEL_UPDATED,this.onDataChanged.bind(this)),this.onDataChanged()):console.warn("AG Grid: agTotalAndFilteredRowCountComponent should only be used with the client side row model.")},t.prototype.onDataChanged=function(){var e=this.localeService.getLocaleTextFunc(),t=e("thousandSeparator",","),r=e("decimalSeparator","."),o=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.formatNumberCommas(this.getFilteredRowCountValue(),t,r),i=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.formatNumberCommas(this.getTotalRowCount(),t,r);if(o===i)this.setValue(o);else{var n=this.localeService.getLocaleTextFunc();this.setValue(o+" "+n("of","of")+" "+i)}},t.prototype.getFilteredRowCountValue=function(){var e=0;return this.gridApi.forEachNodeAfterFilter(function(t){t.group||e++}),e},t.prototype.getTotalRowCount=function(){var e=0;return this.gridApi.forEachNode(function(t){t.group||e++}),e},t.prototype.init=function(){},t.prototype.destroy=function(){e.prototype.destroy.call(this)},__decorate$7([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("gridApi")],t.prototype,"gridApi",void 0),__decorate$7([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"postConstruct",null),t}(NameValueComp),__extends$b=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$6=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},FilteredRowsComp=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$b(t,e),t.prototype.postConstruct=function(){if(this.setLabel("filteredRows","Filtered"),"clientSide"===this.gridApi.getModel().getType()){this.addCssClass("ag-status-panel"),this.addCssClass("ag-status-panel-filtered-row-count"),this.setDisplayed(!0);var e=this.onDataChanged.bind(this);this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_MODEL_UPDATED,e),e()}else console.warn("AG Grid: agFilteredRowCountComponent should only be used with the client side row model.")},t.prototype.onDataChanged=function(){var e=this.getTotalRowCountValue(),t=this.getFilteredRowCountValue(),r=this.localeService.getLocaleTextFunc(),o=r("thousandSeparator",","),i=r("decimalSeparator",".");this.setValue(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.formatNumberCommas(t,o,i)),this.setDisplayed(e!==t)},t.prototype.getTotalRowCountValue=function(){var e=0;return this.gridApi.forEachNode(function(t){return e+=1}),e},t.prototype.getFilteredRowCountValue=function(){var e=0;return this.gridApi.forEachNodeAfterFilter(function(t){t.group||(e+=1)}),e},t.prototype.init=function(){},t.prototype.destroy=function(){e.prototype.destroy.call(this)},__decorate$6([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("gridApi")],t.prototype,"gridApi",void 0),__decorate$6([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"postConstruct",null),t}(NameValueComp),__extends$a=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$5=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},TotalRowsComp=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$a(t,e),t.prototype.postConstruct=function(){this.setLabel("totalRows","Total Rows"),"clientSide"===this.gridApi.getModel().getType()?(this.addCssClass("ag-status-panel"),this.addCssClass("ag-status-panel-total-row-count"),this.setDisplayed(!0),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_MODEL_UPDATED,this.onDataChanged.bind(this)),this.onDataChanged()):console.warn("AG Grid: agTotalRowCountComponent should only be used with the client side row model.")},t.prototype.onDataChanged=function(){var e=this.localeService.getLocaleTextFunc(),t=e("thousandSeparator",","),r=e("decimalSeparator",".");this.setValue(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.formatNumberCommas(this.getRowCountValue(),t,r))},t.prototype.getRowCountValue=function(){var e=0;return this.gridApi.forEachLeafNode(function(t){return e+=1}),e},t.prototype.init=function(){},t.prototype.destroy=function(){e.prototype.destroy.call(this)},__decorate$5([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("gridApi")],t.prototype,"gridApi",void 0),__decorate$5([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"postConstruct",null),t}(NameValueComp),__extends$9=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$4=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},SelectedRowsComp=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$9(t,e),t.prototype.postConstruct=function(){if(this.isValidRowModel()){this.setLabel("selectedRows","Selected"),this.addCssClass("ag-status-panel"),this.addCssClass("ag-status-panel-selected-row-count"),this.onRowSelectionChanged();var e=this.onRowSelectionChanged.bind(this);this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_MODEL_UPDATED,e),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_SELECTION_CHANGED,e)}else console.warn("AG Grid: agSelectedRowCountComponent should only be used with the client and server side row model.")},t.prototype.isValidRowModel=function(){var e=this.gridApi.getModel().getType();return"clientSide"===e||"serverSide"===e},t.prototype.onRowSelectionChanged=function(){var e=this.selectionService.getSelectionCount();if(e<0)return this.setValue("?"),void this.setDisplayed(!0);var t=this.localeService.getLocaleTextFunc(),r=t("thousandSeparator",","),o=t("decimalSeparator",".");this.setValue(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.formatNumberCommas(e,r,o)),this.setDisplayed(e>0)},t.prototype.init=function(){},t.prototype.destroy=function(){e.prototype.destroy.call(this)},__decorate$4([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("gridApi")],t.prototype,"gridApi",void 0),__decorate$4([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("selectionService")],t.prototype,"selectionService",void 0),__decorate$4([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"postConstruct",null),t}(NameValueComp),__extends$8=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$3=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},AggregationComp=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return __extends$8(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t.prototype.postConstruct=function(){this.isValidRowModel()?(this.avgAggregationComp.setLabel("avg","Average"),this.countAggregationComp.setLabel("count","Count"),this.minAggregationComp.setLabel("min","Min"),this.maxAggregationComp.setLabel("max","Max"),this.sumAggregationComp.setLabel("sum","Sum"),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_RANGE_SELECTION_CHANGED,this.onRangeSelectionChanged.bind(this)),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_MODEL_UPDATED,this.onRangeSelectionChanged.bind(this))):console.warn("AG Grid: agAggregationComponent should only be used with the client and server side row model.")},t.prototype.isValidRowModel=function(){var e=this.gridApi.getModel().getType();return"clientSide"===e||"serverSide"===e},t.prototype.init=function(){},t.prototype.setAggregationComponentValue=function(e,t,r){var o=this.getAggregationValueComponent(e);
2if(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.exists(o)&&o){var i=this.localeService.getLocaleTextFunc(),n=i("thousandSeparator",","),a=i("decimalSeparator",".");o.setValue(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.formatNumberTwoDecimalPlacesAndCommas(t,n,a)),o.setDisplayed(r)}},t.prototype.getAggregationValueComponent=function(e){var t=e+"AggregationComp",r=null,o=this.gridOptionsService.get("statusBar"),i=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.exists(o)&&o?o.statusPanels.find(function(e){return"agAggregationComponent"===e.statusPanel}):null;return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.exists(i)&&i?(!ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.exists(i.statusPanelParams)||ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.exists(i.statusPanelParams)&&ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.exists(i.statusPanelParams.aggFuncs)&&ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.exists(i.statusPanelParams.aggFuncs.find(function(t){return t===e})))&&(r=this[t]):r=this[t],r},t.prototype.onRangeSelectionChanged=function(){var e=this,t=this.rangeService?this.rangeService.getCellRanges():void 0,r=0,o=0,i=0,n=null,a=null,s={};t&&!ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.missingOrEmpty(t)&&t.forEach(function(t){for(var l=e.rangeService.getRangeStartRow(t),c=e.rangeService.getRangeEndRow(t);!ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.missing(l)&&l&&!e.rowPositionUtils.before(c,l)&&l&&t.columns;)t.columns.forEach(function(t){if(null!==l){var c=e.cellPositionUtils.createId({rowPinned:l.rowPinned,column:t,rowIndex:l.rowIndex});if(!s[c]){s[c]=!0;var u=e.rowRenderer.getRowNode(l);if(!ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.missing(u)){var d=e.valueService.getValue(t,u);ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.missing(d)||""===d||("object"==typeof d&&"value"in d&&(d=d.value),"string"==typeof d&&(d=Number(d)),"number"!=typeof d||isNaN(d)||(r+=d,(null===a||d>a)&&(a=d),(null===n||d<n)&&(n=d),i++),o++)}}}}),l=e.cellNavigationService.getRowBelow(l)});var l=o>1,c=i>1;this.setAggregationComponentValue("count",o,l),this.setAggregationComponentValue("sum",r,c),this.setAggregationComponentValue("min",n,c),this.setAggregationComponentValue("max",a,c),this.setAggregationComponentValue("avg",r/i,c)},t.TEMPLATE='<div class="ag-status-panel ag-status-panel-aggregations">\n            <ag-name-value ref="avgAggregationComp"></ag-name-value>\n            <ag-name-value ref="countAggregationComp"></ag-name-value>\n            <ag-name-value ref="minAggregationComp"></ag-name-value>\n            <ag-name-value ref="maxAggregationComp"></ag-name-value>\n            <ag-name-value ref="sumAggregationComp"></ag-name-value>\n        </div>',__decorate$3([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Optional)("rangeService")],t.prototype,"rangeService",void 0),__decorate$3([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("valueService")],t.prototype,"valueService",void 0),__decorate$3([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("cellNavigationService")],t.prototype,"cellNavigationService",void 0),__decorate$3([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("rowRenderer")],t.prototype,"rowRenderer",void 0),__decorate$3([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("gridApi")],t.prototype,"gridApi",void 0),__decorate$3([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("cellPositionUtils")],t.prototype,"cellPositionUtils",void 0),__decorate$3([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("rowPositionUtils")],t.prototype,"rowPositionUtils",void 0),__decorate$3([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("sumAggregationComp")],t.prototype,"sumAggregationComp",void 0),__decorate$3([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("countAggregationComp")],t.prototype,"countAggregationComp",void 0),__decorate$3([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("minAggregationComp")],t.prototype,"minAggregationComp",void 0),__decorate$3([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("maxAggregationComp")],t.prototype,"maxAggregationComp",void 0),__decorate$3([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("avgAggregationComp")],t.prototype,"avgAggregationComp",void 0),__decorate$3([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"postConstruct",null),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),VERSION$2="29.2.0",StatusBarModule={version:VERSION$2,moduleName:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleNames.StatusBarModule,beans:[StatusBarService],agStackComponents:[{componentName:"AgStatusBar",componentClass:StatusBar},{componentName:"AgNameValue",componentClass:NameValueComp}],userComponents:[{componentName:"agAggregationComponent",componentClass:AggregationComp},{componentName:"agSelectedRowCountComponent",componentClass:SelectedRowsComp},{componentName:"agTotalRowCountComponent",componentClass:TotalRowsComp},{componentName:"agFilteredRowCountComponent",componentClass:FilteredRowsComp},{componentName:"agTotalAndFilteredRowCountComponent",componentClass:TotalAndFilteredRowsComp}],dependantModules:[EnterpriseCoreModule]},VERSION$1="29.2.0",__extends$7=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate$2=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},DEFAULT_VIEWPORT_ROW_MODEL_PAGE_SIZE=5,DEFAULT_VIEWPORT_ROW_MODEL_BUFFER_SIZE=5,ViewportRowModel=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.firstRow=-1,t.lastRow=-1,t.rowCount=-1,t.rowNodesByIndex={},t}return __extends$7(t,e),t.prototype.ensureRowHeightsValid=function(e,t,r,o){return!1},t.prototype.init=function(){this.rowHeight=this.gridOptionsService.getRowHeightAsNumber(),this.addManagedListener(this.eventService,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_VIEWPORT_CHANGED,this.onViewportChanged.bind(this))},t.prototype.start=function(){this.gridOptionsService.get("viewportDatasource")&&this.setViewportDatasource(this.gridOptionsService.get("viewportDatasource"))},t.prototype.isLastRowIndexKnown=function(){return!0},t.prototype.destroyDatasource=function(){this.viewportDatasource&&(this.viewportDatasource.destroy&&this.viewportDatasource.destroy(),this.rowRenderer.datasourceChanged(),this.firstRow=-1,this.lastRow=-1)},t.prototype.getViewportRowModelPageSize=function(){return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.oneOrGreater(this.gridOptionsService.getNum("viewportRowModelPageSize"),DEFAULT_VIEWPORT_ROW_MODEL_PAGE_SIZE)},t.prototype.getViewportRowModelBufferSize=function(){return ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.zeroOrGreater(this.gridOptionsService.getNum("viewportRowModelBufferSize"),DEFAULT_VIEWPORT_ROW_MODEL_BUFFER_SIZE)},t.prototype.calculateFirstRow=function(e){var t=this.getViewportRowModelBufferSize(),r=this.getViewportRowModelPageSize(),o=e-t;return o<0?0:Math.floor(o/r)*r},t.prototype.calculateLastRow=function(e){if(-1===e)return e;var t=this.getViewportRowModelBufferSize(),r=this.getViewportRowModelPageSize(),o=e+t,i=Math.ceil(o/r)*r,n=this.rowCount-1;return Math.min(i,n)},t.prototype.onViewportChanged=function(e){var t=this.calculateFirstRow(e.firstRow),r=this.calculateLastRow(e.lastRow);this.firstRow===t&&this.lastRow===r||(this.firstRow=t,this.lastRow=r,this.purgeRowsNotInViewport(),this.viewportDatasource&&this.viewportDatasource.setViewportRange(this.firstRow,this.lastRow))},t.prototype.purgeRowsNotInViewport=function(){var e=this;
2Object.keys(this.rowNodesByIndex).forEach(function(t){var r=parseInt(t,10);if(r<e.firstRow||r>e.lastRow){if(e.isRowFocused(r))return;delete e.rowNodesByIndex[r]}})},t.prototype.isRowFocused=function(e){var t=this.focusService.getFocusCellToUseAfterRefresh();return!!t&&null==t.rowPinned&&t.rowIndex===e},t.prototype.setViewportDatasource=function(e){this.destroyDatasource(),this.viewportDatasource=e,this.rowCount=-1,e.init?e.init({setRowCount:this.setRowCount.bind(this),setRowData:this.setRowData.bind(this),getRow:this.getRow.bind(this)}):console.warn("AG Grid: viewport is missing init method.")},t.prototype.getType=function(){return"viewport"},t.prototype.getRow=function(e){return this.rowNodesByIndex[e]||(this.rowNodesByIndex[e]=this.createBlankRowNode(e)),this.rowNodesByIndex[e]},t.prototype.getRowNode=function(e){var t;return this.forEachNode(function(r){r.id===e&&(t=r)}),t},t.prototype.getRowCount=function(){return-1===this.rowCount?0:this.rowCount},t.prototype.getRowIndexAtPixel=function(e){return 0!==this.rowHeight?Math.floor(e/this.rowHeight):0},t.prototype.getRowBounds=function(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}},t.prototype.getTopLevelRowCount=function(){return this.getRowCount()},t.prototype.getTopLevelRowDisplayedIndex=function(e){return e},t.prototype.isEmpty=function(){return this.rowCount>0},t.prototype.isRowsToRender=function(){return this.rowCount>0},t.prototype.getNodesInRangeForSelection=function(e,t){var r=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.missing(e)?0:e.rowIndex,o=t.rowIndex,i=r<this.firstRow||r>this.lastRow,n=o<this.firstRow||o>this.lastRow;if(i||n)return[];for(var a=[],s=r<=o?o:r,l=r<=o?r:o;l<=s;l++)a.push(this.rowNodesByIndex[l]);return a},t.prototype.forEachNode=function(e){var t=this,r=0;Object.keys(this.rowNodesByIndex).forEach(function(o){var i=parseInt(o,10),n=t.rowNodesByIndex[i];e(n,r),r++})},t.prototype.setRowData=function(e){var t=this;ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.iterateObject(e,function(e,r){var o=parseInt(e,10);if(o>=t.firstRow&&o<=t.lastRow){var i=t.rowNodesByIndex[o];ag_grid_community__WEBPACK_IMPORTED_MODULE_0__._.missing(i)&&(i=t.createBlankRowNode(o),t.rowNodesByIndex[o]=i),i.setDataAndId(r,o.toString())}})},t.prototype.createBlankRowNode=function(e){var t=new ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RowNode(this.beans);return t.setRowHeight(this.rowHeight),t.setRowTop(this.rowHeight*e),t.setRowIndex(e),t},t.prototype.setRowCount=function(e,t){if(void 0===t&&(t=!1),e!==this.rowCount){this.rowCount=e;var r={type:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Events.EVENT_MODEL_UPDATED,newData:!1,newPage:!1,keepRenderedRows:t,animate:!1};this.eventService.dispatchEvent(r)}},t.prototype.isRowPresent=function(e){return!!this.getRowNode(e.id)},__decorate$2([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("rowRenderer")],t.prototype,"rowRenderer",void 0),__decorate$2([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("focusService")],t.prototype,"focusService",void 0),__decorate$2([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("beans")],t.prototype,"beans",void 0),__decorate$2([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"init",null),__decorate$2([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PreDestroy],t.prototype,"destroyDatasource",null),__decorate$2([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Bean)("rowModel")],t)}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.BeanStub),ViewportRowModelModule={version:VERSION$1,moduleName:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleNames.ViewportRowModelModule,rowModel:"viewport",beans:[ViewportRowModel],dependantModules:[EnterpriseCoreModule]},defaultTooltipCss="\n.ag-sparkline-tooltip-wrapper {\n    position: absolute;\n    user-select: none;\n    pointer-events: none;\n}\n\n.ag-sparkline-tooltip {\n    position: relative;\n    font: 12px arial,sans-serif;\n    border-radius: 2px;\n    box-shadow: 0 1px 3px rgb(0 0 0 / 20%), 0 1px 1px rgb(0 0 0 / 14%);\n    line-height: 1.7em;\n    overflow: hidden;\n    white-space: nowrap;\n    z-index: 99999;\n    background-color: rgb(255, 255, 255);\n    color: rgba(0,0,0, 0.67);\n}\n\n.ag-sparkline-tooltip-content {\n    padding: 0 7px;\n    opacity: 1;\n}\n\n.ag-sparkline-tooltip-title {\n    padding-left: 7px;\n    opacity: 1;\n}\n\n.ag-sparkline-tooltip-wrapper-hidden {\n    top: -10000px !important;\n}\n\n.ag-sparkline-wrapper {\n    box-sizing: border-box;\n    overflow: hidden;\n}\n",__values=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);
2if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},extent$3=extent$4,isNumber$3=isNumber$4,isString=isString$1,isStringObject=isStringObject$1,isDate=isDate$1,createId=createId$1,Padding=Padding$1,LinearScale=LinearScale$1,BandScale$4=BandScale$5,TimeScale=TimeScale$1,ZINDICIES;!function(e){e[e.SERIES_FILL_ZINDEX=50]="SERIES_FILL_ZINDEX",e[e.AXIS_LINE_ZINDEX=500]="AXIS_LINE_ZINDEX",e[e.SERIES_STROKE_ZINDEX=1e3]="SERIES_STROKE_ZINDEX",e[e.SERIES_LABEL_ZINDEX=1500]="SERIES_LABEL_ZINDEX",e[e.CROSSHAIR_ZINDEX=2e3]="CROSSHAIR_ZINDEX",e[e.SERIES_MARKERS_ZINDEX=2500]="SERIES_MARKERS_ZINDEX"}(ZINDICIES||(ZINDICIES={}));var SparklineAxis=function(){this.type="category",this.stroke="rgb(204, 214, 235)",this.strokeWidth=1},Sparkline=function(){function e(){this.id=createId(this),this.seriesRect={x:0,y:0,width:0,height:0},this._context=void 0,this._container=void 0,this._data=void 0,this.padding=new Padding(3),this.xKey="x",this.yKey="y",this.dataType=void 0,this.xData=[],this.yData=[],this.min=void 0,this.max=void 0,this.yScale=new LinearScale,this.axis=new SparklineAxis,this.highlightStyle={size:6,fill:"yellow",stroke:"silver",strokeWidth:1},this._width=100,this._height=100,this.smallestInterval=void 0,this.layoutId=0,this.defaultDateFormatter=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}),this._onMouseMove=this.onMouseMove.bind(this),this._onMouseOut=this.onMouseOut.bind(this);var t=new Group;this.rootGroup=t;var r=document.createElement("div");r.setAttribute("class","ag-sparkline-wrapper");var o=new Scene({document});if(this.scene=o,this.canvasElement=o.canvas.element,o.root=t,o.container=r,o.resize(this.width,this.height),this.seriesRect.width=this.width,this.seriesRect.height=this.height,-1===e.tooltipDocuments.indexOf(document)){var i=document.createElement("style");i.innerHTML=defaultTooltipCss,document.head.insertBefore(i,document.head.querySelector("style")),e.tooltipDocuments.push(document)}this.setupDomEventListeners(this.scene.canvas.element)}return Object.defineProperty(e.prototype,"context",{get:function(){return this._context},set:function(e){this._context!==e&&(this._context=e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"container",{get:function(){return this._container},set:function(e){if(this._container!==e){var t=this.canvasElement.parentNode;null!=t&&t.removeChild(this.canvasElement),e&&e.appendChild(this.canvasElement),this._container=e}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"data",{get:function(){return this._data},set:function(e){this._data!==e&&(this._data=e,this.processData(),this.mouseMoveEvent&&this.highlightedDatum&&this.updateHitPoint(this.mouseMoveEvent))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this._width},set:function(e){this._width!==e&&(this._width=e,this.scene.resize(e,this.height),this.scheduleLayout())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},set:function(e){this._height!==e&&(this._height=e,this.scene.resize(this.width,e),this.scheduleLayout())},enumerable:!1,configurable:!0}),e.prototype.update=function(){},e.prototype.updateYScale=function(){this.updateYScaleRange(),this.updateYScaleDomain()},e.prototype.updateYScaleDomain=function(){},e.prototype.updateYScaleRange=function(){var e=this.yScale,t=this.seriesRect;e.range=[t.height,0]},e.prototype.updateXScale=function(){var e=this.axis.type;this.xScale=this.getXScale(e),this.updateXScaleRange(),this.updateXScaleDomain()},e.prototype.updateXScaleRange=function(){this.xScale.range=[0,this.seriesRect.width]},e.prototype.updateXScaleDomain=function(){var e,t=this.xData,r=this.xScale;(r instanceof LinearScale||r instanceof TimeScale)&&(e=extent$3(t)),this.xScale.domain=e?e.slice():t},e.prototype.getXScale=function(e){switch(void 0===e&&(e="category"),e){case"number":return new LinearScale;case"time":return new TimeScale;default:return new BandScale$4}},e.prototype.updateAxisLine=function(){},e.prototype.updateAxes=function(){this.updateYScale(),this.updateXScale(),this.updateAxisLine()},e.prototype.updateCrosshairs=function(){this.updateXCrosshairLine(),this.updateYCrosshairLine()},e.prototype.generateNodeData=function(){return[]},e.prototype.getNodeData=function(){return[]},e.prototype.updateNodes=function(){},e.prototype.updateXCrosshairLine=function(){},e.prototype.updateYCrosshairLine=function(){},e.prototype.highlightDatum=function(e){this.updateNodes()},e.prototype.dehighlightDatum=function(){this.highlightedDatum=void 0,this.updateNodes(),this.updateCrosshairs()},e.prototype.onMouseMove=function(e){this.mouseMoveEvent=e,this.updateHitPoint(e)}
2,e.prototype.updateHitPoint=function(e){var t=this.pickClosestSeriesNodeDatum(e.offsetX,e.offsetY);if(t){var r=this.highlightedDatum;this.highlightedDatum=t,(this.highlightedDatum&&!r||this.highlightedDatum&&r&&this.highlightedDatum!==r)&&(this.highlightDatum(t),this.updateCrosshairs(),this.scene.render()),this.tooltip.enabled&&this.handleTooltip(e,t)}},e.prototype.onMouseOut=function(e){this.dehighlightDatum(),this.tooltip.toggle(!1),this.scene.render()},e.prototype.processData=function(){var e=this,t=this,r=t.data,o=t.yData,i=t.xData;if(r&&!this.invalidData(this.data)){o.length=0,i.length=0;var n=r.length,a=this.getDataType(r);this.dataType=a;var s,l=this.axis.type,c="number"!==l&&"time"!==l?"category":l,u="number"===c||"time"===c,d=function(t,r){null==e.smallestInterval&&(e.smallestInterval={x:1/0,y:1/0});var o=e.smallestInterval.x,i=Math.abs(t-r);i>0&&i<o&&(e.smallestInterval.x=i)};if("number"===a)for(var p=0;p<n;p++){var h=p,_=r[p],f=this.getDatum(h,c),g=this.getDatum(_,"number");u&&d(f,s),i.push(f),o.push(g),s=f}else if("array"===a)for(p=0;p<n;p++){var y=r[p];
2if(Array.isArray(y)){if(h=y[0],_=y[1],f=this.getDatum(h,c),g=this.getDatum(_,"number"),null==f)continue;u&&d(f,s),i.push(f),o.push(g),s=f}}else if("object"===a){var m=this.yKey,v=this.xKey;for(p=0;p<n;p++)if("object"==typeof(y=r[p])&&!Array.isArray(y)){if(h=y[v],_=y[m],f=this.getDatum(h,c),g=this.getDatum(_,"number"),null==f)continue;u&&d(f,s),i.push(f),o.push(g),s=f}}this.updateAxes(),this.update(),this.scene.render()}},e.prototype.getDataType=function(e){var t,r;try{for(var o=__values(e),i=o.next();!i.done;i=o.next()){var n=i.value;if(null!=n){if(isNumber$3(n))return"number";if(Array.isArray(n))return"array";if("object"==typeof n)return"object"}}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}},e.prototype.getDatum=function(e,t){if("number"===t&&isNumber$3(e)||"time"===t&&(isNumber$3(e)||isDate(e)))return e;if("category"===t){if(isString(e)||isDate(e)||isNumber$3(e))return{toString:function(){return String(e)}};if(isStringObject(e))return e}},Object.defineProperty(e.prototype,"layoutScheduled",{get:function(){return!!this.layoutId},enumerable:!1,configurable:!0}),e.prototype.scheduleLayout=function(){var e=this;this.layoutId&&cancelAnimationFrame(this.layoutId),this.layoutId=requestAnimationFrame(function(){e.setSparklineDimensions(),e.invalidData(e.data)||(e.updateXScaleRange(),e.updateYScaleRange(),e.updateAxisLine(),e.update(),e.scene.render(),e.layoutId=0)})},e.prototype.setSparklineDimensions=function(){var e=this,t=e.width,r=e.height,o=e.padding,i=e.seriesRect,n=e.rootGroup,a=t-o.left-o.right,s=r-o.top-o.bottom;i.width=a,i.height=s,i.x=o.left,i.y=o.top,n.translationX=i.x,n.translationY=i.y},e.prototype.pickClosestSeriesNodeDatum=function(e,t){for(var r,o=1/0,i=this.rootGroup.transformPoint(e,t),n=this.getNodeData(),a=0;a<n.length;a++){var s=n[a];if(!s.point)return;var l=this.getDistance(i,s.point);l<=o&&(o=l,r=s)}return r},e.prototype.getDistance=function(e,t){return Math.abs(e.x-t.x)},e.prototype.handleTooltip=function(e,t){var r,o,i=t.seriesDatum,n=this.canvasElement,a=e.clientX,s=e.clientY;null==(null===(o=null===(r=this.processedOptions)||void 0===r?void 0:r.tooltip)||void 0===o?void 0:o.container)&&this.tooltip.container!==n&&(this.tooltip.container=n);var l={pageX:a,pageY:s},c=i.y,u=i.x,d=this.tooltip.enabled;if(this.tooltip.renderer){var p=this.tooltip.renderer({context:this.context,datum:i,yValue:c,xValue:u});d="string"!=typeof p&&void 0!==p.enabled?p.enabled:d}var h=d&&void 0!==i.y&&this.getTooltipHtml(t);h&&this.tooltip.show(l,h)},e.prototype.formatNumericDatum=function(e){return String(Math.round(10*e)/10)},e.prototype.formatDatum=function(e){var t=this.axis.type||"category";return"number"===t&&"number"==typeof e?this.formatNumericDatum(e):"time"===t&&(e instanceof Date||isNumber$3(e))?this.defaultDateFormatter.format(e):String(e)},e.prototype.setupDomEventListeners=function(e){e.addEventListener("mousemove",this._onMouseMove),e.addEventListener("mouseout",this._onMouseOut)},e.prototype.cleanupDomEventListeners=function(e){e.removeEventListener("mousemove",this._onMouseMove),e.removeEventListener("mouseout",this._onMouseOut)},e.prototype.invalidData=function(e){return!e||!Array.isArray(e)||0===e.length},e.prototype.destroy=function(){this.scene.container=void 0,this.container=void 0,this.cleanupDomEventListeners(this.scene.canvas.element)},e.tooltipDocuments=[],e}();function toTooltipHtml(e,t){if("string"==typeof e)return e;t=t||{};var r,o,i=e.content,n=void 0===i?t.content||"":i,a=e.title,s=void 0===a?t.title||void 0:a,l=e.color,c=void 0===l?t.color:l,u=e.backgroundColor,d=void 0===u?t.backgroundColor:u,p=e.opacity,h=void 0===p?t.opacity||1:p;c?(r=s?'<span class="'+SparklineTooltip.class+'-title"; style="color: '+c+'">'+s+"</span>":"",o='<span class="'+SparklineTooltip.class+'-content" style="color: '+c+'">'+n+"</span>"):(r=s?'<span class="'+SparklineTooltip.class+'-title">'+s+"</span>":"",o='<span class="'+SparklineTooltip.class+'-content">'+n+"</span>");var _="opacity: "+h;return d&&(_+="; background-color: "+d.toLowerCase()),'<div class="'+SparklineTooltip.class+'" style="'+_+'">\n                '+r+"\n                "+o+"\n            </div>"}var SparklineTooltip=function(){function e(){this.element=document.createElement("div"),this.enabled=!0,this.container=void 0,this.xOffset=10,this.yOffset=0,this.renderer=void 0,document.body.appendChild(this.element)}return e.prototype.isVisible=function(){var t=this.element;if(t.classList)return!t.classList.contains(e.class+"-wrapper-hidden");var r=t.getAttribute("class");return!!r&&r.split(" ").indexOf(e.class+"-wrapper-hidden")<0},e.prototype.updateClass=function(t){var r=[e.class+"-wrapper"];!0!==t&&r.push(e.class+"-wrapper-hidden"),this.element.setAttribute("class",r.join(" "))},e.prototype.show=function(e,t){this.toggle(!1);var r=this.element;if(void 0!==t)r.innerHTML=t;else if(!r.innerHTML)return;var o=e.pageX+this.xOffset,i=e.pageY+this.yOffset,n=r.getBoundingClientRect(),a=window.innerWidth-n.width;if(this.container){var s=this.container.getBoundingClientRect();a=s.left+(s.width-n.width)}o>a&&(o=e.pageX-r.clientWidth-this.xOffset),"undefined"!=typeof scrollX&&
2(o+=scrollX),"undefined"!=typeof scrollY&&(i+=scrollY),r.style.left=Math.round(o)+"px",r.style.top=Math.round(i)+"px",this.toggle(!0)},e.prototype.toggle=function(e){this.updateClass(e)},e.prototype.destroy=function(){var e=this.element.parentNode;e&&e.removeChild(this.element)},e.class="ag-sparkline-tooltip",e}();function getMarker(e){switch(e){case"circle":default:return Circle;case"square":return Square;case"diamond":return Diamond}}function getLineDash(e,t){void 0===t&&(t="solid");var r={solid:[],dash:[4,3],dot:[1,3],dashDot:[4,3,1,3],dashDotDot:[4,3,1,3,1,3],shortDot:[1,1],shortDash:[3,1],shortDashDot:[3,1,1,1],shortDashDotDot:[3,1,1,1,1,1],longDash:[8,3],longDashDot:[8,3,1,3],longDashDotDot:[8,3,1,3,1,3]},o={solid:[],dash:[3,3],dot:[0,3],dashDot:[3,3,0,3],dashDotDot:[3,3,0,3,0,3],shortDot:[0,2],shortDash:[2,2],shortDashDot:[2,2,0,2],shortDashDotDot:[2,2,0,2,0,2],longDash:[7,3],longDashDot:[7,3,0,3],longDashDotDot:[7,3,0,3,0,3]};return"round"===e||"square"===e?o[t]??(console.warn("'"+t+"' is not a valid 'lineDash' option."),o.solid):r[t]??(console.warn("'"+t+"' is not a valid 'lineDash' option."),r.solid)}var __extends$6=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),extent$2=extent$4,BandScale$3=BandScale$5,SparklineMarker$1=function(){this.enabled=!0,this.shape="circle",this.size=0,this.fill="rgb(124, 181, 236)",this.stroke="rgb(124, 181, 236)",this.strokeWidth=1,this.formatter=void 0},SparklineLine$1=function(){this.stroke="rgb(124, 181, 236)",this.strokeWidth=1},SparklineCrosshairs$1=function(){this.xLine={enabled:!0,stroke:"rgba(0,0,0, 0.54)",strokeWidth:1,lineDash:"solid",lineCap:void 0},this.yLine={enabled:!1,stroke:"rgba(0,0,0, 0.54)",strokeWidth:1,lineDash:"solid",lineCap:void 0}},AreaSparkline=function(e){function t(){var t=e.call(this)||this;return t.fill="rgba(124, 181, 236, 0.25)",t.strokePath=new Path,t.fillPath=new Path,t.xCrosshairLine=new Line,t.yCrosshairLine=new Line,t.areaSparklineGroup=new Group,t.xAxisLine=new Line,t.markers=new Group,t.markerSelection=Selection.select(t.markers,function(){return t.markerFactory()}),t.markerSelectionData=[],t.marker=new SparklineMarker$1,t.line=new SparklineLine$1,t.crosshairs=new SparklineCrosshairs$1,t.rootGroup.append(t.areaSparklineGroup),t.xAxisLine.zIndex=ZINDICIES.AXIS_LINE_ZINDEX,t.fillPath.zIndex=ZINDICIES.SERIES_FILL_ZINDEX,t.strokePath.zIndex=ZINDICIES.SERIES_STROKE_ZINDEX,t.xCrosshairLine.zIndex=ZINDICIES.CROSSHAIR_ZINDEX,t.yCrosshairLine.zIndex=ZINDICIES.CROSSHAIR_ZINDEX,t.markers.zIndex=ZINDICIES.SERIES_MARKERS_ZINDEX,t.areaSparklineGroup.append([t.fillPath,t.xAxisLine,t.strokePath,t.xCrosshairLine,t.yCrosshairLine,t.markers]),t}return __extends$6(t,e),t.prototype.markerFactory=function(){return new(getMarker(this.marker.shape))},t.prototype.getNodeData=function(){return this.markerSelectionData},t.prototype.update=function(){var e=this.generateNodeData();if(e){var t=e.nodeData,r=e.fillData,o=e.strokeData;this.markerSelectionData=t,this.updateSelection(t),this.updateNodes(),this.updateStroke(o),this.updateFill(r)}},t.prototype.updateYScaleDomain=function(){var e=this.yData,t=this.yScale,r=extent$2(e),o=0,i=1;void 0!==r&&(o=this.min=r[0],i=this.max=r[1]),o=o<0?o:0,i=i<0?0:i,t.domain=[o,i]},t.prototype.generateNodeData=function(){var e=this,t=e.data,r=e.yData,o=e.xData,i=e.xScale,n=e.yScale;if(t){for(var a,s,l,c,u=!(i instanceof BandScale$3),d=u?0:i.bandwidth/2,p=r.length,h=[],_=[],f=[],g=n.convert(0),y=0;y<p;y++){var m=r[y],v=o[y],E=i.convert(u?i.toDomain(v):v)+d,C=void 0===m?NaN:n.convert(m);y+1<p&&(c=i.convert(u?i.toDomain(o[y+1]):o[y+1])+d),f.push({seriesDatum:{x:v,y:m},point:{x:E,y:C}}),void 0===m&&void 0!==l?(_.push({seriesDatum:void 0,point:{x:l,y:g}}),void 0!==c&&_.push({seriesDatum:void 0,point:{x:c,y:g}})):void 0!==m&&(_.push({seriesDatum:{x:v,y:m},point:{x:E,y:C}}),h.push({seriesDatum:{x:v,y:m},point:{x:E,y:C}}),a=void 0!==a?a:E,s=E),l=E}return _.push({seriesDatum:void 0,point:{x:s,y:g}},{seriesDatum:void 0,point:{x:a,y:g}}),{nodeData:h,fillData:_,strokeData:f}}},t.prototype.updateAxisLine=function(){var e=this,t=e.xScale,r=e.yScale,o=e.axis,i=e.xAxisLine;i.x1=t.range[0],i.x2=t.range[1],i.y1=i.y2=0,i.stroke=o.stroke,i.strokeWidth=o.strokeWidth;var n=r.convert(0);i.translationY=n},t.prototype.updateSelection=function(e){this.markerSelection.update(e)},t.prototype.updateNodes=function(){var e=this,t=this,r=t.highlightedDatum,o=t.highlightStyle,i=t.marker,n=o.size,a=o.fill,s=o.stroke,l=o.strokeWidth,c=i.formatter;this.markerSelection.each(function(t,o,u){var d=o.point,p=o.seriesDatum;if(d){var h,_=o===r,f=_&&void 0!==a?a:i.fill,g=_&&void 0!==s?s:i.stroke,y=_&&void 0!==l?l:i.strokeWidth,m=_&&void 0!==n?n:i.size;if(c){var v=0===u,E=u===e.markerSelectionData.length-1,C=p.y===e.min,O=p.y===e.max;h=c({datum:o,xValue:p.x,yValue:p.y,min:C,max:O,first:v,last:E,fill:f,stroke:g,strokeWidth:y,size:m,highlighted:_})}t.size=h&&null!=h.size?h.size:m,t.fill=h&&null!=h.fill?h.fill:f,t.stroke=h&&null!=h.stroke?h.stroke:g,t.strokeWidth=h&&null!=h.strokeWidth?h.strokeWidth:y,t.translationX=d.x,t.translationY=d.y,t.visible=h&&null!=h.enabled?h.enabled:i.enabled&&t.size>0}})},t.prototype.updateStroke=function(e){var t=this,r=t.strokePath,o=t.yData,i=t.line;if(!(o.length<2)){var n=r.path,a=e.length,s=!0;n.clear();for(var l=0;l<a;l++){var c=e[l],u=c.point,d=c.seriesDatum,p=u.x,h=u.y;null==d.y?s=!0:s?(n.moveTo(p,h),s=!1):n.lineTo(p,h)}r.lineJoin=r.lineCap="round",r.fill=void 0,r.stroke=i.stroke,r.strokeWidth=i.strokeWidth}},t.prototype.updateFill=function(e){var t=this,r=t.fillPath,o=t.yData,i=t.fill,n=r.path,a=e.length;if(n.clear(),!(o.length<2)){for(var s=0;s<a;s++){var l=e[s].point,c=l.x,u=l.y;s>0?n.lineTo(c,u):n.moveTo(c,u)}n.closePath(),r.lineJoin="round",r.stroke=void 0,r.fill=i}},t.prototype.updateXCrosshairLine=function(){var e=this,t=e.yScale,r=e.xCrosshairLine,o=e.highlightedDatum,i=e.crosshairs.xLine;if(i.enabled&&null!=o){r.y1=t.range[0],r.y2=t.range[1],r.x1=r.x2=0,r.stroke=i.stroke,r.strokeWidth=i.strokeWidth||1,r.lineCap="round"===i.lineCap||"square"===i.lineCap?i.lineCap:void 0;var n=i.lineDash;r.lineDash=Array.isArray(n)?n:getLineDash(r.lineCap,i.lineDash),r.translationX=o.point.x}else r.strokeWidth=0},t.prototype.updateYCrosshairLine=function(){var e=this,t=e.xScale,r=e.yCrosshairLine,o=e.highlightedDatum,i=e.crosshairs.yLine;if(i.enabled&&null!=o){r.x1=t.range[0],r.x2=t.range[1],r.y1=r.y2=0,r.stroke=i.stroke,r.strokeWidth=i.strokeWidth||1,r.lineCap="round"===i.lineCap||"square"===i.lineCap?i.lineCap:void 0;var n=i.lineDash;r.lineDash=Array.isArray(n)?n:getLineDash(r.lineCap,i.lineDash),r.translationY=o.point.y}else r.strokeWidth=0},t.prototype.getTooltipHtml=function(e){var t=this.dataType,r=e.seriesDatum,o=r.y,i=r.x,n={content:this.formatNumericDatum(o),title:"array"===t||"object"===t?this.formatDatum(i):void 0};return this.tooltip.renderer?toTooltipHtml(this.tooltip.renderer({context:this.context,datum:r,yValue:o,xValue:i}),n):toTooltipHtml(n)},t.className="AreaSparkline",t}(Sparkline),__extends$5=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),extent$1=extent$4,BandScale$2=BandScale$5,SparklineMarker=function(){this.enabled=!0,this.shape="circle",this.size=0,this.fill="rgb(124, 181, 236)",this.stroke="rgb(124, 181, 236)",this.strokeWidth=1,this.formatter=void 0},SparklineLine=function(){this.stroke="rgb(124, 181, 236)",this.strokeWidth=1},SparklineCrosshairs=function(){this.xLine={enabled:!0,stroke:"rgba(0,0,0, 0.54)",
2strokeWidth:1,lineDash:"solid",lineCap:void 0},this.yLine={enabled:!1,stroke:"rgba(0,0,0, 0.54)",strokeWidth:1,lineDash:"solid",lineCap:void 0}},LineSparkline=function(e){function t(){var t=e.call(this)||this;return t.linePath=new Path,t.xCrosshairLine=new Line,t.yCrosshairLine=new Line,t.lineSparklineGroup=new Group,t.markers=new Group,t.markerSelection=Selection.select(t.markers,function(){return t.markerFactory()}),t.markerSelectionData=[],t.marker=new SparklineMarker,t.line=new SparklineLine,t.crosshairs=new SparklineCrosshairs,t.rootGroup.append(t.lineSparklineGroup),t.linePath.zIndex=ZINDICIES.SERIES_STROKE_ZINDEX,t.xCrosshairLine.zIndex=ZINDICIES.CROSSHAIR_ZINDEX,t.yCrosshairLine.zIndex=ZINDICIES.CROSSHAIR_ZINDEX,t.markers.zIndex=ZINDICIES.SERIES_MARKERS_ZINDEX,t.lineSparklineGroup.append([t.linePath,t.xCrosshairLine,t.yCrosshairLine,t.markers]),t}return __extends$5(t,e),t.prototype.getNodeData=function(){return this.markerSelectionData},t.prototype.markerFactory=function(){return new(getMarker(this.marker.shape))},t.prototype.onMarkerShapeChange=function(){this.markerSelection=this.markerSelection.clear(),this.scheduleLayout()},t.prototype.update=function(){var e=this.generateNodeData();e&&(this.markerSelectionData=e,this.updateSelection(e),this.updateNodes(),this.updateLine())},t.prototype.updateYScaleDomain=function(){var e=this.yData,t=this.yScale,r=extent$1(e),o=0,i=1;if(void 0!==r&&(o=this.min=r[0],i=this.max=r[1]),o===i){var n=Math.abs(.01*o);o-=n,i+=n}t.domain=[o,i]},t.prototype.generateNodeData=function(){var e=this,t=e.data,r=e.yData,o=e.xData,i=e.xScale,n=e.yScale;if(t){for(var a=!(i instanceof BandScale$2),s=a?0:i.bandwidth/2,l=[],c=0;c<r.length;c++){var u=r[c],d=o[c];if(null!=u){var p=i.convert(a?i.toDomain(d):d)+s,h=void 0===u?NaN:n.convert(u);l.push({seriesDatum:{x:d,y:u},point:{x:p,y:h}})}}return l}},t.prototype.updateSelection=function(e){this.markerSelection.update(e)},t.prototype.updateNodes=function(){var e=this,t=this,r=t.highlightedDatum,o=t.highlightStyle,i=t.marker,n=o.size,a=o.fill,s=o.stroke,l=o.strokeWidth,c=i.formatter;this.markerSelection.each(function(t,o,u){var d,p=o===r,h=p&&void 0!==a?a:i.fill,_=p&&void 0!==s?s:i.stroke,f=p&&void 0!==l?l:i.strokeWidth,g=p&&void 0!==n?n:i.size,y=o.seriesDatum,m=o.point;if(c){var v=0===u,E=u===e.markerSelectionData.length-1,C=y.y===e.min,O=y.y===e.max;d=c({datum:o,xValue:y.x,yValue:y.y,min:C,max:O,first:v,last:E,fill:h,stroke:_,strokeWidth:f,size:g,highlighted:p})}t.size=d&&null!=d.size?d.size:g,t.fill=d&&null!=d.fill?d.fill:h,t.stroke=d&&null!=d.stroke?d.stroke:_,t.strokeWidth=d&&null!=d.strokeWidth?d.strokeWidth:f,t.translationX=m.x,t.translationY=m.y,t.visible=d&&null!=d.enabled?d.enabled:i.enabled&&t.size>0})},t.prototype.updateLine=function(){var e=this,t=e.linePath,r=e.yData,o=e.xData,i=e.xScale,n=e.yScale,a=e.line;if(!(r.length<2)){var s=!(i instanceof BandScale$2),l=t.path,c=r.length,u=s?0:i.bandwidth/2,d=!0;l.clear();for(var p=0;p<c;p++){var h=o[p],_=r[p],f=i.convert(s?i.toDomain(h):h)+u,g=void 0===_?NaN:n.convert(_);null==_?d=!0:d?(l.moveTo(f,g),d=!1):l.lineTo(f,g)}t.fill=void 0,t.stroke=a.stroke,t.strokeWidth=a.strokeWidth}},t.prototype.updateXCrosshairLine=function(){var e=this,t=e.yScale,r=e.xCrosshairLine,o=e.highlightedDatum,i=e.crosshairs.xLine;if(i.enabled&&null!=o){r.y1=t.range[0],r.y2=t.range[1],r.x1=r.x2=0,r.stroke=i.stroke,r.strokeWidth=i.strokeWidth||1,r.lineCap="round"===i.lineCap||"square"===i.lineCap?i.lineCap:void 0;var n=i.lineDash;r.lineDash=Array.isArray(n)?n:getLineDash(r.lineCap,i.lineDash),r.translationX=o.point.x}else r.strokeWidth=0},t.prototype.updateYCrosshairLine=function(){var e=this,t=e.xScale,r=e.yCrosshairLine,o=e.highlightedDatum,i=e.crosshairs.yLine;if(i.enabled&&null!=o){r.x1=t.range[0],r.x2=t.range[1],r.y1=r.y2=0,r.stroke=i.stroke,r.strokeWidth=i.strokeWidth||1,r.lineCap="round"===i.lineCap||"square"===i.lineCap?i.lineCap:void 0;var n=i.lineDash;r.lineDash=Array.isArray(n)?n:getLineDash(r.lineCap,i.lineDash),r.translationY=o.point.y}else r.strokeWidth=0},t.prototype.getTooltipHtml=function(e){var t=this.dataType,r=e.seriesDatum,o=r.y,i=r.x,n={content:this.formatNumericDatum(o),title:"array"===t||"object"===t?this.formatDatum(i):void 0};return this.tooltip.renderer?toTooltipHtml(this.tooltip.renderer({context:this.context,datum:r,yValue:o,xValue:i}),n):toTooltipHtml(n)},t.className="LineSparkline",t}(Sparkline),Label=function(){this.enabled=!0,this.fontSize=8,this.fontFamily="Verdana, sans-serif",this.fontStyle=void 0,this.fontWeight=void 0,this.color="rgba(70, 70, 70, 1)"},__extends$4=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),extent=extent$4,BarColumnNodeTag,BarColumnLabelPlacement;!function(e){e[e.Rect=0]="Rect",e[e.Label=1]="Label"}(BarColumnNodeTag||(BarColumnNodeTag={})),function(e){e.InsideBase="insideBase",e.InsideEnd="insideEnd",e.Center="center",e.OutsideEnd="outsideEnd"}(BarColumnLabelPlacement||(BarColumnLabelPlacement={}));var BarColumnLabel=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.formatter=void 0,t.placement=BarColumnLabelPlacement.InsideEnd,t}return __extends$4(t,e),t}(Label),BarColumnSparkline=function(e){function t(){var t=e.call(this)||this;return t.fill="rgb(124, 181, 236)",t.stroke="silver",t.strokeWidth=0,t.paddingInner=.1,t.paddingOuter=.2,t.valueAxisDomain=void 0,t.formatter=void 0,t.axisLine=new Line,t.bandWidth=0,t.sparklineGroup=new Group,t.rectGroup=new Group,t.labelGroup=new Group,t.rectSelection=Selection.select(t.rectGroup,Rect),t.labelSelection=Selection.select(t.labelGroup,Text),t.nodeSelectionData=[],t.label=new BarColumnLabel,t.rootGroup.append(t.sparklineGroup),t.rectGroup.zIndex=ZINDICIES.SERIES_FILL_ZINDEX,t.axisLine.zIndex=ZINDICIES.AXIS_LINE_ZINDEX,t.labelGroup.zIndex=ZINDICIES.SERIES_LABEL_ZINDEX,t.sparklineGroup.append([t.rectGroup,t.axisLine,t.labelGroup]),t.axisLine.lineCap="round",t.label.enabled=!1,t}return __extends$4(t,e),t.prototype.getNodeData=function(){return this.nodeSelectionData},t.prototype.update=function(){this.updateSelections(),this.updateNodes()},t.prototype.updateSelections=function(){var e=this.generateNodeData();e&&(this.nodeSelectionData=e,this.updateRectSelection(e),this.updateLabelSelection(e))},t.prototype.updateNodes=function(){this.updateRectNodes(),this.updateLabelNodes()},t.prototype.calculateStep=function(e){var t,r=this,o=r.xScale,i=r.paddingInner,n=r.paddingOuter,a=r.smallestInterval,s=(o.domain[1]-o.domain[0])/(null!==(t=null==a?void 0:a.x)&&void 0!==t?t:1)+1,l=Math.min(s,50),c=l-1;return e/Math.max(1,2*n+c*i+l)},t.prototype.updateYScaleDomain=function(){var e=this,t=e.yScale,r=e.yData,o=e.valueAxisDomain,i=extent(r),n=0,a=1;void 0!==i&&(n=this.min=i[0],a=this.max=i[1]),n=n<0?n:0,a=a<0?0:a,o&&(o[1]<a&&(o[1]=a),o[0]>n&&(o[0]=n)),t.domain=o||[n,a]},t.prototype.updateRectSelection=function(e){this.rectSelection.update(e)},t.prototype.updateRectNodes=function(){var e=this,t=this,r=t.highlightedDatum,o=t.formatter,i=t.fill,n=t.stroke,a=t.strokeWidth,s=this.highlightStyle,l=s.fill,c=s.stroke,u=s.strokeWidth;this.rectSelection.each(function(t,s,d){var p,h=s===r,_=h&&void 0!==l?l:i,f=h&&void 0!==c?c:n,g=h&&void 0!==u?u:a,y=s.x,m=s.y,v=s.width,E=s.height,C=s.seriesDatum;if(o){var O=0===d,P=d===e.nodeSelectionData.length-1,S=C.y===e.min,b=C.y===e.max;p=o({datum:s,xValue:C.x,yValue:C.y,width:v,height:E,min:S,max:b,first:O,last:P,fill:_,stroke:f,strokeWidth:g,highlighted:h})}t.fill=p&&p.fill||_,t.stroke=p&&p.stroke||f,t.strokeWidth=p&&p.strokeWidth||g,t.x=t.y=0,t.width=v,t.height=E,t.visible=t.height>0,t.translationX=y,t.translationY=m})},t.prototype.updateLabelSelection=function(e){this.labelSelection.update(e,function(e){e.tag=BarColumnNodeTag.Label,e.pointerEvents=PointerEvents.None})},t.prototype.updateLabelNodes=function(){var e=this.label,t=e.enabled,r=e.fontStyle,o=e.fontWeight,i=e.fontSize,n=e.fontFamily,a=e.color;this.labelSelection.each(function(e,s){var l=s.label;l&&t?(e.fontStyle=r,e.fontWeight=o,e.fontSize=i,e.fontFamily=n,e.textAlign=l.textAlign,e.textBaseline=l.textBaseline,e.text=l.text,e.x=l.x,e.y=l.y,e.fill=a,e.visible=!0):e.visible=!1})},t.prototype.getTooltipHtml=function(e){var t=this.dataType,r=e.seriesDatum,o=r.y,i=r.x,n={content:this.formatNumericDatum(o),title:"array"===t||"object"===t?this.formatDatum(i):void 0};return this.tooltip.renderer?toTooltipHtml(this.tooltip.renderer({context:this.context,datum:r,yValue:o,xValue:i}),n):toTooltipHtml(n)},t.prototype.formatLabelValue=function(e){return e%1!=0?e.toFixed(1):e.toFixed(0)},t}(Sparkline),__extends$3=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),isNumber$2=isNumber$4,BandScale$1=BandScale$5,BarSparkline=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$3(t,e),t.prototype.updateYScaleRange=function(){var e=this.seriesRect;this.yScale.range=[0,e.width]},t.prototype.updateXScaleRange=function(){var e=this,t=e.xScale,r=e.seriesRect,o=e.paddingOuter,i=e.paddingInner;if(t instanceof BandScale$1)t.range=[0,r.height],t.paddingInner=i,t.paddingOuter=o;else{var n=this.calculateStep(r.height),a=n*o;this.bandWidth=n*(1-i),t.range=[a,r.height-a-this.bandWidth]}},t.prototype.updateAxisLine=function(){var e=this,t=e.yScale,r=e.axis,o=e.axisLine,i=e.seriesRect,n=r.strokeWidth;o.x1=0,o.x2=0,o.y1=0,o.y2=i.height,o.stroke=r.stroke,o.strokeWidth=n+(n%2==1?1:0);var a=t.convert(0);o.translationX=a},t.prototype.generateNodeData=function(){var e=this,t=e.data,r=e.yData,o=e.xData,i=e.xScale,n=e.yScale,a=e.fill,s=e.stroke,l=e.strokeWidth,c=e.label;if(t){for(var u=c.fontStyle,d=c.fontWeight,p=c.fontSize,h=c.fontFamily,_=c.color,f=c.formatter,g=c.placement,y=[],m=n.convert(0),v=!(i instanceof BandScale$1),E=0,C=r.length;E<C;E++){var O=r[E],P=o[E],S=void 0===O;S&&(O=0);var b,D=i.convert(v?i.toDomain(P):P),M=Math.min(void 0===O?NaN:n.convert(O),m),T=Math.max(void 0===O?NaN:n.convert(O),m),A=v?this.bandWidth:i.bandwidth,x=T-M,w={x:m,y:D};b=f?f({value:O}):void 0!==O&&isNumber$2(O)?this.formatLabelValue(O):"";var R=D+A/2,I=void 0,L=void 0,N=void 0!==O&&O>=0;if(g===BarColumnLabelPlacement.Center)I=M+x/2,L="center";else if(g===BarColumnLabelPlacement.OutsideEnd)I=M+(N?x+4:-4),L=N?"start":"end";else if(g===BarColumnLabelPlacement.InsideEnd){I=M+(N?x-4:4),L=N?"end":"start";var k=HdpiCanvas.getTextSize(b,h).width||20;(N&&I<m+k||!N&&I>m-k)&&(I=m+4*(N?1:-1),L=N?"start":"end")}else I=m+4*(N?1:-1),L=N?"start":"end";y.push({x:M,y:D,width:x,height:A,fill:a,stroke:s,strokeWidth:l,seriesDatum:{x:P,y:S?void 0:O},point:w,label:{x:I,y:R,text:b,fontStyle:u,fontWeight:d,fontSize:p,fontFamily:h,textAlign:L,textBaseline:"middle",fill:_}})}return y}},t.prototype.getDistance=function(e,t){return Math.abs(e.y-t.y)},t.className="BarSparkline",t}(BarColumnSparkline),__extends$2=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),isNumber$1=isNumber$4,BandScale=BandScale$5,ColumnSparkline=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$2(t,e),t.prototype.updateYScaleRange=function(){var e=this.seriesRect;this.yScale.range=[e.height,0]},t.prototype.updateXScaleRange=function(){var e=this,t=e.xScale,r=e.seriesRect,o=e.paddingOuter,i=e.paddingInner;if(t instanceof BandScale)t.range=[0,r.width],t.paddingInner=i,t.paddingOuter=o;else{var n=this.calculateStep(r.width),a=n*o;this.bandWidth=n*(1-i),t.range=[a,r.width-a-this.bandWidth]}},t.prototype.updateAxisLine=function(){var e=this,t=e.yScale,r=e.axis,o=e.axisLine,i=e.seriesRect,n=r.strokeWidth;o.x1=0,o.x2=i.width,o.y1=0,o.y2=0,o.stroke=r.stroke,o.strokeWidth=n+(n%2==1?1:0);var a=t.convert(0);o.translationY=a},t.prototype.generateNodeData=function(){var e=this,t=e.data,r=e.yData,o=e.xData,i=e.xScale,n=e.yScale,a=e.fill,s=e.stroke,l=e.strokeWidth,c=e.label;if(t){for(var u=c.fontStyle,d=c.fontWeight,p=c.fontSize,h=c.fontFamily,_=c.color,f=c.formatter,g=c.placement,y=[],m=n.convert(0),v=!(i instanceof BandScale),E=0,C=r.length;E<C;E++){var O=r[E],P=o[E],S=void 0===O;S&&(O=0);var b,D=Math.min(void 0===O?NaN:n.convert(O),m),M=i.convert(v?i.toDomain(P):P),T=Math.max(void 0===O?NaN:n.convert(O),m),A=v?this.bandWidth:i.bandwidth,x=T-D,w={x:M+A/2,y:m};b=f?f({value:O}):void 0!==O&&isNumber$1(O)?this.formatLabelValue(O):"";var R=M+A/2,I=void 0,L=void 0,N=void 0!==O&&O>=0;if(g===BarColumnLabelPlacement.Center)I=D+x/2,L="middle";else if(g===BarColumnLabelPlacement.OutsideEnd)I=D+(N?-2:x+2),L=N?"bottom":"top";else if(g===BarColumnLabelPlacement.InsideEnd){I=D+(N?2:x-2),L=N?"top":"bottom";var k=HdpiCanvas.getTextSize(b,h).height||10;(N&&I>m-k||!N&&I<m+k)&&(I=m+2*(N?-1:1),L=N?"bottom":"top")}else I=m+2*(N?-1:1),L=N?"bottom":"top";y.push({x:M,y:D,width:A,height:x,fill:a,stroke:s,strokeWidth:l,seriesDatum:{x:P,y:S?void 0:O},point:w,label:{x:R,y:I,text:b,fontStyle:u,fontWeight:d,fontSize:p,fontFamily:h,textAlign:"center",textBaseline:L,fill:_}})}return y}},t.className="ColumnSparkline",t}(BarColumnSparkline),isNumber=isNumber$4,AgSparkline=function(){function e(){}return e.create=function(e,t){var r=getSparklineInstance((e=jsonMerge([e])).type);return t&&(r.tooltip=t),initSparkline(r,e),initSparklineByType(r,e),e.data&&(r.data=e.data),r.processedOptions=e,r},e}();function getSparklineInstance(e){switch(void 0===e&&(e="line"),e){case"column":return new ColumnSparkline;case"bar":return new BarSparkline;case"area":return new AreaSparkline;default:return new LineSparkline}}function initSparklineByType(e,t){switch(t.type){case"bar":case"column":initBarColumnSparkline(e,t);break;case"area":initAreaSparkline(e,t);break;default:initLineSparkline(e,t)}}function initSparkline(e,t){setValueIfPropertyExists(e,"context",t.context,t),setValueIfPropertyExists(e,"width",t.width,t),setValueIfPropertyExists(e,"height",t.height,t),setValueIfPropertyExists(e,"container",t.container,t),setValueIfPropertyExists(e,"xKey",t.xKey,t),setValueIfPropertyExists(e,"yKey",t.yKey,t),t.padding&&initPaddingOptions(e.padding,t.padding),t.axis&&initAxisOptions(e.axis,t.axis),t.highlightStyle&&initHighlightStyleOptions(e.highlightStyle,t.highlightStyle),t.tooltip&&e.tooltip&&initTooltipOptions(e.tooltip,t.tooltip)}function initLineSparkline(e,t){t.marker&&initMarkerOptions(e.marker,t.marker),t.line&&initLineOptions(e.line,t.line),t.crosshairs&&initCrosshairsOptions(e.crosshairs,t.crosshairs)}function initAreaSparkline(e,t){setValueIfPropertyExists(e,"fill",t.fill,t),t.marker&&initMarkerOptions(e.marker,t.marker),t.line&&initLineOptions(e.line,t.line),t.crosshairs&&initCrosshairsOptions(e.crosshairs,t.crosshairs)}function initBarColumnSparkline(e,t){setValueIfPropertyExists(e,"valueAxisDomain",t.valueAxisDomain,t),setValueIfPropertyExists(e,"fill",t.fill,t),setValueIfPropertyExists(e,"stroke",t.stroke,t),setValueIfPropertyExists(e,"strokeWidth",t.strokeWidth,t),setValueIfPropertyExists(e,"paddingInner",t.paddingInner,t),setValueIfPropertyExists(e,"paddingOuter",t.paddingOuter,t),setValueIfPropertyExists(e,"formatter",t.formatter,t),t.label&&initLabelOptions(e.label,t.label)}function initPaddingOptions(e,t){setValueIfPropertyExists(e,"top",t.top,t),setValueIfPropertyExists(e,"right",t.right,t),setValueIfPropertyExists(e,"bottom",t.bottom,t),setValueIfPropertyExists(e,"left",t.left,t)}function initMarkerOptions(e,t){setValueIfPropertyExists(e,"enabled",t.enabled,t),setValueIfPropertyExists(e,"size",t.size,t),setValueIfPropertyExists(e,"shape",t.shape,t),setValueIfPropertyExists(e,"fill",t.fill,t),setValueIfPropertyExists(e,"stroke",t.stroke,t),setValueIfPropertyExists(e,"
2strokeWidth",t.strokeWidth,t),setValueIfPropertyExists(e,"formatter",t.formatter,t)}function initLabelOptions(e,t){setValueIfPropertyExists(e,"enabled",t.enabled,t),setValueIfPropertyExists(e,"fontStyle",t.fontStyle,t),setValueIfPropertyExists(e,"fontWeight",t.fontWeight,t),setValueIfPropertyExists(e,"fontSize",t.fontSize,t),setValueIfPropertyExists(e,"fontFamily",t.fontFamily,t),setValueIfPropertyExists(e,"textAlign",t.textAlign,t),setValueIfPropertyExists(e,"textBaseline",t.textBaseline,t),setValueIfPropertyExists(e,"color",t.color,t),setValueIfPropertyExists(e,"formatter",t.formatter,t),setValueIfPropertyExists(e,"placement",t.placement,t)}function initLineOptions(e,t){setValueIfPropertyExists(e,"stroke",t.stroke,t),setValueIfPropertyExists(e,"strokeWidth",t.strokeWidth,t)}function initAxisOptions(e,t){setValueIfPropertyExists(e,"type",t.type,t),setValueIfPropertyExists(e,"stroke",t.stroke,t),setValueIfPropertyExists(e,"strokeWidth",t.strokeWidth,t)}function initHighlightStyleOptions(e,t){setValueIfPropertyExists(e,"fill",t.fill,t),setValueIfPropertyExists(e,"size",t.size,t),setValueIfPropertyExists(e,"stroke",t.stroke,t),setValueIfPropertyExists(e,"strokeWidth",t.strokeWidth,t)}function initTooltipOptions(e,t){setValueIfPropertyExists(e,"enabled",t.enabled,t),setValueIfPropertyExists(e,"container",t.container,t),setValueIfPropertyExists(e,"xOffset",t.xOffset,t),setValueIfPropertyExists(e,"yOffset",t.yOffset,t),setValueIfPropertyExists(e,"renderer",t.renderer,t)}function initCrosshairsOptions(e,t){e.xLine&&t.xLine&&initCrosshairLineOptions(e.xLine,t.xLine),e.yLine&&t.yLine&&initCrosshairLineOptions(e.yLine,t.yLine)}function initCrosshairLineOptions(e,t){setValueIfPropertyExists(e,"enabled",t.enabled,t),setValueIfPropertyExists(e,"stroke",t.stroke,t),setValueIfPropertyExists(e,"strokeWidth",t.strokeWidth,t),setValueIfPropertyExists(e,"lineDash",t.lineDash,t),setValueIfPropertyExists(e,"lineCap",t.lineCap,t)}var doOnceFlags={};function doOnce(e,t){doOnceFlags[t]||(e(),doOnceFlags[t]=!0)}var offsetValidator=function(e,t,r){if(isNumber(t))return!0;var o="AG Charts: "+e+" must be a number, the value you provided is not a valid number. Using the default of "+r+"px.";return doOnce(function(){return console.warn(o)},e+" not a number"),!1},validators={xOffset:offsetValidator,yOffset:offsetValidator};function setValueIfPropertyExists(e,t,r,o){if(t in o)if(t in e){var i=validators[t];(!i||i(t,r,e[t]))&&e[t]!==r&&(e[t]=r)}else console.warn("Property "+t+" does not exist on the target object.")}var __extends$1=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__assign=function(){return __assign=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign.apply(this,arguments)},__decorate$1=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},SparklineCellRenderer=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return __extends$1(t,e),t.prototype.init=function(e){var t=this,r=!0,o=this.resizeObserverService.observeResize(this.getGui(),function(){var o=t.getGui(),i=o.clientWidth,n=o.clientHeight;if(0!==i&&0!==n)if(r){var a=__assign({data:e.value,width:i,height:n,context:{data:e.data}},e.sparklineOptions);t.sparkline=AgSparkline.create(a,t.sparklineTooltipSingleton.getSparklineTooltip()),t.eSparkline.appendChild(t.sparkline.canvasElement),r=!1}else t.sparkline.width=i,t.sparkline.height=n});this.addDestroyFunc(function(){return o()})},t.prototype.refresh=function(e){return!!this.sparkline&&(this.sparkline.data=e.value,!0)},t.prototype.destroy=function(){this.sparkline&&this.sparkline.destroy(),e.prototype.destroy.call(this)},t.TEMPLATE='<div class="ag-sparkline-wrapper">
2\n            <span ref="eSparkline"></span>\n        </div>',__decorate$1([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.RefSelector)("eSparkline")],t.prototype,"eSparkline",void 0),__decorate$1([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("resizeObserverService")],t.prototype,"resizeObserverService",void 0),__decorate$1([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Autowired)("sparklineTooltipSingleton")],t.prototype,"sparklineTooltipSingleton",void 0),t}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Component),__extends=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),__decorate=function(e,t,r,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},SparklineTooltipSingleton=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.postConstruct=function(){this.tooltip=new SparklineTooltip},t.prototype.getSparklineTooltip=function(){return this.tooltip},t.prototype.destroyTooltip=function(){this.tooltip&&this.tooltip.destroy()},__decorate([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PostConstruct],t.prototype,"postConstruct",null),__decorate([ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.PreDestroy],t.prototype,"destroyTooltip",null),__decorate([(0,ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.Bean)("sparklineTooltipSingleton")],t)}(ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.BeanStub),VERSION="29.2.0",SparklinesModule={version:VERSION,moduleName:ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleNames.SparklinesModule,beans:[SparklineTooltipSingleton],userComponents:[{componentName:"agSparklineCellRenderer",componentClass:SparklineCellRenderer}],dependantModules:[EnterpriseCoreModule]},AllEnterpriseModules=[ClipboardModule,ColumnsToolPanelModule,ExcelExportModule,FiltersToolPanelModule,GridChartsModule,MasterDetailModule,MenuModule,MultiFilterModule,RangeSelectionModule,RichSelectModule,RowGroupingModule,ServerSideRowModelModule,SetFilterModule,SideBarModule,StatusBarModule,ViewportRowModelModule,SparklinesModule],AllModules=ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.AllCommunityModules.concat(AllEnterpriseModules);ag_grid_community__WEBPACK_IMPORTED_MODULE_0__.ModuleRegistry.registerModules(AllEnterpriseModules)}}]);

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.