apexcharts 8.2.0 → 8.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -7
- package/dist/apexcharts.common.js +2 -2
- package/dist/apexcharts.core.js +19793 -19713
- package/dist/apexcharts.core.min.js +2 -2
- package/dist/apexcharts.css +38 -8
- package/dist/apexcharts.esm.js +1882 -1625
- package/dist/apexcharts.full.js +22044 -21634
- package/dist/apexcharts.full.min.js +2 -2
- package/dist/apexcharts.js +21414 -21124
- package/dist/apexcharts.min.js +2 -2
- package/dist/apexcharts.ssr.common.js +2 -2
- package/dist/apexcharts.ssr.esm.js +21413 -21123
- package/dist/area.common.js +2 -2
- package/dist/area.esm.js +91 -40
- package/dist/bar.common.js +2 -2
- package/dist/bar.esm.js +478 -406
- package/dist/bar.js +2 -2
- package/dist/boxPlot.common.js +2 -2
- package/dist/boxPlot.esm.js +409 -334
- package/dist/bubble.common.js +2 -2
- package/dist/bubble.esm.js +91 -40
- package/dist/candlestick.common.js +2 -2
- package/dist/candlestick.esm.js +409 -334
- package/dist/candlestick.js +2 -2
- package/dist/column.common.js +2 -2
- package/dist/column.esm.js +478 -406
- package/dist/core.common.js +2 -2
- package/dist/core.esm.js +19793 -19713
- package/dist/donut.common.js +2 -2
- package/dist/donut.esm.js +3 -9
- package/dist/dumbbell.common.js +2 -2
- package/dist/dumbbell.esm.js +478 -406
- package/dist/features/all.common.js +2 -2
- package/dist/features/all.esm.js +442 -324
- package/dist/features/annotations.common.js +2 -2
- package/dist/features/annotations.esm.js +65 -48
- package/dist/features/annotations.js +2 -2
- package/dist/features/context-menu.common.js +1 -1
- package/dist/features/context-menu.esm.js +1 -1
- package/dist/features/context-menu.js +1 -1
- package/dist/features/drilldown.common.js +2 -2
- package/dist/features/drilldown.esm.js +4 -2
- package/dist/features/drilldown.js +2 -2
- package/dist/features/dumbbell.common.js +1 -1
- package/dist/features/dumbbell.esm.js +1 -1
- package/dist/features/dumbbell.js +1 -1
- package/dist/features/exports.common.js +2 -2
- package/dist/features/exports.esm.js +10 -4
- package/dist/features/exports.js +2 -2
- package/dist/features/facet.common.js +1 -1
- package/dist/features/facet.esm.js +1 -1
- package/dist/features/facet.js +1 -1
- package/dist/features/highlight-filter.common.js +2 -2
- package/dist/features/highlight-filter.esm.js +14 -9
- package/dist/features/highlight-filter.js +2 -2
- package/dist/features/history.common.js +1 -1
- package/dist/features/history.esm.js +1 -1
- package/dist/features/history.js +1 -1
- package/dist/features/ink.common.js +1 -1
- package/dist/features/ink.esm.js +1 -1
- package/dist/features/ink.js +1 -1
- package/dist/features/keyboard.common.js +2 -2
- package/dist/features/keyboard.esm.js +97 -145
- package/dist/features/keyboard.js +2 -2
- package/dist/features/legend.common.js +2 -2
- package/dist/features/legend.esm.js +64 -44
- package/dist/features/legend.js +2 -2
- package/dist/features/link.common.js +1 -1
- package/dist/features/link.esm.js +1 -1
- package/dist/features/link.js +1 -1
- package/dist/features/marks.common.js +1 -1
- package/dist/features/marks.esm.js +1 -1
- package/dist/features/marks.js +1 -1
- package/dist/features/measure.common.js +1 -1
- package/dist/features/measure.esm.js +1 -1
- package/dist/features/measure.js +1 -1
- package/dist/features/morph.common.js +2 -2
- package/dist/features/morph.esm.js +9 -5
- package/dist/features/morph.js +2 -2
- package/dist/features/perspectives.common.js +2 -2
- package/dist/features/perspectives.esm.js +4 -1
- package/dist/features/perspectives.js +2 -2
- package/dist/features/raincloud.common.js +2 -2
- package/dist/features/raincloud.esm.js +26 -27
- package/dist/features/raincloud.js +2 -2
- package/dist/features/renderer-canvas.common.js +2 -2
- package/dist/features/renderer-canvas.esm.js +2 -1
- package/dist/features/renderer-canvas.js +2 -2
- package/dist/features/stats.common.js +2 -2
- package/dist/features/stats.esm.js +52 -59
- package/dist/features/stats.js +2 -2
- package/dist/features/storyboard.common.js +2 -2
- package/dist/features/storyboard.esm.js +4 -1
- package/dist/features/storyboard.js +2 -2
- package/dist/features/streamgraph.common.js +2 -2
- package/dist/features/streamgraph.esm.js +48 -14
- package/dist/features/streamgraph.js +2 -2
- package/dist/features/toolbar.common.js +2 -2
- package/dist/features/toolbar.esm.js +148 -18
- package/dist/features/toolbar.js +2 -2
- package/dist/features/trellis.common.js +2 -2
- package/dist/features/trellis.esm.js +150 -63
- package/dist/features/trellis.js +2 -2
- package/dist/features/waterfall.common.js +1 -1
- package/dist/features/waterfall.esm.js +1 -1
- package/dist/features/waterfall.js +1 -1
- package/dist/features/weave.common.js +2 -2
- package/dist/features/weave.esm.js +13 -12
- package/dist/features/weave.js +2 -2
- package/dist/full.common.js +2 -2
- package/dist/full.esm.js +1068 -842
- package/dist/heatmap.common.js +2 -2
- package/dist/heatmap.esm.js +3 -17
- package/dist/heatmap.js +2 -2
- package/dist/histogram.common.js +2 -2
- package/dist/histogram.esm.js +529 -464
- package/dist/icicle.common.js +2 -2
- package/dist/icicle.esm.js +80 -46
- package/dist/icicle.js +2 -2
- package/dist/line.common.js +2 -2
- package/dist/line.esm.js +91 -40
- package/dist/line.js +2 -2
- package/dist/locales/en.json +2 -1
- package/dist/locales/ro.json +3 -2
- package/dist/pictograms.common.js +1 -1
- package/dist/pictograms.esm.js +1 -1
- package/dist/pictograms.js +1 -1
- package/dist/pie.common.js +2 -2
- package/dist/pie.esm.js +3 -9
- package/dist/pie.js +2 -2
- package/dist/polarArea.common.js +2 -2
- package/dist/polarArea.esm.js +3 -9
- package/dist/radar.common.js +2 -2
- package/dist/radar.esm.js +5 -4
- package/dist/radar.js +2 -2
- package/dist/radialBar.common.js +2 -2
- package/dist/radialBar.esm.js +5 -12
- package/dist/radialBar.js +2 -2
- package/dist/raincloud.common.js +2 -2
- package/dist/raincloud.esm.js +97 -52
- package/dist/rangeArea.common.js +2 -2
- package/dist/rangeArea.esm.js +91 -40
- package/dist/rangeBar.common.js +2 -2
- package/dist/rangeBar.esm.js +478 -406
- package/dist/scatter.common.js +2 -2
- package/dist/scatter.esm.js +91 -40
- package/dist/streamgraph.common.js +2 -2
- package/dist/streamgraph.esm.js +138 -53
- package/dist/sunburst.common.js +2 -2
- package/dist/sunburst.esm.js +116 -94
- package/dist/sunburst.js +2 -2
- package/dist/treemap.common.js +2 -2
- package/dist/treemap.esm.js +138 -104
- package/dist/treemap.js +2 -2
- package/dist/unit-shapes.common.js +1 -1
- package/dist/unit-shapes.esm.js +1 -1
- package/dist/unit-shapes.js +1 -1
- package/dist/unit.common.js +2 -2
- package/dist/unit.esm.js +280 -202
- package/dist/unit.js +2 -2
- package/dist/violin.common.js +2 -2
- package/dist/violin.esm.js +72 -26
- package/dist/violin.js +2 -2
- package/dist/waterfall.common.js +2 -2
- package/dist/waterfall.esm.js +477 -405
- package/package.json +1 -1
- package/src/apexcharts.js +40 -59
- package/src/assets/apexcharts.css +38 -8
- package/src/charts/Bar.js +62 -55
- package/src/charts/BarStacked.js +80 -88
- package/src/charts/BoxCandleStick.js +28 -31
- package/src/charts/Icicle.js +68 -47
- package/src/charts/Line.js +118 -42
- package/src/charts/Pie.js +2 -8
- package/src/charts/Radar.js +5 -7
- package/src/charts/Radial.js +2 -6
- package/src/charts/RangeBar.js +47 -43
- package/src/charts/Sunburst.js +101 -98
- package/src/charts/Treemap.js +150 -88
- package/src/charts/Unit.js +368 -250
- package/src/charts/Violin.js +48 -30
- package/src/charts/common/Breadcrumb.js +2 -2
- package/src/charts/common/Hierarchy.js +32 -11
- package/src/charts/common/Jitter.js +32 -7
- package/src/charts/common/Stats.js +30 -23
- package/src/charts/common/bar/DataLabels.js +76 -81
- package/src/charts/common/bar/Helpers.js +43 -7
- package/src/charts/common/line/Helpers.js +12 -15
- package/src/charts/common/partition/NodeTooltip.js +29 -7
- package/src/charts/common/partition/Partition.js +33 -1
- package/src/charts/common/treemap/Helpers.js +3 -11
- package/src/charts/common/treemap/Nested.js +2 -3
- package/src/features/raincloud.js +16 -10
- package/src/features/stats.js +67 -62
- package/src/locales/en.json +2 -1
- package/src/locales/ro.json +3 -2
- package/src/modules/Animations.js +102 -95
- package/src/modules/AxisMapping.js +47 -12
- package/src/modules/Core.js +4 -0
- package/src/modules/CoreUtils.js +18 -42
- package/src/modules/Data.js +23 -24
- package/src/modules/DataLabels.js +6 -6
- package/src/modules/Exports.js +12 -5
- package/src/modules/Fill.js +17 -8
- package/src/modules/Filters.js +50 -50
- package/src/modules/Graphics.js +69 -51
- package/src/modules/Markers.js +3 -1
- package/src/modules/MorphTypeChange.js +13 -7
- package/src/modules/Range.js +44 -29
- package/src/modules/RendererController.js +17 -3
- package/src/modules/Scales.js +32 -9
- package/src/modules/Series.js +41 -19
- package/src/modules/Theme.js +1 -1
- package/src/modules/Toolbar.js +3 -2
- package/src/modules/UnitMarkRegistry.js +0 -5
- package/src/modules/ZoomPanSelection.js +123 -2
- package/src/modules/accessibility/KeyboardNavigation.js +114 -186
- package/src/modules/animations/Easing.js +2 -1
- package/src/modules/animations/LengthTransition.js +22 -2
- package/src/modules/annotations/Helpers.js +68 -52
- package/src/modules/axes/Grid.js +21 -7
- package/src/modules/axes/YAxis.js +8 -9
- package/src/modules/dimensions/Dimensions.js +9 -3
- package/src/modules/dimensions/Grid.js +2 -2
- package/src/modules/dimensions/XAxis.js +2 -5
- package/src/modules/drilldown/Breadcrumb.js +5 -2
- package/src/modules/helpers/Destroy.js +1 -1
- package/src/modules/helpers/UpdateHelpers.js +33 -15
- package/src/modules/highlightFilter/HighlightFilter.js +8 -9
- package/src/modules/highlightFilter/TreemapPart.js +2 -2
- package/src/modules/legend/HeatmapGradientLegend.js +76 -45
- package/src/modules/legend/Helpers.js +8 -1
- package/src/modules/legend/Legend.js +11 -12
- package/src/modules/license/LicenseEnforcer.js +5 -0
- package/src/modules/settings/Defaults.js +28 -56
- package/src/modules/settings/Globals.js +5 -0
- package/src/modules/settings/Options.js +7 -7
- package/src/modules/settings/TypeAliases.js +33 -16
- package/src/modules/streamgraph/StreamLabels.js +1 -0
- package/src/modules/tooltip/Labels.js +73 -76
- package/src/modules/tooltip/Marker.js +25 -21
- package/src/modules/tooltip/Position.js +88 -51
- package/src/modules/tooltip/Tooltip.js +242 -255
- package/src/modules/tooltip/Utils.js +71 -130
- package/src/modules/tooltip/constants.js +5 -5
- package/src/modules/trellis/Trellis.js +6 -0
- package/src/modules/trellis/TrellisChrome.js +18 -7
- package/src/modules/trellis/TrellisSync.js +2 -0
- package/src/modules/trellis/TrellisTooltip.js +2 -11
- package/src/modules/weave/WeaveHost.js +18 -12
- package/src/renderers/canvas/CanvasGraphics.js +1 -0
- package/src/ssr/DOMShim.js +10 -0
- package/src/svg/SVGFilter.js +26 -17
- package/src/types/internal.d.ts +9 -3
- package/src/utils/Utils.js +0 -14
- package/types/apexcharts.d.ts +33 -12
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ApexCharts v8.
|
|
2
|
+
* ApexCharts v8.3.1
|
|
3
3
|
* (c) 2018-2026 ApexCharts
|
|
4
4
|
*/
|
|
5
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).ApexCharts=e()}(this,function(){"use strict";var t=Object.defineProperty,e=Object.defineProperties,i=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,o=(e,i,s)=>i in e?t(e,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[i]=s,n=(t,e)=>{for(var i in e||(e={}))a.call(e,i)&&o(t,i,e[i]);if(s)for(var i of s(e))r.call(e,i)&&o(t,i,e[i]);return t},l=(t,s)=>e(t,i(s)),c=(t,e)=>{var i={};for(var o in t)a.call(t,o)&&e.indexOf(o)<0&&(i[o]=t[o]);if(null!=t&&s)for(var o of s(t))e.indexOf(o)<0&&r.call(t,o)&&(i[o]=t[o]);return i},h=(t,e,i)=>o(t,"symbol"!=typeof e?e+"":e,i);class d{static isSSR(){return"undefined"==typeof window||"undefined"==typeof document}static isBrowser(){return!this.isSSR()}static hasAPI(t){return!this.isSSR()&&void 0!==window[t]}static getApex(){return"undefined"!=typeof window&&window.Apex?window.Apex:"undefined"!=typeof global&&global.Apex?global.Apex:{}}}const p=t=>String(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");class u{constructor(t,e=null){this.nodeName=t,this.namespaceURI=e,this.attributes=new Map,this.children=[],this._text="",this._rawHTML=!1,this.style={},this.classList=new g,this.parentNode=null,this._ssrWidth=void 0,this._ssrHeight=void 0,this._ssrMode=void 0}setAttribute(t,e){this.attributes.set(t,e)}getAttribute(t){return this.attributes.get(t)}removeAttribute(t){this.attributes.delete(t)}hasAttribute(t){return this.attributes.has(t)}appendChild(t){if(t&&t!==this){if(t.parentNode&&t.parentNode!==this)t.parentNode.removeChild(t);else if(t.parentNode===this){const e=this.children.indexOf(t);-1!==e&&this.children.splice(e,1)}t.parentNode=this,this.children.push(t)}return t}removeChild(t){const e=this.children.indexOf(t);return-1!==e&&(this.children.splice(e,1),t.parentNode=null),t}insertBefore(t,e){if(!e)return this.appendChild(t);if(t.parentNode&&t.parentNode!==this)t.parentNode.removeChild(t);else if(t.parentNode===this){const e=this.children.indexOf(t);-1!==e&&this.children.splice(e,1)}const i=this.children.indexOf(e);return-1!==i&&(t.parentNode=this,this.children.splice(i,0,t)),t}cloneNode(t=!1){const e=new this.constructor(this.nodeName,this.namespaceURI);return e._text=this._text,e._rawHTML=this._rawHTML,this.attributes.forEach((t,i)=>{e.attributes.set(i,t)}),Object.assign(e.style,this.style),t&&this.children.forEach(t=>{t.cloneNode&&e.appendChild(t.cloneNode(!0))}),e}getBoundingClientRect(){return{width:this._ssrWidth||0,height:this._ssrHeight||0,top:0,left:0,right:this._ssrWidth||0,bottom:this._ssrHeight||0,x:0,y:0}}getBBox(){if("text"!==this.nodeName&&"tspan"!==this.nodeName)return{x:0,y:0,width:0,height:0};const t=this._textLines(),e=t.reduce((t,e)=>Math.max(t,e.length),0);if(!e)return{x:0,y:0,width:0,height:0};const i=parseFloat(this.attributes.get("font-size"))||11,s=e*i*.55,a=1.167*i+(t.length-1)*i*1.1,r=this.attributes.get("text-anchor"),o=parseFloat(this.attributes.get("x"))||0;return{x:"middle"===r?o-s/2:"end"===r?o-s:o,y:(parseFloat(this.attributes.get("y"))||0)-.917*i,width:s,height:a}}_textLines(){var t;const e=this.children.filter(t=>"tspan"===t.nodeName);return e.length?e.map(t=>{var e;return String(null!=(e=t.textContent)?e:"")}):[String(null!=(t=this.textContent)?t:"")]}getRootNode(){let t=this;for(;t.parentNode;)t=t.parentNode;return t}querySelector(){return null}querySelectorAll(){return[]}getElementsByClassName(){return[]}addEventListener(){}removeEventListener(){}get childNodes(){return this.children}toString(){let t="";if(this.attributes.forEach((e,i)=>{t+=` ${i}="${(t=>p(t).replace(/"/g,"""))(e)}"`}),0===this.children.length&&!this._text)return`<${this.nodeName}${t}/>`;const e=this._rawHTML?this._text:p(this._text),i=this.children.map(t=>t.toString()).join("");return`<${this.nodeName}${t}>${e}${i}</${this.nodeName}>`}get textContent(){return this._text}set textContent(t){this._text=t,this._rawHTML=!1}get innerHTML(){return this.children.map(t=>t.toString()).join("")}set innerHTML(t){this.children=[],this._text=t,this._rawHTML=!0}get outerHTML(){return this.toString()}get isConnected(){return!0}}class g{constructor(){this.classes=new Set}add(...t){t.forEach(t=>this.classes.add(t))}remove(...t){t.forEach(t=>this.classes.delete(t))}contains(t){return this.classes.has(t)}toggle(t,e){return!0===e?(this.classes.add(t),!0):!1===e||this.classes.has(t)?(this.classes.delete(t),!1):(this.classes.add(t),!0)}toString(){return Array.from(this.classes).join(" ")}}class x{createElementNS(t,e){return new u(e,t)}createTextNode(t){const e={nodeName:"#text",nodeType:3,textContent:t,toString:()=>p(e.textContent)};return e}getBoundingClientRect(t){return t&&t.getBoundingClientRect?t.getBoundingClientRect():{width:0,height:0,top:0,left:0,right:0,bottom:0,x:0,y:0}}createXMLSerializer(){return{serializeToString:t=>t.toString?t.toString():""}}createDOMParser(){return{parseFromString(t,e){const i=new u("root");return i.innerHTML=t,{documentElement:i}}}}}let f=null,m=null,b=null;class y{static init(t){!d.isSSR()||!t&&f||(f=t||new x)}static createElement(t){return d.isSSR()?(f||this.init(),f.createElementNS(null,t)):document.createElement(t)}static createElementNS(t,e){return d.isSSR()?(f||this.init(),f.createElementNS(t,e)):document.createElementNS(t,e)}static createTextNode(t){return d.isSSR()?(f||this.init(),f.createTextNode(t)):document.createTextNode(t)}static querySelector(t){return d.isSSR()?null:document.querySelector(t)}static querySelectorAll(t){return d.isSSR()?[]:document.querySelectorAll(t)}static getComputedStyle(t){return d.isSSR()?{}:window.getComputedStyle(t)}static matchMedia(t){if(d.isSSR()||"function"!=typeof window.matchMedia)return null;try{return window.matchMedia(t)}catch(t){return null}}static getBoundingClientRect(t){return d.isSSR()?(f||this.init(),f.getBoundingClientRect(t)):t?t.getBoundingClientRect():{width:0,height:0,top:0,left:0,right:0,bottom:0,x:0,y:0}}static getXMLSerializer(){return d.isSSR()?(f||this.init(),m||(m=f.createXMLSerializer()),m):(m||(m=new XMLSerializer),m)}static getDOMParser(){return d.isSSR()?(f||this.init(),b||(b=f.createDOMParser()),b):(b||(b=new DOMParser),b)}static addWindowEventListener(t,e,i){d.isBrowser()&&window.addEventListener(t,e,i)}static removeWindowEventListener(t,e,i){d.isBrowser()&&window.removeEventListener(t,e,i)}static requestAnimationFrame(t){return d.isBrowser()?window.requestAnimationFrame(t):(t(0),null)}static cancelAnimationFrame(t){d.isBrowser()&&t&&window.cancelAnimationFrame(t)}static elementExists(t){return!!t&&(d.isSSR()?!0===t._ssrMode||void 0!==t.nodeName:!!t.getRootNode&&(t.getRootNode({composed:!0})===document||t.isConnected))}static getWindow(){return d.isBrowser()?window:null}static getDocument(){return d.isBrowser()?document:null}static _getShim(){return f}static _resetShim(){f=null,m=null,b=null}}const v=new WeakMap;let w=0,A=class t{static isObject(t){return t&&"object"==typeof t&&!Array.isArray(t)}static is(t,e){return Object.prototype.toString.call(e)==="[object "+t+"]"}static isSafari(){return d.isBrowser()&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}static extend(t,e){if(!this.isObject(t)&&this.isObject(e))return this.clone(e);const i=Object.assign({},t);return this.isObject(t)&&this.isObject(e)&&Object.keys(e).forEach(s=>{this.isObject(e[s])?s in t?i[s]=this.extend(t[s],e[s]):Object.assign(i,{[s]:e[s]}):Object.assign(i,{[s]:e[s]})}),i}static copySeriesShallow(t){return Array.isArray(t)?t.map(t=>this.isObject(t)?n({},t):t):t}static extendArray(e,i){const s=[];return e.map(e=>{s.push(t.extend(i,e))}),e=s}static clone(t,e=new WeakMap){if(null===t||"object"!=typeof t)return t;if(e.has(t))return e.get(t);let i;if(Array.isArray(t)){i=[],e.set(t,i);for(let s=0;s<t.length;s++)i[s]=this.clone(t[s],e)}else if(t instanceof Date)i=new Date(t.getTime());else{i={},e.set(t,i);for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(i[s]=this.clone(t[s],e))}return i}static stringifyForCompare(t){return JSON.stringify(t,(t,e)=>{if("function"!=typeof e)return e;let i=v.get(e);return void 0===i&&(i=++w,v.set(e,i)),`__apx_fn_${i}`})}static shallowEqual(t,e){if(t===e)return!0;if(!t||!e)return!1;if("object"!=typeof t||"object"!=typeof e)return t===e;const i=Object.keys(t),s=Object.keys(e);if(i.length!==s.length)return!1;for(const s of i)if(t[s]!==e[s])return!1;return!0}static parseNumber(t){return"number"==typeof t||null===t?t:parseFloat(t)}static stripNumber(t,e=2){return Number.isInteger(t)?t:parseFloat(t.toPrecision(e))}static randomId(){return(Math.random()+1).toString(36).substring(4)}static noExponents(t){return t.toString().includes("e")?Math.round(t):t}static decimalPlaces(t){const[e,i]=String(t).split("e"),s=e.indexOf(".");return Math.max(0,(s<0?0:e.length-s-1)-(+i||0))}static elementExists(t){return!(!t||!t.isConnected)}static getDimensions(t){if(!t)return[0,0];if(d.isSSR())return[t._ssrWidth||400,t._ssrHeight||300];let e;try{e=getComputedStyle(t,null)}catch(e){return[t.clientWidth||0,t.clientHeight||0]}let i=t.clientWidth,s=t.clientHeight;if(!i||!s){const e=t.getBoundingClientRect();i=i||e.width,s=s||e.height}return s-=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),i-=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight),[i,s]}static getBoundingClientRect(t){if(!t)return{top:0,right:0,bottom:0,left:0,width:0,height:0,x:0,y:0};if(d.isSSR())return y.getBoundingClientRect(t);const e=t.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:t.clientWidth,height:t.clientHeight,x:e.left,y:e.top}}static getLargestStringFromArr(t){const e=(t,i)=>(Array.isArray(i)&&(i=i.reduce(e,"")),String(t).length>String(i).length?t:i);return t.length?t.reduce(e,""):0}static hexToRgba(e="#999999",i=.6){const s=t.parseColor("#"===e[0]?e:"#999999");return s?"rgba("+s[0]+","+s[1]+","+s[2]+","+i*s[3]+")":e}static parseColor(t){const e=/^#([\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$/i.exec(t);if(e){let t=e[1];return t.length<5&&(t=t.replace(/./g,"$&$&")),[0,2,4,6].map(e=>e<t.length?parseInt(t.substr(e,2),16)/(e>4?255:1):1)}const i=/^rgba?\(/i.test(t)&&t.match(/[\d.]+/g);return i?[+i[0],+i[1],+i[2],i[3]?+i[3]:1]:null}static getOpacityFromRGBA(t){return parseFloat(t.replace(/^.*,(.+)\)/,"$1"))}static parseHex(t){if("string"!=typeof t)return null;let e=t.trim().replace("#","");return 3===e.length&&(e=e.split("").map(t=>t+t).join("")),/^[0-9a-fA-F]{6}$/.test(e)?[parseInt(e.slice(0,2),16),parseInt(e.slice(2,4),16),parseInt(e.slice(4,6),16)]:null}static relativeLuminance([t,e,i]){const s=t=>{const e=t/255;return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)};return.2126*s(t)+.7152*s(e)+.0722*s(i)}static getContrastRatio(e,i){const s=t.parseHex(e),a=t.parseHex(i);if(!s||!a)return 0;const r=t.relativeLuminance(s),o=t.relativeLuminance(a);return(Math.max(r,o)+.05)/(Math.min(r,o)+.05)}static rgb2hex(t){return(t=t.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===t.length?"#"+("0"+parseInt(t[1],10).toString(16)).slice(-2)+("0"+parseInt(t[2],10).toString(16)).slice(-2)+("0"+parseInt(t[3],10).toString(16)).slice(-2):""}shadeColor(e,i){const s=t.parseColor(i)||t.parseColor(t.resolveColor(i));if(!s)return i;const a=e<0?0:255;e=Math.abs(e);for(let t=0;t<3;t++)s[t]+=Math.round((a-s[t])*e);const r=s.pop();return"#"===i[0]?"#"+s.concat(r<1?Math.round(255*r):[]).map(t=>(256|t).toString(16).slice(1)).join(""):(r<1?"rgba(":"rgb(")+s.concat(r<1?r:[]).join(",")+")"}static resolveColor(t,e){if(d.isSSR())return t;const i=document.createElement("div");if(i.style.cssText="position:fixed;left:-9999px;visibility:hidden",i.style.color=t,!i.style.color)return t;(e||document.body).appendChild(i);try{return window.getComputedStyle(i).color}finally{i.remove()}}static isColorHex(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)|(^#[0-9A-F]{8}$)/i.test(t)}static isCSSVariable(t){if("string"!=typeof t)return!1;const e=t.trim();return e.startsWith("var(")&&e.endsWith(")")}static getThemeColor(e,i){return t.isCSSVariable(e)?t.resolveColor(e,i):e}static applyOpacityToColor(t,e){const i=Number(e);if(!Number.isFinite(i))return t;if(i<=0)return"transparent";if(i>=1)return t;return`color-mix(in srgb, ${t} ${Math.round(100*i)}%, transparent)`}static getPolygonPos(t,e){const i=[],s=2*Math.PI/e;for(let a=0;a<e;a++){const e={};e.x=t*Math.sin(a*s),e.y=-t*Math.cos(a*s),i.push(e)}return i}static polarToCartesian(t,e,i,s){const a=(s-90)*Math.PI/180;return{x:t+i*Math.cos(a),y:e+i*Math.sin(a)}}static escapeString(t,e="x"){let i=t.toString().slice();return i=i.replace(/[` ~!@#$%^&*()|+=?;:'",.<>{}[\]\\/]/gi,e),i}static negToZero(t){return t<0?0:t}static moveIndexInArray(t,e,i){if(i>=t.length){let e=i-t.length+1;for(;e--;)t.push(void 0)}return t.splice(i,0,t.splice(e,1)[0]),t}static findAncestor(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}static setELstyles(t,e){for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t.style[i]=e[i])}static preciseAddition(t,e){const i=(String(t).split(".")[1]||"").length,s=(String(e).split(".")[1]||"").length,a=Math.pow(10,Math.max(i,s));return(Math.round(t*a)+Math.round(e*a))/a}static isNumber(t){return!isNaN(t)&&parseFloat(String(Number(t)))===t&&!isNaN(parseInt(t,10))}static isFloat(t){return Number(t)===t&&t%1!=0}static editDistance(t,e,i){if(Math.abs(t.length-e.length)>i)return i+1;let s=Array.from({length:e.length+1},(t,e)=>e);for(let a=1;a<=t.length;a++){const r=[a];let o=a;for(let i=1;i<=e.length;i++)r[i]=Math.min(s[i]+1,r[i-1]+1,s[i-1]+(t[a-1]===e[i-1]?0:1)),r[i]<o&&(o=r[i]);if(o>i)return i+1;s=r}return s[e.length]}static nearestName(e,i){const s=String(e).trim().toLowerCase(),a=s.length>4?2:1;let r="",o=a+1;return i.forEach(e=>{const i=t.editDistance(s,e.toLowerCase(),a);i<o&&(o=i,r=e)}),o<=a?r:""}static isMsEdge(){if(d.isSSR())return!1;const t=window.navigator.userAgent,e=t.indexOf("Edge/");return e>0&&parseInt(t.substring(e+5,t.indexOf(".",e)),10)}static getGCD(t,e,i=7){let s=Math.pow(10,i-Math.floor(Math.log10(Math.max(t,e))));for(s>1?(t=Math.round(Math.abs(t)*s),e=Math.round(Math.abs(e)*s)):s=1;e;){const i=e;e=t%e,t=i}return t/s}static getPrimeFactors(t){const e=[];if(t=Math.round(Math.abs(t)),!Number.isFinite(t))return e;for(let i=2;i*i<=t;i++)for(;t%i===0;)e.push(i),t/=i;return t>=2&&e.push(t),e}static mod(t,e,i=7){const s=Math.pow(10,i-Math.floor(Math.log10(Math.max(t,e))));return(t=Math.round(Math.abs(t)*s))%(e=Math.round(Math.abs(e)*s))/s}};class S{constructor(t){this.w=t}isValidDate(t){return"number"!=typeof t&&!isNaN(this.parseDate(t))}getTimeStamp(t){if(isNaN(Date.parse(t)))return t;return this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(t).toISOString().substr(0,25)).getTime():new Date(t).getTime()}getDate(t){return new Date(t)}parseDate(t){const e=Date.parse(t);if(!isNaN(e))return this.getTimeStamp(t);if("string"!=typeof t)return NaN;let i=Date.parse(t.replace(/-/g,"/").replace(/[a-z]+/gi," "));return i=this.getTimeStamp(i),i}formatDate(t,e){const i=this.w.globals.locale,s=this.w.config.xaxis.labels.datetimeUTC,a=["\0",...i.months],r=["\x01",...i.shortMonths],o=["\x02",...i.days],n=["\x03",...i.shortDays];function l(t,e=2){let i=t+"";for(;i.length<e;)i="0"+i;return i}const c=s?t.getUTCFullYear():t.getFullYear();e=(e=(e=e.replace(/(^|[^\\])yyyy+/g,"$1"+c)).replace(/(^|[^\\])yy/g,"$1"+c.toString().substr(2,2))).replace(/(^|[^\\])y/g,"$1"+c);const h=(s?t.getUTCMonth():t.getMonth())+1;e=(e=(e=(e=e.replace(/(^|[^\\])MMMM+/g,"$1"+a[0])).replace(/(^|[^\\])MMM/g,"$1"+r[0])).replace(/(^|[^\\])MM/g,"$1"+l(h))).replace(/(^|[^\\])M/g,"$1"+h);const d=s?t.getUTCDate():t.getDate();e=(e=(e=(e=e.replace(/(^|[^\\])dddd+/g,"$1"+o[0])).replace(/(^|[^\\])ddd/g,"$1"+n[0])).replace(/(^|[^\\])dd/g,"$1"+l(d))).replace(/(^|[^\\])d/g,"$1"+d);const p=s?t.getUTCHours():t.getHours(),u=p>12?p-12:0===p?12:p;e=(e=(e=(e=e.replace(/(^|[^\\])HH+/g,"$1"+l(p))).replace(/(^|[^\\])H/g,"$1"+p)).replace(/(^|[^\\])hh+/g,"$1"+l(u))).replace(/(^|[^\\])h/g,"$1"+u);const g=s?t.getUTCMinutes():t.getMinutes();e=(e=e.replace(/(^|[^\\])mm+/g,"$1"+l(g))).replace(/(^|[^\\])m/g,"$1"+g);const x=s?t.getUTCSeconds():t.getSeconds();e=(e=e.replace(/(^|[^\\])ss+/g,"$1"+l(x))).replace(/(^|[^\\])s/g,"$1"+x);let f=s?t.getUTCMilliseconds():t.getMilliseconds();e=e.replace(/(^|[^\\])fff+/g,"$1"+l(f,3)),f=Math.round(f/10),e=e.replace(/(^|[^\\])ff/g,"$1"+l(f)),f=Math.round(f/10);const m=p<12?"AM":"PM";e=(e=(e=e.replace(/(^|[^\\])f/g,"$1"+f)).replace(/(^|[^\\])TT+/g,"$1"+m)).replace(/(^|[^\\])T/g,"$1"+m.charAt(0));const b=m.toLowerCase();e=(e=e.replace(/(^|[^\\])tt+/g,"$1"+b)).replace(/(^|[^\\])t/g,"$1"+b.charAt(0));let y=-t.getTimezoneOffset(),v=s||!y?"Z":y>0?"+":"-";if(!s){y=Math.abs(y);const t=y%60;v+=l(Math.floor(y/60))+":"+l(t)}e=e.replace(/(^|[^\\])K/g,"$1"+v);const w=(s?t.getUTCDay():t.getDay())+1;return e=(e=(e=(e=(e=e.replace(new RegExp(o[0],"g"),o[w])).replace(new RegExp(n[0],"g"),n[w])).replace(new RegExp(a[0],"g"),a[h])).replace(new RegExp(r[0],"g"),r[h])).replace(/\\(.)/g,"$1")}getDateFields(t,e){const i=new Date(t);return e?{year:i.getUTCFullYear(),month:i.getUTCMonth(),date:i.getUTCDate(),hour:i.getUTCHours(),minute:i.getUTCMinutes(),second:i.getUTCSeconds(),ms:i.getUTCMilliseconds(),weekday:i.getUTCDay()}:{year:i.getFullYear(),month:i.getMonth(),date:i.getDate(),hour:i.getHours(),minute:i.getMinutes(),second:i.getSeconds(),ms:i.getMilliseconds(),weekday:i.getDay()}}addInterval(t,e,i,s){const a=new Date(t);if(s)switch(e){case"year":a.setUTCFullYear(a.getUTCFullYear()+i);break;case"month":a.setUTCMonth(a.getUTCMonth()+i);break;case"week":a.setUTCDate(a.getUTCDate()+7*i);break;case"day":a.setUTCDate(a.getUTCDate()+i);break;case"hour":a.setUTCHours(a.getUTCHours()+i);break;case"minute":a.setUTCMinutes(a.getUTCMinutes()+i);break;case"second":a.setUTCSeconds(a.getUTCSeconds()+i)}else switch(e){case"year":a.setFullYear(a.getFullYear()+i);break;case"month":a.setMonth(a.getMonth()+i);break;case"week":a.setDate(a.getDate()+7*i);break;case"day":a.setDate(a.getDate()+i);break;case"hour":a.setHours(a.getHours()+i);break;case"minute":a.setMinutes(a.getMinutes()+i);break;case"second":a.setSeconds(a.getSeconds()+i)}return a.getTime()}ceilToBoundary(t,e,i,s){const a=new Date(t);if(s)switch(e){case"second":{const e=a.getUTCSeconds(),s=Math.ceil(e/i)*i;return s===e&&0===a.getUTCMilliseconds()?t:(a.setUTCMilliseconds(0),a.setUTCSeconds(s),a.getTime())}case"minute":{const e=a.getUTCMinutes(),s=Math.ceil(e/i)*i;return s===e&&0===a.getUTCSeconds()&&0===a.getUTCMilliseconds()?t:(a.setUTCMilliseconds(0),a.setUTCSeconds(0),a.setUTCMinutes(s),a.getTime())}case"hour":{const e=a.getUTCHours(),s=Math.ceil(e/i)*i;return s===e&&0===a.getUTCMinutes()&&0===a.getUTCSeconds()&&0===a.getUTCMilliseconds()?t:(a.setUTCMilliseconds(0),a.setUTCSeconds(0),a.setUTCMinutes(0),a.setUTCHours(s),a.getTime())}case"day":return 0===a.getUTCHours()&&0===a.getUTCMinutes()&&0===a.getUTCSeconds()&&0===a.getUTCMilliseconds()?t:(a.setUTCMilliseconds(0),a.setUTCSeconds(0),a.setUTCMinutes(0),a.setUTCHours(0),a.setUTCDate(a.getUTCDate()+1),a.getTime());case"week":{const e=6048e5,s=Date.UTC(1970,0,5);a.setUTCMilliseconds(0),a.setUTCSeconds(0),a.setUTCMinutes(0),a.setUTCHours(0);const r=a.getTime(),o=Math.ceil((r-s)/e),n=s+Math.ceil(o/i)*i*e;return n>=t?n:n+i*e}case"month":{const e=a.getUTCMonth(),s=Math.ceil(e/i)*i;return s===e&&1===a.getUTCDate()&&0===a.getUTCHours()&&0===a.getUTCMinutes()&&0===a.getUTCSeconds()&&0===a.getUTCMilliseconds()?t:(a.setUTCMilliseconds(0),a.setUTCSeconds(0),a.setUTCMinutes(0),a.setUTCHours(0),a.setUTCDate(1),a.setUTCMonth(s),a.getTime())}case"year":{const e=a.getUTCFullYear(),s=Math.ceil(e/i)*i;return s===e&&0===a.getUTCMonth()&&1===a.getUTCDate()&&0===a.getUTCHours()&&0===a.getUTCMinutes()&&0===a.getUTCSeconds()&&0===a.getUTCMilliseconds()?t:Date.UTC(s,0,1)}}else switch(e){case"second":{const e=a.getSeconds(),s=Math.ceil(e/i)*i;if(s===e&&0===a.getMilliseconds())return t;a.setMilliseconds(0),a.setSeconds(s);break}case"minute":{const e=a.getMinutes(),s=Math.ceil(e/i)*i;if(s===e&&0===a.getSeconds()&&0===a.getMilliseconds())return t;a.setMilliseconds(0),a.setSeconds(0),a.setMinutes(s);break}case"hour":{const e=a.getHours(),s=Math.ceil(e/i)*i;if(s===e&&0===a.getMinutes()&&0===a.getSeconds()&&0===a.getMilliseconds())return t;a.setMilliseconds(0),a.setSeconds(0),a.setMinutes(0),a.setHours(s);break}case"day":return 0===a.getHours()&&0===a.getMinutes()&&0===a.getSeconds()&&0===a.getMilliseconds()?t:(a.setMilliseconds(0),a.setSeconds(0),a.setMinutes(0),a.setHours(0),a.setDate(a.getDate()+1),a.getTime());case"week":{const e=Date.UTC(a.getFullYear(),a.getMonth(),a.getDate())/864e5-4,s=Math.ceil(Math.ceil(e/7)/i)*i,r=new Date(1970,0,5+7*s).getTime();return r>=t?r:new Date(1970,0,5+7*(s+i)).getTime()}case"month":{const e=a.getMonth(),s=Math.ceil(e/i)*i;return s===e&&1===a.getDate()&&0===a.getHours()&&0===a.getMinutes()&&0===a.getSeconds()&&0===a.getMilliseconds()?t:(a.setMilliseconds(0),a.setSeconds(0),a.setMinutes(0),a.setHours(0),a.setDate(1),a.setMonth(s),a.getTime())}case"year":{const e=a.getFullYear(),s=Math.ceil(e/i)*i;return s===e&&0===a.getMonth()&&1===a.getDate()&&0===a.getHours()&&0===a.getMinutes()&&0===a.getSeconds()&&0===a.getMilliseconds()?t:new Date(s,0,1).getTime()}}const r=a.getTime(),o=new Date(t).getTimezoneOffset()-a.getTimezoneOffset();return r<t?r+6e4*o:r}}class C{constructor(t){this.w=t,this.tooltipKeyFormat="dd MMM"}xLabelFormat(t,e,i,s){const a=this.w;if("datetime"===a.config.xaxis.type&&void 0===a.config.xaxis.labels.formatter&&void 0===a.config.tooltip.x.formatter){const t=new S(this.w);return t.formatDate(t.getDate(e),a.config.tooltip.x.format)}return t(e,i,s)}defaultGeneralFormatter(t){return Array.isArray(t)?t.map(t=>t):t}defaultYFormatter(t,e){const i=this.w;if(A.isNumber(t))if(0!==i.globals.yValueDecimal)t=t.toFixed(void 0!==e.decimalsInFloat?e.decimalsInFloat:i.globals.yValueDecimal);else{const e=t.toFixed(0);t=Number(e)===t?e:t.toFixed(1)}return t}setLabelFormatters(){const t=this.w,e=t.formatters,i=t.axisFlags.isXNumeric&&t.axisFlags.dataFormatXNumeric&&"datetime"!==t.config.xaxis.type&&!t.config.xaxis.convertedCatToNumeric&&!t.globals.isBarHorizontal;if(e.xaxisTooltipFormatter=t=>this.defaultGeneralFormatter(t),e.ttKeyFormatter=t=>this.defaultGeneralFormatter(t),e.ttZFormatter=t=>t,e.legendFormatter=t=>this.defaultGeneralFormatter(t),e.ttVal=void 0,void 0!==t.config.xaxis.labels.formatter?e.xLabelFormatter=t.config.xaxis.labels.formatter:e.xLabelFormatter=e=>{var s;if(A.isNumber(e)){if(!t.config.xaxis.convertedCatToNumeric&&!t.globals.isBarHorizontal&&("numeric"===t.config.xaxis.type||i)){const a=null==(s=t.globals.xAxisScale)?void 0:s.result;if(i&&Array.isArray(a)&&a.every(Number.isInteger))return e.toFixed(0);if(A.isNumber(t.config.xaxis.decimalsInFloat))return e.toFixed(t.config.xaxis.decimalsInFloat);{const i=t.globals.maxX-t.globals.minX;if(i>0){const t=i/10,s=Math.max(0,-Math.floor(Math.log10(t)));return e.toFixed(s)}return e.toFixed(0)}}if(t.globals.isBarHorizontal){if(t.globals.maxY-t.globals.minY<4)return e.toFixed(1)}return e.toFixed(0)}return e},"function"==typeof t.config.tooltip.x.formatter)e.ttKeyFormatter=t.config.tooltip.x.formatter;else if(void 0===t.config.xaxis.labels.formatter&&i){const t=e.xLabelFormatter;e.ttKeyFormatter=e=>Number.isInteger(e)?e.toFixed(0):t(e)}else e.ttKeyFormatter=e.xLabelFormatter;return"function"==typeof t.config.xaxis.tooltip.formatter&&(e.xaxisTooltipFormatter=t.config.xaxis.tooltip.formatter),(Array.isArray(t.config.tooltip.y)||void 0!==t.config.tooltip.y.formatter)&&(e.ttVal=t.config.tooltip.y),void 0!==t.config.tooltip.z.formatter&&(e.ttZFormatter=t.config.tooltip.z.formatter),void 0!==t.config.legend.formatter&&(e.legendFormatter=t.config.legend.formatter),e.yLabelFormatters=[],t.config.yaxis.forEach((i,s)=>{if(void 0!==i.labels.formatter)e.yLabelFormatters[s]=i.labels.formatter;else if("violin"===t.config.chart.type){const i=t=>"number"==typeof t&&isFinite(t)?""+Math.round(100*t)/100:t;e.yLabelFormatters[s]=e=>t.globals.xyCharts?Array.isArray(e)?e.map(i):i(e):e}else e.yLabelFormatters[s]=e=>t.globals.xyCharts?Array.isArray(e)?e.map(t=>this.defaultYFormatter(t,i)):this.defaultYFormatter(e,i):e}),t.globals}heatmapLabelFormatters(){const t=this.w;if("heatmap"===t.config.chart.type){const e=t.seriesData.seriesNames.slice();t.config.yaxis[0].reversed?e.unshift(""):e.push(""),t.globals.yAxisScale[0].result=e;const i=t.seriesData.seriesNames.reduce((t,e)=>t.length>e.length?t:e,0);t.globals.yAxisScale[0].niceMax=i,t.globals.yAxisScale[0].niceMin=i}}}const k={name:"en",options:{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"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],toolbar:{exportToSVG:"Download SVG",exportToPNG:"Download PNG",exportToCSV:"Download CSV",menu:"Menu",selection:"Selection",selectionZoom:"Selection Zoom",zoomIn:"Zoom In",zoomOut:"Zoom Out",pan:"Panning",reset:"Reset Zoom",measure:"Measure"}}},M=t=>{var e;const i=null==t?void 0:t.config.plotOptions.radialBar;return!i||!i.min&&100===(null!=(e=i.max)?e:100)?"%":""};class T{constructor(){this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount:void 0,stepSize:void 0,forceNiceScale:!1,alignZero:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,showDuplicates:!1,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:"11px",fontWeight:400,fontFamily:void 0,cssClass:""},formatter:void 0},axisBorder:{show:!1,color:"#e0e0e0",width:1,offsetX:0,offsetY:0},axisTicks:{show:!1,color:"#e0e0e0",width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:"11px",fontWeight:900,fontFamily:void 0,cssClass:""}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:"front",stroke:{color:"#b6b6b6",width:1,dashArray:0}}},this.pointAnnotation={id:void 0,x:0,y:null,yAxisIndex:0,seriesIndex:void 0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,marker:{size:4,fillColor:"#fff",strokeWidth:2,strokeColor:"#333",shape:"circle",offsetX:0,offsetY:0,cssClass:""},label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}},customSVG:{SVG:void 0,cssClass:void 0,offsetX:0,offsetY:0},image:{path:void 0,width:20,height:20,offsetX:0,offsetY:0},tooltip:{enabled:!1,text:void 0,formatter:void 0,theme:void 0,offsetX:0,offsetY:0}},this.yAxisAnnotation={id:void 0,y:0,y2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,width:"100%",yAxisIndex:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"end",position:"right",offsetX:0,offsetY:-3,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.xAxisAnnotation={id:void 0,x:0,x2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",orientation:"vertical",position:"top",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:"",textAnchor:"start",foreColor:void 0,fontSize:"13px",fontFamily:void 0,fontWeight:400,appendTo:".apexcharts-annotations",backgroundColor:"transparent",borderColor:"#c2c2c2",borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}init(){return{annotations:{yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},plugins:[],trellis:{by:void 0,row:void 0,column:void 0,emptyPanels:"placeholder",data:void 0,x:void 0,y:void 0,seriesBy:void 0,columns:"auto",minPanelWidth:220,gap:12,aspectRatio:1.6,panelHeight:void 0,minPanelHeight:80,order:"first-seen",limit:void 0,virtualize:"auto",scales:{x:"shared",y:"shared",color:"shared",size:"shared"},header:{show:!0,formatter:void 0,style:{fontSize:void 0,fontWeight:void 0,color:void 0}},axes:{labels:"edges"},legend:"shared",toolbar:"shared",tooltip:"panel",zoom:"sync",promote:!1,radiusByTotal:!1,targetTicks:3,panel:void 0},chart:{animations:{enabled:!0,speed:800,easing:"easeInOutSine",animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350,easing:void 0},chartTypeMorph:{enabled:!0,speed:600},respectReducedMotion:!0,largeDatasetThreshold:1e3},background:"",locales:[k],defaultLocale:"en",perspectives:{serializeOptions:["theme","xaxis","yaxis","title","subtitle"]},history:{enabled:!1,maxDepth:100,coalesceMs:250,keyboard:!0},renderer:"svg",rendererThreshold:8e3,layers:{series:"auto",grid:"svg",annotations:"svg",dataLabels:"svg"},dropShadow:{enabled:!1,enabledOnSeries:void 0,top:2,left:2,blur:4,color:"#000",opacity:.7},events:{animationEnd:void 0,beforeMount:void 0,mounted:void 0,updated:void 0,click:void 0,mouseMove:void 0,mouseLeave:void 0,xAxisLabelClick:void 0,legendClick:void 0,markerClick:void 0,selection:void 0,dataPointSelection:void 0,dataPointMouseEnter:void 0,dataPointMouseLeave:void 0,beforeZoom:void 0,beforeResetZoom:void 0,zoomed:void 0,scrolled:void 0,brushScrolled:void 0,crossFilter:void 0,filterChange:void 0,highlightFilterChanged:void 0,annotationDragged:void 0,annotationEdited:void 0,annotationCreated:void 0,annotationStyled:void 0,annotationDeleted:void 0,measured:void 0,keyDown:void 0,keyUp:void 0},foreColor:"#373d3f",fontFamily:"Helvetica, Arial, sans-serif",height:"auto",parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,print:{enabled:!0,width:700},id:void 0,group:void 0,nonce:void 0,license:void 0,offsetX:0,offsetY:0,injectStyleSheet:!0,selection:{enabled:!1,type:"x",fill:{color:"#24292e",opacity:.1},stroke:{width:1,color:"#24292e",opacity:.4,dashArray:3},xaxis:{min:void 0,max:void 0},yaxis:{min:void 0,max:void 0}},sparkline:{enabled:!1},brush:{enabled:!1,autoScaleYaxis:!0,target:void 0,targets:void 0},link:{enabled:!1,mode:"highlight",dimOpacity:.2,id:void 0,dimension:void 0,reduce:void 0,type:void 0,bins:void 0,order:void 0,seriesName:void 0},ink:{enabled:!1,palette:!1,snap:!1,noteColors:void 0},measure:{enabled:!1,mode:"span",key:"m",pinOnRelease:!0,colors:{up:void 0,down:void 0,neutral:void 0,guide:void 0},band:!0,guides:!0,markers:!0,format:{x:void 0,y:void 0,percent:void 0},label:void 0},contextMenu:{enabled:!1,items:["annotate","xline","yline","measure"],labels:{annotate:void 0,xline:void 0,yline:void 0,measure:void 0},noteText:"Note",line:{text:"",strokeDashArray:4,color:void 0}},stacked:!1,stackOnlyBar:!0,stackType:"normal",streaming:{enabled:!1,maxPoints:void 0},toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,measure:!0,customIcons:[]},export:{csv:{filename:void 0,columnDelimiter:",",headerCategory:"category",headerValue:"value",categoryFormatter:void 0,valueFormatter:void 0},png:{filename:void 0},svg:{filename:void 0},scale:void 0,width:void 0,embedFonts:!0},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,allowMouseWheelZoom:"auto",pinch:"auto",resetControl:"auto",zoomedArea:{fill:{color:"#90CAF9",opacity:.4},stroke:{color:"#0D47A1",opacity:.4,width:1}}},pan:{inertia:!0,friction:.92},accessibility:{enabled:!0,description:void 0,announcements:{enabled:!0},keyboard:{enabled:!0,navigation:{enabled:!0,wrapAround:!1}}},dataReducer:{enabled:!1,algorithm:"lttb",targetPoints:250,threshold:500}},parsing:{x:void 0,y:void 0},plotOptions:{line:{isSlopeChart:!1,colors:{threshold:0,colorAboveThreshold:void 0,colorBelowThreshold:void 0}},area:{fillTo:"origin"},bar:{horizontal:!1,columnWidth:"70%",barHeight:"70%",distributed:!1,borderRadius:0,borderRadiusApplication:"around",borderRadiusWhenStacked:"all",rangeBarOverlap:!0,rangeBarGroupRows:!1,hideZeroBarsWhenGrouped:!1,isDumbbell:!1,dumbbellColors:void 0,dumbbell:{connector:{color:void 0,opacity:.55},dataLabels:{enabled:!1,offset:6,colorFromMarker:!0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0}},tooltip:{differenceLabel:"Difference"}},isFunnel:!1,isFunnel3d:!0,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:"top",maxItems:100,hideOverflowingLabels:!0,orientation:"horizontal",total:{enabled:!1,formatter:void 0,offsetX:0,offsetY:0,style:{color:"#373d3f",fontSize:"12px",fontFamily:void 0,fontWeight:600}}}},bubble:{zScaling:!0,minBubbleRadius:void 0,maxBubbleRadius:void 0,minZ:void 0,maxZ:void 0},scatter:{jitter:{enabled:!1,x:0,y:0,distributed:!1,maxPoints:5e3}},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},boxPlot:{colors:{upper:"#00E396",lower:"#008FFB"},whiskers:"minmax",points:{show:!1,shape:"circle",size:2.5,jitter:.5,maxPoints:3e3,opacity:.9,fillColor:"series-dark",strokeColor:"#fff",strokeWidth:1}},violin:{bandwidthScale:1,kde:{bandwidth:void 0,resolution:64},normalize:"individual",side:"both",box:{show:!1,width:"15%",whiskers:"minmax",strokeWidth:1,fillColor:void 0,capWidth:.5},points:{show:!0,shape:"circle",size:2.5,jitter:.5,constrainToViolin:!0,position:"center",laneWidth:"40%",maxPoints:3e3,opacity:.9,fillColor:"series-dark",strokeColor:"#fff",strokeWidth:1}},histogram:{bins:"auto",binWidth:void 0,range:void 0,normalize:"count",cumulative:!1,overlap:!0},heatmap:{shape:"rect",radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0,gradientLegend:{enabled:!1,width:"70%",height:"70%",thickness:12,align:"center",stops:16,showLabels:!0,showHoverValue:!0,labelStyle:{fontSize:"11px",fontFamily:void 0,colors:void 0},arrow:{size:8,color:void 0},formatter:void 0}}},waterfall:{colors:{positive:"#00A86F",negative:"#FF4560",subtotal:void 0,total:void 0},connectors:{show:!0,color:void 0,strokeWidth:1,strokeDashArray:3}},streamgraph:{offset:"wiggle",order:"inside-out",hover:{show:!0,opacity:.35},labels:{show:!0,minWidth:24,minFontSize:9,maxFontSize:30,style:{fontSize:"auto",fontFamily:void 0,fontWeight:600,colors:void 0}}},funnel:{shape:"rectangle",lastShape:"flat"},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,borderRadius:4,dataLabels:{format:"scale",minFontSize:4},colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0,colorValue:void 0,gradient:{enabled:void 0,min:void 0,max:void 0,midpoint:void 0,symmetric:!0,colors:void 0,stops:void 0},gradientLegend:{enabled:!1,width:"70%",height:"70%",thickness:12,align:"center",stops:16,showLabels:!0,showHoverValue:!0,labelStyle:{fontSize:"11px",fontFamily:void 0,colors:void 0},arrow:{size:8,color:void 0},formatter:void 0}},nested:{enabled:void 0,drilldownAsLevels:!1},parents:{show:"auto",padding:4,fill:void 0,fillOpacity:1,borderColor:void 0,borderWidth:1,borderRadius:void 0,hover:{show:!0,color:void 0,width:2},header:{show:!0,height:22,minWidth:40,align:"left",offsetX:0,offsetY:0,showValue:!1,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,color:void 0,background:void 0,cssClass:""}},tooltip:{formatter:void 0}},levels:[],zoom:{enabled:!1,breadcrumb:void 0},seriesTitle:{show:!0,offsetY:1,offsetX:1,borderColor:"#000",borderWidth:1,borderRadius:2,style:{background:"rgba(0, 0, 0, 0.6)",color:"#fff",fontSize:"12px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:6,right:6,top:2,bottom:2}}}},unit:{layout:"grouped",positions:void 0,transition:"group",shape:"circle",image:{src:void 0,width:20,height:20,tint:!1},pictogram:{mark:void 0,fit:"contain",scale:1,padding:0,fallback:"circle"},size:"auto",columns:{size:"inherit"},grid:{columns:10,total:void 0,fillFrom:"bottom",split:!1,tileColumns:void 0,max:void 0,trackColor:void 0},scatter:{y:"lanes",spread:"swarm",orientation:"horizontal",tickAmount:5,xMin:void 0,xMax:void 0,xTitle:void 0,xFormatter:void 0,yTickAmount:5,yMin:void 0,yMax:void 0,yTitle:void 0,yFormatter:void 0,sizeField:"z",sizeRange:void 0,laneLabelWidth:void 0,gridlines:!0},sizeByValue:{enabled:!1,maxRadius:"auto",minRadius:void 0,scale:"area"},spacing:1.05,borderRadius:0,gather:{motion:"auto",spring:"crisp",easing:"outCubic",overshoot:1.70158,enter:"burst"},arc:{startAngle:-90,endAngle:90,innerRadiusRatio:.4,rows:"auto"},unitValue:1,maxUnits:5e3,sortByGroup:!0,clusterLabels:{show:!0,position:"top",curved:!0,fontSize:"13px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter:void 0,external:{show:!1,connector:{show:!0,width:1.5,color:void 0,gap:8,length:22},offsetX:0,offsetY:0}},tooltip:{formatter:void 0}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,shape:"arc",min:0,max:100,bands:[],bandsStyle:{strokeWidth:"40%",gap:0,hideTrackWhenPresent:!0},ticks:{show:!1,major:{count:11,length:10,width:2,color:"#666",placement:"outside"},minor:{count:4,length:5,width:1,color:"#999",placement:"outside"},labels:{show:!1,offset:6,fontSize:"11px",fontFamily:void 0,fontWeight:400,color:"#666",formatter:t=>String(t)}},needle:{color:"#333",length:"85%",baseWidth:4,tipWidth:1,offsetY:0,showValueArc:!1,animation:{enabled:!0,duration:void 0}},hollow:{margin:5,size:"50%",background:"transparent",image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:"front",stroke:void 0,strokeWidth:1,strokeDasharray:void 0,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},track:{show:!0,startAngle:void 0,endAngle:void 0,background:"#f2f2f2",strokeWidth:"97%",opacity:1,margin:5,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},dataLabels:{show:!0,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter:t=>t},value:{show:!0,fontSize:"14px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter:(t,e)=>t+M(e)},total:{show:!1,label:"Total",fontSize:"16px",fontWeight:600,fontFamily:void 0,color:void 0,formatter:t=>t.globals.seriesTotals.reduce((t,e)=>t+e,0)/t.seriesData.series.length+M(t)}},barLabels:{enabled:!1,offsetX:0,offsetY:0,useSeriesColors:!0,fontFamily:void 0,fontWeight:600,fontSize:"16px",formatter:t=>t,onClick:void 0}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!0,expandOffset:10,hoverOutline:{show:!0,size:8,gap:0,opacity:.3,color:void 0},borderRadius:0,spacing:0,dataLabels:{offset:0,minAngleToShowLabel:10,external:{show:!1,offsetX:0,offsetY:0,fontSize:void 0,fontFamily:void 0,fontWeight:void 0,color:void 0,formatter:void 0,connector:{show:!0,width:1,color:void 0,length:16,gap:6}}},donut:{size:"65%",background:"transparent",labels:{show:!1,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter:t=>t},value:{show:!0,fontSize:"20px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter:t=>t},total:{show:!1,showAlways:!1,label:"Total",fontSize:"16px",fontWeight:400,fontFamily:void 0,color:void 0,formatter:t=>t.globals.seriesTotals.reduce((t,e)=>t+e,0)}}}},polarArea:{rings:{strokeWidth:1,strokeColor:"#e8e8e8"},spokes:{strokeWidth:1,connectorColors:"#e8e8e8"}},icicle:{direction:"down",levelSize:"equal",maxDepth:"auto",spacing:1,borderRadius:0,leaf:"stop",partition:"normalize",sort:"none",tint:0,zoomOnClick:!0,zoomType:"value",dataLabels:{show:!0,minSizeToShow:30,align:"center",rotate:"auto",showValue:!1,style:{fontSize:"12px",fontFamily:void 0,fontWeight:400,colors:void 0}}},sunburst:{offsetX:0,offsetY:0,startAngle:0,endAngle:360,innerSize:"15%",borderRadius:0,spacing:1,leaf:"extend",partition:"normalize",tint:.14,zoomOnClick:!0,dataLabels:{show:!0,minAngleToShow:8,style:{fontSize:"12px",fontFamily:void 0,fontWeight:400,colors:void 0}}},radar:{size:void 0,offsetX:0,offsetY:0,polygons:{strokeWidth:1,strokeColors:"#e8e8e8",connectorColors:"#e8e8e8",fill:{colors:void 0}}}},colors:void 0,dataLabels:{enabled:!0,enabledOnSeries:void 0,formatter:t=>null!==t?t:"",textAnchor:"middle",distributed:!1,avoidOverlap:!0,offsetX:0,offsetY:0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0},background:{enabled:!0,foreColor:"#fff",backgroundColor:void 0,borderRadius:2,padding:4,opacity:.9,borderWidth:1,borderColor:"#fff",dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8}},dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8},animate:{enabled:!0},countUp:{enabled:!1}},fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:"squares",width:6,height:6,strokeWidth:2}},forecastDataPoints:{count:0,fillOpacity:.5,strokeWidth:void 0,dashArray:4},highlightFilter:{enabled:!0,data:void 0,fadeOpacity:.2,outline:{width:1,opacity:1},enter:"whole",axis:"extend",dataLabels:{value:"part",total:"part"},tooltip:{show:!0,share:!1,formatter:void 0},line:{dashArray:4},pie:{encoding:"radius"},radialBar:{indicator:void 0,needle:{}}},grid:{show:!0,borderColor:"#e0e0e0",strokeDashArray:0,position:"back",xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],drilldown:{enabled:!1,series:[],breadcrumb:{show:!0,position:"top-left",separator:" / ",rootLabel:"All",offsetX:0,offsetY:0},animation:{enabled:!0,zoomFromPoint:!1,speed:260},loading:{show:!0},cache:!0,marker:{show:!0,size:6,strokeColor:"#fff"}},legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:"bottom",horizontalAlign:"center",inverseOrder:!1,fontSize:"12px",fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],clusterGroupedSeries:!0,clusterGroupedSeriesOrientation:"vertical",labels:{colors:void 0,useSeriesColors:!1},markers:{size:7,fillColors:void 0,strokeWidth:1,shape:void 0,offsetX:0,offsetY:0,customHTML:void 0,onClick:void 0},itemMargin:{horizontal:5,vertical:4},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:"#fff",strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:"circle",offsetX:0,offsetY:0,showNullDataPoints:!0,onClick:void 0,onDblClick:void 0,hover:{size:void 0,sizeOffset:3},largeDatasetThreshold:0},noData:{text:void 0,align:"center",offsetX:0,offsetY:0,style:{color:void 0,fontSize:"14px",fontFamily:void 0}},responsive:[],series:void 0,states:{hover:{filter:{type:"lighten",value:.15}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken",value:.35}}},title:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:"14px",fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:"12px",fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:"smooth",lineCap:"butt",width:2,colors:void 0,dashArray:0,fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]}}},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,hideEmptySeries:!1,followCursor:!1,intersect:!1,inverseOrder:!1,interactive:!1,arrow:!0,compact:!1,custom:void 0,fillSeriesColor:!1,theme:"light",cssClass:"",style:{fontSize:"12px",fontFamily:void 0,background:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:"dd MMM",formatter:void 0},y:{formatter:void 0,title:{formatter:t=>t?t+": ":""}},z:{formatter:void 0,title:"Size: "},marker:{show:!0,fillColors:void 0},items:{display:"flex"},fixed:{enabled:!1,position:"topRight",offsetX:0,offsetY:0}},xaxis:{type:"category",categories:[],convertedCatToNumeric:!1,offsetX:0,offsetY:0,overwriteCategories:void 0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!1,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!0,datetimeFormatter:{year:"yyyy",month:"MMM",day:"dd MMM",hour:"HH:mm",minute:"HH:mm",second:"HH:mm:ss"}},group:{groups:[],style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""}},axisBorder:{show:!0,color:"#e0e0e0",width:"100%",height:1,offsetX:0,offsetY:0},axisTicks:{show:!0,color:"#e0e0e0",height:6,offsetX:0,offsetY:0},stepSize:void 0,tickAmount:void 0,tickPlacement:"on",min:void 0,max:void 0,range:void 0,floating:!1,decimalsInFloat:void 0,position:"bottom",title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:"12px",fontWeight:900,fontFamily:void 0,cssClass:""}},crosshairs:{show:!0,width:1,position:"back",opacity:.9,stroke:{color:"#b6b6b6",width:1,dashArray:3},fill:{type:"solid",color:"#B1B9C4",gradient:{colorFrom:"#D8E3F0",colorTo:"#BED1E6",stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.8}},tooltip:{enabled:!1,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"",palette:"palette1",tokens:!0,follow:!1,name:"",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65},accessibility:{colorBlindMode:""}}}}}const D=["icicle","unit","sunburst","violin"],_={funnel:"bar",pyramid:"bar",gauge:"radialBar",waffle:"unit",histogram:"bar",waterfall:"rangeBar",dumbbell:"rangeBar",streamgraph:"rangeArea",raincloud:"violin",column:"bar"},F={histogram:"stats",raincloud:"raincloud",waterfall:"waterfall",dumbbell:"dumbbell",streamgraph:"streamgraph"},L={area:"line",scatter:"line",bubble:"line",rangeArea:"line",column:"bar",barStacked:"bar",rangeBar:"bar",boxPlot:"candlestick",donut:"pie",polarArea:"pie"},E=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","violin","scatter","bubble"],P=["radar","heatmap","treemap"],B=["pie","donut","polarArea","radialBar","unit","sunburst","icicle"],N=[...E,...P,...B],R=[...E,...P],z=[...P,...B],I="_apexOwnedByType",O="_apexStacked100",X=t=>(t[I]=!0,t),H=["tooltip.custom","tooltip.shared","tooltip.intersect","tooltip.followCursor","dataLabels.enabled","dataLabels.formatter","plotOptions.bar.dataLabels.position","markers.size","plotOptions.violin.side","plotOptions.violin.box.show","plotOptions.violin.box.whiskers","plotOptions.violin.points.position","plotOptions.violin.points.jitter","plotOptions.bar.isDumbbell","plotOptions.unit.layout","plotOptions.unit.shape","grid.show","states.hover.filter.type","states.active.filter.type","xaxis.type","xaxis.crosshairs.width","xaxis.tickPlacement","xaxis.tooltip.enabled","chart.zoom.enabled","chart.animations.dynamicAnimation.enabled"],Y=t=>A.isNumber(t)?Math.floor(t):t,W=t=>A.extend((new T).init(),Z.forType(t)),$=(t,e)=>{let i=t;for(const t of e.split(".")){if(null==i||"object"!=typeof i)return;i=i[t]}return i},G=(t,e,i)=>{const s=e.split("."),a=s.pop();let r=t;for(const t of s)null!=r[t]&&"object"==typeof r[t]||(r[t]={}),r=r[t];void 0===i?delete r[a]:r[a]=i},U=(t,e)=>{var i,s,a,r;const o=_[t];return{chart:{type:o||t,requestedType:o?t:void 0,stacked:null==(i=e.chart)?void 0:i.stacked},plotOptions:{bar:{isFunnel:"funnel"===t||"pyramid"===t,horizontal:null==(a=null==(s=e.plotOptions)?void 0:s.bar)?void 0:a.horizontal},histogram:null==(r=e.plotOptions)?void 0:r.histogram},series:e.series,yaxis:[{title:{},labels:{},axisBorder:{},axisTicks:{}}]}},j=(t,e)=>{if("function"==typeof t)return!!t[I]||"function"==typeof e&&String(t)===String(e);if("function"==typeof e)return void 0===t;if(t===e)return!0;try{return JSON.stringify(t)===JSON.stringify(e)}catch(t){return!1}},V=({isTimeline:t,seriesIndex:e,dataPointIndex:i,y1:s,y2:a,w:r})=>{var o;let n=r.rangeData.seriesRangeStart[e][i],l=r.rangeData.seriesRangeEnd[e][i],c=r.labelData.labels[i],h=r.config.series[e].name?r.config.series[e].name:"";const d=r.formatters.ttKeyFormatter,p=r.config.tooltip.y.title.formatter,u={w:r,seriesIndex:e,dataPointIndex:i,start:n,end:l};if("function"==typeof p&&(h=p(h,u)),(null==(o=r.config.series[e].data[i])?void 0:o.x)&&(c=r.config.series[e].data[i].x),!t&&"datetime"===r.config.xaxis.type){c=new C(r).xLabelFormat(r.formatters.ttKeyFormatter,c,c,{i:void 0,dateFormatter:new S(r).formatDate,w:r})}"function"==typeof d&&(c=d(c,u)),Number.isFinite(s)&&Number.isFinite(a)&&(n=s,l=a);let g="",x="";const f=r.globals.colors[e];if(void 0===r.config.tooltip.x.formatter)if("datetime"===r.config.xaxis.type){const t=new S(r);g=t.formatDate(t.getDate(n),r.config.tooltip.x.format),x=t.formatDate(t.getDate(l),r.config.tooltip.x.format)}else g=n,x=l;else g=r.config.tooltip.x.formatter(n),x=r.config.tooltip.x.formatter(l);return{start:n,end:l,startVal:g,endVal:x,ylabel:c,color:f,seriesName:h}},q=t=>{let{color:e,seriesName:i,ylabel:s,start:a,end:r,seriesIndex:o,dataPointIndex:n}=t;const l=t.w.globals.tooltip.tooltipLabels.getFormatters(o);a=l.yLbFormatter(a),r=l.yLbFormatter(r);const c=l.yLbFormatter(t.w.seriesData.series[o][n]);let h="";const d=`<span class="value start-value">\n ${a}\n </span> <span class="separator">-</span> <span class="value end-value">\n ${r}\n </span>`;return h=t.w.globals.comboCharts?"rangeArea"===t.w.config.series[o].type||"rangeBar"===t.w.config.series[o].type?d:`<span>${c}</span>`:d,'<div class="apexcharts-tooltip-rangebar"><div> <span class="series-name" style="color: '+e+'">'+(i||"")+'</span></div><div> <span class="category">'+s+": </span> "+h+" </div></div>"};class Z{constructor(t){this.opts=t}static forType(t){var e,i;const s=new Z(t),a=N,r=t.chart.requestedType;let o;return o="funnel"===r||"pyramid"===r?s[r]():"gauge"===r?s.gauge():"histogram"===r?s.histogram():"waterfall"===r?s.waterfall():"dumbbell"===r?s.dumbbell():"streamgraph"===r?s.streamgraph():"raincloud"===r?s.raincloud():"waffle"===r?A.extend(s.unit(),{plotOptions:{unit:{layout:"grid",shape:"square"}}}):-1!==a.indexOf(t.chart.type)?s[t.chart.type]():s.line(),(null==(i=null==(e=t.plotOptions)?void 0:e.bar)?void 0:i.isFunnel)&&(o=s.funnel()),t.chart.stacked&&"bar"===t.chart.type&&(o=A.extend(o,{plotOptions:{bar:{borderRadiusApplication:"end"}}})),o}static handOverTypeDefaults(t,e,i){var s,a;Z.reconcile(t,!0);const r=null==i?void 0:i.chart;if(r&&("stacked"in r||"stackType"in r)&&!(null==(s=i.dataLabels)?void 0:s.formatter)){const e=t.dataLabels.formatter,i=(new T).init().dataLabels.formatter;if(t.chart.stacked&&"100%"===t.chart.stackType)j(e,i)&&(t.dataLabels.formatter=void 0,new Z(t).stacked100(t));else if(null==e?void 0:e[O]){t.dataLabels.formatter=i;for(const e of t.yaxis)0===e.min&&100===e.max&&(e.min=e.max=void 0)}}const o=t.chart.requestedType||t.chart.type,c=e===o&&"histogram"===o&&(null==i?void 0:i.series);if(!e||e===o&&!c)return;const h=(new T).init(),d=A.extend(h,Z.forType(U(e,c?l(n({},t),{series:t.series[1]?[]:[0,0]}):t))),p=A.extend(h,Z.forType(U(o,t)));for(const e of c?["fill.opacity","stroke.show","stroke.width","stroke.colors","tooltip.shared"]:H){if(i&&void 0!==$(i,e))continue;const s=$(d,e),a=$(p,e);void 0===s&&void 0===a||j($(t,e),s)&&G(t,e,a)}const u=Z.typeYAxisDefaults(e),g=Z.typeYAxisDefaults(o),x=(new T).yAxis,f=[].concat(null!=(a=null==i?void 0:i.yaxis)?a:[]);for(const e of new Set([...Object.keys(u),...Object.keys(g)])){if(f.some(t=>t&&void 0!==t[e]))continue;const i=e in u?u[e]:x[e],s=e in g?g[e]:x[e];for(const a of t.yaxis||[])a&&a[e]===i&&(a[e]=s)}}static syncSparkline(t,e,i){var s;const a=!!(null==(s=t.chart.sparkline)?void 0:s.enabled);if(a===!!e)return;const r=new Z({yaxis:[{title:{},axisBorder:{},axisTicks:{}}]}),o=W(t),n=(t,e,i,s,r="")=>{for(const o of Object.keys(t)){const l=r+o;if(A.isObject(t[o]))n(t[o],e,i,s,l+".");else if(void 0===$(s,l)){const s=t[o],r=$(i,l);j($(e,l),a?r:s)&&G(e,l,a?s:r)}}};n(r.sparkline({}),t,o,i);const l=null==i?void 0:i.yaxis;n(r.opts.yaxis[0],t.yaxis[0],(new T).yAxis,Array.isArray(l)?l[0]:l)}static isHorizontalBar(t){return"bar"===t.chart.type&&!!t.plotOptions.bar.horizontal}static syncHorizontal(t,e,i){if(!e||Z.isHorizontalBar(t))return;const s=W(t);for(const e of["chart.zoom.enabled","xaxis.tooltip.enabled"])void 0===$(i,e)&&!1===$(t,e)&&G(t,e,$(s,e))}static reconcile(t,e){const i=t=>{if(!e)throw new Error(t);console.warn(t)};t.tooltip.shared&&t.tooltip.intersect&&i("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false."),Z.isHorizontalBar(t)&&(t.yaxis.length>1&&i("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false"),t.yaxis[0].reversed&&(t.yaxis[0].opposite=!0),t.xaxis.tooltip.enabled=!1,t.yaxis[0].tooltip.enabled=!1,t.chart.zoom.enabled=!1),"bar"!==t.chart.type&&"rangeBar"!==t.chart.type||t.tooltip.shared&&"barWidth"===t.xaxis.crosshairs.width&&t.series.length>1&&(t.xaxis.crosshairs.width="tickWidth"),"candlestick"!==t.chart.type&&"boxPlot"!==t.chart.type||(t.yaxis[0].reversed&&(console.warn(`Reversed y-axis in ${t.chart.type} chart is not supported.`),t.yaxis[0].reversed=!1),"candlestick"===t.chart.type&&t.plotOptions.bar.horizontal&&(console.warn("Horizontal candlestick chart is not supported."),t.plotOptions.bar.horizontal=!1))}static typeYAxisDefaults(t){return"streamgraph"===t||"treemap"===t?{show:!1}:{}}hideYAxis(){this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text="",this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0}line(){return{dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}sparkline(t){this.hideYAxis();return A.extend(t,{grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}})}slope(){return this.hideYAxis(),{chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!0,formatter(t,e){const i=e.w.config.series[e.seriesIndex].name;return null!==t?i+": "+t:""},background:{enabled:!1},offsetX:-5},grid:{xaxis:{lines:{show:!0}},yaxis:{lines:{show:!1}}},xaxis:{position:"top",labels:{style:{fontSize:14,fontWeight:900}},tooltip:{enabled:!1},crosshairs:{show:!1}},markers:{size:8,hover:{sizeOffset:1}},legend:{show:!1},tooltip:{shared:!1,intersect:!0,followCursor:!0},stroke:{width:5,curve:"straight"}}}bar(){return{chart:{stacked:!1},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]},background:{enabled:!1}},stroke:{width:0,lineCap:"square"},fill:{opacity:.85},legend:{markers:{shape:"square"}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:"between",crosshairs:{width:"barWidth",position:"back",fill:{type:"gradient"},dropShadow:{enabled:!1},stroke:{width:0}}}}}funnel(){return this.hideYAxis(),l(n({},this.bar()),{chart:{animations:{speed:800,animateGradually:{enabled:!1}}},plotOptions:{bar:{horizontal:!0,borderRadiusApplication:"around",borderRadius:0,dataLabels:{position:"center"}}},grid:{show:!1,padding:{left:0,right:0}},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}}})}pyramid(){return this.funnel()}gauge(){const t=this.radialBar();return l(n({},t),{plotOptions:{radialBar:{startAngle:-135,endAngle:135,hollow:{margin:0,size:"60%"},track:{background:"#e7e7e7",strokeWidth:"100%",margin:5},dataLabels:{name:{show:!1},value:{show:!0,fontSize:"32px",fontWeight:600,offsetY:void 0}}}}})}waterfall(){var t;const e=this.rangeBar();return l(n({},e),{chart:{stacked:!1,zoom:{enabled:!1},animations:{animateGradually:{enabled:!0}}},plotOptions:l(n({},e.plotOptions),{bar:l(n({},e.plotOptions.bar),{columnWidth:"60%",barHeight:"60%"})}),dataLabels:l(n({},e.dataLabels),{enabled:!0,background:{enabled:!1},style:l(n({},null==(t=e.dataLabels)?void 0:t.style),{colors:[t=>t.w.config.chart.foreColor]})}),legend:{show:!1},tooltip:{shared:!1,intersect:!0,followCursor:!1}})}histogram(){var t,e,i,s;const a=Array.isArray(null==(t=this.opts)?void 0:t.series)&&this.opts.series.length>1&&!1!==(null==(s=null==(i=null==(e=this.opts)?void 0:e.plotOptions)?void 0:i.histogram)?void 0:s.overlap);return l(n({},this.bar()),{chart:{stacked:!1,zoom:{enabled:!1},animations:{animateGradually:{enabled:!1}}},plotOptions:{bar:{columnWidth:"100%",borderRadius:0,dataLabels:{position:"top"}}},dataLabels:{enabled:!1},fill:a?{opacity:.65}:{},stroke:a?{show:!1}:{show:!0,width:1,colors:["#fff"]},xaxis:{type:"numeric",tooltip:{enabled:!1}},tooltip:{shared:a,intersect:!1,x:{formatter:(t,e)=>{var i,s;const a=null==(s=null==(i=null==e?void 0:e.w)?void 0:i.histogramData)?void 0:s.edges,r=null==e?void 0:e.dataPointIndex;if(!Array.isArray(a)||"number"!=typeof r||r<0)return String(t);const o=a[r],n=a[r+1];if(void 0===o||void 0===n)return String(t);const l=t=>Number.isInteger(t)?String(t):t.toFixed(2);return`${l(o)} to ${l(n)}`}}}})}candlestick(){return{stroke:{width:1},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:X(({seriesIndex:t,dataPointIndex:e,w:i})=>this._getBoxTooltip(i,t,e,["Open","High","","Low","Close"],"candlestick"))},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}boxPlot(){return{stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:X(({seriesIndex:t,dataPointIndex:e,w:i})=>this._getBoxTooltip(i,t,e,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot"))},markers:{size:7,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}violin(){return{chart:{zoom:{enabled:!1},animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},fill:{opacity:.7},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:X(({seriesIndex:t,dataPointIndex:e,w:i})=>this._getViolinTooltip(i,t,e))},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}raincloud(){var t,e,i;const s=this.violin(),a=!0===(null==(i=null==(e=null==(t=this.opts)?void 0:t.plotOptions)?void 0:e.bar)?void 0:i.horizontal);return l(n({},s),{plotOptions:{violin:{side:a?"top":"right",box:{show:!0,whiskers:"tukey"},points:{position:a?"bottom":"left",jitter:.85}}},tooltip:l(n({},s.tooltip),{custom:X(({seriesIndex:t,dataPointIndex:e,w:i})=>this._getRaincloudTooltip(i,t,e))})})}rangeBar(){return{chart:{animations:{animateGradually:!1}},stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter(t,{seriesIndex:e,dataPointIndex:i,w:s}){const a=()=>{const t=s.rangeData.seriesRangeStart[e][i];return s.rangeData.seriesRangeEnd[e][i]-t};return s.globals.comboCharts?"rangeBar"===s.config.series[e].type||"rangeArea"===s.config.series[e].type?a():t:a()},background:{enabled:!1},style:{colors:["#fff"]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom:X(t=>t.w.config.plotOptions&&t.w.config.plotOptions.bar&&t.w.config.plotOptions.bar.horizontal?(t=>{const{color:e,seriesName:i,ylabel:s,startVal:a,endVal:r}=V(l(n({},t),{isTimeline:!0}));return q(l(n({},t),{color:e,seriesName:i,ylabel:s,start:a,end:r}))})(t):(t=>{const{color:e,seriesName:i,ylabel:s,start:a,end:r}=V(t);return q(l(n({},t),{color:e,seriesName:i,ylabel:s,start:a,end:r}))})(t))},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}dumbbell(){const t=this.rangeBar(),e=(t,e,i)=>'<div class="apexcharts-tooltip-dumbbell-endpoint"><span class="series-name" style="color: '+e+'">'+t+'</span> <span class="value">'+i+"</span></div>";return l(n({},t),{chart:{stacked:!1,zoom:{enabled:!1}},plotOptions:l(n({},t.plotOptions),{bar:l(n({},t.plotOptions.bar),{barHeight:6,columnWidth:6,isDumbbell:!0,dumbbell:{dataLabels:{enabled:!0}}})}),dataLabels:l(n({},t.dataLabels),{enabled:!1}),legend:{show:!0,position:"bottom",horizontalAlign:"left",markers:{shape:"circle"}},tooltip:{shared:!1,intersect:!0,followCursor:!1,custom:X(t=>{var i;const{w:s,dataPointIndex:a,seriesIndex:r}=t,o=s.dumbbellData;if(!o||"series"!==o.form){const{color:e,seriesName:i,ylabel:s,start:a,end:r}=V(t);return q(l(n({},t),{color:e,seriesName:i,ylabel:s,start:a,end:r}))}const c=o.values[a]||[],h=s.globals.tooltip.tooltipLabels.getFormatters(r),d=null!=(i=s.labelData.labels[a])?i:"";let p="";const u=[];for(let t=0;t<c.length;t++)null!==c[t]&&-1===o.hidden.indexOf(t)&&(u.push(c[t]),p+=e(o.names[t],s.globals.colors[t],h.yLbFormatter(c[t])));return'<div class="apexcharts-tooltip-rangebar apexcharts-tooltip-dumbbell"><div><span class="category">'+d+"</span></div>"+p+(2===u.length?'<div class="apexcharts-tooltip-dumbbell-gap"><span class="category">'+s.config.plotOptions.bar.dumbbell.tooltip.differenceLabel+': </span><span class="value">'+h.yLbFormatter(Math.abs(u[1]-u[0]))+"</span></div>":"")+"</div>"})}})}dumbbellSizing(t){var e,i;return(null==(e=t.plotOptions.bar)?void 0:e.barHeight)||(t.plotOptions.bar.barHeight=2),(null==(i=t.plotOptions.bar)?void 0:i.columnWidth)||(t.plotOptions.bar.columnWidth=2),t}area(){return{stroke:{width:4,fill:{type:"solid",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}}},fill:{type:"gradient",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}rangeArea(){return{stroke:{curve:"straight",width:0},fill:{type:"solid",opacity:.6},markers:{size:0},states:{hover:{filter:{type:"none"}},active:{filter:{type:"none"}}},tooltip:{intersect:!1,shared:!0,followCursor:!0,custom:X(t=>(t=>{const{color:e,seriesName:i,ylabel:s,start:a,end:r}=V(t);return q(l(n({},t),{color:e,seriesName:i,ylabel:s,start:a,end:r}))})(t))}}}streamgraph(){const t=this.rangeArea();return l(n({},t),{chart:{stacked:!1},stroke:{curve:"monotoneCubic",width:0},fill:{type:"solid",opacity:1},dataLabels:{enabled:!1},grid:{yaxis:{lines:{show:!1}}},markers:{size:0,hover:{size:0,sizeOffset:0}},tooltip:{intersect:!1,shared:!1,followCursor:!0,custom:X(t=>(t=>{var e;const{w:i,dataPointIndex:s,seriesIndex:a}=t,r=i.streamgraphData;if(!r||!Array.isArray(r.order)){const{color:e,seriesName:i,ylabel:s,start:a,end:r}=V(t);return q(l(n({},t),{color:e,seriesName:i,ylabel:s,start:a,end:r}))}const{ylabel:o}=V(t),c=(()=>{const t=i.streamgraphData,e=i.dom.baseEl&&i.dom.baseEl.querySelector(".apexcharts-svg"),r=i.interact&&i.interact.clientY,o=i.globals.maxY-i.globals.minY;if(!e||null==r||!o||!isFinite(o))return a;const n=e.getBoundingClientRect(),l=i.globals.svgWidth?n.width/i.globals.svgWidth:1,c=(r-n.top)/(l||1)-i.layout.translateY,h=i.layout.gridHeight,d=t=>{var e;const s=(t-i.globals.minY)/o;return(null==(e=i.config.yaxis[0])?void 0:e.reversed)?s*h:h-s*h};let p=a,u=1/0;for(let e=0;e<t.order.length;e++){const i=t.order[e],a=t.lows[i]&&t.lows[i][s],r=t.highs[i]&&t.highs[i][s];if(null==a||null==r)continue;const o=d(r),n=d(a),l=Math.min(o,n),h=Math.max(o,n);if(c>=l&&c<=h)return i;const g=c<l?l-c:c-h;g<u&&(u=g,p=i)}return p})(),h=void 0!==i.formatters.ttVal,d=(t,e)=>{if(h){const s=i.globals.tooltip.tooltipLabels.getFormatters(t);if("function"==typeof s.yLbFormatter)return s.yLbFormatter(e)}return Number.isInteger(e)?String(e):String(Number(e.toFixed(6)))};let p="",u=0;for(let t=r.order.length-1;t>=0;t--){const a=r.order[t],o=null==(e=r.values[a])?void 0:e[s];null!=o&&isFinite(o)&&(u+=o,p+='<div class="apexcharts-tooltip-stream-band'+(a===c?" apexcharts-active":"")+'"><span class="apexcharts-tooltip-marker" style="background-color: '+i.globals.colors[a]+'"></span><span class="series-name">'+r.names[a]+'</span> <span class="value">'+d(a,o)+"</span></div>")}return'<div class="apexcharts-tooltip-stream"><div class="apexcharts-tooltip-title">'+o+"</div>"+p+("expand"===r.offset?"":'<div class="apexcharts-tooltip-stream-total"><span class="series-name">Total</span> <span class="value">'+d(a,u)+"</span></div>")+"</div>"})(t))},legend:{show:!0,position:"top",horizontalAlign:"center"}})}brush(t){return A.extend(t,{chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}stacked100(t){if(t.dataLabels=t.dataLabels||{},t.yaxis.forEach((e,i)=>{t.yaxis[i].min=0,t.yaxis[i].max=100}),t.dataLabels.formatter)return t;const e=t.chart.type,i=(t.series||[]).some(t=>t.type?"bar"===t.type||"column"===t.type:"bar"===e||"column"===e),s=(t,e)=>{var s,a,r;const o=null==(r=null==(a=null==(s=null==e?void 0:e.w)?void 0:s.globals)?void 0:a.columnSeries)?void 0:r.i;return(o?o.includes(null==e?void 0:e.seriesIndex):i)?(t=>"number"==typeof t&&t?t.toFixed(0)+"%":t)(t):(t=>null!==t?t:"")(t)};return s[O]=!0,t.dataLabels.formatter=s,t}static catToNumeric(t,e,i){var s,a,r,o,n,l,c,h;const d=("bar"===t||"boxPlot"===t||"violin"===t)&&(null==(a=null==(s=e.plotOptions)?void 0:s.bar)?void 0:a.horizontal),p="pie"===t||"polarArea"===t||"donut"===t||"radar"===t||"radialBar"===t||"heatmap"===t||"unit"===t||"sunburst"===t||"icicle"===t,u=null!=(o=e.xaxis.type)?o:null==(r=i.xaxis)?void 0:r.type,g=("scatter"===t||"bubble"===t)&&(null==(c=null==(l=null==(n=e.plotOptions)?void 0:n.scatter)?void 0:l.jitter)?void 0:c.enabled),x=e.xaxis.tickPlacement||(null==(h=i.xaxis)?void 0:h.tickPlacement);return!d&&!p&&!g&&"datetime"!==u&&"numeric"!==u&&"between"!==x}static syncCatToNumeric(t,e){var i,s,a,r;const o=t.xaxis,c=!!o.convertedCatToNumeric;let h=null==(i=null==e?void 0:e.xaxis)?void 0:i.type;c&&"numeric"===h&&(h=void 0);const d=Z.forType(t),p=Z.catToNumeric(t.chart.type,l(n({},t),{xaxis:l(n({},o),{type:c?h:o.type})}),d);if(p===c)return;if(o.convertedCatToNumeric=p,p)return;const u=o.labels.formatter,g=(null==u?void 0:u.baseFormatter)||u;o.labels.formatter=g===Y?void 0:g,(null==u?void 0:u.categoryNames)&&!(null==(s=o.categories)?void 0:s.length)&&(o.categories=u.categoryNames),o.type=h||(null==(a=d.xaxis)?void 0:a.type)||"category","dataPoints"!==o.tickAmount||(null==(r=null==e?void 0:e.xaxis)?void 0:r.tickAmount)||(o.tickAmount=void 0)}convertCatToNumericXaxis(t,e){t.xaxis.type="numeric",t.xaxis.labels=t.xaxis.labels||{},t.xaxis.labels.formatter=t.xaxis.labels.formatter||Y;const i=t.xaxis.labels.formatter,s=i.baseFormatter||i;let a=t.xaxis.categories&&t.xaxis.categories.length?t.xaxis.categories:t.labels;if(e&&e.length&&(a=e.map(t=>Array.isArray(t)?t:String(t))),a&&a.length){const e=a,i=function(t){if(!A.isNumber(t))return s(t);const i=e[Math.floor(t)-1];return void 0===i?"":s(i)};i.categoryNames=e,i.baseFormatter=s,t.xaxis.labels.formatter=i}return t.xaxis.categories=[],t.labels=[],t.xaxis.tickAmount=t.xaxis.tickAmount||"dataPoints",t}bubble(){return{dataLabels:{style:{colors:["#fff"]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:"solid",gradient:{shade:"light",inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}scatter(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}heatmap(){return{chart:{stacked:!1,zoom:{enabled:!1}},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!1,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square"}},grid:{padding:{right:20}}}}treemap(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:["#fff"]}},stroke:{show:!0,width:2,colors:["#fff"]},legend:{show:!1},fill:{opacity:1,gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{show:!1,padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1},axisTicks:{show:!1}}}}unit(){return{chart:{toolbar:{show:!1}},dataLabels:{enabled:!1},stroke:{show:!1,width:0},fill:{opacity:1},tooltip:{followCursor:!0,x:{show:!1}},legend:{show:!0,position:"bottom"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}icicle(){return{chart:{toolbar:{show:!1}},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},fill:{opacity:1},legend:{show:!1,position:"bottom"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}sunburst(){return{chart:{toolbar:{show:!1}},dataLabels:{style:{colors:["#fff"]},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}pie(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:t=>"number"==typeof t?t.toFixed(1)+"%":t,style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}donut(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:t=>"number"==typeof t?t.toFixed(1)+"%":t,style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}polarArea(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:t=>"number"==typeof t?t.toFixed(1)+"%":t,enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}radar(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:"11px"}},stroke:{width:2},markers:{size:5,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},xaxis:{labels:{formatter:t=>t,style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}radialBar(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},stroke:{lineCap:"butt"},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}_getBoxTooltip(t,e,i,s,a){const r=t.candleData.seriesCandleO[e][i],o=t.candleData.seriesCandleH[e][i],n=t.candleData.seriesCandleM[e][i],l=t.candleData.seriesCandleL[e][i],c=t.candleData.seriesCandleC[e][i],h=t.config.series[e];return h.type&&h.type!==a?`<div class="apexcharts-custom-tooltip">\n ${h.name?h.name:"series-"+(e+1)}: <strong>${t.seriesData.series[e][i]}</strong>\n </div>`:`<div class="apexcharts-tooltip-box apexcharts-tooltip-${t.config.chart.type}"><div>${s[0]}: <span class="value">`+r+`</span></div><div>${s[1]}: <span class="value">`+o+"</span></div>"+(s[2]&&null!=n&&!Number.isNaN(n)?`<div>${s[2]}:<span class="value">`+n+"</span></div>":"")+`<div>${s[3]}: <span class="value">`+l+`</span></div><div>${s[4]}: <span class="value">`+c+"</span></div></div>"}_getViolinTooltip(t,e,i){var s,a,r;const o=null==(s=t.violinData.seriesViolinMin[e])?void 0:s[i],n=null==(a=t.violinData.seriesViolinMax[e])?void 0:a[i],l=(null==(r=t.violinData.seriesViolinPoints[e])?void 0:r[i])||[],c=t.config.series[e].name||"series-"+(e+1);return`<div class="apexcharts-tooltip-box apexcharts-tooltip-${t.config.chart.type}"><div class="apexcharts-tooltip-violin-name">${c}</div><div>Min: <span class="value">${o}</span></div><div>Max: <span class="value">${n}</span></div><div>Observations: <span class="value">${l.length}</span></div></div>`}_getRaincloudTooltip(t,e,i){var s,a;const r=null==(s=t.violinData.seriesViolinSummary[e])?void 0:s[i];if(!r)return this._getViolinTooltip(t,e,i);const o=(null==(a=t.violinData.seriesViolinPoints[e])?void 0:a[i])||[],n=t.config.series[e].name||"series-"+(e+1),l=t=>{if(!isFinite(t))return String(t);const e=Math.round(t);return Math.abs(t-e)<1e-6?String(e):String(Number(t.toFixed(2)))},[c,h,d,p,u]=r;return`<div class="apexcharts-tooltip-box apexcharts-tooltip-${t.config.chart.type}"><div class="apexcharts-tooltip-violin-name">${n}</div><div>Whisker high: <span class="value">${l(u)}</span></div><div>Q3: <span class="value">${l(p)}</span></div><div>Median: <span class="value">${l(d)}</span></div><div>Q1: <span class="value">${l(h)}</span></div><div>Whisker low: <span class="value">${l(c)}</span></div><div>Observations: <span class="value">${o.length}</span></div></div>`}}const K="__apexcharts_registry__",J="__apexcharts_custom_types__";globalThis[K]||(globalThis[K]={});const Q="__apexcharts_missing_types__";function tt(){return globalThis[K]}function et(){return globalThis[J]}function it(t){return et().has(t)}function st(t){return!!tt()[t]}function at(t){Object.assign(tt(),t)}function rt(t,e){const i=tt()[t];if(!i){const i=t=>L[t]||t,s=e&&_[e]&&i(_[e])===i(t)?e:void 0,a=s||t,r=s?F[s]:void 0,o=r?s:i(t),n=(r?[`${i(t)}.js`,`features/${r}.js`]:[`${i(t)}.js`]).map(t=>`<script src=".../dist/${t}">`).join(" and "),l=D.includes(t)||!!r&&"stats"!==r,c=`ApexCharts: chart type "${a}" is not registered`+(a!==t?` (it draws through "${t}")`:"")+`. Bundler: import 'apexcharts/${o}'`+(l?" (or import ApexCharts from 'apexcharts/full')":"")+`. Script tag: add ${n} after the ApexCharts script`+(l?", or load apexcharts.full.min.js instead, which has every type. This type is not in the default apexcharts.min.js.":", or load the default apexcharts.min.js instead."),h=globalThis[Q];throw h.has(a)||(h.add(a),globalThis.console.error(c)),new Error(c)}return i}globalThis[J]||(globalThis[J]=new Set),globalThis[Q]||(globalThis[Q]=new Set);const ot=class t{constructor(t){this.opts=t}init({responsiveOverride:e}){var i,s,a,r,o,l,c,h;let p=(new T).init(),u=n({},t.dropEmptyOptions(this.opts,p));["chart","xaxis","yaxis","theme","tooltip","dataLabels","annotations","plotOptions"].forEach(t=>{(A.isObject(u[t])||"chart"===t)&&(u[t]=n({},u[t]))}),u.plotOptions&&(u.plotOptions.bar=n({},u.plotOptions.bar));const g=new Z(u);u.chart.type||(u.chart.type="line"),u=this.normalizeAliasedChartType(u),e||t.warnUnknownOptionKeys(this.opts,Object.keys(p)),this.chartType=u.chart.type,u=this.extendYAxis(u),u=this.extendAnnotations(u);let x={};if(u&&"object"==typeof u){let t=Z.forType(u);(null==(i=u.chart.brush)?void 0:i.enabled)&&(t=g.brush(t)),(null==(a=null==(s=u.plotOptions)?void 0:s.line)?void 0:a.isSlopeChart)&&(t=g.slope()),u.chart.stacked&&"100%"===u.chart.stackType&&(u=g.stacked100(u)),(null==(o=null==(r=u.plotOptions)?void 0:r.bar)?void 0:o.isDumbbell)&&"dumbbell"!==u.chart.requestedType&&(u=g.dumbbellSizing(u)),this.checkForDarkTheme(d.getApex()),this.checkForDarkTheme(u),u.xaxis=u.xaxis||n({},d.getApex().xaxis),e||(u.xaxis.convertedCatToNumeric=!1),Z.catToNumeric(this.chartType,u,t)&&(u.xaxis.convertedCatToNumeric=!0),((null==(l=u.chart.sparkline)?void 0:l.enabled)||(null==(h=null==(c=d.getApex().chart)?void 0:c.sparkline)?void 0:h.enabled))&&(t=g.sparkline(t)),x=A.extend(p,t)}const f=A.extend(x,d.getApex());return p=A.extend(f,u),t.normalizeAxisBounds(p),Z.reconcile(p),p}normalizeAliasedChartType(e){if(!e||!e.chart)return e;if(void 0!==e.chart.type&&t.assertKnownChartType(e.chart.type),"column"===e.chart.type)return e.chart.type="bar",e;const i=e.chart.type;if(!i||!_[i])return e;if(e.chart.requestedType=i,"waffle"===i)e.chart.type="unit";else if("funnel"===i||"pyramid"===i)e.plotOptions=e.plotOptions||{},e.plotOptions.bar=e.plotOptions.bar||{},e.plotOptions.bar.isFunnel=!0,e.plotOptions.bar.horizontal=!0,e.chart.type="bar",e.plotOptions.bar.isPyramid="pyramid"===i;else if("gauge"===i)e.chart.type="radialBar";else if("waterfall"===i)e.chart.stacked=!1,e.chart.type="rangeBar";else if("dumbbell"===i)e.plotOptions=e.plotOptions||{},e.plotOptions.bar=e.plotOptions.bar||{},null==e.plotOptions.bar.horizontal&&(e.plotOptions.bar.horizontal=!0),e.chart.stacked=!1,e.chart.type="rangeBar";else if("streamgraph"===i){if(e.chart.stacked=!1,e.yaxis=e.yaxis||{},!Array.isArray(e.yaxis)){const t=Z.typeYAxisDefaults(i);for(const i of Object.keys(t))null==e.yaxis[i]&&(e.yaxis[i]=t[i])}e.chart.type="rangeArea"}else e.chart.type="histogram"===i?"bar":"raincloud"===i?"violin":_[i];return e}extendYAxis(t,e){var i;const s=new T,a=(null==(i=t.chart)?void 0:i.type)?t.chart:null==e?void 0:e.config.chart;s.yAxis=A.extend(s.yAxis,Z.typeYAxisDefaults((null==a?void 0:a.requestedType)||(null==a?void 0:a.type))),(void 0===t.yaxis||!t.yaxis||Array.isArray(t.yaxis)&&0===t.yaxis.length)&&(t.yaxis={});const r=d.getApex();t.yaxis.constructor!==Array&&r.yaxis&&r.yaxis.constructor!==Array&&(t.yaxis=A.extend(r.yaxis,t.yaxis)),t.yaxis.constructor!==Array?t.yaxis=[A.extend(s.yAxis,t.yaxis)]:t.yaxis=A.extendArray(t.yaxis,s.yAxis);let o=!1;t.yaxis.forEach(t=>{t.logarithmic&&(o=!0)});const n=t.series||(null==e?void 0:e.config.series)||[];return o&&n.length!==t.yaxis.length&&n.length&&(t.yaxis=n.map((e,i)=>{if(e.name||(n[i].name=`series-${i+1}`),t.yaxis[i])return t.yaxis[i].seriesName=n[i].name,t.yaxis[i];{const e=A.extend(s.yAxis,t.yaxis[0]);return e.show=!1,e}})),o&&n.length>1&&n.length!==t.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes"),t}extendAnnotations(t){return void 0===t.annotations&&(t.annotations={},t.annotations.yaxis=[],t.annotations.xaxis=[],t.annotations.points=[]),t=this.extendYAxisAnnotations(t),t=this.extendXAxisAnnotations(t),t=this.extendPointAnnotations(t)}extendYAxisAnnotations(t){const e=new T;return t.annotations.yaxis=A.extendArray(void 0!==t.annotations.yaxis?t.annotations.yaxis:[],e.yAxisAnnotation),t}extendXAxisAnnotations(t){const e=new T;return t.annotations.xaxis=A.extendArray(void 0!==t.annotations.xaxis?t.annotations.xaxis:[],e.xAxisAnnotation),t}extendPointAnnotations(t){const e=new T;return t.annotations.points=A.extendArray(void 0!==t.annotations.points?t.annotations.points:[],e.pointAnnotation),t}checkForDarkTheme(t){t.theme&&"dark"===t.theme.mode&&(t.tooltip||(t.tooltip={}),"light"!==t.tooltip.theme&&(t.tooltip.theme="dark"),t.chart.foreColor||(t.chart.foreColor="#f6f7f8"),t.theme.palette||(t.theme.palette="palette4"))}static assertKnownChartType(t){if("string"!=typeof t)throw new Error(`ApexCharts: chart.type must be a string, got ${typeof t}.`);if(N.includes(t)||void 0!==_[t]||it(t))return;const e=N.concat(Object.keys(_)),i=A.nearestName(t,e);throw new Error(`ApexCharts: unknown chart.type "${t}".`+(i?` Did you mean "${i}"?`:"")+` Known types: ${e.sort().join(", ")}.`)}static _defaultsTree(){return t._defaults||(t._defaults=(new T).init()),t._defaults}static dropEmptyOptions(e,i=t._defaultsTree()){if(!A.isObject(e)||!A.isObject(i))return e;let s=e;const a=(t,i)=>{s===e&&(s=n({},e)),void 0===i?delete s[t]:s[t]=i};for(const s of Object.keys(e)){const r=e[s],o=i[s];if(null==r){A.isObject(o)?a(s,void 0):Array.isArray(o)&&a(s,[]);continue}const n=Array.isArray(o)?o[0]:o;if(Array.isArray(r)&&A.isObject(n)){const e=r.map(e=>t.dropEmptyOptions(e,n));e.some((t,e)=>t!==r[e])&&a(s,e);continue}if(A.isObject(r)&&A.isObject(o)){const e=t.dropEmptyOptions(r,o);e!==r&&a(s,e)}}return s}static warnUnknownOptionKeys(t,e){if(!t||"object"!=typeof t)return;const i=Object.keys(t).filter(t=>!e.includes(t));if(!i.length)return;const s=i.map(t=>{const i=A.nearestName(t,e);return i?`${t} (did you mean "${i}"?)`:t});console.warn(`ApexCharts: unrecognized top-level option${i.length>1?"s":""}: ${s.join(", ")}. ${i.length>1?"They are":"It is"} kept in the config but never read.`)}static _coerceAxisBound(e,i,s,a){if(null!=e){if("number"==typeof e)return Number.isFinite(e)?e:t._rejectBound(e,a);if(i){const i=new S({config:{xaxis:{labels:{datetimeUTC:s}}}}).parseDate(e);return Number.isFinite(i)?i:t._rejectBound(e,a)}if("string"==typeof e&&""!==e.trim()){const t=Number(e);if(Number.isFinite(t))return t}return t._rejectBound(e,a)}}static _rejectBound(t,e){console.warn(`ApexCharts: ${e} cannot be read as a number. got ${"string"==typeof t?`"${t}"`:String(t)}. The bound is ignored and the axis scales to the data.`)}static normalizeAxisBounds(e,i={}){var s,a,r;if(!e||"object"!=typeof e)return e;const o=e.xaxis;if(o){const e="datetime"===(null!=(s=o.type)?s:i.xaxisType),n=null!=(r=null==(a=o.labels)?void 0:a.datetimeUTC)?r:i.datetimeUTC;["min","max"].forEach(i=>{void 0!==o[i]&&(o[i]=t._coerceAxisBound(o[i],e,n,`xaxis.${i}`))})}const n=Array.isArray(e.yaxis)?e.yaxis:e.yaxis?[e.yaxis]:[];return n.forEach((e,i)=>{e&&["min","max"].forEach(s=>{void 0!==e[s]&&"function"!=typeof e[s]&&(e[s]=t._coerceAxisBound(e[s],!1,void 0,`yaxis${n.length>1?`[${i}]`:""}.${s}`))})}),e}};h(ot,"_defaults",null);let nt=ot;const lt=1.618,ct=[1,1,2,5,5,5,10,10,10,10,10],ht=[ct,ct],dt=[1,2,4,4,6,6,6,6,6,6,6,6,6,6,6,6,6,6,12,12,12,12,12,12,12,12,12,24];class pt{initGlobalVars(t){t.series=[],t.seriesCandleO=[],t.seriesCandleH=[],t.seriesCandleM=[],t.seriesCandleL=[],t.seriesCandleC=[],t.seriesRangeStart=[],t.seriesRangeEnd=[],t.seriesRange=[],t.seriesPercent=[],t.seriesGoals=[],t.seriesX=[],t.seriesZ=[],t.seriesNames=[],t.seriesTotals=[],t.seriesLog=[],t.seriesColors=[],t.stackedSeriesTotals=[],t.seriesXvalues=[],t.seriesYvalues=[],t.dataWasParsed=!1,t.maxValsInArrayIndex=0,t.yValueDecimal=0,t.allSeriesHasEqualX=!0,t.hasNullValues=!1,t.invalidLogScale=!1,t.seriesRangeName={},t.labels=[],t.hasXaxisGroups=!1,t.groups=[],t.barGroups=[],t.lineGroups=[],t.areaGroups=[],t.hasSeriesGroups=!1,t.seriesGroups=[],t.categoryLabels=[],t.timescaleLabels=[],t.noLabelsProvided=!1,t.isXNumeric=!1,t.dataFormatXNumeric=!1,t.isRangeData=!1,t.isRangeBar=!1,t.skipLastTimelinelabel=!1,t.skipFirstTimelinelabel=!1,t.isDataXYZ=!1,t.isMultiLineX=!1,t.isMultipleYAxis=!1,t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE,t.minYArr=[],t.maxYArr=[],t.maxX=-Number.MAX_VALUE,t.minX=Number.MAX_VALUE,t.initialMaxX=-Number.MAX_VALUE,t.initialMinX=Number.MAX_VALUE,t.maxDate=0,t.minDate=Number.MAX_VALUE,t.minZ=Number.MAX_VALUE,t.maxZ=-Number.MAX_VALUE,t.minXDiff=Number.MAX_VALUE,t.yAxisScale=[],t.xAxisScale=null,t.xAxisTicksPositions=[],t.xRange=0,t.yRange=[],t.zRange=0,t.dataPoints=0,t.xTickAmount=0,t.multiAxisTickAmount=0,t.disableZoomIn=!1,t.disableZoomOut=!1,t.yLabelsCoords=[],t.yTitleCoords=[],t.barPadForNumericAxis=0,t.padHorizontal=0,t.rotateXLabels=!1,t.overlappingXLabels=!1,t.radialSize=0,t.circleGeometry=null,t.pieExternalLabelMarginY=0,t.barHeight=0,t.barWidth=0,t.animationEnded=!1,t.isDestroyed=!1,t.bulkRevealScheduled=!1,t.fadeRevealEls=[],t.morphBatch={pending:0,onDone:null,series:new Map},t.delayedElements=[],t.pointsArray=[],t.barCanvasCoords=null,t.dataLabelsRects=[],t.lastDrawnDataLabelsIndexes=[],t.textRectsCache=new Map,t.domCache=new Map,t.dimensionCache={},t.cachedSelectors={},t.seriesNS||this._attachNamespaces(t)}_attachNamespaces(t){const e=(e,i,s=i)=>{Object.defineProperty(e,s,{get:()=>t[i],set(e){t[i]=e},enumerable:!0,configurable:!0})},i={};e(i,"series","data");for(const t of["seriesNames","seriesX","seriesZ","seriesXvalues","seriesYvalues","seriesGoals","seriesLog","seriesColors","seriesPercent","seriesTotals","stackedSeriesTotals","seriesCandleO","seriesCandleH","seriesCandleM","seriesCandleL","seriesCandleC","seriesRangeStart","seriesRangeEnd","seriesRange","seriesYAxisMap","seriesYAxisReverseMap","seriesGroups","barGroups","lineGroups","areaGroups","collapsedSeries","collapsedSeriesIndices","ancillaryCollapsedSeries","ancillaryCollapsedSeriesIndices","collapsingSeriesIndices","allSeriesCollapsed","risingSeries","previousPaths","ignoreYAxisIndexes","labels","categoryLabels","timescaleLabels","groups"])e(i,t);Object.defineProperty(t,"seriesNS",{value:i,writable:!1,enumerable:!1,configurable:!0});const s={};for(const t of["minX","maxX","initialMinX","initialMaxX","minY","maxY","minYArr","maxYArr","minZ","maxZ","minDate","maxDate","minXDiff","xRange","yRange","zRange","xAxisScale","yAxisScale","xAxisTicksPositions","xTickAmount","multiAxisTickAmount","dataPoints","maxValsInArrayIndex","isXNumeric","isMultipleYAxis","isMultiLineX","isDataXYZ","dataFormatXNumeric","allSeriesHasEqualX","hasNullValues","dataWasParsed","hasXaxisGroups","hasSeriesGroups","skipFirstTimelinelabel","skipLastTimelinelabel","yValueDecimal","invalidLogScale","noLabelsProvided"])e(s,t);Object.defineProperty(t,"axes",{value:s,writable:!1,enumerable:!1,configurable:!0});const a={};for(const t of["svgWidth","svgHeight","gridWidth","gridHeight","translateX","translateY","translateXAxisX","translateXAxisY","translateYAxisX","xAxisLabelsHeight","xAxisGroupLabelsHeight","xAxisLabelsWidth","yAxisLabelsWidth","yAxisWidths","yLabelsCoords","yTitleCoords","padHorizontal","barPadForNumericAxis","rotateXLabels","scaleX","scaleY","radialSize","defaultLabels","overlappingXLabels"])e(a,t);Object.defineProperty(t,"layout",{value:a,writable:!1,enumerable:!1,configurable:!0});const r={};for(const t of["domCache","dimensionCache","cachedSelectors","textRectsCache","pointsArray","dataLabelsRects","lastDrawnDataLabelsIndexes","delayedElements","resizeTimer","selectionResizeTimer","resizeObserver"])e(r,t);Object.defineProperty(t,"cache",{value:r,writable:!1,enumerable:!1,configurable:!0})}globalVars(t){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],fill:{colors:[]},radialNeedleRAF:null,unitGatherRAF:null,unitExitRAF:null,radialNeedleAngle:void 0,radialTickTimer:null,resizeTimer:null,selectionResizeTimer:null,stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:t.markers.size,largestSize:0,batched:!1},LINE_HEIGHT_RATIO:lt,axisCharts:!0,comboCharts:!1,initialConfig:null,initialSeries:[],tokenSurface:void 0,tokenChrome:void 0,namedThemeApplied:void 0,lastXAxis:[],lastYAxis:[],allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],collapsingSeriesIndices:[],risingSeries:[],ignoreYAxisIndexes:[],isDirty:!1,isExecCalled:!1,dataChanged:!1,resized:!1,columnSeries:null,yaxis:null,total:0,shouldAnimate:!0,reducedMotionLatch:null,previousPaths:[],prevPolarAngles:null,prevPolarSizes:null,prevStreamFrame:null,exitLabels:null,riseLabels:null,prevTreemapParents:null,pendingCapture:null,treemapZoom:null,prevTreemapView:null,streamScrolled:!1,prevChromeFrame:null,layoutTween:null,chromeTweens:null,prevCircleFrame:null,circleTween:null,svgWidth:0,svgHeight:0,lastResizeSignature:null,defaultLabels:!1,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateYAxisX:[],yAxisWidths:[],tooltip:null,resizeObserver:null,activeRenderer:null,locale:{},memory:{methodsToExec:[]},niceScaleAllowedMagMsd:ht,niceScaleDefaultTicks:dt,seriesYAxisMap:[],seriesYAxisReverseMap:[],noData:!1}}defineLazyInitialSeries(t){let e=[],i=null;Object.defineProperty(t,"initialSeries",{configurable:!0,enumerable:!0,get:()=>(null===i&&(i=A.clone(e)),i),set(s){e=A.copySeriesShallow(s),i=null,t._initialSeriesPeek=e}}),t._initialSeriesPeek=e}init(t){const e=this.globalVars(t);this.initGlobalVars(e),this.defineLazyInitialSeries(e);const i=A.extend({},t);return i.series=A.copySeriesShallow(t.series),e.initialConfig=i,e.initialSeries=t.series,e.lastXAxis=A.clone(e.initialConfig.xaxis),e.lastYAxis=A.clone(e.initialConfig.yaxis),e}}class ut{constructor(t){this.opts=t}init(){const t=new nt(this.opts).init({responsiveOverride:!1}),e=(new pt).init(t),i={config:t,globals:e,dom:{},interact:{zoomEnabled:"zoom"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.zoom&&t.chart.zoom.enabled,panEnabled:"pan"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.pan,selectionEnabled:"selection"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.selection,measureEnabled:"measure"===t.chart.toolbar.autoSelected&&!!t.chart.toolbar.tools.measure&&!(!t.chart.measure||!t.chart.measure.enabled),zoomed:!1,selection:void 0,visibleXRange:void 0,selectedDataPoints:[],mousedown:!1,clientX:null,clientY:null,lastClientPosition:{},capturedSeriesIndex:-1,capturedDataPointIndex:-1,disableZoomIn:!1,disableZoomOut:!1,isTouchDevice:!!d.isBrowser()&&("ontouchstart"in window||navigator.maxTouchPoints>0)},formatters:{xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,legendFormatter:void 0},candleData:{seriesCandleO:[],seriesCandleH:[],seriesCandleM:[],seriesCandleL:[],seriesCandleC:[],seriesBoxPoints:[]},rangeData:{seriesRangeStart:[],seriesRangeEnd:[],seriesRange:[]},violinData:{seriesViolinDensity:[],seriesViolinPoints:[],seriesViolinSummary:[],seriesViolinMin:[],seriesViolinMax:[]},histogramData:{edges:[],binWidth:0,counts:[],rule:"",capped:!1},seriesObservations:null,waterfallData:{values:[],cumulative:[],kinds:[],geometry:null},dumbbellData:null,highlightData:null,streamgraphData:null,labelData:{labels:[],categoryLabels:[],timescaleLabels:[],hasXaxisGroups:!1,groups:[],seriesGroups:[],seriesGroupIndex:[]},axisFlags:{isXNumeric:!1,dataFormatXNumeric:!1,isDataXYZ:!1,isRangeData:!1,isRangeBar:!1,isMultiLineX:!1,noLabelsProvided:!1,dataWasParsed:!1},seriesData:{series:[],seriesNames:[],seriesX:[],seriesZ:[],seriesColors:[],seriesGoals:[],stackedSeriesTotals:[],stackedSeriesTotalsByGroups:[],unitData:[]},layout:{gridHeight:0,gridWidth:0,translateX:0,translateY:0,translateXAxisX:0,translateXAxisY:0,rotateXLabels:!1,xAxisHeight:0,xAxisLabelsHeight:0,xAxisGroupLabelsHeight:0,xAxisLabelsWidth:0,yLabelsCoords:[],yTitleCoords:[],gridPad:{top:0,right:0,bottom:0,left:0}}};Object.defineProperty(e,"dom",{get:()=>i.dom,set(t){i.dom=t},enumerable:!1,configurable:!0});for(const t of["xLabelFormatter","yLabelFormatters","xaxisTooltipFormatter","ttKeyFormatter","ttVal","ttZFormatter","legendFormatter"])Object.defineProperty(e,t,{get:()=>i.formatters[t],set(e){i.formatters[t]=e},enumerable:!1,configurable:!0});for(const t of["zoomEnabled","panEnabled","selectionEnabled","zoomed","selection","visibleXRange","selectedDataPoints","mousedown","clientX","clientY","lastClientPosition","capturedSeriesIndex","capturedDataPointIndex","disableZoomIn","disableZoomOut","isTouchDevice"])Object.defineProperty(e,t,{get:()=>i.interact[t],set(e){i.interact[t]=e},enumerable:!1,configurable:!0});for(const t of["gridHeight","gridWidth","translateX","translateY","translateXAxisX","translateXAxisY","rotateXLabels","xAxisHeight","xAxisLabelsHeight","xAxisGroupLabelsHeight","xAxisLabelsWidth","yLabelsCoords","yTitleCoords","gridPad"])Object.defineProperty(e,t,{get:()=>i.layout[t],set(e){i.layout[t]=e},enumerable:!1,configurable:!0});for(const t of["series","seriesNames","seriesX","seriesZ","seriesColors","seriesGoals","stackedSeriesTotals","stackedSeriesTotalsByGroups"])Object.defineProperty(e,t,{get:()=>i.seriesData[t],set(e){i.seriesData[t]=e},enumerable:!1,configurable:!0});for(const t of["isXNumeric","dataFormatXNumeric","isDataXYZ","isRangeData","isRangeBar","isMultiLineX","noLabelsProvided","dataWasParsed"])Object.defineProperty(e,t,{get:()=>i.axisFlags[t],set(e){i.axisFlags[t]=e},enumerable:!1,configurable:!0});for(const t of["labels","categoryLabels","timescaleLabels","hasXaxisGroups","groups","seriesGroups"])Object.defineProperty(e,t,{get:()=>i.labelData[t],set(e){i.labelData[t]=e},enumerable:!1,configurable:!0});for(const t of["seriesRangeStart","seriesRangeEnd","seriesRange"])Object.defineProperty(e,t,{get:()=>i.rangeData[t],set(e){i.rangeData[t]=e},enumerable:!1,configurable:!0});for(const t of["seriesCandleO","seriesCandleH","seriesCandleM","seriesCandleL","seriesCandleC"])Object.defineProperty(e,t,{get:()=>i.candleData[t],set(e){i.candleData[t]=e},enumerable:!1,configurable:!0});for(const t of["seriesViolinDensity","seriesViolinPoints","seriesViolinMin","seriesViolinMax"])Object.defineProperty(e,t,{get:()=>i.violinData[t],set(e){i.violinData[t]=e},enumerable:!1,configurable:!0});return i}}class gt{constructor(t){this.w=t}static checkComboSeries(t,e){let i=!1,s=0,a=0;return void 0===e&&(e="line"),t.length&&void 0!==t[0].type&&t.forEach(t=>{"bar"!==t.type&&"column"!==t.type&&"candlestick"!==t.type&&"boxPlot"!==t.type&&"violin"!==t.type||s++,void 0!==t.type&&t.type!==e&&a++}),a>0&&(i=!0),{comboBarCount:s,comboCharts:i}}getStackedSeriesTotals(t=[]){const e=this.w,i=[];if(0===e.seriesData.series.length)return i;for(let s=0;s<e.seriesData.series[e.globals.maxValsInArrayIndex].length;s++){let a=0;for(let i=0;i<e.seriesData.series.length;i++)void 0!==e.seriesData.series[i][s]&&-1===t.indexOf(i)&&(a+=e.seriesData.series[i][s]);i.push(a)}return i}getSeriesTotalByIndex(t=null){if(null===t)return this.w.config.series.reduce((t,e)=>t+e,0);{const e=this.w.seriesData.series[t];return Array.isArray(e)?e.reduce((t,e)=>t+e,0):null!=e?e:0}}getStackedSeriesTotalsByGroups(){const t=this.w,e=[];return t.labelData.seriesGroups.forEach((i,s)=>{e.push(this.getStackedSeriesTotals(t.seriesData.series.map((t,e)=>e).filter(e=>t.labelData.seriesGroupIndex[e]!==s)))}),e}setSeriesYAxisMappings(){const t=this.w.globals,e=this.w.config;let i=[];const s=[],a=[],r=e.series.length>e.yaxis.length||e.yaxis.some(t=>Array.isArray(t.seriesName));e.series.forEach((t,e)=>{a.push(e),s.push(null)}),e.yaxis.forEach((t,e)=>{i[e]=[]});const o=[];e.yaxis.forEach((t,s)=>{let n=!1;if(t.seriesName){let o=[];Array.isArray(t.seriesName)?o=t.seriesName:o.push(t.seriesName),o.forEach(t=>{e.series.forEach((e,o)=>{if(e.name===t){let t=o;s===o||r?!r||a.indexOf(o)>-1?i[s].push([s,o]):console.warn("Series '"+e.name+"' referenced more than once in what looks like the new style. That is, when using either seriesName: [], or when there are more series than yaxes."):(i[o].push([o,s]),t=s),n=!0,t=a.indexOf(t),-1!==t&&a.splice(t,1)}})})}n||o.push(s)}),i=i.map(t=>{const e=[];return t.forEach(t=>{s[t[1]]=t[0],e.push(t[1])}),e});let n=e.yaxis.length-1;for(let t=0;t<o.length&&(n=o[t],i[n]=[],a);t++){const t=a[0];a.shift(),i[n].push(t),s[t]=n}a.forEach(t=>{i[n].push(t),s[t]=n}),t.seriesYAxisMap=i.map(t=>t),t.seriesYAxisReverseMap=s.map(t=>t),t.seriesYAxisMap.forEach((t,i)=>{t.forEach(t=>{if(e.series[t]&&void 0===e.series[t].group){e.series[t].group="apexcharts-axis-".concat(i.toString())}})})}isSeriesNull(t=null){let e=[];if(null===t){e=this.w.config.series.filter(t=>null!==t)}else{const i=this.w.seriesData.series[t];e=Array.isArray(i)?i.filter(t=>null!==t):null!=i?[i]:[]}return 0===e.length}seriesHaveSameValues(t){const e=this.w.seriesData.series[t];return!Array.isArray(e)||e.every((t,e,i)=>t===i[0])}getCategoryLabels(t){const e=this.w;let i=t.slice();return e.config.xaxis.convertedCatToNumeric&&(i=t.map(t=>e.config.xaxis.labels.formatter(t-e.globals.minX+1))),i}getLargestSeries(){const t=this.w;t.globals.maxValsInArrayIndex=t.seriesData.series.map(t=>t.length).indexOf(Math.max.apply(Math,t.seriesData.series.map(t=>t.length)))}getLargestMarkerSize(){const t=this.w;let e=0;return t.globals.markers.size.forEach(t=>{e=Math.max(e,t)}),t.config.markers.discrete&&t.config.markers.discrete.length&&t.config.markers.discrete.forEach(t=>{e=Math.max(e,t.size||0)}),e>0&&(t.config.markers.hover.size>0?e=t.config.markers.hover.size:e+=t.config.markers.hover.sizeOffset),t.globals.markers.largestSize=e,e}getSeriesTotals(){const t=this.w;t.globals.seriesTotals=t.seriesData.series.map(t=>{let e=0;if(Array.isArray(t))for(let i=0;i<t.length;i++)e+=t[i];else e+=t;return e})}getSeriesTotalsXRange(t,e){const i=this.w;return i.seriesData.series.map((s,a)=>{let r=0;for(let o=0;o<s.length;o++)i.seriesData.seriesX[a][o]>t&&i.seriesData.seriesX[a][o]<e&&(r+=s[o]);return r})}getPercentSeries(){const t=this.w,e=t.config.chart.type,i=t=>t.type?"bar"===t.type||"column"===t.type:"bar"===e||"column"===e,s=t.config.series.some(i)?t.config.series.map((t,e)=>i(t)?-1:e).filter(t=>-1!==t):[],a=s.length?this.getStackedSeriesTotals(s):t.seriesData.stackedSeriesTotals,r=t.axisFlags.isXNumeric&&!t.config.plotOptions.bar.horizontal&&t.seriesData.seriesX,o=new Map;r&&t.seriesData.series.forEach((t,e)=>{s.indexOf(e)<0&&t.forEach((t,i)=>o.set(r[e][i],(o.get(r[e][i])||0)+t))}),t.globals.seriesPercent=t.seriesData.series.map((e,i)=>{const s=[];if(Array.isArray(e))for(let t=0;t<e.length;t++){const n=r?o.get(r[i][t]):a[t];let l=0;n&&(l=100*e[t]/n),s.push(l)}else{const i=100*e/t.globals.seriesTotals.reduce((t,e)=>t+e,0);s.push(i)}return s})}getCalculatedRatios(){const t=this.w,e=t.globals,i=[];let s=0,a=0,r=0,o=0,n=[],l=.1,c=0;if(e.yRange=[],e.isMultipleYAxis)for(let t=0;t<e.minYArr.length;t++)e.yRange.push(Math.abs(e.minYArr[t]-e.maxYArr[t])),n.push(0);else e.yRange.push(Math.abs(e.minY-e.maxY));e.xRange=Math.abs(e.maxX-e.minX),e.zRange=Math.abs(e.maxZ-e.minZ);for(let t=0;t<e.yRange.length;t++)i.push(e.yRange[t]/this.w.layout.gridHeight);if(a=e.xRange/this.w.layout.gridWidth,s=e.yRange[0]/this.w.layout.gridWidth,r=e.xRange/this.w.layout.gridHeight,o=e.zRange/this.w.layout.gridHeight*16,o||(o=1),e.minY!==Number.MIN_VALUE&&0!==Math.abs(e.minY)){e.hasNegs=!0}if(t.globals.seriesYAxisReverseMap.length>0){const r=(e,s)=>{const a=t.config.yaxis[t.globals.seriesYAxisReverseMap[s]];if(!a)return 0;if(a.logarithmic)return 0;return-(e<0?-1:1)*(e=Math.abs(e))/i[s]};if(e.isMultipleYAxis){n=[];for(let t=0;t<i.length;t++)n.push(r(e.minYArr[t],t))}else n=[],n.push(r(e.minY,0)),e.minY!==Number.MIN_VALUE&&0!==Math.abs(e.minY)&&(l=-e.minY/s,c=e.minX/a)}else n=[],n.push(0),l=0,c=0;return{yRatio:i,invertedYRatio:s,zRatio:o,xRatio:a,invertedXRatio:r,baseLineInvertedY:l,baseLineY:n,baseLineX:c}}getLogSeries(t,e){const i=this.w;return i.globals.seriesLog=t.map((t,s)=>{e&&(s=e[s]);const a=i.globals.seriesYAxisReverseMap[s];return i.config.yaxis[a]&&i.config.yaxis[a].logarithmic?t.map(t=>null===t?null:this.getLogVal(i.config.yaxis[a].logBase,t,s)):t}),i.globals.invalidLogScale?t:i.globals.seriesLog}getLogValAtSeriesIndex(t,e){if(null===t)return null;const i=this.w,s=i.globals.seriesYAxisReverseMap[e];return i.config.yaxis[s]&&i.config.yaxis[s].logarithmic?this.getLogVal(i.config.yaxis[s].logBase,t,e):t}getBaseLog(t,e){return Math.log(e)/Math.log(t)}getLogVal(t,e,i){if(e<=0)return 0;const s=this.w,a=0===s.globals.minYArr[i]?-1:this.getBaseLog(t,s.globals.minYArr[i]),r=(0===s.globals.maxYArr[i]?0:this.getBaseLog(t,s.globals.maxYArr[i]))-a;return(this.getBaseLog(t,e)-a)/r}getLogYRatios(t){const e=this.w,i=this.w.globals,s=i;return s.yLogRatio=t.slice(),s.logYRange=i.yRange.map((t,a)=>{const r=e.globals.seriesYAxisReverseMap[a];if(e.config.yaxis[r]&&this.w.config.yaxis[r].logarithmic){const t=1;return s.yLogRatio[a]=t/this.w.layout.gridHeight,t}return i.yRange[a]}),s.invalidLogScale?t.slice():s.yLogRatio}static extendArrayProps(t,e,i){var s,a;return(null==e?void 0:e.yaxis)&&(e=t.extendYAxis(e,i)),(null==e?void 0:e.annotations)&&(e.annotations.yaxis&&(e=t.extendYAxisAnnotations(e)),(null==(s=null==e?void 0:e.annotations)?void 0:s.xaxis)&&(e=t.extendXAxisAnnotations(e)),(null==(a=null==e?void 0:e.annotations)?void 0:a.points)&&(e=t.extendPointAnnotations(e))),e}drawSeriesByGroup(t,e,i,s){const a=this.w,r=[];return t.series.length>0&&e.forEach(e=>{const o=[],n=[];t.i.forEach((i,s)=>{a.config.series[i].group===e&&(o.push(t.series[s]),n.push(i))}),o.length>0&&r.push(s.draw(o,i,n))}),r}}const xt="http://www.w3.org/2000/svg";class ft{constructor(t,e){"object"==typeof t?(this.x=t.x,this.y=t.y):(this.x=t||0,this.y=e||0)}transform(t){return t.apply(this)}clone(){return new ft(this.x,this.y)}}class mt{constructor(t,e,i,s,a,r){this.a=null!=t?t:1,this.b=null!=e?e:0,this.c=null!=i?i:0,this.d=null!=s?s:1,this.e=null!=a?a:0,this.f=null!=r?r:0}rotate(t){const e=t*Math.PI/180,i=Math.cos(e),s=Math.sin(e);return this.multiply(new mt(i,s,-s,i,0,0))}scale(t,e){return this.multiply(new mt(t,0,0,null!=e?e:t,0,0))}multiply(t){return new mt(this.a*t.a+this.c*t.b,this.b*t.a+this.d*t.b,this.a*t.c+this.c*t.d,this.b*t.c+this.d*t.d,this.a*t.e+this.c*t.f+this.e,this.b*t.e+this.d*t.f+this.f)}apply(t){return new ft(this.a*t.x+this.c*t.y+this.e,this.b*t.x+this.d*t.y+this.f)}}class bt{constructor(t,e,i,s){this.x=t,this.y=e,this.w=i,this.h=s,this.width=i,this.height=s,this.x2=t+i,this.y2=e+s}}function yt(t){if(!t||"string"!=typeof t)return[["M",0,0]];const e=[],i=/([MmLlHhVvCcSsQqTtAaZz])\s*/g,s=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi;let a;const r=[],o=[];for(;null!==(a=i.exec(t));)r.push(a[1]),o.push(a.index);for(let i=0;i<r.length;i++){const a=o[i]+r[i].length,n=i+1<o.length?o[i+1]:t.length,l=t.substring(a,n),c=[];let h;for(s.lastIndex=0;null!==(h=s.exec(l));)c.push(parseFloat(h[0]));const d=r[i].toUpperCase();if("Z"===d)e.push(["Z"]);else if("M"===d||"L"===d||"T"===d)for(let t=0;t<c.length;t+=2)e.push([d,c[t],c[t+1]]);else if("H"===d)for(let t=0;t<c.length;t++)e.push([d,c[t]]);else if("V"===d)for(let t=0;t<c.length;t++)e.push([d,c[t]]);else if("C"===d)for(let t=0;t<c.length;t+=6)e.push([d,c[t],c[t+1],c[t+2],c[t+3],c[t+4],c[t+5]]);else if("S"===d||"Q"===d)for(let t=0;t<c.length;t+=4)e.push([d,c[t],c[t+1],c[t+2],c[t+3]]);else if("A"===d)for(let t=0;t<c.length;t+=7)e.push([d,c[t],c[t+1],c[t+2],c[t+3],c[t+4],c[t+5],c[t+6]])}return 0===e.length&&e.push(["M",0,0]),e}function vt(t){let e=1/0,i=1/0,s=-1/0,a=-1/0;return t.forEach(t=>{for(let r=1;r<t.length;r+=2)if(r+1<=t.length){const o=t[r],n=t[r+1];"number"==typeof o&&"number"==typeof n&&(o<e&&(e=o),o>s&&(s=o),n<i&&(i=n),n>a&&(a=n))}}),e===1/0?{x:0,y:0,width:0,height:0}:{x:e,y:i,width:s-e,height:a-i}}function wt(t){return t.map(t=>t.join(" ")).join(" ")}function At(t){switch(t[0]){case"z":case"Z":t[0]="L",t[1]=this.start[0],t[2]=this.start[1];break;case"H":t[0]="L",t[2]=this.pos[1];break;case"V":t[0]="L",t[2]=t[1],t[1]=this.pos[0];break;case"T":t[0]="Q",t[3]=t[1],t[4]=t[2],t[1]=this.reflection[1],t[2]=this.reflection[0];break;case"S":t[0]="C",t[6]=t[4],t[5]=t[3],t[4]=t[2],t[3]=t[1],t[2]=this.reflection[1],t[1]=this.reflection[0]}return t}function St(t){var e=t.length;return this.pos=[t[e-2],t[e-1]],-1!="SCQT".indexOf(t[0])&&(this.reflection=[2*this.pos[0]-t[e-4],2*this.pos[1]-t[e-3]]),t}function Ct(t){var e,i=[t];switch(t[0]){case"M":return this.pos=this.start=[t[1],t[2]],i;case"L":t[5]=t[3]=t[1],t[6]=t[4]=t[2],t[1]=this.pos[0],t[2]=this.pos[1];break;case"Q":t[6]=t[4],t[5]=t[3],t[4]=1*t[4]/3+2*t[2]/3,t[3]=1*t[3]/3+2*t[1]/3,t[2]=1*this.pos[1]/3+2*t[2]/3,t[1]=1*this.pos[0]/3+2*t[1]/3;break;case"A":i=function(t,e){var i,s,a,r,o,n,l,c,h,d,p,u,g,x,f,m,b,y,v,w,A,S,C,k,M,T,D=Math.abs(e[1]),_=Math.abs(e[2]),F=e[3]%360,L=e[4],E=e[5],P=e[6],B=e[7],N=new ft(t[0],t[1]),R=new ft(P,B),z=[];if(0===D||0===_||N.x===R.x&&N.y===R.y)return[["C",N.x,N.y,R.x,R.y,R.x,R.y]];i=new ft((N.x-R.x)/2,(N.y-R.y)/2).transform((new mt).rotate(F)),(s=i.x*i.x/(D*D)+i.y*i.y/(_*_))>1&&(D*=s=Math.sqrt(s),_*=s);a=(new mt).rotate(F).scale(1/D,1/_).rotate(-F),N=N.transform(a),R=R.transform(a),r=[R.x-N.x,R.y-N.y],n=r[0]*r[0]+r[1]*r[1],o=Math.sqrt(n),r[0]/=o,r[1]/=o,l=n<4?Math.sqrt(1-n/4):0,L===E&&(l*=-1);c=new ft((R.x+N.x)/2+l*-r[1],(R.y+N.y)/2+l*r[0]),h=new ft(N.x-c.x,N.y-c.y),d=new ft(R.x-c.x,R.y-c.y),p=Math.acos(h.x/Math.sqrt(h.x*h.x+h.y*h.y)),h.y<0&&(p*=-1);u=Math.acos(d.x/Math.sqrt(d.x*d.x+d.y*d.y)),d.y<0&&(u*=-1);E&&p>u&&(u+=2*Math.PI);!E&&p<u&&(u-=2*Math.PI);for(x=Math.ceil(2*Math.abs(p-u)/Math.PI),m=[],b=p,g=(u-p)/x,f=4*Math.tan(g/4)/3,A=0;A<=x;A++)v=Math.cos(b),y=Math.sin(b),w=new ft(c.x+v,c.y+y),m[A]=[new ft(w.x+f*y,w.y-f*v),w,new ft(w.x-f*y,w.y+f*v)],b+=g;for(m[0][0]=m[0][1].clone(),m[m.length-1][2]=m[m.length-1][1].clone(),a=(new mt).rotate(F).scale(D,_).rotate(-F),A=0,S=m.length;A<S;A++)m[A][0]=m[A][0].transform(a),m[A][1]=m[A][1].transform(a),m[A][2]=m[A][2].transform(a);for(A=1,S=m.length;A<S;A++)C=(w=m[A-1][2]).x,k=w.y,M=(w=m[A][0]).x,T=w.y,P=(w=m[A][1]).x,B=w.y,z.push(["C",C,k,M,T,P,B]);return z}(null!=(e=this.pos)?e:[],t),t=i[0]}return t[0]="C",this.pos=[t[5],t[6]],this.reflection=[2*t[5]-t[3],2*t[6]-t[4]],i}function kt(t,e){if(!1===e)return!1;for(var i=e,s=t.length;i<s;++i)if("M"==t[i][0])return i;return!1}function Mt(t,e,i,s,a,r){for(var o=t.slice(e,i||void 0),n=s.slice(a,r||void 0),l=0,c={pos:[0,0],start:[0,0]},h={pos:[0,0],start:[0,0]};o[l]=At.call(c,o[l]),n[l]=At.call(h,n[l]),o[l][0]!=n[l][0]||"M"==o[l][0]||"A"==o[l][0]&&(o[l][4]!=n[l][4]||o[l][5]!=n[l][5])?(Array.prototype.splice.apply(o,[l,1].concat(Ct.call(c,o[l]))),Array.prototype.splice.apply(n,[l,1].concat(Ct.call(h,n[l])))):(o[l]=St.call(c,o[l]),n[l]=St.call(h,n[l])),++l!=o.length||l!=n.length;)l==o.length&&o.push(["C",c.pos[0],c.pos[1],c.pos[0],c.pos[1],c.pos[0],c.pos[1]]),l==n.length&&n.push(["C",h.pos[0],h.pos[1],h.pos[0],h.pos[1],h.pos[0],h.pos[1]]);return{start:o,dest:n}}function Tt(t,e){var i=function(t,e){for(var i,s=yt(t),a=yt(e),r=0,o=0,n=!1,l=!1;!1!==r||!1!==o;){if(n=kt(s,!1!==r&&r+1),l=kt(a,!1!==o&&o+1),!1===r){const t=vt(i.start);r=0==t.height||0==t.width?s.push(s[0])-1:s.push(["M",t.x+t.width/2,t.y+t.height/2])-1}if(!1===o){const t=vt(i.dest);o=0==t.height||0==t.width?a.push(a[0])-1:a.push(["M",t.x+t.width/2,t.y+t.height/2])-1}i=Mt(s,r,n,a,o,l),s=s.slice(0,r).concat(i.start,!1===n?[]:s.slice(n)),a=a.slice(0,o).concat(i.dest,!1===l?[]:a.slice(l)),r=!1!==n&&r+i.start.length,o=!1!==l&&o+i.dest.length}return{start:s,dest:a}}(t,e),s=i.start,a=i.dest;return function(t){return wt(s.map(function(e,i){return a[i].map(function(s,r){return 0===r?s:e[r]+(a[i][r]-e[r])*t})}))}}let Dt=null,_t=null;function Ft(t,e){const i=new Array(e);if(!d.isBrowser()){const s=vt(yt(t)),a=s.x+s.width/2,r=s.y+s.height/2;for(let t=0;t<e;t++)i[t]={x:a,y:r};return i}Dt||(Dt=document.createElementNS("http://www.w3.org/2000/svg","svg"),Dt.setAttribute("width","0"),Dt.setAttribute("height","0"),Dt.setAttribute("style","position:absolute;width:0;height:0;visibility:hidden;pointer-events:none;"),_t=document.createElementNS("http://www.w3.org/2000/svg","path"),Dt.appendChild(_t),document.body.appendChild(Dt)),_t.setAttribute("d",t||"M0 0");let s=0;try{s=_t.getTotalLength()}catch(t){s=0}if(!s||!isFinite(s)){const s=vt(yt(t)),a=s.x+s.width/2,r=s.y+s.height/2;for(let t=0;t<e;t++)i[t]={x:a,y:r};return i}for(let t=0;t<e;t++)try{const a=_t.getPointAtLength(t/e*s);i[t]={x:a.x,y:a.y}}catch(e){i[t]={x:0,y:0}}return i}function Lt(t){return-Math.cos(t*Math.PI)/2+.5}let Et=Lt;function Pt(t){if(!t||"string"!=typeof t)return null;if("#"===t[0]){let e=t.slice(1);3===e.length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);const i=parseInt(e,16);return[i>>16&255,i>>8&255,255&i,1]}const e=t.match(/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+))?\s*\)/);return e?[+e[1],+e[2],+e[3],void 0!==e[4]?+e[4]:1]:null}function Bt(t,e,i){return`rgba(${Math.round(t[0]+(e[0]-t[0])*i)},${Math.round(t[1]+(e[1]-t[1])*i)},${Math.round(t[2]+(e[2]-t[2])*i)},${t[3]+(e[3]-t[3])*i})`}class Nt{constructor(t,e,i){this.el=t,this.duration=null!=e?e:300,this.delay=i||0,this._attrTarget=null,this._plotTarget=null,this._plotSnap=null,this._plotAlgorithm="commands",this._afterCb=null,this._duringCb=null,this._easing=null,this._next=null,this._root=null,this._scheduled=!1}ease(t){return"function"==typeof t&&(this._easing=t),this._schedule(),this}attr(t){return this._attrTarget=t,this._schedule(),this}plot(t,e,i){return this._plotTarget=t,e&&(this._plotAlgorithm=e),this._plotSnap=i||null,this._schedule(),this}after(t){return this._afterCb=t,this._schedule(),this}during(t){return this._duringCb=t,this._schedule(),this}animate(t,e){const i=new Nt(this.el,t,e);return this._next=i,i._root=this._root||this,i}_schedule(){const t=this._root||this;t._scheduled||(t._scheduled=!0,queueMicrotask(()=>t._executeChain()))}_executeChain(){const t=[];let e=this;for(;e;)t.push(e),e=e._next;let i=0;t.forEach(t=>{i+=t.delay,t._execute(i),i+=t.duration})}_execute(t){const e=this.el,i=this.duration;if(i<=1){const i=()=>{this._attrTarget&&e.attr(this._attrTarget),this._plotTarget&&e.plot(this._plotSnap||this._plotTarget),this._afterCb&&this._afterCb.call(e)};return void(t>0?setTimeout(i,t):i())}const s=()=>{const t={},s={},a={};if(this._attrTarget)for(const i of Object.keys(this._attrTarget)){const r=e.attr(i);t[i]=r;const o=Pt(r),n=Pt(String(this._attrTarget[i]));o&&n&&(s[i]=o,a[i]=n)}let r=null;if(this._plotTarget){const t=e.attr("d")||"";try{r="polygons"===this._plotAlgorithm?function(t,e,i=96){const s=Ft(t,i),a=Ft(e,i);let r=0,o=1/0;for(let t=0;t<i;t++){let e=0;for(let r=0;r<i;r++){const n=s[(r+t)%i],l=a[r],c=n.x-l.x,h=n.y-l.y;if(e+=c*c+h*h,e>=o)break}e<o&&(o=e,r=t)}const n=new Array(i);for(let t=0;t<i;t++)n[t]=s[(t+r)%i];return function(t){let e="";for(let s=0;s<i;s++){const i=n[s],r=a[s],o=i.x+(r.x-i.x)*t,l=i.y+(r.y-i.y)*t;e+=(0===s?"M":"L")+o.toFixed(3)+" "+l.toFixed(3)+" "}return e+"Z"}}(t,this._plotTarget):Tt(t,this._plotTarget)}catch(t){r=null}}const o=performance.now(),n=e.node&&e.node.ownerSVGElement,l=this._easing||n&&n.__apexEase||Et,c=n=>{const h=n-o,d=Math.min(h/i,1),p=l(d);if(this._attrTarget)if(d>=1)e.attr(this._attrTarget);else{const i={};for(const e of Object.keys(this._attrTarget))if(s[e]&&a[e])i[e]=Bt(s[e],a[e],p);else{const s=parseFloat(t[e]),a=parseFloat(this._attrTarget[e]);isNaN(s)||isNaN(a)||(i[e]=s+(a-s)*p)}e.attr(i)}r&&d<1&&e.attr("d",r(p)),this._duringCb&&this._duringCb(p),d<1?y.requestAnimationFrame(c):(this._plotTarget&&e.attr("d",this._plotSnap||this._plotTarget),this._afterCb&&this._afterCb.call(e))};y.requestAnimationFrame(c)};t>0?setTimeout(s,t):s()}}function Rt(t){t.prototype.animate=function(t,e){return new Nt(this,t,e)}}function zt(t){return-Math.cos(t*Math.PI)/2+.5}function It(t,e,i,s){t=Math.min(Math.max(t,0),1),i=Math.min(Math.max(i,0),1);const a=3*t,r=3*(i-t)-a,o=1-a-r,n=3*e,l=3*(s-e)-n,c=1-n-l,h=t=>((o*t+r)*t+a)*t;return t=>t<=0?0:t>=1?1:(t=>((c*t+l)*t+n)*t)((t=>{let e=0,i=1,s=t;if(s<e)return e;if(s>i)return i;for(;e<i;){const a=h(s);if(Math.abs(a-t)<1e-4)return s;t>a?e=s:i=s,s=(e+i)/2}return s})(t))}const Ot=new Map;function Xt(t,e){"string"==typeof t&&t&&"function"==typeof e&&Ot.set(t,e)}function Ht(t){return"function"==typeof t?Yt(t):(e=t,Array.isArray(e)&&4===e.length&&e.every(t=>"number"==typeof t)?It(t[0],t[1],t[2],t[3]):"string"==typeof t&&Ot.has(t)?Yt(Ot.get(t)):zt);var e}function Yt(t){return e=>{const i=t(e);return"number"==typeof i&&isFinite(i)?i:e}}Ot.set("linear",t=>t),Ot.set("easeInOutSine",zt),Ot.set("easeInSine",t=>1-Math.cos(t*Math.PI/2)),Ot.set("easeOutSine",t=>Math.sin(t*Math.PI/2)),Ot.set("easeInQuad",t=>t*t),Ot.set("easeOutQuad",t=>1-(1-t)*(1-t)),Ot.set("easeInOutQuad",t=>t<.5?2*t*t:1-Math.pow(-2*t+2,2)/2),Ot.set("easeInCubic",t=>t*t*t),Ot.set("easeOutCubic",t=>1-Math.pow(1-t,3)),Ot.set("easeInOutCubic",t=>t<.5?4*t*t*t:1-Math.pow(-2*t+2,3)/2),Ot.set("easeOutBack",t=>{const e=1.70158;return 1+2.70158*Math.pow(t-1,3)+e*Math.pow(t-1,2)}),Ot.set("easeInOutBack",t=>{const e=2.5949095;return t<.5?Math.pow(2*t,2)*(7.189819*t-e)/2:(Math.pow(2*t-2,2)*((e+1)*(2*t-2)+e)+2)/2});const Wt="http://www.w3.org/2000/svg";function $t(t){return 1-Math.pow(1-t,3)}let Gt=null;function Ut(){if(!d.isBrowser())return!1;try{return Gt||(Gt=window.matchMedia("(prefers-reduced-motion: reduce)")),!!Gt.matches}catch(t){return!1}}function jt(t,e,i){if(!function(t){const e=t.globals,i=t.config.chart.animations,s=t.config.chart.type;return d.isBrowser()&&!e.dataChanged&&!e.resized&&e.shouldAnimate&&!!i&&!1!==i.enabled&&!(2*i.speed<1)&&("line"===s||"area"===s||"rangeArea"===s)&&"canvas"!==(e.activeRenderer||{}).kind&&t.layout.gridWidth>0}(i))return!1;const s=2*(i.config.chart.animations.speed||800),a=Math.max(0,Math.min(1,e/i.layout.gridWidth)),r=(1-Math.cbrt(1-a))*s,o=t.node.style;o.opacity="0";let n=null;const l=t=>{null===n&&(n=t),t-n>=r?o.opacity="":y.requestAnimationFrame(l)};return y.requestAnimationFrame(l),!0}function Vt(t){const e=t.config.chart.animations;if(!e)return;const i=e.dynamicAnimation,s=t.globals;!1!==e.respectReducedMotion&&Ut()?(s.reducedMotionLatch?(!1!==e.enabled&&(s.reducedMotionLatch.enabled=e.enabled),i&&!1!==i.enabled&&(s.reducedMotionLatch.dynamicEnabled=i.enabled)):s.reducedMotionLatch={enabled:e.enabled,dynamicEnabled:i?i.enabled:void 0},e.enabled=!1,i&&(i.enabled=!1)):s.reducedMotionLatch&&(e.enabled=s.reducedMotionLatch.enabled,i&&void 0!==s.reducedMotionLatch.dynamicEnabled&&(i.enabled=s.reducedMotionLatch.dynamicEnabled),s.reducedMotionLatch=null);const a=Ht(e.easing);var r;Kt.set(t,a),Et="function"==typeof(r=a)?r:Lt}function qt(t){const e=t.style,i=t.index||0,s="number"==typeof t.baseDelay?t.baseDelay:40;switch(e){case"none":return 0;case"diagonal":return((t.row||0)+(t.col||0))*s;default:return i*s}}const Zt=new WeakMap,Kt=new WeakMap;class Jt{constructor(t,e){var i,s;this.w=t,this.ctx=e,e&&t&&!Zt.has(t)&&Zt.set(t,e);const a=null==(s=null==(i=null==t?void 0:t.dom)?void 0:i.Paper)?void 0:s.node;a&&(a.__apexEase=Kt.get(t))}animatePop(t,{speed:e,delay:i=0,onComplete:s}){const a=this.w;if(!d.isBrowser()||!a.globals.shouldAnimate||e<1)return void(s&&s());const r=t.node.style;r.transformBox="fill-box",r.transformOrigin="center",r.transform="scale(0)",r.opacity="0";const o=performance.now()+i,n=t=>{if(a.globals.isDestroyed)return;const i=Math.max(0,Math.min(1,(t-o)/e));r.transform=`scale(${function(t){const e=1.70158;return 1+2.70158*Math.pow(t-1,3)+e*Math.pow(t-1,2)}(i)})`,r.opacity=String(Math.min(1,2*i)),i<1?y.requestAnimationFrame(n):(r.transform="",r.transformOrigin="",r.transformBox="",r.opacity="",s&&s())};y.requestAnimationFrame(n)}animateRect(t,e,i,s,a,r=0){return t.attr(e).animate(s,r).attr(i).after(()=>a())}animatePathsGradually(t){const{el:e,realIndex:i,j:s,fill:a,pathFrom:r,pathTo:o,pathToInterp:n,speed:l,delay:c,scrollMorph:h}=t,d=this.w;let p=0;d.config.chart.animations.animateGradually.enabled&&(p=d.config.chart.animations.animateGradually.delay),d.config.chart.animations.dynamicAnimation.enabled&&d.globals.dataChanged&&"bar"!==d.config.chart.type&&(p=0),this.morphSVG(e,i,s,"line"!==d.config.chart.type||d.globals.comboCharts?a:"stroke",r,o,l,c*p,h,n)}revealBulk(t){const e=this.w;t.node.classList.add("apexcharts-element-hidden"),e.globals.delayedElements.push({el:t.node}),e.globals.fadeRevealEls.push(t.node),d.isBrowser()&&e.globals.shouldAnimate?e.globals.bulkRevealScheduled||(e.globals.bulkRevealScheduled=!0,y.requestAnimationFrame(()=>{if(e.globals.isDestroyed)return;e.globals.bulkRevealScheduled=!1;const i=e.globals.fadeRevealEls;e.globals.fadeRevealEls=[];const s=e.globals.morphBatch;if(s&&s.pending>0)return i.forEach(t=>{t.classList.remove("apexcharts-element-hidden"),t.classList.add("apexcharts-hidden-element-shown")}),void(s.onDone=()=>this.animationCompleted(t));this.animationCompleted(t)})):this.animationCompleted(t)}showDelayedElements(){this.w.globals.delayedElements.forEach(t=>{if(t.holdUntilComplete&&!this.w.globals.animationEnded)return;const e=t.el;e.classList.remove("apexcharts-element-hidden"),e.classList.add("apexcharts-hidden-element-shown")})}animationCompleted(t){const e=this.w;e.globals.animationEnded||e.globals.isDestroyed||(e.globals.animationEnded=!0,this.showDelayedElements(),"function"==typeof e.config.chart.events.animationEnd&&e.config.chart.events.animationEnd(this.ctx||Zt.get(e),{el:t,w:e}))}animateDraw(t,{realIndex:e,j:i,isFill:s,isLast:a,speed:r,delay:o,mask:n}){const l=this.w,c=this,h=()=>{a&&l.globals.shouldAnimate&&c.animationCompleted(t),c.showDelayedElements()};if(!d.isBrowser()||!l.globals.shouldAnimate||r<1)return void h();const p=t.node,u=()=>{const t=n&&"radial"===n.type,a=l.layout.gridWidth+8,c=n&&n.cx||0,d=n&&n.cy||0,u=(n&&n.r||l.layout.gridWidth/2)+4,g=`apexDrawMask${l.globals.cuid}-${e}-${null!=i?i:0}-${s?"f":"s"}`,x=y.createElementNS(Wt,"mask");let f;if(x.setAttribute("id",g),x.setAttribute("maskUnits","userSpaceOnUse"),t){const t=u;x.setAttribute("x",String(c-t)),x.setAttribute("y",String(d-t)),x.setAttribute("width",String(2*t)),x.setAttribute("height",String(2*t)),f=y.createElementNS(Wt,"circle"),f.setAttribute("cx",String(c)),f.setAttribute("cy",String(d)),f.setAttribute("r","0"),f.setAttribute("fill","#fff")}else x.setAttribute("x",String(-4)),x.setAttribute("y",String(-4)),x.setAttribute("width",String(a)),x.setAttribute("height",String(l.layout.gridHeight+8)),f=y.createElementNS(Wt,"rect"),f.setAttribute("x",String(-4)),f.setAttribute("y",String(-4)),f.setAttribute("width","0"),f.setAttribute("height",String(l.layout.gridHeight+8)),f.setAttribute("fill","#fff");x.appendChild(f),l.dom.elDefs.node.appendChild(x),p.setAttribute("mask",`url(#${g})`);const m=performance.now()+(o||0),b=e=>{if(l.globals.isDestroyed)return;const i=Math.max(0,Math.min(1,(e-m)/r)),s=$t(i);t?f.setAttribute("r",String(s*u)):f.setAttribute("width",String(s*a)),i<1?y.requestAnimationFrame(b):(p.removeAttribute("mask"),x.parentNode&&x.parentNode.removeChild(x),h())};y.requestAnimationFrame(b)};y.requestAnimationFrame(()=>{if(l.globals.isDestroyed)return;if(s)return void u();const t=p.getAttribute("stroke-dasharray");if(!!t&&"0"!==t&&""!==t)return void u();let e=0;try{"function"==typeof p.getTotalLength&&(e=p.getTotalLength())}catch(t){e=0}e?(t=>{p.setAttribute("stroke-dasharray",String(t)),p.setAttribute("stroke-dashoffset",String(t));const e=performance.now()+(o||0),i=s=>{if(l.globals.isDestroyed)return;const a=Math.max(0,Math.min(1,(s-e)/r));p.setAttribute("stroke-dashoffset",String(t*(1-$t(a)))),a<1?y.requestAnimationFrame(i):(p.removeAttribute("stroke-dasharray"),p.removeAttribute("stroke-dashoffset"),h())};y.requestAnimationFrame(i)})(e):h()})}morphSVG(t,e,i,s,a,r,o,n,l,c){var h,d;const p=this.w;a||(a=t.attr("pathFrom")),r||(r=t.attr("pathTo"));const u=()=>("radar"===p.config.chart.type&&(o=1),`M 0 ${p.layout.gridHeight}`);(!a||a.indexOf("undefined")>-1||a.indexOf("NaN")>-1)&&(a=u()),(!r.trim()||r.indexOf("undefined")>-1||r.indexOf("NaN")>-1)&&(r=u(),c=void 0),c&&(!c.trim()||c.indexOf("undefined")>-1||c.indexOf("NaN")>-1)&&(c=void 0),p.globals.shouldAnimate||(o=1);const g=!0===(null==(d=null==(h=this.ctx)?void 0:h.morphTypeChange)?void 0:d.isActive())?"polygons":"commands";let x=null;if(p.globals.dataChanged){const t=p.config.chart.animations.dynamicAnimation.easing;null!=t?x=Ht(t):l&&(x=Ht("linear"))}const f=p.globals.morphBatch;f&&f.pending++;const m=Jt.trackSeriesTween(p,e),b=t.plot(a).animate(o,n);x&&b.ease(x),b.plot(c||r,g,c?r:void 0).after(()=>{if(A.isNumber(i)){const e=p.seriesData.series[p.globals.maxValsInArrayIndex];e&&i===e.length-2&&p.globals.shouldAnimate&&this.animationCompleted(t)}else"none"!==s&&p.globals.shouldAnimate&&(!p.globals.comboCharts&&e===p.seriesData.series.length-1||p.globals.comboCharts)&&this.animationCompleted(t);if(this.showDelayedElements(),f&&--f.pending<=0){if(f.onDone){const t=f.onDone;f.onDone=null,t()}f===p.globals.morphBatch&&p.globals.shouldAnimate&&this.animationCompleted(t)}m()})}static trackSeriesTween(t,e){var i;const s=null==(i=t.globals.morphBatch)?void 0:i.series;if(!s||!A.isNumber(e))return()=>{};let a=s.get(e);a||(a={pending:0,onDone:null},s.set(e,a));const r=a;r.pending++;let o=!1;return()=>{if(!o&&(o=!0,r.pending--,r.pending<=0&&r.onDone)){const t=r.onDone;r.onDone=null,t()}}}}const Qt=.15,te=.35;class ee{constructor(t){this.w=t}static isSliceChart(t){const e=t.config.chart.type;return"pie"===e||"donut"===e||"polarArea"===e}static hoverOutlineOwnsHoverState(t){var e;return ee.isSliceChart(t)&&"none"!==t.config.states.hover.filter.type&&!0===(null==(e=t.config.plotOptions.pie.hoverOutline)?void 0:e.show)}static sliceOffsetOwnsActiveState(t){return ee.isSliceChart(t)&&"polarArea"!==t.config.chart.type&&!0===t.config.plotOptions.pie.expandOnClick&&t.config.plotOptions.pie.expandOffset>0&&!ee.drilldownBlocksSliceOffset(t)}static drilldownBlocksSliceOffset(t){var e;const i=globalThis.__apexcharts_features_v1__;return ee.isSliceChart(t)&&!0===(null==(e=t.config.drilldown)?void 0:e.enabled)&&!!(null==i?void 0:i.has("drilldown"))}getDefaultFilter(t,e){const i=this.w;t.unfilter&&t.unfilter(!0),i.config.chart.dropShadow.enabled&&this.dropShadow(t,i.config.chart.dropShadow,e)}applyFilter(t,e,i,s){var a,r,o;const n=this.w;if(t.unfilter&&t.unfilter(!0),"none"===i)return void this.getDefaultFilter(t,e);const l=n.config.chart.dropShadow,c="lighten"===i?Qt:te,h=Math.max(0,Math.min(1,"number"==typeof s?s:c)),d=1-h,p="lighten"===i?h:0;t.filterWith&&(t.filterWith(t=>{t.colorMatrix({type:"matrix",values:`\n ${d} 0 0 0 ${p}\n 0 ${d} 0 0 ${p}\n 0 0 ${d} 0 ${p}\n 0 0 0 1 0\n `,in:"SourceGraphic",result:"brightness"}),l.enabled&&this.addShadow(t,e,l,"brightness")}),l.noUserSpaceOnUse||null==(r=null==(a=t.filterer())?void 0:a.node)||r.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(null==(o=t.filterer())?void 0:o.node))}addShadow(t,e,i,s){var a;const r=this.w;let{blur:o,top:n,left:l,color:c,opacity:h}=i;if(c=Array.isArray(c)?c[e]:c,(null==(a=r.config.chart.dropShadow.enabledOnSeries)?void 0:a.length)>0&&-1===r.config.chart.dropShadow.enabledOnSeries.indexOf(e))return t;t.offset({in:s,dx:l,dy:n,result:"offset"}),t.gaussianBlur({in:"offset",stdDeviation:o,result:"blur"}),t.flood({"flood-color":c,"flood-opacity":h,result:"flood"}),t.composite({in:"flood",in2:"blur",operator:"in",result:"shadow"}),t.merge(["shadow",s])}dropShadow(t,e,i=0){var s,a,r,o,n;const l=this.w;return t.unfilter&&t.unfilter(!0),A.isMsEdge()&&"radialBar"===l.config.chart.type||(null==(s=l.config.chart.dropShadow.enabledOnSeries)?void 0:s.length)>0&&-1===(null==(a=l.config.chart.dropShadow.enabledOnSeries)?void 0:a.indexOf(i))||t.filterWith&&(t.filterWith(t=>{this.addShadow(t,i,e,"SourceGraphic")}),e.noUserSpaceOnUse||null==(o=null==(r=t.filterer())?void 0:r.node)||o.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(null==(n=t.filterer())?void 0:n.node)),t}setSelectionFilter(t,e,i){const s=this.w;if(void 0!==s.interact.selectedDataPoints[e]&&s.interact.selectedDataPoints[e].indexOf(i)>-1){if(t.node.setAttribute("selected",!0),ee.sliceOffsetOwnsActiveState(s))return;const i=s.config.states.active.filter;"none"!==i.type&&this.applyFilter(t,e,i.type,i.value)}}_scaleFilterSize(t){if(!t)return;(e=>{for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.setAttribute(i,e[i])})({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}function ie(t,e){if("number"==typeof e)return e;const i=t.config&&t.config.series||[];for(let t=0;t<i.length;t++)if(i[t]&&i[t].name===e)return t;return-1}function se(t,e,i,s){if(!t||!t.weaveClaims)return s;const a=t.weaveClaims.byOption.get(e);if(!a||!a.length)return s;let r=s;for(const e of a)for(const s of e.entries)ie(t,s.series)===i&&(r=s.value);return r}class ae{constructor(t,e=null){this.w=t,this.ctx=e}roundPathCorners(t,e){function i(t,e,i){var a=e.x-t.x,r=e.y-t.y,o=Math.sqrt(a*a+r*r);return o?s(t,e,Math.min(1,i/o)):{x:t.x,y:t.y}}function s(t,e,i){return{x:t.x+(e.x-t.x)*i,y:t.y+(e.y-t.y)*i}}function a(t,e){t.length>2&&(t[t.length-2]=e.x,t[t.length-1]=e.y)}function r(t){return{x:parseFloat(t[t.length-2]),y:parseFloat(t[t.length-1])}}t.indexOf("NaN")>-1&&(t="");var o=t.split(/[,\s]/).reduce(function(t,e){var i=e.match(/^([a-zA-Z])(.+)/);return i?(t.push(i[1]),t.push(i[2])):t.push(e),t},[]).reduce(function(t,e){return parseFloat(e)==e&&t.length?t[t.length-1].push(e):t.push([e]),t},[]),n=[];if(o.length>1){var l=r(o[0]),c=null;"Z"==o[o.length-1][0]&&o[0].length>2&&(c=["L",l.x,l.y],o[o.length-1]=c),n.push(o[0]);for(var h=1;h<o.length;h++){var d=n[n.length-1],p=o[h],u=p==c?o[1]:o[h+1];if(u&&d&&d.length>2&&"L"==p[0]&&u.length>2&&"L"==u[0]){var g,x,f=r(d),m=r(p),b=r(u);g=i(m,f,e),x=i(m,b,e),a(p,g),p.origPoint=m,n.push(p);var y=s(g,m,.5),v=s(m,x,.5),w=["C",y.x,y.y,v.x,v.y,x.x,x.y];w.origPoint=m,n.push(w)}else n.push(p)}if(c){var A=r(n[n.length-1]);n.push(["Z"]),a(n[0],A)}}else n=o;return n.reduce(function(t,e){return t+e.join(" ")+" "},"")}drawLine(t,e,i,s,a="#a8a8a8",r=0,o=null,n="butt"){return this.w.dom.Paper.line().attr({x1:t,y1:e,x2:i,y2:s,stroke:a,"stroke-dasharray":r,"stroke-width":o,"stroke-linecap":n})}drawRect(t=0,e=0,i=0,s=0,a=0,r="#fefefe",o=1,n=null,l=null,c=0){const h=this.w.dom.Paper.rect();return h.attr({x:t,y:e,width:i>0?i:0,height:s>0?s:0,rx:a,ry:a,opacity:o,"stroke-width":null!==n?n:0,stroke:null!==l?l:"none","stroke-dasharray":c}),h.node.setAttribute("fill",r),h}drawPolygon(t,e="#e1e1e1",i=1,s="none"){return this.w.dom.Paper.polygon(t).attr({fill:s,stroke:e,"stroke-width":i})}drawCircle(t,e=null){t<0&&(t=0);const i=this.w.dom.Paper.circle(2*t);return null!==e&&i.attr(e),i}drawPath({d:t="",stroke:e="#a8a8a8",strokeWidth:i=1,fill:s,fillOpacity:a=1,strokeOpacity:r=1,classes:o,strokeLinecap:n=null,strokeDashArray:l=0}){const c=this.w;null===n&&(n=c.config.stroke.lineCap),(t.indexOf("undefined")>-1||t.indexOf("NaN")>-1)&&(t=`M 0 ${c.layout.gridHeight}`);return c.dom.Paper.path(t).attr({fill:s,"fill-opacity":a,stroke:e,"stroke-opacity":r,"stroke-linecap":n,"stroke-width":i,"stroke-dasharray":l,class:o})}group(t=null){const e=this.w.dom.Paper.group();return null!==t&&e.attr(t),e}move(t,e){return["M",t,e].join(" ")}line(t,e,i=null){return"H"===i?[" H",t].join(" "):"V"===i?[" V",e].join(" "):[" L",t,e].join(" ")}curve(t,e,i,s,a,r){return["C",t,e,i,s,a,r].join(" ")}arc(t,e,i,s,a,r,o,n=!1){let l="A";n&&(l="a");return[l,t,e,i,s,a,r,o].join(" ")}renderPaths({j:t,realIndex:e,pathFrom:i,pathTo:s,pathToInterp:a,stroke:r,strokeWidth:o,strokeLinecap:c,fill:h,animationDelay:d,initialSpeed:p,dataChangeSpeed:u,className:g,chartType:x,shouldClipToGrid:f=!0,bindEventsOnPaths:m="number"==typeof t,drawShadow:b=!0,drawMask:y=null,scrollMorph:v=!1,fadeReveal:w=!1}){var A,S,C,k;const M=this.w,T=new ee(this.w),D=new Jt(this.w,null!=(A=this.ctx)?A:void 0),_=this.w.config.chart.animations.enabled,F=_&&this.w.config.chart.animations.dynamicAnimation.enabled;if(i&&i.startsWith("M 0 0 ")&&s){const t=s.match(/^M\s+[\d.-]+\s+[\d.-]+/);t&&(i=i.replace(/^M\s+0\s+0/,t[0]))}let L;const E=!0===(null==(C=null==(S=this.ctx)?void 0:S.morphTypeChange)?void 0:C.isActive()),P=!!(_&&!M.globals.resized&&!M.globals.dataChanged||F&&M.globals.dataChanged&&M.globals.shouldAnimate||E&&_&&M.globals.shouldAnimate),B="string"==typeof g&&g.split(" ").some(t=>"apexcharts-line"===t||"apexcharts-area"===t||"apexcharts-rangeArea"===t||"apexcharts-radar"===t),N=!(!_||M.globals.resized||M.globals.dataChanged||!B),R=null!=(k=M.config.chart.animations.largeDatasetThreshold)?k:0,z=!!(P&&!N&&R>0&&M.globals.dataPoints>R),I=!(!w||!P||N||!M.globals.dataChanged||E),O=z||I;!P||N||O?(L=s,P||(M.globals.animationEnded=!0)):L=i;const X=M.config.stroke.dashArray;let H=0;H=Array.isArray(X)?X[e]:M.config.stroke.dashArray,H=se(M,"stroke.dashArray",e,H);const Y=this.drawPath({d:L,stroke:r,strokeWidth:o,fill:h,fillOpacity:1,classes:g,strokeLinecap:c,strokeDashArray:H});Y.attr("index",e),f&&("bar"===x&&!M.globals.isBarHorizontal||M.globals.comboCharts?Y.attr({"clip-path":`url(#gridRectBarMask${M.globals.cuid})`}):Y.attr({"clip-path":`url(#gridRectMask${M.globals.cuid})`})),M.config.chart.dropShadow.enabled&&b&&T.dropShadow(Y,M.config.chart.dropShadow,e),m&&(Y.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,Y)),Y.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,Y)),Y.node.addEventListener("mousedown",this.pathMouseDown.bind(this,Y))),Y.attr({pathTo:s,pathFrom:i});const W={el:Y,j:t,realIndex:e,pathFrom:i,pathTo:s,pathToInterp:a,fill:h,strokeWidth:o,delay:d,scrollMorph:v};if(!_||M.globals.resized||M.globals.dataChanged)!M.globals.resized&&M.globals.dataChanged&&P||O||D.showDelayedElements();else if(N){const i=2*p,s="none"===r||0===o,a=M.seriesData.series.length,n=!!M.globals.comboCharts||e===a-1;D.animateDraw(Y,{realIndex:e,j:t,isFill:s,isLast:n,speed:i,delay:0,mask:y})}else O||D.animatePathsGradually(l(n({},W),{speed:p}));return P&&!O&&(M.globals.dataChanged&&F||E)&&D.animatePathsGradually(l(n({},W),{speed:u})),O&&D.revealBulk(Y),Y}drawPattern(t,e,i,s="#a8a8a8",a=0){return this.w.dom.Paper.pattern(e,i,r=>{"horizontalLines"===t?r.line(0,0,i,0).stroke({color:s,width:a+1}):"verticalLines"===t?r.line(0,0,0,e).stroke({color:s,width:a+1}):"slantedLines"===t?r.line(0,0,e,i).stroke({color:s,width:a}):"squares"===t?r.rect(e,i).fill("none").stroke({color:s,width:a}):"circles"===t&&r.circle(e).fill("none").stroke({color:s,width:a})})}drawGradient(t,e,i,s,a,r=null,o=null,n=[],l=0,c=!1){const h=this.w;let d;e.length<9&&0===e.indexOf("#")&&(e=A.hexToRgba(e,s)),i.length<9&&0===i.indexOf("#")&&(i=A.hexToRgba(i,a));let p=0,u=1,g=1,x=null;null!==o&&(p=void 0!==o[0]?o[0]/100:0,u=void 0!==o[1]?o[1]/100:1,g=void 0!==o[2]?o[2]/100:1,x=void 0!==o[3]?o[3]/100:null);const f=!("donut"!==h.config.chart.type&&"pie"!==h.config.chart.type&&"polarArea"!==h.config.chart.type&&"bubble"!==h.config.chart.type);if(d=n&&0!==n.length?h.dom.Paper.gradient(f?"radial":"linear",t=>{(Array.isArray(n[l])?n[l]:Array.isArray(n[0])?n[0]||[]:n).forEach(e=>{t.stop(e.offset/100,e.color,e.opacity)})}):h.dom.Paper.gradient(f?"radial":"linear",t=>{t.stop(p,e,s),t.stop(u,i,a),t.stop(g,i,a),null!==x&&t.stop(x,e,s)}),f){const t=h.layout.gridWidth/2,e=h.layout.gridHeight/2;"bubble"!==h.config.chart.type?d.attr({gradientUnits:"userSpaceOnUse",cx:t,cy:e,r:r}):d.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else"vertical"===t?c?(d.attr({gradientUnits:"userSpaceOnUse"}),d.from(0,0).to(0,h.layout.gridHeight)):d.from(0,0).to(0,1):"diagonal"===t?d.from(0,0).to(1,1):"horizontal"===t?d.from(0,1).to(1,1):"diagonal2"===t&&d.from(1,0).to(0,1);return d}getTextBasedOnMaxWidth({text:t,maxWidth:e,fontSize:i,fontFamily:s}){const a=this.getTextRects(t,i,s,""),r=a.width/t.length,o=Math.floor(e/r);return e<a.width?t.slice(0,o-3)+"...":t}drawText({x:t,y:e,text:i,textAnchor:s,fontSize:a,fontFamily:r,fontWeight:o,foreColor:l,opacity:c,maxWidth:h,cssClass:d="",isPlainText:p=!0,dominantBaseline:u="auto"}){const g=this.w;void 0===i&&(i="");let x=i;s||(s="start"),l&&l.length||(l=g.config.chart.foreColor),r=r||g.config.chart.fontFamily,o=o||"regular";const f={maxWidth:h,fontSize:a=a||"11px",fontFamily:r};let m;return Array.isArray(i)?m=g.dom.Paper.text(t=>{for(let e=0;e<i.length;e++)x=i[e],h&&(x=this.getTextBasedOnMaxWidth(n({text:i[e]},f))),0===e?t.tspan(x):t.tspan(x).newLine()}):(h&&!p&&(x=this.getTextBasedOnMaxWidth(n({text:i},f))),m=p?g.dom.Paper.plain(i):g.dom.Paper.text(t=>t.tspan(x))),m.attr({x:t,y:e,"text-anchor":s,"dominant-baseline":u,"font-size":a,"font-family":r,"font-weight":o,fill:l,class:"apexcharts-text "+d}),m.node.style.fontFamily=r,m.node.style.opacity=c,m}getMarkerPath(t,e,i,s){let a="";switch(i){case"cross":a=`M ${t-(s/=1.4)} ${e-s} L ${t+s} ${e+s} M ${t-s} ${e+s} L ${t+s} ${e-s}`;break;case"plus":a=`M ${t-(s/=1.12)} ${e} L ${t+s} ${e} M ${t} ${e-s} L ${t} ${e+s}`;break;case"star":case"sparkle":{let r=5;s*=1.15,"sparkle"===i&&(s/=1.1,r=4);const o=Math.PI/r;for(let i=0;i<=2*r;i++){const r=i*o,n=i%2==0?s:s/2;a+=(0===i?"M":"L")+(t+n*Math.sin(r))+","+(e-n*Math.cos(r))}a+="Z";break}case"triangle":a=`M ${t} ${e-s} \n L ${t+s} ${e+s} \n L ${t-s} ${e+s} \n Z`;break;case"square":case"rect":a=`M ${t-(s/=1.125)} ${e-s} \n L ${t+s} ${e-s} \n L ${t+s} ${e+s} \n L ${t-s} ${e+s} \n Z`;break;case"diamond":a=`M ${t} ${e-(s*=1.05)} \n L ${t+s} ${e} \n L ${t} ${e+s} \n L ${t-s} ${e} \n Z`;break;case"line":a=`M ${t-(s/=1.1)} ${e} \n L ${t+s} ${e}`;break;default:a=`M ${t}, ${e} \n m -${(s*=2)/2}, 0 \n a ${s/2},${s/2} 0 1,0 ${s},0 \n a ${s/2},${s/2} 0 1,0 -${s},0`}return a}drawMarkerShape(t,e,i,s,a){const r=this.drawPath({d:this.getMarkerPath(t,e,i,s),stroke:a.pointStrokeColor,strokeDashArray:a.pointStrokeDashArray,strokeWidth:a.pointStrokeWidth,fill:a.pointFillColor,fillOpacity:a.pointFillOpacity,strokeOpacity:a.pointStrokeOpacity});return r.attr({cx:t,cy:e,shape:a.shape,class:a.class?a.class:""}),r}drawMarker(t,e,i){t=t||0;let s=i.pSize||0;return A.isNumber(e)||(s=0,e=0),this.drawMarkerShape(t,e,null==i?void 0:i.shape,s,n(n({},i),"line"===i.shape||"plus"===i.shape||"cross"===i.shape?{pointStrokeColor:i.pointFillColor,pointStrokeOpacity:i.pointFillOpacity}:{}))}pathMouseEnter(t,e){var i,s;const a=this.w,r=new ee(this.w),o=parseInt(null!=(i=t.node.getAttribute("index"))?i:"",10),n=parseInt(null!=(s=t.node.getAttribute("j"))?s:"",10);if(!(isNaN(o)||isNaN(n)||("function"==typeof a.config.chart.events.dataPointMouseEnter&&a.config.chart.events.dataPointMouseEnter(e,this.ctx,{seriesIndex:o,dataPointIndex:n,w:a}),ae._fireEvent(a,"dataPointMouseEnter",[e,this.ctx,{seriesIndex:o,dataPointIndex:n,w:a}]),"none"!==a.config.states.active.filter.type&&"true"===t.node.getAttribute("selected")||ee.hoverOutlineOwnsHoverState(a)||"none"===a.config.states.hover.filter.type||a.interact.isTouchDevice))){const e=a.config.states.hover.filter;r.applyFilter(t,o,e.type,e.value)}}pathMouseLeave(t,e){var i,s;const a=this.w,r=new ee(this.w),o=parseInt(null!=(i=t.node.getAttribute("index"))?i:"",10),n=parseInt(null!=(s=t.node.getAttribute("j"))?s:"",10);isNaN(o)||isNaN(n)||("function"==typeof a.config.chart.events.dataPointMouseLeave&&a.config.chart.events.dataPointMouseLeave(e,this.ctx,{seriesIndex:o,dataPointIndex:n,w:a}),ae._fireEvent(a,"dataPointMouseLeave",[e,this.ctx,{seriesIndex:o,dataPointIndex:n,w:a}]),"none"!==a.config.states.active.filter.type&&"true"===t.node.getAttribute("selected")||ee.hoverOutlineOwnsHoverState(a)||"none"!==a.config.states.hover.filter.type&&r.getDefaultFilter(t,o))}_clearAllDataPointSelections(t,e){const i=this.w;i.interact.selectedDataPoints=[];const s=i.dom.Paper.find(".apexcharts-series path:not(.apexcharts-decoration-element)"),a=i.dom.Paper.find(".apexcharts-series circle:not(.apexcharts-decoration-element), .apexcharts-series rect:not(.apexcharts-decoration-element)"),r=i=>{Array.prototype.forEach.call(i,i=>{i.node.setAttribute("selected","false"),t.getDefaultFilter(i,e)})};r(s),r(a)}_togglePointSelection(t,e,i,s){const a=this.w;if("true"===t.node.getAttribute("selected")){t.node.setAttribute("selected","false");const e=a.interact.selectedDataPoints[i].indexOf(s);return e>-1&&a.interact.selectedDataPoints[i].splice(e,1),"false"}return!a.config.states.active.allowMultipleDataPointsSelection&&a.interact.selectedDataPoints.length>0&&this._clearAllDataPointSelections(e,i),t.node.setAttribute("selected","true"),void 0===a.interact.selectedDataPoints[i]&&(a.interact.selectedDataPoints[i]=[]),a.interact.selectedDataPoints[i].push(s),"true"}_applyPointSelectionFilter(t,e,i,s){const a=this.w;if(!ee.sliceOffsetOwnsActiveState(a))if("true"===s){const s=a.config.states.active.filter;if("none"!==s)e.applyFilter(t,i,s.type,s.value);else if("none"!==a.config.states.hover.filter&&!a.interact.isTouchDevice){const s=a.config.states.hover.filter;e.applyFilter(t,i,s.type,s.value)}}else if("none"!==a.config.states.active.filter.type)if("none"===a.config.states.hover.filter.type||a.interact.isTouchDevice)e.getDefaultFilter(t,i);else{const s=a.config.states.hover.filter;e.applyFilter(t,i,s.type,s.value)}}pathMouseDown(t,e){var i,s;const a=this.w,r=new ee(this.w),o=parseInt(null!=(i=t.node.getAttribute("index"))?i:"",10),n=parseInt(null!=(s=t.node.getAttribute("j"))?s:"",10);if(isNaN(o)||isNaN(n))return;const l=a.config.chart.link;if(!!(!l||"function"!=typeof l.dimension&&!l.enabled)){const e=this._togglePointSelection(t,r,o,n);this._applyPointSelectionFilter(t,r,o,e)}"function"==typeof a.config.chart.events.dataPointSelection&&a.config.chart.events.dataPointSelection(e,this.ctx,{selectedDataPoints:a.interact.selectedDataPoints,seriesIndex:o,dataPointIndex:n,w:a}),e&&ae._fireEvent(a,"dataPointSelection",[e,this.ctx,{selectedDataPoints:a.interact.selectedDataPoints,seriesIndex:o,dataPointIndex:n,w:a}])}rotateAroundCenter(t){let e={};t&&"function"==typeof t.getBBox&&(e=t.getBBox());return{x:e.x+e.width/2,y:e.y+e.height/2}}setupEventDelegation(t,e){let i=null;t.node.addEventListener("mouseover",s=>{const a=ae._findDelegateTarget(s.target,t.node,e);a&&a!==i&&(i&&i.instance&&this.pathMouseLeave(i.instance,s),i=a,a.instance&&this.pathMouseEnter(a.instance,s))}),t.node.addEventListener("mouseout",s=>{if(!i)return;(s.relatedTarget?ae._findDelegateTarget(s.relatedTarget,t.node,e):null)!==i&&(i&&i.instance&&this.pathMouseLeave(i.instance,s),i=null)}),t.node.addEventListener("mousedown",i=>{const s=ae._findDelegateTarget(i.target,t.node,e);s&&s.instance&&this.pathMouseDown(s.instance,i)})}static _fireEvent(t,e,i){const s=t.globals.events;if(!s||!Object.prototype.hasOwnProperty.call(s,e))return;const a=s[e];for(let t=0;t<a.length;t++)a[t].apply(null,i)}static _findDelegateTarget(t,e,i){for(;t&&t!==e;){if(t.matches&&t.matches(i))return t;t=t.parentNode}return null}static setAttrs(t,e){for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.setAttribute(i,e[i])}getTextRects(t,e,i,s,a=!0,r){const o=this.w,n=[t,e,i,s,a,r].join("\0"),l=o.globals.textRectsCache;if(l&&l.has(n))return l.get(n);const c=this.drawText({x:-200,y:-200,text:t,textAnchor:"start",fontSize:e,fontFamily:i,fontWeight:r,foreColor:"#fff",opacity:0});s&&c.attr("transform",s),o.dom.Paper.add(c);let h=c.bbox();const d=h.y;a||(h=c.node.getBoundingClientRect()),c.remove();const p={width:h.width,height:h.height,centerOffset:a?d+h.height/2- -200:0};return l&&l.set(n,p),p}placeTextWithEllipsis(t,e,i){if("function"==typeof t.getComputedTextLength&&(t.textContent=e,e.length>0&&t.getComputedTextLength()>=i/1.1)){for(let s=e.length-3;s>0;s-=3)if(t.getSubStringLength(0,s)<=i/1.1)return void(t.textContent=e.substring(0,s)+"...");t.textContent="."}}}class re{constructor(t){this.w=t,this.opts=null,this.seriesIndex=0,this.patternIDs=[]}clippedImgArea(t){const e=this.w,i=e.config,s=parseInt(String(e.layout.gridWidth),10),a=parseInt(String(e.layout.gridHeight),10),r=s>a?s:a,o=t.image;let n=0,l=0;void 0===t.width&&void 0===t.height?void 0!==i.fill.image.width&&void 0!==i.fill.image.height?(n=i.fill.image.width+1,l=i.fill.image.height):(n=r+1,l=r):(n=t.width,l=t.height);const c=y.createElementNS(xt,"pattern");ae.setAttrs(c,{id:t.patternID,patternUnits:t.patternUnits?t.patternUnits:"userSpaceOnUse",width:n+"px",height:l+"px"});const h=y.createElementNS(xt,"image");c.appendChild(h);const p=d.isBrowser()?window.SVG:global.SVG;h.setAttributeNS(p.xlink,"href",o),ae.setAttrs(h,{x:0,y:0,preserveAspectRatio:"none",width:n+"px",height:l+"px"}),h.style.opacity=t.opacity,e.dom.elDefs.node.appendChild(c)}getSeriesIndex(t){const e=this.w,i=e.config.chart.type;return("bar"===i||"rangeBar"===i)&&e.config.plotOptions.bar.distributed||"heatmap"===i||"treemap"===i?this.seriesIndex=t.seriesNumber:this.seriesIndex=t.seriesNumber%e.seriesData.series.length,this.seriesIndex}getSeriesAxisRange(t){var e,i;const s=this.w,a=null!=(i=null==(e=s.globals.seriesYAxisReverseMap)?void 0:e[t])?i:0,r=s.config.yaxis[a];return{minY:A.isNumber(s.globals.minYArr[t])?s.globals.minYArr[t]:s.globals.minY,maxY:A.isNumber(s.globals.maxYArr[t])?s.globals.maxYArr[t]:s.globals.maxY,reversed:!!(null==r?void 0:r.reversed),log:!!(null==r?void 0:r.logarithmic)}}computeColorStops(t,e){const i=this.w,{threshold:s,colorAboveThreshold:a,colorBelowThreshold:r}=e,{minY:o,maxY:n}=t,l=n-o;let c=0===l?s>n?0:100:t.log&&o>0&&s>0?100-Math.log(s/o)/Math.log(n/o)*100:(n-s)/l*100;t.reversed&&(c=100-c),c=Math.max(0,Math.min(c,100));const h=Array.isArray(i.config.fill.opacity)?i.config.fill.opacity[this.seriesIndex]:i.config.fill.opacity,d={offset:c,color:a,opacity:h},p={offset:c,color:r,opacity:h};return t.reversed?[p,d]:[d,p]}fillPath(t){var e,i,s,a,r,o,n;const l=this.w;this.opts=t;const c=this.w.config;let h,d,p;this.seriesIndex=this.getSeriesIndex(t);const u=l.config.series[this.seriesIndex],g=c.plotOptions.line.colors.colorAboveThreshold&&c.plotOptions.line.colors.colorBelowThreshold&&/^(line|area|rangeArea)$/.test((null==u?void 0:u.type)||c.chart.type);let x=this.getFillColors()[this.seriesIndex];void 0!==l.seriesData.seriesColors[this.seriesIndex]&&(x=l.seriesData.seriesColors[this.seriesIndex]),"function"==typeof x&&(x=x({seriesIndex:this.seriesIndex,dataPointIndex:t.dataPointIndex,value:t.value,w:l}));const f=t.fillType?t.fillType:this.getFillType(this.seriesIndex);let m=Array.isArray(c.fill.opacity)?c.fill.opacity[this.seriesIndex]:c.fill.opacity;const b="gradient"===f||g;t.color&&(x=t.color),(null==(i=null==(e=null==u?void 0:u.data)?void 0:e[t.dataPointIndex])?void 0:i.fillColor)&&(x=null==(a=null==(s=null==u?void 0:u.data)?void 0:s[t.dataPointIndex])?void 0:a.fillColor),x||(x="#fff",console.warn("undefined color - ApexCharts")),void 0!==t.opacity&&null!==t.opacity&&(m=t.opacity);let y=x;A.isCSSVariable(x)?y=A.applyOpacityToColor(x,m):-1===x.indexOf("rgb")?-1===x.indexOf("#")?y=x:x.length<9&&(y=A.hexToRgba(x,m)):x.indexOf("rgba")>-1?m=A.getOpacityFromRGBA(x):y=A.hexToRgba(A.rgb2hex(x),m);const v=A.getThemeColor(x,l.dom.elWrap);if("pattern"===f&&(d=this.handlePatternFill({fillConfig:t.fillConfig,patternFill:d,fillColor:v,defaultColor:y})),b){const e=c.fill.gradient.colorStops?[...c.fill.gradient.colorStops]:[];let i=null!=(n=null==(o=null==(r=t.fillConfig)?void 0:r.gradient)?void 0:o.type)?n:c.fill.gradient.type;g&&(e[this.seriesIndex]=this.computeColorStops(this.getSeriesAxisRange(this.seriesIndex),c.plotOptions.line.colors),i="vertical"),p=this.handleGradientFill({type:i,fillConfig:t.fillConfig,fillColor:v,fillOpacity:m,colorStops:e,i:this.seriesIndex,verticalUserSpace:g})}if("image"===f){const e=c.fill.image.src,i=t.patternID?t.patternID:"",s=`pattern${l.globals.cuid}${t.seriesNumber+1}${i}`;-1===this.patternIDs.indexOf(s)&&(this.clippedImgArea({opacity:m,image:Array.isArray(e)?t.seriesNumber<e.length?e[t.seriesNumber]:e[0]:e,width:t.width?t.width:void 0,height:t.height?t.height:void 0,patternUnits:t.patternUnits,patternID:s}),this.patternIDs.push(s)),h=`url(#${s})`}else h=b?p:"pattern"===f?d:y;return t.solid&&(h=y),h}getFillType(t){const e=this.w;return Array.isArray(e.config.fill.type)?e.config.fill.type[t]:e.config.fill.type}getFillColors(){const t=this.w,e=t.config,i=this.opts;let s=[];return t.globals.comboCharts?"line"===t.config.series[this.seriesIndex].type?Array.isArray(t.globals.stroke.colors)?s=t.globals.stroke.colors:s.push(t.globals.stroke.colors):Array.isArray(t.globals.fill.colors)?s=t.globals.fill.colors:s.push(t.globals.fill.colors):"line"===e.chart.type?Array.isArray(t.globals.stroke.colors)?s=t.globals.stroke.colors:s.push(t.globals.stroke.colors):Array.isArray(t.globals.fill.colors)?s=t.globals.fill.colors:s.push(t.globals.fill.colors),void 0!==i.fillColors&&(s=[],Array.isArray(i.fillColors)?s=i.fillColors.slice():s.push(i.fillColors)),s}handlePatternFill({fillConfig:t,patternFill:e,fillColor:i,defaultColor:s}){let a=this.w.config.fill;t&&(a=t);const r=this.opts,o=new ae(this.w),n=Array.isArray(a.pattern.strokeWidth)?a.pattern.strokeWidth[this.seriesIndex]:a.pattern.strokeWidth,l=i;if(Array.isArray(a.pattern.style))if(void 0!==a.pattern.style[r.seriesNumber]){e=o.drawPattern(a.pattern.style[r.seriesNumber],a.pattern.width,a.pattern.height,l,n)}else e=s;else e=o.drawPattern(a.pattern.style,a.pattern.width,a.pattern.height,l,n);return e}handleGradientFill({type:t,fillColor:e,fillOpacity:i,fillConfig:s,colorStops:a,i:r,verticalUserSpace:o=!1}){let l=this.w.config.fill;s&&(l=n(n({},l),s));const c=this.opts,h=new ae(this.w),d=new A;t=t||l.gradient.type;let p,u=e,g=void 0===l.gradient.opacityFrom?i:Array.isArray(l.gradient.opacityFrom)?l.gradient.opacityFrom[r]:l.gradient.opacityFrom;u.indexOf("rgba")>-1&&(g=A.getOpacityFromRGBA(u));let x=void 0===l.gradient.opacityTo?i:Array.isArray(l.gradient.opacityTo)?l.gradient.opacityTo[r]:l.gradient.opacityTo;if(void 0===l.gradient.gradientToColors||0===l.gradient.gradientToColors.length)p="dark"===l.gradient.shade?d.shadeColor(-1*parseFloat(l.gradient.shadeIntensity),e.indexOf("rgb")>-1?A.rgb2hex(e):e):d.shadeColor(parseFloat(l.gradient.shadeIntensity),e.indexOf("rgb")>-1?A.rgb2hex(e):e);else if(l.gradient.gradientToColors[c.seriesNumber]){const t=l.gradient.gradientToColors[c.seriesNumber];p=t,t.indexOf("rgba")>-1&&(x=A.getOpacityFromRGBA(t))}else p=e;if(l.gradient.gradientFrom&&(u=l.gradient.gradientFrom),l.gradient.gradientTo&&(p=l.gradient.gradientTo),l.gradient.inverseColors){const t=u;u=p,p=t}return u.indexOf("rgb")>-1&&(u=A.rgb2hex(u)),p.indexOf("rgb")>-1&&(p=A.rgb2hex(p)),h.drawGradient(t,u,p,g,x,c.size,l.gradient.stops,a,r,o)}}const oe=["none","lighten","darken"];function ne(t,e){const i=t&&t.renderer;return i&&i.kind&&"svg"!==i.kind?i:e}function le(t){var e,i,s,a;const r=t.config.fill&&t.config.fill.type,o=t=>"pattern"===t||"image"===t||"gradient"===t;if(Array.isArray(r)?r.some(o):o(r))return!0;const n=null==(i=null==(e=t.config.plotOptions)?void 0:e.line)?void 0:i.colors;if(n&&n.colorAboveThreshold&&n.colorBelowThreshold)return!0;if("heatmap"===t.config.chart.type&&"rect"!==((null==(a=null==(s=t.config.plotOptions)?void 0:s.heatmap)?void 0:a.shape)||"rect"))return!0;const l=t.config.states||{},c=l.hover&&l.hover.filter&&l.hover.filter.type,h=l.active&&l.active.filter&&l.active.filter.type;return!(!c||oe.includes(c))||!(!h||oe.includes(h))}class ce{constructor(t,e){this.w=t,this.ctx=e,this._filters=new ee(this.w),this._graphics=new ae(this.w,this.ctx),this._seriesWrap=null,this._seriesWrapIndex=-1,this._batch=null}resetSeriesWrapCache(){this._seriesWrap=null,this._seriesWrapIndex=-1,this._batch=null}static markersAreInert(t){const e=t.config.chart.type;return!("line"!==e&&"area"!==e||t.globals.comboCharts||t.config.tooltip.intersect)}_shouldBatch(){var t,e,i,s,a;const r=this.w,o=r.config.markers,n=null!=(t=o.largeDatasetThreshold)?t:0;if(n<=0)return!1;if("canvas"===(null==(i=null==(e=this.ctx)?void 0:e.renderer)?void 0:i.kind))return!1;if(!ce.markersAreInert(r))return!1;if(o.discrete&&o.discrete.length)return!1;if(o.onClick||o.onDblClick)return!1;if(null==(s=r.config.chart.events)?void 0:s.dataPointSelection)return!1;const l=r.seriesData.series;if(!Array.isArray(l)||!l.length)return!1;let c=!1;for(let t=0;t<l.length;t++){if(!Array.isArray(l[t]))return!1;let e=!1,i=!1;const s=null==(a=r.config.series[t])?void 0:a.data;for(let a=0;a<l[t].length;a++){null===l[t][a]&&(e=!0);const r=Array.isArray(s)?s[a]:null;if(r&&(r.fillColor||r.strokeColor)){i=!0;break}}if(i)return!1;(r.globals.markers.size[t]>0||e&&o.showNullDataPoints)&&(l[t].length>n&&(c=!0))}return c}setGlobalMarkerSize(){const t=this.w;if(t.globals.markers.size=Array.isArray(t.config.markers.size)?t.config.markers.size:[t.config.markers.size],t.globals.markers.size.length>0){if(t.globals.markers.size.length<t.seriesData.series.length+1)for(let e=0;e<=t.seriesData.series.length;e++)void 0===t.globals.markers.size[e]&&t.globals.markers.size.push(t.globals.markers.size[0])}else t.globals.markers.size=t.config.series.map(()=>t.config.markers.size);t.globals.markers.batched=this._shouldBatch()}plotChartMarkers({pointsPos:t,seriesIndex:e,j:i,pSize:s,alwaysDrawMarker:a=!1,isVirtualPoint:r=!1}){const o=this.w,n=e,l=t;let c=null;const h=new ae(this.w),d=ne(this.ctx,h),p=o.config.markers.discrete&&o.config.markers.discrete.length;if(Array.isArray(l.x))for(let t=0;t<l.x.length;t++){let u,g=i,x=!A.isNumber(l.y[t]);0===o.globals.markers.largestSize&&o.globals.hasNullValues&&null!==o.seriesData.series[n][i+1]&&!r&&(x=!0),1===i&&0===t&&(g=0),1===i&&1===t&&(g=1);let f="apexcharts-marker";ce.markersAreInert(o)&&(f+=" no-pointer-events");const m=Array.isArray(o.config.markers.size)?o.globals.markers.size[e]>0:o.config.markers.size>0;if(o.globals.markers.batched&&(m||a)&&!p&&!r)this._batchPoint(e,g,l.x[t],l.y[t],{invalid:x,graphics:h,pSize:a?s:void 0,trackPoint:!a});else if(m||a||p){"canvas"===d.kind&&(m||p)&&(void 0===o.globals.pointsArray[e]&&(o.globals.pointsArray[e]=[]),o.globals.pointsArray[e][g]=[l.x[t],l.y[t]]),x||(f+=` w${A.randomId()}`);const i=this.getMarkerConfig({cssClass:f,seriesIndex:e,dataPointIndex:g}),r=o.config.series[n];if(r.data[g]&&(r.data[g].fillColor&&(i.pointFillColor=r.data[g].fillColor),r.data[g].strokeColor&&(i.pointStrokeColor=r.data[g].strokeColor)),void 0!==s&&(i.pSize=s),(l.x[t]<-o.globals.markers.largestSize||l.x[t]>o.layout.gridWidth+o.globals.markers.largestSize||l.y[t]<-o.globals.markers.largestSize||l.y[t]>o.layout.gridHeight+o.globals.markers.largestSize)&&(i.pSize=0),!x){if((o.globals.markers.size[e]>0||a||p)&&!c){const t=!a&&!p;t&&this._seriesWrap&&this._seriesWrapIndex===e?c=this._seriesWrap:(c=d.group({class:t?"apexcharts-series-markers":""}),c.attr("clip-path",`url(#gridRectMarkerMask${o.globals.cuid})`),this.setupMarkerDelegation(c),t&&(this._seriesWrap=c,this._seriesWrapIndex=e))}u=d.drawMarker(l.x[t],l.y[t],i),u.attr("rel",g),u.attr("j",g),u.attr("index",e),u.node.setAttribute("default-marker-size",i.pSize),jt(u,l.x[t],o),this._filters.setSelectionFilter(u,e,g),c&&c.add(u)}}else void 0===o.globals.pointsArray[e]&&(o.globals.pointsArray[e]=[]),o.globals.pointsArray[e].push([l.x[t],l.y[t]])}return c}_batchPoint(t,e,i,s,{invalid:a,graphics:r,pSize:o,trackPoint:n}){const l=this.w;if(n&&(void 0===l.globals.pointsArray[t]&&(l.globals.pointsArray[t]=[]),l.globals.pointsArray[t][e]=[i,s]),a)return;this._batch&&this._batch.seriesIndex===t||(this._batch={seriesIndex:t,opts:this.getMarkerConfig({cssClass:"",seriesIndex:t}),sizes:new Map});const c=void 0===o?this._batch.opts.pSize:o;if(!(c>0))return;const h=l.globals.markers.largestSize;if(i<-h||i>l.layout.gridWidth+h||s<-h||s>l.layout.gridHeight+h)return;let d=this._batch.sizes.get(c);d||(d=[],this._batch.sizes.set(c,d)),d.push(r.getMarkerPath(i,s,this._batch.opts.shape,c))}flushBatch(t,e){const i=this._batch;if(this._batch=null,!i||i.seriesIndex!==e||!i.sizes.size)return[];const s=this.w,a=new ae(this.w),r=i.opts,o="line"===r.shape||"plus"===r.shape||"cross"===r.shape,n=o?r.pointFillColor:r.pointStrokeColor,l=o?r.pointFillOpacity:r.pointStrokeOpacity,c=[];return i.sizes.forEach((i,o)=>{if(!i.length)return;const h=a.drawPath({d:i.join(" "),fill:r.pointFillColor,fillOpacity:r.pointFillOpacity,stroke:n,strokeOpacity:l,strokeWidth:r.pointStrokeWidth,strokeDashArray:r.pointStrokeDashArray});h.attr({class:"apexcharts-marker-batch"+(ce.markersAreInert(s)?" no-pointer-events":""),"clip-path":`url(#gridRectMarkerMask${s.globals.cuid})`,shape:r.shape,index:e,"default-marker-size":o}),t.add(h),c.push(h)}),c}getMarkerConfig({cssClass:t,seriesIndex:e,dataPointIndex:i=null,radius:s=null,size:a=null,strokeWidth:r=null}){const o=this.w,n=this.getMarkerStyle(e);let l=null===a?o.globals.markers.size[e]:a;const c=o.config.markers;return null!==i&&c.discrete.length&&c.discrete.map(t=>{t.seriesIndex===e&&t.dataPointIndex===i&&(void 0!==t.strokeColor&&(n.pointStrokeColor=t.strokeColor),void 0!==t.fillColor&&(n.pointFillColor=t.fillColor),void 0!==t.size&&(l=t.size),void 0!==t.shape&&(n.pointShape=t.shape))}),{pSize:null===s?l:s,pRadius:null!==s?s:c.radius,pointStrokeWidth:null!==r?r:Array.isArray(c.strokeWidth)?c.strokeWidth[e]:c.strokeWidth,pointStrokeColor:n.pointStrokeColor,pointFillColor:n.pointFillColor,shape:n.pointShape||(Array.isArray(c.shape)?c.shape[e]:c.shape),class:t,pointStrokeOpacity:Array.isArray(c.strokeOpacity)?c.strokeOpacity[e]:c.strokeOpacity,pointStrokeDashArray:Array.isArray(c.strokeDashArray)?c.strokeDashArray[e]:c.strokeDashArray,pointFillOpacity:Array.isArray(c.fillOpacity)?c.fillOpacity[e]:c.fillOpacity,seriesIndex:e}}setupMarkerDelegation(t){const e=this.w,i=".apexcharts-marker";this._graphics.setupEventDelegation(t,i),t.node.addEventListener("click",s=>{if(e.config.markers.onClick){ae._findDelegateTarget(s.target,t.node,i)&&e.config.markers.onClick(s)}}),t.node.addEventListener("dblclick",s=>{if(e.config.markers.onDblClick){ae._findDelegateTarget(s.target,t.node,i)&&e.config.markers.onDblClick(s)}}),t.node.addEventListener("touchstart",e=>{const s=ae._findDelegateTarget(e.target,t.node,i);s&&s.instance&&this._graphics.pathMouseDown(s.instance,e)},{passive:!0})}getMarkerStyle(t){const e=this.w,i=e.globals.markers.colors,s=e.config.markers.strokeColor||e.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(s)?s[t]:s,pointFillColor:Array.isArray(i)?i[t]:i}}}class he{constructor(t,e){this.ctx=e,this.w=t,this.initialAnim=this.w.config.chart.animations.enabled,this.anim=new Jt(this.w),this.filters=new ee(this.w),this.fill=new re(this.w),this.markers=new ce(this.w,this.ctx),this.graphics=new ae(this.w),this._elPointsWrap=null,this._elPointsWrapParent=null,this._perSeries=null}draw(t,e,i){const s=this.w,a=this.graphics,r=ne(this.ctx,a),o=i.realIndex,n=i.pointsPos,l=i.zRatio,c=i.elParent;let h=this._elPointsWrap;if(h&&this._elPointsWrapParent===c||(h=r.group({class:`apexcharts-series-markers apexcharts-series-${s.config.chart.type}`}),h.attr("clip-path",`url(#gridRectMarkerMask${s.globals.cuid})`),this.markers.setupMarkerDelegation(h),c.add(h),this._elPointsWrap=h,this._elPointsWrapParent=c,this._perSeries=this._buildPerSeriesCache(o,r)),Array.isArray(n.x))for(let t=0;t<n.x.length;t++){let i=e+1,a=!0;0===e&&0===t&&(i=0),0===e&&1===t&&(i=1);let c=s.globals.markers.size[o];if(l!==1/0){const t=s.config.plotOptions.bubble;c=s.seriesData.seriesZ[o][i],t.zScaling&&(c/=l),t.minBubbleRadius&&c<t.minBubbleRadius&&(c=t.minBubbleRadius),t.maxBubbleRadius&&c>t.maxBubbleRadius&&(c=t.maxBubbleRadius)}const d=n.x[t],p=n.y[t];if(c=c||0,null!==p&&void 0!==s.seriesData.series[o][i]||(a=!1),a){const t=this.drawPoint(d,p,c,o,i,e);h.add(t),"canvas"===r.kind&&(void 0===s.globals.pointsArray[o]&&(s.globals.pointsArray[o]=[]),s.globals.pointsArray[o][i]=[d,p])}}}_buildPerSeriesCache(t,e){var i;const s=this.w;return{realIndex:t,emit:e,isBubble:"bubble"===s.config.chart.type||s.globals.comboCharts&&s.config.series[t]&&"bubble"===s.config.series[t].type,canCacheConfig:!s.config.markers.discrete.length,markerConfig:null,fillCacheable:void 0,fillCircle:void 0,dropShadowEnabled:s.config.chart.dropShadow.enabled,doInitialAnim:this.initialAnim&&!s.globals.dataChanged&&!s.globals.resized,jitter:null==(i=s.config.plotOptions.scatter)?void 0:i.jitter,anim:null}}drawPoint(t,e,i,s,a,r){var o;const n=this.w,l=s,c=this.anim,h=this.filters,d=this.fill,p=this.markers;let u=this._perSeries;u&&u.realIndex===s||(u=this._perSeries=this._buildPerSeriesCache(s,ne(this.ctx,this.graphics)));const g=u.emit;let x;u.canCacheConfig?(u.markerConfig||(u.markerConfig=p.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:l,dataPointIndex:a,radius:u.isBubble?i:null})),x=u.markerConfig,u.isBubble&&(x.pSize=i,x.pRadius=i)):x=p.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:l,dataPointIndex:a,radius:u.isBubble?i:null});const f=n.config.series[l].data[a];let m;void 0!==u.fillCircle?m=u.fillCircle:(m=d.fillPath({seriesNumber:s,dataPointIndex:a,color:x.pointFillColor,patternUnits:"objectBoundingBox",value:n.seriesData.series[s][r]}),void 0===u.fillCacheable&&(u.fillCacheable=u.canCacheConfig&&"solid"===d.getFillType(s)&&"string"==typeof x.pointFillColor&&!!x.pointFillColor),u.fillCacheable&&!(null==f?void 0:f.fillColor)&&(u.fillCircle=m));const b=g.drawMarker(t,e,x);(null==f?void 0:f.fillColor)&&(m=f.fillColor);const y=u.jitter;if((null==y?void 0:y.enabled)&&y.distributed&&n.globals.colors.length){const t=Math.round(null==(o=n.seriesData.seriesX[s])?void 0:o[a]);isNaN(t)||(m=n.globals.colors[t%n.globals.colors.length])}if(b.attr({fill:m}),u.dropShadowEnabled){const t=n.config.chart.dropShadow;h.dropShadow(b,t,s)}if(u.doInitialAnim){if(!u.anim){const t=n.config.chart.animations,e=n.globals.dataPoints||1,i=t.animateGradually,s=i&&!1!==i.enabled;u.anim={popSpeed:t.speed,baseDelay:s?Math.min(20,.5*t.speed/Math.max(1,e)):0}}const t=qt({style:u.anim.baseDelay>0?"sequential":"none",index:a,baseDelay:u.anim.baseDelay});c.animatePop(b,{speed:u.anim.popSpeed,delay:t,onComplete:()=>c.animationCompleted(b)})}else n.globals.animationEnded=!0;return b.attr({rel:a,j:a,index:s,"default-marker-size":x.pSize}),h.setSelectionFilter(b,s,a),b}centerTextInBubble(t){const e=this.w;return{y:t+=parseInt(e.config.dataLabels.style.fontSize,10)/4}}}const de=(t,e,i,s)=>{if("function"!=typeof t)return t;const a=t({series:e.seriesData.series,seriesIndex:i,dataPointIndex:s,w:e});return Number.isFinite(a)?a:0};function pe(t,e,i,s){const a=t.y+e,r=i.y+s;return Math.min(a+t.height,r+i.height)-Math.max(a,r)}function ue(t,e){return Math.min(t.x+t.width,e.x+e.width)-Math.max(t.x,e.x)}const ge=["radar","pie","donut","polarArea","radialBar"];function xe(t,e){var i;const s=null==(i=t.config.series[e])?void 0:i.type;return!s||"line"===s||"area"===s||"rangeArea"===s}class fe{constructor(t,e=null){this.w=t,this.ctx=e}dataLabelsCorrection(t,e,i,s,a,r,o){const n=this.w;let l=!1;const c=new ae(this.w).getTextRects(i,o),h=c.width,d=c.height;e<0&&(e=0),e>n.layout.gridHeight+d&&(e=n.layout.gridHeight+d/2),void 0===n.globals.dataLabelsRects[s]&&(n.globals.dataLabelsRects[s]=[]),n.globals.dataLabelsRects[s].push({x:t,y:e,width:h,height:d});const p=n.globals.dataLabelsRects[s].length-2,u=void 0!==n.globals.lastDrawnDataLabelsIndexes[s]?n.globals.lastDrawnDataLabelsIndexes[s][n.globals.lastDrawnDataLabelsIndexes[s].length-1]:0;if(void 0!==n.globals.dataLabelsRects[s][p]){const i=n.globals.dataLabelsRects[s][u];(t>i.x+i.width||e>i.y+i.height||e+d<i.y||t+h<i.x)&&(l=!0)}return(0===a||r)&&(l=!0),{x:t,y:e,textRects:c,drawnextLabel:l}}drawDataLabel({type:t,pos:e,i:i,j:s,isRangeStart:a,strokeWidth:r=2,row:o}){const n=this.w,l=new ae(this.w),c=n.config.dataLabels;let h=0,d=0,p=s,u=null;if(-1!==n.globals.collapsedSeriesIndices.indexOf(i)||!c.enabled||!Array.isArray(e.x))return u;u=l.group({class:"apexcharts-data-labels"});for(let l=0;l<e.x.length;l++)if(1===s&&0===l&&(p=0),1===s&&1===l&&(p=1),h=e.x[l]+de(c.offsetX,n,i,p),d=e.y[l]+de(c.offsetY,n,i,p)+r,!isNaN(h)){let s=(o||n.seriesData.series[i])[p];"rangeArea"===t&&(s=a?n.rangeData.seriesRangeStart[i][p]:n.rangeData.seriesRangeEnd[i][p]);let r="";const c=t=>n.config.dataLabels.formatter(t,{ctx:this.ctx,seriesIndex:i,dataPointIndex:p,w:n});if("bubble"===n.config.chart.type){s=n.seriesData.seriesZ[i][p],r=c(s),d=e.y[l];d=new he(this.w,this.ctx).centerTextInBubble(d).y}else void 0!==s&&(r=c(s));let g=n.config.dataLabels.textAnchor;n.globals.isSlopeChart&&(g=0===p?"end":p===n.config.series[i].data.length-1?"start":"middle"),this.plotDataLabelsText({x:h,y:d,text:r,i:i,j:p,parent:u,offsetCorrection:!0,dataLabelsConfig:n.config.dataLabels,textAnchor:g})}return u}plotDataLabelsText(t){const e=this.w,i=new ae(this.w);let{x:s,y:a,i:r,j:o,text:n,textAnchor:l,fontSize:c,parent:h,dataLabelsConfig:d,color:p,alwaysDrawDataLabel:u,offsetCorrection:g,className:x,seriesIndex:f=r,dataPointIndex:m=o}=t,b=null;if(!se(e,"dataLabels.enabledOnSeries",r,!Array.isArray(e.config.dataLabels.enabledOnSeries)||e.config.dataLabels.enabledOnSeries.indexOf(r)>=0))return b;let y={x:s,y:a,drawnextLabel:!0,textRects:null};if(g&&(y=this.dataLabelsCorrection(s,a,n,r,o,u,parseInt(d.style.fontSize,10).toString())),e.interact.zoomed||(s=y.x,a=y.y),y.textRects){const t=e.globals.barPadForNumericAxis||0;(s<-(t+20)-y.textRects.width||s>e.layout.gridWidth+y.textRects.width+t+30)&&(n="")}let v=e.globals.dataLabels.style.colors[r];(("bar"===e.config.chart.type||"rangeBar"===e.config.chart.type)&&e.config.plotOptions.bar.distributed||e.config.dataLabels.distributed)&&(v=e.globals.dataLabels.style.colors[o]),"function"==typeof v&&(v=v({series:e.seriesData.series,seriesIndex:r,dataPointIndex:o,w:e})),p&&(v=p);const w="bar"===e.config.chart.type||"rangeBar"===e.config.chart.type,A=w?0:de(d.offsetX,e,f,m);let S=A;const C=w?0:de(d.offsetY,e,f,m);if(e.globals.isSlopeChart&&(0!==o&&(S=-2*A+5),0!==o&&o!==e.config.series[r].data.length-1&&(S=0)),y.drawnextLabel){const t=l||d.textAnchor,p=e.globals.svgWidth-e.layout.translateX,u=parseFloat(c||d.style.fontSize);if(!(s+S+String(n).length*u*1.2<=p)&&("middle"===t||"start"===t)){const e=y.textRects||i.getTextRects(n,c||d.style.fontSize,d.style.fontFamily,"",!0,d.style.fontWeight);s+S+("middle"===t?e.width/2:e.width)>p&&(l="end")}if(b=i.drawText({x:s+S,y:a+C,foreColor:v,textAnchor:l||d.textAnchor,text:n,fontSize:c||d.style.fontSize,fontFamily:d.style.fontFamily,fontWeight:d.style.fontWeight||"normal"}),b.attr({class:x||"apexcharts-datalabel",cx:s,cy:a}),d.dropShadow.enabled){const t=d.dropShadow;new ee(this.w).dropShadow(b,t)}h.add(b),xe(e,r)&&jt(b,s,e),void 0===e.globals.lastDrawnDataLabelsIndexes[r]&&(e.globals.lastDrawnDataLabelsIndexes[r]=[]),e.globals.lastDrawnDataLabelsIndexes[r].push(o)}return b}addBackgroundToDataLabel(t,e){const i=this.w,s=i.config.dataLabels.background,a=s.padding,r=s.padding/2,o=e.width,n=e.height,l=new ae(this.w).drawRect(e.x-a,e.y-r/2,o+2*a,n+r,s.borderRadius,"transparent"!==i.config.chart.background&&i.config.chart.background?i.config.chart.background:"#fff",s.opacity,s.borderWidth,s.borderColor);if(s.dropShadow.enabled){new ee(this.w).dropShadow(l,s.dropShadow)}return l}avoidOverlaps(){var t,e,i,s,a,r,o;const n=this.w,l=n.config.dataLabels.avoidOverlap;if(!l)return;if(-1!==ge.indexOf(n.config.chart.type))return;const c="object"==typeof l?l:{},h=n.config.dataLabels.background,d=n.dom.baseEl.querySelectorAll(".apexcharts-datalabels text.apexcharts-datalabel");if(d.length<2)return;const p=[];let u=!1;for(let e=0;e<d.length;e++){const i=d[e],s=i.getBoundingClientRect(),a=null==(t=i.getScreenCTM)?void 0:t.call(i),r=s.width>0&&s.height>0,o=r?s:i.getBBox();if(!o.width||!o.height)continue;r&&(u=!0);const n=!!a&&(Math.abs(a.b)>1e-6||Math.abs(a.c)>1e-6),l=r&&a&&a.d?Math.abs(a.d):1,c=r&&a&&a.a?Math.abs(a.a):1,g=(h.enabled?h.padding:0)*c,x=(h.enabled?h.padding/2:0)*l;p.push({el:i,scaleY:l,box:{x:(r?s.left:o.x)-g,y:(r?s.top:o.y)-x/2,width:o.width+2*g,height:o.height+x,order:p.length,fixed:n}})}if(p.length<2)return;const g=!!(null==(i=null==(e=n.config.plotOptions)?void 0:e.bar)?void 0:i.horizontal),x=p.map(({box:t})=>g?{x:t.y,y:t.x,width:t.height,height:t.width,order:t.order,fixed:t.fixed}:t),f=u?null==(r=null==(a=null==(s=n.dom.elGraphical)?void 0:s.node)?void 0:a.getScreenCTM)?void 0:r.call(a):null,m=!!f&&f.a>0&&f.d>0,b=x[0].height,y=p[0].scaleY,v=m?g?f.e:f.f:0,w=m?g?f.e+n.layout.gridWidth*f.a:f.f+n.layout.gridHeight*f.d:g?n.layout.gridWidth:n.layout.gridHeight,A=function(t,e){var i;const s=t.length,a=new Array(s);for(let t=0;t<s;t++)a[t]={dy:0,hidden:!1};if(s<2)return a;const{gap:r,maxShift:o,minY:n,maxY:l}=e,c=null!=(i=e.iterations)?i:6,h=t.map((t,e)=>e).sort((e,i)=>t[e].x-t[i].x),d=(e,i)=>{const s=t[e];if(s.fixed)return a[e].dy;const r=Math.max(-o,Math.min(o,i)),c=Math.min(0,n-s.y),h=Math.max(0,l-(s.y+s.height));return Math.max(c,Math.min(h,r))};for(let e=0;e<c;e++){let e=!1;for(let i=0;i<h.length;i++){const s=h[i],o=t[s];if(!a[s].hidden)for(let n=i+1;n<h.length;n++){const i=h[n],l=t[i];if(a[i].hidden)continue;if(l.x>=o.x+o.width)break;if(ue(o,l)<=0)continue;const c=pe(o,a[s].dy,l,a[i].dy);if(c<=-r)continue;const p=c+r,u=o.y+a[s].dy+o.height/2,g=l.y+a[i].dy+l.height/2,x=u===g?o.order<=l.order:u<g,f=x?s:i,m=x?i:s,b=d(f,a[f].dy-p/2),y=d(m,a[m].dy+p/2),v=a[f].dy-b,w=p-(v+(y-a[m].dy));let A=b,S=y;if(w>.01){S=d(m,y+w);const t=p-(v+(S-a[m].dy));t>.01&&(A=d(f,b-t))}A===a[f].dy&&S===a[m].dy||(a[f].dy=A,a[m].dy=S,e=!0)}}if(!e)break}if(!e.hide)return a;for(let e=0;e<h.length;e++){const i=h[e];if(a[i].hidden)continue;const s=t[i];for(let r=e+1;r<h.length;r++){const e=h[r];if(a[e].hidden)continue;const o=t[e];if(o.x>=s.x+s.width)break;if(!(ue(s,o)<=0)&&pe(s,a[i].dy,o,a[e].dy)>0){const r=s.order<=o.order?e:i,n=r===i?e:i,l=t[r].fixed?t[n].fixed?-1:n:r;if(-1===l)continue;if(a[l].hidden=!0,l===i)break}}}return a}(x,{gap:(null!=(o=c.gap)?o:2)*y,maxShift:c.maxShift?c.maxShift*y:Math.max(b,14),minY:v,maxY:w,hide:!0===c.hide}),S=g?"x":"y",C=g?"cx":"cy";for(let t=0;t<p.length;t++){const{el:e,scaleY:i}=p[t],{dy:s,hidden:a}=A[t];if(a){e.style.display="none",e.classList.add("apexcharts-datalabel-hidden");continue}if(!s)continue;const r=s/i,o=parseFloat(e.getAttribute(S)||"0");e.setAttribute(S,(o+r).toString());const n=e.getAttribute(C);null!==n&&e.setAttribute(C,(parseFloat(n)+r).toString())}}dataLabelsBackground(){var t,e;const i=this.w;if("bubble"===i.config.chart.type)return;const s=i.dom.baseEl.querySelectorAll(".apexcharts-datalabels text"),a=[];for(let t=0;t<s.length;t++){const e=s[t],i=e.getBBox();i.width&&i.height&&a.push({el:e,coords:{x:i.x,y:i.y,width:i.width,height:i.height},fill:e.getAttribute("fill")})}const r=i.config.dataLabels.background,o=null!=(t=i.config.chart.animations.largeDatasetThreshold)?t:0,n=o>0&&a.length>o,l=i.config.chart.animations.enabled&&!i.globals.resized&&!i.globals.dataChanged&&!n;for(let t=0;t<a.length;t++){const{el:s,coords:o,fill:c}=a[t],h=this.addBackgroundToDataLabel(s,o);if(!h)continue;null==(e=s.parentNode)||e.insertBefore(h.node,s);const d=r.backgroundColor||c;if(l?h.animate().attr({fill:d}):h.attr({fill:d}),s.setAttribute("fill",r.foreColor),!n){const t=s.getAttribute("cx"),e=s.closest&&s.closest(".apexcharts-datalabels");null!==t&&xe(i,e&&e.getAttribute("data:realIndex"))&&jt(h,parseFloat(t),i)}}}bringForward(){const t=this.w,e=t.dom.baseEl.querySelectorAll(".apexcharts-datalabels"),i=t.dom.baseEl.querySelector(".apexcharts-plot-series:last-child");for(let t=0;t<e.length;t++)i&&i.insertBefore(e[t],i.nextSibling)}}class me{static invalidateAll(t){t&&t.globals&&(t.globals.cachedSelectors&&(t.globals.cachedSelectors={}),t.globals.domCache&&t.globals.domCache.clear(),t.globals.dimensionCache={})}static invalidateDimensions(t){t&&t.globals&&(t.globals.dimensionCache={})}static invalidateSelectors(t){t&&t.globals&&t.globals.cachedSelectors&&(t.globals.cachedSelectors={})}static getCachedSelector(t,e,i){return t&&t.globals?(t.globals.cachedSelectors||(t.globals.cachedSelectors={}),t.globals.cachedSelectors[e]||(t.globals.cachedSelectors[e]=i()),t.globals.cachedSelectors[e]):i()}static getCachedDimension(t,e,i,s=1e3){if(!t||!t.globals)return i();t.globals.dimensionCache||(t.globals.dimensionCache={});const a=t.globals.dimensionCache[e],r=Date.now();if(a&&a.lastUpdate&&r-a.lastUpdate<s)return a.value;const o=i();return t.globals.dimensionCache[e]={value:o,lastUpdate:r},o}static cacheDOMElement(t,e,i){t&&t.globals&&(t.globals.domCache||(t.globals.domCache=new Map),t.globals.domCache.set(e,i))}static getCachedDOMElement(t,e){return t&&t.globals&&t.globals.domCache&&t.globals.domCache.get(e)||null}}class be{constructor(t,{theme:e=null,timeScale:i=null}={}){this.w=t,this.theme=e,this.timeScale=i}getLabel(t,e,i,s,a=[],r="12px",o=!0){const n=this.w,l=void 0===t[s]?"":t[s];let c=l;const h=n.formatters.xLabelFormatter,d=n.config.xaxis.labels.formatter,p=new C(this.w),u=l;o&&(c=p.xLabelFormat(h,l,u,{i:s,dateFormatter:new S(this.w).formatDate,w:n}),void 0!==d&&(c=d(l,t[s],{i:s,dateFormatter:new S(this.w).formatDate,w:n}))),e.length>0?(i=e[s].position,c=e[s].value):"datetime"===n.config.xaxis.type&&void 0===d&&(c=""),void 0===c&&(c=""),c=Array.isArray(c)?c:c.toString();const g=new ae(this.w);let x={};x=n.layout.rotateXLabels&&o?g.getTextRects(c,parseInt(r,10).toString(),null,`rotate(${n.config.xaxis.labels.rotate} 0 0)`,!1):g.getTextRects(c,parseInt(r,10).toString());const f=!n.config.xaxis.labels.showDuplicates&&this.timeScale;return!Array.isArray(c)&&("NaN"===String(c)||a.indexOf(c)>=0&&f)&&(c=""),{x:i,text:c,textRect:x}}checkLabelBasedOnTickamount(t,e,i){const s=this.w;let a=s.config.xaxis.tickAmount;if("dataPoints"===a&&(a=Math.round(s.layout.gridWidth/120)),a>i)return e;return t%Math.round(i/(a+1))===0||(e.text=""),e}checkForOverflowingLabels(t,e,i,s,a){const r=this.w;if(0===t&&r.globals.skipFirstTimelinelabel&&(e.text=""),t===i-1&&r.globals.skipLastTimelinelabel&&(e.text=""),r.config.xaxis.labels.hideOverlappingLabels&&s.length>0){const t=a[a.length-1];if(r.config.xaxis.labels.trim&&"datetime"!==r.config.xaxis.type)return e;e.x<t.textRect.width/(r.layout.rotateXLabels?Math.max(Math.abs(r.config.xaxis.labels.rotate),1)/12:1.01)+t.x&&(e.text="")}return e}checkForReversedLabels(t,e){const i=this.w;return i.config.yaxis[t]&&i.config.yaxis[t].reversed&&e.reverse(),e}yAxisAllSeriesCollapsed(t){const e=this.w.globals;return!e.seriesYAxisMap[t].some(t=>-1===e.collapsedSeriesIndices.indexOf(t))}translateYAxisIndex(t){const e=this.w,i=e.globals,s=e.config.yaxis;return e.seriesData.series.length>s.length||s.some(t=>Array.isArray(t.seriesName))?t:i.seriesYAxisReverseMap[t]}isYAxisHidden(t){const e=this.w,i=e.config.yaxis[t];if(!i.show||this.yAxisAllSeriesCollapsed(t))return!0;if(!i.showForNullSeries){const i=e.globals.seriesYAxisMap[t],s=new gt(this.w);return i.every(t=>s.isSeriesNull(t))}return!1}getYAxisForeColor(t,e){var i;const s=this.w;return Array.isArray(t)&&s.globals.yAxisScale[e]&&(null==(i=this.theme)||i.pushExtraColors(t,s.globals.yAxisScale[e].result.length,!1)),t}drawYAxisTicks(t,e,i,s,a,r,o){const n=this.w,l=new ae(this.w);let c=n.layout.translateY+n.config.yaxis[a].labels.offsetY;if(n.globals.isBarHorizontal?c=0:"heatmap"===n.config.chart.type&&(c+=r/2),s.show&&e>0){!0===n.config.yaxis[a].opposite&&(t+=s.width);for(let a=e;a>=0;a--){const e=l.drawLine(t+i.offsetX-s.width+s.offsetX,c+s.offsetY,t+i.offsetX+s.offsetX,c+s.offsetY,s.color);o.add(e),c+=r}}}static pruneRedundantLabelTitles(t){if(!t)return;t.querySelectorAll(".apexcharts-xaxis-label, .apexcharts-xaxis-group-label, .apexcharts-yaxis-label").forEach(t=>{var e;const i=t.querySelector("title");if(!i)return;Array.prototype.filter.call(t.childNodes,t=>t!==i).map(t=>{var e;return(null!=(e=t.textContent)?e:"").trim()}).filter(t=>""!==t).join(" ")===(null!=(e=i.textContent)?e:"").trim()&&i.remove()})}}class ye{constructor(t,e,i){this.w=t,this.ctx=e,this.elgrid=i,this.axesUtils=new be(t,{theme:e.theme,timeScale:e.timeScale}),this.xaxisLabels=t.labelData.labels.slice(),t.labelData.timescaleLabels.length>0&&!t.globals.isBarHorizontal&&(this.xaxisLabels=t.labelData.timescaleLabels.slice()),t.config.xaxis.overwriteCategories&&(this.xaxisLabels=t.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],"top"===t.config.xaxis.position?this.offY=0:this.offY=t.layout.gridHeight,this.offY=this.offY+t.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal="bar"===t.config.chart.type&&t.config.plotOptions.bar.horizontal,this.xaxisFontSize=t.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=t.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=t.config.xaxis.labels.style.colors,this.xaxisBorderWidth=t.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=t.config.yaxis[0].axisBorder.width.toString()),String(this.xaxisBorderWidth).indexOf("%")>-1?this.xaxisBorderWidth=t.layout.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=t.config.xaxis.axisBorder.height,this.yaxis=t.config.yaxis[0]}drawXaxis(){const t=this.w,e=new ae(this.w),i=e.group({class:"apexcharts-xaxis",transform:`translate(${t.config.xaxis.offsetX}, ${t.config.xaxis.offsetY})`}),s=e.group({class:"apexcharts-xaxis-texts-g",transform:`translate(${t.layout.translateXAxisX}, ${t.layout.translateXAxisY})`});i.add(s);let a=[];for(let t=0;t<this.xaxisLabels.length;t++)a.push(this.xaxisLabels[t]);if(this.drawXAxisLabelAndGroup(!0,e,s,a,t.axisFlags.isXNumeric,(t,e)=>e),t.labelData.hasXaxisGroups){const i=t.labelData.groups;a=[];for(let t=0;t<i.length;t++)a.push(i[t].title);const r={};t.config.xaxis.group.style&&(r.xaxisFontSize=t.config.xaxis.group.style.fontSize,r.xaxisFontFamily=t.config.xaxis.group.style.fontFamily,r.xaxisForeColors=t.config.xaxis.group.style.colors,r.fontWeight=t.config.xaxis.group.style.fontWeight,r.cssClass=t.config.xaxis.group.style.cssClass),this.drawXAxisLabelAndGroup(!1,e,s,a,!1,(t,e)=>i[t].cols*e,r)}if(void 0!==t.config.xaxis.title.text){const s=e.group({class:"apexcharts-xaxis-title"}),a=e.drawText({x:t.layout.gridWidth/2+t.config.xaxis.title.offsetX,y:this.offY+parseFloat(this.xaxisFontSize)+("bottom"===t.config.xaxis.position?t.layout.xAxisLabelsHeight:-t.layout.xAxisLabelsHeight-10)+t.config.xaxis.title.offsetY,text:t.config.xaxis.title.text,textAnchor:"middle",fontSize:t.config.xaxis.title.style.fontSize,fontFamily:t.config.xaxis.title.style.fontFamily,fontWeight:t.config.xaxis.title.style.fontWeight,foreColor:t.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text "+t.config.xaxis.title.style.cssClass});s.add(a),i.add(s)}if(t.config.xaxis.axisBorder.show){const s=t.globals.barPadForNumericAxis,a=e.drawLine(t.globals.padHorizontal+t.config.xaxis.axisBorder.offsetX-s,this.offY,this.xaxisBorderWidth+s,this.offY,t.config.xaxis.axisBorder.color,0,this.xaxisBorderHeight);this.elgrid&&this.elgrid.elGridBorders&&t.config.grid.show?this.elgrid.elGridBorders.add(a):i.add(a)}return i}drawXAxisLabelAndGroup(t,e,i,s,a,r,o={}){var n,l;const c=[],h=[],d=this.w,p=o.xaxisFontSize||this.xaxisFontSize,u=o.xaxisFontFamily||this.xaxisFontFamily,g=o.xaxisForeColors||this.xaxisForeColors,x=o.fontWeight||d.config.xaxis.labels.style.fontWeight,f=o.cssClass||d.config.xaxis.labels.style.cssClass;let m,b=d.globals.padHorizontal;const v=s.length;let w="category"===d.config.xaxis.type?d.globals.dataPoints:v;if(0===w&&v>w&&(w=v),a){const t=Math.max(Number(d.config.xaxis.tickAmount)||1,w>1?w-1:w);m=d.layout.gridWidth/Math.min(t,v-1),b=b+r(0,m)/2+d.config.xaxis.labels.offsetX}else m=d.layout.gridWidth/w,b=b+r(0,m)+d.config.xaxis.labels.offsetX;for(let a=0;a<=v-1;a++){let o=b-r(a,m)/2+d.config.xaxis.labels.offsetX;0===a&&1===v&&m/2===b&&1===w&&(o=d.layout.gridWidth/2);let A=this.axesUtils.getLabel(s,d.labelData.timescaleLabels,o,a,c,p,t),S=28;d.layout.rotateXLabels&&t&&(S=22),d.config.xaxis.title.text&&"top"===d.config.xaxis.position&&(S+=parseFloat(d.config.xaxis.title.style.fontSize)+2),t||(S=S+parseFloat(p)+(d.layout.xAxisLabelsHeight-d.layout.xAxisGroupLabelsHeight)+(d.layout.rotateXLabels?10:0));A=void 0!==d.config.xaxis.tickAmount&&"dataPoints"!==d.config.xaxis.tickAmount&&"datetime"!==d.config.xaxis.type?this.axesUtils.checkLabelBasedOnTickamount(a,A,v):this.axesUtils.checkForOverflowingLabels(a,A,v,c,h);const C=()=>t&&d.config.xaxis.convertedCatToNumeric?g[d.globals.minX+a-1]:g[a],k=(null!=(l=null==(n=A.textRect)?void 0:n.width)?l:0)/2,M=A.x+k<0;if(d.config.xaxis.labels.show&&!M){const s=e.drawText({x:A.x,y:this.offY+d.config.xaxis.labels.offsetY+S-("top"===d.config.xaxis.position?d.layout.xAxisHeight+d.config.xaxis.axisTicks.height-2:0),text:A.text,textAnchor:"middle",fontWeight:x,fontSize:p,fontFamily:u,foreColor:Array.isArray(g)?C():g,isPlainText:!1,cssClass:(t?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+f});if(i.add(s),s.on("click",t=>{if("function"==typeof d.config.chart.events.xAxisLabelClick){const e=Object.assign({},d,{labelIndex:a});d.config.chart.events.xAxisLabelClick(t,this.ctx,e)}}),t){const t=y.createElementNS(xt,"title");t.textContent=Array.isArray(A.text)?A.text.join(" "):A.text,s.node.appendChild(t),""!==A.text&&(c.push(A.text),h.push(A))}}a<v-1&&(b+=r(a+1,m))}}drawXaxisInversed(t){const e=this.w,i=new ae(this.w),s=e.config.yaxis[0].opposite?e.globals.translateYAxisX[t]:0,a=i.group({class:"apexcharts-yaxis apexcharts-xaxis-inversed",rel:t}),r=i.group({class:"apexcharts-yaxis-texts-g apexcharts-xaxis-inversed-texts-g",transform:"translate("+s+", 0)"});a.add(r);const o=[];if(e.config.yaxis[t].show)for(let t=0;t<this.xaxisLabels.length;t++)o.push(this.xaxisLabels[t]);const n=e.layout.gridHeight/o.length;let l=-n/2.2;const c=e.config.yaxis[0].labels;let h=e.formatters.yLabelFormatters[0];if("datetime"===e.config.xaxis.type&&void 0===c.formatter&&!e.axisFlags.isRangeBar){const t=new S(e),i=e.config.xaxis.labels.format||e.config.tooltip.x.format;h=e=>"number"==typeof e?t.formatDate(t.getDate(e),i):e}if(c.show)for(let s=0;s<=o.length-1;s++){let a=void 0===o[s]?"":o[s];a=h(a,{seriesIndex:t,dataPointIndex:s,w:e},e);const d=this.axesUtils.getYAxisForeColor(c.style.colors,t),p=()=>Array.isArray(d)?d[s]:d;let u=0;Array.isArray(a)&&(u=a.length/2*parseInt(c.style.fontSize,10));let g=c.offsetX-15,x="end";this.yaxis.opposite&&(x="start"),"left"===e.config.yaxis[0].labels.align?(g=c.offsetX,x="start"):"center"===e.config.yaxis[0].labels.align?(g=c.offsetX,x="middle"):"right"===e.config.yaxis[0].labels.align&&(x="end");const f=i.drawText({x:g,y:l+n+c.offsetY-u,text:a,textAnchor:x,foreColor:p(),fontSize:c.style.fontSize,fontFamily:c.style.fontFamily,fontWeight:c.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+c.style.cssClass,maxWidth:c.maxWidth});r.add(f),f.on("click",t=>{if("function"==typeof e.config.chart.events.xAxisLabelClick){const i=Object.assign({},e,{labelIndex:s});e.config.chart.events.xAxisLabelClick(t,this.ctx,i)}});const m=y.createElementNS(xt,"title");if(m.textContent=Array.isArray(a)?a.join(" "):a,f.node.appendChild(m),0!==e.config.yaxis[t].labels.rotate){const s=i.rotateAroundCenter(f.node);f.node.setAttribute("transform",`rotate(${e.config.yaxis[t].labels.rotate} 0 ${s.y})`)}l+=n}if(void 0!==e.config.yaxis[0].title.text){const t=i.group({class:"apexcharts-yaxis-title apexcharts-xaxis-title-inversed",transform:"translate("+s+", 0)"}),r=i.drawText({x:e.config.yaxis[0].title.offsetX,y:e.layout.gridHeight/2+e.config.yaxis[0].title.offsetY,text:e.config.yaxis[0].title.text,textAnchor:"middle",foreColor:e.config.yaxis[0].title.style.color,fontSize:e.config.yaxis[0].title.style.fontSize,fontWeight:e.config.yaxis[0].title.style.fontWeight,fontFamily:e.config.yaxis[0].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+e.config.yaxis[0].title.style.cssClass});t.add(r),a.add(t)}let d=0;this.isCategoryBarHorizontal&&e.config.yaxis[0].opposite&&(d=e.layout.gridWidth);const p=e.config.xaxis.axisBorder;if(p.show){const t=i.drawLine(e.globals.padHorizontal+p.offsetX+d,1+p.offsetY,e.globals.padHorizontal+p.offsetX+d,e.layout.gridHeight+p.offsetY,p.color,0);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(t):a.add(t)}return e.config.yaxis[0].axisTicks.show&&this.axesUtils.drawYAxisTicks(d,o.length,e.config.yaxis[0].axisBorder,e.config.yaxis[0].axisTicks,0,n,a),a}drawXaxisTicks(t,e,i){const s=this.w,a=t;if(t<0||t-2>s.layout.gridWidth)return;const r=this.offY+s.config.xaxis.axisTicks.offsetY;if(e=e+r+s.config.xaxis.axisTicks.height,"top"===s.config.xaxis.position&&(e=r-s.config.xaxis.axisTicks.height),s.config.xaxis.axisTicks.show){const o=new ae(this.w).drawLine(t+s.config.xaxis.axisTicks.offsetX,r+s.config.xaxis.offsetY,a+s.config.xaxis.axisTicks.offsetX,e+s.config.xaxis.offsetY,s.config.xaxis.axisTicks.color);i.add(o),o.node.classList.add("apexcharts-xaxis-tick")}}getXAxisTicksPositions(){const t=this.w,e=[],i=this.xaxisLabels.length;let s=t.globals.padHorizontal;if(t.labelData.timescaleLabels.length>0)for(let t=0;t<i;t++)s=this.xaxisLabels[t].position,e.push(s);else{const a=i;for(let i=0;i<a;i++){let i=a;t.axisFlags.isXNumeric&&"bar"!==t.config.chart.type&&(i-=1),s+=t.layout.gridWidth/i,e.push(s)}}return e}xAxisLabelCorrections(){var t,e,i;const s=this.w,a=new ae(this.w),r=s.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g"),o=s.dom.baseEl.querySelectorAll(".apexcharts-xaxis-texts-g text:not(.apexcharts-xaxis-group-label)"),n=s.dom.baseEl.querySelectorAll(".apexcharts-yaxis-inversed text"),l=s.dom.baseEl.querySelectorAll(".apexcharts-xaxis-inversed-texts-g text tspan");if(s.layout.rotateXLabels||s.config.xaxis.labels.rotateAlways)for(let t=0;t<o.length;t++){const e=a.rotateAroundCenter(o[t]);e.y=e.y-1,e.x=e.x+1,o[t].setAttribute("transform",`rotate(${s.config.xaxis.labels.rotate} ${e.x} ${e.y})`),o[t].setAttribute("text-anchor","end"),null==r||r.setAttribute("transform","translate(0, -10)");const i=o[t].childNodes;s.config.xaxis.labels.trim&&Array.prototype.forEach.call(i,t=>{a.placeTextWithEllipsis(t,t.textContent,s.layout.xAxisLabelsHeight-("bottom"===s.config.legend.position?20:10))})}else{const t=s.layout.gridWidth/(s.labelData.labels.length+1);for(let e=0;e<o.length;e++){const i=o[e].childNodes;s.config.xaxis.labels.trim&&"datetime"!==s.config.xaxis.type&&Array.prototype.forEach.call(i,e=>{a.placeTextWithEllipsis(e,e.textContent,t)})}}if(n.length>0){const r=n[n.length-1].getBBox(),o=n[0].getBBox();r.x<-20&&(null==(t=n[n.length-1].parentNode)||t.removeChild(n[n.length-1])),o.x+o.width>s.layout.gridWidth&&!s.globals.isBarHorizontal&&(null==(e=n[0].parentNode)||e.removeChild(n[0]));for(let t=0;t<l.length;t++)a.placeTextWithEllipsis(l[t],null!=(i=l[t].textContent)?i:"",s.config.yaxis[0].labels.maxWidth-(s.config.yaxis[0].title.text?2*parseFloat(s.config.yaxis[0].title.style.fontSize):0)-15)}}}class ve{constructor(t,e){this.w=t,this.ctx=e,this.xaxisLabels=t.labelData.labels.slice(),this.axesUtils=new be(e.w,{theme:e.theme,timeScale:e.timeScale}),this.isRangeBar=t.rangeData.seriesRange.length&&t.globals.isBarHorizontal,t.labelData.timescaleLabels.length>0&&(this.xaxisLabels=t.labelData.timescaleLabels.slice())}drawGridArea(t=null){const e=this.w,i=new ae(this.w);t||(t=i.group({class:"apexcharts-grid"}));const s=i.drawLine(e.globals.padHorizontal,1,e.globals.padHorizontal,e.layout.gridHeight,"transparent"),a=i.drawLine(e.globals.padHorizontal,e.layout.gridHeight,e.layout.gridWidth,e.layout.gridHeight,"transparent");return t.add(a),t.add(s),t}drawGrid(){if(this.w.globals.axisCharts){const t=this.renderGrid();return this.drawGridArea(t.el),t}return null}static maskRects(t){const e=t.globals,i=Array.isArray(t.config.stroke.width)?Math.max(...t.config.stroke.width):t.config.stroke.width;let s=0,a=0;(["bar","rangeBar","candlestick","boxPlot","violin"].includes(t.config.chart.type)||e.comboBarCount>0)&&t.axisFlags.isXNumeric&&!e.isBarHorizontal&&(s=Math.max(t.layout.gridPad.left,e.barPadForNumericAxis),a=Math.max(t.layout.gridPad.right,e.barPadForNumericAxis));const r=e.markers.largestSize;return{grid:{x:-i/2-2,y:-i/2-2,width:t.layout.gridWidth+i+4,height:t.layout.gridHeight+i+4},bar:{x:-i/2-s-2,y:-i/2-2,width:t.layout.gridWidth+i+a+s+4,height:t.layout.gridHeight+i+4},marker:{x:Math.min(-i/2-s-2,-r),y:-r,width:t.layout.gridWidth+Math.max(i+a+s+4,2*r),height:t.layout.gridHeight+2*r}}}createGridMask(){const t=this.w,e=t.globals,i=new ae(this.w),s=t=>{const e=y.createElementNS(xt,"clipPath");return e.setAttribute("id",t),e};t.dom.elGridRectMask=s(`gridRectMask${e.cuid}`),t.dom.elGridRectBarMask=s(`gridRectBarMask${e.cuid}`),t.dom.elGridRectMarkerMask=s(`gridRectMarkerMask${e.cuid}`),t.dom.elForecastMask=s(`forecastMask${e.cuid}`),t.dom.elNonForecastMask=s(`nonForecastMask${e.cuid}`);const a=ve.maskRects(t),r=t=>i.drawRect(t.x,t.y,t.width,t.height,0,"#fff");t.dom.elGridRect=r(a.grid),t.dom.elGridRectBar=r(a.bar),t.dom.elGridRectMarker=r(a.marker),t.dom.elGridRectMask.appendChild(t.dom.elGridRect.node),t.dom.elGridRectBarMask.appendChild(t.dom.elGridRectBar.node),t.dom.elGridRectMarkerMask.appendChild(t.dom.elGridRectMarker.node);const o=t.dom.elDefs.node;o.appendChild(t.dom.elGridRectMask),o.appendChild(t.dom.elGridRectBarMask),o.appendChild(t.dom.elGridRectMarkerMask),o.appendChild(t.dom.elForecastMask),o.appendChild(t.dom.elNonForecastMask)}_drawGridLines({i:t,x1:e,y1:i,x2:s,y2:a,xCount:r,parent:o}){const n=this.w;if(!(0===t&&n.globals.skipFirstTimelinelabel||t===r-1&&n.globals.skipLastTimelinelabel&&!n.config.xaxis.labels.formatter||"radar"===n.config.chart.type)){n.config.grid.xaxis.lines.show&&this._drawGridLine({i:t,x1:e,y1:i,x2:s,y2:a,xCount:r,parent:o});let l=0;if(n.labelData.hasXaxisGroups&&"between"===n.config.xaxis.tickPlacement){const e=n.labelData.groups;if(e){let i=0;for(let s=0;i<t&&s<e.length;s++)i+=e[s].cols;i===t&&(l=.6*n.layout.xAxisLabelsHeight)}}new ye(this.w,this.ctx).drawXaxisTicks(e,l,n.dom.elGraphical)}}_drawGridLine({i:t,x1:e,y1:i,x2:s,y2:a,xCount:r,parent:o}){const n=this.w,l=o.node.classList.contains("apexcharts-gridlines-horizontal"),c=n.globals.barPadForNumericAxis,h=0===i&&0===a||0===e&&0===s||i===n.layout.gridHeight&&a===n.layout.gridHeight||n.globals.isBarHorizontal&&(0===t||t===r-1),d=new ae(this.w).drawLine(e-(l?c:0),i,s+(l?c:0),a,n.config.grid.borderColor,n.config.grid.strokeDashArray);d.node.classList.add("apexcharts-gridline"),h&&n.config.grid.show?this.elGridBorders.add(d):o.add(d)}_drawGridBandRect({c:t,x1:e,y1:i,x2:s,y2:a,type:r}){const o=this.w,n=new ae(this.w),l=o.globals.barPadForNumericAxis,c=o.config.grid[r].colors[t],h=n.drawRect(e-("row"===r?l:0),i,s+("row"===r?2*l:0),a,0,c,o.config.grid[r].opacity);this.elg.add(h),h.attr("clip-path",`url(#gridRectMask${o.globals.cuid})`),h.node.classList.add(`apexcharts-grid-${r}`)}_drawXYLines({xCount:t,tickAmount:e}){var i;const s=this.w,a=({xC:e,x1:i,y1:a,x2:r,y2:o})=>{for(let n=0;n<e;n++)i=this.xaxisLabels[n].position,r=this.xaxisLabels[n].position,i<0||i-2>s.layout.gridWidth||this._drawGridLines({i:n,x1:i,y1:a,x2:r,y2:o,xCount:t,parent:this.elgridLinesV})},r=({xC:e,x1:i,y1:a,x2:r,y2:o})=>{for(let n=0;n<e+(s.axisFlags.isXNumeric?0:1);n++)0===n&&1===e&&1===s.globals.dataPoints&&(r=i=s.layout.gridWidth/2),this._drawGridLines({i:n,x1:i,y1:a,x2:r,y2:o,xCount:t,parent:this.elgridLinesV}),r=i+=s.layout.gridWidth/(s.axisFlags.isXNumeric?e-1:e)};if(s.config.grid.xaxis.lines.show||s.config.xaxis.axisTicks.show){const e=s.globals.padHorizontal,o=0;let n;const l=s.layout.gridHeight;s.labelData.timescaleLabels.length?a({xC:t,x1:e,y1:o,x2:n,y2:l}):(s.axisFlags.isXNumeric&&(t=null==(i=s.globals.xAxisScale)?void 0:i.result.length),r({xC:t,x1:e,y1:o,x2:n,y2:l}))}if(s.config.grid.yaxis.lines.show){const t=0;let i=0,a=0;const r=s.layout.gridWidth;let o=e+1;this.isRangeBar&&(o=s.labelData.labels.length);for(let n=0;n<o+(this.isRangeBar?1:0);n++)this._drawGridLine({i:n,xCount:o+(this.isRangeBar?1:0),x1:t,y1:i,x2:r,y2:a,parent:this.elgridLinesH}),i+=s.layout.gridHeight/(this.isRangeBar?o:e),a=i}}_drawInvertedXYLines({xCount:t}){const e=this.w;if(e.config.grid.xaxis.lines.show||e.config.xaxis.axisTicks.show){let i=e.globals.padHorizontal;const s=0;let a;const r=e.layout.gridHeight;for(let o=0;o<t+1;o++){e.config.grid.xaxis.lines.show&&this._drawGridLine({i:o,xCount:t+1,x1:i,y1:s,x2:a,y2:r,parent:this.elgridLinesV});new ye(this.w,this.ctx).drawXaxisTicks(i,0,e.dom.elGraphical),i+=e.layout.gridWidth/t,a=i}}if(e.config.grid.yaxis.lines.show){const t=0;let i=0,s=0;const a=e.layout.gridWidth;for(let r=0;r<e.globals.dataPoints+1;r++)this._drawGridLine({i:r,xCount:e.globals.dataPoints+1,x1:t,y1:i,x2:a,y2:s,parent:this.elgridLinesH}),i+=e.layout.gridHeight/e.globals.dataPoints,s=i}}renderGrid(){var t,e,i;const s=this.w,a=s.globals,r=new ae(this.w);this.elg=r.group({class:"apexcharts-grid"}),this.elgridLinesH=r.group({class:"apexcharts-gridlines-horizontal"}),this.elgridLinesV=r.group({class:"apexcharts-gridlines-vertical"}),this.elGridBorders=r.group({class:"apexcharts-grid-borders"}),this.elg.add(this.elgridLinesH),this.elg.add(this.elgridLinesV),s.config.grid.show||(this.elgridLinesV.hide(),this.elgridLinesH.hide(),this.elGridBorders.hide());let o=0;for(;o<a.seriesYAxisMap.length&&a.ignoreYAxisIndexes.includes(o);)o++;o===a.seriesYAxisMap.length&&(o=0);let n,l=a.yAxisScale[o].result.length-1;return!a.isBarHorizontal||this.isRangeBar?(n=this.xaxisLabels.length,this.isRangeBar&&(l=s.labelData.labels.length,s.config.xaxis.tickAmount&&s.config.xaxis.labels.formatter&&(n=s.config.xaxis.tickAmount),(null==(i=null==(e=null==(t=a.yAxisScale)?void 0:t[o])?void 0:e.result)?void 0:i.length)>0&&"datetime"!==s.config.xaxis.type&&(n=a.yAxisScale[o].result.length-1)),this._drawXYLines({xCount:n,tickAmount:l})):(n=l,l=a.xTickAmount,this._drawInvertedXYLines({xCount:n,tickAmount:l})),this.drawGridBands(n,l),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:s.layout.gridWidth/n}}drawGridBands(t,e){var i,s,a,r,o;const n=this.w,l=(t,i,s,a,r,o)=>{for(let l=0,c=0;l<i;l++,c++)c>=n.config.grid[t].colors.length&&(c=0),this._drawGridBandRect({c:c,x1:s,y1:a,x2:r,y2:o,type:t}),a+=n.layout.gridHeight/e};if((null==(i=n.config.grid.row.colors)?void 0:i.length)>0&&l("row",e,0,0,n.layout.gridWidth,n.layout.gridHeight/e),(null==(s=n.config.grid.column.colors)?void 0:s.length)>0){let e=n.globals.isBarHorizontal||"on"!==n.config.xaxis.tickPlacement||"category"!==n.config.xaxis.type&&!n.config.xaxis.convertedCatToNumeric?t:t-1;n.axisFlags.isXNumeric&&(e=(null!=(r=null==(a=n.globals.xAxisScale)?void 0:a.result.length)?r:1)-1);let i=n.globals.padHorizontal;const s=0;let l=n.globals.padHorizontal+n.layout.gridWidth/e;const c=n.layout.gridHeight;for(let a=0,r=0;a<t;a++,r++)r>=n.config.grid.column.colors.length&&(r=0),"datetime"===n.config.xaxis.type&&(i=this.xaxisLabels[a].position,l=((null==(o=this.xaxisLabels[a+1])?void 0:o.position)||n.layout.gridWidth)-this.xaxisLabels[a].position),this._drawGridBandRect({c:r,x1:i,y1:s,x2:l,y2:c,type:"column"}),i+=n.layout.gridWidth/e}}}class we{constructor(t){this.w=t,this.coreUtils=new gt(this.w)}niceScale(t,e,i=0){const s=1e-11,a=this.w,r=a.globals;let o,n,l,c;r.isBarHorizontal?(o=a.config.xaxis,n=Math.max((r.svgWidth-100)/25,2)):(o=a.config.yaxis[i],n=Math.max((r.svgHeight-100)/15,2)),A.isNumber(n)||(n=10),l=void 0!==o.min&&null!==o.min,c=void 0!==o.max&&null!==o.max;let h=void 0!==o.stepSize&&null!==o.stepSize,d=void 0!==o.tickAmount&&null!==o.tickAmount,p=d?o.tickAmount:dt[Math.min(Math.round(n/2),dt.length-1)];if(r.isMultipleYAxis&&!d&&r.multiAxisTickAmount>0&&(p=r.multiAxisTickAmount,d=!0),p="dataPoints"===p?r.dataPoints-1:Math.abs(Math.round(p)),(t===Number.MIN_VALUE&&0===e||!A.isNumber(t)&&!A.isNumber(e)||t===Number.MIN_VALUE&&e===-Number.MAX_VALUE)&&(t=A.isNumber(o.min)?o.min:0,e=A.isNumber(o.max)?o.max:t+p,r.allSeriesCollapsed=!1),t>e){console.warn("axis.min cannot be greater than axis.max: swapping min and max");const i=e;e=t,t=i}else t===e&&(t=0===t?0:t-1,e=0===e?2:e+1);const u=[];p<1&&(p=1);let g=p,x=Math.abs(e-t);!l&&t>0&&t/x<.15&&(t=0,l=!0),!c&&e<0&&-e/x<.15&&(e=0,c=!0),x=Math.abs(e-t);let f=x/g,m=f;const b=Math.floor(Math.log10(m)),y=Math.pow(10,b);let v=Math.ceil(m/y);if(v=ht[0][v],m=v*y,f=m,r.isBarHorizontal&&o.stepSize&&"datetime"!==o.type?(f=o.stepSize,h=!0):h&&(f=o.stepSize),h&&o.forceNiceScale){const t=Math.floor(Math.log10(f));f*=Math.pow(10,b-t)}if(l&&c){let t=x/g;if(d)if(h)if(0!=A.mod(x,f)){const e=A.getGCD(f,t);f=t/e<10?e:t}else 0==A.mod(f,t)?f=t:(t=f,d=!1);else f=t;else if(h)0==A.mod(x,f)?t=f:f=t;else if(0==A.mod(x,f))t=f;else{g=Math.ceil(x/f),t=x/g;const e=A.getGCD(x,f);x/e<n&&(t=e),f=t}g=Math.round(x/f)}else{if(l||c){if(c)if(d)t=e-f*g;else{const i=t;t=f*Math.floor(t/f),Math.abs(e-t)/A.getGCD(x,f)>n&&(t=e-f*p,t+=f*Math.floor((i-t)/f))}else if(l)if(d)e=t+f*g;else{const i=e;e=f*Math.ceil(e/f),Math.abs(e-t)/A.getGCD(x,f)>n&&(e=t+f*p,e+=f*Math.ceil((i-e)/f))}}else if(r.isMultipleYAxis&&d){const i=f*Math.floor(t/f);let s=i+f*g;s<e&&(f*=2),s=e,e=(t=i)+f*g,x=Math.abs(e-t),t>0&&t<Math.abs(s-e)&&(t=0,e=f*g),e<0&&-e<Math.abs(i-t)&&(e=0,t=-f*g)}else t=f*Math.floor(t/f),e=f*Math.ceil(e/f);x=Math.abs(e-t),f=A.getGCD(x,f),g=Math.round(x/f)}if(d||l||c||(g=Math.ceil((x-s)/(f+s)),g>16&&A.getPrimeFactors(g).length<2&&g++),!d&&o.forceNiceScale&&0===r.yValueDecimal&&Number.isInteger(x)&&g>x&&(g=x,f=Math.round(x/g)),g>n&&(!d&&!h||o.forceNiceScale)){const t=A.getPrimeFactors(g),e=t.length-1;let i=g;t:for(var w=0;w<e;w++)for(var S=0;S<=e-w;S++){const s=Math.min(S+w,e);let a=i,r=1;for(var C=S;C<=s;C++)r*=t[C];if(a/=r,a<n){i=a;break t}}f=i===g?x:x/i,g=Math.round(x/f)}r.isMultipleYAxis&&0==r.multiAxisTickAmount&&r.ignoreYAxisIndexes.indexOf(i)<0&&(r.multiAxisTickAmount=g);let k=t-f;const M=f*s;do{k+=f,u.push(A.stripNumber(k,7))}while(e-k>M);return{result:u,niceMin:u[0],niceMax:u[u.length-1]}}linearScale(t,e,i=10,s=0,a=void 0){const r=Math.abs(e-t);let o=[];if(t===e)return o=[t],{result:o,niceMin:o[0],niceMax:o[o.length-1]};"dataPoints"===i&&(i=this.w.globals.dataPoints-1);const n=i;a||(a=r/n);if(0!==a&&isFinite(a)){const t=Math.floor(Math.log10(Math.abs(a))),e=Math.max(2,2-t),i=Math.pow(10,e);a=Math.round((a+Number.EPSILON)*i)/i}let l=n,c=t;for(;l>=0;)o.push(c),c=A.preciseAddition(c,a),l-=1;return{result:o,niceMin:o[0],niceMax:o[o.length-1]}}_resolveLogTickAmount(t){let e=t.tickAmount;return"dataPoints"===e&&(e=this.w.globals.dataPoints-1),A.isNumber(e)&&e>=1?Number(e):null}_thinToTickAmount(t,e){if(null===e||!A.isNumber(e)||e<1)return t;const i=e+1;if(t.length<=i)return t;const s=t.length-1;let a=null;for(let t=1;t<=s;t++){if(s%t!==0)continue;const e=s/t+1;e>i||(null===a||e>a.count)&&(a={stride:t,count:e})}if(!a)return[t[0],t[t.length-1]];const r=[];for(let e=0;e<t.length;e+=a.stride)r.push(t[e]);return r}logarithmicScaleNice(t,e,i,s=null){e<=0&&(e=Math.max(t,i)),t<=0&&(t=Math.min(e,i));const a=[],r=Math.ceil(Math.log(e)/Math.log(i)+1);for(let e=Math.floor(Math.log(t)/Math.log(i));e<r;e++)a.push(Math.pow(i,e));const o=this._thinToTickAmount(a,s);return{result:o,niceMin:o[0],niceMax:o[o.length-1]}}_logDomainSpan(t,e,i){return i||(i=10),i<=1?0:(e<=0&&(e=Math.max(t,i)),t<=0&&(t=Math.min(e,i)),t<=0||e<=0?0:Math.abs(Math.log(e)/Math.log(i)-Math.log(t)/Math.log(i)))}logarithmicScale(t,e,i,s=null){e<=0&&(e=Math.max(t,i)),t<=0&&(t=Math.min(e,i));const a=[],r=Math.log(e)/Math.log(i),o=Math.log(t)/Math.log(i),n=r-o,l=null!==s?s:Math.max(1,Math.round(n)),c=n/l;for(let t=0,e=o;t<l;t++,e+=c)a.push(Math.pow(i,e));return a.push(Math.pow(i,r)),{result:a,niceMin:t,niceMax:e}}setYScaleForIndex(t,e,i){const s=this.w.globals,a=this.w.config,r=s.isBarHorizontal?a.xaxis:a.yaxis[t];void 0===s.yAxisScale[t]&&(s.yAxisScale[t]=[]);const o=Math.abs(i-e),n=r.logarithmic&&this._logDomainSpan(e,i,r.logBase)>=1,l=r.logarithmic&&(n||o>5);if(r.logarithmic&&!l&&(s.invalidLogScale=!0),l){s.allSeriesCollapsed=!1;const a=this._resolveLogTickAmount(r);s.yAxisScale[t]=r.forceNiceScale?this.logarithmicScaleNice(e,i,r.logBase,a):this.logarithmicScale(e,i,r.logBase,a)}else i!==-Number.MAX_VALUE&&A.isNumber(i)&&e!==Number.MAX_VALUE&&A.isNumber(e)?(s.allSeriesCollapsed=!1,s.yAxisScale[t]=this.niceScale(e,i,t)):s.yAxisScale[t]=this.niceScale(Number.MIN_VALUE,0,t)}setXScale(t,e){const i=this.w,s=i.globals;if(e!==-Number.MAX_VALUE&&A.isNumber(e)){const a=s.xTickAmount;s.xAxisScale=this.linearScale(t,e,a,0,void 0===i.config.xaxis.max?i.config.xaxis.stepSize:void 0)}else s.xAxisScale=this.linearScale(0,10,10);return s.xAxisScale}scaleMultipleYAxes(){const t=this.w.config,e=this.w.globals;this.coreUtils.setSeriesYAxisMappings();const i=e.seriesYAxisMap,s=e.minYArr,a=e.maxYArr,r=[],o=!e.isBarHorizontal;if(e.allSeriesCollapsed=!0,i.forEach((i,n)=>{const l=[];if(i.forEach(e=>{var i;const s=null==(i=t.series[e])?void 0:i.group;l.indexOf(s)<0&&l.push(s)}),i.length>0){let c,h=Number.MAX_VALUE,d=-Number.MAX_VALUE,p=h,u=d;if(t.chart.stacked){const s=new Array(e.dataPoints).fill(0),a=[],r=[],o=[];l.forEach(()=>{a.push(s.map(()=>Number.MIN_VALUE)),r.push(s.map(()=>Number.MIN_VALUE)),o.push(s.map(()=>Number.MIN_VALUE))});for(let s=0;s<i.length;s++){!c&&t.series[i[s]].type&&(c=t.series[i[s]].type);const n=i[s];!(e.collapsedSeriesIndices.indexOf(n)<0&&e.ancillaryCollapsedSeriesIndices.indexOf(n)<0)||(e.allSeriesCollapsed=!1,l.forEach((e,i)=>{if(t.series[n].group===e)for(let t=0;t<this.w.seriesData.series[n].length;t++){const e=this.w.seriesData.series[n][t];e>=0?r[i][t]+=e:o[i][t]+=e,a[i][t]+=e,p=Math.min(p,e),u=Math.max(u,e)}}))}c||(c=t.chart.type),"bar"===c||"column"===c?l.forEach((t,e)=>{h=Math.min(h,Math.min.apply(null,o[e])),d=Math.max(d,Math.max.apply(null,r[e]))}):(l.forEach((t,e)=>{p=Math.min(p,Math.min.apply(null,a[e])),u=Math.max(u,Math.max.apply(null,a[e]))}),h=p,d=u),h===Number.MIN_VALUE&&d===Number.MIN_VALUE&&(d=-Number.MAX_VALUE)}else for(let t=0;t<i.length;t++){const r=i[t];h=Math.min(h,s[r]),d=Math.max(d,a[r]);!(e.collapsedSeriesIndices.indexOf(r)<0&&e.ancillaryCollapsedSeriesIndices.indexOf(r)<0)||(e.allSeriesCollapsed=!1)}void 0!==t.yaxis[n].min&&(h="function"==typeof t.yaxis[n].min?t.yaxis[n].min(h):t.yaxis[n].min),void 0!==t.yaxis[n].max&&(d="function"==typeof t.yaxis[n].max?t.yaxis[n].max(d):t.yaxis[n].max);const g=t.yaxis[n];o&&!0===g.alignZero&&!g.logarithmic&&void 0===g.min&&void 0===g.max&&e.ignoreYAxisIndexes.indexOf(n)<0&&A.isNumber(h)&&A.isNumber(d)?r.push({ai:n,minY:h,maxY:d}):(this.setYScaleForIndex(n,h,d),i.forEach(t=>{s[t]=e.yAxisScale[n].niceMin,a[t]=e.yAxisScale[n].niceMax}))}else this.setYScaleForIndex(n,0,-Number.MAX_VALUE)}),r.length>=2){r.forEach(t=>{this.setYScaleForIndex(t.ai,t.minY,t.maxY),i[t.ai].forEach(i=>{s[i]=e.yAxisScale[t.ai].niceMin,a[i]=e.yAxisScale[t.ai].niceMax})});let t=0;r.forEach(i=>{const s=e.yAxisScale[i.ai],a=s.niceMax-s.niceMin;if(a>0){const e=-s.niceMin/a;e>t&&(t=e)}}),t>1&&(t=1),t<0&&(t=0);const o=t=>{if(t<=0)return 1;const e=Math.floor(Math.log10(t)),i=Math.pow(10,e),s=t/i;let a;return a=s<=1+1e-9?1:s<=2+1e-9?2:s<=2.5+1e-9?2.5:s<=5+1e-9?5:10,a*i};r.forEach(r=>{const n=e.yAxisScale[r.ai];if(!n.result||n.result.length<2)return;const l=n.niceMax-n.niceMin;if(l<=0)return;const c=-n.niceMin/l;if(Math.abs(c-t)<=1e-9)return;const h=c<t&&t<1-1e-9,d=!h&&c>t&&t>1e-9;if(!h&&!d)return;const p=h?-t*n.niceMax/(1-t):n.niceMin,u=d?-n.niceMin*(1-t)/t:n.niceMax,g=u-p;if(g<=0)return;const x=Math.max(n.result.length,5),f=o(g/Math.max(x-1,1));if(f<=0)return;let m,b;if(h){m=Math.floor(p/f+1e-9)*f;const e=t>1e-9?m*(t-1)/t:n.niceMax,i=Math.max(e,n.niceMax);b=Math.ceil(i/f-1e-9)*f}else{b=Math.ceil(u/f-1e-9)*f;const e=t<1-1e-9?-t*b/(1-t):n.niceMin,i=Math.min(e,n.niceMin);m=Math.floor(i/f+1e-9)*f}n.result=[];for(let t=m;t<=b+1e-9*f;t=A.preciseAddition(t,f))n.result.push(A.stripNumber(t,7));n.niceMin=m,n.niceMax=b,i[r.ai].forEach(t=>{s[t]=n.niceMin,a[t]=n.niceMax})})}else if(1===r.length){const t=r[0];this.setYScaleForIndex(t.ai,t.minY,t.maxY),i[t.ai].forEach(i=>{s[i]=e.yAxisScale[t.ai].niceMin,a[i]=e.yAxisScale[t.ai].niceMax})}}}class Ae{constructor(t){this.w=t,this.scales=new we(this.w)}init(){this.setYRange(),this.setXRange(),this.setZRange()}_xPixelTolerance(t){const e=this.w.layout.gridWidth;if(!e||!t||!t.length)return 0;const i=this.w.config.xaxis,s="number"==typeof i.min?i.min:t[0],a="number"==typeof i.max?i.max:t[t.length-1];return a>s?(a-s)/e:0}_autoScaleYEnabled(){var t;const e=this.w.config,i=null==(t=this.w.globals.brushSource)?void 0:t.w.config.chart.brush;return!!(e.chart.zoom.enabled&&e.chart.zoom.autoScaleYaxis||(null==i?void 0:i.enabled)&&(null==i?void 0:i.autoScaleYaxis))}_autoScaleXBounds(t){const e=this.w.config.xaxis;if(!e.min&&!e.max)return null;const i=this._xPixelTolerance(this.w.seriesData.seriesX[t]);return{lo:e.min?e.min-i:-1/0,hi:e.max?e.max+i:1/0}}getMinYMaxY(t,e=Number.MAX_VALUE,i=-Number.MAX_VALUE,s=null){var a,r,o,n,l,c,h,d,p,u;const g=this.w.config,x=this.w.globals;let f=-Number.MAX_VALUE,m=Number.MIN_VALUE;null===s&&(s=t+1);const b=this.w.seriesData.series;let y=b,v=b;"candlestick"===g.chart.type?(y=this.w.candleData.seriesCandleL,v=this.w.candleData.seriesCandleH):"boxPlot"===g.chart.type?(y=this.w.candleData.seriesCandleO,v=this.w.candleData.seriesCandleC):"violin"===g.chart.type?(y=this.w.violinData.seriesViolinMin,v=this.w.violinData.seriesViolinMax):this.w.axisFlags.isRangeData&&(y=this.w.rangeData.seriesRangeStart,v=this.w.rangeData.seriesRangeEnd);let w=!1,S=!1;this.w.seriesData.seriesX.length>=s&&this._autoScaleYEnabled()&&!this._ignoreAutoScaleWindow&&(w=!0);for(let C=t;C<s;C++){x.dataPoints=Math.max(x.dataPoints,b[C].length);const t=g.series[C].type;this.w.labelData.categoryLabels.length&&(x.dataPoints=this.w.labelData.categoryLabels.filter(t=>void 0!==t).length),this.w.labelData.labels.length&&"datetime"!==g.xaxis.type&&0!==this.w.seriesData.series.reduce((t,e)=>t+e.length,0)&&(x.dataPoints=Math.max(x.dataPoints,this.w.labelData.labels.length));let s=0,k=b[C].length-1;if(w){const t=this.w.seriesData.seriesX[C],e=this._autoScaleXBounds(C);if(e&&g.xaxis.min)for(;s<k&&t[s]<e.lo;s++);if(e&&g.xaxis.max)for(;k>s&&t[k]>e.hi;k--);if(e&&t&&t.length){if(!(t[s]>=e.lo&&t[s]<=e.hi)){t[0]<e.lo&&t[t.length-1]>e.hi&&s>0?(k=s,s=k-1):(s=0,k=-1,S=!0)}}}const M=null==(r=null==(a=this.w.highlightData)?void 0:a.ext)?void 0:r[C];if(M)for(let t=s;t<=k&&t<M.length;t++){const i=M[t];null!=i&&(i>f&&(f=i),i<e&&(e=i),i<0&&i<m&&(m=i))}if(y===b&&v===b&&"boxPlot"!==g.chart.type&&"candlestick"!==t&&"boxPlot"!==t&&"violin"!==t&&"rangeArea"!==t&&"rangeBar"!==t&&!(this.w.seriesData.seriesGoals[C]&&this.w.seriesData.seriesGoals[C].length)){const a=b[C],r=Math.min(k,a.length-1),n=null==(o=this.w.seriesData._parsedExtrema)?void 0:o[C];if(n&&n.ref===a&&n.len===a.length&&0===s&&r===a.length-1)n.maxY>f&&(f=n.maxY),n.lowestY<e&&(e=n.lowestY),n.negMinY<0&&n.negMinY<m&&(m=n.negMinY),n.yDec>x.yValueDecimal&&(x.yValueDecimal=n.yDec),n.hasNulls&&(x.hasNullValues=!0);else{let t=x.yValueDecimal,i=!1;for(let o=s;o<=r;o++){const s=a[o];if(null!==s&&"number"==typeof s&&s==s&&s!==1/0&&s!==-1/0){if(s>f&&(f=s),s<e&&(e=s),m>s&&s<0&&(m=s),!Number.isInteger(s)){const e=s<0?-s:s;if(e>=1e-6&&e<1e21){const e=""+s,i=e.indexOf("."),a=-1===i?0:e.length-i-1;a>t&&(t=a)}else t=Math.max(t,A.decimalPlaces(s))}}else i=!0}x.yValueDecimal=t,i&&(x.hasNullValues=!0)}i=f,"bar"!==t&&"column"!==t||(m<0&&f<0&&(f=0,i=Math.max(i,0)),m===Number.MIN_VALUE&&(m=0,e=Math.min(e,0)));continue}for(let a=s;a<=k&&a<this.w.seriesData.series[C].length;a++){const s=b[C][a];if(null!==s&&A.isNumber(s)){switch(void 0!==(null==(n=v[C])?void 0:n[a])&&(f=Math.max(f,v[C][a]),e=Math.min(e,v[C][a])),void 0!==(null==(l=y[C])?void 0:l[a])&&(e=Math.min(e,y[C][a]),i=Math.max(i,y[C][a])),t){case"candlestick":void 0!==this.w.candleData.seriesCandleC[C][a]&&(f=Math.max(f,this.w.candleData.seriesCandleH[C][a]),e=Math.min(e,this.w.candleData.seriesCandleL[C][a]));break;case"boxPlot":void 0!==this.w.candleData.seriesCandleC[C][a]&&(f=Math.max(f,this.w.candleData.seriesCandleC[C][a]),e=Math.min(e,this.w.candleData.seriesCandleO[C][a]));break;case"violin":void 0!==(null==(c=this.w.violinData.seriesViolinMax[C])?void 0:c[a])&&(f=Math.max(f,this.w.violinData.seriesViolinMax[C][a]),e=Math.min(e,this.w.violinData.seriesViolinMin[C][a]))}if(t&&"candlestick"!==t&&"boxPlot"!==t&&"violin"!==t&&"rangeArea"!==t&&"rangeBar"!==t&&(f=Math.max(f,this.w.seriesData.series[C][a]),e=Math.min(e,this.w.seriesData.series[C][a])),this.w.seriesData.seriesGoals[C]&&this.w.seriesData.seriesGoals[C][a]&&Array.isArray(this.w.seriesData.seriesGoals[C][a])&&this.w.seriesData.seriesGoals[C][a].forEach(t=>{f=Math.max(f,t.value),e=Math.min(e,t.value)}),"boxPlot"===this.w.config.chart.type||"boxPlot"===t){const t=null==(d=null==(h=this.w.candleData.seriesBoxPoints)?void 0:h[C])?void 0:d[a];if(t)for(let i=0;i<t.length;i++){const s=t[i];"number"==typeof s&&(f=Math.max(f,s),e=Math.min(e,s))}}i=f,A.isFloat(s)&&(x.yValueDecimal=Math.max(x.yValueDecimal,A.decimalPlaces(s))),m>(null==(p=y[C])?void 0:p[a])&&(null==(u=y[C])?void 0:u[a])<0&&(m=y[C][a])}else x.hasNullValues=!0}"bar"!==t&&"column"!==t||(m<0&&f<0&&(f=0,i=Math.max(i,0)),m===Number.MIN_VALUE&&(m=0,e=Math.min(e,0)))}if("rangeBar"===g.chart.type&&this.w.rangeData.seriesRangeStart.length&&x.isBarHorizontal&&(m=e),"bar"===g.chart.type&&(m<0&&f<0&&(f=0),m===Number.MIN_VALUE&&(m=0)),S&&f===-Number.MAX_VALUE){this._ignoreAutoScaleWindow=!0;try{return this.getMinYMaxY(t,Number.MAX_VALUE,-Number.MAX_VALUE,s)}finally{this._ignoreAutoScaleWindow=!1}}return{minY:m,maxY:f,lowestY:e,highestY:i}}setYRange(){const t=this.w.globals,e=this.w.config;t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE;let i,s=Number.MAX_VALUE;if(t.isMultipleYAxis){s=Number.MAX_VALUE;for(let e=0;e<this.w.seriesData.series.length;e++)i=this.getMinYMaxY(e),t.minYArr[e]=i.lowestY,t.maxYArr[e]=i.highestY,s=Math.min(s,i.lowestY)}i=this.getMinYMaxY(0,s,void 0,this.w.seriesData.series.length),"bar"===e.chart.type?(t.minY=i.minY,t.maxY=i.maxY):(t.minY=i.lowestY,t.maxY=i.highestY),s=i.lowestY,e.chart.stacked&&this._setStackedMinMax(),"line"===e.chart.type||"area"===e.chart.type||"rangeArea"===e.chart.type||"scatter"===e.chart.type||"candlestick"===e.chart.type||"boxPlot"===e.chart.type||"violin"===e.chart.type||"rangeBar"===e.chart.type&&!t.isBarHorizontal?t.minY===Number.MIN_VALUE&&s!==-Number.MAX_VALUE&&s!==t.maxY&&(t.minY=s):t.minY=t.minY!==Number.MIN_VALUE?Math.min(i.minY,t.minY):i.minY;const a=(t,e)=>{if("number"==typeof t)return t;if("function"!=typeof t)return;const i=t(e);return A.isNumber(i)?i:void 0},r=e.yaxis[0];if(!t.isMultipleYAxis&&r){const e=a(r.max,t.maxY);void 0!==e&&(t.maxYArr[0]=t.maxY=e);const i=a(r.min,t.minY);void 0!==i&&(t.minYArr[0]=t.minY=i)}if(t.isBarHorizontal){["min","max"].forEach(i=>{void 0!==e.xaxis[i]&&"number"==typeof e.xaxis[i]&&("min"===i?t.minY=e.xaxis[i]:t.maxY=e.xaxis[i])})}return t.isMultipleYAxis?(this.scales.scaleMultipleYAxes(),t.minY=s):(this.scales.setYScaleForIndex(0,t.minY,t.maxY),t.minY=t.yAxisScale[0].niceMin,t.maxY=t.yAxisScale[0].niceMax,t.minYArr[0]=t.minY,t.maxYArr[0]=t.maxY),t.barGroups=[],t.lineGroups=[],t.areaGroups=[],e.series.forEach(i=>{const s=i;switch(s.type||e.chart.type){case"bar":case"column":t.barGroups.push(s.group);break;case"line":t.lineGroups.push(s.group);break;case"area":t.areaGroups.push(s.group)}}),t.barGroups=t.barGroups.filter((t,e,i)=>i.indexOf(t)===e),t.lineGroups=t.lineGroups.filter((t,e,i)=>i.indexOf(t)===e),t.areaGroups=t.areaGroups.filter((t,e,i)=>i.indexOf(t)===e),{minY:t.minY,maxY:t.maxY,minYArr:t.minYArr,maxYArr:t.maxYArr,yAxisScale:t.yAxisScale}}setXRange(){var t,e;const i=this.w.globals,s=this.w.config,a="numeric"===s.xaxis.type||"datetime"===s.xaxis.type||"category"===s.xaxis.type&&!this.w.axisFlags.noLabelsProvided||this.w.axisFlags.noLabelsProvided||this.w.axisFlags.isXNumeric,r=()=>{var t;let e=i.minX,s=i.maxX;for(let i=0;i<this.w.seriesData.series.length;i++){const a=this.w.labelData.labels[i];if(!a)continue;const r=null==(t=this.w.seriesData._parsedExtrema)?void 0:t[i];if(r&&r.xNumeric&&r.xref===a&&r.len===a.length)r.maxX>s&&(s=r.maxX),r.minX<e&&(e=r.minX);else for(let t=0;t<a.length;t++){const i=a[t];null!==i&&"number"==typeof i&&i==i&&(i>s&&(s=i),i<e&&(e=i))}}i.maxX=s,i.initialMaxX=s,i.minX=e,i.initialMinX=e};if(this.w.axisFlags.isXNumeric&&r(),this.w.axisFlags.noLabelsProvided&&0===s.xaxis.categories.length&&(i.maxX=this.w.labelData.labels[this.w.labelData.labels.length-1],i.initialMaxX=this.w.labelData.labels[this.w.labelData.labels.length-1],i.minX=1,i.initialMinX=1),this.w.axisFlags.isXNumeric||this.w.axisFlags.noLabelsProvided||this.w.axisFlags.dataFormatXNumeric){let r=10;if(void 0===s.xaxis.tickAmount){r=Math.round(i.svgWidth/150);const t=this.w.axisFlags.isXNumeric&&this.w.axisFlags.dataFormatXNumeric&&"datetime"!==s.xaxis.type&&!s.xaxis.convertedCatToNumeric&&!i.isBarHorizontal,e=()=>{const t=parseFloat(s.xaxis.labels.style.fontSize)||12,e=this.w.labelData.labels.reduce((t,e)=>Array.isArray(e)?e.reduce((t,e)=>Math.max(t,String(e).length),t):t,0);return i.dataPoints*e*t*.6<=i.svgWidth};i.dataPoints<30&&("numeric"===s.xaxis.type||t&&e())&&(r=i.dataPoints-1),r>i.dataPoints&&0!==i.dataPoints&&(r=i.dataPoints-1)}else if("dataPoints"===s.xaxis.tickAmount){if(this.w.seriesData.series.length>1&&(r=this.w.seriesData.series[i.maxValsInArrayIndex].length-1),this.w.axisFlags.isXNumeric){const t=Math.round(i.maxX-i.minX);t<30&&(r=t)}}else r=s.xaxis.tickAmount;if(i.xTickAmount=r,void 0!==s.xaxis.max&&"number"==typeof s.xaxis.max&&(i.maxX=s.xaxis.max),void 0!==s.xaxis.min&&"number"==typeof s.xaxis.min&&(i.minX=s.xaxis.min),void 0!==s.xaxis.range&&(i.minX=i.maxX-s.xaxis.range),"heatmap"===s.chart.type&&(null==(e=(t=rt("heatmap").prototype).padXRange)||e.call(t,this)),i.minX!==Number.MAX_VALUE&&i.maxX!==-Number.MAX_VALUE)if(s.xaxis.convertedCatToNumeric&&!this.w.axisFlags.dataFormatXNumeric){const t=[];for(let e=i.minX-1;e<i.maxX;e++)t.push(e+1);i.xAxisScale={result:t,niceMin:t[0],niceMax:t[t.length-1]}}else i.xAxisScale=this.scales.setXScale(i.minX,i.maxX);else i.xAxisScale=this.scales.linearScale(0,r,r,0,s.xaxis.stepSize),this.w.axisFlags.noLabelsProvided&&this.w.labelData.labels.length>0&&(i.xAxisScale=this.scales.linearScale(1,this.w.labelData.labels.length,r-1,0,s.xaxis.stepSize),this.w.seriesData.seriesX=this.w.labelData.labels.slice());a&&i.isBarHorizontal?this.w.labelData.labels=(this.w.seriesData.seriesX[i.maxValsInArrayIndex]||[]).slice():a&&(this.w.labelData.labels=i.xAxisScale.result.slice())}return i.isBarHorizontal&&this.w.labelData.labels.length&&(i.xTickAmount=this.w.labelData.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:i.minX,maxX:i.maxX}}setZRange(){var t;const e=this.w.globals;if(!this.w.axisFlags.isDataXYZ)return;for(let t=0;t<this.w.seriesData.series.length;t++)if(void 0!==this.w.seriesData.seriesZ[t])for(let i=0;i<this.w.seriesData.seriesZ[t].length;i++)null!==this.w.seriesData.seriesZ[t][i]&&A.isNumber(this.w.seriesData.seriesZ[t][i])&&(e.maxZ=Math.max(e.maxZ,this.w.seriesData.seriesZ[t][i]),e.minZ=Math.min(e.minZ,this.w.seriesData.seriesZ[t][i]));const i=(null==(t=this.w.config.plotOptions)?void 0:t.bubble)||{};A.isNumber(i.minZ)&&i.minZ<e.minZ&&(e.minZ=i.minZ),A.isNumber(i.maxZ)&&i.maxZ>e.maxZ&&(e.maxZ=i.maxZ)}_handleSingleDataPoint(){const t=this.w.globals,e=this.w.config;if(t.minX===t.maxX){const i=new S(this.w);if("datetime"===e.xaxis.type){const s=i.getDate(t.minX);e.xaxis.labels.datetimeUTC?s.setUTCDate(s.getUTCDate()-2):s.setDate(s.getDate()-2),t.minX=new Date(s).getTime();const a=i.getDate(t.maxX);e.xaxis.labels.datetimeUTC?a.setUTCDate(a.getUTCDate()+2):a.setDate(a.getDate()+2),t.maxX=new Date(a).getTime()}else("numeric"===e.xaxis.type||"category"===e.xaxis.type&&!this.w.axisFlags.noLabelsProvided)&&(t.minX=t.minX-2,t.initialMinX=t.minX,t.maxX=t.maxX+2,t.initialMaxX=t.maxX)}}_getMinXDiff(){const t=this.w.globals;this.w.axisFlags.isXNumeric&&this.w.seriesData.seriesX.forEach((e,i)=>{var s;if(e.length){1===e.length&&e.push(this.w.seriesData.seriesX[t.maxValsInArrayIndex][this.w.seriesData.seriesX[t.maxValsInArrayIndex].length-1]);const a=null==(s=this.w.seriesData._parsedExtrema)?void 0:s[i];if(a&&a.xNumeric&&a.xSorted&&a.xref===e&&a.len===e.length)return a.minXDiff<t.minXDiff&&(t.minXDiff=a.minXDiff),void(1!==t.dataPoints&&t.minXDiff!==Number.MAX_VALUE||(t.minXDiff=.5));let r=!0,o=t.minXDiff;for(let t=1;t<e.length;t++){const i=e[t]-e[t-1];if(i>0)i<o&&(o=i);else if(i<0){r=!1;break}}if(r)return t.minXDiff=o,void(1!==t.dataPoints&&t.minXDiff!==Number.MAX_VALUE||(t.minXDiff=.5));const n=e.slice();n.sort((t,e)=>t-e),n.forEach((e,i)=>{if(i>0){const s=e-n[i-1];s>0&&(t.minXDiff=Math.min(s,t.minXDiff))}}),1!==t.dataPoints&&t.minXDiff!==Number.MAX_VALUE||(t.minXDiff=.5)}})}_setStackedMinMax(){const t=this.w.globals,e=this._autoScaleYEnabled();if(!this.w.seriesData.series.length)return;const i=this.w.labelData.seriesGroupIndex,s=this.w.axisFlags.isXNumeric&&!this.w.config.plotOptions.bar.horizontal,a=new Map;this.w.config.series.forEach((r,o)=>{const n=e?this._autoScaleXBounds(o):null,l=this.w.seriesData.seriesX[o],c=!!(n&&l&&l.length),h=this.w.config.chart.stacked&&(!t.comboCharts||!this.w.config.chart.stackOnlyBar||"bar"===(null==r?void 0:r.type)||"column"===(null==r?void 0:r.type));for(let e=0;e<this.w.seriesData.series[t.maxValsInArrayIndex].length;e++){if(c&&(l[e]<n.lo||l[e]>n.hi))continue;const t=(i[o]||0)+"|"+(s&&l?l[e]:e);let r=a.get(t);r||a.set(t,r=[0,0]);const d=this.w.seriesData.series[o][e];h&&null!==d&&A.isNumber(d)&&(d>0?r[0]+=parseFloat(String(d))+1e-4:r[1]+=parseFloat(String(d)))}}),a.forEach(e=>{t.maxY=Math.max(t.maxY,e[0]),t.minY=Math.min(t.minY,e[1])})}}function Se(){return{palette1:["#008FFB","#00A86F","#CA8501","#FF4560","#846DD5"],palette2:["#6978CB","#039DE2","#49A84D","#B39105","#D68000"],palette3:["#209FCC","#648291","#D4526E","#0FA783","#A19285"],palette4:["#2FA59D","#73A20B","#099DE1","#FD5D5D","#648291"],palette5:["#2B908F","#F56566","#2EAB16","#FA4443","#1EA2BD"],palette6:["#449DD1","#F86624","#EA3A4A","#9C63D1","#899E2A"],palette7:["#DF475B","#1B998B","#7E75B7","#F46036","#B1911B"],palette8:["#9C63D1","#F86624","#B38F04","#EA3A4A","#2FA2B3"],palette9:["#98776F","#A19285","#A8705E","#BA6560","#A0927F"],palette10:["#C91EFF","#A94BFD","#6C6AFE","#2983FF","#009ED8"],cvdDeuteranopia:["#0072B2","#E69F00","#56B4E9","#009E73","#F0E442","#D55E00","#CC79A7"],cvdProtanopia:["#0077BB","#EE7733","#009988","#EE3377","#BBBBBB","#33BBEE","#CC3311"],cvdTritanopia:["#CC3311","#009988","#EE7733","#0077BB","#EE3377","#BBBBBB","#33BBEE"],highContrast:["#005A9C","#C00000","#007A33","#6C3483","#7B3F00","#0097A7","#4A235A"]}}class Ce{constructor(t,{theme:e=null,timeScale:i=null}={},s){this.w=t,this.elgrid=s,this.xaxisFontSize=t.config.xaxis.labels.style.fontSize,this.axisFontFamily=t.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=t.config.xaxis.labels.style.colors,this.xAxisoffX="bottom"===t.config.xaxis.position?t.layout.gridHeight:0,this.drawnLabels=[],this.axesUtils=new be(t,{theme:e,timeScale:i})}drawYaxis(t){const e=this.w,i=new ae(this.w),s=e.config.yaxis[t].labels.style,{fontSize:a,fontFamily:r,fontWeight:o}=s,n=i.group({class:"apexcharts-yaxis",rel:t,transform:`translate(${e.globals.translateYAxisX[t]}, 0)`});if(this.axesUtils.isYAxisHidden(t))return n;const l=i.group({class:"apexcharts-yaxis-texts-g"});n.add(l);const c=e.globals.yAxisScale[t].result.length-1,h=e.layout.gridHeight/c,d=e.formatters.yLabelFormatters[t],p=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice());let u=1;if("heatmap"===e.config.chart.type&&!e.config.yaxis[t].labels.formatter){const t=parseInt(a,10)||11,i=Math.max(1,Math.floor(e.layout.gridHeight/(1.4*t))),s=c+1;s>i&&(u=Math.ceil(s/i))}if(e.config.yaxis[t].labels.show){let n=e.layout.translateY+e.config.yaxis[t].labels.offsetY;e.globals.isBarHorizontal?n=0:"heatmap"===e.config.chart.type&&(n-=h/2),n+=parseInt(a,10)/3;let g=null;for(let x=c;x>=0;x--){const c=u>1&&x%u!==0?"":d(p[x],x,e);let f=e.config.yaxis[t].labels.padding;e.config.yaxis[t].opposite&&0!==e.config.yaxis.length&&(f*=-1);const m=this.getTextAnchor(e.config.yaxis[t].labels.align,e.config.yaxis[t].opposite),b=this.axesUtils.getYAxisForeColor(s.colors,t),y=Array.isArray(b)?b[x]:b,v=Array.from(e.dom.baseEl.querySelectorAll(`.apexcharts-yaxis[rel='${t}'] .apexcharts-yaxis-label tspan`)).map(t=>t.textContent),w=i.drawText({x:f,y:n,text:v.includes(c)&&!e.config.yaxis[t].labels.showDuplicates?"":c,textAnchor:m,fontSize:a,fontFamily:r,fontWeight:o,maxWidth:e.config.yaxis[t].labels.maxWidth,foreColor:y,isPlainText:!1,cssClass:`apexcharts-yaxis-label ${s.cssClass}`});l.add(w),this.addTooltip(w,c),null===g&&(g=w),0!==e.config.yaxis[t].labels.rotate&&this.rotateLabel(i,w,g,e.config.yaxis[t].labels.rotate),n+=h}}return this.addYAxisTitle(i,n,t),this.addAxisBorder(i,n,t,c,h),n}getTextAnchor(t,e){return"left"===t?"start":"center"===t?"middle":"right"===t?"end":e?"start":"end"}addTooltip(t,e){const i=y.createElementNS(xt,"title");i.textContent=Array.isArray(e)?e.join(" "):e,t.node.appendChild(i)}rotateLabel(t,e,i,s){const a=t.rotateAroundCenter(i.node),r=t.rotateAroundCenter(e.node);e.node.setAttribute("transform",`rotate(${s} ${a.x} ${r.y})`)}addYAxisTitle(t,e,i){const s=this.w;if(void 0!==s.config.yaxis[i].title.text){const a=t.group({class:"apexcharts-yaxis-title"}),r=s.config.yaxis[i].opposite?s.globals.translateYAxisX[i]:0,o=t.drawText({x:r,y:s.layout.gridHeight/2+s.layout.translateY+s.config.yaxis[i].title.offsetY,text:s.config.yaxis[i].title.text,textAnchor:"end",foreColor:s.config.yaxis[i].title.style.color,fontSize:s.config.yaxis[i].title.style.fontSize,fontWeight:s.config.yaxis[i].title.style.fontWeight,fontFamily:s.config.yaxis[i].title.style.fontFamily,cssClass:`apexcharts-yaxis-title-text ${s.config.yaxis[i].title.style.cssClass}`});a.add(o),e.add(a)}}addAxisBorder(t,e,i,s,a){const r=this.w,o=r.config.yaxis[i].axisBorder;let n=31+o.offsetX;if(r.config.yaxis[i].opposite&&(n=-31-o.offsetX),o.show){const i=t.drawLine(n,r.layout.translateY+o.offsetY-2,n,r.layout.gridHeight+r.layout.translateY+o.offsetY+2,o.color,0,o.width);e.add(i)}r.config.yaxis[i].axisTicks.show&&this.axesUtils.drawYAxisTicks(n,s,o,r.config.yaxis[i].axisTicks,i,a,e)}drawYaxisInversed(t){const e=this.w,i=new ae(this.w),s=i.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),a=i.group({class:"apexcharts-xaxis-texts-g",transform:`translate(${e.layout.translateXAxisX}, ${e.layout.translateXAxisY})`});s.add(a);let r=e.globals.yAxisScale[t].result.length-1;const o=e.layout.gridWidth/r+.1;let n=o+e.config.xaxis.labels.offsetX;const l=e.formatters.xLabelFormatter;let c=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice());const h=e.labelData.timescaleLabels;if(h.length>0&&(c=h.slice(),r=c.length),e.config.xaxis.labels.show)for(let t=h.length?0:r;h.length?t<h.length:t>=0;h.length?t++:t--){let s=null==l?void 0:l(c[t],t,e),r=e.layout.gridWidth+e.globals.padHorizontal-(n-o+e.config.xaxis.labels.offsetX);if(h.length){const i=this.axesUtils.getLabel(c,h,r,t,this.drawnLabels,this.xaxisFontSize);r=i.x,s=i.text,this.drawnLabels.push(i.text),0===t&&e.globals.skipFirstTimelinelabel&&(s=""),t===c.length-1&&e.globals.skipLastTimelinelabel&&(s="")}const d=i.drawText({x:r,y:this.xAxisoffX+e.config.xaxis.labels.offsetY+30-("top"===e.config.xaxis.position?e.layout.xAxisHeight+e.config.xaxis.axisTicks.height-2:0),text:s,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[t]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.axisFontFamily,fontWeight:e.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:`apexcharts-xaxis-label ${e.config.xaxis.labels.style.cssClass}`});a.add(d),this.addTooltip(d,s),n+=o}return this.inversedYAxisTitleText(s),this.inversedYAxisBorder(s),s}inversedYAxisBorder(t){const e=this.w,i=new ae(this.w),s=e.config.xaxis.axisBorder;if(s.show){let a=0;"bar"===e.config.chart.type&&e.axisFlags.isXNumeric&&(a-=15);const r=i.drawLine(e.globals.padHorizontal+a+s.offsetX,this.xAxisoffX,e.layout.gridWidth,this.xAxisoffX,s.color,0,s.height);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(r):t.add(r)}}inversedYAxisTitleText(t){const e=this.w,i=new ae(this.w);if(void 0!==e.config.xaxis.title.text){const s=i.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),a=i.drawText({x:e.layout.gridWidth/2+e.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(e.config.xaxis.title.style.fontSize)+e.config.xaxis.title.offsetY+20,text:e.config.xaxis.title.text,textAnchor:"middle",fontSize:e.config.xaxis.title.style.fontSize,fontFamily:e.config.xaxis.title.style.fontFamily,fontWeight:e.config.xaxis.title.style.fontWeight,foreColor:e.config.xaxis.title.style.color,cssClass:`apexcharts-xaxis-title-text ${e.config.xaxis.title.style.cssClass}`});s.add(a),t.add(s)}}yAxisTitleRotate(t,e){const i=this.w,s=new ae(this.w),a=i.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${t}'] .apexcharts-yaxis-texts-g`),r=a?a.getBoundingClientRect():{width:0,height:0},o=i.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${t}'] .apexcharts-yaxis-title text`),n=o?o.getBoundingClientRect():{width:0,height:0};if(o){const a=this.xPaddingForYAxisTitle(t,r,n,e);o.setAttribute("x",String(a.xPos-(e?10:0)));const l=s.rotateAroundCenter(o);o.setAttribute("transform",`rotate(${e?-1*i.config.yaxis[t].title.rotate:i.config.yaxis[t].title.rotate} ${l.x} ${l.y})`)}}xPaddingForYAxisTitle(t,e,i,s){const a=this.w;let r=0,o=10;return void 0===a.config.yaxis[t].title.text||t<0?{xPos:r,padd:0}:(s?r=e.width+a.config.yaxis[t].title.offsetX+i.width/2+o/2:(r=-1*e.width+a.config.yaxis[t].title.offsetX+o/2+i.width/2,a.globals.isBarHorizontal&&(o=25,r=-1*e.width-a.config.yaxis[t].title.offsetX-o)),{xPos:r,padd:o})}setYAxisXPosition(t,e){const i=this.w;let s=0,a=0,r=18,o=1;i.config.yaxis.forEach((n,l)=>{const c=i.globals.ignoreYAxisIndexes.includes(l)||!n.show||n.floating||0===t[l].width,h=t[l].width+e[l].width;n.opposite?i.globals.isBarHorizontal?(a=i.layout.gridWidth+i.layout.translateX-1,i.globals.translateYAxisX[l]=a-n.labels.offsetX):(a=i.layout.gridWidth+i.layout.translateX+o,c||(o+=h+20),i.globals.translateYAxisX[l]=a-n.labels.offsetX+20):(s=i.layout.translateX-r,c||(r+=h+20),i.globals.translateYAxisX[l]=s+n.labels.offsetX)})}setYAxisTextAlignments(){const t=this.w;t.config.yaxis.forEach((e,i)=>{if(e&&!e.floating&&void 0!==e.labels.align){const s=t.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${i}'] .apexcharts-yaxis-texts-g`);if(!s)return;const a=Array.from(t.dom.baseEl.querySelectorAll(`.apexcharts-yaxis[rel='${i}'] .apexcharts-yaxis-label`)),r=s.getBoundingClientRect();a.forEach(t=>{t.setAttribute("text-anchor",e.labels.align)}),"left"!==e.labels.align||e.opposite?"center"===e.labels.align?s.setAttribute("transform",`translate(${r.width/2*(e.opposite?1:-1)}, 0)`):"right"===e.labels.align&&e.opposite&&s.setAttribute("transform",`translate(${r.width}, 0)`):s.setAttribute("transform",`translate(-${r.width}, 0)`)}})}}class ke{constructor(t,e){this.w=t,this.ctx=e,this.documentEvent=this.documentEvent.bind(this)}addEventListener(t,e){const i=this.w;Object.prototype.hasOwnProperty.call(i.globals.events,t)?i.globals.events[t].push(e):i.globals.events[t]=[e]}removeEventListener(t,e){const i=this.w;if(!Object.prototype.hasOwnProperty.call(i.globals.events,t))return;const s=i.globals.events[t].indexOf(e);-1!==s&&i.globals.events[t].splice(s,1)}fireEvent(t,e){const i=this.w;if(!Object.prototype.hasOwnProperty.call(i.globals.events,t))return;e&&e.length||(e=[]);const s=i.globals.events[t],a=s.length;for(let t=0;t<a;t++)s[t].apply(null,e)}setupEventHandlers(){const t=this.w,e=this.ctx,i=t.dom.baseEl.querySelector(t.globals.chartClass);this.ctx.eventList.forEach(s=>{null==i||i.addEventListener(s,i=>{const s=null===i.target.getAttribute("i")&&-1!==t.interact.capturedSeriesIndex?t.interact.capturedSeriesIndex:i.target.getAttribute("i"),a=null===i.target.getAttribute("j")&&-1!==t.interact.capturedDataPointIndex?t.interact.capturedDataPointIndex:i.target.getAttribute("j"),r=Object.assign({},t,{seriesIndex:t.globals.axisCharts?s:0,dataPointIndex:a});"keydown"===i.type?t.config.chart.accessibility.enabled&&t.config.chart.accessibility.keyboard.enabled&&("function"==typeof t.config.chart.events.keyDown&&t.config.chart.events.keyDown(i,e,r),e.ctx.events.fireEvent("keydown",[i,e,r])):"keyup"===i.type?t.config.chart.accessibility.enabled&&t.config.chart.accessibility.keyboard.enabled&&("function"==typeof t.config.chart.events.keyUp&&t.config.chart.events.keyUp(i,e,r),e.ctx.events.fireEvent("keyup",[i,e,r])):"mousemove"===i.type||"touchmove"===i.type?"function"==typeof t.config.chart.events.mouseMove&&t.config.chart.events.mouseMove(i,e,r):"mouseleave"===i.type||"touchleave"===i.type?"function"==typeof t.config.chart.events.mouseLeave&&t.config.chart.events.mouseLeave(i,e,r):("mouseup"===i.type&&1===i.which||"touchend"===i.type)&&("function"==typeof t.config.chart.events.click&&t.config.chart.events.click(i,e,r),e.ctx.events.fireEvent("click",[i,e,r]))},{capture:!1,passive:!0})}),this.ctx.eventList.forEach(e=>{t.dom.baseEl.addEventListener(e,this.documentEvent,{passive:!0})}),this.ctx.core.setupBrushHandler()}documentEvent(t){const e=this.w,i=t.target.className;if("click"===t.type){const t=e.dom.baseEl.querySelector(".apexcharts-menu");t&&t.classList.contains("apexcharts-menu-open")&&"apexcharts-menu-icon"!==i&&t.classList.remove("apexcharts-menu-open")}e.interact.clientX="touchmove"===t.type?t.touches[0].clientX:t.clientX,e.interact.clientY="touchmove"===t.type?t.touches[0].clientY:t.clientY}}class Me{constructor(t){this.w=t}setCurrentLocaleValues(t){let e=this.w.config.chart.locales;const i=d.getApex();i.chart&&i.chart.locales&&i.chart.locales.length>0&&(e=this.w.config.chart.locales.concat(i.chart.locales));const s=e.filter(e=>e.name===t)[0];if(!s)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");{const t=A.extend(k,s);this.w.globals.locale=t.options}}}class Te{constructor(t,e){this.w=t,this.ctx=e}drawAxis(t,e){const i=this.w.globals,s=this.w.config,a=new ye(this.w,this.ctx,e),r=new Ce(this.w,{theme:this.ctx.theme,timeScale:this.ctx.timeScale},e);if(i.axisCharts&&"radar"!==t){let t,e;i.isBarHorizontal?(e=r.drawYaxisInversed(0),t=a.drawXaxisInversed(0),this.w.dom.elGraphical.add(t),this.w.dom.elGraphical.add(e)):(t=a.drawXaxis(),this.w.dom.elGraphical.add(t),s.yaxis.map((t,s)=>{if(-1===i.ignoreYAxisIndexes.indexOf(s)&&(e=r.drawYaxis(s),this.w.dom.Paper.add(e),"back"===this.w.config.grid.position)){const t=this.w.dom.Paper.children()[1];t&&(t.remove(),this.w.dom.Paper.add(t))}}))}}}const De=(t,e,i)=>{var s;t.dom.elGraphical.add(e),null==(s=i[0])||s.before(e.node)};class _e{constructor(t){this.w=t}drawXCrosshairs(){const t=this.w,e=[...t.dom.elGraphical.node.querySelectorAll(":scope > .apexcharts-xcrosshairs")],i=new ae(this.w),s=new ee(this.w),a=t.config.xaxis.crosshairs.fill.gradient,r=t.config.xaxis.crosshairs.dropShadow,o=t.config.xaxis.crosshairs.fill.type,n=a.colorFrom,l=a.colorTo,c=a.opacityFrom,h=a.opacityTo,d=a.stops,p=r.enabled,u=r.left,g=r.top,x=r.blur,f=r.color,m=r.opacity;let b=t.config.xaxis.crosshairs.fill.color;if(t.config.xaxis.crosshairs.show){"gradient"===o&&(b=i.drawGradient("vertical",n,l,c,h,null,d,[]));let a=1===t.config.xaxis.crosshairs.width?i.drawLine(0,0,0,0):i.drawRect(),r=t.layout.gridHeight;(!A.isNumber(r)||r<0)&&(r=0);let y=t.config.xaxis.crosshairs.width;(!A.isNumber(y)||Number(y)<0)&&(y=0),a.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:r,width:y,height:r,fill:b,filter:"none","fill-opacity":t.config.xaxis.crosshairs.opacity,stroke:t.config.xaxis.crosshairs.stroke.color,"stroke-width":t.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":t.config.xaxis.crosshairs.stroke.dashArray}),p&&(a=s.dropShadow(a,{left:u,top:g,blur:x,color:f,opacity:m})),De(t,a,e)}e.forEach(t=>t.remove())}drawYCrosshairs(){const t=this.w,e=[...t.dom.elGraphical.node.querySelectorAll(":scope > .apexcharts-ycrosshairs, :scope > .apexcharts-ycrosshairs-hidden")],i=new ae(this.w),s=t.config.yaxis[0].crosshairs,a=t.globals.barPadForNumericAxis;if(t.config.yaxis[0].crosshairs.show){const r=i.drawLine(-a,0,t.layout.gridWidth+a,0,s.stroke.color,s.stroke.dashArray,s.stroke.width);r.attr({class:"apexcharts-ycrosshairs"}),De(t,r,e)}const r=i.drawLine(-a,0,t.layout.gridWidth+a,0,s.stroke.color,0,0);r.attr({class:"apexcharts-ycrosshairs-hidden"}),De(t,r,e),e.forEach(t=>t.remove())}}function Fe(t,e){if(!A.isObject(t)||!A.isObject(e))return void 0!==e?e:t;const i=n({},t);for(const s of Object.keys(e)){const a=e[s];void 0!==a&&(A.isObject(a)&&A.isObject(t[s])?i[s]=Fe(t[s],a):i[s]=a)}return i}function Le(t,e,i,s){for(const a of Object.keys(t)){const r=[...i,a],o=t[a],n=A.isObject(e)?e[a]:void 0;A.isObject(o)&&A.isObject(n)?Le(o,n,r,s):s.push(r)}return s}function Ee(t,e){let i=t;for(const t of e){if(!A.isObject(i)||!(t in i))return{found:!1};i=i[t]}return{found:!0,value:i}}function Pe(t,e,i){let s=t;for(let t=0;t<e.length-1;t++){if(!A.isObject(s[e[t]]))return;s[e[t]]=n({},s[e[t]]),s=s[e[t]]}const a=e[e.length-1];void 0===i?delete s[a]:s[a]=A.clone(i)}class Be{constructor(t){this.w=t,this._activeBreakpoint=null,this._base=new Map}absorb(t){if(t&&this._base.size)for(const e of this._base.values()){const i=Ee(t,e.path);i.found&&(e.value=A.isObject(i.value)&&A.isObject(e.value)?A.extend(e.value,i.value):A.clone(i.value))}}withoutBreakpoints(t){const e=n({},t);for(const{path:t,value:i}of this._base.values())Pe(e,t,i);return e}checkResponsiveConfig(t){var e;const i=this.w,s=i.config,a=(s.responsive||[]).slice();if(0===a.length&&null===this._activeBreakpoint)return;a.sort((t,e)=>t.breakpoint>e.breakpoint?1:e.breakpoint>t.breakpoint?-1:0).reverse();const r=d.isBrowser()?window.innerWidth>0?window.innerWidth:screen.width:0,o=a.filter(t=>r<t.breakpoint);if(0===o.length&&null===this._activeBreakpoint)return;const h=new nt({});this.absorb(t);let p=A.extend({},s);if(t){const e=t,{series:s}=e,a=c(e,["series"]);p=A.extend(p,gt.extendArrayProps(h,a,i))}if(p=this.withoutBreakpoints(p),this._base=new Map,this._activeBreakpoint=null,o.length){for(const t of o)for(const e of Le(t.options||{},p,[],[])){const t=e.join(".");this._base.has(t)||this._base.set(t,{path:e,value:A.clone(Ee(p,e).value)})}for(const t of o){const s=(null==(e=t.options)?void 0:e.yaxis)?A.clone(t.options.yaxis):null,a=p.yaxis;if(p=A.extend(p,gt.extendArrayProps(h,t.options,i)),Array.isArray(a)&&s){const t=Array.isArray(s)?s:[s];p=l(n({},p),{yaxis:a.map((e,i)=>Fe(e,t[i]))})}this._activeBreakpoint=t.breakpoint}}this.overrideResponsiveOptions(p)}overrideResponsiveOptions(t){const e=new nt(t).init({responsiveOverride:!0});this.w.config=e}}function Ne(t,e){const i=e.config.chart.streaming;if(!i||!i.enabled)return;const s=i.maxPoints,a=e.config.xaxis.range,r="datetime"===e.config.xaxis.type,o=t=>{const e=Array.isArray(t)?t[0]:t&&t.x,i=r&&null!=e?new Date(e).getTime():e;return"number"==typeof i&&i==i?i:null};t.forEach(t=>{var e;const i=null==t?void 0:t.data;if(!Array.isArray(i)||i.length<2)return;if("number"==typeof s&&s>0)return void(i.length>s&&(t.data=i.slice(i.length-s)));if(!a)return;const r=o(i[i.length-1]),n=o(i[0]);if(null==r||null==n||r<=n)return;const l=(r-n)/(i.length-1),c=r-a-2*l;let h=0;for(;h<i.length&&(null!=(e=o(i[h]))?e:c)<c;)h++;h>0&&(t.data=i.slice(h))})}function Re(t){const e=(t.getAttribute("transform")||"").trim();if(!e)return[0,0];const i=/^translate\(\s*([-+.\deE]+)(?:[\s,]+([-+.\deE]+))?\s*\)$/.exec(e);if(!i)return null;const s=parseFloat(i[1]),a=void 0===i[2]?0:parseFloat(i[2]);return Number.isFinite(s)&&Number.isFinite(a)?[s,a]:null}function ze(t){var e,i,s;const a=t.globals.layoutTween;if(a&&a.graphical===(null==(e=t.dom.elGraphical)?void 0:e.node))return n({},a.rect);const r=t.layout;return{x:null!=(i=r.translateX)?i:0,y:null!=(s=r.translateY)?s:0,w:r.gridWidth,h:r.gridHeight}}function Ie(t){const e=l(n({},t),{pending:!0});return y.requestAnimationFrame(()=>{e.pending=!1}),e}const Oe=["pointerdown","touchstart","wheel","keydown"];function Xe(t,e){const i=t.dom.elWrap,s=t=>{var i;const s=t.target;(null==(i=null==s?void 0:s.closest)?void 0:i.call(s,".apexcharts-legend, .apexcharts-toolbar, .apexcharts-menu"))||e()};return Oe.forEach(t=>null==i?void 0:i.addEventListener(t,s,!0)),()=>Oe.forEach(t=>null==i?void 0:i.removeEventListener(t,s,!0))}function He(t,e){if(!t)return;const i=e.map(e=>parseFloat(t.getAttribute(e)||""));return i.every(Number.isFinite)?i:void 0}function Ye(t){const e=t.parentNode;return((null==e?void 0:e.getAttribute("class"))||"").split(" ")[0]}function We(t){var e;const i={};t.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel]").forEach(t=>{const e=Re(t);e&&(i[`g${t.getAttribute("rel")}`]=e)});const s={},a=null==(e=t.dom.elGraphical)?void 0:e.node;if(a){a.querySelectorAll(".apexcharts-grid line:not(.apexcharts-tick-ghost), .apexcharts-grid-borders line").forEach(t=>{const e=He(t,["x1","y1","x2","y2"]);if(!e)return;const i=Ye(t);s[`h:${i}`]||e[1]!==e[3]||(s[`h:${i}`]=[e[0],e[2]]),s[`v:${i}`]||e[0]!==e[2]||(s[`v:${i}`]=[e[1],e[3]])});const t=He(a.querySelector(".apexcharts-grid-row"),["x","width"]);t&&(s.row=t);const e=He(a.querySelector(".apexcharts-grid-column"),["y","height"]);e&&(s.col=e);const i=He(a.querySelector(".apexcharts-xaxis > line"),["x1","x2"]);i&&(s.xline=i)}const r=["x","y","width","height"];return[t.dom.elGridRect,t.dom.elGridRectBar,t.dom.elGridRectMarker].forEach((t,e)=>{const i=He(null==t?void 0:t.node,r);i&&(s[`clip${e}`]=i)}),{rect:ze(t),shifts:i,ends:s}}function $e(t,e,{driven:i,duration:s,ease:a}){var r,o,l,c;const h=t.globals;h.layoutTween&&h.layoutTween.finish();const d=null==(r=t.dom.elGraphical)?void 0:r.node;if(!e||!e.rect||!d)return;const p=t.layout,u={x:null!=(o=p.translateX)?o:0,y:null!=(l=p.translateY)?l:0,w:p.gridWidth,h:p.gridHeight},g=e.rect,x=t=>[t.x,t.y,t.w,t.h].every(Number.isFinite)&&t.w>0&&t.h>0;if(!x(u)||!x(g))return;const f=t.dom.baseEl,m=[],b=[];let v=Math.max(Math.abs(g.x-u.x),Math.abs(g.y-u.y),Math.abs(g.w-u.w),Math.abs(g.h-u.h));const w=(t,e,i)=>{const s=e.map(e=>t.getAttribute(e)),a=s.map(t=>parseFloat(null!=t?t:""));a.every(Number.isFinite)&&(m.push((s,r)=>e.forEach((e,o)=>t.setAttribute(e,String(i(a[o],s,r,o))))),b.push(()=>e.forEach((e,i)=>t.setAttribute(e,s[i]))))},A=(t,e,i,s)=>{if(!i)return w(t,e,s);e.forEach((e,s)=>{const a=parseFloat(t.getAttribute(e)||"");Number.isFinite(a)&&(v=Math.max(v,Math.abs(a-i[s])))}),w(t,e,(t,e,s,a)=>i[a]+(t-i[a])*s)},S=e.ends||{},C=(t,e)=>{const i=t.getAttribute("transform");m.push(s=>{const[a,r]=e(s);t.setAttribute("transform",`translate(${a}, ${r}) ${i||""}`.trim())}),b.push(()=>{i?t.setAttribute("transform",i):t.removeAttribute("transform")})},k=(t,e)=>t*e.w/u.w,M=(t,e)=>t*e.h/u.h,T=t=>t.w-u.w,D=t=>t.h-u.h;m.push(t=>d.setAttribute("transform",`translate(${t.x}, ${t.y})`));const _=d.getAttribute("transform");b.push(()=>{_&&d.setAttribute("transform",_)}),[t.dom.elGridRect,t.dom.elGridRectBar,t.dom.elGridRectMarker].forEach((t,e)=>{const i=null==t?void 0:t.node;if(!i)return;const s=S[`clip${e}`];s?A(i,["x","y","width","height"],s,t=>t):(w(i,["width"],(t,e)=>t+T(e)),w(i,["height"],(t,e)=>t+D(e)))}),d.querySelectorAll(".apexcharts-grid line:not(.apexcharts-tick-ghost), .apexcharts-grid-borders line").forEach(t=>{const e=t.getAttribute("y1")===t.getAttribute("y2"),s=t.getAttribute("x1")===t.getAttribute("x2"),a=i.has(t),r=Ye(t);e?A(t,["x1","x2"],S[`h:${r}`],k):a||w(t,["x1","x2"],k),s?A(t,["y1","y2"],S[`v:${r}`],M):a||w(t,["y1","y2"],M)}),d.querySelectorAll(".apexcharts-grid rect").forEach(t=>{const e=t.classList.contains("apexcharts-grid-row"),i=t.classList.contains("apexcharts-grid-column");e?A(t,["x","width"],S.row,k):w(t,["x","width"],k),i?A(t,["y","height"],S.col,M):w(t,["y","height"],M)});const F="top"!==t.config.xaxis.position;if(d.querySelectorAll(".apexcharts-xaxis-tick").forEach(t=>{w(t,["x1","x2"],k),F&&w(t,["y1","y2"],(t,e)=>t+D(e))}),d.querySelectorAll(".apexcharts-xaxis").forEach(t=>{t.closest(".apexcharts-radar-series")||(F&&C(t,t=>[0,D(t)]),t.querySelectorAll(":scope > line").forEach(t=>A(t,["x1","x2"],S.xline,k)),t.querySelectorAll(":scope > .apexcharts-xaxis-title").forEach(t=>C(t,t=>[T(t)/2,0])))}),h.isBarHorizontal&&(null==(c=t.config.yaxis[0])?void 0:c.opposite)&&d.querySelectorAll(".apexcharts-xaxis-inversed-texts-g, .apexcharts-xaxis-title-inversed").forEach(t=>C(t,t=>[T(t),0])),f.querySelectorAll(".apexcharts-yaxis[rel]").forEach(t=>{((t,e)=>{const i=Re(t);if(!e||!i)return;const s=Math.max(Math.abs(e[0]-i[0]),Math.abs(e[1]-i[1]));if(s<.5)return;v=Math.max(v,s);const a=t.getAttribute("transform");m.push((s,a)=>{const r=e[0]+(i[0]-e[0])*a,o=e[1]+(i[1]-e[1])*a;t.setAttribute("transform",`translate(${r}, ${o})`)}),b.push(()=>{a?t.setAttribute("transform",a):t.removeAttribute("transform")})})(t,e.shifts[`g${t.getAttribute("rel")}`]);const i=!!t.closest(".apexcharts-graphical"),s=i?M:(t,e)=>e.y+(t-u.y)*e.h/u.h;t.querySelectorAll(":scope > line").forEach(t=>w(t,["y1","y2"],s)),t.querySelectorAll(":scope > .apexcharts-yaxis-title").forEach(t=>C(t,t=>[0,(i?0:t.y-u.y)+D(t)/2]))}),v<.5)return;const L=(t,e,i)=>t+(e-t)*i;let E=()=>{};const P={graphical:d,rect:n({},g),done:!1,finish(){P.done||(P.done=!0,E(),b.forEach(t=>t()),h.layoutTween===P&&(h.layoutTween=null))}},B=t=>{const e={x:L(g.x,u.x,t),y:L(g.y,u.y,t),w:L(g.w,u.w,t),h:L(g.h,u.h,t)};P.rect=e,m.forEach(i=>i(e,t))};h.layoutTween=P,E=Xe(t,()=>P.finish()),B(0);const N=performance.now(),R=e=>{var i;if(P.done)return;if(h.isDestroyed||(null==(i=t.dom.elGraphical)?void 0:i.node)!==d)return P.done=!0,E(),void(h.layoutTween===P&&(h.layoutTween=null));const r=Math.max(0,Math.min(1,(e-N)/s));r<1?(B(a(r)),y.requestAnimationFrame(R)):P.finish()};y.requestAnimationFrame(R)}function Ge(t){var e;const i=t.config.chart.animations;if(!i||!1===i.enabled)return!1;if(!i.dynamicAnimation||!1===i.dynamicAnimation.enabled)return!1;const s=null!=(e=i.largeDatasetThreshold)?e:0;return!(s>0&&t.globals.dataPoints>s)&&!!(d.isBrowser()&&t.globals.dataChanged&&t.globals.shouldAnimate)}function Ue(t){const e=new Map;return t.map(t=>{const i=e.get(t)||0;return e.set(t,i+1),0===i?t:`${t}#${i}`})}function je(t,e,i=!1,s=!1){var a,r;if(!Ge(t))return null;const o=t.globals.prevStreamFrame;if(!o)return null;const n=null==(a=o.seriesY)?void 0:a[e],l=null==(r=t.seriesData.series)?void 0:r[e];if(!Array.isArray(n)||!Array.isArray(l))return null;if(!n.length||!l.length)return null;const c=Ue(n.map((t,i)=>function(t,e,i){var s,a;if(t.isXNumeric){const a=null==(s=t.seriesX)?void 0:s[e];if(a&&a.length&&null!=a[i])return"x:"+a[i]}const r=null==(a=t.labels)?void 0:a[i];return null!=r&&""!==String(r)?"c:"+(Array.isArray(r)?r.join(" "):String(r)):"j:"+i}(o,e,i))),h=Ue(l.map((i,s)=>function(t,e,i){var s,a,r,o;if(null==(s=t.axisFlags)?void 0:s.isXNumeric){const s=null==(r=null==(a=t.seriesData)?void 0:a.seriesX)?void 0:r[e];if(s&&s.length&&null!=s[i])return"x:"+s[i]}const n=null==(o=t.globals.labels)?void 0:o[i];return null!=n&&""!==String(n)?"c:"+(Array.isArray(n)?n.join(" "):String(n)):"j:"+i}(t,e,s))),d=function(t,e){const i=new Map;t.forEach((t,e)=>{i.has(t)||i.set(t,e)});const s=new Array(e.length),a=new Set;let r=-1,o=!0,n=t.length===e.length;e.forEach((t,e)=>{const l=i.has(t)&&!a.has(i.get(t))?i.get(t):-1;s[e]=l,-1!==l&&(a.add(l),l<r&&(o=!1),r=l),l!==e&&(n=!1)});const l=[];for(let e=0;e<t.length;e++)a.has(e)||l.push(e);return{toOld:s,exits:l,ordered:o,changed:!n}}(c,h);return(d.ordered||s)&&(d.changed||i)?{join:d,oldKeys:c,newKeys:h}:null}function Ve(t){var e,i;const s=t.config.chart.animations;return Ht(null!=(i=null==(e=s.dynamicAnimation)?void 0:e.easing)?i:s.easing)}function qe(t,e,i,s,a){const r=performance.now(),o=n=>{if(t.globals.isDestroyed)return;const l=Math.max(0,Math.min(1,(n-r)/e));s(i(l),l),l<1?y.requestAnimationFrame(o):a&&a()};y.requestAnimationFrame(o)}function Ze(t){const e={};return t.map(t=>{const i=`${(t.closest(".apexcharts-yaxis")||t).getAttribute("rel")}|${t.textContent}`;return`${i}#${e[i]=(e[i]||0)+1}`})}function Ke(t,e,i){const s=[...t.querySelectorAll(e)],a=Ze(s);return s.map((t,e)=>{var s,r,o;return{text:a[e],display:null!=(o=null!=(r=null==(s=t.querySelector("tspan"))?void 0:s.textContent)?r:t.textContent)?o:"",pos:parseFloat(t.getAttribute(i)||""),transform:t.getAttribute("transform")}})}function Je(t,e,i){return[...t.querySelectorAll(e)].map(t=>parseFloat(t.getAttribute(i)||""))}const Qe=":not(.apexcharts-tick-ghost)",ti=`.apexcharts-xaxis-texts-g text:not(.apexcharts-xaxis-group-label)${Qe}`,ei=`.apexcharts-yaxis-texts-g text${Qe}`,ii=`.apexcharts-gridlines-vertical line${Qe}`,si=`.apexcharts-gridlines-horizontal line${Qe}`;function ai(t){var e,i;const s=t.globals;if(!(null==(e=t.axisFlags)?void 0:e.isXNumeric)||s.isBarHorizontal)return null;if(null==(i=t.config.xaxis)?void 0:i.reversed)return null;const a=s.minX,r=s.maxX,o=t.layout.gridWidth;return isFinite(a)&&isFinite(r)&&r>a&&o>0?{min:a,max:r,width:o}:null}function ri(t,e){var i;const s=t.globals;if(s.isBarHorizontal)return null;if(!Array.isArray(t.config.yaxis)||1!==t.config.yaxis.length)return null;if(null==(i=t.config.yaxis[0])?void 0:i.logarithmic)return null;const a=s.minY,r=s.maxY;if(!(isFinite(a)&&isFinite(r)&&r>a))return null;const o=e.map(t=>t.pos).filter(t=>isFinite(t));return o.length<2?null:{min:a,max:r,pLo:Math.max(...o),pHi:Math.min(...o)}}function oi(t,e){if(!t||!e)return null;const i=t.pHi-t.pLo,s=e.pHi-e.pLo,a=t.max-t.min,r=e.max-e.min;if(!(i&&s&&a>0&&r>0))return null;return{toNew:o=>e.pLo+((e=>t.min+(e-t.pLo)/i*a)(o)-e.min)/r*s,toOld:o=>t.pLo+((t=>e.min+(t-e.pLo)/s*r)(o)-t.min)/a*i}}function ni(t,e,i,s,a){t.globals.chromeTweens||(t.globals.chromeTweens=new Set);const r=t.globals.chromeTweens;let o=!1;const n=()=>{o||(o=!0,r.delete(n),a())};r.add(n),qe(t,e,i,t=>{o||s(t)},n)}function li(t){const e=t.globals;e.layoutTween&&e.layoutTween.finish(),function(t){const e=t.globals.chromeTweens;e&&e.size&&[...e].forEach(t=>t())}(t)}function ci(t,e,i,s){const a=e.style;a.opacity="0",ni(t,i,s,t=>{a.opacity=String(t)},()=>{a.opacity=""})}function hi(t,e,i,s,a,r,o){i.forEach(t=>e.setAttribute(t,String(s))),ni(t,r,o,t=>{const r=String(s+(a-s)*t);i.forEach(t=>e.setAttribute(t,r))},()=>{i.forEach(t=>e.setAttribute(t,String(a)))})}function di(t,{template:e,display:i,attrs:s,from:a,to:r,duration:o,ease:n}){const l=e.parentNode;if(!l)return;const c=e.cloneNode(!0);if(c.classList.add("apexcharts-tick-ghost"),c.setAttribute("pointer-events","none"),c.removeAttribute("id"),c.removeAttribute("transform"),void 0!==i){const t=c.querySelector("tspan");t?t.textContent=i:c.textContent=i;const e=c.querySelector("title");e&&(e.textContent=i)}s.forEach(t=>c.setAttribute(t,String(a)));const h=c.style;h.opacity="1",l.appendChild(c),ni(t,o,n,t=>{const e=String(a+(r-a)*t);s.forEach(t=>c.setAttribute(t,e)),h.opacity=String(1-t)},()=>{c.parentNode&&c.parentNode.removeChild(c)})}function pi(t,{newLabels:e,oldLabels:i,posAttr:s,newLines:a,oldLines:r,lineAttrs:o,duration:c,ease:h,project:d,driven:p}){const u=new Map;i.forEach((t,e)=>u.set(t.text,l(n({},t),{i:e})));const g=Ze(e),x=new Set,f=a.length===e.length,m=r.length===i.length,b=i.map(t=>t.pos).concat(e.map(t=>parseFloat(t.getAttribute(s)||""))).filter(t=>isFinite(t)),y=Math.min(...b),v=Math.max(...b),w=Math.max(40,.25*(v-y)),A=t=>Math.max(y-w,Math.min(v+w,t)),S=(e,i)=>{if(!e)return;const s=parseFloat(e.getAttribute(o[0])||""),a=r[i.i];isFinite(s)&&isFinite(a)&&(p.add(e),hi(t,e,o,a,s,c,h))};if(e.forEach((e,i)=>{const r=parseFloat(e.getAttribute(s)||""),n=u.get(g[i]),l=f?a[i]:null;n&&x.add(n.i);const m=e.getAttribute("transform");if(n&&isFinite(n.pos)){if(isFinite(r)&&!(Math.abs(n.pos-r)<.5)){if(m||n.transform){const i=n.pos-r;if(isFinite(i)){p.add(e);const a=m||"";ni(t,c,h,t=>{const r=i*(1-t),o="x"===s?`translate(${r} 0)`:`translate(0 ${r})`;e.setAttribute("transform",`${o} ${a}`.trim())},()=>{a?e.setAttribute("transform",a):e.removeAttribute("transform")})}return void S(l,n)}p.add(e),hi(t,e,[s],n.pos,r,c,h),S(l,n)}}else if(!n){if(d&&isFinite(r)&&!m){const i=isFinite(d.toOld(r))?A(d.toOld(r)):NaN;isFinite(i)&&Math.abs(i-r)>.5&&(p.add(e),hi(t,e,[s],i,r,c,h),l&&(p.add(l),hi(t,l,o,i,r,c,h)))}ci(t,e,c,h),l&&ci(t,l,c,h)}}),!d||!e.length)return;let C=0;i.forEach((i,n)=>{if(x.has(n))return;if(!isFinite(i.pos)||i.transform)return;if(C>=20)return;const l=d.toNew(i.pos);!isFinite(l)||Math.abs(l-i.pos)<.5||(C++,di(t,{template:e[0],display:i.display,attrs:[s],from:i.pos,to:A(l),duration:c,ease:h}),m&&a.length&&isFinite(r[n])&&di(t,{template:a[0],attrs:o,from:r[n],to:A(d.toNew(r[n])),duration:c,ease:h}))})}function ui(t,{layout:e=!0}={}){const i=t.globals,s=i.prevChromeFrame;if(i.prevChromeFrame=null,s&&li(t),!(null==s?void 0:s.pending)||!i.axisCharts||!d.isBrowser())return;if(!Ge(t))return;if(!(t.seriesData.series||[]).some((e,i)=>null!==je(t,i,!0,!0)))return;const a=t.dom.baseEl;if(!A.elementExists(a))return;const r=Math.max(1,t.config.chart.animations.dynamicAnimation.speed||1),o=Ve(t),n=new Set;try{const i=[...a.querySelectorAll(ei)],l=function(t,e){if(!t||!e)return null;const i=t.max-t.min,s=e.max-e.min;return i>0&&s>0&&t.width>0&&e.width>0?{toNew:a=>(t.min+a/t.width*i-e.min)/s*e.width,toOld:a=>(e.min+a/e.width*s-t.min)/i*t.width}:null}(s.xScale,ai(t)),c=oi(s.yAnchors,ri(t,i.map(t=>({pos:parseFloat(t.getAttribute("y")||"")}))));pi(t,{newLabels:[...a.querySelectorAll(ti)],oldLabels:s.xLabels,posAttr:"x",newLines:[...a.querySelectorAll(ii)],oldLines:s.vGrid,lineAttrs:["x1","x2"],duration:r,ease:o,project:l,driven:n}),pi(t,{newLabels:i,oldLabels:s.yLabels,posAttr:"y",newLines:[...a.querySelectorAll(si)],oldLines:s.hGrid,lineAttrs:["y1","y2"],duration:r,ease:o,project:c,driven:n}),e&&$e(t,s.layout,{driven:n,duration:r,ease:o})}catch(t){}}function gi(t,e){const i=t.globals.circleTween;return i&&!i.done&&i.node===e.node?n({},i.circle):{cx:e.cx,cy:e.cy,r:e.r}}function xi(t,e){var i,s;const a=null==(i=t.getCTM)?void 0:i.call(t),r=null==(s=e.getCTM)?void 0:s.call(e);if(!a||!r)return null;const o=r.inverse().multiply(a);return new DOMMatrix([o.a,o.b,o.c,o.d,o.e,o.f])}function fi(t,e){var i;try{const s=xi(t,e),a=t.getBBox();if(!s||!(a.width>0||a.height>0))return null;const r=new DOMPoint(a.x+a.width/2,a.y+a.height/2).matrixTransform(s),o=Math.hypot(s.a,s.b),n=parseFloat(null!=(i=t.getAttribute("opacity"))?i:""),l=Number.isFinite(n)?n:1;return[r.x,r.y,o].every(Number.isFinite)&&o>0?{x:r.x,y:r.y,k:o,o:l}:null}catch(t){return null}}function mi(t,e,i){const s=new Map,a={};return t.querySelectorAll("text").forEach(r=>{var o,n;const l=r.closest("[data\\:slice], [rel]"),c=l&&t.contains(l)?null!=(o=l.getAttribute("data:slice"))?o:l.getAttribute("rel"):"",h=`${r.getAttribute("class")||""}|${c}`;a[h]=(null!=(n=a[h])?n:-1)+1;const d=`${h}#${a[h]}`,p=fi(r,e);p&&s.set(d,p),i&&i(r,d)}),s}function bi(t,e){const i=e.ownerSVGElement;if(!i)return null;const s=i.getBoundingClientRect(),a=t.getBoundingClientRect();return a.width>0&&a.height>0&&s.width>0&&s.height>0?{l:a.left-s.left,t:a.top-s.top,r:a.right-s.left,b:a.bottom-s.top,W:s.width,H:s.height}:null}function yi(t,{layout:e=!0}={}){var i;const s=t.globals,a=s.prevCircleFrame;s.prevCircleFrame=null;const r=s.circleGeometry;if(s.circleTween&&s.circleTween.node!==(null==r?void 0:r.node)&&s.circleTween.finish(),!(null==a?void 0:a.pending)||!e||!d.isBrowser())return;if(!Ge(t))return;const o=null==(i=t.dom.elGraphical)?void 0:i.node;if(!r||!o||!o.contains(r.node))return;if(!function(t,e){const i=t.drawn,s=e.ownerSVGElement;if(!i||!s)return!0;const a=s.getBoundingClientRect();if(!(a.width>0&&a.height>0))return!0;const r=2,o=(t,e)=>e<=Math.max(0,t)+r;return o(-i.l,-i.l)&&o(-i.t,-i.t)&&o(i.r-i.W,i.r-a.width)&&o(i.b-i.H,i.b-a.height)}(a,o))return;const l=Math.max(1,t.config.chart.animations.dynamicAnimation.speed||1),c=Ve(t);try{!s.axisCharts&&a.layout&&$e(t,a.layout,{driven:new Set,duration:l,ease:c}),function(t,{from:e,texts:i,to:s,graphical:a,duration:r,ease:o}){const l=t.globals,c=s.node,h={cx:s.cx,cy:s.cy,r:s.r},d=t=>[t.cx,t.cy,t.r].every(Number.isFinite)&&t.r>0;if(!d(e)||!d(h))return;if(Math.max(Math.abs(e.cx-h.cx),Math.abs(e.cy-h.cy),Math.abs(e.r-h.r))<.5)return;const p=(t,e,i)=>t+(e-t)*i,u=c.getAttribute("transform"),g=[],x=[],f=(t,e)=>{e?t.setAttribute("transform",e):t.removeAttribute("transform")},m=e.r/h.r;mi(c,a,(t,s)=>{const r=t.parentNode,o=r?xi(r,a):null,n=fi(t,a);if(!o||!n)return;const l=i.get(s),c=null!=l?l:{x:e.cx+m*(n.x-h.cx),y:e.cy+m*(n.y-h.cy),k:n.k},d=t.getAttribute("transform"),u=t.getAttribute("opacity"),b=o.inverse(),y=(t.getAttribute("transform-origin")||"").split(/[\s,]+/).map(t=>parseFloat(t)),[v,w]=2===y.length&&y.every(Number.isFinite)?y:[0,0],A=l?l.o:0;x.push((e,i,s)=>{const a={x:p(c.x,n.x,s),y:p(c.y,n.y,s)},r=p(c.k/n.k,1,s),l=new DOMMatrix([r/i,0,0,r/i,h.cx+(a.x-e.cx-r*n.x)/i,h.cy+(a.y-e.cy-r*n.y)/i]);let u=b.multiply(l).multiply(o);(v||w)&&(u=(new DOMMatrix).translate(-v,-w).multiply(u).translate(v,w)),t.setAttribute("transform",`matrix(${u.a}, ${u.b}, ${u.c}, ${u.d}, ${u.e}, ${u.f}) ${d||""}`.trim()),A<.999&&t.setAttribute("opacity",String(p(A,1,s)))}),g.push(()=>{f(t,d),A<.999&&(null===u?t.removeAttribute("opacity"):t.setAttribute("opacity",u))})}),c.querySelectorAll(".apexcharts-slices path[transform]").forEach(t=>{const e=t.getAttribute("transform")||"",i=/^translate\(\s*([-+.\deE]+)[\s,]+([-+.\deE]+)\s*\)$/.exec(e.trim());if(!i)return;const s=parseFloat(i[1]),a=parseFloat(i[2]);let r=e,o=!0;x.push((e,i)=>{o&&(t.getAttribute("transform")===r?(r=`translate(${s/i} ${a/i})`,t.setAttribute("transform",r)):o=!1)}),g.push(()=>{o&&t.getAttribute("transform")===r&&t.setAttribute("transform",e)})});let b=()=>{};const v={node:c,circle:n({},e),target:n({},h),done:!1,finish(){v.done||(v.done=!0,b(),f(c,u),g.forEach(t=>t()),l.circleTween===v&&(l.circleTween=null))}},w=t=>{const i={cx:p(e.cx,h.cx,t),cy:p(e.cy,h.cy,t),r:p(e.r,h.r,t)};v.circle=i;const s=i.r/h.r;c.setAttribute("transform",`translate(${i.cx}, ${i.cy}) scale(${s}) translate(${-h.cx}, ${-h.cy}) ${u||""}`.trim()),x.forEach(e=>e(i,s,t))};l.circleTween=v,b=Xe(t,()=>v.finish()),w(0);const A=performance.now(),S=e=>{var i;if(v.done)return;if(l.isDestroyed||(null==(i=t.dom.elGraphical)?void 0:i.node)!==a||!a.contains(c))return v.done=!0,b(),void(l.circleTween===v&&(l.circleTween=null));const s=Math.max(0,Math.min(1,(e-A)/r));s<1?(w(o(s)),y.requestAnimationFrame(S)):v.finish()};y.requestAnimationFrame(S)}(t,{from:a.circle,texts:a.texts,to:r,graphical:o,duration:l,ease:c})}catch(t){s.circleTween&&!s.circleTween.done&&s.circleTween.finish()}}const vi=".apexcharts-data-labels[data\\:dlKey]",wi=".apexcharts-datalabel",Ai=".apexcharts-datalabel-total[data\\:dlTotalKey]";function Si(t){var e,i;const s=t.config.dataLabels;return!(!(null==(e=null==s?void 0:s.animate)?void 0:e.enabled)&&!(null==(i=null==s?void 0:s.countUp)?void 0:i.enabled))}function Ci(t){if(!isFinite(t))return 0;const e=String(Math.abs(t)),i=e.indexOf("e");if(-1!==i){const t=e.slice(0,i),s=parseInt(e.slice(i+1),10),a=t.indexOf("."),r=-1===a?0:t.length-a-1;return Math.min(6,Math.max(0,r-s))}const s=e.indexOf(".");return-1===s?0:Math.min(6,e.length-s-1)}function ki(t,e){const i=t.querySelectorAll("tspan");[].concat(e).forEach((e,s)=>{const a=i.length?i[s]:t;a&&(a.textContent=e)})}const Mi=t=>"number"==typeof t?t:NaN;function Ti(t,e){let i=-1,s=1/0;for(let a=0;a<t.length;a++){const r=t[a];if(null==r)continue;const o=Math.abs(r-e);o<s&&(s=o,i=a)}return i}function Di(t){var e;const i=t.globals,s=i.exitLabels,a=i.riseLabels;if(i.exitLabels=null,i.riseLabels=null,!d.isBrowser())return;if(a&&function(t,e){const i=t.globals,s=t.dom.baseEl;if(!A.elementExists(s))return;const a=Math.max(1,t.config.chart.animations.dynamicAnimation.speed||1),r=Ve(t);try{e.forEach(({oldX:e,oldY:o},n)=>{var l,c;const h=(null==(l=i.seriesXvalues)?void 0:l[n])||[],d=(null==(c=i.seriesYvalues)?void 0:c[n])||[];s.querySelectorAll(`.apexcharts-datalabels[data\\:realIndex="${n}"] .apexcharts-data-labels:not([data\\:dlKey]) ${wi}`).forEach(i=>{const s=Ti(h,parseFloat(i.getAttribute("cx")||"")),n=Mi(e[s])-Mi(h[s]),l=Mi(o[s])-Mi(d[s]);if(s<0||!isFinite(n)||!isFinite(l))return;const c=i.previousElementSibling,p=c&&"rect"===c.tagName.toLowerCase()?[c,i]:[i],u=p.map(t=>t.getAttribute("transform")||""),g=t=>p.forEach((e,i)=>{const s=1-t;e.setAttribute("transform",`translate(${n*s} ${l*s}) ${u[i]}`.trim()),e.setAttribute("opacity",String(t))});g(0),qe(t,a,r,g,()=>p.forEach((t,e)=>{u[e]?t.setAttribute("transform",u[e]):t.removeAttribute("transform"),t.removeAttribute("opacity")}))})})}catch(t){}}(t,a),!s)return;const r=null==(e=t.dom.elGraphical)?void 0:e.node;if(!r)return;const o=t.dom.baseEl,n=document.createElementNS("http://www.w3.org/2000/svg","g");n.setAttribute("class","apexcharts-label-exit"),n.setAttribute("pointer-events","none"),r.appendChild(n);const l=Math.max(1,t.config.chart.animations.dynamicAnimation.speed||1),c=Ve(t),h=t=>1-Math.pow(1-t,3),p=!!t.globals.isBarHorizontal;let u=0;const g=()=>{--u<=0&&n.remove()};try{s.forEach(({realIndex:e,node:s,key:a,oldX:r,oldY:d})=>{var x,f,m;if(o.querySelector(`.apexcharts-datalabels[data\\:realIndex="${e}"] .apexcharts-data-labels`))return;n.appendChild(s);const b=[...s.querySelectorAll(wi)].map(t=>{const e=t.previousElementSibling;return e&&"rect"===e.tagName.toLowerCase()?[e,t]:[t]}),y=[];let v=c;const w=a?o.querySelector(`.apexcharts-bar-ghost[data\\:ghostKey="${a}"]`):null,A=parseFloat(null!=(x=null==w?void 0:w.getAttribute("data:ghostEdge"))?x:"");if(w&&isFinite(A))v=h,b.forEach(t=>{const e=t[t.length-1],i=parseFloat(e.getAttribute(p?"cx":"cy")||"");if(!isFinite(i))return;const s=A-i;y.push({els:t,dx:p?s:0,dy:p?0:s})});else if(!a){const t=(null==(f=i.seriesXvalues)?void 0:f[e])||[],s=(null==(m=i.seriesYvalues)?void 0:m[e])||[];b.forEach(e=>{const i=e[e.length-1],a=Ti(r,parseFloat(i.getAttribute("cx")||"")),o=Mi(t[a])-Mi(r[a]),n=Mi(s[a])-Mi(d[a]);a<0||!isFinite(o)||!isFinite(n)||y.push({els:e,dx:o,dy:n})})}const S=y.flatMap(({els:t})=>t.map(t=>({el:t,base:t.getAttribute("transform")||""})));u++,qe(t,l,v,t=>{s.setAttribute("opacity",String(1-t));let e=0;y.forEach(({els:i,dx:s,dy:a})=>{i.forEach(i=>{const{base:r}=S[e++];i.setAttribute("transform",`translate(${s*t} ${a*t}) ${r}`.trim())})})},g)})}catch(t){}u||n.remove()}function _i(t,{el:e,oldCx:i,oldCy:s,duration:a,ease:r,delay:o=0}){const n=e.hasAttribute("cx")?e:e.querySelector(wi);if(!n)return;const l=i-parseFloat(n.getAttribute("cx")||""),c=s-parseFloat(n.getAttribute("cy")||"");if(!isFinite(l)||!isFinite(c))return;if(Math.abs(l)+Math.abs(c)<=.5)return;const h=e.getAttribute("transform")||"",d=()=>qe(t,a,r,t=>{const i=1-t;e.setAttribute("transform",`translate(${l*i} ${c*i}) ${h}`.trim())},()=>{h?e.setAttribute("transform",h):e.removeAttribute("transform")});e.setAttribute("transform",`translate(${l} ${c}) ${h}`.trim()),o>0?setTimeout(()=>{t.globals.isDestroyed||d()},o):d()}function Fi(t,{el:e,from:i,to:s,formatter:a,fmtOpts:r,duration:o,ease:n,delay:l=0}){if(!isFinite(i)||!isFinite(s))return;if(Math.abs(s-i)<=1e-9)return;const c=Math.max(Ci(i),Ci(s)),h=t=>{const e=Number(t.toFixed(c));let i=e;if("function"==typeof a)try{i=a(e,r)}catch(t){i=e}return i},d=e.cloneNode(!0),p=()=>qe(t,o,n,t=>{ki(e,h(i+(s-i)*t))},()=>{e.replaceChildren(...Array.from(d.childNodes))});ki(e,h(i)),l>0?setTimeout(()=>{t.globals.isDestroyed||p()},l):p()}function Li(t){var e,i;const s=t.globals,a=s.prevDataLabels;if(s.prevDataLabels=null,!a||!s.axisCharts||!d.isBrowser())return;if(!Si(t))return;if(!Ge(t))return;const r=t.dom.baseEl;if(!A.elementExists(r))return;const o=t.config.dataLabels,c=!!(null==(e=o.animate)?void 0:e.enabled),h=!!(null==(i=o.countUp)?void 0:i.enabled),p=o.formatter,u=Math.max(1,t.config.chart.animations.dynamicAnimation.speed||1),g=Ve(t);try{r.querySelectorAll(vi).forEach(e=>{const i=e.getAttribute("data:dlKey");if(!i)return;const s=e.querySelector(wi);if(!s)return;const r=a.get(i),o=parseInt(e.getAttribute("data:dlDelay")||"0",10)||0;if(c&&(r&&isFinite(r.cx)&&isFinite(r.cy)?_i(t,{el:e,oldCx:r.cx,oldCy:r.cy,duration:u,ease:g,delay:o}):r||function(t,e,i,s){const a=e.style;a.opacity="0",qe(t,i,s,t=>{a.opacity=String(t)},()=>{a.opacity=""})}(t,e,u,g)),h&&r){const a=parseInt(i,10),c=parseInt(e.getAttribute("data:dlJ")||"",10);Fi(t,{el:s,from:r.val,to:parseFloat(e.getAttribute("data:dlVal")||""),formatter:p,fmtOpts:l(n({},t),{seriesIndex:a,dataPointIndex:isFinite(c)?c:0,w:t}),duration:u,ease:g,delay:o})}});const e=t.config.plotOptions.bar.dataLabels.total.formatter||p;r.querySelectorAll(Ai).forEach(i=>{const s=i.getAttribute("data:dlTotalKey");if(!s)return;const r=a.get(`total::${s}`);if(!r)return;const o=parseInt(i.getAttribute("data:dlDelay")||"0",10)||0;if(c&&isFinite(r.cx)&&isFinite(r.cy)&&_i(t,{el:i,oldCx:r.cx,oldCy:r.cy,duration:u,ease:g,delay:o}),h){const a=parseInt(i.getAttribute("data:dlTotalSeries")||s,10);Fi(t,{el:i,from:r.val,to:parseFloat(i.getAttribute("data:dlTotalVal")||""),formatter:e,fmtOpts:l(n({},t),{seriesIndex:a,dataPointIndex:0,w:t}),duration:u,ease:g,delay:o})}})}catch(t){}}const Ei=class t{constructor(t,{toggleDataSeries:e,revertDefaultAxisMinMax:i,updateSeries:s}={}){this.w=t,this._toggleDataSeries=e||null,this._revertDefaultAxisMinMax=i||null,this._updateSeries=s||null,this.legendInactiveClass="legend-mouseover-inactive"}clearSeriesCache(){const t=this.w;t.globals.cachedSelectors&&delete t.globals.cachedSelectors.highlightSeriesEls}getSeriesByName(t){return this.w.dom.baseEl.querySelector(`.apexcharts-inner .apexcharts-series[seriesName='${A.escapeString(t)}']`)}isSeriesHidden(t){var e;const i=this.getSeriesByName(t),s=parseInt(null!=(e=i.getAttribute("data:realIndex"))?e:"0",10),a=this.w.globals;return{isHidden:i.classList.contains("apexcharts-series-collapsed")||a.collapsedSeriesIndices.includes(s)||a.ancillaryCollapsedSeriesIndices.includes(s),realIndex:s}}static addCollapsedClassToSeries(t,e,i){let s=!1;function a(t){for(let a=0;a<t.length;a++)t[a].index===i&&(e.node.classList.add("apexcharts-series-collapsed"),s=!0)}if(a(t.globals.collapsedSeries),a(t.globals.ancillaryCollapsedSeries),!s)return;if(-1===(t.globals.collapsingSeriesIndices||[]).indexOf(i))return;if(e.node.classList.add("apexcharts-series-collapsing"),!d.isBrowser())return;const r=t.config.chart.animations,o=(r.dynamicAnimation.speed||0)+(r.speed||0)+100;setTimeout(()=>{t.globals.isDestroyed||e.node.classList.remove("apexcharts-series-collapsing")},o)}static treemapLabelLook(t){const e=t.querySelector("text"),i=((null==e?void 0:e.textContent)||"").trim();if(!e||!i)return"";const s=/rotate\(/.test(`${t.getAttribute("transform")||""} ${e.getAttribute("transform")||""}`);return`${i}|${e.getAttribute("font-size")}|${s}`}static treemapHeaderLook(t){return t?`${t.textContent}|${t.getAttribute("font-size")}`:""}static settleCollapsedShapes(t,e){var i;const s=(Array.isArray(e)?e:[e]).map(t=>t&&t.node?t.node:t).filter(t=>t&&"function"==typeof t.querySelectorAll),a=[],r=[];if(s.forEach(t=>{t.querySelectorAll(".apexcharts-series-collapsed").forEach(t=>a.push(t)),t.querySelectorAll(".apexcharts-leaving").forEach(t=>r.push(t))}),!a.length&&!r.length)return;const o=e=>{t.globals.isDestroyed||(e.classList.remove("apexcharts-series-collapsing"),e.querySelectorAll(".apexcharts-marker-exit, .apexcharts-bar-ghost").forEach(t=>t.remove()),e.querySelectorAll("path").forEach(t=>{t.setAttribute("d","")}))},n=()=>{t.globals.isDestroyed||r.forEach(t=>t.remove())},l=t.config.chart.animations;if(!(d.isBrowser()&&l.enabled&&!1!==t.globals.shouldAnimate&&(!t.globals.dataChanged||l.dynamicAnimation.enabled)))return n(),void a.forEach(o);const c=null==(i=t.globals.morphBatch)?void 0:i.series,h=[];a.forEach(t=>{const e=t.getAttribute("data:realIndex"),i=null===e?null:null==c?void 0:c.get(Number(e));if(!i||i.pending<=0)return void h.push(t);const s=i.onDone;i.onDone=()=>{null==s||s(),o(t)}});const p=(l.dynamicAnimation.speed||0)+(l.speed||0)+100;setTimeout(()=>{n(),h.forEach(o)},p)}settleCollapsedShapes(e){t.settleCollapsedShapes(this.w,e)}toggleSeries(t){var e;const i=this.isSeriesHidden(t);return null==(e=this._toggleDataSeries)||e.call(this,i.realIndex,i.isHidden),i.isHidden}showSeries(t){var e;const i=this.isSeriesHidden(t);i.isHidden&&(null==(e=this._toggleDataSeries)||e.call(this,i.realIndex,!0))}hideSeries(t){var e;const i=this.isSeriesHidden(t);i.isHidden||null==(e=this._toggleDataSeries)||e.call(this,i.realIndex,!1)}prepareDataUpdate(){const t=this.w;this.clearSeriesCache(),t.globals.previousPaths=[],t.globals.axisCharts||(t.globals.collapsedSeries=[],t.globals.ancillaryCollapsedSeries=[],t.globals.collapsedSeriesIndices=[],t.globals.ancillaryCollapsedSeriesIndices=[])}resetSeries(t=!0,e=!0,i=!0){var s,a;const r=this.w;this.clearSeriesCache();let o=A.clone(r.globals.initialSeries);Array.isArray(o)||(o=A.clone(r.config.series)||[]),r.globals.previousPaths=[],i?(r.globals.collapsedSeries=[],r.globals.ancillaryCollapsedSeries=[],r.globals.collapsedSeriesIndices=[],r.globals.ancillaryCollapsedSeriesIndices=[]):o=this.emptyCollapsedSeries(o),r.config.series=o,t&&(e&&(r.interact.zoomed=!1,null==(s=this._revertDefaultAxisMinMax)||s.call(this)),null==(a=this._updateSeries)||a.call(this,o,r.config.chart.animations.dynamicAnimation.enabled))}emptyCollapsedSeries(t){const e=this.w;if(!Array.isArray(t))return t;for(let i=0;i<t.length;i++)e.globals.collapsedSeriesIndices.indexOf(i)>-1&&(t[i]&&"object"==typeof t[i]?t[i].data=[]:t[i]=0);return t}_deriveSeriesNames(t){const e=this.w,i=t||e.config.series||[],s=e.config.labels||[];return i.map((t,e)=>t&&"object"==typeof t&&null!=t.name?String(t.name):null!=s[e]?String(s[e]):`series-${e+1}`)}reconcileCollapsedByName(t){const e=this.w,i=e.globals,s=t||e.config.series,a=this._deriveSeriesNames(s),r=t=>{const e=[],r=[];return t.forEach(t=>{const o=t&&null!=t.name&&a[t.index]!==t.name?a.indexOf(t.name):t.index;if(null==o||o<0||o>=s.length)return;const n=s[o];t.index=o,i.axisCharts?n&&Array.isArray(n.data)&&n.data.length&&(t.data=n.data.slice()):t.data=n,e.push(t),r.push(o)}),{records:e,indices:r}},o=r(i.collapsedSeries);i.collapsedSeries=o.records,i.collapsedSeriesIndices=o.indices;const n=r(i.ancillaryCollapsedSeries);i.ancillaryCollapsedSeries=n.records,i.ancillaryCollapsedSeriesIndices=n.indices,i.allSeriesCollapsed=i.collapsedSeries.length+i.ancillaryCollapsedSeries.length===s.length,this.emptyCollapsedSeries(s)}canvasRestyle(t){const e=this.w.globals.activeRenderer;e&&"canvas"===e.kind&&"function"==typeof e.restyle&&e.restyle(t)}highlightSeries(t){var e;const i=this.w,s=this.getSeriesByName(t),a=parseInt(null!=(e=null==s?void 0:s.getAttribute("data:realIndex"))?e:"",10),r="highlightSeriesEls";let o=i.globals.cachedSelectors[r];o||(o=i.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis"),i.globals.cachedSelectors[r]=o);let n=null,l=null,c=null;if(i.globals.axisCharts||"radialBar"===i.config.chart.type)if(i.globals.axisCharts){n=i.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${a}']`),l=i.dom.baseEl.querySelector(`.apexcharts-datalabels[data\\:realIndex='${a}']`);const t=i.globals.seriesYAxisReverseMap[a];c=i.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${t}']`)}else n=i.dom.baseEl.querySelector(`.apexcharts-series[rel='${a+1}']`);else n=i.dom.baseEl.querySelector(`.apexcharts-series[rel='${a+1}'] path`);for(let t=0;t<o.length;t++){o[t].classList.add(this.legendInactiveClass)}if(n){if(!i.globals.axisCharts){const t=n.parentNode;null==t||t.classList.remove(this.legendInactiveClass)}n.classList.remove(this.legendInactiveClass),null!==l&&l.classList.remove(this.legendInactiveClass),null!==c&&c.classList.remove(this.legendInactiveClass)}else for(let t=0;t<o.length;t++){o[t].classList.remove(this.legendInactiveClass)}this.canvasRestyle(n&&!Number.isNaN(a)?{active:a,opacity:.2}:null)}toggleSeriesOnHover(t,e){const i=this.w;e||(e=t.target);const s=i.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis");if("mousemove"===t.type){const t=parseInt(e.getAttribute("rel"),10)-1;this.highlightSeries(i.seriesData.seriesNames[t])}else if("mouseout"===t.type){for(let t=0;t<s.length;t++)s[t].classList.remove(this.legendInactiveClass);this.canvasRestyle(null)}}highlightRangeInSeries(t,e){const i=this.w,s=i.dom.baseEl.getElementsByClassName("apexcharts-heatmap-rect"),a=t=>{for(let e=0;e<s.length;e++){const i=s[e].classList;"function"==typeof i[t]&&i[t](this.legendInactiveClass)}};if("reset"===e)return void a("remove");const r=i.config.plotOptions.heatmap.colorScale.ranges,o=r&&r[t];if(o){a("add");for(let t=0;t<s.length;t++){const e=Number(s[t].getAttribute("val"));e>=o.from&&e<=o.to&&s[t].classList.remove(this.legendInactiveClass)}}}getActiveConfigSeriesIndex(t="asc",e=[]){const i=this.w;let s=0;if(i.config.series.length>1){const a=i.config.series.map((t,s)=>t.data&&t.data.length>0&&-1===i.globals.collapsedSeriesIndices.indexOf(s)&&(!i.globals.comboCharts||0===e.length||e.length&&e.indexOf(i.config.series[s].type)>-1)?s:-1);for(let e="asc"===t?0:a.length-1;"asc"===t?e<a.length:e>=0;"asc"===t?e++:e--)if(-1!==a[e]){s=a[e];break}}return s}getActiveConfigSeriesIndexByGroup(t=[]){const e=this.w;return(e.labelData.seriesGroups||[]).map((i,s)=>{let a=-1;return e.config.series.forEach((i,r)=>{if(e.labelData.seriesGroupIndex[r]!==s)return;if(e.globals.comboCharts&&t.length&&-1===t.indexOf(i.type))return;i.data&&i.data.length>0&&-1===e.globals.collapsedSeriesIndices.indexOf(r)&&(a=r)}),a})}getBarSeriesIndices(){return this.w.globals.comboCharts?this.w.config.series.map((t,e)=>"bar"===t.type||"column"===t.type?e:-1).filter(t=>-1!==t):this.w.config.series.map((t,e)=>e)}getPreviousPaths(){const e=this.w.globals,i=e.pendingCapture;(null==i?void 0:i.pending)?t.HELD.forEach(t=>{e[t]=i[t]}):(this.capturePreviousPaths(),e.pendingCapture=d.isBrowser()?Ie(Object.fromEntries(t.HELD.map(t=>[t,e[t]]))):null)}capturePreviousPaths(){var e,i,s,a,r,o,n;const l=this.w;if(function(t){var e,i,s;const a=t.globals;if(a.streamScrolled=!1,!a.axisCharts||!t.seriesData||!Array.isArray(t.seriesData.series)||0===t.seriesData.series.length)return void(a.prevStreamFrame=null);const r=[];(null==(i=null==(e=t.dom)?void 0:e.baseEl)?void 0:i.querySelectorAll)&&t.dom.baseEl.querySelectorAll(".apexcharts-marker").forEach(t=>{var e,i,s,a,o;const n=parseInt(null!=(e=t.getAttribute("index"))?e:"",10),l=parseInt(null!=(s=null!=(i=t.getAttribute("j"))?i:t.getAttribute("rel"))?s:"",10),c=parseFloat(null!=(o=null!=(a=t.getAttribute("r"))?a:t.getAttribute("default-marker-size"))?o:"");isFinite(n)&&isFinite(l)&&isFinite(c)&&((r[n]=r[n]||[])[l]=c)}),a.prevStreamFrame={seriesX:(t.seriesData.seriesX||[]).slice(),seriesY:t.seriesData.series.slice(),xPixels:(a.seriesXvalues||[]).slice(),yPixels:(a.seriesYvalues||[]).slice(),rPixels:r,labels:(a.labels||[]).slice(),isXNumeric:!!(null==(s=t.axisFlags)?void 0:s.isXNumeric)}}(l),function(t){var e;const i=t.globals;if(null==(e=i.prevChromeFrame)?void 0:e.pending)return;if(i.prevChromeFrame=null,!i.axisCharts||!d.isBrowser())return;const s=t.dom.baseEl;if(A.elementExists(s))try{const e=Ke(s,ei,"y");i.prevChromeFrame=Ie({xLabels:Ke(s,ti,"x"),yLabels:e,vGrid:Je(s,ii,"x1"),hGrid:Je(s,si,"y1"),xScale:ai(t),yAnchors:ri(t,e),layout:We(t)})}catch(t){i.prevChromeFrame=null}}(l),function(t){var e,i;const s=t.globals;if(null==(e=s.prevCircleFrame)?void 0:e.pending)return;s.prevCircleFrame=null;const a=s.circleGeometry,r=null==(i=t.dom.elGraphical)?void 0:i.node;if(a&&r&&d.isBrowser()&&r.contains(a.node))try{s.prevCircleFrame=Ie({type:t.config.chart.type,circle:gi(t,a),rendered:{cx:a.cx,cy:a.cy,r:a.r},drawn:bi(a.node,r),layout:s.axisCharts?null:We(t),texts:mi(a.node,r)})}catch(t){s.prevCircleFrame=null}}(l),function(t){const e=t.globals;if(e.prevDataLabels=null,!e.axisCharts||!d.isBrowser())return;if(!Si(t))return;const i=t.dom.baseEl;if(A.elementExists(i))try{const t=new Map;i.querySelectorAll(vi).forEach(e=>{const i=e.getAttribute("data:dlKey");if(!i)return;const s=e.querySelector(wi);s&&t.set(i,{cx:parseFloat(s.getAttribute("cx")||""),cy:parseFloat(s.getAttribute("cy")||""),val:parseFloat(e.getAttribute("data:dlVal")||"")})}),i.querySelectorAll(Ai).forEach(e=>{const i=e.getAttribute("data:dlTotalKey");i&&t.set(`total::${i}`,{cx:parseFloat(e.getAttribute("cx")||""),cy:parseFloat(e.getAttribute("cy")||""),val:parseFloat(e.getAttribute("data:dlTotalVal")||"")})}),e.prevDataLabels=t.size?t:null}catch(t){e.prevDataLabels=null}}(l),function(t){const e=t.globals;e.exitLabels=null,e.riseLabels=null;const i=e.collapsingSeriesIndices||[],s=e.risingSeries||[];if(!i.length&&!s.length)return;if(!e.axisCharts||!d.isBrowser())return;if(!Ge(t))return;const a=t.dom.baseEl;if(!A.elementExists(a))return;const r=e.prevStreamFrame,o=[],n=new Map;s.forEach(t=>{var e,i;const s=a.querySelector(`.apexcharts-series[data\\:realIndex="${t}"]`);if(!s||!s.classList.contains("apexcharts-series-collapsed"))return;const o=null==(e=null==r?void 0:r.xPixels)?void 0:e[t],l=null==(i=null==r?void 0:r.yPixels)?void 0:i[t];Array.isArray(o)&&Array.isArray(l)&&o.length&&n.set(t,{oldX:o.slice(),oldY:l.slice()})}),e.riseLabels=n.size?n:null;try{i.forEach(t=>{a.querySelectorAll(`.apexcharts-datalabels[data\\:realIndex="${t}"] .apexcharts-data-labels`).forEach(e=>{var i,s;e.querySelector(wi)&&o.push({realIndex:t,node:e.cloneNode(!0),key:e.getAttribute("data:dlKey"),oldX:((null==(i=null==r?void 0:r.xPixels)?void 0:i[t])||[]).slice(),oldY:((null==(s=null==r?void 0:r.yPixels)?void 0:s[t])||[]).slice()})})})}catch(t){return void(e.exitLabels=null)}e.exitLabels=o.length?o:null}(l),null==(e=l.highlightData)||e.capture(),!l.globals.axisCharts)return void(l.globals.previousPaths=l.seriesData.series);if(!A.elementExists(l.dom.baseEl))return void(l.globals.previousPaths=[]);function c(t,e,i){const s=t[e].childNodes,a={type:i,paths:[],realIndex:t[e].getAttribute("data:realIndex")};for(let t=0;t<s.length;t++)if(s[t].hasAttribute("pathTo")){const e=("line"===i||"area"===i)&&s[t].getAttribute("d")||s[t].getAttribute("pathTo");a.paths.push({d:e,key:s[t].getAttribute("data:pathKey"),fill:s[t].getAttribute("fill"),flip:s[t].classList.contains("apexcharts-flip-y")||s[t].classList.contains("apexcharts-flip-x")})}l.globals.previousPaths.push(a)}l.globals.previousPaths=[];["line","area","bar","rangebar","rangeArea","candlestick","boxPlot","radar"].forEach(t=>{const e=(i=t,l.dom.baseEl.querySelectorAll(`.apexcharts-${i}-series .apexcharts-series`));var i;for(let i=0;i<e.length;i++)c(e,i,t)});const h=l.dom.baseEl.querySelectorAll(`.apexcharts-${l.config.chart.type} .apexcharts-series`);if(h.length>0)for(let e=0;e<h.length;e++){const c=`.apexcharts-${l.config.chart.type} .apexcharts-series[data\\:realIndex='${e}']`,h=l.dom.baseEl.querySelectorAll(`${c} .apexcharts-${l.config.chart.type}-rect`),d=[],p=new Map,u=new Set;l.dom.baseEl.querySelectorAll(`${c} .apexcharts-data-labels[data\\:key]`).forEach(e=>{var i;p.set(e.getAttribute("data:key"),t.treemapLabelLook(e)),parseFloat(null!=(i=e.getAttribute("opacity"))?i:"1")<.999&&u.add(e.getAttribute("data:key"))});for(let t=0;t<h.length;t++){const e=e=>h[t].getAttribute(e),l={rect:{x:parseFloat(null!=(i=e("x"))?i:"0"),y:parseFloat(null!=(s=e("y"))?s:"0"),width:parseFloat(null!=(a=e("width"))?a:"0"),height:parseFloat(null!=(r=e("height"))?r:"0")},color:h[t].getAttribute("color"),fill:h[t].getAttribute("fill"),label:null!=(o=p.get(e("data:key")))?o:"",labelFading:u.has(e("data:key"))},c=parseInt(null!=(n=e("j"))?n:"",10);Number.isFinite(c)&&c>=0?d[c]=l:d.push(l)}l.globals.previousPaths.push(d)}const p=new Map;if("treemap"===l.config.chart.type&&l.dom.baseEl.querySelectorAll(".apexcharts-treemap-parent-rect[data\\:key]").forEach(e=>{var i,s,a,r;const o=["x","y","width","height"].map(t=>{var i;return parseFloat(null!=(i=e.getAttribute(t))?i:"")}),n=null==(i=e.closest(".apexcharts-series"))?void 0:i.getAttribute("data:realIndex"),l=null==(s=e.parentElement)?void 0:s.querySelector(".apexcharts-treemap-parent-header"),c=l?["x","y","width","height"].map(t=>{var e;return parseFloat(null!=(e=l.getAttribute(t))?e:"")}):null;o.every(Number.isFinite)&&null!=n&&p.set(`${n}|${null!=(a=e.getAttribute("data:key"))?a:""}`,{x:o[0],y:o[1],width:o[2],height:o[3],fill:e.getAttribute("fill"),header:l&&c&&c.every(Number.isFinite)?{x:c[0],y:c[1],width:c[2],height:c[3],fill:l.getAttribute("fill"),look:t.treemapHeaderLook(null==(r=e.parentElement)?void 0:r.querySelector(".apexcharts-treemap-parent-label"))}:null})}),l.globals.prevTreemapParents=p.size?p:null,l.globals.prevTreemapView=null,"treemap"===l.config.chart.type&&l.globals.treemapZoom){const e=l.dom.baseEl.querySelector(".apexcharts-treemap");if(e){const i=e.cloneNode(!0),s="zoom"+ ++t.ghostDefs,a=new Map;if(i.querySelectorAll('[fill^="url("], [stroke^="url("], [filter^="url("]').forEach(t=>{["fill","stroke","filter"].forEach(e=>{const i=/^url\(#([^)]+)\)$/.exec(t.getAttribute(e)||"");if(i){if(!a.has(i[1])){const t=l.dom.baseEl.querySelector(`[id="${i[1]}"]`);if(!t)return;const e=t.cloneNode(!0);e.setAttribute("id",`${i[1]}-${s}`),a.set(i[1],e)}t.setAttribute(e,`url(#${i[1]}-${s})`)}})}),a.size){const t=document.createElementNS("http://www.w3.org/2000/svg","defs");t.setAttribute("class","apexcharts-treemap-ghost-defs"),a.forEach(e=>t.appendChild(e)),i.appendChild(t)}l.globals.prevTreemapView=i}}}clearPreviousPaths(){const t=this.w;t.globals.previousPaths=[],t.globals.allSeriesCollapsed=!1}handleNoData(){const t=this.w,e=t.config.noData,i=new ae(this.w);let s=t.globals.svgWidth/2,a=t.globals.svgHeight/2,r="middle";if(t.globals.noData=!0,t.globals.animationEnded=!0,"left"===e.align?(s=10,r="start"):"right"===e.align&&(s=t.globals.svgWidth-10,r="end"),"top"===e.verticalAlign?a=50:"bottom"===e.verticalAlign&&(a=t.globals.svgHeight-50),s+=e.offsetX,a=a+parseInt(e.style.fontSize,10)+2+e.offsetY,void 0!==e.text&&""!==e.text){const o=i.drawText({x:s,y:a,text:e.text,textAnchor:r,fontSize:e.style.fontSize,fontFamily:e.style.fontFamily,foreColor:e.style.color,opacity:1,cssClass:"apexcharts-text-nodata"});t.dom.Paper.add(o)}}setNullSeriesToZeroValues(t){const e=this.w;for(let i=0;i<t.length;i++)if(0===t[i].length)for(let s=0;s<t[e.globals.maxValsInArrayIndex].length;s++)t[i].push(0);return t}hasAllSeriesEqualX(){let t=!0;const e=this.w,i=e.seriesData.seriesX.filter(t=>null==t?void 0:t.length);for(let e=1;t&&e<i.length;e++){const s=i[0],a=i[e],r=s===a?0:Math.min(s.length,a.length);for(let e=0;t&&e<r;e++)t=s[e]===a[e]}return e.globals.allSeriesHasEqualX=t,t}};h(Ei,"ghostDefs",0),h(Ei,"HELD",["previousPaths","prevStreamFrame","prevChromeFrame","prevCircleFrame","prevDataLabels","exitLabels","riseLabels","prevTreemapParents","prevTreemapView","prevPolarAngles","prevPolarSizes"]);let Pi=Ei;const Bi={accent:"--apx-accent",fore:"--apx-fore",grid:"--apx-grid",surface:"--apx-surface"};const Ni="__apexcharts_themes__";function Ri(){return globalThis[Ni]}globalThis[Ni]||(globalThis[Ni]={});const zi="#373d3f",Ii="#f6f7f8",Oi="#e0e0e0";class Xi{constructor(t){this.w=t,this.colors=[],this.isColorFn=!1,this.isHeatmapDistributed=!1,this.isBarDistributed=!1,this._tokens={},this._namedTheme=null}checkHeatmapDistributed(){const{chart:t,plotOptions:e}=this.w.config;return"treemap"===t.type&&e.treemap&&e.treemap.distributed||"heatmap"===t.type&&e.heatmap&&e.heatmap.distributed}checkBarDistributed(){const{chart:t,plotOptions:e}=this.w.config;return e.bar&&e.bar.distributed&&("bar"===t.type||"rangeBar"===t.type)}init(){this.setDefaultColors()}setDefaultColors(){var t;const e=this.w,i=new A;var s;this.isColorFn=!1,this.isHeatmapDistributed=this.checkHeatmapDistributed(),this.isBarDistributed=this.checkBarDistributed(),this._namedTheme=(s=e.config.theme.name)&&Ri()[s]||null,this._applyNamedThemeMode(),e.dom.elWrap.classList.add(`apexcharts-theme-${e.config.theme.mode||"light"}`),this._applyModeDefaults(),this._tokens=this._resolveTokens(),this.applyTokenChrome(this._tokens);const a=null==(t=e.config.theme.accessibility)?void 0:t.colorBlindMode;if(a){e.globals.colors=this.getColorBlindColors(a),this.applySeriesColors(e.seriesData.seriesColors,e.globals.colors);const t=e.globals.colors.slice();return this.pushExtraColors(e.globals.colors),this.applyColorTypes(["fill","stroke"],t),this.applyDataLabelsColors(t),this.applyRadarPolygonsColors(),this.applyMarkersColors(t),void("highContrast"===a&&e.dom.elWrap.classList.add("apexcharts-high-contrast"))}const r=[...e.config.colors||e.config.fill.colors||[]];e.globals.colors=this.getColors(r),this.applySeriesColors(e.seriesData.seriesColors,e.globals.colors),e.config.theme.monochrome.enabled&&(e.globals.colors=this.getMonochromeColors(e.config.theme.monochrome,e.seriesData.series,i));const o=e.globals.colors.slice();this.pushExtraColors(e.globals.colors),this.applyColorTypes(["fill","stroke"],o),this.applyDataLabelsColors(o),this.applyRadarPolygonsColors(),this.applyMarkersColors(o)}_applyModeDefaults(t=this.w.config.theme.mode){const e=this.w;"dark"===t?(e.config.chart.foreColor===zi&&(e.config.chart.foreColor=Ii),"palette1"===e.config.theme.palette&&(e.config.theme.palette="palette4"),e.config.tooltip&&"light"!==e.config.tooltip.theme&&(e.config.tooltip.theme="dark")):"light"===t&&(e.config.chart.foreColor===Ii&&(e.config.chart.foreColor=zi),"palette4"===e.config.theme.palette&&(e.config.theme.palette="palette1"))}_applyNamedThemeMode(){var t;const e=this.w,i=e.config.theme,s=e.globals.namedThemeApplied||{},a=e.globals.namedThemeApplied={};s.mode&&i.mode===s.mode&&(i.mode="",this._applyModeDefaults("light"),e.config.tooltip&&(e.config.tooltip.theme="light")),s.accessibility&&(null==(t=i.accessibility)?void 0:t.colorBlindMode)===s.accessibility&&(i.accessibility.colorBlindMode=""),s.monochrome&&i.monochrome.enabled&&(i.monochrome=s.monochrome);const r=this._namedTheme;r&&(r.mode&&!i.mode&&(i.mode=a.mode=r.mode),!r.accessibility||!r.accessibility.colorBlindMode||i.accessibility&&i.accessibility.colorBlindMode||(i.accessibility=i.accessibility||{},i.accessibility.colorBlindMode=a.accessibility=r.accessibility.colorBlindMode),r.monochrome&&r.monochrome.enabled&&!i.monochrome.enabled&&(a.monochrome=i.monochrome,i.monochrome=n(n({},i.monochrome),r.monochrome)))}_resolveTokens(){const t=this._namedTheme&&this._namedTheme.tokens||{},e=this._shouldUseTokens()?function(t){if(!d.isBrowser())return{};const e=t.dom&&(t.dom.elWrap||t.dom.baseEl)||null;if(!e)return{};const i=y.getComputedStyle(e);if(!i||"function"!=typeof i.getPropertyValue)return{};const s=t=>{const e=i.getPropertyValue(t);return e?String(e).trim():""},a={};for(const t in Bi){const e=s(Bi[t]);e&&(a[t]=e)}const r=[];for(let t=1;t<=24;t++){const e=s(`--apx-series-${t}`);if(!e)break;r.push(e)}return r.length&&(a.series=r),a}(this.w):{};return n(n({},t),e)}_shouldUseTokens(){return!1!==this.w.config.theme.tokens}applyTokenChrome(t){if(!t)return;const e=this.w,i=e.globals.tokenChrome||{},s="dark"===e.config.theme.mode,a=(e,s,a,r,o=r)=>{const n=e&&e[s],l=t[a];e&&(l&&(n===r||n===o)||i[a]&&n===i[a])&&(e[s]=l||r)};a(e.config.chart,"foreColor","fore",s?Ii:zi,s?zi:Ii);const r=[e.config.xaxis].concat(e.config.yaxis);a(e.config.grid,"borderColor","grid",Oi),r.forEach(t=>{t&&(a(t.axisBorder,"color","grid",Oi),a(t.axisTicks,"color","grid",Oi))}),e.globals.tokenChrome=t;const o=e.globals.tokenSurface,n=e.config.chart.background,l=!n||n===o;if(t.surface){if(l){e.config.chart.background=t.surface,e.globals.tokenSurface=t.surface;const i=e.dom.Paper&&e.dom.Paper.node;i&&i.style&&(i.style.background=t.surface)}}else if(o&&n===o){e.config.chart.background="",e.globals.tokenSurface=void 0;const t=e.dom.Paper&&e.dom.Paper.node;t&&t.style&&(t.style.background="")}}getColors(t){const e=this.w;return t&&0!==t.length?Array.isArray(t)&&t.length>0&&"function"==typeof t[0]?(this.isColorFn=!0,e.config.series.map((i,s)=>{const a=t[s]||t[0];return"function"==typeof a?a({value:e.globals.axisCharts?e.seriesData.series[s][0]||0:e.seriesData.series[s],seriesIndex:s,dataPointIndex:s,w:this.w}):a})):t:this.predefined()}applySeriesColors(t,e){t.forEach((t,i)=>{t&&(e[i]=t)})}getMonochromeColors(t,e,i){const{color:s,shadeIntensity:a,shadeTo:r}=t,o=this.isBarDistributed||this.isHeatmapDistributed?this.distributedCount():e.length,n=1/(o/a);let l=0;return Array.from({length:o},()=>{const t="dark"===r?i.shadeColor(-1*l,s):i.shadeColor(l,s);return l+=n,t})}applyColorTypes(t,e){const i=this.w;t.forEach(t=>{i.globals[t].colors=void 0===i.config[t].colors?this.isColorFn?i.config.colors.slice():e:i.config[t].colors.slice(),this.pushExtraColors(i.globals[t].colors)})}applyDataLabelsColors(t){const e=this.w;e.globals.dataLabels.style.colors=void 0===e.config.dataLabels.style.colors?t:e.config.dataLabels.style.colors.slice(),this.pushExtraColors(e.globals.dataLabels.style.colors,50)}applyRadarPolygonsColors(){const t=this.w;t.globals.radarPolygons.fill.colors=void 0===t.config.plotOptions.radar.polygons.fill.colors?["dark"===t.config.theme.mode?"#343A3F":"none"]:t.config.plotOptions.radar.polygons.fill.colors.slice(),this.pushExtraColors(t.globals.radarPolygons.fill.colors,20)}applyMarkersColors(t){const e=this.w;e.globals.markers.colors=void 0===e.config.markers.colors?t:e.config.markers.colors.slice(),this.pushExtraColors(e.globals.markers.colors)}pushExtraColors(t,e,i=null){const s=this.w;let a=e||s.seriesData.series.length;if(null===i&&(i=this.isBarDistributed||this.isHeatmapDistributed||"heatmap"===s.config.chart.type&&s.config.plotOptions.heatmap&&s.config.plotOptions.heatmap.colorScale.inverse),i&&s.seriesData.series.length&&(a=this.distributedCount()),t.length<a){const e=a-t.length;for(let i=0;i<e;i++)t.push(t[i])}}distributedCount(){const t=this.w.seriesData.series;return t.length?t[this.w.globals.maxValsInArrayIndex].length*t.length:0}getColorBlindColors(t){const e={palette1:["#008FFB","#00A86F","#CA8501","#FF4560","#846DD5"],palette2:["#6978CB","#039DE2","#49A84D","#B39105","#D68000"],palette3:["#209FCC","#648291","#D4526E","#0FA783","#A19285"],palette4:["#2FA59D","#73A20B","#099DE1","#FD5D5D","#648291"],palette5:["#2B908F","#F56566","#2EAB16","#FA4443","#1EA2BD"],palette6:["#449DD1","#F86624","#EA3A4A","#9C63D1","#899E2A"],palette7:["#DF475B","#1B998B","#7E75B7","#F46036","#B1911B"],palette8:["#9C63D1","#F86624","#B38F04","#EA3A4A","#2FA2B3"],palette9:["#98776F","#A19285","#A8705E","#BA6560","#A0927F"],palette10:["#C91EFF","#A94BFD","#6C6AFE","#2983FF","#009ED8"],cvdDeuteranopia:["#0072B2","#E69F00","#56B4E9","#009E73","#F0E442","#D55E00","#CC79A7"],cvdProtanopia:["#0077BB","#EE7733","#009988","#EE3377","#BBBBBB","#33BBEE","#CC3311"],cvdTritanopia:["#CC3311","#009988","#EE7733","#0077BB","#EE3377","#BBBBBB","#33BBEE"],highContrast:["#005A9C","#C00000","#007A33","#6C3483","#7B3F00","#0097A7","#4A235A"]};return({deuteranopia:e.cvdDeuteranopia,protanopia:e.cvdProtanopia,tritanopia:e.cvdTritanopia,highContrast:e.highContrast}[t]||e.palette1).slice()}updateThemeOptions(t){const e=t.theme.mode,i=this.w.globals.namedThemeApplied;for(const e in i)void 0!==t.theme[e]&&delete i[e];if(void 0===e)return t;t.chart=t.chart||{},t.tooltip=t.tooltip||{};const s="dark"===e;return t.tooltip.theme=t.tooltip.theme||e||"light",t.chart.foreColor=t.chart.foreColor||(s?Ii:zi),t.theme.palette=t.theme.palette||(s?"palette4":"palette1"),t}predefined(){const t={palette1:["#008FFB","#00A86F","#CA8501","#FF4560","#846DD5"],palette2:["#6978CB","#039DE2","#49A84D","#B39105","#D68000"],palette3:["#209FCC","#648291","#D4526E","#0FA783","#A19285"],palette4:["#2FA59D","#73A20B","#099DE1","#FD5D5D","#648291"],palette5:["#2B908F","#F56566","#2EAB16","#FA4443","#1EA2BD"],palette6:["#449DD1","#F86624","#EA3A4A","#9C63D1","#899E2A"],palette7:["#DF475B","#1B998B","#7E75B7","#F46036","#B1911B"],palette8:["#9C63D1","#F86624","#B38F04","#EA3A4A","#2FA2B3"],palette9:["#98776F","#A19285","#A8705E","#BA6560","#A0927F"],palette10:["#C91EFF","#A94BFD","#6C6AFE","#2983FF","#009ED8"],cvdDeuteranopia:["#0072B2","#E69F00","#56B4E9","#009E73","#F0E442","#D55E00","#CC79A7"],cvdProtanopia:["#0077BB","#EE7733","#009988","#EE3377","#BBBBBB","#33BBEE","#CC3311"],cvdTritanopia:["#CC3311","#009988","#EE7733","#0077BB","#EE3377","#BBBBBB","#33BBEE"],highContrast:["#005A9C","#C00000","#007A33","#6C3483","#7B3F00","#0097A7","#4A235A"]},e=t[this.w.config.theme.palette]||t.palette1,i=this._tokens||{};if(Array.isArray(i.series)&&i.series.length)return i.series.slice();if(i.accent)return[i.accent,...e];const s=this._namedTheme;return s&&Array.isArray(s.palette)&&s.palette.length?s.palette.slice():e}}class Hi{constructor(t){this.w=t}draw(){this.drawTitleSubtitle("title"),this.drawTitleSubtitle("subtitle")}drawTitleSubtitle(t){const e=this.w,i="title"===t?e.config.title:e.config.subtitle;let s=e.globals.svgWidth/2,a=i.offsetY,r="middle";if("left"===i.align?(s=10,r="start"):"right"===i.align&&(s=e.globals.svgWidth-10,r="end"),s+=i.offsetX,a=a+parseInt(i.style.fontSize,10)+i.margin/2,void 0!==i.text){const o=new ae(this.w).drawText({x:s,y:a,text:i.text,textAnchor:r,fontSize:i.style.fontSize,fontFamily:i.style.fontFamily,fontWeight:i.style.fontWeight,foreColor:i.style.color,opacity:1});o.node.setAttribute("class",`apexcharts-${t}-text`),e.dom.Paper.add(o)}}}class Yi{constructor(t){this.w=t.w,this.dCtx=t}getTitleSubtitleCoords(t){const e=this.w;let i=0,s=0;const a="title"===t?e.config.title.floating:e.config.subtitle.floating,r=e.dom.baseEl.querySelector(`.apexcharts-${t}-text`);if(null!==r&&!a){const t=r.getBoundingClientRect();i=t.width,s=e.globals.axisCharts?t.height+5:t.height}return{width:i,height:s}}getLegendsRect(){const t=this.w,e=t.dom.elLegendWrap;t.config.legend.height||"top"!==t.config.legend.position&&"bottom"!==t.config.legend.position||e&&(e.style.maxHeight=t.globals.svgHeight/2+"px");const i=Object.assign({},A.getBoundingClientRect(e));return null!==e&&!t.config.legend.floating&&t.config.legend.show?this.dCtx.lgRect={x:i.x,y:i.y,height:i.height,width:0===i.height?0:i.width}:this.dCtx.lgRect={x:0,y:0,height:0,width:0},"left"!==t.config.legend.position&&"right"!==t.config.legend.position||1.5*this.dCtx.lgRect.width>t.globals.svgWidth&&(this.dCtx.lgRect.width=t.globals.svgWidth/1.5),this.dCtx.lgRect}getDatalabelsRect(){const t=this.w,e=[];t.config.series.forEach((i,s)=>{i.data.forEach((i,a)=>{const r=(o=t.seriesData.series[s][a],t.config.dataLabels.formatter(o,{seriesIndex:s,dataPointIndex:a,w:t}));var o;e.push(r)})});const i=A.getLargestStringFromArr(e),s=new ae(this.w),a=t.config.dataLabels.style,r=s.getTextRects(i,parseInt(a.fontSize).toString(),a.fontFamily);return{width:1.05*r.width,height:r.height}}getLargestStringFromMultiArr(t,e){let i=t;if(this.w.axisFlags.isMultiLineX){const t=e.map(t=>Array.isArray(t)?t.length:1),s=Math.max(...t);i=e[t.indexOf(s)]}return i}getSparklineStrokeInset(){const t=this.w,e=Array.isArray(t.config.stroke.width)?Math.max(...t.config.stroke.width):t.config.stroke.width,i=e/2;if(!(t.config.stroke.show&&i>0))return{top:0,bottom:0};const s=t.globals.maxY-t.globals.minY,a=this._getSeriesYExtremes();if(!(this._strokeTracesDataPoints()&&s>0&&a))return{top:i,bottom:i};const r=Math.max(t.globals.svgHeight-e,0),o=r*(t.globals.maxY-a.max)/s,n=r*(a.min-t.globals.minY)/s;return{top:Math.min(Math.max(i-o,0),i),bottom:Math.min(Math.max(i-n,0),i)}}_strokeTracesDataPoints(){const t=this.w;if(!t.globals.axisCharts||t.config.chart.stacked)return!1;const e=["line","area","scatter"];return t.config.series.every(i=>e.includes(i.type||t.config.chart.type))}_getSeriesYExtremes(){let t=1/0,e=-1/0;return this.w.seriesData.series.forEach(i=>{Array.isArray(i)&&i.forEach(i=>{Number.isFinite(i)&&(i<t&&(t=i),i>e&&(e=i))})}),t===1/0?null:{min:t,max:e}}}class Wi{constructor(t){this.w=t.w,this.dCtx=t}getxAxisLabelsCoords(){const t=this.w;let e,i=t.labelData.labels.slice();if(t.config.xaxis.convertedCatToNumeric&&0===i.length&&(i=t.labelData.categoryLabels),t.labelData.timescaleLabels.length>0){const i=this.getxAxisTimeScaleLabelsCoords();e={width:i.width,height:i.height},t.layout.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends="left"!==t.config.legend.position&&"right"!==t.config.legend.position||t.config.legend.floating?0:this.dCtx.lgRect.width;const s=t.formatters.xLabelFormatter;let a=A.getLargestStringFromArr(i),r=this.dCtx.dimHelpers.getLargestStringFromMultiArr(a,i);t.globals.isBarHorizontal&&(a=t.globals.yAxisScale[0].result.reduce((t,e)=>t.length>e.length?t:e,0),r=a);const o=new C(this.w),n=a;a=o.xLabelFormat(s,a,n,{i:void 0,dateFormatter:new S(this.w).formatDate,w:t}),r=o.xLabelFormat(s,r,n,{i:void 0,dateFormatter:new S(this.w).formatDate,w:t}),(t.config.xaxis.convertedCatToNumeric&&void 0===a||""===String(a).trim())&&(a="1",r=a);const l=new ae(this.w);let c=l.getTextRects(a,t.config.xaxis.labels.style.fontSize),h=c;if(a!==r&&(h=l.getTextRects(r,t.config.xaxis.labels.style.fontSize)),e={width:c.width>=h.width?c.width:h.width,height:c.height>=h.height?c.height:h.height},e.width*i.length>t.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&0!==t.config.xaxis.labels.rotate||t.config.xaxis.labels.rotateAlways){if(!t.globals.isBarHorizontal){t.layout.rotateXLabels=!0;const i=e=>l.getTextRects(e,t.config.xaxis.labels.style.fontSize,t.config.xaxis.labels.style.fontFamily,`rotate(${t.config.xaxis.labels.rotate} 0 0)`,!1);c=i(a),a!==r&&(h=i(r)),e.height=(c.height>h.height?c.height:h.height)/1.5,e.width=c.width>h.width?c.width:h.width}}else t.layout.rotateXLabels=!1}return t.config.xaxis.labels.show||(e={width:0,height:0}),{width:e.width,height:e.height}}getxAxisGroupLabelsCoords(){var t;const e=this.w;if(!e.labelData.hasXaxisGroups)return{width:0,height:0};const i=(null==(t=e.config.xaxis.group.style)?void 0:t.fontSize)||e.config.xaxis.labels.style.fontSize,s=e.labelData.groups.map(t=>t.title);let a;const r=A.getLargestStringFromArr(s),o=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,s),n=new ae(this.w),l=n.getTextRects(r,i);let c=l;return r!==o&&(c=n.getTextRects(o,i)),a={width:l.width>=c.width?l.width:c.width,height:l.height>=c.height?l.height:c.height},e.config.xaxis.labels.show||(a={width:0,height:0}),{width:a.width,height:a.height}}getxAxisTitleCoords(){const t=this.w;let e=0,i=0;if(void 0!==t.config.xaxis.title.text){const s=new ae(this.w).getTextRects(t.config.xaxis.title.text,t.config.xaxis.title.style.fontSize);e=s.width,i=s.height}return{width:e,height:i}}getxAxisTimeScaleLabelsCoords(){const t=this.w;this.dCtx.timescaleLabels=t.labelData.timescaleLabels.slice();const e=this.dCtx.timescaleLabels.map(t=>t.value),i=e.reduce((t,e)=>void 0===t?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):t.length>e.length?t:e,0),s=new ae(this.w).getTextRects(i,t.config.xaxis.labels.style.fontSize);return 1.05*s.width*e.length>t.layout.gridWidth&&0!==t.config.xaxis.labels.rotate&&(t.globals.overlappingXLabels=!0),s}additionalPaddingXLabels(t){const e=this.w,i=e.globals,s=e.config,a=s.xaxis.type,r=t.width;i.skipLastTimelinelabel=!1,i.skipFirstTimelinelabel=!1;const o=e.config.yaxis[0].opposite&&e.globals.isBarHorizontal,n=t=>{if(this.dCtx.timescaleLabels&&this.dCtx.timescaleLabels.length){const a=this.dCtx.timescaleLabels[0],o=this.dCtx.timescaleLabels[this.dCtx.timescaleLabels.length-1].position+r/1.75-this.dCtx.yAxisWidthRight,n=a.position-r/1.75+this.dCtx.yAxisWidthLeft,l="right"===e.config.legend.position&&this.dCtx.lgRect.width>0?this.dCtx.lgRect.width:0;o>i.svgWidth-e.layout.translateX-l&&(i.skipLastTimelinelabel=!0),n<-(t.show&&!t.floating||"bar"!==s.chart.type&&"candlestick"!==s.chart.type&&"rangeBar"!==s.chart.type&&"boxPlot"!==s.chart.type&&"violin"!==s.chart.type?10:r/1.75)&&(i.skipFirstTimelinelabel=!0)}else"datetime"===a?this.dCtx.gridPad.right<r&&!e.layout.rotateXLabels&&(i.skipLastTimelinelabel=!0):"datetime"!==a&&this.dCtx.gridPad.right<r/2-this.dCtx.yAxisWidthRight&&!e.layout.rotateXLabels&&!e.config.xaxis.labels.trim&&(this.dCtx.xPadRight=r/2+1)},l=(t,e)=>{s.yaxis.length>1&&(t=>-1!==i.collapsedSeriesIndices.indexOf(t))(e)||n(t)};s.yaxis.forEach((t,e)=>{o?(this.dCtx.gridPad.left<r&&(this.dCtx.xPadLeft=r/2+1),this.dCtx.xPadRight=r/2+1):l(t,e)})}}class $i{constructor(t){this.w=t.w,this.dCtx=t}getyAxisLabelsCoords(){const t=this.w,e=[];let i=10;const s=new be(this.w,{theme:this.dCtx.theme});return t.config.yaxis.map((a,r)=>{const o={seriesIndex:r,dataPointIndex:-1,w:t},n=t.globals.yAxisScale[r];let l=0;if(!s.isYAxisHidden(r)&&a.labels.show&&void 0!==a.labels.minWidth&&(l=a.labels.minWidth),!s.isYAxisHidden(r)&&a.labels.show&&n.result.length){const s=t.formatters.yLabelFormatters[r],c=n.niceMin===Number.MIN_VALUE?0:n.niceMin;let h=n.result.reduce((e,i)=>{var a,r;return(null==(a=String(s(e,o,t)))?void 0:a.length)>(null==(r=String(s(i,o,t)))?void 0:r.length)?e:i},c);h=s(h,o,t);let d=h;if(void 0!==h&&0!==h.length||(h=n.niceMax),1===String(h).length&&(h+=".0",d=h),t.globals.isBarHorizontal){i=0;const e=t.labelData.labels.slice();h=A.getLargestStringFromArr(e),h=s(h,{seriesIndex:r,dataPointIndex:-1,w:t},t),d=this.dCtx.dimHelpers.getLargestStringFromMultiArr(h,e)}const p=new ae(this.w),u="rotate(".concat(a.labels.rotate," 0 0)"),g=p.getTextRects(h,a.labels.style.fontSize,a.labels.style.fontFamily,u,!1);let x=g;h!==d&&(x=p.getTextRects(d,a.labels.style.fontSize,a.labels.style.fontFamily,u,!1)),e.push({width:(l>x.width||l>g.width?l:x.width>g.width?x.width:g.width)+i,height:x.height>g.height?x.height:g.height})}else e.push({width:0,height:0})}),e}getyAxisTitleCoords(){const t=this.w,e=[];return t.config.yaxis.map(t=>{if(t.show&&void 0!==t.title.text){const i=new ae(this.w),s="rotate(".concat(t.title.rotate," 0 0)"),a=i.getTextRects(t.title.text,t.title.style.fontSize,t.title.style.fontFamily,s,!1);e.push({width:a.width,height:a.height})}else e.push({width:0,height:0})}),e}getTotalYAxisWidth(){const t=this.w;let e=0,i=0,s=0;const a=t.globals.yAxisScale.length>1?10:0,r=new be(this.w,{theme:this.dCtx.theme}),o=(o,n)=>{const l=t.config.yaxis[n].floating;let c=0;o.width>0&&!l?(c=o.width+a,function(e){return t.globals.ignoreYAxisIndexes.indexOf(e)>-1}(n)&&(c=c-o.width-a)):c=l||r.isYAxisHidden(n)?0:5,t.config.yaxis[n].opposite?s+=c:i+=c,e+=c};return t.layout.yLabelsCoords.map((t,e)=>{o(t,e)}),t.layout.yTitleCoords.map((t,e)=>{o(t,e)}),t.globals.isBarHorizontal&&!t.config.yaxis[0].floating&&(e=t.layout.yLabelsCoords[0].width+t.layout.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=i,this.dCtx.yAxisWidthRight=s,e}}class Gi{constructor(t){this.w=t.w,this.dCtx=t}gridPadForColumnsInNumericAxis(t){const{w:e}=this,{config:i,globals:s}=e;if(s.noData||s.collapsedSeries.length+s.ancillaryCollapsedSeries.length===i.series.length)return 0;const a=t=>["bar","rangeBar","candlestick","boxPlot","violin"].includes(t),r=i.chart.type;let o=0,n=a(r)?i.series.length:1;s.comboBarCount>0&&(n=s.comboBarCount),s.collapsedSeries.forEach(t=>{a(t.type)&&(n-=1)}),i.chart.stacked&&(n=1);const l=a(r)||s.comboBarCount>0,c=Math.abs(s.initialMaxX-s.initialMinX);let h=c;if(l&&e.axisFlags.isXNumeric&&!s.isBarHorizontal&&n>0&&0!==h){h<=3&&(h=s.dataPoints);const e=h/t;let a=s.minXDiff&&s.minXDiff/e>0?s.minXDiff/e:0;a>t/2&&(a/=2),o=a*parseInt(i.plotOptions.bar.columnWidth,10)/100,o<1&&(o=1);const r=parseInt(i.plotOptions.bar.columnWidth,10)/100||0,n=r/2*t/((s.minXDiff>0?c/s.minXDiff:1)+r)+4;o=Math.min(o,Math.max(n,t/8)),s.barPadForNumericAxis=o}return o}gridPadForStackedTotalDataLabels(){const{w:t}=this,e=t.config.plotOptions.bar.dataLabels.total;if(!t.globals.isBarHorizontal||!t.config.chart.stacked||"100%"!==t.config.chart.stackType||!e.enabled)return;const i=t.seriesData.stackedSeriesTotals||[];if(!i.length)return;const s=e.formatter||t.config.dataLabels.formatter,a=i.map((e,i)=>String(s?s(e,l(n({},t),{seriesIndex:0,dataPointIndex:i,w:t})):e)),r=new ae(t).getTextRects(A.getLargestStringFromArr(a),parseFloat(e.style.fontSize).toString(),e.style.fontFamily).width+Math.abs(e.offsetX||0)+2;this.dCtx.xPadRight=Math.max(this.dCtx.xPadRight,r)}gridPadFortitleSubtitle(){const{w:t}=this,{globals:e}=t;let i=this.dCtx.isSparkline||!e.axisCharts?0:10;["title","subtitle"].forEach(s=>{void 0!==t.config[s].text?i+=t.config[s].margin:i+=this.dCtx.isSparkline||!e.axisCharts?0:5}),!t.config.legend.show||"bottom"!==t.config.legend.position||t.config.legend.floating||e.axisCharts||(i+=10);const s=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),a=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");this.dCtx.titleBlockPad=i,t.layout.gridHeight-=s.height+a.height+i,t.layout.translateY+=s.height+a.height+i}setGridXPosForDualYAxis(t,e){const{w:i}=this,s=new be(this.w,{theme:this.dCtx.theme});i.config.yaxis.forEach((a,r)=>{-1!==i.globals.ignoreYAxisIndexes.indexOf(r)||a.floating||s.isYAxisHidden(r)||(a.opposite&&(i.layout.translateX-=e[r].width+t[r].width+(parseInt(a.labels.style.fontSize,10)||11)/1.2+12),i.layout.translateX<2&&(i.layout.translateX=2))})}}function Ui(t,e){const i=t.config.drilldown&&t.config.drilldown.breadcrumb||{};return n(n({show:!0,position:"top-left",separator:" / ",rootLabel:"All",offsetX:0,offsetY:0,formatter:void 0},i),e||{})}class ji{constructor(t,e){this.w=t,this.ctx=e,this.theme=e.theme,this.lgRect={},this.yAxisWidth=0,this.yAxisWidthLeft=0,this.yAxisWidthRight=0,this.xAxisHeight=0,this.isSparkline=this.w.config.chart.sparkline.enabled,this.dimHelpers=new Yi(this),this.dimYAxis=new $i(this),this.dimXAxis=new Wi(this),this.dimGrid=new Gi(this),this.lgWidthForSideLegends=0,this.gridPad=n({},this.w.config.grid.padding),this.xPadRight=0,this.titleBlockPad=0,this.xPadLeft=0,this.datalabelsCoords={width:0,height:0},this.xAxisWidth=0,this.timescaleLabels=[]}plotCoords(){const t=this.w,e=t.globals;if(this.gridPad=n({},t.config.grid.padding),this.xPadRight=0,this.xPadLeft=0,this.lgWidthForSideLegends=0,this.titleBlockPad=0,this.timescaleLabels=[],this.lgRect=this.dimHelpers.getLegendsRect(),this.datalabelsCoords={width:0,height:0},this.isSparkline){this.w.globals.markers.largestSize>0&&Object.entries(this.gridPad).forEach(([t,e])=>{this.gridPad[t]=Math.max(e,this.w.globals.markers.largestSize/1.5)});const t=this.dimHelpers.getSparklineStrokeInset();this.gridPad.top=Math.max(t.top,this.gridPad.top),this.gridPad.bottom=Math.max(t.bottom,this.gridPad.bottom)}if(e.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),this.gridPadForBreadcrumb(),this.dimGrid.gridPadForStackedTotalDataLabels(),"heatmap"===t.config.chart.type&&"hexagon"===t.config.plotOptions.heatmap.shape&&("numeric"!==t.config.xaxis.type&&"datetime"!==t.config.xaxis.type||!t.axisFlags.isXNumeric)){const i=e.dataPoints||1,s=(t.seriesData.series||[]).length||1,a=t.layout.gridWidth-this.xPadRight-this.xPadLeft,r=t.layout.gridHeight,o=t.config.stroke.show?Array.isArray(t.config.stroke.width)?Math.max(...t.config.stroke.width):t.config.stroke.width:0,n=(a+4*i*(o/2+6))/(4*i+2),l=(r+6*s*(o/2))/(6*s+2);this.gridPad.left=Math.max(n,this.gridPad.left),this.gridPad.right=Math.max(n,this.gridPad.right),this.gridPad.top=Math.max(l,this.gridPad.top),this.gridPad.bottom=Math.max(l,this.gridPad.bottom)}t.layout.gridHeight=t.layout.gridHeight-this.gridPad.top-this.gridPad.bottom,t.layout.gridWidth=t.layout.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;const i=this.dimGrid.gridPadForColumnsInNumericAxis(t.layout.gridWidth);return t.layout.gridWidth=t.layout.gridWidth-2*i,t.layout.translateX=t.layout.translateX+this.gridPad.left+this.xPadLeft+(i>0?i:0),t.layout.translateY=t.layout.translateY+this.gridPad.top,{layout:{gridHeight:t.layout.gridHeight,gridWidth:t.layout.gridWidth,translateX:t.layout.translateX,translateY:t.layout.translateY,translateXAxisX:t.layout.translateXAxisX,translateXAxisY:t.layout.translateXAxisY,rotateXLabels:t.layout.rotateXLabels,xAxisHeight:t.layout.xAxisHeight,xAxisLabelsHeight:t.layout.xAxisLabelsHeight,xAxisGroupLabelsHeight:t.layout.xAxisGroupLabelsHeight,xAxisLabelsWidth:t.layout.xAxisLabelsWidth,yLabelsCoords:t.layout.yLabelsCoords,yTitleCoords:t.layout.yTitleCoords,gridPad:n({},this.gridPad)}}}gridPadForBreadcrumb(){var t,e,i,s,a,r,o,n;const l=this.w,c="treemap"===l.config.chart.type;if(c){const i=null==(e=null==(t=l.config.plotOptions)?void 0:t.treemap)?void 0:e.zoom;if(i&&i.enabled){if(!1===Ui(l,i.breadcrumb).show)return;return void(this.gridPad.top+=22)}}if("icicle"===l.config.chart.type){if(!1===(null==(s=null==(i=l.config.plotOptions)?void 0:i.icicle)?void 0:s.zoomOnClick))return;if(!1===Ui(l).show)return;return void(this.gridPad.top+=22)}if(!l.globals.axisCharts)return;if(!this.ctx.drilldown)return;if(!l.config.drilldown||!l.config.drilldown.enabled)return;if(!1===Ui(l).show)return;const h=parseFloat(String(null==(n=null==(o=null==(r=null==(a=l.config.yaxis)?void 0:a[0])?void 0:r.labels)?void 0:o.style)?void 0:n.fontSize))||11,d=24+(c?0:Math.ceil(h*lt/2)),p=c?0:this.titleBlockPad||0;this.gridPad.top+=Math.max(0,d-p)}setDimensionsForAxisCharts(){const t=this.w,e=t.globals,i=this.dimYAxis.getyAxisLabelsCoords(),s=this.dimYAxis.getyAxisTitleCoords();e.isSlopeChart&&(this.datalabelsCoords=this.dimHelpers.getDatalabelsRect()),t.layout.yLabelsCoords=[],t.layout.yTitleCoords=[],t.config.yaxis.map((e,a)=>{t.layout.yLabelsCoords.push({width:i[a].width,index:a}),t.layout.yTitleCoords.push({width:s[a].width,index:a})}),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();const a=this.dimXAxis.getxAxisLabelsCoords(),r=this.dimXAxis.getxAxisGroupLabelsCoords(),o=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(a,o,r),t.layout.translateXAxisY=t.layout.rotateXLabels?this.xAxisHeight/8:-4,t.layout.translateXAxisX=t.layout.rotateXLabels&&t.axisFlags.isXNumeric&&t.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,t.globals.isBarHorizontal&&(t.layout.rotateXLabels=!1,t.layout.translateXAxisY=(parseInt(t.config.xaxis.labels.style.fontSize,10)||12)/1.5*-1),t.layout.translateXAxisY=t.layout.translateXAxisY+t.config.xaxis.labels.offsetY,t.layout.translateXAxisX=t.layout.translateXAxisX+t.config.xaxis.labels.offsetX;let n=this.yAxisWidth,l=this.xAxisHeight;t.layout.xAxisLabelsHeight=this.xAxisHeight-o.height,t.layout.xAxisGroupLabelsHeight=t.layout.xAxisLabelsHeight-a.height,t.layout.xAxisLabelsWidth=this.xAxisWidth,t.layout.xAxisHeight=this.xAxisHeight;let c=10;("radar"===t.config.chart.type||this.isSparkline)&&(n=0,l=0),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||"treemap"===t.config.chart.type)&&(n=0,l=0,c=0),this.isSparkline||"treemap"===t.config.chart.type||this.dimXAxis.additionalPaddingXLabels(a);const h=()=>{t.layout.translateX=n+this.datalabelsCoords.width,t.layout.gridHeight=e.svgHeight-this.lgRect.height-l-(this.isSparkline||"treemap"===t.config.chart.type?0:t.layout.rotateXLabels?10:15),t.layout.gridWidth=e.svgWidth-n-2*this.datalabelsCoords.width};switch("top"===t.config.xaxis.position&&(c=t.layout.xAxisHeight-t.config.xaxis.axisTicks.height-5),t.config.legend.position){case"bottom":t.layout.translateY=c,h();break;case"top":t.layout.translateY=this.lgRect.height+c,h();break;case"left":t.layout.translateY=c,t.layout.translateX=this.lgRect.width+n+this.datalabelsCoords.width,t.layout.gridHeight=e.svgHeight-l-12,t.layout.gridWidth=e.svgWidth-this.lgRect.width-n-2*this.datalabelsCoords.width;break;case"right":t.layout.translateY=c,t.layout.translateX=n+this.datalabelsCoords.width,t.layout.gridHeight=e.svgHeight-l-12,t.layout.gridWidth=e.svgWidth-this.lgRect.width-n-2*this.datalabelsCoords.width-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(s,i);new Ce(this.w,{theme:this.theme}).setYAxisXPosition(i,s)}setDimensionsForNonAxisCharts(){const t=this.w,e=t.globals,i=t.config;let s=0;if(t.config.legend.show&&!t.config.legend.floating&&(s=20),"unit"===i.chart.type||"icicle"===i.chart.type){const a=i.legend.show&&!i.legend.floating,r=i.legend.position;let o=0,n=0;return a&&("bottom"===r||"top"===r?o=this.lgRect.height:n=this.lgRect.width+s),t.layout.gridWidth=e.svgWidth-n,t.layout.gridHeight=e.svgHeight-o,t.layout.translateX="left"===r?n:0,void(t.layout.translateY="top"===r?o:0)}const a="sunburst"===i.chart.type?"sunburst":"pie"===i.chart.type||"polarArea"===i.chart.type||"donut"===i.chart.type?"pie":"radialBar",r=i.plotOptions[a].offsetY,o=i.plotOptions[a].offsetX;if(!i.legend.show||i.legend.floating)return t.layout.gridHeight=e.svgHeight,t.layout.gridWidth=Math.min(e.svgWidth||0,t.layout.gridHeight),t.layout.translateY=r,void(t.layout.translateX=o+(e.svgWidth-t.layout.gridWidth)/2);switch(i.legend.position){case"bottom":t.layout.gridHeight=e.svgHeight-this.lgRect.height,t.layout.gridWidth=e.svgWidth,t.layout.translateY=r-10,t.layout.translateX=o+(e.svgWidth-t.layout.gridWidth)/2;break;case"top":t.layout.gridHeight=e.svgHeight-this.lgRect.height,t.layout.gridWidth=e.svgWidth,t.layout.translateY=this.lgRect.height+r+10,t.layout.translateX=o+(e.svgWidth-t.layout.gridWidth)/2;break;case"left":t.layout.gridWidth=e.svgWidth-this.lgRect.width-s,t.layout.gridHeight="auto"!==i.chart.height?e.svgHeight:t.layout.gridWidth,t.layout.translateY=r,t.layout.translateX=o+this.lgRect.width+s;break;case"right":t.layout.gridWidth=e.svgWidth-this.lgRect.width-s-5,t.layout.gridHeight="auto"!==i.chart.height?e.svgHeight:t.layout.gridWidth,t.layout.translateY=r,t.layout.translateX=o+10;break;default:throw new Error("Legend position not supported")}}conditionalChecksForAxisCoords(t,e,i){const s=this.w,a=s.labelData.hasXaxisGroups?2:1,r=i.height+t.height+e.height,o=s.axisFlags.isMultiLineX?1.2:lt,n=s.layout.rotateXLabels?22:10,l=s.layout.rotateXLabels&&"bottom"===s.config.legend.position?10:0;this.xAxisHeight=r*o+a*n+l,this.xAxisWidth=t.width,this.xAxisHeight-e.height>s.config.xaxis.labels.maxHeight&&(this.xAxisHeight=s.config.xaxis.labels.maxHeight),s.config.xaxis.labels.minHeight&&this.xAxisHeight<s.config.xaxis.labels.minHeight&&(this.xAxisHeight=s.config.xaxis.labels.minHeight),s.config.xaxis.floating&&(this.xAxisHeight=0);let c=0,h=0;s.config.yaxis.forEach(t=>{c+=t.labels.minWidth,h+=t.labels.maxWidth}),this.yAxisWidth<c&&(this.yAxisWidth=c),this.yAxisWidth>h&&(this.yAxisWidth=h)}}const Vi=1e3,qi=6e4,Zi=36e5,Ki=24*Zi,Ji=7*Ki,Qi=30*Ki,ts=365*Ki,es=10/86400,is=[{unit:"second",step:1,approxMs:Vi},{unit:"second",step:5,approxMs:5e3},{unit:"second",step:15,approxMs:15e3},{unit:"second",step:30,approxMs:3e4},{unit:"minute",step:1,approxMs:qi},{unit:"minute",step:5,approxMs:3e5},{unit:"minute",step:15,approxMs:9e5},{unit:"minute",step:30,approxMs:18e5},{unit:"hour",step:1,approxMs:Zi},{unit:"hour",step:3,approxMs:3*Zi},{unit:"hour",step:6,approxMs:6*Zi},{unit:"hour",step:12,approxMs:12*Zi},{unit:"day",step:1,approxMs:Ki},{unit:"day",step:2,approxMs:2*Ki},{unit:"week",step:1,approxMs:Ji},{unit:"week",step:2,approxMs:2*Ji},{unit:"month",step:1,approxMs:Qi},{unit:"month",step:3,approxMs:7776e6},{unit:"month",step:6,approxMs:15552e6},{unit:"year",step:1,approxMs:ts},{unit:"year",step:2,approxMs:63072e6},{unit:"year",step:5,approxMs:15768e7},{unit:"year",step:10,approxMs:31536e7},{unit:"year",step:25,approxMs:7884e8},{unit:"year",step:50,approxMs:15768e8},{unit:"year",step:100,approxMs:31536e8}];class ss{constructor(t,e){this.w=t,this.ctx=e,this.tickInterval=null,this.timeScaleArray=[],this.utc=t.config.xaxis.labels.datetimeUTC}calculateTimeScaleTicks(t,e){const i=this.w;if(i.globals.allSeriesCollapsed)return i.labelData.labels=[],i.labelData.timescaleLabels=[],this.timeScaleArray=[],[];const s=e-t,a=s/Ki;i.interact.disableZoomIn=!1,i.interact.disableZoomOut=!1,a<es?i.interact.disableZoomIn=!0:a>5e4&&(i.interact.disableZoomOut=!0);const r=Number.isFinite(i.config.xaxis.tickAmount)?i.config.xaxis.tickAmount:10;this.tickInterval=function(t,e){(!Number.isFinite(e)||e<=0)&&(e=10);if(t<=0)return is[0];const i=t/e;let s=is[0],a=1/0;for(const t of is){const e=Math.abs(Math.log(t.approxMs/i));e<a&&(a=e,s=t)}return s}(s,r);const o=this.generateBaseTicks(t,e,this.tickInterval);return this.timeScaleArray=o,o}generateBaseTicks(t,e,i){const s=this.w,a=new S(s),r=this.utc,o=s.layout.gridWidth,n=e-t,l=[];let c=a.ceilToBoundary(t,i.unit,i.step,r),h=0;for(;c<=e&&h<5e3;){const e=a.getDateFields(c,r),s=n>0?(c-t)/n*o:0;l.push({timestamp:c,position:s,unit:i.unit,year:e.year,month:e.month+1,day:e.date,hour:e.hour,minute:e.minute,second:e.second,value:c}),c=a.addInterval(c,i.unit,i.step,r),h++}return l}recalcDimensionsBasedOnFormat(t){const e=this.w,i=this.formatDates(t),s=this.removeOverlappingTS(i);e.labelData.timescaleLabels=s.slice();const a=new ji(this.w,this.ctx).plotCoords();this.ctx._writeLayoutCoords(a.layout)}formatDates(t){const e=this.w,i=new S(e),s=e.config.xaxis.labels.format,a=e.config.xaxis.labels.datetimeFormatter,r=this.utc,o=(t,e=2)=>String(t).padStart(e,"0"),n=s||this._effectiveFormat(t,a);return t.map(t=>{const e=i.getDate(t.timestamp),s=i.formatDate(e,n);return{dateString:`${t.year}-${o(t.month)}-${o(t.day)}T${o(t.hour)}:${o(t.minute)}:${o(t.second)}.000${r?"Z":""}`,position:t.position,value:s,unit:t.unit,year:t.year,month:t.month}})}_effectiveFormat(t,e){if(0===t.length)return e.day||"dd MMM";const i=this.tickInterval&&this.tickInterval.unit||t[0].unit,s=e["week"===i?"day":i]||e.day||"dd MMM",a=t[0],r=t[t.length-1],o=a.year!==r.year,n=o||a.month!==r.month||a.day!==r.day,l=/y/i.test(s),c=/M/.test(s),h=/d/i.test(s);if("month"===i||"week"===i)return o&&!l?s+" yyyy":s;if("day"===i)return o&&!l?s+" yyyy":s;if("hour"===i||"minute"===i||"second"===i){if(n&&!h&&!c){return(o?"dd MMM yyyy":"dd MMM")+" "+s}return s}return s}removeOverlappingTS(t){if(0===t.length)return[];const e=this.w,i=new ae(e);let s,a=!1;t[0].value&&t.every(e=>e.value.length===t[0].value.length)&&(a=!0,s=i.getTextRects(t[0].value,e.config.xaxis.labels.style.fontSize).width);let r=0;return t.map((o,n)=>{if(0===n)return o;if(!e.config.xaxis.labels.hideOverlappingLabels)return o;const l=a?s:i.getTextRects(t[r].value,e.config.xaxis.labels.style.fontSize).width,c=t[r].position;return o.position>c+l+10?(r=n,o):null}).filter(t=>null!==t)}}class as{constructor(t,e,i){this.w=e,this.ctx=i,this.el=t}setupElements(){var t;const{globals:e,config:i}=this.w,s=i.chart.type,a=!N.includes(s)&&it(s);e.axisCharts=R.includes(s)||a,e.xyCharts=E.includes(s)||a,e.isBarHorizontal=["bar","rangeBar","boxPlot","violin"].includes(s)&&i.plotOptions.bar.horizontal,e.isSlopeChart=!!i.plotOptions.line.isSlopeChart,e.chartClass=`.apexcharts${e.chartID}`,this.w.dom.baseEl=this.el,this.w.dom.elWrap=y.createElementNS("http://www.w3.org/1999/xhtml","div");const r=!1===(null==(t=i.chart.animations)?void 0:t.respectReducedMotion);ae.setAttrs(this.w.dom.elWrap,{id:e.chartClass.substring(1),class:`apexcharts-canvas ${e.chartClass.substring(1)}`+(r?" apexcharts-ignore-reduced-motion":"")}),this.el.appendChild(this.w.dom.elWrap);const o=globalThis.SVG;if(this.w.dom.Paper=o().addTo(this.w.dom.elWrap),this.w.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:`translate(${i.chart.offsetX}, ${i.chart.offsetY})`}),this.w.dom.Paper.node.style.background="dark"!==i.theme.mode||i.chart.background?"light"!==i.theme.mode||i.chart.background?i.chart.background:"#fff":"#343A3F",this.setSVGDimensions(),this.w.dom.elLegendForeign=y.createElementNS(xt,"foreignObject"),ae.setAttrs(this.w.dom.elLegendForeign,{x:0,y:0,width:e.svgWidth,height:e.svgHeight}),this.w.dom.elLegendWrap=y.createElementNS("http://www.w3.org/1999/xhtml","div"),this.w.dom.elLegendWrap.classList.add("apexcharts-legend"),this.w.dom.elWrap.appendChild(this.w.dom.elLegendWrap),this.w.dom.Paper.node.appendChild(this.w.dom.elLegendForeign),i.chart.accessibility.enabled&&i.chart.accessibility.announcements.enabled){const t=y.createElement("div");t.className="apexcharts-sr-status",t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-atomic","true"),this.w.dom.elWrap.appendChild(t)}if(i.chart.accessibility.enabled){const t=this.getAccessibleChartLabel(),e=i.chart.accessibility.keyboard.enabled&&i.chart.accessibility.keyboard.navigation.enabled?"application":"img";if(this.w.dom.Paper.attr({role:e,"aria-label":t}),i.chart.accessibility.description){const t=y.createElementNS(xt,"desc");t.textContent=i.chart.accessibility.description,this.w.dom.Paper.node.insertBefore(t,this.w.dom.elLegendForeign.nextSibling)}}this.w.dom.elGraphical=this.w.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}),this.w.dom.elDefs=this.w.dom.Paper.defs(),this.w.dom.Paper.add(this.w.dom.elGraphical),this.w.dom.elGraphical.add(this.w.dom.elDefs)}_classifySeriesByType(t){const{w:e}=this,{config:i,globals:s}=e,a={line:{series:[],i:[]},area:{series:[],i:[]},scatter:{series:[],i:[]},bubble:{series:[],i:[]},bar:{series:[],i:[]},candlestick:{series:[],i:[]},boxPlot:{series:[],i:[]},violin:{series:[],i:[]},rangeBar:{series:[],i:[]},rangeArea:{series:[],seriesRangeEnd:[],i:[]}},r={},o=i.chart.type||"line";let n=null,l=0;return this.w.seriesData.series.forEach((i,s)=>{var c,h;const d="column"===(null==(c=t[s])?void 0:c.type)?"bar":(null==(h=t[s])?void 0:h.type)||("column"===o?"bar":o),p=a;p[d]?("rangeArea"===d?(p[d].series.push(this.w.rangeData.seriesRangeStart[s]),p[d].seriesRangeEnd.push(this.w.rangeData.seriesRangeEnd[s])):p[d].series.push(i),p[d].i.push(s),"bar"===d&&(e.globals.columnSeries=a.bar)):z.includes(d)?n=d:it(d)?(r[d]||(r[d]={series:[],i:[]}),r[d].series.push(i),r[d].i.push(s)):console.warn(`You have specified an unrecognized series type (${d}).`),o!==d&&"scatter"!==d&&l++}),l>0&&(n&&console.warn(`Chart or series type ${n} cannot appear with other chart or series types.`),a.bar.series.length>0&&i.plotOptions.bar.horizontal&&(l-=a.bar.series.length,a.bar={series:[],i:[]},e.globals.columnSeries={series:[],i:[]},console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"))),s.comboCharts||(s.comboCharts=l>0),{seriesTypes:a,customBuckets:r}}plotChartType(t,e){const{w:i,ctx:s}=this,a=s.renderer&&"canvas"===s.renderer.kind;a&&(s.renderer.beginSeries(),i.globals.barCanvasCoords=null);const{seriesTypes:r,customBuckets:o}=this._classifySeriesByType(t),n=this._instantiateSeriesRenderers(r,e),l=this._assembleSeriesGraphics(r,o,n,e);if(a){new Jt(i).showDelayedElements();const t=s.renderer;if(t&&t._repaintHostInPlace){t._repaintHostInPlace=!1;const e=this.w.dom.elGraphical.node.querySelector(".apexcharts-canvas-series-wrap");if(e&&t.canRepaintInPlace&&t.canRepaintInPlace()){t.repaintInPlace();return(Array.isArray(l)?l:[l]).forEach(t=>{t&&t.node&&e.appendChild(t.node)}),[]}}const e=s.renderer.present();if(e){const t=new ae(i).group({class:"apexcharts-canvas-series-wrap"});t.add(e);return(Array.isArray(l)?l:[l]).forEach(e=>{e&&t.add(e)}),t}}return l}_instantiateSeriesRenderers(t,e){const{w:i,ctx:s}=this,{config:a,globals:r}=i,o=t.line.series.length>0||t.area.series.length>0||t.scatter.series.length>0||t.bubble.series.length>0||t.rangeArea.series.length>0||!r.comboCharts&&["line","area","scatter","bubble","rangeArea"].includes(a.chart.type)?new(rt("line",a.chart.requestedType))(s.w,s,e):null,n=t.candlestick.series.length>0||t.boxPlot.series.length>0||!r.comboCharts&&["candlestick","boxPlot"].includes(a.chart.type)?new(rt("candlestick"))(s.w,s,e):null,l=t.violin.series.length>0||!r.comboCharts&&"violin"===a.chart.type?new(rt("violin",a.chart.requestedType))(s.w,s,e):null,c=!r.comboCharts&&["pie","donut","polarArea"].includes(a.chart.type);s.pie=c?new(rt("pie"))(s.w,s):null;const h=t.rangeBar.series.length>0||!r.comboCharts&&"rangeBar"===a.chart.type;return s.rangeBar=h?new(rt("rangeBar",a.chart.requestedType))(s.w,s,e):null,{line:o,boxCandlestick:n,violin:l}}_assembleSeriesGraphics(t,e,i,s){const{w:a,ctx:r}=this,{config:o,globals:n}=a,{line:l,boxCandlestick:c,violin:h}=i;let d=[];if(n.comboCharts){const i=new gt(this.w);if(t.area.series.length>0&&d.push(...i.drawSeriesByGroup(t.area,n.areaGroups,"area",l)),t.bar.series.length>0)if(o.chart.stacked){const e=new(rt("barStacked"))(r.w,r,s);d.push(e.draw(t.bar.series,t.bar.i))}else r.bar=new(rt("bar"))(r.w,r,s),d.push(r.bar.draw(t.bar.series,t.bar.i));if(t.rangeArea.series.length>0&&d.push(l.draw(t.rangeArea.series,"rangeArea",t.rangeArea.i,t.rangeArea.seriesRangeEnd)),t.line.series.length>0&&d.push(...i.drawSeriesByGroup(t.line,n.lineGroups,"line",l)),t.candlestick.series.length>0&&d.push(c.draw(t.candlestick.series,"candlestick",t.candlestick.i)),t.boxPlot.series.length>0&&d.push(c.draw(t.boxPlot.series,"boxPlot",t.boxPlot.i)),t.violin.series.length>0&&d.push(h.draw(t.violin.series,"violin",t.violin.i)),t.rangeBar.series.length>0&&d.push(r.rangeBar.draw(t.rangeBar.series,t.rangeBar.i)),t.scatter.series.length>0){const e=new(rt("line"))(r.w,r,s,!0);d.push(e.draw(t.scatter.series,"scatter",t.scatter.i))}if(t.bubble.series.length>0){const e=new(rt("line"))(r.w,r,s,!0);d.push(e.draw(t.bubble.series,"bubble",t.bubble.i))}Object.keys(e).forEach(t=>{const i=e[t];if(i.series.length>0){const e=new(rt(t))(r.w,r,s);d.push(e.draw(i.series,t,i.i))}})}else{const t=o.chart.type;switch(t){case"line":d=l.draw(this.w.seriesData.series,"line");break;case"area":d=l.draw(this.w.seriesData.series,"area");break;case"bar":if(o.chart.stacked){const t=new(rt("barStacked",o.chart.requestedType))(r.w,r,s);d=t.draw(this.w.seriesData.series)}else r.bar=new(rt("bar",o.chart.requestedType))(r.w,r,s),d=r.bar.draw(this.w.seriesData.series);break;case"candlestick":d=c.draw(this.w.seriesData.series,"candlestick");break;case"boxPlot":d=c.draw(this.w.seriesData.series,t);break;case"violin":d=h.draw(this.w.seriesData.series,"violin");break;case"rangeBar":d=r.rangeBar.draw(this.w.seriesData.series);break;case"rangeArea":d=l.draw(this.w.rangeData.seriesRangeStart,"rangeArea",void 0,this.w.rangeData.seriesRangeEnd);break;case"heatmap":{const t=new(rt("heatmap"))(r.w,r,s);d=t.draw(this.w.seriesData.series);break}case"treemap":{const t=new(rt("treemap"))(r.w,r);d=t.draw();break}case"unit":{const t=new(rt("unit",this.w.config.chart.requestedType))(r.w,r);d=t.draw(this.w.seriesData.series);break}case"sunburst":{const t=new(rt("sunburst",this.w.config.chart.requestedType))(r.w,r);d=t.draw(this.w.seriesData.series);break}case"icicle":{const t=new(rt("icicle"))(r.w,r);d=t.draw(this.w.seriesData.series);break}case"pie":case"donut":case"polarArea":d=r.pie.draw(this.w.seriesData.series);break;case"radialBar":{const t=new(rt("radialBar"))(r.w,r);d=t.draw(this.w.seriesData.series);break}case"radar":{const t=new(rt("radar"))(r.w,r);d=t.draw(this.w.seriesData.series);break}default:if(it(t)){const e=new(rt(t))(r.w,r,s);d=e.draw(this.w.seriesData.series,t)}else{if(!l)throw new Error(`ApexCharts: no renderer for chart.type "${t}".`);d=l.draw(this.w.seriesData.series)}}}return d}_extractDimensionUnit(t){return String(t).split(/[0-9]+/g).pop()}setSVGDimensions(){var t;const{globals:e,config:i}=this.w;i.chart.width=i.chart.width||"100%",i.chart.height=i.chart.height||"auto";const s=i.chart.width,a=i.chart.height;e.svgWidth=NaN,e.svgHeight=NaN;const r=A.getDimensions(this.el),o=this._extractDimensionUnit(s);"%"===o?A.isNumber(r[0])&&(e.svgWidth=r[0]*parseInt(s,10)/100):"px"!==o&&""!==o||(e.svgWidth=parseInt(s,10));const n=this._extractDimensionUnit(a);if("auto"!==a&&""!==a)if("%"===n){const t=A.getDimensions(this.el.parentNode);e.svgHeight=t[1]*parseInt(a,10)/100}else e.svgHeight=parseInt(a,10);else e.svgHeight=e.axisCharts?e.svgWidth/1.61:e.svgWidth/1.2;if(this._applyWeaveReservation(e),e.svgWidth=Math.max(e.svgWidth,0),e.svgHeight=Math.max(e.svgHeight,0),ae.setAttrs(this.w.dom.Paper.node,{width:e.svgWidth,height:e.svgHeight}),"%"!==n&&d.isBrowser()){const s=e.axisCharts&&(i.grid.show||i.dataLabels.enabled||i.xaxis.labels.show||i.xaxis.axisBorder.show||i.xaxis.axisTicks.show||i.yaxis.some(t=>t.show&&(t.labels.show||t.axisBorder.show||t.axisTicks.show))),a=i.chart.sparkline.enabled||!s?0:i.chart.parentHeightOffset,r=this.w.dom.Paper.node;(null==(t=r.parentNode)?void 0:t.parentNode)&&(r.parentNode.parentNode.style.minHeight=`${e.svgHeight+a}px`)}this.w.dom.elWrap.style.width=`${e.svgWidth}px`,this.w.dom.elWrap.style.height=`${e.svgHeight}px`,e.lastResizeSignature=this.getResizeSignature()}_applyWeaveReservation(t){const e=this.ctx&&this.ctx.weave;if(!e||"function"!=typeof e.reservedBox)return;const i=e.reservedBox(),s=i.left+i.right,a=i.top+i.bottom;(s||a)&&(s&&Number.isFinite(t.svgWidth)&&(t.svgWidth-=Math.min(s,t.svgWidth/2)),a&&Number.isFinite(t.svgHeight)&&(t.svgHeight-=Math.min(a,t.svgHeight/2)))}getResizeSignature(){const{config:t}=this.w,e=(t.chart.width||"100%").toString().trim(),i=(t.chart.height||"auto").toString().trim();let s=0,a=0;e.endsWith("%")&&(s=A.getDimensions(this.el)[0]||0),i.endsWith("%")&&(a=A.getDimensions(this.el.parentNode)[1]||0);const r={w:Math.round(s),h:Math.round(a)};return t.responsive&&t.responsive.length&&d.isBrowser()&&(r.iw=window.innerWidth),r}shiftGraphPosition(){const{globals:t}=this.w,{translateY:e,translateX:i}=t;ae.setAttrs(this.w.dom.elGraphical.node,{transform:`translate(${i}, ${e})`})}resizeNonAxisCharts(){var t,e,i,s,a,r,o,n,l,c;const{w:h}=this,p=h.config.chart.height?String(h.config.chart.height):"",u=""!==p&&"auto"!==p,g=p.includes("%");let x=0,f=h.config.chart.sparkline.enabled?1:15;f+=h.layout.gridPad.bottom,["top","bottom"].includes(h.config.legend.position)&&h.config.legend.show&&!h.config.legend.floating&&(x=(null!=(e=null==(t=this.ctx.legend)?void 0:t.legendHelpers.getLegendDimensions().clwh)?e:0)+7);const m=h.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie, .apexcharts-sunburst"),b=h.globals.pieExternalLabelMarginY||0;let y=b>0?2*h.globals.radialSize+2*b:2.05*h.globals.radialSize;const v="sunburst"===h.config.chart.type?"sunburst":"pie"===h.config.chart.type||"donut"===h.config.chart.type||"polarArea"===h.config.chart.type?"pie":"radialBar",w=Math.abs(h.config.plotOptions[v].endAngle-h.config.plotOptions[v].startAngle);if(m&&!h.config.chart.sparkline.enabled&&w<360){const t=A.getBoundingClientRect(this.w.dom.Paper.node);let e=1/0,c=-1/0;const p=i=>{var s,a,r,o;if(null==(s=i.classList)?void 0:s.contains("apexcharts-radialbar-hollow"))return;const n=null==(r=null==(a=i.tagName)?void 0:a.toLowerCase)?void 0:r.call(a);if("text"===n||"tspan"===n)return;const l=Array.from(null!=(o=i.children)?o:[]);if(l.length>0)return void l.forEach(t=>p(t));const h=A.getBoundingClientRect(i);if(h.bottom-h.top>0){const i=h.top-t.top,s=h.bottom-t.top;i<e&&(e=i),s>c&&(c=s)}},u=null==(i=h.globals.circleGeometry)?void 0:i.y;if(u?(e=h.layout.translateY+u[0]-b,c=h.layout.translateY+u[1]+b):Array.from(null!=(s=m.children)?s:[]).forEach(t=>p(t)),Number.isFinite(e)||(e=0),!Number.isFinite(c)){const e=A.getBoundingClientRect(m);c=e.bottom-t.top}const v=Math.max(f,.2*h.globals.radialSize),w=Math.max(v-e,0);0!==w&&(h.layout.translateY=(null!=(a=h.layout.translateY)?a:0)+w,ae.setAttrs(this.w.dom.elGraphical.node,{transform:`translate(${null!=(r=h.layout.translateX)?r:0}, ${h.layout.translateY})`}),c+=w),y=c>0?c:2.05*h.globals.radialSize;const S=Math.max(v,e),C=Math.ceil(y+x+S),k=null!=(o=h.config.chart.offsetY)?o:0,M=C+Math.max(k,0);if(!g){if(this.w.dom.elLegendForeign&&this.w.dom.elLegendForeign.setAttribute("height",String(M)),this.w.dom.elWrap.style.height=`${M}px`,ae.setAttrs(this.w.dom.Paper.node,{height:C}),d.isBrowser()){const t=null==(n=this.w.dom.Paper.node.parentNode)?void 0:n.parentNode;t&&(t.style.minHeight=`${M}px`)}h.globals.svgHeight=C,"bottom"===h.config.legend.position&&h.config.legend.show&&!h.config.legend.floating&&(null==(l=this.ctx.legend)||l.setLegendWrapXY(20,0))}return}if(!(h.globals.radialSize>0))return;const S=Math.ceil(y+this.w.layout.translateY+x+f);if(!u&&(this.w.dom.elLegendForeign&&this.w.dom.elLegendForeign.setAttribute("height",String(S)),this.w.dom.elWrap.style.height=`${S}px`,ae.setAttrs(this.w.dom.Paper.node,{height:S}),d.isBrowser())){const t=null==(c=this.w.dom.Paper.node.parentNode)?void 0:c.parentNode;t&&(t.style.minHeight=`${S}px`)}}coreCalculations(){new Ae(this.w).init()}resetGlobals(){const t=()=>this.w.config.series.map(()=>[]),e=new pt,{globals:i}=this.w,s=this.w.axisFlags.dataWasParsed;e.initGlobalVars(i),i.seriesXvalues=t(),i.seriesYvalues=t(),s&&(this.w.axisFlags.dataWasParsed=!0)}isMultipleY(){return!!(Array.isArray(this.w.config.yaxis)&&this.w.config.yaxis.length>1)&&(this.w.globals.isMultipleYAxis=!0,!0)}xySettings(){const{w:t}=this;let e=null;if(t.globals.axisCharts){if("back"===t.config.xaxis.crosshairs.position&&new _e(this.w).drawXCrosshairs(),"back"===t.config.yaxis[0].crosshairs.position&&new _e(this.w).drawYCrosshairs(),"datetime"===t.config.xaxis.type&&void 0===t.config.xaxis.labels.formatter){this.ctx.timeScale=new ss(this.w,this.ctx);let e=[];isFinite(t.globals.minX)&&isFinite(t.globals.maxX)&&!t.globals.isBarHorizontal?e=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minX,t.globals.maxX):t.axisFlags.isRangeBar&&(e=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minY,t.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(e)}e=new gt(this.w).getCalculatedRatios()}return e}updateSourceChart(t){this.ctx.w.interact.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:t.w.globals.minX,max:t.w.globals.maxX}}}},!1,!1)}setupBrushHandler(){const{ctx:t,w:e}=this;if(e.config.chart.brush.enabled&&"function"!=typeof e.config.chart.events.selection){const i=Array.isArray(e.config.chart.brush.targets)?e.config.chart.brush.targets:[e.config.chart.brush.target];i.forEach(e=>{const i=t.constructor.getChartByID(e);if(!i)return void console.warn(`ApexCharts: brush target "${e}" was not found. Ensure the target chart is rendered (and its chart.id matches) before the brush chart.`);i.w.globals.brushSource=this.ctx;const s=i.w.config.chart.events;for(const e of["zoomed","scrolled"])("function"!=typeof s[e]||s[e].__apexBrush)&&(s[e]=Object.assign(()=>this.updateSourceChart(i),{__apexBrush:t}))}),e.config.chart.events.selection=(e,s)=>{i.forEach(e=>{const i=t.constructor.getChartByID(e);i&&i.ctx.updateHelpers._updateOptions({xaxis:{min:s.xaxis.min,max:s.xaxis.max}},!1,!1,!1,!1)})}}}unhookBrush(){var t,e;const{ctx:i,w:s}=this,a=s.config.chart.brush;if(a.enabled)for(const s of Array.isArray(a.targets)?a.targets:[a.target]){const a=null==(t=i.constructor.getChartByID(s))?void 0:t.w;if(!a)continue;const r=a.config.chart.events;for(const t of["zoomed","scrolled"])(null==(e=r[t])?void 0:e.__apexBrush)===i&&(r[t]=void 0);a.globals.brushSource===i&&(a.globals.brushSource=void 0)}}getAccessibleChartLabel(){const t=this.w,e=t.config;if(e.chart.accessibility&&e.chart.accessibility.description)return e.chart.accessibility.description;const i=e.chart.type,s=[];if(e.title.text)s.push(`${e.title.text}. ${i} chart`),e.subtitle.text&&s.push(e.subtitle.text);else{const a=Array.isArray(t.seriesData.seriesNames)&&t.seriesData.seriesNames.length?t.seriesData.seriesNames.filter(Boolean):Array.isArray(e.series)?e.series.map(t=>"object"==typeof t&&null!==t?t.name:null).filter(Boolean):[],r=t.seriesData.series.length||(e.series?e.series.length:0);a.length?s.push(`${i} chart with ${r} data series: ${a.join(", ")}`):s.push(`${i} chart with ${r} data series`)}return s.join(". ")}}const rs="__apexcharts_series_transforms__";function os(t){return t&&globalThis[rs][t]||null}function ns(t,e,i={}){const{module:s=`features/${e}`,entry:a,scripts:r=[`features/${e}.js`],tail:o}=i,n=r.map(t=>`<script src='.../dist/${t}'>`).join(" and ");globalThis.console.warn(`ApexCharts: ${t} requires the ${e} feature, which is not in this bundle. Bundler: import 'apexcharts/${s}'`+(a?` (or from 'apexcharts/${a}')`:"")+`. Script tag: add ${n} after the ApexCharts script, or load apexcharts.full.min.js instead.`+(o?` ${o}`:""))}function ls(t,e,i,s,a,r=null,o={}){var n,l,c;const h=e&&"object"==typeof e,d=h&&null!=(l=null!=(n=e.x)?n:e.name)?l:"",p=Number(h?null!=(c=e.y)?c:e.value:e),u={name:String(d),value:isNaN(p)?null:p,color:h&&e.color?e.color:void 0,_key:`${a}/${i}:${d}`};if(s&&!u.color&&(u.color=s[i%s.length]),o.keepDatum&&(u._datum=e),h&&Array.isArray(e.children)&&e.children.length)u.children=e.children.map((e,i)=>ls(t,e,i,null,u._key,r,o));else if(h&&null!=e.drilldown&&!1!==o.expandDrilldown){const i=r||new Set;if(!i.has(e.drilldown)){const s=function(t,e){const i=t.config.drilldown;return(i&&Array.isArray(i.series)?i.series:[]).find(t=>t&&t.id===e)}(t,e.drilldown);if(s&&Array.isArray(s.data)&&s.data.length){const a=new Set(i);a.add(e.drilldown);const r=Array.isArray(s.colors)?s.colors:null;u.children=s.data.map((e,i)=>ls(t,e,i,r,u._key,a,o))}}}return u}function cs(t){t.children&&t.children.length&&(t.children.forEach(t=>cs(t)),(null==t.value||isNaN(t.value))&&(t.value=t.children.reduce((t,e)=>t+Math.max(0,e.value||0),0))),(null==t.value||isNaN(t.value))&&(t.value=0)}function hs(t){var e,i,s,a;return!!(null==(a=null==(s=null==(i=null==(e=null==t?void 0:t.config)?void 0:e.plotOptions)?void 0:i.treemap)?void 0:s.nested)?void 0:a.drilldownAsLevels)}function ds(t,e){var i,s,a;const r=null==(a=null==(s=null==(i=null==t?void 0:t.config)?void 0:i.plotOptions)?void 0:s.treemap)?void 0:a.nested;return(!r||!1!==r.enabled)&&function(t,e={}){if(!Array.isArray(t))return!1;const i=!1!==e.drilldown;for(let e=0;e<t.length;e++){const s=t[e]&&t[e].data;if(Array.isArray(s))for(let t=0;t<s.length;t++){const e=s[t];if(e&&"object"==typeof e){if(Array.isArray(e.children)&&e.children.length)return!0;if(i&&null!=e.drilldown)return!0}}}return!1}(e,{drilldown:hs(t)})}function ps(t){const e=t._datum;if(e&&"object"==typeof e){const i=l(n({},e),{x:t.name,y:t.value});return delete i.children,i}return{x:t.name,y:t.value}}function us(t,e){const i=function(t,e,i={}){const s=e||t.config.series;return Array.isArray(s)?s.map((e,s)=>{var a,r;const o=e&&Array.isArray(e.data)?e.data:[],n=`${s}:${null!=(a=null==e?void 0:e.name)?a:""}`;return{name:String(null!=(r=null==e?void 0:e.name)?r:""),value:null,color:(null==e?void 0:e.color)||void 0,_key:n,_seriesIndex:s,children:o.map((e,s)=>ls(t,e,s,null,n,null,i))}}):[]}(t,e,{keepDatum:!0,expandDrilldown:hs(t)});i.forEach(cs);const{leaves:s,maxDepth:a}=function(t){const e=[];let i=0;return t.forEach((t,s)=>{const a=[],r=(t,e,o)=>{t._parent=o,t._depth=e,t._si=s,t._leaf=!(t.children&&t.children.length),e>i&&(i=e),t._leaf?(t._di=a.length,a.push(t)):(t._di=-1,t.children.forEach(i=>r(i,e+1,t)))};r(t,0,null),e.push(a)}),{leaves:e,maxDepth:i}}(i);return{roots:i,leafSeries:e.map((t,e)=>l(n({},t),{data:(s[e]||[]).map(ps)})),maxDepth:a}}globalThis[rs]||(globalThis[rs]={});const gs={boxPlot:!1,violin:!0},xs=t=>Array.isArray(t)?t.join(" "):t,fs={y:null},ms=[void 0,null];function bs(t){var e;if(!t||"object"!=typeof t)return A.parseNumber(t)||0;const i=null!=(e=t.y)?e:t.value;return null!=i?A.parseNumber(i)||0:Array.isArray(t.children)?t.children.reduce((t,e)=>t+Math.max(0,bs(e)),0):0}function ys(t){return"number"==typeof t?t:t instanceof Date?t.getTime():"string"==typeof t&&isNaN(t)?Date.parse(t):+t}class vs{constructor(t,{resetGlobals:e=()=>{},isMultipleY:i=()=>{},highlight:s=()=>null}={}){this.w=t,this.resetGlobals=e,this.isMultipleY=i,this.highlight=s,this._warnedHighlight=!1,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this._warnedFeatures=new Set,this.coreUtils=new gt(this.w),this.activeSeriesIndex=0}getFirstDataPoint(){const t=this.w.config.series;if(this._pinActive||(this.activeSeriesIndex=new Pi(this.w).getActiveConfigSeriesIndex()),null!=this._ownPoint)return this._ownPoint;const e=t[this.activeSeriesIndex];return e&&e.data&&e.data.length>0&&null!==e.data[0]&&void 0!==e.data[0]?e.data[0]:null}isMultiFormat(){return this.isFormatXY()||this.isFormat2DArray()}isFormatXY(){var t;const e=this.getFirstDataPoint();if(!e||void 0===e.x)return!1;const i=null==(t=this.w.config.series[this.activeSeriesIndex])?void 0:t.data;if(i){const t=t=>t&&void 0!==t.x;for(let e=1;e<Math.min(3,i.length);e++)if(!0!==t(i[e])){console.warn(`ApexCharts: series data has mixed formats starting at index ${e}`);break}}return!0}isFormat2DArray(){const t=this.getFirstDataPoint();return t&&Array.isArray(t)}_fast2DArrayParse(t,e){var i,s;const a=t.length;if(0===a)return!1;const r=new Array(a),o=new Array(a);let n=-Number.MAX_VALUE,l=Number.MAX_VALUE,c=1/0,h=!1,d=0,p=!0,u=1/0,g=-1/0,x=!0,f=1/0,m=NaN;for(let e=0;e<a;e++){const i=t[e];if(!Array.isArray(i)||i.length>2)return!1;const s=i[0],a=i[1];if(p)if("number"==typeof s){s==s&&(s<u&&(u=s),s>g&&(g=s));const t=s-m;t>0?t<f&&(f=t):t<0&&(x=!1),m=s}else p=!1;if("number"==typeof a)if(a==a&&a!==1/0&&a!==-1/0){if(a>n&&(n=a),a<l&&(l=a),a<0&&a<c&&(c=a),!Number.isInteger(a)){const t=a<0?-a:a;if(t>=1e-6&&t<1e21){const t=""+a,e=t.indexOf("."),i=-1===e?0:t.length-e-1;i>d&&(d=i)}else d=Math.max(d,A.decimalPlaces(a))}}else h=!0;else{if(null!==a)return!1;h=!0}r[e]=a,o[e]=s}this.twoDSeries=r,this.twoDSeriesX=o,this.w.axisFlags.dataFormatXNumeric=!0;return(null!=(s=(i=this.w.seriesData)._parsedExtrema)?s:i._parsedExtrema=[])[e]={ref:r,len:a,maxY:n,lowestY:l,negMinY:c,hasNulls:h,yDec:d,xref:o,xNumeric:p,minX:u,maxX:g,xSorted:x,minXDiff:f},!0}handleFormat2DArray(t,e){var i;const s=this.w.config,a=t[e].data;if(0===a.length&&this._isCollapsedIndex(e)){const e=(null==(i=t[this.activeSeriesIndex])?void 0:i.data)||[];for(let t=0;t<e.length;t++){const i=Array.isArray(e[t])?e[t][0]:void 0;this.twoDSeriesX.push("datetime"===s.xaxis.type?new Date(i).getTime():i)}return}const r=this._isBoxPlotSeries(e);if(r||"datetime"===s.xaxis.type||!this._fast2DArrayParse(a,e))for(let t=0;t<a.length;t++){const e=a[t]||ms,i=e[0],o=e[1],n=e[2];if(void 0!==o&&(Array.isArray(o)&&4===o.length&&!r?this.twoDSeries.push(A.parseNumber(o[3])):e.length>=5?this.twoDSeries.push(A.parseNumber(e[4])):this.twoDSeries.push(A.parseNumber(o)),this.w.axisFlags.dataFormatXNumeric=!0),"datetime"===s.xaxis.type){const t=new Date(i).getTime();this.twoDSeriesX.push(t)}else this.twoDSeriesX.push(i);this.pushZ(n,t)}}pushZ(t,e){if(void 0===t)return void(this.threeDSeries.length&&this.threeDSeries.push(null));const i="string"==typeof t&&""!==t.trim()?Number(t):t,s=A.isNumber(i);for(;this.threeDSeries.length<e;)this.threeDSeries.push(null);this.threeDSeries.push(s?i:t),s&&(this.w.axisFlags.isDataXYZ=!0)}_isCollapsedIndex(t){const e=this.w.globals;return e.collapsedSeriesIndices.indexOf(t)>-1||e.ancillaryCollapsedSeriesIndices.indexOf(t)>-1}handleFormatXY(t,e){const i=this.w.config,s=this.w.globals,a=new S(this.w),r=t[e].data;let o=e;this._isCollapsedIndex(e)&&(o=this.activeSeriesIndex);const n=t[o].data;for(let t=0;t<r.length;t++){const i=r[t]||fs;if(void 0!==i.y){const t=Array.isArray(i.y)?A.parseNumber(i.y[i.y.length-1]):A.parseNumber(i.y);this.twoDSeries.push(t)}void 0===this.seriesGoals[e]&&(this.seriesGoals[e]=[]),void 0!==i.goals&&Array.isArray(i.goals)?this.seriesGoals[e].push(i.goals):this.seriesGoals[e].push(null),this.pushZ(i.z,t)}for(let t=0;t<n.length;t++){const e=n[t];if(!e){this.twoDSeriesX.push("");continue}const r=e.x,o="string"==typeof r,l=Array.isArray(r),c=!l&&!!a.isValidDate(r);if(o||c)if(o||i.xaxis.convertedCatToNumeric){const t=s.isBarHorizontal&&this.w.axisFlags.isRangeData;"datetime"!==i.xaxis.type||t?(this.fallbackToCategory=!0,this.twoDSeriesX.push(r),isNaN(r)||"category"===this.w.config.xaxis.type||"string"==typeof r||(this.w.axisFlags.isXNumeric=!0)):this.twoDSeriesX.push(a.parseDate(r))}else"datetime"===i.xaxis.type?this.twoDSeriesX.push(r instanceof Date?r.getTime():a.parseDate(r.toString())):(this.w.axisFlags.dataFormatXNumeric=!0,this.w.axisFlags.isXNumeric=!0,this.twoDSeriesX.push(r instanceof Date?r.getTime():parseFloat(r)));else l?(this.fallbackToCategory=!0,this.twoDSeriesX.push(r)):(this.w.axisFlags.isXNumeric=!0,this.w.axisFlags.dataFormatXNumeric=!0,this.twoDSeriesX.push(r))}}handleRangeData(t,e){let i={start:[],end:[],rangeUniques:[]};return this.isFormat2DArray()?i=this.handleRangeDataFormat("array",t,e):this.isFormatXY()&&(i=this.handleRangeDataFormat("xy",t,e)),this.w.rangeData.seriesRangeStart[e]=void 0===i.start?[]:i.start,this.w.rangeData.seriesRangeEnd[e]=void 0===i.end?[]:i.end,this.w.rangeData.seriesRange[e]=i.rangeUniques,this.w.rangeData.seriesRange.forEach(t=>{t&&t.forEach(t=>{const e=t.y,i=e.length;if(!(i<=1))for(let s=0;s<i;s++){const a=e[s],r=a.y1,o=a.y2;for(let n=s+1;n<i;n++){const i=e[n],s=i.y1;if(r<=i.y2&&s<=o){const e=t;e.overlaps.add(a.rangeName),e.overlaps.add(i.rangeName)}}}})}),i}handleCustomRangeData(t,e,i){const s=t[e].data||[],a=[],r=[];for(let t=0;t<s.length;t++){const e=s[t];let o,n;if("function"==typeof i){let s=i(e,t);Array.isArray(s)||(s=[s]);const a=s.map(t=>A.parseNumber(t)).filter(t=>null!==t&&!isNaN(t));o=a.length?Math.min(...a):null,n=a.length?Math.max(...a):null}else{const t=null==e?null:e.y;Array.isArray(t)?(o=A.parseNumber(t[0]),n=A.parseNumber(t[t.length-1])):o=n=A.parseNumber(t)}a.push(o),r.push(n)}this.w.rangeData.seriesRangeStart[e]=a,this.w.rangeData.seriesRangeEnd[e]=r}handleCandleStickBoxData(t,e){let i={o:[],h:[],m:[],l:[],c:[]};return this.isFormat2DArray()?i=this.handleCandleStickBoxDataFormat("array",t,e):this.isFormatXY()&&(i=this.handleCandleStickBoxDataFormat("xy",t,e)),this.w.candleData.seriesCandleO[e]=i.o,this.w.candleData.seriesCandleH[e]=i.h,this.w.candleData.seriesCandleM[e]=i.m,this.w.candleData.seriesCandleL[e]=i.l,this.w.candleData.seriesCandleC[e]=i.c,this.w.candleData.seriesBoxPoints[e]=i.points||[],i}handleViolinData(t,e){var i,s,a,r,o,n,l,c;const h=this.w,d=t[e].data,p=[],u=[],g=[],x=[],f=[],m=[];for(let t=0;t<d.length;t++){const e=d[t],h=null!=(a=null!=(s=null==(i=null==e?void 0:e.y)?void 0:i.density)?s:null==e?void 0:e[1])?a:[],b=null!=(n=null!=(o=null==(r=null==e?void 0:e.y)?void 0:r.points)?o:null==e?void 0:e[2])?n:[],y=this._parseViolinSummary(null!=(c=null==(l=null==e?void 0:e.y)?void 0:l.summary)?c:null==e?void 0:e[3]),v=[],w=[];let S=0,C=null,k=1/0,M=-1/0;for(let t=0;t<h.length;t++){const e=A.parseNumber(h[t][0]),i=A.parseNumber(h[t][1]);null!==e&&null!==i&&(v.push(e),w.push(i),i>S&&(S=i,C=e),e<k&&(k=e),e>M&&(M=e))}const T=[];for(let t=0;t<b.length;t++){const e=A.parseNumber(b[t]);null!==e&&(T.push(e),e<k&&(k=e),e>M&&(M=e))}y&&(y[0]<k&&(k=y[0]),y[4]>M&&(M=y[4])),p.push({values:v,weights:w,maxWeight:S}),u.push(T),g.push(y),x.push(k===1/0?0:k),f.push(M===-1/0?0:M),m.push(null!==C?C:T.length?T[Math.floor(T.length/2)]:0)}h.violinData.seriesViolinDensity[e]=p,h.violinData.seriesViolinPoints[e]=u,h.violinData.seriesViolinSummary[e]=g,h.violinData.seriesViolinMin[e]=x,h.violinData.seriesViolinMax[e]=f,this.twoDSeries=m}_parseViolinSummary(t){if(!Array.isArray(t)||5!==t.length)return null;const e=[];for(let i=0;i<5;i++){const s=A.parseNumber(t[i]);if(null===s||i>0&&s<e[i-1])return null;e.push(s)}return e}handleRangeDataFormat(t,e,i){const s=[],a=[],r=new Map,o=[];if(e[i].data.forEach(t=>{const e=xs(t.x);if(!r.has(e)){const i={x:e,label:t.x,overlaps:new Set,y:[]};r.set(e,i),o.push(i)}}),"array"===t)for(let t=0;t<e[i].data.length;t++)Array.isArray(e[i].data[t])?(s.push(e[i].data[t][1][0]),a.push(e[i].data[t][1][1])):(s.push(e[i].data[t]),a.push(e[i].data[t]));else if("xy"===t)for(let t=0;t<e[i].data.length;t++){const o=Array.isArray(e[i].data[t].y),n=A.randomId(),l=e[i].data[t].x,c={y1:o?e[i].data[t].y[0]:e[i].data[t].y,y2:o?e[i].data[t].y[1]:e[i].data[t].y,rangeName:n},h=this.w.globals;h.seriesRangeName||(h.seriesRangeName={}),h.seriesRangeName[i]||(h.seriesRangeName[i]={}),h.seriesRangeName[i][t]=n;const d=r.get(xs(l));d&&d.y.push(c),s.push(c.y1),a.push(c.y2)}return{start:s,end:a,rangeUniques:o}}_isBoxPlotSeries(t){var e;const i=null==(e=this.w.config.series[t])?void 0:e.type;return"boxPlot"===i||"candlestick"===i?"boxPlot"===i:"boxPlot"===this.w.config.chart.type}handleCandleStickBoxDataFormat(t,e,i){const s=this._isBoxPlotSeries(i),a=[],r=[],o=[],n=[],l=[],c=[],h=e[i].data;let d;if("array"===t){const t=h[0];d=s&&t&&6===t.length||!s&&t&&5===t.length?t=>t.slice(1):t=>Array.isArray(t[1])?t[1]:[]}else d=t=>Array.isArray(t.y)?t.y:[];for(let t=0;t<h.length;t++){const e=d(h[t]);e&&e.length>=2?(a.push(e[0]),r.push(e[1]),s?(o.push(e[2]),n.push(e[3]),l.push(e[4])):(n.push(e[2]),l.push(e[3]))):(a.push(null),r.push(null),o.push(null),n.push(null),l.push(null));const i=h[t]&&h[t].points;c.push(Array.isArray(i)?i:[])}return{o:a,h:r,m:o,l:n,c:l,points:c}}parseDataAxisCharts(t){var e,i,s,a;const r=this.w.config,o=this.w.globals,c=new S(this.w);this.w.seriesData._parsedExtrema=[],this.seriesGoals=[];const h=r.labels.length>0?r.labels.slice():r.xaxis.categories.slice();this.w.axisFlags.isRangeBar="rangeBar"===r.chart.type&&o.isBarHorizontal,this.w.labelData.hasXaxisGroups="category"===r.xaxis.type&&r.xaxis.group.groups.length>0,this.w.labelData.hasXaxisGroups&&(this.w.labelData.groups=r.xaxis.group.groups),t.forEach((t,e)=>{void 0!==t.name?this.w.seriesData.seriesNames.push(t.name):this.w.seriesData.seriesNames.push("series-"+parseInt(String(e+1),10))}),this.coreUtils.setSeriesYAxisMappings();const d=[],p=[...new Set(r.series.map(t=>t.group))];this.w.labelData.seriesGroupIndex=r.series.map((t,e)=>{const i=p.indexOf(t.group);return d[i]||(d[i]=[]),d[i].push(this.w.seriesData.seriesNames[e]),i}),this.w.labelData.seriesGroups=d;const u=()=>{for(let t=0;t<h.length;t++)if("string"==typeof h[t]){if(!c.isValidDate(h[t]))throw new Error("You have provided invalid Date format. Please provide a valid JavaScript Date");this.twoDSeriesX.push(c.parseDate(h[t]))}else this.twoDSeriesX.push(h[t])};this._pinActive=!1,this.getFirstDataPoint(),this._pinActive=!0;for(let c=0;c<t.length;c++){this.twoDSeries=[],this.twoDSeriesX=[],this.threeDSeries=[],void 0===t[c].data&&(console.error("It is a possibility that you may have not included 'data' property in series."),t[c]=l(n({},t[c]),{data:[]})),this._ownPoint=null;for(let e=0;null==this._ownPoint&&e<t[c].data.length;e++)this._ownPoint=t[c].data[e];const d=r.chart.dataReducer,p=null==(i=null==(e=o.dataReducerRawSeries)?void 0:e[c])?void 0:i.data;if((null==d?void 0:d.enabled)&&!this._isCollapsedIndex(c)&&this.isMultiFormat()&&Array.isArray(p)&&p.length>(null!=(s=d.threshold)?s:500)){const e=null!=(a=d.targetPoints)?a:250,i=r.xaxis.min,s=r.xaxis.max,o=null==i&&null==s?p:vs.sliceByXRange(p,i,s);let h=o;if(o.length>e){let t=null;for(let e=0;null==t&&e<o.length;e++){const i=o[e];t=Array.isArray(i)?i[1]:null==i?void 0:i.y}Array.isArray(t)?4===t.length?h=vs.ohlcAggregate(o,e):2===t.length&&(h=vs.rangeAggregate(o,e)):h=vs.lttbDownsample(o,e)}t[c]=l(n({},t[c]),{data:h})}"rangeBar"!==r.chart.type&&"rangeArea"!==r.chart.type&&"rangeBar"!==t[c].type&&"rangeArea"!==t[c].type||(this.w.axisFlags.isRangeData=!0,this.handleRangeData(t,c));const g=t[c].type||r.chart.type;if(it(g)){const e=rt(g),i=e&&e.yExtent;(e&&"rangeXY"===e.dataType||"function"==typeof i)&&(this.w.axisFlags.isRangeData=!0,this.handleCustomRangeData(t,c,i))}if(this.isMultiFormat())this.isFormat2DArray()?this.handleFormat2DArray(t,c):this.isFormatXY()&&this.handleFormatXY(t,c),"candlestick"!==r.chart.type&&"candlestick"!==t[c].type&&"boxPlot"!==r.chart.type&&"boxPlot"!==t[c].type||this.handleCandleStickBoxData(t,c),"violin"!==r.chart.type&&"violin"!==t[c].type||this.handleViolinData(t,c),this.w.seriesData.series.push(this.twoDSeries),this.w.labelData.labels.push(this.twoDSeriesX),this.w.seriesData.seriesX.push(this.twoDSeriesX),this.w.seriesData.seriesGoals=this.seriesGoals,c!==this.activeSeriesIndex||this.fallbackToCategory||(this.w.axisFlags.isXNumeric=!0);else{"datetime"===r.xaxis.type?(this.w.axisFlags.isXNumeric=!0,u(),this.w.seriesData.seriesX.push(this.twoDSeriesX)):"numeric"===r.xaxis.type&&(this.w.axisFlags.isXNumeric=!0,h.length>0&&(this.twoDSeriesX=h,this.w.seriesData.seriesX.push(this.twoDSeriesX))),this.w.labelData.labels.push(this.twoDSeriesX);const e=t[c].data.map(t=>A.parseNumber(t));this.w.seriesData.series.push(e)}this.w.seriesData.seriesZ.push(this.threeDSeries),void 0!==t[c].color?this.w.seriesData.seriesColors.push(t[c].color):this.w.seriesData.seriesColors.push(void 0)}return this._pinActive=!1,this._ownPoint=null,this.w}parseDataNonAxisCharts(t){const e=this.w.config;this.w.seriesData.unitData=[];const i=Array.isArray(t)&&t.every(t=>"number"==typeof t)&&e.labels.length>0,s=Array.isArray(t)&&t.some(t=>t&&"object"==typeof t&&t.data||t&&"object"==typeof t&&t.parsing);if("unit"===e.chart.type&&s&&!i)return this.parseUnitSeries(t);if(i&&s&&console.warn("ApexCharts: Both old format (numeric series + labels) and new format (series objects with data/parsing) detected. Using old format for backward compatibility."),i){this.w.seriesData.series=t.slice(),this.w.seriesData.seriesNames=e.labels.slice();for(let t=0;t<this.w.seriesData.series.length;t++)void 0===this.w.seriesData.seriesNames[t]&&this.w.seriesData.seriesNames.push("series-"+(t+1));return this.w}if(Array.isArray(t)&&t.every(t=>"number"==typeof t)){this.w.seriesData.series=t.slice(),this.w.seriesData.seriesNames=[];for(let t=0;t<this.w.seriesData.series.length;t++)this.w.seriesData.seriesNames.push(e.labels[t]||`series-${t+1}`);return this.w}const a=this.extractPieDataFromSeries(t);this.w.seriesData.series=a.values,this.w.seriesData.seriesNames=a.labels,"radialBar"===e.chart.type&&(this.w.seriesData.series=this.w.seriesData.series.map(t=>{const e=A.parseNumber(t);return e>100&&console.warn(`ApexCharts: RadialBar value ${e} > 100, consider using percentage values (0-100)`),e}));for(let t=0;t<this.w.seriesData.series.length;t++)void 0===this.w.seriesData.seriesNames[t]&&this.w.seriesData.seriesNames.push("series-"+(t+1));return this.w}parseUnitSeries(t){const e=this.w.config,i=[],s=[],a=[];return t.forEach((t,r)=>{var o;const n=t&&Array.isArray(t.data)?t.data:[];i.push(n.length);const l=t&&void 0!==t.name&&null!==t.name?t.name:void 0;s.push(null!=(o=null!=l?l:e.labels[r])?o:`series-${r+1}`),a.push(n.slice())}),this.w.seriesData.series=i,this.w.seriesData.seriesNames=s,this.w.seriesData.unitData=a,this.w}resetParsingFlags(){const t=this.w;t.axisFlags.dataWasParsed=!1,t.config.series&&t.config.series.forEach(t=>{t.__apexParsed&&delete t.__apexParsed})}extractPieDataFromSeries(t){const e=[],i=[];if(!Array.isArray(t))return console.warn("ApexCharts: Expected array for series data"),{values:[],labels:[]};if(0===t.length)return console.warn("ApexCharts: Empty series array"),{values:[],labels:[]};const s=t[0];return"object"==typeof s&&null!==s&&s.data?(this.extractPieDataFromSeriesObjects(t,e,i),{values:e,labels:i}):(console.warn("ApexCharts: Unsupported series format for pie/donut/radialBar. Expected series objects with data property."),{values:[],labels:[]})}extractPieDataFromSeriesObjects(t,e,i){const s="sunburst"===this.w.config.chart.type&&this.w.seriesData.seriesColors;t.forEach((t,a)=>{t.data&&Array.isArray(t.data)?t.data.forEach(t=>{if("object"==typeof t&&null!==t){const a=void 0!==t.x?t.x:t.name,r=void 0!==t.y?t.y:t.value;s&&void 0!==a&&(s[i.length]=t.color),void 0!==a&&void 0!==r?(i.push(String(a)),e.push(A.parseNumber(r))):void 0!==a&&Array.isArray(t.children)?(i.push(String(a)),e.push(bs(t))):console.warn("ApexCharts: Invalid data point format for pie chart. Expected {x, y} format:",t)}else console.warn("ApexCharts: Expected object data point, got:",typeof t)}):console.warn(`ApexCharts: Series ${a} has no valid data array`)})}handleExternalLabelsData(t){const e=this.w.config;if(e.xaxis.categories.length>0)this.w.labelData.labels=e.xaxis.categories;else if(e.labels.length>0)this.w.labelData.labels=e.labels.slice();else if(this.fallbackToCategory){if(this.w.labelData.labels=this.w.labelData.labels[0],this.w.rangeData.seriesRange.length){const t=this.w.labelData.labels.slice(),e=new Set(t.map(xs));this.w.rangeData.seriesRange.forEach(i=>{i.forEach(i=>{null==i.x||e.has(i.x)||(e.add(i.x),t.push(i.label))})}),this.w.labelData.labels=t;const i=this.w.labelData.labels;if(i.length>0&&("number"==typeof i[0]||"string"==typeof i[0]))this.w.labelData.labels=[...new Set(i)];else{const t=new Map;for(const e of i){const i=JSON.stringify(e);t.has(i)||t.set(i,e)}this.w.labelData.labels=Array.from(t.values())}}if(e.xaxis.convertedCatToNumeric){new Z(e).convertCatToNumericXaxis(e,this.w.seriesData.seriesX[0]),this._generateExternalLabels(t)}}else this._generateExternalLabels(t)}_generateExternalLabels(t){const e=this.w.globals,i=this.w.config;let s=[];if(e.axisCharts){if(this.w.seriesData.series.length>0)if(this.isFormatXY()){const t=i.series.map(t=>{const e=new Map;for(const i of t.data)e.has(null==i?void 0:i.x)||e.set(null==i?void 0:i.x,i);return Array.from(e.values())}),e=t.reduce((t,e,i,s)=>s[t].length>e.length?t:i,0);for(let i=0;i<t[e].length;i++)s.push(i+1)}else for(let t=0;t<this.w.seriesData.series[e.maxValsInArrayIndex].length;t++)s.push(t+1);this.w.seriesData.seriesX=[];for(let e=0;e<t.length;e++)this.w.seriesData.seriesX.push(s);this.w.globals.isBarHorizontal||(this.w.axisFlags.isXNumeric=!0)}if(0===s.length){s=e.axisCharts?[]:this.w.seriesData.series.map((t,e)=>e+1);for(let e=0;e<t.length;e++)this.w.seriesData.seriesX.push(s)}this.w.labelData.labels=s,i.xaxis.convertedCatToNumeric&&(this.w.labelData.categoryLabels=s.map(t=>i.xaxis.labels.formatter(t))),this.w.axisFlags.noLabelsProvided=!0}parseRawDataIfNeeded(t){const e=this.w.config.parsing;if(this.w.axisFlags.dataWasParsed)return t;const i=!(!e||!(e.x||e.y||e.z)),s=t.some(t=>t.parsing&&(t.parsing.x||t.parsing.y||t.parsing.z));if(!i&&!s)return t;const a=t.map((t,i)=>{var s,a,r,o,c;if(!t.data||!Array.isArray(t.data)||0===t.data.length)return t;const h={x:(null==(s=t.parsing)?void 0:s.x)||(null==e?void 0:e.x),y:(null==(a=t.parsing)?void 0:a.y)||(null==e?void 0:e.y),z:(null==(r=t.parsing)?void 0:r.z)||(null==e?void 0:e.z)};if(!h.x&&!h.y)return t;const d=t.data[0];if("object"==typeof d&&null!==d&&(Object.prototype.hasOwnProperty.call(d,"x")||Object.prototype.hasOwnProperty.call(d,"y"))&&![h.x,h.y,h.z].flat().some(t=>t&&"x"!==t&&"y"!==t&&"z"!==t&&void 0!==this.getNestedValue(d,t))||Array.isArray(d))return t;if(!h.x||!h.y||Array.isArray(h.y)&&0===h.y.length){const s=[];h.x||s.push("x"),(!h.y||Array.isArray(h.y)&&0===h.y.length)&&s.push("y");const a=null!=(o=t.name)?o:`series[${i}]`;return console.warn(`ApexCharts [${this.w.globals.chartID}]: "${a}" has a parseData config but is missing the '${s.join("', '")}' field specification.`,{parsing:null!=(c=t.parsing)?c:e}),t}const p=t.data.map((t,e)=>{if("object"!=typeof t||null===t)return console.warn(`ApexCharts: Series ${i}, data point ${e} is not an object, skipping parsing`),t;const s=this.getNestedValue(t,h.x);let a,r;if(Array.isArray(h.y)){const e=h.y.map(e=>this.getNestedValue(t,e));"bubble"===this.w.config.chart.type?(e.length<2&&console.warn(`ApexCharts: series[${i}] bubble chart requires parseData.y to have at least 2 fields (y and z). Got: ${JSON.stringify(h.y)}`),a=e[0]):a=e}else a=this.getNestedValue(t,h.y);h.z&&(r=this.getNestedValue(t,h.z)),void 0===s&&console.warn(`ApexCharts: Series ${i}, data point ${e} missing field '${h.x}'`),void 0===a&&console.warn(`ApexCharts: Series ${i}, data point ${e} missing field '${h.y}'`);const o={x:s,y:a,z:void 0};if("bubble"===this.w.config.chart.type&&Array.isArray(h.y)&&2===h.y.length){const e=this.getNestedValue(t,h.y[1]);void 0!==e&&(o.z=e)}return void 0!==r&&(o.z=r),o});return l(n({},t),{data:p,__apexParsed:!0})});return this.w.axisFlags.dataWasParsed=!0,a}getNestedValue(t,e){if(!t||"object"!=typeof t||!e)return;if(-1===e.indexOf("."))return t[e];const i=e.split(".");let s=t;for(let t=0;t<i.length;t++){if(null==s||"object"!=typeof s)return;s=s[i[t]]}return s}applySeriesTransform(t){const e=this.w.config,i=e.chart.requestedType||e.chart.type;if("waterfall"!==i&&this.w.waterfallData.geometry&&(this.w.waterfallData={values:[],cumulative:[],kinds:[],geometry:null}),"dumbbell"!==i&&this.w.dumbbellData&&(this.w.dumbbellData=null),"streamgraph"!==i&&this.w.streamgraphData&&(this.w.streamgraphData=null),this.w.seriesObservations=null,Array.isArray(t))for(const e in gs)if(e!==i&&t.some(t=>(null==t?void 0:t.type)===e)){const i=os(e);t=i?i(t,this.w):this._withoutStats(t,e)}const s=os(i);if(s)return s(t,this.w);if(Array.isArray(t)&&i in gs)return this._withoutStats(t,i);const a=F[i];if(!Array.isArray(t)||!a)return t;if(!this._warnedFeatures.has(a)){this._warnedFeatures.add(a);const t=_[i];ns(`chart.type '${i}'`,a,st(t)?{}:{module:i,scripts:[`${L[t]||t}.js`,`features/${a}.js`]})}return t.map(t=>l(n({},t),{data:[]}))}_withoutStats(t,e){if(this._warnedFeatures.has("stats"))return t;const i=gs[e],s=t.some(t=>((null==t?void 0:t.type)||e)===e&&Array.isArray(null==t?void 0:t.data)&&t.data.some(t=>function(t,e,i){var s,a,r;if(!t||"object"!=typeof t||Array.isArray(t))return!1;if("boxPlot"===e&&Array.isArray(t.y)&&5===t.y.length)return!1;if("violin"===e&&Array.isArray(null==(s=t.y)?void 0:s.density)&&t.y.density.length)return!1;if("violin"===e&&Array.isArray(null==(a=t.y)?void 0:a.summary)&&5===t.y.summary.length)return!1;const o=Array.isArray(t.points)?t.points:Array.isArray(null==(r=t.y)?void 0:r.points)?t.y.points:i&&Array.isArray(t.y)&&"number"==typeof t.y[0]?t.y:null;return!!o&&o.some(t=>{const e=A.parseNumber(t);return null!==e&&isFinite(e)})}(t,e,i)));return s&&(this._warnedFeatures.add("stats"),ns(`chart.type '${e}' with raw observations (\`points\`${i?", or a flat number array as `y`":""})`,"stats",{tail:"Precomputed input draws without it; raw series draw nothing until it loads and the chart renders again."})),t}flattenTreemapHierarchy(t){const e=this.w,i=e.globals;if("treemap"!==e.config.chart.type||!Array.isArray(t))return t;if(!i.treemapRawSeries){if(!ds(e,t))return i.treemapRoots=null,t;i.treemapRawSeries=t.map(t=>l(n({},t),{data:Array.isArray(null==t?void 0:t.data)?t.data.slice():null==t?void 0:t.data}))}const{roots:s,leafSeries:a,maxDepth:r}=us(e,i.treemapRawSeries);return i.treemapRoots=s,i.treemapMaxDepth=r,a}expandScatterJitterData(t){var e,i;const s=this.w.config,a="scatter"===s.chart.type||"bubble"===s.chart.type,r=null==(i=null==(e=s.plotOptions)?void 0:e.scatter)?void 0:i.jitter;if(!(a&&r&&r.enabled&&Array.isArray(t)))return t;if(!t.some(t=>Array.isArray(null==t?void 0:t.data)&&t.data.some(t=>t&&!Array.isArray(t)&&Array.isArray(t.y))))return"datetime"!==s.xaxis.type&&(Array.isArray(s.xaxis.categories)&&s.xaxis.categories.length?this._applyBandAxis(s.xaxis.categories.slice()):Array.isArray(s.xaxis._scatterBandLabels)&&s.xaxis._scatterBandLabels.length&&this._applyBandAxis(s.xaxis._scatterBandLabels)),t;const o=[],c=new Map;t.forEach(t=>{Array.isArray(null==t?void 0:t.data)&&t.data.forEach(t=>{if(t&&Array.isArray(t.y)){const e=String(t.x);c.has(e)||(c.set(e,o.length),o.push(t.x))}})});const h=r.maxPoints||5e3,d=t.map(t=>{if(!Array.isArray(null==t?void 0:t.data))return t;const e=[];return t.data.forEach(t=>{if(t&&Array.isArray(t.y)){const i=c.get(String(t.x)),s=t.y,a=s.length>h?Math.ceil(s.length/h):1;for(let t=0;t<s.length;t+=a){const a=A.parseNumber(s[t]);null!==a&&e.push({x:i,y:a})}}else if(t&&"object"==typeof t&&!Array.isArray(t)){const i=String(t.x);e.push({x:c.has(i)?c.get(i):t.x,y:t.y})}else e.push(t)}),l(n({},t),{data:e})});return this._applyBandAxis(o),d}_applyBandAxis(t){var e;const i=this.w.config.xaxis,s=t.length;if(!s)return;const a=i._scatterBand=i._scatterBand||{};if(i._scatterBandLabels=t.slice(),i.type="numeric",(null==(e=this.w.interact)?void 0:e.zoomed)&&"number"==typeof i.min&&"number"==typeof i.max&&isFinite(i.min)&&isFinite(i.max)){const t=t=>Math.max(0,Math.min(s-1,t));let e=t(Math.round(i.min+.49)),r=t(Math.round(i.max-.49));r<e&&(e=r=t(Math.round((i.min+i.max)/2))),a.min=i.min=e-1,a.max=i.max=r+1,a.tick=i.tickAmount=r-e+2}else null!=i.min&&i.min!==a.min||(a.min=i.min=-1),null!=i.max&&i.max!==a.max||(a.max=i.max=s),null!=i.tickAmount&&"dataPoints"!==i.tickAmount&&i.tickAmount!==a.tick||(a.tick=i.tickAmount=s+1);i.labels=i.labels||{};const r=i.labels.formatter;if("function"!=typeof r||r._scatterBand){const e=e=>{const i=Math.round(e);return Math.abs(e-i)<1e-6&&void 0!==t[i]?t[i]:""};e._scatterBand=!0,i.labels.formatter=e}}assertAxisSeriesShape(t){if(!this.w.globals.axisCharts||!Array.isArray(t))return;const e=t.findIndex(t=>null!=t&&"object"!=typeof t);if(-1===e)return;const i=this.w.config.chart,s=i.requestedType?i.requestedType:"bar"===i.type?"bar or column":i.type,a=t[e],r="string"==typeof a?JSON.stringify(a):String(a);throw new Error(`ApexCharts: a ${s} chart needs each series as an object with its own data, like series: [{ name: 'Sales', data: [44, 55, 13] }], but series[${e}] is the ${typeof a} ${r}. A flat list of numbers is the form pie, donut, polarArea and radialBar take.`)}parseData(t,e=!0){var i,s,a,r,o,h,d,p;const u=this.w,g=u.config,x=u.globals;if(this.assertAxisSeriesShape(t),t=this.parseRawDataIfNeeded(t),t=this.applySeriesTransform(t),t=this.expandScatterJitterData(t),t=this.flattenTreemapHierarchy(t),(null==(i=g.chart.dataReducer)?void 0:i.enabled)&&x.axisCharts&&!x.dataReducerRawSeries){x.dataReducerRawSeries=function(t,e){const i=(e.collapsedSeries||[]).concat(e.ancillaryCollapsedSeries||[]);return t.map((t,e)=>{const s=t||{},{hidden:a}=s,r=c(s,["hidden"]);let o=r.data;if(Array.isArray(o)&&!o.length){const t=i.find(t=>t.index===e);t&&Array.isArray(t.data)&&(o=t.data)}return l(n({},r),{data:Array.isArray(o)?o.slice():o})})}(t,x);let e=1/0,i=-1/0;for(const t of x.dataReducerRawSeries){const n=null==t?void 0:t.data;if(!Array.isArray(n)||0===n.length)continue;const l=!Array.isArray(n[0]),c=ys(l?null==(s=n[0])?void 0:s.x:null==(a=n[0])?void 0:a[0]),h=ys(l?null==(r=n[n.length-1])?void 0:r.x:null==(o=n[n.length-1])?void 0:o[0]);c==c&&(e=Math.min(e,c)),h==h&&(i=Math.max(i,h))}e!==1/0&&(x.dataReducerRawMinX=e,x.dataReducerRawMaxX=i)}if(x.dataReducerRawSeries&&(null==(h=g.chart.dataReducer)?void 0:h.enabled)&&(t=t.map(t=>n({},t))),g.series=t,e)if(x.dataReducerRawSeries&&(null==(d=g.chart.dataReducer)?void 0:d.enabled)){const e=x.dataReducerRawSeries;x.initialSeries=t.map((t,i)=>{var s,a,r;return l(n({},t),{data:null!=(r=null==(a=null==(s=e[i])?void 0:s.data)?void 0:a.slice())?r:t.data})})}else x.histogramRawSeries?x.initialSeries=x.histogramRawSeries:x.dumbbellRawSeries?x.initialSeries=x.dumbbellRawSeries:x.streamgraphRawSeries?x.initialSeries=x.streamgraphRawSeries:x.waterfallRawSeries?x.initialSeries=x.waterfallRawSeries:x.treemapRawSeries?x.initialSeries=x.treemapRawSeries:x.initialSeries=t;else;if(this.excludeCollapsedSeriesInYAxis(),this.fallbackToCategory=!1,this.resetGlobals(),this.isMultipleY(),x.axisCharts?(this.parseDataAxisCharts(t),this.coreUtils.getLargestSeries()):this.parseDataNonAxisCharts(t),g.chart.stacked){const t=new Pi(this.w);this.w.seriesData.series=t.setNullSeriesToZeroValues(this.w.seriesData.series)}this.coreUtils.getSeriesTotals(),x.axisCharts?(vs._defineLazyResult(this.w.seriesData,"stackedSeriesTotals",()=>this.coreUtils.getStackedSeriesTotals()),vs._defineLazyResult(this.w.seriesData,"stackedSeriesTotalsByGroups",()=>this.coreUtils.getStackedSeriesTotalsByGroups()),vs._defineLazyResult(x,"seriesPercent",()=>(this.coreUtils.getPercentSeries(),x.seriesPercent))):this.coreUtils.getPercentSeries(),this.w.axisFlags.dataFormatXNumeric||this.w.axisFlags.isXNumeric&&("numeric"!==g.xaxis.type||0!==g.labels.length||0!==g.xaxis.categories.length)||this.handleExternalLabelsData(t);const f=g.xaxis.convertedCatToNumeric&&g.xaxis.labels.formatter.categoryNames||this.coreUtils.getCategoryLabels(this.w.labelData.labels);for(let t=0;t<f.length;t++)if(Array.isArray(f[t])){this.w.axisFlags.isMultiLineX=!0;break}const m=this.highlight();m?m.parse():this._warnedHighlight||!(null==(p=g.highlightFilter)?void 0:p.data)&&!t.some(t=>{var e;return t&&(t.highlightData||(null==(e=t.data)?void 0:e[0])&&"object"==typeof t.data[0]&&"highlight"in t.data[0])})||(this._warnedHighlight=!0,ns("Highlight parts (`highlightData`, `highlightFilter.data`)","highlight-filter",{tail:"Drawing the chart without them."}))}static _defineLazyResult(t,e,i){let s,a=!1;Object.defineProperty(t,e,{configurable:!0,enumerable:!0,get:()=>(a||(a=!0,s=i()),s),set(t){a=!0,s=t}})}static sliceByXRange(t,e,i){const s=t.length;if(0===s)return t;const a=!Array.isArray(t[0])?t=>ys(t.x):t=>ys(t[0]);let r=0;if(null!=e){let i=0,o=s-1;for(;i<=o;){const s=i+o>>1;a(t[s])<e?i=s+1:o=s-1}r=Math.max(0,i-1)}let o=s;if(null!=i){let e=0,r=s-1;for(;e<=r;){const s=e+r>>1;a(t[s])>i?r=s-1:e=s+1}o=Math.min(s,e+1)}return 0===r&&o===s?t.slice():t.slice(r,o)}static lttbDownsample(t,e){const i=t.length;if(e>=i||e<3)return t;const s=!Array.isArray(t[0]),a=s?t=>ys(t.x):t=>ys(t[0]),r=s?t=>ys(t.y):t=>ys(t[1]),o=[];o.push(t[0]);const n=(i-2)/(e-2);let l=0;for(let s=0;s<e-2;s++){const e=Math.floor((s+1)*n)+1,c=Math.min(Math.floor((s+2)*n)+1,i);let h=0,d=0;const p=c-e;for(let i=e;i<c;i++)h+=a(t[i]),d+=r(t[i]);h/=p,d/=p;const u=Math.floor(s*n)+1,g=Math.min(Math.floor((s+1)*n)+1,i),x=a(t[l]),f=r(t[l]);let m=-1,b=u;for(let e=u;e<g;e++){const i=.5*Math.abs((x-h)*(r(t[e])-f)-(x-a(t[e]))*(d-f));i>m&&(m=i,b=e)}o.push(t[b]),l=b}return o.push(t[i-1]),o}static ohlcAggregate(t,e){const i=t.length;if(e>=i||e<1)return t;const s=!Array.isArray(t[0]),a=s?t=>t.x:t=>t[0],r=s?t=>t.y:t=>t[1],o=s?(t,e)=>({x:t,y:e}):(t,e)=>[t,e],n=[],l=i/e;for(let s=0;s<e;s++){const c=Math.floor(s*l),h=s===e-1?i:Math.floor((s+1)*l);if(h<=c)continue;let d=null,p=null,u=-1/0,g=1/0;for(let e=c;e<h;e++){const i=r(t[e]);Array.isArray(i)&&(d||(d=i),p=i,null!=i[1]&&i[1]>u&&(u=i[1]),null!=i[2]&&i[2]<g&&(g=i[2]))}n.push(o(a(t[c]),d&&[d[0],u===-1/0?null:u,g===1/0?null:g,p[3]]))}return n}static rangeAggregate(t,e){const i=t.length;if(e>=i||e<1)return t;const s=!Array.isArray(t[0]),a=s?t=>t.x:t=>t[0],r=s?t=>t.y:t=>t[1],o=s?(t,e)=>({x:t,y:e}):(t,e)=>[t,e],n=[],l=i/e;for(let s=0;s<e;s++){const c=Math.floor(s*l),h=s===e-1?i:Math.floor((s+1)*l);if(h<=c)continue;let d=1/0,p=-1/0;for(let e=c;e<h;e++){const i=r(t[e]);if(null!=i)for(let t=0;t<2;t++){const e=i[t];null!=e&&isFinite(e)&&(e<d&&(d=e),e>p&&(p=e))}}n.push(o(a(t[c]),d===1/0?[null,null]:[d,p]))}return n}excludeCollapsedSeriesInYAxis(){const t=this.w,e=[];t.globals.seriesYAxisMap.forEach((i,s)=>{let a=0;i.forEach(e=>{-1!==t.globals.collapsedSeriesIndices.indexOf(e)&&a++}),a>0&&a==i.length&&e.push(s)}),t.globals.ignoreYAxisIndexes=e.map(t=>t)}}function ws(t){t.globals.dataReducerRawSeries=null,t.globals.dataReducerRawMinX=t.globals.dataReducerRawMaxX=void 0,t.globals.histogramRawSeries=null,t.globals.waterfallRawSeries=null,t.globals.dumbbellRawSeries=null,t.globals.streamgraphRawSeries=null,t.globals.treemapRawSeries=null}function As(t){var e,i;return t.config.xaxis.convertedCatToNumeric?JSON.stringify(null!=(e=t.labelData.categoryLabels)?e:[]):t.axisFlags.isXNumeric?null:JSON.stringify(null!=(i=t.labelData.labels)?i:[])}function Ss(t){const e=t.config.legend.formatter,i=t.globals.seriesNames;return JSON.stringify([t.labelData.seriesGroups,t.config.series.map((s,a)=>[i[a],null==s?void 0:s.color,!!(null==s?void 0:s.hidden),null==s?void 0:s.type,"function"==typeof e&&e(i[a],{seriesIndex:a,w:t})])])}class Cs{constructor(t,e){this.w=t,this.ctx=e}_updateOptions(t,e=!1,i=!0,s=!0,a=!1){return new Promise((r,o)=>{let l=[this.ctx];s&&(l=this.ctx.getSyncedCharts()),this.w.globals.isExecCalled&&(l=[this.ctx],this.w.globals.isExecCalled=!1);const c=t,h=l.map(s=>{var r,o,l,h;const d=s.w;(t=c)&&"object"==typeof t&&(t=n({},t)).chart&&(t.chart=n({},t.chart)),d.globals.shouldAnimate=i,e?(d.globals.resized=!i,d.globals.dataChanged=!1,d.globals.previousPaths=[]):(d.globals.resized=!0,d.globals.dataChanged=!0,i&&d.config.chart.animations.enabled&&s.series.getPreviousPaths());const p=d.config.chart.requestedType||d.config.chart.type,u=null==(r=d.config.chart.sparkline)?void 0:r.enabled,g=Z.isHorizontalBar(d.config);if(i&&t&&"object"==typeof t){const e=null==(o=null==t?void 0:t.chart)?void 0:o.type;e&&e!==p&&(null==(l=s.morphTypeChange)||l.captureBeforeDestroy({fromType:p,toType:e,newSeries:t.series||d.config.series}))}if(t&&"object"==typeof t){t=nt.dropEmptyOptions(t),s.config=new nt(t);const e=t.chart&&t.chart.type,i="funnel"===e||"pyramid"===e||"gauge"===e,r=!!d.config.chart.requestedType;if(e&&!i&&r){t.chart=t.chart||{},t.chart.requestedType=e;const i=d.config.chart.requestedType;"funnel"!==i&&"pyramid"!==i||(t.plotOptions=t.plotOptions||{},t.plotOptions.bar=t.plotOptions.bar||{},void 0===t.plotOptions.bar.isFunnel&&(t.plotOptions.bar.isFunnel=!1),void 0===t.plotOptions.bar.isPyramid&&(t.plotOptions.bar.isPyramid=!1))}if(s.config.normalizeAliasedChartType(t),nt.normalizeAxisBounds(t,{xaxisType:d.config.xaxis.type,datetimeUTC:d.config.xaxis.labels.datetimeUTC}),t=gt.extendArrayProps(s.config,t,d),s.w.globals.chartID!==this.w.globals.chartID&&(delete t.series,delete t.yaxis),a&&Array.isArray(t.series)&&ws(d),d.config=A.extend(d.config,t),null==(h=s.responsive)||h.absorb(t),Z.handOverTypeDefaults(d.config,p,t),Z.syncCatToNumeric(d.config,t),Z.syncSparkline(d.config,u,t),Z.syncHorizontal(d.config,g,t),a){t.xaxis&&(d.globals.lastXAxis=A.clone(t.xaxis)),t.yaxis&&(d.globals.lastYAxis=A.clone(t.yaxis));const e=d.globals.initialConfig&&d.globals.initialConfig.series,i=A.extend({},s.responsive?s.responsive.withoutBreakpoints(d.config):d.config);i.series=!t.series&&e?e:A.copySeriesShallow(d.config.series),d.globals.initialConfig=i,t.series&&(d.globals.initialSeries=d.config.series)}t.series&&(d.globals.collapsedSeriesIndices.length>0||d.globals.ancillaryCollapsedSeriesIndices.length>0)&&(d.config.series=A.copySeriesShallow(d.config.series),s.series.reconcileCollapsedByName())}return s.update(t)});Promise.all(h).then(()=>r(this.ctx)).catch(o)})}_updateSeries(t,e,i=!1){return new Promise((s,a)=>{const r=this.w;r.globals.shouldAnimate=e,r.globals.dataChanged=!0;const o=JSON.stringify({y:(r.globals.yAxisScale||[]).map(t=>t?t.result:null),xMin:r.globals.minX,xMax:r.globals.maxX});me.invalidateSelectors(r),e&&r.config.chart.animations.enabled&&this.ctx.series.getPreviousPaths();const l=As(r),c=Ss(r),h=r.globals.barPadForNumericAxis,d=r.layout.rotateXLabels,p=r.config.series.length,u=r.config.series.map(t=>{var e,i;return null!=(i=null==(e=null==t?void 0:t.data)?void 0:e.length)?i:0});i&&ws(r);const g=t;let x=!1;return r.globals.axisCharts&&(r.globals.collapsedSeriesIndices.length>0||r.globals.ancillaryCollapsedSeriesIndices.length>0)&&(t=t.map(t=>t&&"object"==typeof t?n({},t):t),this.ctx.series.reconcileCollapsedByName(t),x=!0),this.ctx.data.resetParsingFlags(),this.ctx.data.parseData(t,i),i&&(r.globals.initialConfig&&(r.globals.initialConfig.series=A.copySeriesShallow(x?g:r.config.series)),x&&(r.globals.initialSeries=g)),this._canUseFastPath(t,p,u,r)&&As(r)===l&&Ss(r)===c?(r.globals.barPadForNumericAxis=h,r.layout.rotateXLabels=d,this.ctx.fastUpdate(e,o).then(()=>{s(this.ctx)}).catch(a)):(this.ctx._updateStats&&this.ctx._updateStats.full++,this.ctx.update().then(()=>{s(this.ctx)}).catch(a))})}_canUseFastPath(t,e,i,s){var a;if(!s.dom.elGraphical)return!1;if(!s.globals.axisCharts)return!1;if(t.length!==e)return!1;if(t.some((t,e)=>{var s,a;return(null!=(a=null==(s=null==t?void 0:t.data)?void 0:s.length)?a:0)!==i[e]}))return!1;if(s.globals.collapsedSeries.length>0)return!1;if(s.globals.ancillaryCollapsedSeries.length>0)return!1;if(s.globals.risingSeries.length>0)return!1;if(s.globals.comboCharts)return!1;if(s.interact.zoomed)return!1;if("radar"===s.config.chart.type)return!1;const r=null==(a=this.ctx.legend)?void 0:a.heatmapGradientLegend;if(r&&r.constructor.isEnabled(s)){const{min:t,max:e}=r._computeStops();if(t!==r._min||e!==r._max)return!1}const o=this.ctx.rendererController;return!o||o.pendingKind()===o.getActiveKind()}_extendSeries(t,e){const i=this.w,s=i.config.series[e];return l(n({},i.config.series[e]),{name:t.name?t.name:null==s?void 0:s.name,color:t.color?t.color:null==s?void 0:s.color,type:t.type?t.type:null==s?void 0:s.type,group:t.group?t.group:null==s?void 0:s.group,hidden:void 0!==t.hidden?t.hidden:null==s?void 0:s.hidden,data:t.data?t.data:null==s?void 0:s.data,highlightData:t.highlightData,zIndex:void 0!==t.zIndex?t.zIndex:e})}toggleDataPointSelection(t,e){const i=this.w;let s=null;const a=`.apexcharts-series[data\\:realIndex='${t}']`;if(i.globals.axisCharts?s=i.dom.Paper.findOne(`${a} path[j='${e}'], ${a} circle[j='${e}'], ${a} rect[j='${e}']`):void 0===e&&(s=i.dom.Paper.findOne(`${a} path[j='${t}']`),"pie"!==i.config.chart.type&&"polarArea"!==i.config.chart.type&&"donut"!==i.config.chart.type||this.ctx.pie.pieClicked(t)),!s)return console.warn("toggleDataPointSelection: Element not found"),null;new ae(this.w).pathMouseDown(s,null);return s.node?s.node:null}forceXAxisUpdate(t){var e,i;const s=this.w;if(["min","max"].forEach(e=>{void 0!==t.xaxis[e]&&(s.config.xaxis[e]=t.xaxis[e],s.globals.lastXAxis[e]=t.xaxis[e])}),t.xaxis.categories&&t.xaxis.categories.length&&(s.config.xaxis.categories=t.xaxis.categories),s.config.xaxis.convertedCatToNumeric){const a=t.xaxis;if("categories"in a||"labels"in t)t=new Z(t).convertCatToNumericXaxis(t);else if(null==(e=a.labels)?void 0:e.formatter){const e=null==(i=s.config.xaxis.labels.formatter)?void 0:i.categoryNames;t=new Z(t).convertCatToNumericXaxis(t,e)}}return t}forceYAxisUpdate(t){return t.chart&&t.chart.stacked&&"100%"===t.chart.stackType&&(Array.isArray(t.yaxis)?t.yaxis.forEach((e,i)=>{t.yaxis[i].min=0,t.yaxis[i].max=100}):(t.yaxis.min=0,t.yaxis.max=100)),t}revertDefaultAxisMinMax(t){const e=this.w;let i=e.globals.lastXAxis,s=e.globals.lastYAxis;t&&t.xaxis&&(i=t.xaxis),t&&t.yaxis&&(s=t.yaxis);const a=i;e.config.xaxis.min=a.min,e.config.xaxis.max=a.max;const r=t=>{if(void 0!==s[t]){const i=s[t];e.config.yaxis[t].min=i.min,e.config.yaxis[t].max=i.max}};e.config.yaxis.map((t,i)=>{e.interact.zoomed||void 0!==s[i]?r(i):void 0!==this.ctx.opts.yaxis[i]&&(t.min=this.ctx.opts.yaxis[i].min,t.max=this.ctx.opts.yaxis[i].max)})}}class ks{static isFollowCursor(t){return t.config.tooltip.followCursor&&!t.config.tooltip.interactive}static eventPointer(t,e={}){var i,s,a,r,o,n;const l=(null==(i=null==t?void 0:t.type)?void 0:i.startsWith("touch"))?null==(s=t.touches)?void 0:s[0]:null;return{x:null!=(r=null!=(a=e.clientX)?a:l?l.clientX:null==t?void 0:t.clientX)?r:0,y:null!=(n=null!=(o=e.clientY)?o:l?l.clientY:null==t?void 0:t.clientY)?n:0}}static plotRect(t){var e,i;const s=(null==(e=t.dom.Paper)?void 0:e.node)||(null==(i=t.dom.baseEl)?void 0:i.querySelector(".apexcharts-svg")),a=(s||t.dom.elWrap).getBoundingClientRect(),r=(s&&t.globals.svgWidth?a.width/t.globals.svgWidth:1)||1;return{left:a.left+t.layout.translateX*r,top:a.top+t.layout.translateY*r,width:t.layout.gridWidth*r,height:t.layout.gridHeight*r,zoom:r}}static plotInWrap(t){const e=ks.plotRect(t),i=t.dom.elWrap.getBoundingClientRect();return{left:e.left-i.left,top:e.top-i.top}}static hasViolinSeries(t){return"violin"===t.config.chart.type||(t.config.series||[]).some(t=>t&&"violin"===t.type)}static isCanvasViolinChart(t){return ks.isCanvasBarChart(t)&&ks.hasViolinSeries(t)}static isBarLikeType(t){return"bar"===t||"column"===t||"rangeBar"===t||"candlestick"===t||"boxPlot"===t||"violin"===t}static hasBarLikeSeries(t){return ks.isBarLikeType(t.config.chart.type)||(t.config.series||[]).some(t=>t&&ks.isBarLikeType(t.type))}static isCanvasBarChart(t){const e=t.globals.activeRenderer;return"canvas"===(null==e?void 0:e.kind)&&"function"==typeof e.hitTest&&ks.hasBarLikeSeries(t)}static isCanvasMarkerChart(t){const e=t.globals.activeRenderer;return"canvas"===(null==e?void 0:e.kind)&&"function"==typeof e.hitTestMarker&&!!t.globals.xyCharts}constructor(t){this.w=t.w,this.ttCtx=t}static hoverTarget(t){return t?(t.eventPhase&&t.target&&(t.apexHoverTarget=t.target),t.apexHoverTarget||t.target):null}getNearestValues({hoverArea:t,clientX:e,clientY:i}){var s;const a=this.w,r=ks.plotRect(a),o=a.layout.gridWidth,n=a.layout.gridHeight,l=a.globals.dataPoints;let c=o/(l-1);const h=n/l,d=(a.globals.comboCharts||this.hasBars()||"between"===a.config.xaxis.tickPlacement)&&!a.config.xaxis.convertedCatToNumeric;d&&(c=o/l);const p=(e-r.left)/r.zoom,u=(i-r.top)/r.zoom,g=a.globals.barPadForNumericAxis||0;p<-g||u<0||p>o+g||u>n?(t.classList.remove("hovering-zoom"),t.classList.remove("hovering-pan")):a.interact.zoomEnabled?(t.classList.remove("hovering-pan"),t.classList.add("hovering-zoom")):a.interact.panEnabled&&(t.classList.remove("hovering-zoom"),t.classList.add("hovering-pan"));let x=d?Math.ceil(p/c)-1:Math.round(p/c),f=Math.floor(u/h),m=null;if(a.axisFlags.isXNumeric){const t=this.closestInMultiArray(p,u,a.globals.seriesXvalues,a.globals.seriesYvalues);m=t.index,x=null!=(s=t.j)?s:0}return a.interact.capturedSeriesIndex=null===m?-1:m,x>l-1&&(x=l-1),f>l-1&&(f=l-1),(!x||x<1)&&(x=0),a.globals.isBarHorizontal?a.interact.capturedDataPointIndex=f:a.interact.capturedDataPointIndex=x,{capturedSeries:m,j:a.globals.isBarHorizontal?f:x,hoverX:p,hoverY:u}}getFirstActiveXArray(t){const e=this.w;let i=0;const s=t.map((t,e)=>t.length>0?e:-1);for(let t=0;t<s.length;t++)if(-1!==s[t]&&-1===e.globals.collapsedSeriesIndices.indexOf(t)&&-1===e.globals.ancillaryCollapsedSeriesIndices.indexOf(t)){i=s[t];break}return i}closestInMultiArray(t,e,i,s){const a=this.w,r=t=>-1===a.globals.collapsedSeriesIndices.indexOf(t)&&-1===a.globals.ancillaryCollapsedSeriesIndices.indexOf(t),o=a.config.chart.type,n=!a.globals.comboCharts&&("line"===o||"area"===o);let l=1/0,c=null,h=null;const d=(t,e,i)=>Number.isFinite(t[i])&&Number.isFinite(e[i]);if(a.globals.allSeriesHasEqualX){let a=1/0;for(let e=0;e<i.length;e++){if(!r(e))continue;const o=i[e],n=s[e],l=Math.min(o.length,n.length);for(let e=0;e<l;e++){if(!d(o,n,e))continue;const i=Math.abs(t-o[e]);i<a&&(a=i,h=e)}}if(null!==h)if(n){let a=1/0;for(let o=0;o<i.length;o++){if(!r(o))continue;const n=i[o],l=s[o],p=Math.min(n.length,l.length);let u=-1,g=0;for(let i=0;i<p;i++)if(d(n,l,i)){if(u>=0){g++;const s=this._distanceToSegment(t,e,n[u],l[u],n[i],l[i]);s.dist<a&&(a=s.dist,c=o)}u=i}if(!g){const t=l[h];if("number"!=typeof t)continue;const i=Math.abs(e-t);i<a&&(a=i,c=o)}}}else{let t=1/0;for(let a=0;a<i.length;a++){if(!r(a))continue;const i=s[a][h];if("number"!=typeof i)continue;const o=Math.abs(e-i);o<t&&(t=o,c=a)}}return{index:c,j:h}}for(let a=0;a<i.length;a++){if(!r(a))continue;const o=i[a],p=s[a],u=Math.min(o.length,p.length);if(n){let i=-1,s=0;for(let r=0;r<u;r++)if(d(o,p,r)){if(i>=0){s++;const n=this._distanceToSegment(t,e,o[i],p[i],o[r],p[r]);n.dist<l&&(l=n.dist,c=a,h=n.t<.5?i:r)}i=r}if(s)continue}for(let i=0;i<u;i++){if(!d(o,p,i))continue;const s=t-o[i],r=e-p[i],n=Math.sqrt(s*s+r*r);n<l&&(l=n,c=a,h=i)}}return{index:c,j:h}}_distanceToSegment(t,e,i,s,a,r){const o=a-i,n=r-s,l=o*o+n*n;let c=0===l?0:((t-i)*o+(e-s)*n)/l;c<0?c=0:c>1&&(c=1);const h=t-(i+c*o),d=e-(s+c*n);return{dist:Math.sqrt(h*h+d*d),t:c}}isXoverlap(t){const e=[],i=this.w.seriesData.seriesX.filter(t=>void 0!==t[0]);if(i.length>0)for(let s=0;s<i.length-1;s++)void 0!==i[s][t]&&void 0!==i[s+1][t]&&i[s][t]!==i[s+1][t]&&e.push("unEqual");return 0===e.length}isInitialSeriesSameLen(){var t,e,i,s;let a=!0;const r=(null==(e=null!=(t=this.w.globals._initialSeriesPeek)?t:this.w.globals.initialSeries)?void 0:e.filter((t,e)=>{var i;return!(null==(i=this.w.globals.collapsedSeriesIndices)?void 0:i.includes(e))}))||[];for(let t=0;t<r.length-1;t++){if(!(null==(i=r[t])?void 0:i.data)||!(null==(s=r[t+1])?void 0:s.data))return!0;if(r[t].data.length!==r[t+1].data.length){a=!1;break}}return a}getElMarkers(t){return"number"==typeof t?this.w.dom.baseEl.querySelectorAll(`.apexcharts-series[data\\:realIndex='${t}'] .apexcharts-series-markers-wrap > *`):this.w.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap > *")}getAllMarkers(t=!1){let e=[...this.w.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap")];t&&(e=e.filter(t=>{const e=Number(t.getAttribute("data:realIndex"));return-1===this.w.globals.collapsedSeriesIndices.indexOf(e)})),e.sort((t,e)=>{var i=Number(t.getAttribute("data:realIndex")),s=Number(e.getAttribute("data:realIndex"));return s<i?1:s>i?-1:0});const i=[];return e.forEach(t=>{i.push(t.querySelector(".apexcharts-marker"))}),i}hasMarkers(t){return this.getElMarkers(t).length>0}getPathFromPoint(t,e){const i=Number(t.getAttribute("cx")),s=Number(t.getAttribute("cy")),a=t.getAttribute("shape");return new ae(this.w).getMarkerPath(i,s,a,e)}getElBars(){return this.w.dom.baseEl.querySelectorAll(".apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-violin-series, .apexcharts-rangebar-series")}hasBars(){return this.getElBars().length>0}getHoverMarkerSize(t){const e=this.w;let i=e.config.markers.hover.size;return void 0===i&&(i=e.globals.markers.size[t]+e.config.markers.hover.sizeOffset),i}toggleAllTooltipSeriesGroups(t){const e=this.w,i=this.ttCtx;0===i.allTooltipSeriesGroups.length&&(i.allTooltipSeriesGroups=e.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));const s=i.allTooltipSeriesGroups;for(let i=0;i<s.length;i++)"enable"===t?(s[i].classList.add("apexcharts-active"),s[i].style.display=e.config.tooltip.items.display):(s[i].classList.remove("apexcharts-active"),s[i].style.display="none")}}class Ms{static xRatio(t){const e=t.layout.gridWidth||1;return(t.globals.maxX-t.globals.minX)/e}static dataXToPx(t,e){return(e-t.globals.minX)/Ms.xRatio(t)}static pxToDataX(t,e){return t.globals.minX+e*Ms.xRatio(t)}static screenXToPlotPx(t,e){const i=t.dom.baseEl,s=i&&i.querySelector(".apexcharts-svg");if(!s)return e-t.layout.translateX;const a=s.getBoundingClientRect(),r=t.globals.svgWidth?a.width/t.globals.svgWidth:1;return(e-a.left)/(r||1)-t.layout.translateX}}function Ts({anchorX:t,markTop:e,markBottom:i,ttWidth:s,ttHeight:a,room:r,gapAbove:o=7,gapBelow:n=o}){if(![t,e,i,s,a].every(Number.isFinite))return null;let l,c;const h=e-o-a,d=Math.max(e,i)+n;if(h>=r.top)l="top",c=h;else{if(!(d+a<=r.bottom))return null;l="bottom",c=d}const p=Bs(t,s,r);return{x:p,y:c,placement:l,arrowX:Math.max(10,Math.min(s-10,t-p))}}function Ds(t){if("function"!=typeof t)return()=>null!=t?t:null;let e;return()=>{var i;return void 0===e&&(e=null!=(i=t())?i:null),e}}function _s({cell:t,plot:e,ttWidth:i,ttHeight:s,gap:a}){const r=(t.left+t.right)/2,o=(t.top+t.bottom)/2,n=t.top-a-s,l=t.bottom+a,c=(t,s)=>{const a=Es(r,i,e.left,e.right);return{x:a,y:s,placement:t,arrowX:r-a,arrowY:null}};return{middleSide:r<(e.left+e.right)/2?"right":"left",above:t=>n>=t.top?c("top",n):null,below:t=>l+s<=t.bottom?c("bottom",l):null,beside:(r,n)=>{const l="right"===r,c=l?t.right+a:t.left-a-i;if(l?c+i>n.right:c<n.left)return null;const h=Es(o,s,e.top,e.bottom);return{x:c,y:h,placement:r,arrowX:null,arrowY:o-h}}}}function Fs({cell:t,plot:e,room:i=null,ttWidth:s,ttHeight:a,gap:r=7}){var o,n,l,c,h;if(![t.top,t.bottom,t.left,t.right,s,a].every(Number.isFinite))return null;const d=_s({cell:t,plot:e,ttWidth:s,ttHeight:a,gap:r}),p=null!=(n=null!=(o=d.above(e))?o:d.below(e))?n:d.beside(d.middleSide,e);if(p)return p;const u=Ds(i)();if(!u)return null;const g="right"===d.middleSide?"left":"right";return null!=(h=null!=(c=null!=(l=d.above(u))?l:d.below(u))?c:d.beside(d.middleSide,u))?h:d.beside(g,u)}function Ls({cell:t,plot:e,room:i=null,ttWidth:s,ttHeight:a,gap:r=7,side:o=null,beside:n=!0}){var l,c,h;if(![t.top,t.bottom,t.left,t.right,s,a].every(Number.isFinite))return null;const d=_s({cell:t,plot:e,ttWidth:s,ttHeight:a,gap:r}),p=Ds(i),u=null!=o?o:d.middleSide,g=null!=(l=d.above(e))?l:d.below(e);if(g)return g;const x=p(),f=x?null!=(c=d.above(x))?c:d.below(x):null;return f||!n?f:null!=(h=d.beside(u,e))?h:x?d.beside(u,x):null}function Es(t,e,i,s){if(e>s-i)return t-e/2;return t-Ps(t-Math.max(Math.min(t-e/2,s-e),i),e)}function Ps(t,e){const i=Math.min(10,e/2);return Math.max(i,Math.min(e-i,t))}function Bs(t,e,i){const s=Math.min(t-e/2,i.right-e);return Math.max(s,i.left)}function Ns(t,e){const i=null==t?void 0:t.ownerDocument,s=null==i?void 0:i.defaultView;if(!s)return null;const a=i.documentElement,r={top:0,left:0,right:Math.min(s.innerWidth,(null==a?void 0:a.clientWidth)||1/0),bottom:Math.min(s.innerHeight,(null==a?void 0:a.clientHeight)||1/0)};e.clippers||(e.clippers=function(t,e){const i=[],s=t.ownerDocument;let a=e.getComputedStyle(t).position,r=Xs(t);for(;r&&r!==s.body&&r!==s.documentElement;){const t=e.getComputedStyle(r);if("fixed"===a?Os(t):"absolute"!==a||("static"!==t.position||Os(t))){if(!Rs.test(t.display||"")){const e=Is(t),s=e||zs(t.overflowX),a=e||zs(t.overflowY);(s||a)&&i.push({node:r,x:s,y:a})}a=t.position}r=Xs(r)}return i}(t,s));for(const{node:t,x:i,y:s}of e.clippers){if(!t.isConnected)continue;const e=t.getBoundingClientRect();if(s){const i=e.top+t.clientTop;r.top=Math.max(r.top,i),r.bottom=Math.min(r.bottom,i+t.clientHeight)}if(i){const i=e.left+t.clientLeft;r.left=Math.max(r.left,i),r.right=Math.min(r.right,i+t.clientWidth)}}return r}const Rs=/^(inline|contents|table-row|table-row-group|table-header-group|table-footer-group|table-column|table-column-group)$/;function zs(t){return!!t&&"visible"!==t}function Is(t){const e=t.contentVisibility;return/paint|strict|content/.test(t.contain||"")||"auto"===e||"hidden"===e}function Os(t){const e=t=>!!t&&"none"!==t,i=t;return e(t.transform)||e(i.translate)||e(i.rotate)||e(i.scale)||e(t.perspective)||e(t.filter)||e(i.backdropFilter)||"preserve-3d"===t.transformStyle||/paint|layout|strict|content/.test(t.contain||"")||"size"===i.containerType||"inline-size"===i.containerType||Is(t)||/transform|translate|rotate|scale|perspective|filter/.test(t.willChange||"")}function Xs(t){let e=t.assignedSlot||t.parentNode;return e&&11===e.nodeType&&(e=e.host||null),e&&1===e.nodeType?e:null}class Hs{constructor(t){this.ttCtx=t,this.w=t.w,this.shortPlotPlacement=!1,this.clipCache={clippers:null,at:0}}getVisibleRoom(){var t,e,i;const s=null==(t=this.w.dom)?void 0:t.elWrap,a=null==(i=(e=this.ttCtx).getElTooltip)?void 0:i.call(e);if(!s||!a)return null;const r=Date.now();r-(this.clipCache.at||0)>1e3&&(this.clipCache.clippers=null),this.clipCache.clippers||(this.clipCache.at=r);const o=Ns(a,this.clipCache);if(!o)return null;const n=s.getBoundingClientRect();return{top:o.top-n.top,bottom:o.bottom-n.top,left:o.left-n.left,right:o.right-n.left}}isShortPlot(){var t,e,i;return!this.ttCtx.fixedTooltip&&(e=(null==(t=this.ttCtx.tooltipRect)?void 0:t.ttHeight)||0,i=this.w.layout.gridHeight,e>0&&(!(i>0)||e>=.78*i))}resetPlacementCache(){this.clipCache.clippers=null}placeOnShortPlot(t,e,i,{gapAbove:s,gapBelow:a}={}){var r,o;const c=this.ttCtx;if(this.shortPlotPlacement=!1,!this.isShortPlot())return null;const h=(null==(r=c.tooltipRect)?void 0:r.ttHeight)||0,d=(null==(o=c.tooltipRect)?void 0:o.ttWidth)||0,p=this.getVisibleRoom();if(!p)return null;const u=Ts({anchorX:t,markTop:e,markBottom:i,ttWidth:d,ttHeight:h,room:p,gapAbove:s,gapBelow:a});return u?(this.shortPlotPlacement=!0,l(n({},u),{arrowY:null})):null}placeAroundCell(t,e,{el:i=null,ttWidth:s=(t=>null==(t=this.ttCtx.tooltipRect)?void 0:t.ttWidth)()||0,ttHeight:a=(t=>null==(t=this.ttCtx.tooltipRect)?void 0:t.ttHeight)()||0}={}){var r;return(null==(r=null==i?void 0:i.closest)?void 0:r.call(i,'[clip-path*="heatmapHexMask"]'))||(t=this._visiblePart(t,e)),this._placeAround(Fs,t,e,{ttWidth:s,ttHeight:a})}placeAroundBar(t,e,i,s=null){const a=this.barValueSide(i,s);return this._placeAround(Ls,this._visiblePart(t,e),e,{side:a})}placeOverColumn(t,e){return this._placeAround(Ls,this._visiblePart(t,e),e,{beside:!1})}_visiblePart(t,e){const i=Math.max(t.left,e.left),s=Math.min(t.right,e.right);return s>i?l(n({},t),{left:i,right:s}):t}_placeAround(t,e,i,s={}){var a=s,{ttWidth:r=(t=>null==(t=this.ttCtx.tooltipRect)?void 0:t.ttWidth)()||0,ttHeight:o=(t=>null==(t=this.ttCtx.tooltipRect)?void 0:t.ttHeight)()||0}=a,h=c(a,["ttWidth","ttHeight"]);let d;const p=()=>(void 0===d&&(d=this.getVisibleRoom()),d);let u=t(n({cell:e,plot:i,room:p,ttWidth:r,ttHeight:o},h));if(!u){const t=(e.left+e.right)/2,s=Math.min(Math.max(t-r/2,i.left),i.right-r);u={x:s,y:i.top,placement:"top",arrowX:Math.max(10,Math.min(r-10,t-s)),arrowY:null}}const g=("top"===u.placement||"bottom"===u.placement?u.x<i.left||u.x+r>i.right:u.y<i.top||u.y+o>i.bottom)?p():null;return g&&(u=function(t,e,i,s,a){if("top"===t.placement||"bottom"===t.placement){const a=Math.max(Math.min(t.x,i.right-s),i.left),r=(e.left+e.right)/2;return l(n({},t),{x:a,arrowX:Ps(r-a,s)})}const r=Math.max(Math.min(t.y,i.bottom-a),i.top),o=(e.top+e.bottom)/2;return l(n({},t),{y:r,arrowY:Ps(o-r,a)})}(u,e,g,r,o)),u}barValueSide(t,e=null){var i,s,a,r,o,n;const l=this.w;if(null==(s=null==(i=l.config.plotOptions)?void 0:i.bar)?void 0:s.isFunnel)return"right";if("bar"!==l.config.chart.type||(null==(r=null==(a=l.rangeData)?void 0:a.seriesRange)?void 0:r.length))return null;const c=l.seriesData.series,h=l.globals.collapsedSeriesIndices||[];let d=!1,p=!1;return c.forEach((i,s)=>{if(null==e?h.includes(s):s!==e)return;const a=null==i?void 0:i[t];a>0?d=!0:a<0&&(p=!0)}),d===p?null:p!==!!(null==(n=null==(o=l.config.yaxis)?void 0:o[0])?void 0:n.reversed)?"left":"right"}placeOverAnchor(t,e,i,s,a,r=a){const o=s>0?this.getVisibleRoom():null,n=o?Ts({anchorX:t,markTop:e,markBottom:e,ttWidth:i,ttHeight:s,room:o,gapAbove:a,gapBelow:r}):null;return n?{x:n.x,y:n.y}:{x:o?Bs(t,i,o):t-i/2,y:e-a-s}}moveXCrosshairs(t){const e=this.ttCtx,i=this.w,s=e.getElXCrosshairs();let a=t-e.xcrosshairsWidth/2;if(null===s||i.globals.isBarHorizontal||(s.setAttribute("x",String(a)),s.setAttribute("x1",String(a)),s.setAttribute("x2",String(a)),s.setAttribute("y2",String(i.layout.gridHeight)),s.classList.add("apexcharts-active")),a<0&&(a=0),a>i.layout.gridWidth&&(a=i.layout.gridWidth),e.isXAxisTooltipEnabled){let t=a;"tickWidth"!==i.config.xaxis.crosshairs.width&&"barWidth"!==i.config.xaxis.crosshairs.width||(t=a+e.xcrosshairsWidth/2),this.moveXAxisTooltip(t)}}moveYCrosshairs(t){const e=this.ttCtx;null!==e.ycrosshairs&&ae.setAttrs(e.ycrosshairs,{y1:t,y2:t}),null!==e.ycrosshairsHidden&&ae.setAttrs(e.ycrosshairsHidden,{y1:t,y2:t})}moveXAxisTooltip(t){const e=this.w,i=this.ttCtx;if(null!==i.xaxisTooltip&&0!==i.xcrosshairsWidth){i.xaxisTooltip.classList.add("apexcharts-active");const s=i.xaxisOffY+e.config.xaxis.tooltip.offsetY+e.layout.translateY+5+e.config.xaxis.offsetY;if(i.xaxisTooltipText){const t=new ae(this.w).getTextRects(i.xaxisTooltipText.innerHTML,e.config.xaxis.labels.style.fontSize);i.xaxisTooltipText.style.minWidth=t.width+"px"}t-=i.xaxisTooltip.getBoundingClientRect().width/2,isNaN(t)||(t+=e.layout.translateX,i.xaxisTooltip.style.left=t+"px",i.xaxisTooltip.style.top=s+"px")}}moveYAxisTooltip(t){var e,i;const s=this.w,a=this.ttCtx,r=a.getYaxisTTEls()[t],o=parseInt(null!=(i=null==(e=a.ycrosshairsHidden)?void 0:e.getAttribute("y1"))?i:"0",10);let n=s.layout.translateY+o;if(r){const e=r.getBoundingClientRect(),i=e.height;let a;const o=s.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${t}'] .apexcharts-yaxis-texts-g`),l=s.dom.elWrap.getBoundingClientRect();if(o){const t=o.getBoundingClientRect();if(t.width>0){a=t.left+t.width/2-l.left-e.width/2}}if(null==a){const i=4;a=s.config.yaxis[t].opposite?s.globals.translateYAxisX[t]+i:s.globals.translateYAxisX[t]-e.width-i}n-=i/2,-1===s.globals.ignoreYAxisIndexes.indexOf(t)&&n>0&&n<s.layout.gridHeight?(r.classList.add("apexcharts-active"),r.style.top=n+"px",r.style.left=a+s.config.yaxis[t].tooltip.offsetX+"px"):r.classList.remove("apexcharts-active")}}moveTooltip(t,e,i=null,s=null){const a=this.ttCtx.getElTooltip();if(!a)return;const r=this.computeTooltipPosition(t,e,i,s);null!==r&&this.applyTooltipPosition(a,r)}computeTooltipPosition(t,e,i=null,s=null){var a,r,o,n,l,c,h,d,p;const u=this.w,g=this.ttCtx,x=g.tooltipRect,f=!!u.config.tooltip.arrow,m=null!==i?parseFloat(String(i)):1,b=x.ttHeight||0,y=x.ttWidth||0,v=parseFloat(String(t)),w=parseFloat(String(e));if(isNaN(v)||isNaN(w))return null;const A=m+(f?7:0)+0;let S=v+A;const C=w+u.layout.translateY;let k=C-b/2+m/2,M="right",T=v,D=null;if(S>u.layout.gridWidth/2&&(S=v-y-A,M="left"),S>u.layout.gridWidth-y-10&&(S="left"===M?Math.min(u.layout.gridWidth-y,S):u.layout.gridWidth-y),S<-20&&(S=-20),ks.isFollowCursor(u)){if(!g.getElGrid())return null;const t=ks.plotRect(u);S=(null!=(a=g.clientX)?a:g.e.clientX)-t.left,T=S,S>u.layout.gridWidth/2?(S-=y,M="left"):M="right",D=(null!=(r=g.clientY)?r:g.e.clientY)-t.top,k=D+u.layout.translateY,k>u.layout.gridHeight/2&&(k-=b)}else if(!u.globals.isBarHorizontal){const t=u.layout.translateY,e=u.layout.translateY+u.layout.gridHeight;k+b>e&&(k=e-b),k<t&&(k=t)}if(isNaN(S))return null;const _=u.layout.translateY,F=null!==D,L=F?D+_:s?s.top+_:C-m,E=F?L:s?s.bottom+_:C+m,P=this.placeOnShortPlot(T+u.layout.translateX,L,E,{gapAbove:7,gapBelow:F?24:7});if(P)return P;S+=u.layout.translateX;const B=null==(n=null==(o=u.config)?void 0:o.chart)?void 0:n.accessibility;if((null==B?void 0:B.enabled)&&(null==(c=null==(l=null==B?void 0:B.keyboard)?void 0:l.navigation)?void 0:c.enabled)&&(null==(p=null==(d=null==(h=u.dom)?void 0:h.baseEl)?void 0:d.querySelector)?void 0:p.call(d,".apexcharts-keyboard-focused"))){const t=C,e=(m||1)+12,i=k,s=k+b;!isNaN(t)&&b>0&&i<t+e&&s>t-e&&(k=t-b-e,k<0&&(k=t+e))}let N=null;if(f&&b>0){const t=C-k,e=10,i=b-10;N=Math.max(e,Math.min(i,t))}return{x:S,y:k,placement:M,arrowY:N}}applyTooltipPosition(t,e){if(!t)return;const i="true"!==t.dataset.positioned;i&&(t.style.transitionProperty="none"),t.style.left=e.x+"px",t.style.top=e.y+"px",e.placement&&(t.dataset.placement=e.placement),null!=e.arrowY&&t.style.setProperty("--apx-tt-arrow-y",e.arrowY+"px"),null!=e.arrowX&&t.style.setProperty("--apx-tt-arrow-x",e.arrowX+"px"),i&&(t.offsetWidth,t.dataset.positioned="true",requestAnimationFrame(()=>{t.style.transitionProperty=""}))}moveMarkers(t,e){var i;const s=this.w,a=this.ttCtx;if(s.globals.markers.size[t]>0&&!s.globals.markers.batched){const r=s.dom.baseEl.querySelectorAll(` .apexcharts-series[data\\:realIndex='${t}'] .apexcharts-marker`);for(let t=0;t<r.length;t++)if(parseInt(null!=(i=r[t].getAttribute("rel"))?i:"0",10)===e){a.marker.resetEnlargedPoints(),a.marker.enlargeCurrentPoint(e,r[t]);break}}else a.marker.resetPointsSize(),this.moveDynamicPointOnHover(e,t)}moveDynamicPointOnHover(t,e){var i,s,a,r,o;const n=this.w,l=this.ttCtx;let c=0,h=0;const d=new ae(this.w),p=n.globals.pointsArray,u=l.tooltipUtil.getHoverMarkerSize(e),g=n.config.series[e].type;if(g&&("column"===g||"candlestick"===g||"boxPlot"===g||"violin"===g))return;c=null==(s=null==(i=p[e])?void 0:i[t])?void 0:s[0];const x=null==(r=null==(a=p[e])?void 0:a[t])?void 0:r[1],f=Number.isFinite(x);h=f?x:0;const m=n.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${e}'] .apexcharts-series-markers path`);if(m&&f&&h<=n.layout.gridHeight&&h>=0){const t=null!=(o=m.getAttribute("shape"))?o:"circle",e=d.getMarkerPath(c,h,t,1.5*u);m.setAttribute("d",e)}if(this.moveXCrosshairs(c),!l.fixedTooltip){const t=1.5*u;this.moveTooltip(c,h,u,{top:h-t,bottom:h+t})}}moveDynamicPointsOnHover(t){var e,i,s,a;const r=this.ttCtx,o=r.w;let n=0,l=0,c=0;const h=o.globals.pointsArray,d=new Pi(this.w),p=new ae(this.w);c=d.getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);const u=r.tooltipUtil.getHoverMarkerSize(c);let g=!1;if((null==(e=h[c])?void 0:e[t])&&(n=h[c][t][0],l=h[c][t][1],g=Number.isFinite(l)),isNaN(n))return;const x=r.tooltipUtil.getAllMarkers();if(x.length)for(let e=0;e<o.seriesData.series.length;e++){const r=h[e];if(o.globals.comboCharts&&void 0===r&&x.splice(e,0,null),x[e]&&r&&r.length){let l,c=null==(i=r[t])?void 0:i[1];x[e].setAttribute("cx",n);const h=null!=(s=x[e].getAttribute("shape"))?s:"circle";if("rangeArea"===o.config.chart.type&&!o.globals.comboCharts){const i=o.seriesData.series[e].length;l=t<i?null==(a=r[t+i])?void 0:a[1]:NaN;c-=Math.abs(c-l)/2}if(null!==c&&!isNaN(c)&&c<o.layout.gridHeight+u&&c+u>0){const t=p.getMarkerPath(n,c,h,u);x[e].setAttribute("d",t)}else x[e].setAttribute("d","")}}this.moveXCrosshairs(n),r.fixedTooltip||this.moveTooltip(n,g?l:o.layout.gridHeight,u,this.isShortPlot()?this.columnExtent(t,u):null)}columnExtent(t,e){var i,s,a,r,o,n,l,c;const h=this.w,d=h.globals,p=d.pointsArray||[],u="rangeArea"===h.config.chart.type&&!d.comboCharts;let g=1/0,x=-1/0;for(let f=0;f<p.length;f++){if((null==(i=d.collapsedSeriesIndices)?void 0:i.indexOf(f))>-1||(null==(s=d.ancillaryCollapsedSeriesIndices)?void 0:s.indexOf(f))>-1)continue;const m=[null==(r=null==(a=p[f])?void 0:a[t])?void 0:r[1]];if(u){const e=null!=(n=null==(o=h.seriesData.series[f])?void 0:o.length)?n:0;if(t>=e)continue;m.push(null==(c=null==(l=p[f])?void 0:l[t+e])?void 0:c[1])}for(const t of m)Number.isFinite(t)&&t>=-e&&t<=h.layout.gridHeight+e&&(g=Math.min(g,t),x=Math.max(x,t))}return Number.isFinite(g)?{top:g-e,bottom:x+e}:null}moveStickyTooltipOverBars(t,e){var i,s,a,r,o;const n=this.w,l=this.ttCtx;let c=n.globals.columnSeries?n.globals.columnSeries.length:n.seriesData.series.length;n.config.chart.stacked&&(c=n.globals.barGroups.length);let h=c>=2&&c%2==0?Math.floor(c/2):Math.floor(c/2)+1;if(n.globals.isBarHorizontal){h=new Pi(this.w).getActiveConfigSeriesIndex("desc")+1}const d=!!n.globals.barCanvasCoords;let p=d?null:n.dom.baseEl.querySelector(`.apexcharts-bar-series .apexcharts-series[rel='${h}'] path[j='${t}'], .apexcharts-candlestick-series .apexcharts-series[rel='${h}'] path[j='${t}'], .apexcharts-boxPlot-series .apexcharts-series[rel='${h}'] path[j='${t}'], .apexcharts-violin-series .apexcharts-series[rel='${h}'] path.apexcharts-violin-area[j='${t}'], .apexcharts-rangebar-series .apexcharts-series[rel='${h}'] path[j='${t}']`);p||d||"number"!=typeof e||(p=n.dom.baseEl.querySelector(`.apexcharts-bar-series .apexcharts-series[data\\:realIndex='${e}'] path[j='${t}'],\n .apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='${e}'] path[j='${t}'],\n .apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='${e}'] path[j='${t}'],\n .apexcharts-violin-series .apexcharts-series[data\\:realIndex='${e}'] path.apexcharts-violin-area[j='${t}'],\n .apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='${e}'] path[j='${t}']`));const u=d?this._paintedBarFor(h,t,e):null,g=!!p||!!u;let x=p?parseFloat(null!=(i=p.getAttribute("cx"))?i:"0"):u?null!=(s=u.bodyCx)?s:u.cx:0,f=p?parseFloat(null!=(a=p.getAttribute("cy"))?a:"0"):u?u.cy:0;const m=p?parseFloat(null!=(r=p.getAttribute("barWidth"))?r:"0"):u?u.barWidth:0;if(!l.getElGrid())return;const b=ks.plotRect(n),y=p?p.classList.contains("apexcharts-candlestick-area")||p.classList.contains("apexcharts-boxPlot-area"):"candlestick"===(null==u?void 0:u.type)||"boxPlot"===(null==u?void 0:u.type),v=(p?p.classList.contains("apexcharts-violin-area"):"violin"===(null==u?void 0:u.type))&&n.axisFlags.isXNumeric&&!n.globals.isBarHorizontal?this._violinsMiddleAt(t):null;if(null!=v)x=v;else if(n.axisFlags.isXNumeric){if(g&&!y){const e=this._datapointCenterXFromBars(t);null!=e?x=e:x-=c%2!=0?m/2:0}g&&y&&(x-=m/2)}else if(!n.globals.isBarHorizontal){const e=l.xAxisTicksPositions[t-1]+l.dataPointsDividedWidth/2;x=isNaN(e)?l.xAxisTicksPositions[t]-l.dataPointsDividedWidth/2:e,isNaN(x)&&u&&(x=u.cx)}if(n.globals.isBarHorizontal?f-=l.tooltipRect.ttHeight:ks.isFollowCursor(n)?f=l.e.clientY-b.top-l.tooltipRect.ttHeight/2:f+l.tooltipRect.ttHeight+15>n.layout.gridHeight&&(f=n.layout.gridHeight),n.globals.isBarHorizontal||this.moveXCrosshairs(x),!l.fixedTooltip){if(n.globals.isBarHorizontal&&!ks.isFollowCursor(n)){if(this.placeHorizontalSharedTooltip(t))return}const e=this.isShortPlot()?null!=(o=this._barsExtentInGrid(t))?o:{top:0,bottom:n.layout.gridHeight}:null,i=Number.isFinite(f)&&(0!==f||g||ks.isFollowCursor(n))?f:n.layout.gridHeight;this.moveTooltip(x,i,null,e)}}_paintedBarFor(t,e,i){var s,a,r;const o=this.w,n=o.globals.barCanvasCoords;if(!n)return null;const l=o.dom.baseEl.querySelectorAll(["bar","candlestick","boxPlot","violin","rangebar"].map(e=>`.apexcharts-${e}-series .apexcharts-series[rel='${t}']`).join(", "));for(let t=0;t<l.length;t++){const i=l[t].getAttribute("data:realIndex");if(null!==i&&(null==(s=n[i])?void 0:s[e]))return n[i][e]}if("number"==typeof i&&(null==(a=n[i])?void 0:a[e]))return n[i][e];for(const t in n)if(null==(r=n[t])?void 0:r[e])return n[t][e];return null}_paintedAt(t,e){var i;const s=this.w.globals.barCanvasCoords;if(!s)return null;const a=this._hiddenSeries();let r=1/0,o=1/0,n=-1/0,l=-1/0;for(const c in s){const h=null==(i=s[c])?void 0:i[t],d=null==h?void 0:h.bounds;d&&e.includes(h.type)&&!a.includes(Number(c))&&(r=Math.min(r,d.left),o=Math.min(o,d.top),n=Math.max(n,d.right),l=Math.max(l,d.bottom))}return Number.isFinite(r)?{left:r,top:o,right:n,bottom:l}:null}_hiddenSeries(){const t=this.w.globals;return[...t.collapsedSeriesIndices||[],...t.ancillaryCollapsedSeriesIndices||[]]}_violinsMiddleAt(t){var e,i;const s=this.w;let a=1/0,r=-1/0;const o=t=>{Number.isFinite(t)&&(a=Math.min(a,t),r=Math.max(r,t))},n=s.globals.barCanvasCoords;if(n){const i=this._hiddenSeries();for(const s in n){const a=null==(e=n[s])?void 0:e[t];"violin"!==(null==a?void 0:a.type)||i.includes(Number(s))||o(a.cx)}}else{const e=s.dom.baseEl.querySelectorAll(`.apexcharts-violin-series .apexcharts-series:not(.apexcharts-series-collapsed) path.apexcharts-violin-area[j='${t}']`);for(let t=0;t<e.length;t++)o(parseFloat(null!=(i=e[t].getAttribute("data:center"))?i:""))}return Number.isFinite(a)?(a+r)/2:null}_barsExtentInGrid(t){var e,i;const s=this.w,a=s.dom.baseEl.querySelectorAll(`.apexcharts-bar-series path[j='${t}'],.apexcharts-rangebar-series path[j='${t}'],.apexcharts-candlestick-series path[j='${t}'],.apexcharts-boxPlot-series path[j='${t}'],.apexcharts-violin-series path[j='${t}']`),r=this._paintedAt(t,["bar","rangebar","candlestick","boxPlot","violin"]);if(!a.length&&!r)return null;let o=1/0,n=-1/0;if(r){const t=ks.plotRect(s);o=t.top+r.top*t.zoom,n=t.top+r.bottom*t.zoom}for(let t=0;t<a.length;t++){const s=a[t],r=s.parentNode;if(null==(i=null==(e=null==r?void 0:r.classList)?void 0:e.contains)?void 0:i.call(e,"apexcharts-series-collapsed"))continue;const l=s.getBoundingClientRect();0===l.width&&0===l.height||(o=Math.min(o,l.top),n=Math.max(n,l.bottom))}if(!Number.isFinite(o))return null;const l=s.dom.elWrap.getBoundingClientRect().top+s.layout.translateY;return{top:o-l,bottom:n-l}}_datapointCenterXFromBars(t){var e,i;const s=this.w,a=s.dom.baseEl.querySelectorAll(`.apexcharts-bar-series path[j='${t}'],.apexcharts-rangebar-series path[j='${t}']`),r=this._paintedAt(t,["bar","rangebar"]);if(!a.length&&!r)return null;let o=1/0,n=-1/0;if(r){const t=ks.plotRect(s);o=t.left+r.left*t.zoom,n=t.left+r.right*t.zoom}for(const t of a){const s=t.parentNode;if(null==(i=null==(e=null==s?void 0:s.classList)?void 0:e.contains)?void 0:i.call(e,"apexcharts-series-collapsed"))continue;const a=t.getBoundingClientRect();0===a.width&&0===a.height||(a.left<o&&(o=a.left),a.right>n&&(n=a.right))}return isFinite(o)?Ms.screenXToPlotPx(s,(o+n)/2):null}placeHorizontalSharedTooltip(t){var e,i;const s=this.w,a=this.ttCtx,r=a.getElTooltip();if(!r)return!1;if(!a.getElGrid())return!1;const o=s.dom.baseEl.querySelectorAll(`.apexcharts-bar-series path[j='${t}'],.apexcharts-rangebar-series path[j='${t}'],.apexcharts-boxPlot-series path[j='${t}'],.apexcharts-violin-series path.apexcharts-violin-area[j='${t}'],.apexcharts-violin-series path.apexcharts-violin-points[j='${t}']`),n=this._paintedAt(t,["bar","rangebar","boxPlot","violin"]);if(!o.length&&!n)return!1;let l=1/0,c=-1/0,h=1/0,d=-1/0;if(n){const t=ks.plotRect(s);l=t.left+n.left*t.zoom,c=t.left+n.right*t.zoom,h=t.top+n.top*t.zoom,d=t.top+n.bottom*t.zoom}for(const t of o){const s=t.parentNode;if(null==(i=null==(e=null==s?void 0:s.classList)?void 0:e.contains)?void 0:i.call(e,"apexcharts-series-collapsed"))continue;const a=t.getBoundingClientRect();0===a.width&&0===a.height||(a.left<l&&(l=a.left),a.right>c&&(c=a.right),a.top<h&&(h=a.top),a.bottom>d&&(d=a.bottom))}if(!isFinite(l))return!1;const p=s.dom.elWrap.getBoundingClientRect(),u=l-p.left,g=c-p.left,x=(u+g)/2,f=h-p.top,m=d-p.top,{left:b,top:y}=ks.plotInWrap(s),v=y+s.layout.gridHeight,w=b+s.layout.gridWidth,A=this.placeOnShortPlot(x,f,m);return A?(this.applyTooltipPosition(r,A),!0):(this.applyTooltipPosition(r,this.placeAroundBar({top:f,bottom:m,left:u,right:g},{top:y,bottom:v,left:b,right:w},t)),!0)}}function Ys(t){const e=t=>`<svg viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">${t}</svg>`;switch(t){case"square":case"rect":return e('<rect x="1" y="1" width="10" height="10" rx="1" fill="currentColor"/>');case"line":return e('<rect x="0" y="5" width="12" height="2" rx="1" fill="currentColor"/>');case"diamond":return e('<path d="M6 0.5 L11.5 6 L6 11.5 L0.5 6 Z" fill="currentColor"/>');case"triangle":return e('<path d="M6 1 L11.2 10.5 L0.8 10.5 Z" fill="currentColor"/>');case"cross":return e('<path d="M2 2 L10 10 M10 2 L2 10" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>');case"plus":return e('<path d="M6 1 L6 11 M1 6 L11 6" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>');case"star":return e('<path d="M6 0.5 L7.5 4.4 L11.5 4.7 L8.4 7.2 L9.5 11.1 L6 8.9 L2.5 11.1 L3.6 7.2 L0.5 4.7 L4.5 4.4 Z" fill="currentColor"/>');case"sparkle":return e('<path d="M6 0.5 L7 5 L11.5 6 L7 7 L6 11.5 L5 7 L0.5 6 L5 5 Z" fill="currentColor"/>');default:return e('<circle cx="6" cy="6" r="5" fill="currentColor"/>')}}class Ws{constructor(t){var e;this.w=t.w,this.ttCtx=t,this.ctx=t.ctx,this.tooltipPosition=null!=(e=t.tooltipPosition)?e:new Hs(t),this.enlargedPoints=new Set}drawDynamicPoints(){const t=this.w,e=new ae(this.w),i=new ce(this.w,this.ctx),s=[...t.dom.baseEl.querySelectorAll(".apexcharts-series")];t.config.chart.stacked&&s.sort((t,e)=>parseFloat(t.getAttribute("data:realIndex"))-parseFloat(e.getAttribute("data:realIndex")));for(let a=0;a<s.length;a++){const r=s[a].querySelector(".apexcharts-series-markers-wrap");if(null!==r){let s=`apexcharts-marker w${(Math.random()+1).toString(36).substring(4)}`;(ce.markersAreInert(t)||ks.isCanvasMarkerChart(t))&&(s+=" no-pointer-events");const a=i.getMarkerConfig({cssClass:s,seriesIndex:Number(r.getAttribute("data:realIndex"))}),o=e.drawMarker(0,0,a);o.node.setAttribute("default-marker-size",0);const n=y.createElementNS(xt,"g");n.classList.add("apexcharts-series-markers"),n.appendChild(o.node),r.appendChild(n)}}}enlargeCurrentPoint(t,e,i=null,s=null){const a=this.w;let r=a.config.markers.hover.size;"bubble"!==a.config.chart.type&&(r=this.newPointSize(t,e));let o=e.getAttribute("cx"),n=e.getAttribute("cy"),l=this.tooltipPosition.isShortPlot()?this.markExtent(e,n,r):null;if(null!==i&&null!==s&&(o=i,n=s),this.tooltipPosition.moveXCrosshairs(o),!this.ttCtx.fixedTooltip){if("radar"===a.config.chart.type){if(!this.ttCtx.getElGrid())return;const t=ks.plotRect(a);if(o=this.ttCtx.e.clientX-t.left,this.tooltipPosition.isShortPlot()){const e=this.ttCtx.e.clientY-t.top;l={top:e,bottom:e}}}this.tooltipPosition.moveTooltip(o,n,r,l)}}enlargePaintedPoint(t,e,i){var s;const a=this.w;this.resetPointsSize();const r="bubble"===a.config.chart.type;let o=a.config.markers.hover.size;void 0!==o||r||(o=t.size+a.config.markers.hover.sizeOffset),void 0!==o&&(o=Math.max(0,o));const n=r?t.size:null!=o?o:0,l=r?null:a.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${t.i}'] .apexcharts-series-markers path`);if(l){const e=null!=(s=l.getAttribute("shape"))?s:"circle";l.setAttribute("d",new ae(a).getMarkerPath(t.cx,t.cy,e,o))}this.tooltipPosition.moveXCrosshairs(e),this.ttCtx.fixedTooltip||this.tooltipPosition.moveTooltip(e,i,o,this.tooltipPosition.isShortPlot()?{top:t.cy-n,bottom:t.cy+n}:null)}enlargePoints(t){var e,i;const s=this.w,a=this,r=this.ttCtx,o=t;this.resetEnlargedPoints();const n=s.dom.baseEl.querySelectorAll(`.apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker[rel="${o}"]`);let l=s.config.markers.hover.size,c=null,h=null,d=1/0,p=-1/0;for(let t=0;t<n.length;t++){const r=n[t].getAttribute("index");void 0===l&&(l=s.globals.markers.size[r]+s.config.markers.hover.sizeOffset),a.newPointSize(o,n[t]),c=null!=(e=n[t].getAttribute("cx"))?e:"0",h=null!=(i=n[t].getAttribute("cy"))?i:"0";const u=parseFloat(h);Number.isFinite(u)&&(u<d&&(d=u),u>p&&(p=u))}null!==c&&(a.tooltipPosition.moveXCrosshairs(parseFloat(c)),r.fixedTooltip||a.tooltipPosition.moveTooltip(parseFloat(c),parseFloat(h),l,a.tooltipPosition.isShortPlot()?a.columnMark(o,d,p,l):null))}columnMark(t,e,i,s){const a=Number.isFinite(s)?s:0;let r=Number.isFinite(e)?{top:e-a,bottom:i+a}:null;if(this.w.globals.comboCharts&&this.ttCtx.tooltipUtil.hasBars()){const e=this.tooltipPosition._barsExtentInGrid(t);e&&(r=r?{top:Math.min(r.top,e.top),bottom:Math.max(r.bottom,e.bottom)}:e)}return r}markExtent(t,e,i){var s;const a=this.w;if("radar"===a.config.chart.type)return null;if("bubble"===a.config.chart.type){const e=null==(s=t.getBBox)?void 0:s.call(t);if(e&&e.height>0)return{top:e.y,bottom:e.y+e.height}}const r=parseFloat(String(e)),o=Number.isFinite(i)?i:0;return Number.isFinite(r)?{top:r-o,bottom:r+o}:null}resetEnlargedPoints(){if(0===this.enlargedPoints.size)return;const t=Array.from(this.enlargedPoints);for(let e=0;e<t.length;e++)this.oldPointSize(t[e]);this.enlargedPoints.clear()}newPointSize(t,e){const i=this.w;let s=i.config.markers.hover.size;if("0"!==e.getAttribute("default-marker-size")){const t=parseInt(e.getAttribute("index"),10);void 0===s&&(s=i.globals.markers.size[t]+i.config.markers.hover.sizeOffset),s<0&&(s=0);const a=this.ttCtx.tooltipUtil.getPathFromPoint(e,s);return e.setAttribute("d",a),this.enlargedPoints.add(e),s}}oldPointSize(t){const e=parseFloat(t.getAttribute("default-marker-size")),i=this.ttCtx.tooltipUtil.getPathFromPoint(t,e);t.setAttribute("d",i),this.enlargedPoints.delete(t)}resetPointsSize(){var t;const e=this.w;this.enlargedPoints.clear();const i=e.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker");for(let e=0;e<i.length;e++){const s=parseFloat(null!=(t=i[e].getAttribute("default-marker-size"))?t:"0");if(A.isNumber(s)&&s>0){const t=this.ttCtx.tooltipUtil.getPathFromPoint(i[e],s);i[e].setAttribute("d",t)}else i[e].setAttribute("d","M0,0")}}}class $s{constructor(t){this.w=t.w,this.ttCtx=t,this.tooltipUtil=new ks(t)}drawSeriesTexts({shared:t=!0,ttItems:e,i:i=0,j:s=null,y1:a,y2:r,e:o}){const n=this.w;void 0!==n.config.tooltip.custom?this.handleCustomTooltip({i:i,j:s,y1:a,y2:r,w:n}):this.toggleActiveInactiveSeries(t,i);const l=this.getValuesToPrint({i:i,j:s});this.printLabels({i:i,j:s,values:l,ttItems:e,shared:t,e:o});const c=this.ttCtx.getElTooltip();if(c){const t=c.getBoundingClientRect();this.ttCtx.tooltipRect.ttWidth=t.width,this.ttCtx.tooltipRect.ttHeight=t.height}}printLabels({i:t,j:e,values:i,ttItems:s,shared:a,e:r}){const o=this.w,{xVal:n,zVal:l,xAxisTTVal:c}=i,h=o.seriesData.series.length,d=null!==e&&o.config.plotOptions.bar.distributed?o.globals.colors[e]:o.globals.colors[t],p=1===(null==s?void 0:s.length),u=p?1:h;for(let i=0;i<u;i++){const u=p?0:o.config.tooltip.inverseOrder?h-1-i:i,g=this.computeSeriesRow({i:t,j:e,t:i,tIndex:u,shared:a,e:r,basePColor:d});this.DOMHandling({i:t,t:u,j:e,ttItems:s,values:{val:g.val,goalVals:g.goalVals,xVal:n,xAxisTTVal:c,zVal:l},seriesName:g.seriesName,shared:a,pColor:g.pColor})}}computeSeriesRow({i:t,j:e,tIndex:i,shared:s,e:a,basePColor:r}){const o=this.w;let c,h=this.getFormatters(t),d=r,p=[],u="treemap"===o.config.chart.type?h.yLbTitleFormatter(String(o.config.series[t].data[e].x),{series:o.seriesData.series,seriesIndex:t,dataPointIndex:e,w:o}):this.getSeriesName({fn:h.yLbTitleFormatter,index:t,seriesIndex:t,j:e});return o.globals.axisCharts&&(s?(h=this.getFormatters(i),u=this.getSeriesName({fn:h.yLbTitleFormatter,index:i,seriesIndex:t,j:e}),d=o.globals.colors[i],c=this.formatYValue(h,i,e),p=this.formatGoalVals(h,i,e)):(d=this.resolvePatternColor(a,d,t),c=this.formatYValue(h,t,e),p=this.formatGoalVals(h,t,e))),null===e&&(c=h.yLbFormatter(o.seriesData.series[t],l(n({},o),{w:o,series:o.seriesData.series,seriesIndex:t,dataPointIndex:t}))),{seriesName:u,val:c,goalVals:p,pColor:d}}formatYValue(t,e,i){var s,a,r,o;const n=this.w,l=n.waterfallData&&n.waterfallData.values;return l&&l[e]&&null!=l[e][i]?t.yLbFormatter(l[e][i],{series:l,seriesIndex:e,dataPointIndex:i,w:n}):this.isRangeSeries(e)?t.yLbFormatter(null==(a=null==(s=n.rangeData.seriesRangeStart)?void 0:s[e])?void 0:a[i],{series:n.rangeData.seriesRangeStart,seriesIndex:e,dataPointIndex:i,w:n})+" - "+t.yLbFormatter(null==(o=null==(r=n.rangeData.seriesRangeEnd)?void 0:r[e])?void 0:o[i],{series:n.rangeData.seriesRangeEnd,seriesIndex:e,dataPointIndex:i,w:n}):t.yLbFormatter(n.seriesData.series[e][i],{series:n.seriesData.series,seriesIndex:e,dataPointIndex:i,w:n})}isRangeSeries(t){var e;const i=this.w,s=(null==(e=i.config.series[t])?void 0:e.type)||i.config.chart.type;return i.axisFlags.isRangeData&&(it(s)||/^range/.test(_[s]||s))}formatGoalVals(t,e,i){var s;const a=this.w,r=null==(s=a.seriesData.seriesGoals[e])?void 0:s[i];return Array.isArray(r)?r.map(s=>({attrs:s,val:t.yLbFormatter(s.value,{seriesIndex:e,dataPointIndex:i,w:a})})):[]}resolvePatternColor(t,e,i){var s,a,r;const o=this.w,n=ks.hoverTarget(t);if((null==(s=null==n?void 0:n.getAttribute)?void 0:s.call(n,"index"))!==String(i))return e;const l=n.getAttribute("fill");if(!l||"none"===l||"transparent"===l)return e;if(-1===l.indexOf("url"))return l;if(-1===l.indexOf("Pattern"))return e;const c=o.dom.baseEl.querySelector(l.substr(4).slice(0,-1));return null!=(r=null==(a=null==c?void 0:c.childNodes[0])?void 0:a.getAttribute("stroke"))?r:e}getFormatters(t){const e=this.w;let i,s=e.formatters.yLabelFormatters[t];return void 0!==e.formatters.ttVal?Array.isArray(e.formatters.ttVal)?(s=e.formatters.ttVal[t]&&e.formatters.ttVal[t].formatter,i=e.formatters.ttVal[t]&&e.formatters.ttVal[t].title&&e.formatters.ttVal[t].title.formatter):(s=e.formatters.ttVal.formatter,"function"==typeof e.formatters.ttVal.title.formatter&&(i=e.formatters.ttVal.title.formatter)):i=e.config.tooltip.y.title.formatter,"function"!=typeof s&&(s=e.formatters.yLabelFormatters[0]?e.formatters.yLabelFormatters[0]:function(t){return t}),"function"!=typeof i&&(i=function(t){return t?t+": ":""}),{yLbFormatter:s,yLbTitleFormatter:i}}getSeriesName({fn:t,index:e,seriesIndex:i,j:s}){const a=this.w;return t(String(a.seriesData.seriesNames[e]),{series:a.seriesData.series,seriesIndex:i,dataPointIndex:s,w:a})}rowRefs(t){return t.ttRefs||(t.ttRefs={marker:t.querySelector(".apexcharts-tooltip-marker"),text:t.querySelector(".apexcharts-tooltip-text"),yLabel:t.querySelector(".apexcharts-tooltip-text-y-label"),yValue:t.querySelector(".apexcharts-tooltip-text-y-value"),goalsLabel:t.querySelector(".apexcharts-tooltip-text-goals-label"),goalsValue:t.querySelector(".apexcharts-tooltip-text-goals-value"),zLabel:t.querySelector(".apexcharts-tooltip-text-z-label"),zValue:t.querySelector(".apexcharts-tooltip-text-z-value")}),t.ttRefs}DOMHandling({i:t,t:e,j:i,ttItems:s,values:a,seriesName:r,shared:o,pColor:n}){var l,c,h;const d=this.w,p=this.ttCtx,{val:u,goalVals:g,xVal:x,xAxisTTVal:f,zVal:m}=a;if(!s||!s[e])return;const b=this.rowRefs(s[e]),y=o?e:t;let v=null;v=s[e].children,d.config.tooltip.fillSeriesColor&&(s[e].style.backgroundColor=n,v[0].style.display="none"),p.showTooltipTitle&&(null===p.tooltipTitle&&(p.tooltipTitle=d.dom.baseEl.querySelector(".apexcharts-tooltip-title")),p.tooltipTitle&&(p.tooltipTitle.innerHTML=x)),p.isXAxisTooltipEnabled&&p.xaxisTooltipText&&(p.xaxisTooltipText.innerHTML=""!==f?f:x);const w=b.yLabel;w&&(w.innerHTML=r||"");const A=b.yValue;if(A&&(A.innerHTML=void 0!==u?u:""),v[0]&&v[0].classList.contains("apexcharts-tooltip-marker")){d.config.tooltip.marker.fillColors&&Array.isArray(d.config.tooltip.marker.fillColors)&&(n=d.config.tooltip.marker.fillColors[y]),d.config.tooltip.fillSeriesColor?v[0].style.backgroundColor=n:v[0].style.color=n;const t=d.config.markers.shape;Array.isArray(t)&&b.shape!==t[y]&&(b.shape=t[y],v[0].setAttribute("shape",b.shape),v[0].innerHTML=Ys(b.shape))}d.config.tooltip.marker.show||(v[0].style.display="none");const S=p.ctx.highlightFilter;S&&S.tooltipRow(b,y,i,this.getFormatters(y));const C=b.goalsLabel,k=b.goalsValue;if(g.length&&d.seriesData.seriesGoals[y]){const t=()=>{let t="<div>",e="<div>";g.forEach(i=>{t+=` <div style="display: flex"><span class="apexcharts-tooltip-marker" style="background-color: ${i.attrs.strokeColor}; height: 3px; border-radius: 0; top: 5px;"></span> ${i.attrs.name}</div>`,e+=`<div>${i.val}</div>`}),C.innerHTML=t+"</div>",k.innerHTML=e+"</div>"};o?d.seriesData.seriesGoals[e][i]&&Array.isArray(d.seriesData.seriesGoals[e][i])?t():(C.innerHTML="",k.innerHTML=""):t()}else C.innerHTML="",k.innerHTML="";if(null!==m){b.zLabel.innerHTML=d.config.tooltip.z.title;b.zValue.innerHTML=void 0!==m?m:""}if(o&&v[0]){if(d.config.tooltip.hideEmptySeries){const t=d.rangeData,s=this.isRangeSeries(e)?!(null==(l=t.seriesRangeStart[e])?void 0:l[i])&&!(null==(c=t.seriesRangeEnd[e])?void 0:c[i]):0===(null==(h=d.seriesData.series[e])?void 0:h[i]);b.text.style.display=s?"none":"",b.marker.style.display=s||!d.config.tooltip.marker.show||d.config.tooltip.fillSeriesColor?"none":""}null==u||d.globals.ancillaryCollapsedSeriesIndices.indexOf(e)>-1||d.globals.collapsedSeriesIndices.indexOf(e)>-1||Array.isArray(p.tConfig.enabledOnSeries)&&-1===p.tConfig.enabledOnSeries.indexOf(e)?v[0].parentNode.style.display="none":v[0].parentNode.style.display=d.config.tooltip.items.display}else Array.isArray(p.tConfig.enabledOnSeries)&&-1===p.tConfig.enabledOnSeries.indexOf(y)&&(v[0].parentNode.style.display="none")}toggleActiveInactiveSeries(t,e){var i;const s=this.w;if(t)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");const t=1===(null==(i=this.ttCtx.ttItems)?void 0:i.length)?0:e,a=s.dom.baseEl.querySelector(`.apexcharts-tooltip-series-group-${t}`);if(a){const t=a;t.classList.add("apexcharts-active"),t.style.display=s.config.tooltip.items.display}}}getValuesToPrint({i:t,j:e}){var i,s,a,r,o,n,l,c,h,d;const p=this.w,u=p.seriesData.seriesX.map(t=>t.length>0?t:[]);let g="",x="",f=null,m=null;const b={series:p.seriesData.series,seriesIndex:t,dataPointIndex:e,w:p},y=p.formatters.ttZFormatter;if(null===e)m=p.seriesData.series[t];else if(p.axisFlags.isXNumeric&&"treemap"!==p.config.chart.type){if(g=u[t][e],0===u[t].length){g=u[this.tooltipUtil.getFirstActiveXArray(u)][e]}}else{if(new vs(this.w).isFormatXY()){const i=p.config.series[t].data[e];g=null==i?"":i.x}else g=void 0!==p.labelData.labels[e]?p.labelData.labels[e]:""}const v=g;if(p.axisFlags.isXNumeric&&"datetime"===p.config.xaxis.type){g=new C(this.w).xLabelFormat(p.formatters.ttKeyFormatter,v,v,{i:void 0,dateFormatter:new S(this.w).formatDate,w:this.w})}else g=p.globals.isBarHorizontal?p.formatters.yLabelFormatters[0](v,b):null!=(a=null==(s=(i=p.formatters).xLabelFormatter)?void 0:s.call(i,v,b))?a:v;return void 0!==p.config.tooltip.x.formatter&&(g=null!=(n=null==(o=(r=p.formatters).ttKeyFormatter)?void 0:o.call(r,v,b))?n:v),p.axisFlags.isDataXYZ&&p.seriesData.seriesZ.length>0&&(null==(l=p.seriesData.seriesZ[t])?void 0:l.length)>0&&(f=null==y?void 0:y(null!=(c=p.seriesData.seriesZ[t][e])?c:null,p)),x="function"==typeof p.config.xaxis.tooltip.formatter?null==(d=(h=p.formatters).xaxisTooltipFormatter)?void 0:d.call(h,v,b):g,{val:Array.isArray(m)?m.join(" "):m,xVal:Array.isArray(g)?g.join(" "):g,xAxisTTVal:Array.isArray(x)?x.join(" "):x,zVal:f}}handleCustomTooltip({i:t,j:e,y1:i,y2:s,w:a}){const r=this.ttCtx.getElTooltip();let o=a.config.tooltip.custom;if(Array.isArray(o)&&(o=o[t]),"function"!=typeof o)return;const n=o({ctx:this.ttCtx.ctx,series:a.seriesData.series,seriesIndex:t,dataPointIndex:e,y1:i,y2:s,w:a});if(r){const t=r.querySelector(".apexcharts-tooltip-arrow");"string"==typeof n||"number"==typeof n?r.innerHTML=String(n):null!=n&&(n instanceof Element||"string"==typeof n.nodeName)&&(r.innerHTML="",r.appendChild(n.cloneNode(!0))),t&&r.appendChild(t)}}}class Gs{constructor(t){this.w=t.w,this.ttCtx=t,this.hotCell=null}hoverCell(t,e=-1,i=-1){const s=this.w,a=this.hotCell;if(a&&a[0]===e&&a[1]===i)return;const r=this.ttCtx.ctx,o=(e,i)=>{var a,o;const n={seriesIndex:i[0],dataPointIndex:i[1],w:s};null==(o=null==(a=s.config.chart.events)?void 0:a[e])||o.call(a,t,r,n),ae._fireEvent(s,e,[t,r,n])};a&&o("dataPointMouseLeave",a),this.hotCell=e<0?null:[e,i],this.hotCell&&o("dataPointMouseEnter",this.hotCell)}getAttr(t,e){var i;return parseFloat(null!=(i=ks.hoverTarget(t).getAttribute(e))?i:"")}handleHeatTreeTooltip({e:t,opt:e,x:i,y:s,type:a}){const r=this.ttCtx,o=this.w,n=o.globals.activeRenderer,l="heatmap"===a&&n&&"canvas"===n.kind&&"function"==typeof n.hitTest,c=ks.hoverTarget(t);let h,d,p,u,g,x;if(l){const a=ks.plotRect(o),r=ks.eventPointer(t,e),l=n.hitTest((r.x-a.left)/a.zoom,(r.y-a.top)/a.zoom);if(!l)return{x:i,y:s,noHit:!0};h=l.seriesIndex,d=l.dataPointIndex,this.hoverCell(t,h,d),p=l.x,u=l.y,g=l.width,x=l.height}else{if(!c.classList.contains(`apexcharts-${a}-rect`))return{x:i,y:s};h=this.getAttr(t,"i"),d=this.getAttr(t,"j"),p=this.getAttr(t,"cx"),u=this.getAttr(t,"cy"),g=this.getAttr(t,"width"),x=this.getAttr(t,"height")}r.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:h,j:d,shared:!1,e:t}),o.interact.capturedSeriesIndex=h,o.interact.capturedDataPointIndex=d,r.tooltipPosition.moveXCrosshairs(p+g/2);const f=r.getElTooltip();if("heatmap"===a&&o.config.tooltip.arrow&&!ks.isFollowCursor(o)&&f){const t=ks.plotRect(o),e=o.dom.elWrap.getBoundingClientRect(),i=t.left-e.left,s=t.top-e.top;let a,n,m,b,y=null;if(l)a=p,n=u,m=p+g,b=u+x;else{const e=o.dom.baseEl.contains(c)?c:o.dom.baseEl.querySelector(`.apexcharts-heatmap-rect[i='${h}'][j='${d}']`)||c;y=e;const i=e.getBoundingClientRect();a=i.left-t.left,n=i.top-t.top,m=i.right-t.left,b=i.bottom-t.top}const v=(a+m)/2+i,w=n+s,A=b+s,S=s,C=s+o.layout.gridHeight,k=i,M=i+o.layout.gridWidth,T=r.tooltipPosition.placeOnShortPlot(v,w,A);if(T)return r.tooltipPosition.applyTooltipPosition(f,T),{x:T.x,y:T.y,positioned:!0};const D=r.tooltipPosition.placeAroundCell({top:w,bottom:A,left:a+i,right:m+i},{top:S,bottom:C,left:k,right:M},{el:y});return r.tooltipPosition.applyTooltipPosition(f,D),{x:D.x,y:D.y,positioned:!0}}const m=r.tooltipRect.ttWidth||0,b=r.tooltipRect.ttHeight||0,y=o.dom.elWrap.getBoundingClientRect(),{left:v,top:w}=ks.plotInWrap(o),A=v+o.layout.gridWidth,S=w+o.layout.gridHeight;let C=p+g+m/2;const k=u+x/2-b/2;C>o.layout.gridWidth/2&&(C=p+g-m/2),i=v+C,s=w+k;const M=ks.isFollowCursor(o),T=ks.eventPointer(t,e);M&&(i=T.x-y.left-(C>o.layout.gridWidth/2?m:0),s=T.y-y.top-(k>o.layout.gridHeight/2?b:0));let D=null;if(M){const t=T.y-y.top;D=r.tooltipPosition.placeOnShortPlot(T.x-y.left,t,t,{gapBelow:24})}else D=r.tooltipPosition.placeOnShortPlot(v+p+g/2,w+u,w+u+x);return D?{x:D.x,y:D.y,placement:D.placement,arrowX:D.arrowX}:(i+m>A&&(i=A-m),i<v&&(i=v),s+b>S&&(s=S-b),s<w&&(s=w),{x:i,y:s})}handleMarkerTooltip({e:t,opt:e,x:i,y:s}){const a=this.w,r=this.ttCtx;let o,n;if(ks.hoverTarget(t).classList.contains("apexcharts-marker")){const l=parseInt(e.paths.getAttribute("cx"),10),c=parseInt(e.paths.getAttribute("cy"),10);n=parseInt(e.paths.getAttribute("rel"),10);const h=A.findAncestor(e.paths,"apexcharts-series");o=h?parseInt(h.getAttribute("data:realIndex"),10):parseInt(e.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,r.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:o,j:n,shared:!r.showOnIntersect&&a.config.tooltip.shared,e:t}),"mouseup"===t.type&&r.markerClick(t,o,n),a.interact.capturedSeriesIndex=o,a.interact.capturedDataPointIndex=n,i=l,s=c,r.marker.enlargeCurrentPoint(n,e.paths,i,s)}return{x:i,y:s}}getPaintedMarker(t,e){const i=this.w;if(!ks.isCanvasMarkerChart(i)||(null==t?void 0:t.apexPaintedHit))return null;const s=ks.plotRect(i),a=ks.eventPointer(t,e),r=i.globals.activeRenderer.hitTestMarker((a.x-s.left)/s.zoom,(a.y-s.top)/s.zoom);return r?{i:r.seriesIndex,j:r.dataPointIndex,cx:r.x,cy:r.y,size:r.size}:null}handlePaintedMarkerTooltip({e:t,opt:e,marker:i}){var s;const a=this.w,r=this.ttCtx,{i:o,j:n}=i;Array.isArray(r.tConfig.enabledOnSeries)&&r.tConfig.enabledOnSeries.indexOf(o)<0?this.leavePaintedMark(t,e):(null==(s=r.cancelOffMarkHide)||s.call(r),r.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:o,j:n,shared:!1,e:t}),"mouseup"===t.type&&r.markerClick(t,o,n),a.interact.capturedSeriesIndex=o,a.interact.capturedDataPointIndex=n,r.marker.enlargePaintedPoint(i,Math.trunc(i.cx),Math.trunc(i.cy)))}leavePaintedMark(t,e){const i=this.w,s=this.ttCtx,a=s.getElTooltip();if(s.tConfig.interactive&&(null==a?void 0:a.classList.contains("apexcharts-active"))){if(void 0===s.offMarkHideTimeout){const a=ks.eventPointer(t,e);s.offMarkHideTimeout=setTimeout(()=>{s.offMarkHideTimeout=void 0,i.globals.isDestroyed||s.handleMouseOut(e)},s.interactiveHideDelay(a.x,a.y))}}else s.handleMouseOut(e)}handleBarTooltip({e:t,opt:e}){var i,s,a;const r=this.w,o=this.ttCtx,n=o.getElTooltip();let l=0,c=0,h=0,d=0;const p=this.getBarTooltipXY({e:t,opt:e});if(p.noHit)return void this.leavePaintedMark(t,e);if(null==(i=o.cancelOffMarkHide)||i.call(o),null===p.j&&0===p.barHeight&&0===p.barWidth)return;d=p.i;const u=p.j;if(p.byHitTest&&Array.isArray(o.tConfig.enabledOnSeries)&&!r.config.tooltip.shared&&o.tConfig.enabledOnSeries.indexOf(d)<0)o.handleMouseOut(e);else{if(r.interact.capturedSeriesIndex=d,r.interact.capturedDataPointIndex=null!==u?u:r.interact.capturedDataPointIndex,(r.globals.isBarHorizontal&&o.tooltipUtil.hasBars()||!r.config.tooltip.shared)&&(c=p.x,h=p.y,l=c),isNaN(h)&&(h=r.globals.svgHeight-o.tooltipRect.ttHeight),c+o.tooltipRect.ttWidth>r.layout.gridWidth?c-=o.tooltipRect.ttWidth:c<0&&(c=0),ks.isFollowCursor(r)){if(!o.getElGrid())return}if(!r.config.tooltip.shared){const t=r.globals.isBarHorizontal||null===p.barAnchorXInGrid?l:p.barAnchorXInGrid/ks.plotRect(r).zoom;o.tooltipPosition.moveXCrosshairs(t)}if(!o.fixedTooltip&&(!r.config.tooltip.shared||r.globals.isBarHorizontal&&o.tooltipUtil.hasBars())&&n){const t=o.tooltipRect.ttWidth||0,e=o.tooltipRect.ttHeight||0,i=!!r.config.tooltip.arrow,{barAnchorXInGrid:g,barAnchorYInGrid:x,barRectInGrid:f}=p,{left:m,top:b}=ks.plotInWrap(r),y={top:b,bottom:b+r.layout.gridHeight,left:m,right:m+r.layout.gridWidth};let v,w=null,A=null,S=c+m,C=h+b-e/2;const k=f&&{top:f.top+b,bottom:f.bottom+b,left:f.left+m,right:f.right+m};if(i&&r.globals.isBarHorizontal&&k){const t=o.tooltipPosition.placeAroundBar(k,y,null!=u?u:0,d);v=t.placement,S=t.x,C=t.y,A=t.arrowX,w=t.arrowY}else if(i&&null!=g&&null!=x){const i=g+m,n=m+r.layout.gridWidth/2,l=(null!=(s=null==f?void 0:f.left)?s:g)+m,c=(null!=(a=null==f?void 0:f.right)?a:g)+m+7,h=l-t-7,d=i<n-.5?["right","left"]:["left","right"],p=this._fitsBesideColumn(t),u=d.find(t=>p("right"===t?c:h));if(u||!k){if(v=null!=u?u:d[0],S="right"===v?c:h,k){const t=(k.top+k.bottom)/2;C=t-e/2,C<y.top&&(C=y.top),C+e>y.bottom&&(C=y.bottom-e),e>0&&(w=Math.max(10,Math.min(e-10,t-C)))}}else{const t=o.tooltipPosition.placeOverColumn(k,y);v=t.placement,S=t.x,C=t.y,A=t.arrowX,w=t.arrowY}}const M=f?(f.left+f.right)/2:null!=g?g:l,T=o.tooltipPosition.shortPlotPlacement,D=o.tooltipPosition.placeOnShortPlot(M+m,k?k.top:y.top,k?k.bottom:y.bottom);!D&&void 0===v&&T&&delete n.dataset.placement,o.tooltipPosition.applyTooltipPosition(n,D||{x:S,y:C,placement:v,arrowY:w,arrowX:A})}}}_fitsBesideColumn(t){const e=this.w.dom.elWrap.getBoundingClientRect(),i=e.width>0?e.width:1/0;let s;return e=>{var a,r,o;return!(e<0||e+t>i)&&(void 0===s&&(s=null!=(o=null==(r=(a=this.ttCtx.tooltipPosition).getVisibleRoom)?void 0:r.call(a))?o:null),!s||e>=s.left&&e+t<=s.right)}}getBarTooltipXY({e:t,opt:e}){const i=this.w;let s=null;const a=this.ttCtx;let r=0,o=0,n=0,l=0,c=0,h=null,d=null,p=null,u=null,g=null;const x=ks.hoverTarget(t),f=x.classList,m=ks.isCanvasBarChart(i)?this.getPaintedMark(t,e):this.getViolinMark(t,e),b=!!(null==m?void 0:m.noHit);if(m&&!b||f.contains("apexcharts-bar-area")||f.contains("apexcharts-candlestick-area")||f.contains("apexcharts-boxPlot-area")||f.contains("apexcharts-rangebar-area")){const f=x,b=m?m.rect:f.getBoundingClientRect(),y=ks.plotRect(i),v=b.height;c=b.height;const w=b.width,A=m?m.cx:parseInt(f.getAttribute("cx"),10),S=m?m.cy:parseInt(f.getAttribute("cy"),10);h=A,d=S,l=m?m.barWidth:parseFloat(f.getAttribute("barWidth"));const C=b.left-y.left,k=b.top-y.top,M=k+v/2;p=C+w/2,u=i.globals.isBarHorizontal?M:k,g={left:C,top:k,right:C+w,bottom:k+v};const T="touchmove"===t.type?t.touches[0].clientX:t.clientX;s=m?m.j:parseInt(f.getAttribute("j"),10),r=m?m.i:parseInt(f.parentNode.getAttribute("rel"),10)-1;const D=m?m.y1:f.getAttribute("data-range-y1"),_=m?m.y2:f.getAttribute("data-range-y2");i.globals.comboCharts&&!m&&(r=parseInt(f.parentNode.getAttribute("data:realIndex"),10));const F=t=>i.axisFlags.isXNumeric?A-w/2:!i.globals.isBarHorizontal&&"rangeBar"===i.config.chart.type&&i.config.plotOptions.bar.rangeBarGroupRows?A+w/2:A-a.dataPointsDividedWidth+w/2,L=()=>S-a.dataPointsDividedHeight+v/2-a.tooltipRect.ttHeight/2;a.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:r,j:s,y1:null!=D?parseFloat(D):null,y2:null!=_?parseFloat(_):null,shared:!a.showOnIntersect&&i.config.tooltip.shared,e:t}),ks.isFollowCursor(i)?i.globals.isBarHorizontal?(o=T-y.left+15,n=L()):(o=F(o),n=t.clientY-y.top-a.tooltipRect.ttHeight/2-15):i.globals.isBarHorizontal?(o=A,a.xyRatios&&o<a.xyRatios.baseLineInvertedY&&(o=A-a.tooltipRect.ttWidth),n=L()):(o=F(o),n=S)}return{x:o,y:n,barHeight:c,barWidth:l,i:r,j:s,barCx:h,barCy:d,barAnchorXInGrid:p,barAnchorYInGrid:u,barRectInGrid:g,noHit:b,byHitTest:!!(null==m?void 0:m.byHitTest)&&!(null==t?void 0:t.apexPaintedHit)}}getPaintedMark(t,e){var i,s,a,r;const o=this.w,n=this._paintedHit(t,e),l=null==n?void 0:n.hit,c=l?null==(s=null==(i=o.globals.barCanvasCoords)?void 0:i[l.seriesIndex])?void 0:s[l.dataPointIndex]:null;if(!n||!l||!c)return{noHit:!0};const h=l.seriesIndex,d=l.dataPointIndex;if("violin"===c.type)return this._violinMark(h,d,null,c)||{noHit:!0};const p=c.bounds,u=null!=l.width?l:p&&{x:p.left,y:p.top,width:p.right-p.left,height:p.bottom-p.top};if(!u)return{noHit:!0};const{plot:g}=n,x=g.left+u.x*g.zoom,f=g.top+u.y*g.zoom,m=u.width*g.zoom,b=u.height*g.zoom,y=t=>parseInt(String(t),10);return{i:h,j:d,rect:{left:x,top:f,right:x+m,bottom:f+b,width:m,height:b},cx:y(c.cx),cy:y(c.cy),barWidth:c.barWidth,y1:null!=(a=c.rangeY1)?a:null,y2:null!=(r=c.rangeY2)?r:null,byHitTest:!0}}_paintedHit(t,e){const i=this.w,s=i.globals.activeRenderer;if(!s||"function"!=typeof s.hitTest)return null;const a=ks.plotRect(i);if(null==t?void 0:t.apexPaintedHit)return{hit:t.apexPaintedHit,plot:a};const r=ks.eventPointer(t,e);return{hit:s.hitTest((r.x-a.left)/a.zoom,(r.y-a.top)/a.zoom),plot:a}}getViolinMark(t,e){var i,s,a,r;const o=this.w;if(ks.isCanvasViolinChart(o)){const r=null==(i=this._paintedHit(t,e))?void 0:i.hit,n=r?null==(a=null==(s=o.globals.barCanvasCoords)?void 0:s[r.seriesIndex])?void 0:a[r.dataPointIndex]:null;return n?"violin"!==n.type?null:this._violinMark(r.seriesIndex,r.dataPointIndex,null,n):{noHit:!0}}const n=ks.hoverTarget(t);if(!(null==(r=null==n?void 0:n.classList)?void 0:r.contains("apexcharts-violin-area")))return null;const l=n.parentNode;return this._violinMark(parseInt(l.getAttribute("data:realIndex"),10),parseInt(n.getAttribute("j"),10),l,null)}_violinMark(t,e,i,s){var a;const r=this.violinGlyphRect(t,e,i);if(!r)return null;const o=s?null:null==i?void 0:i.querySelector(`.apexcharts-violin-area[j='${e}']`),c=t=>{var e;return s?s[t]:parseFloat(null!=(e=null==o?void 0:o.getAttribute(t))?e:"")};return{i:t,j:e,rect:l(n({},r),{width:r.right-r.left,height:r.bottom-r.top}),cx:null!=(a=null==s?void 0:s.bodyCx)?a:c("cx"),cy:c("cy"),barWidth:c("barWidth"),y1:null,y2:null,byHitTest:!!s}}violinGlyphRect(t,e,i=null){var s,a,r;const o=this.w;let n=1/0,l=1/0,c=-1/0,h=-1/0;const d=(t,e,i,s)=>{n=Math.min(n,t),l=Math.min(l,e),c=Math.max(c,i),h=Math.max(h,s)},p=ks.isCanvasViolinChart(o)?null==(r=null==(a=null==(s=o.globals.barCanvasCoords)?void 0:s[t])?void 0:a[e])?void 0:r.bounds:null;if(p){const t=ks.plotRect(o);d(t.left+p.left*t.zoom,t.top+p.top*t.zoom,t.left+p.right*t.zoom,t.top+p.bottom*t.zoom)}const u=i||o.dom.baseEl.querySelector(`.apexcharts-violin-series .apexcharts-series[data\\:realIndex='${t}']`),g=u?u.querySelectorAll(`.apexcharts-violin-area[j='${e}'], .apexcharts-violin-points[j='${e}']`):[];for(let t=0;t<g.length;t++){const e=g[t].getBoundingClientRect();0===e.width&&0===e.height||d(e.left,e.top,e.right,e.bottom)}return isFinite(n)?{left:n,top:l,right:c,bottom:h}:null}}class Us{constructor(t){this.w=t.w,this.ttCtx=t}drawXaxisTooltip(){const t=this.w,e=this.ttCtx,i="bottom"===t.config.xaxis.position;e.xaxisOffY=i?t.layout.gridHeight+1:-t.layout.xAxisHeight-t.config.xaxis.axisTicks.height+3;const s=i?"apexcharts-xaxistooltip apexcharts-xaxistooltip-bottom":"apexcharts-xaxistooltip apexcharts-xaxistooltip-top",a=t.dom.elWrap;if(e.isXAxisTooltipEnabled){null===t.dom.baseEl.querySelector(".apexcharts-xaxistooltip")&&(e.xaxisTooltip=y.createElementNS("http://www.w3.org/1999/xhtml","div"),e.xaxisTooltip.setAttribute("class",s+" apexcharts-theme-"+t.config.tooltip.theme),a.appendChild(e.xaxisTooltip),e.xaxisTooltipText=y.createElementNS("http://www.w3.org/1999/xhtml","div"),e.xaxisTooltipText.classList.add("apexcharts-xaxistooltip-text"),e.xaxisTooltipText.style.fontFamily=t.config.xaxis.tooltip.style.fontFamily||t.config.chart.fontFamily,e.xaxisTooltipText.style.fontSize=t.config.xaxis.tooltip.style.fontSize,e.xaxisTooltip.appendChild(e.xaxisTooltipText))}}drawYaxisTooltip(){const t=this.w,e=this.ttCtx;for(let i=0;i<t.config.yaxis.length;i++){if(!e.yaxisTooltips[i])continue;const s=t.config.yaxis[i].opposite||t.config.yaxis[i].crosshairs.opposite;e.yaxisOffX=s?t.layout.gridWidth+1:1;const a=s?`apexcharts-yaxistooltip apexcharts-yaxistooltip-${i} apexcharts-yaxistooltip-right`:`apexcharts-yaxistooltip apexcharts-yaxistooltip-${i} apexcharts-yaxistooltip-left`,r=t.dom.elWrap;null===t.dom.baseEl.querySelector(`.apexcharts-yaxistooltip.apexcharts-yaxistooltip-${i}`)&&(e.yaxisTooltip=y.createElementNS("http://www.w3.org/1999/xhtml","div"),e.yaxisTooltip.setAttribute("class",a+" apexcharts-theme-"+t.config.tooltip.theme),r.appendChild(e.yaxisTooltip),(e.yaxisTooltipText||(e.yaxisTooltipText=[]))[i]=y.createElementNS("http://www.w3.org/1999/xhtml","div"),e.yaxisTooltipText[i].classList.add("apexcharts-yaxistooltip-text"),e.yaxisTooltip.appendChild(e.yaxisTooltipText[i]))}}setXCrosshairWidth(){var t;const e=this.w,i=this.ttCtx,s=i.getElXCrosshairs(),a=e.config.xaxis.crosshairs.width;let r=parseInt(a,10);if("tickWidth"===a)r=e.layout.gridWidth/e.labelData.labels.length;else if("barWidth"===a){const i=e.dom.baseEl.querySelector(".apexcharts-bar-area");r=i?parseFloat(null!=(t=i.getAttribute("barWidth"))?t:"0"):1}i.xcrosshairsWidth=Number.isFinite(r)?r:1,e.globals.isBarHorizontal&&(i.xcrosshairsWidth=0),null!==s&&i.xcrosshairsWidth>0&&s.setAttribute("width",String(i.xcrosshairsWidth))}handleYCrosshair(){const t=this.w,e=this.ttCtx;e.ycrosshairs=t.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),e.ycrosshairsHidden=t.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}drawYaxisTooltipText(t,e){const i=this.ttCtx,s=this.w,a=s.globals,r=a.seriesYAxisMap[t];if(i.yaxisTooltips[t]&&r.length>0){const o=s.formatters.yLabelFormatters[t];if(!i.getElGrid())return;const n=ks.plotRect(s),l=r[0],c=s.config.yaxis[t],h=a.minYArr[l],d=a.maxYArr[l],p=(e-n.top)/n.zoom,u=c.reversed?p/s.layout.gridHeight:1-p/s.layout.gridHeight;let g=h+u*(d-h);if(c.logarithmic){const t=c.logBase,e=0===h?-1:Math.log(h)/Math.log(t),i=0===d?0:Math.log(d)/Math.log(t);g=Math.pow(t,e+u*(i-e))}i.tooltipPosition.moveYCrosshairs(p),i.yaxisTooltipText[t].innerHTML=o(g),i.tooltipPosition.moveYAxisTooltip(t)}}}class js{constructor(t,e){this.w=t,this.ctx=e,this.tooltipUtil=new ks(this),this.tooltipLabels=new $s(this),this.tooltipPosition=new Hs(this),this.marker=new Ws(this),this.intersect=new Gs(this),this.axesTooltip=new Us(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.tooltipHidden=!1,this.xaxisTooltip=null,this.xaxisTooltipText=null,this.yaxisTooltip=null,this.yaxisTooltipText=null,this.yaxisTTEls=null,this.hoverBars=[],this.xaxisOffY=0,this.yaxisOffX=0,this.xcrosshairsWidth=0,this.ycrosshairs=null,this.ycrosshairsHidden=null,this.e=null,this.isBarShared=!t.globals.isBarHorizontal&&this.tConfig.shared,this.lastHoverTime=Date.now(),this.dimensionUpdateScheduled=!1,this.xyRatios=null,this.isXAxisTooltipEnabled=!1,this.yaxisTooltips=[],this.allTooltipSeriesGroups=[],this.xAxisTicksPositions=null,this.dataPointsDividedHeight=0,this.dataPointsDividedWidth=0,this.tooltipTitle=null,this._elTooltipCache=null,this._elXCrosshairsCache=null,this._elGridCache=null,this.legendLabels=null,this.ttItems=null,this.hoverAreaListeners=[],this.seriesHoverTimeout=void 0,this.interactiveHideTimeout=void 0,this.offMarkHideTimeout=void 0,this.clientX=0,this.clientY=0,this.tooltipRect={x:0,y:0,ttWidth:0,ttHeight:0}}get tConfig(){return this.w.config.tooltip}setupDimensionCache(){const t=this.w,e=this.getElTooltip();e&&("undefined"==typeof ResizeObserver||t.globals.resizeObserver||(t.globals.resizeObserver=new ResizeObserver(()=>{this.dimensionUpdateScheduled||(this.dimensionUpdateScheduled=!0,requestAnimationFrame(()=>{this.updateDimensionCache(),this.dimensionUpdateScheduled=!1}))}),t.globals.resizeObserver.observe(e)))}updateDimensionCache(){const t=this.w,e=this.getElTooltip();if(!e)return;const i=e.getBoundingClientRect();t.globals.dimensionCache.tooltip={width:i.width,height:i.height,lastUpdate:Date.now()}}getCachedDimensions(){const t=this.w;if(t.globals.dimensionCache.tooltip){const e=t.globals.dimensionCache.tooltip;if(Date.now()-e.lastUpdate<1e3)return{ttWidth:e.width,ttHeight:e.height}}this.updateDimensionCache();const e=t.globals.dimensionCache.tooltip;return e?{ttWidth:e.width,ttHeight:e.height}:{ttWidth:0,ttHeight:0}}_resolveEl(t,e,i){var s,a;const r=null==(a=null==(s=t.w)?void 0:s.dom)?void 0:a.baseEl;if(!r)return null;const o=t[e];if(o&&r.contains(o))return o;const n=r.querySelector(i);return t[e]=n,n}getElTooltip(t){return t||(t=this),this._resolveEl(t,"_elTooltipCache",".apexcharts-tooltip:not(.apexcharts-annotation-tooltip)")}getElXCrosshairs(){return this._resolveEl(this,"_elXCrosshairsCache",".apexcharts-xcrosshairs")}getYaxisTTEls(){const t=this.w;return this.yaxisTTEls||(this.yaxisTTEls=t.config.yaxis.map((e,i)=>t.dom.baseEl.querySelector(`.apexcharts-yaxistooltip-${i}`)))}getElGrid(){return this._resolveEl(this,"_elGridCache",".apexcharts-grid")}drawTooltip(t){const e=this.w;this.xyRatios=t,this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.isBarShared=!e.globals.isBarHorizontal&&this.tConfig.shared,this.isXAxisTooltipEnabled=e.config.xaxis.tooltip.enabled&&e.globals.axisCharts,this.yaxisTooltips=e.config.yaxis.map(t=>!!(t.show&&t.tooltip.enabled&&e.globals.axisCharts)),this.allTooltipSeriesGroups=[],this.yaxisTTEls=null,this.hoverBars=[],e.globals.axisCharts||(this.showTooltipTitle=!1);const i=this.getElTooltip();(null==i?void 0:i.parentNode)&&i.parentNode.removeChild(i),this.tooltipTitle=null;const s=y.createElementNS("http://www.w3.org/1999/xhtml","div");s.classList.add("apexcharts-tooltip"),this.tConfig.interactive&&(s.classList.add("apexcharts-tooltip-interactive"),s.addEventListener("mouseenter",()=>{clearTimeout(this.interactiveHideTimeout),this.cancelOffMarkHide()},{passive:!0}),s.addEventListener("mouseleave",()=>{clearTimeout(this.interactiveHideTimeout),this.handleMouseOut({tooltipEl:s}),e.config.chart.group&&this.ctx.getGroupedCharts().forEach(t=>{const e=this.getElTooltip(t);e&&t.w.globals.tooltip.handleMouseOut({tooltipEl:e})})},{passive:!0})),e.config.tooltip.cssClass&&s.classList.add(...String(e.config.tooltip.cssClass).split(/\s+/).filter(Boolean)),s.classList.add(`apexcharts-theme-${this.tConfig.theme||"light"}`),this.tConfig.fillSeriesColor&&s.classList.add("apexcharts-tooltip-fill-series"),this.tConfig.compact&&(s.classList.add("apexcharts-tooltip-compact"),1===e.config.series.length&&s.classList.add("apexcharts-tooltip-value-only")),this.tConfig.style&&this.tConfig.style.background&&s.style.setProperty("--apx-tt-bg",this.tConfig.style.background);const a=this.tConfig.shared&&e.config.series.length>1&&!e.globals.isBarHorizontal&&"heatmap"!==e.config.chart.type;if(this.tConfig.arrow&&!ks.isFollowCursor(this.w)&&!this.tConfig.fixed.enabled&&!a&&!this.tConfig.fillSeriesColor&&e.globals.axisCharts){const t=y.createElementNS("http://www.w3.org/1999/xhtml","div");t.classList.add("apexcharts-tooltip-arrow"),s.appendChild(t)}if(e.config.chart.accessibility.enabled&&e.config.chart.accessibility.announcements.enabled&&(s.setAttribute("role","tooltip"),s.setAttribute("aria-live","polite"),s.setAttribute("aria-atomic","true"),s.setAttribute("aria-hidden","true")),e.dom.elWrap.appendChild(s),e.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();const t=new ye(this.w,this.ctx,void 0);this.xAxisTicksPositions=t.getXAxisTicksPositions()}if(!e.globals.comboCharts&&!this.tConfig.intersect&&"rangeBar"!==e.config.chart.type||this.tConfig.shared||(this.showOnIntersect=!0),(0===e.config.markers.size||0===e.globals.markers.largestSize||e.globals.markers.batched)&&this.marker.drawDynamicPoints(),e.globals.collapsedSeries.length===e.seriesData.series.length)return;this.dataPointsDividedHeight=e.layout.gridHeight/e.globals.dataPoints,this.dataPointsDividedWidth=e.layout.gridWidth/e.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=y.createElementNS("http://www.w3.org/1999/xhtml","div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||e.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,s.appendChild(this.tooltipTitle));let r=e.seriesData.series.length;(e.globals.xyCharts||e.globals.comboCharts)&&(r=this.tConfig.shared&&!this.showOnIntersect?e.seriesData.series.length:1),this.legendLabels=e.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(r),this.addSVGEvents(),this.setupDimensionCache()}createTTElements(t){const e=this.w,i=[],s=this.getElTooltip();if(!s)return i;for(let a=0;a<t;a++){const r=y.createElementNS("http://www.w3.org/1999/xhtml","div");r.classList.add("apexcharts-tooltip-series-group",`apexcharts-tooltip-series-group-${a}`),r.style.order=String(e.config.tooltip.inverseOrder?t-a:a+1);const o=y.createElementNS("http://www.w3.org/1999/xhtml","span");o.classList.add("apexcharts-tooltip-marker"),e.config.tooltip.fillSeriesColor?o.style.backgroundColor=e.globals.colors[a]:o.style.color=e.globals.colors[a];const n=e.config.markers.shape;let l=n;Array.isArray(n)&&(l=n[a]),o.setAttribute("shape",l),o.innerHTML=Ys(l),r.appendChild(o);const c=y.createElementNS("http://www.w3.org/1999/xhtml","div");c.classList.add("apexcharts-tooltip-text"),c.style.fontFamily=this.tConfig.style.fontFamily||e.config.chart.fontFamily,c.style.fontSize=this.tConfig.style.fontSize;const h={marker:o,text:c};["y","goals","z"].forEach(t=>{const e=y.createElementNS("http://www.w3.org/1999/xhtml","div");e.classList.add(`apexcharts-tooltip-${t}-group`);const i=y.createElementNS("http://www.w3.org/1999/xhtml","span");i.classList.add(`apexcharts-tooltip-text-${t}-label`),e.appendChild(i);const s=y.createElementNS("http://www.w3.org/1999/xhtml","span");s.classList.add(`apexcharts-tooltip-text-${t}-value`),e.appendChild(s),h[`${t}Label`]=i,h[`${t}Value`]=s,c.appendChild(e)}),r.appendChild(c),r.ttRefs=h,s.appendChild(r),i.push(r)}return i}addSVGEvents(){const t=this.w,e=t.config.chart.type;this.detachHoverAreaListeners();const i=this.getElTooltip();if(!i)return;const s=!("bar"!==e&&"candlestick"!==e&&"boxPlot"!==e&&"violin"!==e&&"rangeBar"!==e),a="area"===e||"line"===e||"scatter"===e||"bubble"===e||"radar"===e,r=a&&!t.globals.xyCharts,o=t.dom.Paper.node,n=[],l=[],c={hoverArea:o,elGrid:this.getElGrid(),tooltipEl:i,tooltipY:n,tooltipX:l,ttItems:this.ttItems};let h;if(t.globals.axisCharts&&(a?h=t.dom.baseEl.querySelectorAll(".apexcharts-series[data\\:longestSeries='true'] .apexcharts-marker"):s?h=t.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-bar-area, .apexcharts-series .apexcharts-candlestick-area, .apexcharts-series .apexcharts-boxPlot-area, .apexcharts-series .apexcharts-violin-area, .apexcharts-series .apexcharts-rangebar-area"):"heatmap"!==e&&"treemap"!==e||(h=t.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-heatmap, .apexcharts-series .apexcharts-treemap")),h&&h.length))for(let t=0;t<h.length;t++)n.push(h[t].getAttribute("cy")),l.push(h[t].getAttribute("cx"));if(t.globals.xyCharts&&!this.showOnIntersect||t.globals.comboCharts&&!this.showOnIntersect||s&&this.tooltipUtil.hasBars()&&this.tConfig.shared)this.addPathsEventListeners([o],c);else if(ks.isCanvasBarChart(t))this.addPathsEventListeners([o],c);else if(a&&this.showOnIntersect&&ks.isCanvasMarkerChart(t))this.addPathsEventListeners([o],c);else if(s&&!t.globals.comboCharts||a&&this.showOnIntersect||r)this.addDatapointEventsListeners(c);else if("heatmap"===e&&t.globals.activeRenderer&&"canvas"===t.globals.activeRenderer.kind)this.addPathsEventListeners([o],c);else if(!t.globals.axisCharts||"heatmap"===e||"treemap"===e){const e=t.dom.baseEl.querySelectorAll(".apexcharts-series");this.addPathsEventListeners(e,c)}if(this.showOnIntersect){const e=t.dom.baseEl.querySelectorAll(".apexcharts-line-series .apexcharts-marker, .apexcharts-area-series .apexcharts-marker");e.length>0&&this.addPathsEventListeners(e,c),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(c)}}isHeadingForOutsideBox(t,e,i){var s;if(!t||!(null==(s=this.tooltipPosition)?void 0:s.shortPlotPlacement))return!1;if(!t.classList.contains("apexcharts-active"))return!1;if(t.dataset.placement!==(i?"top":"bottom"))return!1;const a=t.getBoundingClientRect();return e>=a.left-24&&e<=a.right+24}interactiveHideDelay(t,e){var i;const s=(null==(i=this.tooltipPosition)?void 0:i.shortPlotPlacement)?this.getElTooltip():null;if(!s||null==t||null==e)return 150;const a=s.getBoundingClientRect(),r=Math.max(a.left-t,0,t-a.right),o=Math.max(a.top-e,0,e-a.bottom),n=Math.hypot(r,o)/.2;return 150+Math.min(n,600)}cancelOffMarkHide(){void 0!==this.offMarkHideTimeout&&(clearTimeout(this.offMarkHideTimeout),this.offMarkHideTimeout=void 0)}drawFixedTooltipRect(){const t=this.w,e=this.getElTooltip();if(!e)return{x:0,y:0,ttWidth:0,ttHeight:0};const i=e.getBoundingClientRect(),s=i.width+10,a=i.height+10;let r=this.tConfig.fixed.offsetX,o=this.tConfig.fixed.offsetY;const n=this.tConfig.fixed.position.toLowerCase();return n.indexOf("right")>-1&&(r=r+t.globals.svgWidth-s+10),n.indexOf("bottom")>-1&&(o=o+t.globals.svgHeight-a-10),this.tooltipPosition.applyTooltipPosition(e,{x:r,y:o}),{x:r,y:o,ttWidth:s,ttHeight:a}}addDatapointEventsListeners(t){const e=this.w.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-violin-area, .apexcharts-rangebar-area");this.addPathsEventListeners(e,t)}addPathsEventListeners(t,e){const i=this;for(let s=0;s<t.length;s++){const a={paths:t[s],tooltipEl:e.tooltipEl,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:e.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map(r=>{const o=i.onSeriesHover.bind(i,a);return t[s]===e.hoverArea&&i.hoverAreaListeners.push({el:t[s],ev:r,handler:o}),t[s].addEventListener(r,o,{capture:!1,passive:!0})})}}detachHoverAreaListeners(){for(const{el:t,ev:e,handler:i}of this.hoverAreaListeners)t.removeEventListener(e,i);this.hoverAreaListeners=[]}onSeriesHover(t,e){if(this.tConfig.interactive&&(clearTimeout(this.interactiveHideTimeout),"mouseout"===e.type))return clearTimeout(this.seriesHoverTimeout),void(this.interactiveHideTimeout=setTimeout(()=>{this.w.globals.isDestroyed||this.seriesHover(t,e)},this.interactiveHideDelay(e.clientX,e.clientY)));ks.hoverTarget(e);const i=Date.now()-this.lastHoverTime;i>=20?this.seriesHover(t,e):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout(()=>{this.seriesHover(t,e)},20-i))}seriesHover(t,e){var i;if(this.w.globals.isDestroyed)return;this.lastHoverTime=Date.now();let s=[];const a=this.w,r=t=>{var e,i,s;const a=null==(s=null==(i=null==(e=null==t?void 0:t.w)?void 0:e.config)?void 0:i.chart)?void 0:s.link;return!(!a||"function"!=typeof a.dimension)};if(a.config.chart.group&&!r(this.ctx)&&(s=this.ctx.getSyncedCharts().filter(t=>!r(t))),!a.globals.axisCharts||(a.globals.minX!==-1/0||a.globals.maxX!==1/0)&&0!==a.globals.dataPoints)if(s.length){const r=this.groupPaintedMark(t,e);if((null==r?void 0:r.noHit)&&this.showOnIntersect){const s=ks.eventPointer(e,t),a={type:"mouseout",target:e.target,clientX:s.x,clientY:s.y};if(this.tConfig.interactive&&(null==(i=t.tooltipEl)?void 0:i.classList.contains("apexcharts-active")))return void(void 0===this.offMarkHideTimeout&&(this.offMarkHideTimeout=setTimeout(()=>{this.offMarkHideTimeout=void 0,this.w.globals.isDestroyed||this.seriesHover(t,a)},this.interactiveHideDelay(s.x,s.y))));e=a}const o=t.elGrid?ks.plotRect(a):null,n="touchmove"===e.type?e.touches[0]:e;s.forEach(i=>{const s=this.getElTooltip(i),a=i.w.globals.tooltip.getElGrid(),l=a?ks.plotRect(i.w):null,c=o&&l?l.left+(n.clientX-o.left)/o.width*l.width:n.clientX,h=o&&l?l.top+(n.clientY-o.top)/o.height*l.height:n.clientY,d={paths:t.paths,tooltipEl:s,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:a||t.elGrid,hoverArea:t.hoverArea,ttItems:i.w.globals.tooltip.ttItems,clientX:c,clientY:h,paintedSeries:r?r.noHit?null:r.i:void 0};i.w.globals.minX===this.w.globals.minX&&i.w.globals.maxX===this.w.globals.maxX&&i.w.globals.tooltip.seriesHoverByContext({chartCtx:i,ttCtx:i.w.globals.tooltip,opt:d,e:e})})}else this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:t,e:e})}groupPaintedMark(t,e){if("mousemove"!==e.type&&"touchmove"!==e.type&&"mouseup"!==e.type)return null;if(t.paths!==t.hoverArea||!ks.isCanvasBarChart(this.w))return null;const i=this.intersect.getPaintedMark(e,t);return i.noHit||this.cancelOffMarkHide(),i}seriesHoverByContext({chartCtx:t,ttCtx:e,opt:i,e:s}){var a,r,o;const n=t.w;if(!this.getElTooltip(t))return;const l=e.getCachedDimensions();if(e.tooltipRect={x:0,y:0,ttWidth:l.ttWidth,ttHeight:l.ttHeight},e.e=s,e.tooltipUtil.hasBars()&&!n.globals.comboCharts&&!e.isBarShared&&this.tConfig.onDatasetHover.highlightDataSeries){const l=new Pi(t.w),c=null==(a=ks.hoverTarget(s))?void 0:a.parentNode;if(i.paths===i.hoverArea&&ks.isCanvasBarChart(n)||void 0!==i.paintedSeries&&!(null==(r=null==c?void 0:c.getAttribute)?void 0:r.call(c,"rel"))){let t=i.paintedSeries;if(void 0===t){const a=e.intersect.getPaintedMark(s,i);t=a.noHit?null:a.i}const a=null==t?null:Array.from(n.dom.baseEl.querySelectorAll(".apexcharts-series")).find(e=>e.getAttribute("data:realIndex")===String(t));l.toggleSeriesOnHover(a?s:{type:"mouseout"},a)}else(null==(o=null==c?void 0:c.getAttribute)?void 0:o.call(c,"rel"))?l.toggleSeriesOnHover(s,c):l.toggleSeriesOnHover({type:"mouseout"},c)}n.globals.axisCharts?e.axisChartsTooltips({e:s,opt:i,tooltipRect:e.tooltipRect}):e.nonAxisChartsTooltips({e:s,opt:i,tooltipRect:e.tooltipRect}),e.fixedTooltip&&e.drawFixedTooltipRect()}axisChartsTooltips({e:t,opt:e}){var i,s,a,r,o,n,l;const c=this.w;let h,d;if(!e.elGrid)return;const p=ks.plotRect(c),u=null!=(i=e.clientX)?i:"touchmove"===t.type?t.touches[0].clientX:t.clientX,g=null!=(s=e.clientY)?s:"touchmove"===t.type?t.touches[0].clientY:t.clientY;this.clientY=g,this.clientX=u;const x=g<p.top||g>p.top+p.height;if(x&&"mouseout"!==(null==t?void 0:t.type)&&(null==(a=this.tConfig)?void 0:a.interactive)&&this.isHeadingForOutsideBox(e.tooltipEl,u,g<p.top))return clearTimeout(this.interactiveHideTimeout),void(this.interactiveHideTimeout=setTimeout(()=>{this.w.globals.isDestroyed||(c.interact.capturedSeriesIndex=-1,c.interact.capturedDataPointIndex=-1,this.handleMouseOut(e))},this.interactiveHideDelay(u,g)));if(c.interact.capturedSeriesIndex=-1,c.interact.capturedDataPointIndex=-1,x)return void this.handleMouseOut(e);if((null==(r=this.tConfig)?void 0:r.interactive)&&clearTimeout(this.interactiveHideTimeout),c.dom.elWrap.querySelector(".apexcharts-annotation-tooltip.apexcharts-active"))return void this.handleMouseOut(e);if(Array.isArray(this.tConfig.enabledOnSeries)&&!c.config.tooltip.shared&&(e.paths!==e.hoverArea||!this.showOnIntersect||!ks.isCanvasBarChart(c)&&!ks.isCanvasMarkerChart(c))){const t=parseInt(e.paths.getAttribute("index"),10);if(!isNaN(t)&&this.tConfig.enabledOnSeries.indexOf(t)<0)return void this.handleMouseOut(e)}const f=this.getElTooltip();if(!f)return;const m=this.getElXCrosshairs(),b=["heatmap","treemap"].includes(c.config.chart.type);let y=[];c.config.chart.group&&!b&&(y=this.ctx.getSyncedCharts());const v=c.globals.xyCharts||"bar"===c.config.chart.type&&!c.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||c.globals.comboCharts&&this.tooltipUtil.hasBars();if("mousemove"===t.type||"touchmove"===t.type||"mouseup"===t.type){if(c.globals.collapsedSeries.length+c.globals.ancillaryCollapsedSeries.length===c.seriesData.series.length)return;null!==m&&m.classList.add("apexcharts-active");const i=null==(o=this.yaxisTooltips)?void 0:o.filter(t=>!0===t),s=this.ycrosshairs;if(null!==s&&(null==i?void 0:i.length)&&s.classList.add("apexcharts-active"),this.tooltipHidden=!1,!b&&(v&&!this.showOnIntersect||y.length>1))this.handleStickyTooltip(t,u,g,e);else if("heatmap"===c.config.chart.type||"treemap"===c.config.chart.type){const i=this.intersect.handleHeatTreeTooltip({e:t,opt:e,x:h,y:d,type:c.config.chart.type});if(i.noHit)return void this.handleMouseOut(e);h=i.x,d=i.y,this.placeCellTooltip(f,i)}else{const i=this.intersect.getPaintedMarker(t,e);i?this.intersect.handlePaintedMarkerTooltip({e:t,opt:e,marker:i}):(null==(l=null==(n=ks.hoverTarget(t))?void 0:n.classList)?void 0:l.contains("apexcharts-marker"))&&ks.hoverTarget(t).hasAttribute("rel")?this.intersect.handleMarkerTooltip({e:t,opt:e,x:h,y:d}):this.tooltipUtil.hasBars()?this.intersect.handleBarTooltip({e:t,opt:e}):e.paths===e.hoverArea&&ks.isCanvasMarkerChart(c)&&this.intersect.leavePaintedMark(t,e)}if(this.tooltipHidden)return;if(this.yaxisTooltips&&this.yaxisTooltips.length)for(let t=0;t<c.config.yaxis.length;t++)this.axesTooltip.drawYaxisTooltipText(t,g);c.dom.baseEl.classList.add("apexcharts-tooltip-active"),e.tooltipEl.classList.add("apexcharts-active"),c.config.chart.accessibility.enabled&&c.config.chart.accessibility.announcements.enabled&&e.tooltipEl.removeAttribute("aria-hidden")}else"mouseout"!==t.type&&"touchend"!==t.type||this.handleMouseOut(e)}getSliceAnchor(t){var e,i;const s=this.w,a=parseFloat(null!=(e=null==t?void 0:t.getAttribute("data:cx"))?e:""),r=parseFloat(null!=(i=null==t?void 0:t.getAttribute("data:cy"))?i:"");if(isNaN(a)||isNaN(r))return null;const o=s.dom.elWrap.getBoundingClientRect(),n="function"==typeof t.getScreenCTM?t.getScreenCTM():null;if(!n){const t=s.dom.Paper.node.getBoundingClientRect();return{x:t.left-o.left+a,y:t.top-o.top+r}}return{x:n.a*a+n.c*r+n.e-o.left,y:n.b*a+n.d*r+n.f-o.top}}nonAxisChartsTooltips({e:t,opt:e,tooltipRect:i}){const s=this.w,a=e.paths.getAttribute("rel"),r=this.getElTooltip();if(!r)return;const o=s.dom.elWrap.getBoundingClientRect();if("mousemove"===t.type||"touchmove"===t.type){if(s.dom.baseEl.classList.add("apexcharts-tooltip-active"),r.classList.add("apexcharts-active"),s.config.chart.accessibility.enabled&&s.config.chart.accessibility.announcements.enabled&&r.removeAttribute("aria-hidden"),"unit"===s.config.chart.type){const e=ks.hoverTarget(t),i=e&&"function"==typeof e.closest?e.closest(".apexcharts-unit-area"):null;if(!i)return;this.renderUnitTooltip(i)}else this.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:parseInt(a,10)-1,shared:!1});const n=e.paths.querySelector("path[data\\:cx]")||e.paths,l=s.config.tooltip.intersect?this.getSliceAnchor(n):null,c=ks.eventPointer(t,e),h=l?this.tooltipPosition.placeOverAnchor(l.x,l.y,i.ttWidth,i.ttHeight,10):this.tooltipPosition.placeOverAnchor(c.x-o.left,c.y-o.top,i.ttWidth,i.ttHeight,10,24);r.style.left=h.x+"px",r.style.top=h.y+"px",s.config.legend.tooltipHoverFormatter&&this.applyLegendHoverText(a-1,a-1,!1)}else"mouseout"!==t.type&&"touchend"!==t.type||(r.classList.remove("apexcharts-active"),s.dom.baseEl.classList.remove("apexcharts-tooltip-active"),s.config.legend.tooltipHoverFormatter&&this.applyLegendHoverText(-1,0,!1))}applyLegendHoverText(t,e,i){var s,a,r;const o=this.w,n=null!=(s=this.legendLabels)?s:[];for(let s=0;s<n.length;s++){const l=n[s],c=parseInt(null!=(a=l.getAttribute("i"))?a:"",10),h=decodeURIComponent(null!=(r=l.getAttribute("data:default-text"))?r:"");l.innerHTML=(i?o.globals.collapsedSeriesIndices.indexOf(c)<0:c===t)?o.config.legend.tooltipHoverFormatter(h,{seriesIndex:i?c:t,dataPointIndex:e,w:o}):h}}renderUnitTooltip(t){var e,i,s,a,r;const o=this.w,n=this.getElTooltip();if(!n)return;const l=parseInt(t.getAttribute("i")||"0",10),c=parseInt(t.getAttribute("j")||"0",10);if("function"==typeof o.config.tooltip.custom)return void this.tooltipLabels.handleCustomTooltip({i:l,j:c,y1:null,y2:null,w:o});const h=o.seriesData.seriesNames[l]||`series-${l+1}`,d=Math.round(Number(o.seriesData.series[l])||0),p=t.parentNode,u=p&&p.querySelectorAll?p.querySelectorAll(".apexcharts-unit-area").length:d,g=o.config.plotOptions.unit||{},x=g.unitValue>0?g.unitValue:1,f=o.seriesData.unitData&&o.seriesData.unitData[l],m=f?f[c]:void 0,b=m&&"object"==typeof m?m:null,y=b&&b.fillColor||o.globals.colors&&o.globals.colors[l]||"#008FFB";let v;const w=g.tooltip&&g.tooltip.formatter;if("function"==typeof w)v=w({seriesName:h,seriesIndex:l,dataPointIndex:c,count:u,value:d,unitValue:x,datum:m,color:y,w:o});else if(null!=m){const t=b&&null!=(s=null!=(i=null!=(e=b.name)?e:b.label)?i:b.x)?s:null,o=b?null!=(r=null!=(a=b.value)?a:b.y)?r:null:m;v=null!=t&&null!=o?`${t}: ${o}`:null!=t?String(t):null!=o?String(o):`#${(c+1).toLocaleString()} of ${u.toLocaleString()}`}else v=`#${(c+1).toLocaleString()} of ${u.toLocaleString()}`,1!==x&&(v+=` · ${x.toLocaleString()} per dot`);const A=o.config.chart.fontFamily||"inherit",S=o.config.tooltip.style&&o.config.tooltip.style.fontSize||"12px",C=n.querySelector(".apexcharts-tooltip-arrow");n.innerHTML=`<div class="apexcharts-tooltip-title" style="font-family: ${A}; font-size: ${S};">${h}</div><div class="apexcharts-tooltip-series-group apexcharts-active" style="display: flex;"><span class="apexcharts-tooltip-marker" style="background-color: ${y};"></span><div class="apexcharts-tooltip-text" style="font-family: ${A}; font-size: ${S};"><div class="apexcharts-tooltip-y-group"><span class="apexcharts-tooltip-text-y-value">${v}</span></div></div></div>`,C&&n.appendChild(C);const k=n.getBoundingClientRect();this.tooltipRect.ttWidth=k.width,this.tooltipRect.ttHeight=k.height}placeCellTooltip(t,e){e.positioned||(t.style.left=e.x+"px",t.style.top=e.y+"px",e.placement?(t.dataset.placement=e.placement,t.style.setProperty("--apx-tt-arrow-x",e.arrowX+"px")):t.dataset.placement&&delete t.dataset.placement)}handleStickyTooltip(t,e,i,s){const a=this.w,r=this.tooltipUtil.getNearestValues({context:this,hoverArea:s.hoverArea,clientX:e,clientY:i}),o=r.j;let n=r.capturedSeries;null!==n&&a.globals.collapsedSeriesIndices.includes(null!=n?n:-1)&&(n=null);const l=a.globals.barPadForNumericAxis||0;if(r.hoverX<=-l-1||r.hoverX>=a.layout.gridWidth+l+1)this.handleMouseOut(s);else if(null!==n)this.handleStickyCapturedSeries(t,null!=n?n:-1,s,null!=o?o:0);else if(this.tooltipUtil.isXoverlap(null!=o?o:0)||a.globals.isBarHorizontal){const e=a.seriesData.series.findIndex((t,e)=>!a.globals.collapsedSeriesIndices.includes(e));this.create(t,this,e,null!=o?o:0,s.ttItems)}}handleStickyCapturedSeries(t,e,i,s){const a=this.w;if(!this.tConfig.shared){if(null===a.seriesData.series[e][s])return void this.handleMouseOut(i)}if(void 0!==a.seriesData.series[e][s])this.tConfig.shared&&this.tooltipUtil.isXoverlap(s)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(t,this,e,s,i.ttItems):this.create(t,this,e,s,i.ttItems,!1);else if(this.tooltipUtil.isXoverlap(s)){const e=a.seriesData.series.findIndex((t,e)=>!a.globals.collapsedSeriesIndices.includes(e));this.create(t,this,e,s,i.ttItems)}}deactivateHoverFilter(){const t=this.hoverBars;if(!t.length)return;this.hoverBars=[];const e=new ae(this.w,this.ctx);for(let i=0;i<t.length;i++)e.pathMouseLeave(t[i],void 0)}handleMouseOut(t){var e;const i=this.w;this.tooltipHidden=!0,this.tooltipPosition.resetPlacementCache();const s=this.getElXCrosshairs();i.dom.baseEl.classList.remove("apexcharts-tooltip-active"),t.tooltipEl.classList.remove("apexcharts-active"),delete t.tooltipEl.dataset.positioned,i.config.chart.accessibility.enabled&&i.config.chart.accessibility.announcements.enabled&&t.tooltipEl.setAttribute("aria-hidden","true"),this.deactivateHoverFilter(),this.intersect.hoverCell(null),"bubble"!==i.config.chart.type&&this.marker.resetPointsSize(),null!==s&&s.classList.remove("apexcharts-active");const a=this.ycrosshairs;null!==a&&a.classList.remove("apexcharts-active"),this.isXAxisTooltipEnabled&&(null==(e=this.xaxisTooltip)||e.classList.remove("apexcharts-active")),this.yaxisTooltips&&this.yaxisTooltips.length&&this.getYaxisTTEls().forEach(t=>null==t?void 0:t.classList.remove("apexcharts-active")),i.config.legend.tooltipHoverFormatter&&this.applyLegendHoverText(-1,0,!1)}markerClick(t,e,i){const s=this.w;"function"==typeof s.config.chart.events.markerClick&&s.config.chart.events.markerClick(t,this.ctx,{seriesIndex:e,dataPointIndex:i,w:s}),this.ctx.events.fireEvent("markerClick",[t,this.ctx,{seriesIndex:e,dataPointIndex:i,w:s}])}_hasCustomSeries(){const t=this.w;if(it(t.config.chart.type))return!0;return(t.config.series||[]).some(t=>t&&t.type&&it(t.type))}create(t,e,i,s,a,r=null){var o,c,h,d,p,u,g,x;const f=this.w,m=e;if("mouseup"===t.type&&this.markerClick(t,i,s),null===r&&(r=this.tConfig.shared),!this.tConfig.shared&&Array.isArray(this.tConfig.enabledOnSeries)&&this.tConfig.enabledOnSeries.indexOf(i)<0){const t=this.getElTooltip();return void(t&&this.handleMouseOut({tooltipEl:t}))}const b=this.tooltipUtil.hasMarkers(i),y="canvas"===(null==(c=null==(o=this.ctx)?void 0:o.renderer)?void 0:c.kind),v=y&&!this.tooltipUtil.hasBars(),w=y&&!v&&!ks.isBarLikeType(null!=(d=null==(h=f.config.series[i])?void 0:h.type)?d:f.config.chart.type),A=!y&&!b&&!this.tooltipUtil.hasBars()&&this._hasCustomSeries(),S=v||w||A,C=this.tooltipUtil.getElBars();f.config.legend.tooltipHoverFormatter&&this.applyLegendHoverText(i,s,r);const k=null==(u=null==(p=f.rangeData.seriesRangeStart)?void 0:p[i])?void 0:u[s],M=null==(x=null==(g=f.rangeData.seriesRangeEnd)?void 0:g[i])?void 0:x[s],T=n(n({ttItems:a,i:i,j:s},void 0!==k&&{y1:k}),void 0!==M&&{y2:M});if(r){if(m.tooltipLabels.drawSeriesTexts(l(n({},T),{shared:!this.showOnIntersect&&this.tConfig.shared})),b||S)f.globals.markers.largestSize>0&&!y&&!f.globals.markers.batched?m.marker.enlargePoints(s):m.tooltipPosition.moveDynamicPointsOnHover(s);else if(this.tooltipUtil.hasBars())if(y)m.tooltipPosition.moveStickyTooltipOverBars(s,i);else if([...C].some(t=>t.querySelector("path"))){const t=new ae(this.w,this.ctx),e=f.dom.Paper.find(`.apexcharts-bar-area[j='${s}']`);this.deactivateHoverFilter(),m.tooltipPosition.moveStickyTooltipOverBars(s,i);for(let i=0;i<e.length;i++)t.pathMouseEnter(e[i],void 0);this.hoverBars=e}}else m.tooltipLabels.drawSeriesTexts(n({shared:!1},T)),this.tooltipUtil.hasBars()&&m.tooltipPosition.moveStickyTooltipOverBars(s,i),b?m.tooltipPosition.moveMarkers(i,s):S&&m.tooltipPosition.moveDynamicPointOnHover(s,i)}}class Vs{constructor(t,e){this.w=t,this.ctx=e,this.kind="svg"}beginSeries(){}present(){return null}clear(){}group(t){return this.ctx.graphics.group(t)}drawPath(t){return this.ctx.graphics.drawPath(t)}drawLine(...t){return this.ctx.graphics.drawLine(...t)}drawRect(...t){return this.ctx.graphics.drawRect(...t)}drawCircle(t,e){return this.ctx.graphics.drawCircle(t,e)}drawText(t){return this.ctx.graphics.drawText(t)}renderPaths(t){return this.ctx.graphics.renderPaths(t)}drawMarker(t,e,i={}){return this.ctx.graphics.drawMarker(t,e,i)}supports(t){return!0}hitTest(){return null}restyle(){}toBitmap(){return null}destroy(){}}const qs="__apexcharts_renderers__";function Zs(){const t=globalThis;return t[qs]||(t[qs]=new Map),t[qs]}class Ks{static get _rendererRegistry(){return Zs()}static registerRenderer(t,e){Zs().set(t,e)}static unregisterRenderer(t){Zs().delete(t)}constructor(t,e){this.w=t,this.ctx=e,this.svg=new Vs(t,e),this.active=this.svg,this._activeKind="svg",this._instances={},this.w.globals.activeRenderer=this.active}_activate(t,e){this.active=e,this._activeKind=t,this.ctx.renderer=e,this.w.globals.activeRenderer=e}_desiredKind(){const t=this.w.config.chart,e=t.renderer||"svg";if(!d.isBrowser())return"svg";if("svg"===e)return"svg";if(le(this.w))return"svg";if("canvas"===e)return"canvas";return function(t){const e=t.config.series||[],i=t.config.chart.type,s="scatter"===i||"bubble"===i,a=t.config.markers&&t.config.markers.size,r=Array.isArray(a)?a.some(t=>t>0):(a||0)>0,o=!(!t.config.dataLabels||!t.config.dataLabels.enabled),n="heatmap"===i;let l=0,c=0;return e.forEach(t=>{const e=Array.isArray(t.data)?t.data.length:0;e>c&&(c=e),(s||r||n)&&(l+=e),o&&(l+=e)}),c>=5e4&&(l=Math.max(l,c)),l}(this.w)>=(t.rendererThreshold||8e3)?"canvas":"svg"}resolve(){const t=this.w.config.chart.renderer||"svg",e=this._desiredKind();if("svg"!==e){const i=Zs().get(e);if(i)return this._instances[e]||(this._instances[e]=i(this.w,this.ctx)),this._activate(e,this._instances[e]),this._activeKind;t===e&&ns(`\`chart.renderer: '${e}'\``,`renderer-${e}`,{tail:"Falling back to SVG."})}else"canvas"===t&&le(this.w)&&console.warn('[apexcharts] renderer:"canvas" requested but this chart uses a feature the canvas renderer does not render yet (gradient/pattern/image fill or a state color-matrix filter); falling back to SVG.');return this._activate("svg",this.svg),this._activeKind}pendingKind(){const t=this._desiredKind();return"svg"===t||Zs().has(t)?t:"svg"}getActiveKind(){return this._activeKind}teardown(){for(const t in this._instances){const e=this._instances[t];e&&"function"==typeof e.destroy&&e.destroy()}this._instances={},this.active=this.svg,this._activeKind="svg",this.w.globals.activeRenderer=null}}class Js{constructor(t){this.node=t,t&&(t.instance=this),this._listeners=[],this._filter=null}attr(t,e){if("string"==typeof t&&void 0===e)return this.node.getAttribute(t);const i="string"==typeof t?{[t]:e}:t;for(const t in i){let e=i[t];null===e?this.node.removeAttribute(t):void 0!==e&&("number"==typeof e&&isNaN(e)&&(e=0),this.node.setAttribute(t,e))}if("text"===this.node.nodeName&&null!=i.x){const t=this.node.querySelectorAll("tspan[data-newline]");for(let e=0;e<t.length;e++)t[e].setAttribute("x",i.x)}return this}css(t){for(const e in t)this.node.style[e]=t[e];return this}fill(t){return"object"==typeof t?this.attr(t):this.attr("fill",t)}stroke(t){return"object"==typeof t?(void 0!==t.color&&this.attr("stroke",t.color),void 0!==t.width&&this.attr("stroke-width",t.width),void 0!==t.dasharray&&this.attr("stroke-dasharray",t.dasharray),void 0!==t.linecap&&this.attr("stroke-linecap",t.linecap),void 0!==t.opacity&&this.attr("stroke-opacity",t.opacity),this):this.attr("stroke",t)}size(t,e){return this.attr({width:t,height:e})}move(t,e){return this.attr({x:t,y:e})}center(t,e){if("g"===this.node.nodeName){const i=this.bbox(),s=t-(i.x+i.width/2),a=e-(i.y+i.height/2);return this.attr("transform",`translate(${s}, ${a})`)}return this.attr({cx:t,cy:e})}add(t){return t&&t.__isCanvasMark||this.node.appendChild(t.node||t),this}addTo(t){return(t.node||t).appendChild(this.node),this}remove(){return this.node.parentNode&&this.node.parentNode.removeChild(this.node),this}clear(){for(;this.node.firstChild;)this.node.removeChild(this.node.firstChild);return this}find(t){return Array.from(this.node.querySelectorAll(t)).map(t=>t.instance||new Js(t))}findOne(t){const e=this.node.querySelector(t);return e?e.instance||new Js(e):null}on(t,e){const i=t.split(".")[0];return this._listeners.push({event:t,eventType:i,handler:e}),this.node.addEventListener(i,e),this}off(t,e){if(t||e)if(t&&!e){const e=t.split(".")[0];this._listeners=this._listeners.filter(t=>t.eventType!==e||(this.node.removeEventListener(t.eventType,t.handler),!1))}else{const i=t.split(".")[0];this._listeners=this._listeners.filter(t=>t.eventType!==i||t.handler!==e||(this.node.removeEventListener(t.eventType,t.handler),!1))}else this._listeners.forEach(t=>{this.node.removeEventListener(t.eventType,t.handler)}),this._listeners=[];return this}each(t,e){return Array.from(this.node.children).forEach(i=>{const s=i.instance||new Js(i);t.call(s),e&&s.each(t,e)}),this}removeClass(t){return"*"===t?this.node.removeAttribute("class"):this.node.classList.remove(t),this}children(){return Array.from(this.node.childNodes).filter(t=>1===t.nodeType).map(t=>t.instance||new Js(t))}hide(){return this.node.style.display="none",this}show(){return this.node.style.display="",this}bbox(){if("function"==typeof this.node.getBBox)try{return this.node.getBBox()}catch(t){}return{x:0,y:0,width:0,height:0}}tspan(t){const e=y.createElementNS("http://www.w3.org/2000/svg","tspan");return e.textContent=t,this.node.appendChild(e),new Js(e)}plot(t){return"string"==typeof t&&this.attr("d",t),this}animate(){throw new Error("Animation module not loaded")}filterWith(){throw new Error("Filter module not loaded")}}let Qs=0;class ta extends Js{constructor(t,e,i){const s="radial"===e?"radialGradient":"linearGradient";super(y.createElementNS(xt,s)),this._id="SvgjsGradient"+ ++Qs,this.attr("id",this._id),"function"==typeof i&&i(new ea(this));let a=t.node.querySelector("defs");a||(a=y.createElementNS(xt,"defs"),t.node.appendChild(a)),a.appendChild(this.node)}stop(t,e,i){const s=y.createElementNS(xt,"stop");return s.setAttribute("offset",t),s.setAttribute("stop-color",e),void 0!==i&&s.setAttribute("stop-opacity",String(i)),this.node.appendChild(s),this}from(t,e){return this.attr({x1:t,y1:e})}to(t,e){return this.attr({x2:t,y2:e})}url(){return"url(#"+this._id+")"}toString(){return this.url()}valueOf(){return this.url()}fill(){return this.url()}}class ea{constructor(t){this.gradient=t}stop(t,e,i){return this.gradient.stop(t,e,i),this}}let ia=0;class sa extends Js{constructor(t,e,i,s){if(super(y.createElementNS(xt,"pattern")),this._id="SvgjsPattern"+ ++ia,this.attr({id:this._id,width:e,height:i,patternUnits:"userSpaceOnUse"}),"function"==typeof s){s(new aa(this.node))}let a=t.node.querySelector("defs");a||(a=y.createElementNS(xt,"defs"),t.node.appendChild(a)),a.appendChild(this.node)}url(){return"url(#"+this._id+")"}toString(){return this.url()}valueOf(){return this.url()}fill(){return this.url()}}class aa extends Js{line(t,e,i,s){const a=this._make("line");return void 0!==t&&a.attr({x1:t,y1:e,x2:i,y2:s}),a}rect(t,e){const i=this._make("rect");return void 0!==t&&i.attr({width:t,height:e}),i}circle(t){const e=this._make("circle");return void 0!==t&&e.attr({r:t/2,cx:t/2,cy:t/2}),e}path(t){const e=this._make("path");return t&&e.attr("d",t),e}polygon(t){const e=this._make("polygon");return t&&e.attr("points",t),e}group(){return this._makeContainer("g")}defs(){return this._makeContainer("defs")}plain(t){const e=y.createElementNS(xt,"text");e.textContent=t;const i=new Js(e);return this.node.appendChild(e),i}text(t){const e=y.createElementNS(xt,"text"),i=new Js(e);return this.node.appendChild(e),"function"==typeof t&&t(new ra(e)),i}image(t,e){const i=y.createElementNS(xt,"image");i.setAttributeNS("http://www.w3.org/1999/xlink","href",t);const s=new Js(i);if(this.node.appendChild(i),"function"==typeof e&&d.isBrowser()){const i=new Image;i.onload=function(){s.size(i.width,i.height),e.call(s,{width:i.width,height:i.height})},i.src=t}return s}gradient(t,e){return new ta(this,t,e)}pattern(t,e,i){return new sa(this,t,e,i)}_make(t){const e=y.createElementNS(xt,t);return this.node.appendChild(e),new Js(e)}_makeContainer(t){const e=y.createElementNS(xt,t);return this.node.appendChild(e),new aa(e)}}class ra{constructor(t){this.textNode=t}tspan(t){const e=y.createElementNS(xt,"tspan");return e.textContent=t,this.textNode.appendChild(e),new oa(e,this.textNode)}}class oa{constructor(t,e){this.node=t,this.textNode=e}newLine(){return this.node.setAttribute("dy","1.1em"),this.node.dataset.newline="1",this}}let na=0;class la extends Js{constructor(){super(y.createElementNS(xt,"filter")),this._id="SvgjsFilter"+ ++na,this.attr("id",this._id)}}class ca{constructor(t){this.filter=t}colorMatrix(t){return this._primitive("feColorMatrix",t)}offset(t){return this._primitive("feOffset",t)}gaussianBlur(t){return this._primitive("feGaussianBlur",t)}flood(t){return this._primitive("feFlood",t)}composite(t){return this._primitive("feComposite",t)}merge(t){const e=y.createElementNS(xt,"feMerge");return t.forEach(t=>{const i=y.createElementNS(xt,"feMergeNode");i.setAttribute("in",t),e.appendChild(i)}),this.filter.node.appendChild(e),new Js(e)}_primitive(t,e){const i=y.createElementNS(xt,t);for(const t in e)i.setAttribute(t,e[t]);return this.filter.node.appendChild(i),new Js(i)}}function ha(t){t.prototype.filterWith=function(t){const e=new la;this._filter=e;let i=this.node;for(;i&&"svg"!==i.nodeName;)i=i.parentNode;if(i){let t=i.querySelector("defs");t||(t=y.createElementNS(xt,"defs"),i.insertBefore(t,i.firstChild)),t.appendChild(e.node)}return t(new ca(e)),this.attr("filter","url(#"+e._id+")"),this},t.prototype.unfilter=function(t){return this._filter&&(this.node.removeAttribute("filter"),t&&this._filter.node&&this._filter.node.parentNode&&this._filter.node.parentNode.removeChild(this._filter.node),this._filter=null),this},t.prototype.filterer=function(){return this._filter}}function da(t){t.prototype.draggable=function(t){if(!1===t)return this._dragCleanup&&(this._dragCleanup(),this._dragCleanup=null),this;const e=this,i=t||{},s=t=>{if(t.button&&0!==t.button)return;t.stopPropagation();const s="touchstart"===t.type?t.touches[0]:t,a=e.node,r=parseFloat(a.getAttribute("x"))||0,o=parseFloat(a.getAttribute("y"))||0,n=s.clientX,l=s.clientY,c=a.ownerSVGElement;let h=null;c&&(h=c.getScreenCTM());const p=t=>{const e="touchmove"===t.type?t.touches[0]:t;let s=e.clientX-n,c=e.clientY-l;h&&(s/=h.a,c/=h.d);let d=r+s,p=o+c;const u=parseFloat(a.getAttribute("width"))||0,g=parseFloat(a.getAttribute("height"))||0;void 0!==i.minX&&d<i.minX&&(d=i.minX),void 0!==i.minY&&p<i.minY&&(p=i.minY),void 0!==i.maxX&&d+u>i.maxX&&(d=i.maxX-u),void 0!==i.maxY&&p+g>i.maxY&&(p=i.maxY-g);const x=new CustomEvent("dragmove",{detail:{handler:{move:function(t,e){a.setAttribute("x",t),a.setAttribute("y",e)}},box:{x:d,y:p,w:u,h:g,x2:d+u,y2:p+g}}});a.dispatchEvent(x)},u=()=>{d.isBrowser()&&(document.removeEventListener("mousemove",p),document.removeEventListener("touchmove",p),document.removeEventListener("mouseup",u),document.removeEventListener("touchend",u)),e._activeDrag=null};d.isBrowser()&&(document.addEventListener("mousemove",p),document.addEventListener("touchmove",p),document.addEventListener("mouseup",u),document.addEventListener("touchend",u),e._activeDrag={onMove:p,onUp:u})};return e.node.addEventListener("mousedown",s),e.node.addEventListener("touchstart",s),e._dragCleanup=()=>{e.node.removeEventListener("mousedown",s),e.node.removeEventListener("touchstart",s),e._activeDrag&&d.isBrowser()&&(document.removeEventListener("mousemove",e._activeDrag.onMove),document.removeEventListener("touchmove",e._activeDrag.onMove),document.removeEventListener("mouseup",e._activeDrag.onUp),document.removeEventListener("touchend",e._activeDrag.onUp),e._activeDrag=null)},e}}function pa(t){t.prototype.select=function(t){if(!1===t)return this._selectCleanup&&(this._selectCleanup(),this._selectCleanup=null),this;const e=this,{createHandle:i,updateHandle:s}=t,a=document.createElementNS(xt,"g");a.setAttribute("class","svg_select_points");const r=e.node.parentNode;r&&r.appendChild(a);const o={},n=["t","b","l","r","lt","rt","lb","rb"];n.forEach((t,e)=>{const s=new aa(document.createElementNS(xt,"g"));a.appendChild(s.node);const r=i(s,[0,0],e,[],t);o[t]={group:s,handle:r}});const l=()=>{const t=parseFloat(e.attr("x"))||0,i=parseFloat(e.attr("y"))||0,r=parseFloat(e.attr("width"))||0,l=parseFloat(e.attr("height"))||0,c=e.node.getAttribute("transform");c?a.setAttribute("transform",c):a.removeAttribute("transform");const h={t:[t+r/2,i],b:[t+r/2,i+l],l:[t,i+l/2],r:[t+r,i+l/2],lt:[t,i],rt:[t+r,i],lb:[t,i+l],rb:[t+r,i+l]};n.forEach(t=>{o[t]&&h[t]&&s(o[t].group,h[t])})};return l(),e._selectHandles=a,e._selectHandlesMap=o,e._updateSelectPositions=l,e._selectCleanup=()=>{a.parentNode&&a.parentNode.removeChild(a),e._selectHandles=null,e._selectHandlesMap=null,e._updateSelectPositions=null},e},t.prototype.resize=function(t){if(!1===t)return this._resizeCleanup&&(this._resizeCleanup(),this._resizeCleanup=null),this;const e=this,i=e._selectHandlesMap;if(!i)return e;const s=[],a=t=>{const a=i[t];if(!a||!a.group||!a.group.node)return;const r=a.group.node,o=i=>{if(i.button&&0!==i.button)return;i.stopPropagation();const s=("touchstart"===i.type?i.touches[0]:i).clientX,a=e.node.ownerSVGElement;let r=null;a&&(r=a.getScreenCTM());const o=parseFloat(e.attr("x"))||0,n=parseFloat(e.attr("width"))||0,l=i=>{let a=("touchmove"===i.type?i.touches[0]:i).clientX-s;r&&(a/=r.a);let l=o,c=n;"l"===t?(l=o+a,c=n-a):"r"===t&&(c=n+a),c<0&&(c=0),e.attr({x:l,width:c}),e._updateSelectPositions&&e._updateSelectPositions();const h=new CustomEvent("resize",{detail:{el:e}});e.node.dispatchEvent(h)},c=()=>{d.isBrowser()&&(document.removeEventListener("mousemove",l),document.removeEventListener("touchmove",l),document.removeEventListener("mouseup",c),document.removeEventListener("touchend",c));const t=new CustomEvent("resize",{detail:{el:e}});e.node.dispatchEvent(t)};d.isBrowser()&&(document.addEventListener("mousemove",l),document.addEventListener("touchmove",l),document.addEventListener("mouseup",c),document.addEventListener("touchend",c))};r.addEventListener("mousedown",o),r.addEventListener("touchstart",o),s.push(()=>{r.removeEventListener("mousedown",o),r.removeEventListener("touchstart",o)})};return a("l"),a("r"),e._resizeCleanup=()=>{s.forEach(t=>t())},e}}function ua(){const t=y.createElementNS(xt,"svg"),e=new aa(t);return e.attr({xmlns:xt}),e}ha(Js),Rt(Js),da(Js),pa(Js),ua.xlink="http://www.w3.org/1999/xlink",d.isBrowser()&&void 0===window.SVG&&(window.SVG=ua),d.isBrowser()?(void 0===window.SVG&&(window.SVG=ua),void 0===window.Apex&&(window.Apex={})):"undefined"!=typeof global&&(void 0===global.Apex&&(global.Apex={}),void 0===global.SVG&&(global.SVG=ua));const ga="__apexcharts_features_v1__";globalThis[ga]||(globalThis[ga]=new Map);class xa{static get _featureRegistry(){return globalThis[ga]}static registerFeatures(t){for(const[e,i]of Object.entries(t))xa._featureRegistry.set(e,i)}constructor(t){this.ctx=t,this.w=t.w}initModules(){this.ctx.publicMethods=["updateOptions","updateSeries","appendData","appendSeries","isSeriesHidden","highlightSeries","toggleSeries","showSeries","hideSeries","setLocale","resetSeries","zoomX","toggleDataPointSelection","dataURI","exportToCSV","addXaxisAnnotation","addYaxisAnnotation","addPointAnnotation","clearAnnotations","removeAnnotation","drillDown","drillUp","drillToRoot","clearDrilldownCache","paper","getActiveRenderer","destroy"],this.ctx.eventList=["click","mousedown","mousemove","mouseleave","touchstart","touchmove","touchleave","mouseup","touchend","keydown","keyup"],this.ctx.animations=new Jt(this.w,this.ctx),this.ctx.axes=new Te(this.w,this.ctx),this.ctx.core=new as(this.ctx.el,this.w,this.ctx),this.ctx.config=new nt({}),this.ctx.data=new vs(this.w,{resetGlobals:()=>this.ctx.core.resetGlobals(),isMultipleY:()=>this.ctx.core.isMultipleY(),highlight:()=>this.ctx.highlightFilter}),this.ctx.grid=new ve(this.w,this.ctx),this.ctx.graphics=new ae(this.w,this.ctx),this.ctx.coreUtils=new gt(this.w),this.ctx.crosshairs=new _e(this.w),this.ctx.events=new ke(this.w,this.ctx),this.ctx.localization=new Me(this.w),this.ctx.options=new T,this.ctx.responsive=new Be(this.w),this.ctx.series=new Pi(this.w,{toggleDataSeries:(...t)=>{var e;return null==(e=this.ctx.legend)?void 0:e.legendHelpers.toggleDataSeries(...t)},revertDefaultAxisMinMax:()=>this.ctx.updateHelpers.revertDefaultAxisMinMax(),updateSeries:(...t)=>this.ctx.updateHelpers._updateSeries(...t)}),this.ctx.theme=new Xi(this.w),this.ctx.formatters=new C(this.w),this.ctx.titleSubtitle=new Hi(this.w),this.ctx.dimensions=new ji(this.w,this.ctx),this.ctx.updateHelpers=new Cs(this.w,this.ctx),this.ctx.rendererController=new Ks(this.w,this.ctx),this.ctx.renderer=this.ctx.rendererController.active;const t=new js(this.w,this.ctx);this.w.globals.tooltip=t,Object.defineProperty(this.ctx,"tooltip",{get(){return this.w.globals.tooltip},configurable:!0}),this._initOptionalModules()}_initOptionalModules(){const t=xa._featureRegistry,e=this.w,i=this.ctx;Object.defineProperty(i,"highlightFilter",{get(){var i;if(!this._highlightFilter){const i=t.get("highlightFilter");i&&(this._highlightFilter=new i(e,this))}return null!=(i=this._highlightFilter)?i:null},configurable:!0});const s=t.get("exports");i.exports=s?new s(e,i):null;const a=t.get("legend");i.legend=a?new a(e,i):null;const r=t.get("morphTypeChange");i.morphTypeChange=r?new r(e,i):null;const o=t.get("drilldown");i.drilldown=o?new o(e,i):null;const n=t.get("perspectives");i.perspectives=n?new n(e,i):null;const l=t.get("storyboard");i.storyboard=l?new l(e,i):null;const c=t.get("history");i.history=c?new c(e,i):null;const h=t.get("linkedViews");i.linkedViews=h?new h(e,i):null;const d=t.get("ink");i.ink=d?new d(e,i):null;const p=t.get("measure");i.measure=p?new p(e,i):null;const u=t.get("contextMenu");i.contextMenu=u?new u(e,i):null;const g=t.get("weave");i.weave=g?new g(e,i):null;const x=t.get("waterfall");i.waterfall=x?new x(e,i):null;const f=t.get("streamgraph");i.streamgraph=f?new f(e,i):null;const m=t.get("trellis");i.trellis=m?new m(e,i):null;const b=t.get("osThemeWatcher");i.osThemeWatcher=b?new b(e,i):null;const y=t.get("toolbar");Object.defineProperty(i,"toolbar",{get(){var t;return!this._toolbar&&y&&(this._toolbar=new y(e,this)),null!=(t=this._toolbar)?t:null},configurable:!0});const v=t.get("zoomPanSelection");Object.defineProperty(i,"zoomPanSelection",{get(){var t;return!this._zoomPanSelection&&v&&(this._zoomPanSelection=new v(e,this)),null!=(t=this._zoomPanSelection)?t:null},configurable:!0});const w=t.get("keyboardNavigation");Object.defineProperty(i,"keyboardNavigation",{get(){var t;return!this._keyboardNavigation&&w&&(this._keyboardNavigation=new w(e,this)),null!=(t=this._keyboardNavigation)?t:null},configurable:!0})}}class fa{constructor(t){this.ctx=t,this.w=t.w}clear({isUpdating:t}){var e,i,s,a,r,o,n,l,c,h,d,p,u,g,x,f,m,b;null==(e=this.ctx.weave)||e.teardown(t);const y=this.w.globals;t||(y.isDestroyed=!0,clearTimeout(null!=(i=y.resizeTimer)?i:void 0),clearTimeout(null!=(s=y.radialTickTimer)?s:void 0)),clearTimeout(null!=(a=y.selectionResizeTimer)?a:void 0),this.ctx._zoomPanSelection&&this.ctx._zoomPanSelection.destroy(),this.ctx._toolbar&&this.ctx._toolbar.destroy(),this.w.globals.resizeObserver&&"function"==typeof this.w.globals.resizeObserver.disconnect&&(this.w.globals.resizeObserver.disconnect(),this.w.globals.resizeObserver=null),me.invalidateAll(this.w),t?(this.ctx._zoomPanSelection=null,this.ctx._toolbar=null,null==(r=this.ctx._keyboardNavigation)||r.destroy(),this.ctx._keyboardNavigation=null):(null==(o=this.ctx.perspectives)||o.teardown(),this.ctx.perspectives=null,null==(n=this.ctx.storyboard)||n.teardown(),this.ctx.storyboard=null,null==(l=this.ctx.history)||l.teardown(),this.ctx.history=null,null==(c=this.ctx.linkedViews)||c.teardown(),this.ctx.linkedViews=null,null==(h=this.ctx.trellis)||h.teardown(),this.ctx.trellis=null,null==(d=this.ctx.ink)||d.teardown(),this.ctx.ink=null,null==(p=this.ctx.measure)||p.teardown(),this.ctx.measure=null,null==(u=this.ctx._highlightFilter)||u.teardown(),this.ctx._highlightFilter=null,null==(g=this.ctx.contextMenu)||g.teardown(),this.ctx.contextMenu=null,null==(x=this.ctx.osThemeWatcher)||x.teardown(),this.ctx.osThemeWatcher=null,this.ctx.weave=null,null==(m=null==(f=this.ctx.rendererController)?void 0:f.teardown)||m.call(f),this.ctx.rendererController=null,this.ctx.renderer=null,this.ctx.drilldown=null,this.ctx.morphTypeChange=null,this.ctx.exports=null,this.ctx.animations=null,this.ctx.axes=null,this.ctx.annotations=null,null==(b=this.ctx.core)||b.unhookBrush(),this.ctx.core=null,this.ctx.data=null,this.ctx.grid=null,this.ctx.series=null,this.ctx.responsive=null,this.ctx.theme=null,this.ctx.formatters=null,this.ctx.titleSubtitle=null,this.ctx.legend=null,this.ctx.dimensions=null,this.ctx.options=null,this.ctx.crosshairs=null,this.ctx._zoomPanSelection=null,this.ctx.updateHelpers=null,this.ctx._toolbar=null,this.ctx.localization=null,this.ctx._keyboardNavigation=null,this.ctx.w.globals.tooltip=null),this.clearDomElements({isUpdating:t})}killSVG(t){t.each(function(){this.removeClass("*"),this.off()},!0),t.clear()}clearDomElements({isUpdating:t}){const e=this.w.dom;if(d.isBrowser()&&e.Paper){const i=e.Paper.node;i.parentNode&&i.parentNode.parentNode&&!t&&(i.parentNode.parentNode.style.minHeight="unset");const s=e.baseEl;if(s&&this.ctx.eventList.forEach(t=>{s.removeEventListener(t,this.ctx.events.documentEvent)}),null!==this.ctx.el)for(;this.ctx.el.firstChild;)this.ctx.el.removeChild(this.ctx.el.firstChild);this.killSVG(e.Paper),e.Paper.remove()}e.Paper=null,e.elWrap=null,e.elGraphical=null,e.elLegendWrap=null,e.elLegendForeign=null,e.baseEl=null,e.elGridRect=null,e.elGridRectMask=null,e.elGridRectBarMask=null,e.elGridRectMarkerMask=null,e.elForecastMask=null,e.elNonForecastMask=null,e.elDefs=null}}const ma="__apexcharts_unit_layouts__";function ba(){return globalThis[ma]}globalThis[ma]||(globalThis[ma]={});const ya="__apexcharts_unit_marks__";function va(){return globalThis[ya]}function wa(t,e){if(!t||"string"!=typeof t)return void console.warn("ApexCharts: registerUnitMark requires a non-empty name.");const i=function(t,e){if("string"==typeof t){const i=t.trim();return i?Object.freeze({name:e||"anonymous",path:i,viewBox:[0,0,100,100]}):null}if(!t||"object"!=typeof t)return null;if("string"!=typeof t.path||!t.path.trim())return null;const i=Array.isArray(t.viewBox)&&4===t.viewBox.length?t.viewBox.map(Number):[0,0,100,100];return!i.every(t=>isFinite(t))||i[2]<=0||i[3]<=0?null:Object.freeze(l(n({},t),{name:e||t.name||"anonymous",path:t.path.trim(),viewBox:i,fillRule:"evenodd"===t.fillRule?"evenodd":void 0}))}(e,t);i?va()[t]=i:console.warn(`ApexCharts: registerUnitMark("${t}") expects path data, or {path, viewBox?, fillRule?}.`)}globalThis[ya]||(globalThis[ya]={});const Aa="__apexcharts_row_sources__";function Sa(){return globalThis[Aa]}function Ca(t){return t&&Sa()[t]||null}globalThis[Aa]||(globalThis[Aa]={});const ka="__apexcharts_plugins__";function Ma(){const t=globalThis;return t[ka]||(t[ka]={}),t[ka]}const Ta=new WeakMap;function Da(t,e){if(d.isSSR())return;let i=!1;if(t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE){const e=t.getBoundingClientRect();"none"!==t.style.display&&0!==e.width||(i=!0)}const s=new ResizeObserver(s=>{i&&e.call(t,s),i=!0});t.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Array.from(t.children).forEach(t=>s.observe(t)):s.observe(t);const a=Ta.get(e);a&&a.disconnect(),Ta.set(e,s)}function _a(t,e){if(d.isSSR())return;const i=Ta.get(e);i&&(i.disconnect(),Ta.delete(e))}const Fa=globalThis.console;function La(t,...e){Fa.error(t,...e)}function Ea(t){Fa.warn(t)}const Pa="APEX-",Ba=new Date("2027-07-31T00:00:00Z"),Na="__apex_license_v1__";function Ra(){const t=globalThis;let e=t[Na];return e||(e={key:null,listeners:new Set,result:null},t[Na]=e),e}const za=class{static get licenseKey(){return Ra().key}static set licenseKey(t){Ra().key=t}static get listeners(){return Ra().listeners}static get validationResult(){return Ra().result}static set validationResult(t){Ra().result=t}static getKey(){return this.licenseKey}static getLicenseStatus(){return this.licenseKey?(this.validationResult=this.validateKey(this.licenseKey),this.validationResult):{expired:!1,signatureVerified:!1,valid:!1}}static isKeyValid(t){return!!t&&this.validateKey(t).valid}static isLicenseValid(){return this.getLicenseStatus().valid}static onChange(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}static setLicense(t){var e,i;if(!t)return this.licenseKey=null,void this.publish({expired:!1,signatureVerified:!1,valid:!1});const s=this.validateKey(t);s.valid||t===this.licenseKey||!(null==(i=this.validationResult)?void 0:i.valid)?(this.licenseKey=t,this.publish(s),s.valid||La(`[Apex] ${s.message}`)):Ea(`[Apex] Ignoring license key: ${null!=(e=s.message)?e:"it is not valid"} A valid license is already active on this page.`)}static validateKey(t){const e=this.parseKey(t),i=this.validateStructure(t,e);if(!i.valid||!(null==e?void 0:e.signature))return i;const s=this.verdicts.get(t);return!1===s?{data:e.data,expired:!1,message:"Invalid license key. The license signature does not verify.",signatureVerified:!0,valid:!1}:(void 0===s&&this.verifySignature(t,e,i),l(n({},i),{signatureVerified:!0===s}))}static _resetSignatureState(){this.verdicts.clear(),this.verifying.clear(),this.warnedUnverifiable=!1,this.epoch++}static base64ToBytes(t){const e=t.replace(/-/g,"+").replace(/_/g,"/"),i=e.padEnd(4*Math.ceil(e.length/4),"="),s=globalThis.atob;if("function"!=typeof s)throw new Error("no base64 decoder available");const a=s(i),r=new Uint8Array(a.length);for(let t=0;t<a.length;t++)r[t]=a.charCodeAt(t);return r}static canonicalPayload(t){const e=t.domains&&t.domains.length>0?t.domains.join(","):"";return`v1|${t.issueDate}|${t.expiryDate}|${t.plan}|${e}`}static notify(t){for(const e of this.listeners)try{e(t)}catch(t){}}static parseKey(t){if("string"!=typeof t||!t.startsWith(Pa))return null;const e=t.slice(5);if(!e)return null;try{const t=(new TextDecoder).decode(this.base64ToBytes(e)),i=JSON.parse(t);return i.issueDate&&i.expiryDate&&i.plan?{data:{domains:Array.isArray(i.domains)?i.domains:void 0,expiryDate:i.expiryDate,issueDate:i.issueDate,plan:i.plan,valid:!0},signature:"string"==typeof i.sig&&i.sig?i.sig:null}:null}catch(t){return null}}static publish(t){this.validationResult=t,this.notify(t)}static validateStructure(t,e){const i=t=>({expired:!1,message:t,signatureVerified:!1,valid:!1});if("string"!=typeof t||!t.startsWith(Pa))return i('Invalid license key format. License key must start with "APEX-".');if(!e)return i("Invalid license key. Unable to decode license data.");const{data:s,signature:a}=e;if(!a&&new Date>=Ba)return i("This license key is in the old unsigned format, which is no longer accepted. Please request a replacement key.");if(new Date(s.expiryDate)<new Date)return{data:s,expired:!0,message:`License expired on ${s.expiryDate}. Please renew your license.`,signatureVerified:!1,valid:!1};if(s.domains&&s.domains.length>0){const t="undefined"==typeof location?"":location.hostname;if(!s.domains.some(e=>t===e||t.endsWith(`.${e}`)))return{data:s,expired:!1,message:`License is not valid for this domain (${t}). Allowed domains: ${s.domains.join(", ")}.`,signatureVerified:!1,valid:!1}}return{data:s,expired:!1,signatureVerified:!1,valid:!0}}static verifySignature(t,e,i){return s=this,a=null,r=function*(){var s;if(this.verifying.has(t)||this.verdicts.has(t))return;this.verifying.add(t);const a=this.epoch,r=null==(s=globalThis.crypto)?void 0:s.subtle;if(!r||0===this.publicKeysSpki.length)return this.verifying.delete(t),void(this.warnedUnverifiable||(this.warnedUnverifiable=!0,Ea(r?"[Apex] No license signing key is configured in this build, so license signatures cannot be verified.":"[Apex] Web Crypto is unavailable (a secure context is required), so the license signature cannot be verified.")));const o=(new TextEncoder).encode(this.canonicalPayload(e.data));let c=!1;for(const t of this.publicKeysSpki){try{const i=yield r.importKey("spki",this.base64ToBytes(t),{name:"ECDSA",namedCurve:"P-256"},!1,["verify"]);c=yield r.verify({hash:"SHA-256",name:"ECDSA"},i,this.base64ToBytes(e.signature),o)}catch(t){c=!1}if(c)break}if(this.verifying.delete(t),this.epoch!==a)return;if(this.verdicts.set(t,c),c){const e=l(n({},i),{signatureVerified:!0});return void(this.licenseKey===t?this.publish(e):this.notify(e))}const h="Invalid license key. The license signature does not verify.",d={data:e.data,expired:!1,message:h,signatureVerified:!0,valid:!1};this.licenseKey===t?this.publish(d):this.notify(d),La(`[Apex] ${h}`)},new Promise((t,e)=>{var i=t=>{try{n(r.next(t))}catch(t){e(t)}},o=t=>{try{n(r.throw(t))}catch(t){e(t)}},n=e=>e.done?t(e.value):Promise.resolve(e.value).then(i,o);n((r=r.apply(s,a)).next())});var s,a,r}};za.publicKeysSpki=["MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEQIaK9UMD6n0oR/FIy8QdL0uSzKMQlf1BB+tOrji4/WuHsyRNxeDhVykoSsNURozMi1xhmqWvBH1L//xIfugTPA=="],za.verdicts=new Map,za.verifying=new Set,za.warnedUnverifiable=!1,za.epoch=0;let Ia=za;const Oa=class{static applyStyles(t){Object.assign(t.style,this.CRITICAL_STYLES,{backgroundImage:this.createWatermarkPattern(),backgroundRepeat:"repeat"})}static node(t){return t?t.querySelector(`[${this.WATERMARK_ATTR}]`):null}static add(t,e){return t&&"undefined"!=typeof document?(this.setManaged(t,e),this.paint(t)):null}static exists(t){return!!this.node(t)}static remove(t,e){t&&(this.setManaged(t,e),this.erase(t))}static untrack(t){this.managed.delete(t)}static createWatermarkPattern(){const t=this.WATERMARK_TEXT;return`url("data:image/svg+xml,${encodeURIComponent(`\n <svg xmlns="http://www.w3.org/2000/svg" width="300" height="200">\n <text\n x="50%"\n y="50%"\n dominant-baseline="middle"\n text-anchor="middle"\n font-family="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Arial, sans-serif"\n font-size="18"\n font-weight="600"\n fill="rgba(134, 134, 134, 0.1)"\n transform="rotate(-35, 100, 60)"\n >${t}</text>\n </svg>\n `.trim())}")`}static erase(t){var e;null==(e=this.node(t))||e.remove()}static paint(t){let e=this.node(t);return e||(e=document.createElement("div"),e.setAttribute(this.WATERMARK_ATTR,""),t.appendChild(e)),this.applyStyles(e),"function"==typeof getComputedStyle&&"static"===getComputedStyle(t).position&&(t.style.position="relative"),e}static reconcile(){const t=Ia.isLicenseValid();for(const e of this.managed)e.isConnected?t?this.erase(e):this.paint(e):this.managed.delete(e)}static setManaged(t,e){!1!==(null==e?void 0:e.manage)?this.track(t):this.managed.delete(t)}static track(t){this.managed.add(t),this.subscribed||(this.subscribed=!0,Ia.onChange(()=>{this.reconcile()}))}};Oa.WATERMARK_ATTR="data-apexcharts-watermark",Oa.WATERMARK_TEXT="APEXCHARTS",Oa.ATTR="data-apexcharts-watermark",Oa.CRITICAL_STYLES={bottom:"0",display:"block",left:"0",msUserSelect:"none",opacity:"1",pointerEvents:"none",position:"absolute",right:"0",top:"0",userSelect:"none",visibility:"visible",webkitUserSelect:"none",zIndex:"10000"},Oa.managed=new Set,Oa.subscribed=!1;let Xa=Oa;const Ha="https://apexcharts.com/pricing",Ya="__apexcharts_license_enforcer_v1__";globalThis[Ya]||(globalThis[Ya]={perspectivesTokenDecoded:!1,enforced:new Set});const Wa=globalThis[Ya],$a=Wa.enforced;const Ga=new Set(["premium","enterprise"]);function Ua(t,e){const i=Xa.add(e,{manage:!1});if(!i||"undefined"==typeof MutationObserver)return;if(t._wmNodeObserver&&t._wmObservedNode===i)return;t._wmNodeObserver&&t._wmNodeObserver.disconnect();const s=new MutationObserver(()=>{const t=Xa.node(e);t&&(s.disconnect(),Xa.applyStyles(t),s.takeRecords(),s.observe(t,{attributes:!0,attributeFilter:["style"]}))});s.observe(i,{attributes:!0,attributeFilter:["style"]}),t._wmNodeObserver=s,t._wmObservedNode=i}function ja(t,e){t._wmWrapObserver&&(t._wmWrapObserver.disconnect(),t._wmWrapObserver=null),t._wmNodeObserver&&(t._wmNodeObserver.disconnect(),t._wmNodeObserver=null),t._wmObservedNode=null,t._wmObservedWrap=null;const i=e||t.w&&t.w.dom&&t.w.dom.elWrap;i&&Xa.remove(i,{manage:!1})}function Va(t,e){try{if(!d.isBrowser())return;if(t&&t.globals&&t.globals.isDestroyed)return void $a.delete(e);const i=t&&t.dom&&t.dom.elWrap;if(!i)return;const s=function(t,e){var i;const s=t&&t.config&&t.config.chart||{},a=[];"unit"===s.type&&a.push("unit"),"raincloud"===s.requestedType&&a.push("raincloud"),e.trellis&&"function"==typeof e.trellis.isActive&&e.trellis.isActive()&&a.push("trellis"),e.storyboard&&e.storyboard._used&&a.push("storyboard");const r=s.link;return e.linkedViews&&r&&(!0===r.enabled||"function"==typeof r.dimension)&&a.push("link"),e.ink&&s.ink&&!0===s.ink.enabled&&a.push("ink"),e.measure&&s.measure&&!0===s.measure.enabled&&a.push("measure"),e.contextMenu&&s.contextMenu&&!0===s.contextMenu.enabled&&a.push("context-menu"),e.perspectives&&(e.perspectives._used||Wa.perspectivesTokenDecoded)&&a.push("perspectives"),e.history&&s.history&&!0===s.history.enabled&&a.push("history"),(null==(i=e._highlightFilter)?void 0:i.isActive())&&a.push("highlight-filter"),a}(t,e);if(0===s.length)return $a.delete(e),void ja(e,i);$a.add(e);const a=function(t){const e=t&&t.config&&t.config.chart&&t.config.chart.license;if(e)return e;const i=Ia.getKey();if(i)return i;const s=d.getApex();return s&&s.license?s.license:null}(t);if(function(t){if(!t)return!1;const e=Ia.validateKey(t);if(!e.valid)return!1;const i=e.data&&e.data.plan;return"string"==typeof i&&Ga.has(i.toLowerCase())}(a))return void ja(e,i);!function(t,e){if(Ua(t,e),"undefined"==typeof MutationObserver)return;if(t._wmWrapObserver&&t._wmObservedWrap===e)return;t._wmWrapObserver&&t._wmWrapObserver.disconnect();const i=new MutationObserver(()=>{Xa.node(e)||Ua(t,e)});i.observe(e,{childList:!0}),t._wmWrapObserver=i,t._wmObservedWrap=e}(e,i),function(t,e,i){if(t._premiumLicenseNotified)return;t._premiumLicenseNotified=!0;const s=i.length>1;if(!e)return void console.warn(`[ApexCharts] Premium feature${s?"s":""} in use (${i.join(", ")}) without a license. Running in trial mode with a watermark. Get a license: ${Ha}`);const a=Ia.validateKey(e);if(a.valid){const t=a.data&&a.data.plan||"current";return void console.warn(`[ApexCharts] Premium feature${s?"s":""} in use (${i.join(", ")}) require a Premium or Enterprise license; the ${t} plan does not include ${s?"them":"it"}. Running in trial mode with a watermark. Upgrade: ${Ha}`)}e!==Ia.getKey()&&console.error(`[Apex] ${a.message}`)}(e,a,s)}catch(t){}}function qa(){if(!d.isBrowser())return;const t=new Set,e=d.getApex(),i=e&&e._chartInstances;Array.isArray(i)&&i.forEach(e=>{const i=e&&e.chart;i&&i.w&&!i.w.globals.isDestroyed&&(t.add(i),Va(i.w,i))}),Array.from($a).forEach(e=>{const i=e&&e.w,s=i&&i.dom&&i.dom.elWrap;i&&!i.globals.isDestroyed&&s&&!1!==s.isConnected?t.has(e)||Va(i,e):$a.delete(e)})}function Za(t,e){const i=[t];if(Array.isArray(e))for(const t of e)i.push(t&&"object"==typeof t?t.type:void 0);for(const t of i){if("string"!=typeof t)continue;const e=_[t]||t;if(N.includes(e)&&!st(e))try{rt(e,t)}catch(t){return Promise.reject(t)}}return null}function Ka(t,e){const i=new WeakMap;return(e||[]).forEach(t=>t&&Array.isArray(t.data)&&i.set(t.data,t.data)),A.clone(t,i)}Ia.onChange(qa);class Ja{constructor(t,e){h(this,"core"),h(this,"responsive"),h(this,"axes"),h(this,"grid"),h(this,"graphics"),h(this,"coreUtils"),h(this,"crosshairs"),h(this,"events"),h(this,"fill"),h(this,"localization"),h(this,"options"),h(this,"series"),h(this,"theme"),h(this,"formatters"),h(this,"titleSubtitle"),h(this,"dimensions"),h(this,"updateHelpers"),h(this,"tooltip"),h(this,"data"),h(this,"animations"),h(this,"exports"),h(this,"legend"),h(this,"toolbar"),h(this,"zoomPanSelection"),h(this,"keyboardNavigation"),h(this,"annotations"),h(this,"morphTypeChange"),h(this,"timeScale"),h(this,"_keyboardNavigation"),h(this,"_zoomPanSelection"),h(this,"windowResizeHandler"),h(this,"parentResizeHandler"),h(this,"publicMethods",[]),h(this,"eventList",[]),h(this,"_renderPromise",null),h(this,"_parentResizeWaiter",null),h(this,"_printRestore",null),h(this,"beforePrintHandler"),h(this,"afterPrintHandler"),h(this,"config"),h(this,"perspectives"),h(this,"storyboard"),h(this,"history"),h(this,"linkedViews"),h(this,"trellis"),h(this,"ink"),h(this,"measure"),h(this,"contextMenu"),h(this,"weave"),h(this,"waterfall"),h(this,"streamgraph"),h(this,"renderer"),h(this,"rendererController"),this.opts=e,this.ctx=this,this.w=new ut(e).init(),this.el=t,this.w.globals.cuid=A.randomId(),this.w.globals.chartID=this.w.config.chart.id?A.escapeString(this.w.config.chart.id):this.w.globals.cuid,Vt(this.w);new xa(this).initModules(),this.lastUpdateOptions=null,this._updateStats={fast:0,fastWithAxes:0,full:0},this.create=this.create.bind(this),d.isBrowser()&&(this.windowResizeHandler=this._windowResizeHandler.bind(this),this.parentResizeHandler=this._parentResizeCallback.bind(this),this.beforePrintHandler=this._beforePrint.bind(this),this.afterPrintHandler=this._afterPrint.bind(this))}static get perspectives(){return xa._featureRegistry.get("perspectivesStatics")||null}render(){var t,e;if(!(null==(e=null==(t=this.w)?void 0:t.config)?void 0:e.chart))return Promise.reject(new Error("ApexCharts: chart configuration is missing or invalid. Ensure the options object includes a `chart` property."));if(this._renderPromise)return this._renderPromise;const i=new Promise((t,e)=>{var i,s,a,r,o,n,l,c,h,p,u,g,x,f;if(A.elementExists(this.el)){void 0===Apex._chartInstances&&(Apex._chartInstances=[]),this._unregister(),this.w.config.chart.id&&Apex._chartInstances.push({id:this.w.globals.chartID,group:this.w.config.chart.group,chart:this}),this.core||new xa(this).initModules(),this.setLocale(this.w.config.chart.defaultLocale);const m=this.w.config.chart.events.beforeMount;"function"==typeof m&&m(this,this.w),this.events.fireEvent("beforeMount",[this,this.w]);const b=this.w.config.trellis,v=!(!b||!(b.by||b.row||b.column)),w=!!(v&&this.trellis&&this.trellis.isActive());if(v&&!this.trellis&&ns("`trellis`","trellis",{tail:"Rendering as a single chart."}),(null==(s=null==(i=this.w.config.chart)?void 0:i.measure)?void 0:s.enabled)&&!this.measure&&ns("`chart.measure`","measure"),(null==(r=null==(a=this.w.config.chart)?void 0:a.link)?void 0:r.enabled)&&!this.linkedViews&&ns("`chart.link`","link"),!this.ink){const t=null==(n=null==(o=this.w.config.chart)?void 0:o.ink)?void 0:n.enabled,e=(null!=(c=null==(l=this.w.config.annotations)?void 0:l.points)?c:[]).some(t=>t&&t.draggable);(t||e)&&ns("`chart.ink` / `annotations.points[].draggable`","ink")}if((null==(p=null==(h=this.w.config.chart)?void 0:h.contextMenu)?void 0:p.enabled)&&!this.contextMenu&&ns("`chart.contextMenu`","context-menu"),(null==(g=null==(u=this.w.config.chart)?void 0:u.history)?void 0:g.enabled)&&!this.history&&ns("`chart.history`","history"),(null==(x=this.w.config.drilldown)?void 0:x.enabled)&&!this.ctx.drilldown&&ns("`drilldown`","drilldown"),d.isBrowser()){w||(window.addEventListener("resize",this.windowResizeHandler),Da(this.el.parentNode,this.parentResizeHandler),this._printEnabled()&&(window.addEventListener("beforeprint",this.beforePrintHandler),window.addEventListener("afterprint",this.afterPrintHandler)));const t=this.el.getRootNode&&this.el.getRootNode(),e=A.is("ShadowRoot",t),i=this.el.ownerDocument;let s=e?t.getElementById("apexcharts-css"):i.getElementById("apexcharts-css");if(!s){s=y.createElementNS("http://www.w3.org/1999/xhtml","style"),s.id="apexcharts-css",s.textContent='@keyframes opaque{0%{opacity:0}to{opacity:1}}.apexcharts-canvas{position:relative;direction:ltr!important;user-select:none;--apexcharts-focus-color: #008FFB}.apexcharts-canvas .apexcharts-theme-dark,.apexcharts-theme-dark.apexcharts-canvas{--apexcharts-focus-color: #FFD500}.apexcharts-canvas.apexcharts-high-contrast,.apexcharts-high-contrast.apexcharts-canvas{--apexcharts-focus-color: #FFFF00}.apexcharts-sr-status{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(prefers-reduced-motion:reduce){.apexcharts-canvas:not(.apexcharts-ignore-reduced-motion) *,.apexcharts-canvas:not(.apexcharts-ignore-reduced-motion) *:before,.apexcharts-canvas:not(.apexcharts-ignore-reduced-motion) *:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}.apexcharts-canvas ::-webkit-scrollbar{-webkit-appearance:none;width:6px}.apexcharts-canvas ::-webkit-scrollbar-thumb{border-radius:4px;background-color:#00000080;box-shadow:0 0 1px #ffffff80;-webkit-box-shadow:0 0 1px rgba(255,255,255,.5)}.apexcharts-inner{position:relative}.apexcharts-text tspan{font-family:inherit}rect.legend-mouseover-inactive,.legend-mouseover-inactive rect,.legend-mouseover-inactive path,.legend-mouseover-inactive circle,.legend-mouseover-inactive line,.legend-mouseover-inactive text.apexcharts-yaxis-title-text,.legend-mouseover-inactive text.apexcharts-yaxis-label{transition:.15s ease all;opacity:.2}.apexcharts-crossfilter-dimmed{transition:opacity .25s ease;opacity:var(--apx-cf-dim, .2)}.apexcharts-cf-table{border-collapse:collapse;width:100%;font-size:13px}.apexcharts-cf-table caption{caption-side:bottom;text-align:right;padding:6px 2px;font-size:12px;opacity:.7}.apexcharts-cf-table th,.apexcharts-cf-table td{padding:6px 10px;text-align:left;border-bottom:1px solid rgba(0,0,0,.08)}.apexcharts-cf-table th{font-weight:600;border-bottom-width:2px}.apexcharts-cf-table tbody tr:hover{background:#6366f10f}.apexcharts-canvas{--apx-measure-up: #16a34a;--apx-measure-down: #dc2626;--apx-measure-neutral: #64748b;--apx-measure-guide: #94a3b8}.apexcharts-measure-capture{cursor:crosshair}.apexcharts-canvas{--apx-menu-bg: #ffffff;--apx-menu-fg: #1e293b;--apx-menu-border: #e2e8f0;--apx-menu-hover: #f1f5f9;--apx-menu-shadow: rgba(15, 23, 42, .18)}.apexcharts-context-menu{min-width:168px;padding:4px;border-radius:8px;background:var(--apx-menu-bg);border:1px solid var(--apx-menu-border);box-shadow:0 6px 22px var(--apx-menu-shadow);font-family:Helvetica,Arial,sans-serif;font-size:13px;z-index:20;user-select:none}.apexcharts-context-menu-item{display:block;width:100%;box-sizing:border-box;text-align:left;padding:7px 12px;border:0;border-radius:5px;background:transparent;color:var(--apx-menu-fg);font:inherit;cursor:pointer}.apexcharts-context-menu-item:hover,.apexcharts-context-menu-item--active{background:var(--apx-menu-hover)}.apexcharts-context-menu-item:focus{outline:none}.apexcharts-canvas{--apx-ink-card-bg: #ffffff;--apx-ink-card-fg: #1e293b;--apx-ink-card-border: #e2e8f0;--apx-ink-card-hover: #f1f5f9;--apx-ink-card-accent: #6366f1;--apx-ink-card-shadow: rgba(15, 23, 42, .18)}.apexcharts-ink-card{position:absolute;z-index:25;display:flex;flex-direction:column;gap:6px;padding:8px;border-radius:8px;background:var(--apx-ink-card-bg);border:1px solid var(--apx-ink-card-border);box-shadow:0 6px 22px var(--apx-ink-card-shadow);font-family:Helvetica,Arial,sans-serif;font-size:12px;color:var(--apx-ink-card-fg);user-select:none}.apexcharts-ink-card-row{display:flex;align-items:center;gap:4px}.apexcharts-ink-card input.apexcharts-ink-editor{flex:1 1 auto;width:150px;min-width:0;box-sizing:border-box;padding:4px 6px;font:inherit;color:inherit;background:transparent;border:1px solid var(--apx-ink-card-border);border-radius:5px}.apexcharts-ink-card input.apexcharts-ink-editor:focus{outline:none;border-color:var(--apx-ink-card-accent)}.apexcharts-ink-btn{flex:0 0 auto;width:24px;height:24px;display:inline-flex;align-items:center;justify-content:center;padding:0;border:0;border-radius:5px;background:transparent;color:inherit;font:inherit;font-size:12px;line-height:1;cursor:pointer}.apexcharts-ink-btn:hover,.apexcharts-ink-btn--active{background:var(--apx-ink-card-hover)}.apexcharts-ink-btn:focus-visible,.apexcharts-ink-swatch:focus-visible{outline:2px solid var(--apx-ink-card-accent);outline-offset:1px}.apexcharts-ink-btn--bold{font-weight:700}.apexcharts-ink-btn--delete:hover{color:#dc2626}.apexcharts-ink-swatch{flex:0 0 auto;width:16px;height:16px;padding:0;border:1px solid rgba(100,116,139,.45);border-radius:50%;cursor:pointer}.apexcharts-ink-swatch--active{box-shadow:0 0 0 2px var(--apx-ink-card-bg),0 0 0 4px var(--apx-ink-card-accent)}.apexcharts-ink-sep{flex:0 0 auto;width:1px;height:16px;margin:0 2px;background:var(--apx-ink-card-border)}.apexcharts-ink-cardlabel{flex:0 0 auto;font-size:10px;letter-spacing:.4px;text-transform:uppercase;opacity:.65;margin-right:2px}.apexcharts-ink-marker-size{flex:0 0 auto;min-width:16px;text-align:center;font-variant-numeric:tabular-nums}.apexcharts-legend-text{padding-left:15px;margin-left:-15px}.apexcharts-legend-series[role=button]:focus{outline:2px solid var(--apexcharts-focus-color, #008FFB);outline-offset:2px}.apexcharts-legend-series[role=button]:focus:not(:focus-visible){outline:none}.apexcharts-legend-series[role=button]:focus-visible{outline:2px solid var(--apexcharts-focus-color, #008FFB);outline-offset:2px}.apexcharts-series-collapsed{opacity:0}.apexcharts-series-collapsed.apexcharts-series-collapsing{opacity:1}.apexcharts-datalabels.apexcharts-series-collapsing{animation:apexcharts-datalabels-exit var(--apexcharts-dl-exit, .4s) ease-in forwards}@keyframes apexcharts-datalabels-exit{0%{opacity:1}to{opacity:0}}.apexcharts-canvas svg:focus:not(:focus-visible){outline:none}.apexcharts-bar-area.apexcharts-keyboard-focused,.apexcharts-candlestick-area.apexcharts-keyboard-focused,.apexcharts-boxPlot-area.apexcharts-keyboard-focused,.apexcharts-violin-area.apexcharts-keyboard-focused,.apexcharts-rangebar-area.apexcharts-keyboard-focused,.apexcharts-pie-area.apexcharts-keyboard-focused,.apexcharts-heatmap-rect.apexcharts-keyboard-focused,.apexcharts-treemap-rect.apexcharts-keyboard-focused,.apexcharts-keyboard-focus-ring{stroke:var(--apexcharts-focus-color, #008FFB);stroke-width:2;stroke-opacity:1}.apexcharts-keyboard-focus-ring{fill:none;pointer-events:none}.apexcharts-tooltip{--apx-tt-bg: #ffffff;--apx-tt-border: rgba(15, 23, 42, .12);--apx-tt-shadow-dir: 1;--apx-tt-shadow: 0 calc(var(--apx-tt-shadow-dir) * 1px) 2px rgba(15, 23, 42, .06), 0 calc(var(--apx-tt-shadow-dir) * 4px) 8px -2px rgba(15, 23, 42, .1), 0 calc(var(--apx-tt-shadow-dir) * 12px) 20px -8px rgba(15, 23, 42, .14);--apx-tt-arrow-bg: var(--apx-tt-bg);--apx-tt-color: #0f172a;--apx-tt-color-muted: rgba(15, 23, 42, .55);border-radius:8px;background:var(--apx-tt-bg);border:1px solid var(--apx-tt-border);box-shadow:var(--apx-tt-shadow);color:var(--apx-tt-color);cursor:default;font-size:13px;left:0;top:0;opacity:0;pointer-events:none;position:absolute;display:flex;flex-direction:column;padding:2px 0;white-space:nowrap;z-index:12;transition:opacity .12s ease}.apexcharts-tooltip.apexcharts-active{opacity:1;transition:opacity .12s ease}.apexcharts-tooltip.apexcharts-tooltip-interactive.apexcharts-active{pointer-events:auto}.apexcharts-tooltip.apexcharts-active[data-positioned=true]{transition:opacity .12s ease,left .16s ease-out,top .16s ease-out}.apexcharts-tooltip.apexcharts-theme-dark{--apx-tt-bg: #1c1c1f;--apx-tt-border: rgba(255, 255, 255, .16);--apx-tt-shadow: 0 calc(var(--apx-tt-shadow-dir) * 1px) 2px rgba(0, 0, 0, .24), 0 calc(var(--apx-tt-shadow-dir) * 4px) 8px -2px rgba(0, 0, 0, .3), 0 calc(var(--apx-tt-shadow-dir) * 12px) 20px -8px rgba(0, 0, 0, .38);--apx-tt-color: #f3f4f6;--apx-tt-color-muted: rgba(243, 244, 246, .55)}.apexcharts-tooltip *{font-family:inherit}.apexcharts-tooltip.apexcharts-annotation-tooltip{padding:6px 10px;max-width:240px;white-space:normal;line-height:1.4;pointer-events:none;z-index:13}.apexcharts-tooltip-title{padding:8px 12px 4px;font-size:12px;font-weight:600;letter-spacing:.01em;color:var(--apx-tt-color-muted);background:transparent;border-bottom:none;margin-bottom:0}.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title,.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title{background:transparent;border-bottom:none}.apexcharts-tooltip.apexcharts-tooltip-fill-series{background:transparent;-webkit-backdrop-filter:none;backdrop-filter:none;border:none;padding:0;overflow:hidden;color:#fff}.apexcharts-tooltip.apexcharts-tooltip-fill-series .apexcharts-tooltip-title{background:#00000038;color:#fff;opacity:1;padding:6px 12px}.apexcharts-tooltip.apexcharts-tooltip-fill-series .apexcharts-tooltip-series-group{color:#fff}.apexcharts-tooltip-arrow{position:absolute;box-sizing:border-box;width:10px;height:10px;background:var(--apx-tt-arrow-bg);transform:rotate(45deg);pointer-events:none;top:calc(var(--apx-tt-arrow-y, calc(50% + 1px) ) - 6px)}.apexcharts-tooltip[data-placement=right] .apexcharts-tooltip-arrow{left:-6px;border-left:1px solid var(--apx-tt-border);border-bottom:1px solid var(--apx-tt-border)}.apexcharts-tooltip[data-placement=left] .apexcharts-tooltip-arrow{right:-6px;border-top:1px solid var(--apx-tt-border);border-right:1px solid var(--apx-tt-border)}.apexcharts-tooltip[data-placement=top] .apexcharts-tooltip-arrow,.apexcharts-tooltip[data-placement=bottom] .apexcharts-tooltip-arrow{top:auto;left:calc(var(--apx-tt-arrow-x, calc(50% + 1px) ) - 6px)}.apexcharts-tooltip[data-placement=top] .apexcharts-tooltip-arrow{bottom:-6px;border-right:1px solid var(--apx-tt-border);border-bottom:1px solid var(--apx-tt-border)}.apexcharts-tooltip[data-placement=bottom] .apexcharts-tooltip-arrow{top:-6px;border-top:1px solid var(--apx-tt-border);border-left:1px solid var(--apx-tt-border)}.apexcharts-tooltip[data-placement=bottom]{--apx-tt-shadow-dir: -1 }.apexcharts-tooltip-text-goals-value,.apexcharts-tooltip-text-y-value,.apexcharts-tooltip-text-z-value{display:inline-block;margin-left:5px;font-weight:600}.apexcharts-tooltip-text-goals-label:empty,.apexcharts-tooltip-text-goals-value:empty,.apexcharts-tooltip-text-y-label:empty,.apexcharts-tooltip-text-y-value:empty,.apexcharts-tooltip-text-z-value:empty,.apexcharts-tooltip-title:empty{display:none}.apexcharts-tooltip-text-goals-label,.apexcharts-tooltip-text-goals-value{padding:6px 0 5px}.apexcharts-tooltip-goals-group,.apexcharts-tooltip-text-goals-label,.apexcharts-tooltip-text-goals-value{display:flex}.apexcharts-tooltip-text-goals-label:not(:empty),.apexcharts-tooltip-text-goals-value:not(:empty){margin-top:-6px}.apexcharts-tooltip-marker{display:inline-flex;align-items:center;justify-content:center;position:relative;width:12px;height:12px;margin-right:6px;vertical-align:middle;color:inherit}.apexcharts-tooltip-marker svg{width:100%;height:100%;display:block}.apexcharts-tooltip-series-group{padding:4px 12px;display:none;gap:8px;text-align:left;justify-content:left;align-items:center}.apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker{opacity:1}.apexcharts-tooltip-series-group.apexcharts-active:last-child,.apexcharts-tooltip-series-group:last-child{padding-bottom:8px}.apexcharts-tooltip-y-group{padding:6px 0 5px}.apexcharts-tooltip.apexcharts-tooltip-compact{padding:3px 8px;font-size:11px;line-height:1.35}.apexcharts-tooltip-compact .apexcharts-tooltip-title{padding:0;font-size:11px;white-space:nowrap}.apexcharts-tooltip-compact .apexcharts-tooltip-series-group,.apexcharts-tooltip-compact .apexcharts-tooltip-series-group.apexcharts-active:last-child,.apexcharts-tooltip-compact .apexcharts-tooltip-series-group:last-child{padding:0;gap:5px}.apexcharts-tooltip-compact .apexcharts-tooltip-y-group{padding:0}.apexcharts-tooltip-compact .apexcharts-tooltip-marker{width:8px;height:8px}.apexcharts-tooltip.apexcharts-tooltip-compact.apexcharts-tooltip-value-only{flex-direction:row;align-items:baseline;gap:6px}.apexcharts-tooltip-value-only .apexcharts-tooltip-marker,.apexcharts-tooltip-value-only .apexcharts-tooltip-text-y-label{display:none}.apexcharts-custom-tooltip,.apexcharts-tooltip-box{padding:4px 8px}.apexcharts-tooltip-boxPlot{display:flex;flex-direction:column-reverse}.apexcharts-tooltip-box>div{margin:4px 0}.apexcharts-tooltip-box span.value{font-weight:700}.apexcharts-tooltip-rangebar{padding:5px 8px}.apexcharts-tooltip-rangebar .category{font-weight:600;color:#777}.apexcharts-tooltip-rangebar .series-name{font-weight:700;display:block;margin-bottom:5px}.apexcharts-tooltip-stream{padding:5px 8px}.apexcharts-tooltip-stream .apexcharts-tooltip-title{background:transparent;border:0;padding:0 0 4px;margin:0;font-weight:700}.apexcharts-tooltip-stream-band{display:flex;align-items:center;gap:5px;line-height:1.6;opacity:.72}.apexcharts-tooltip-stream-band.apexcharts-active{opacity:1;font-weight:700}.apexcharts-tooltip-stream-band .series-name{flex:1 1 auto;margin-right:8px}.apexcharts-tooltip-stream-band .value{font-weight:700;margin-left:auto}.apexcharts-tooltip-stream-total{display:flex;align-items:center;margin-top:4px;padding-top:4px;border-top:1px solid var(--apx-tt-border, rgba(15, 23, 42, .12))}.apexcharts-tooltip-stream-total .series-name{flex:1 1 auto;font-weight:600}.apexcharts-tooltip-stream-total .value{font-weight:700;margin-left:auto}.apexcharts-streamgraph-label{pointer-events:none}.apexcharts-xaxistooltip,.apexcharts-yaxistooltip{--apx-axt-bg: #ffffff;--apx-axt-border: rgba(15, 23, 42, .08);--apx-axt-color: #0f172a;--apx-axt-shadow: 0 4px 12px -4px rgba(15, 23, 42, .18), 0 1px 3px -1px rgba(15, 23, 42, .12);opacity:0;pointer-events:none;color:var(--apx-axt-color);font-size:12px;font-weight:500;text-align:center;border-radius:6px;position:absolute;z-index:10;background:var(--apx-axt-bg);border:1px solid var(--apx-axt-border);box-shadow:var(--apx-axt-shadow)}.apexcharts-xaxistooltip.apexcharts-theme-dark,.apexcharts-yaxistooltip.apexcharts-theme-dark{--apx-axt-bg: #1c1c1f;--apx-axt-border: rgba(255, 255, 255, .1);--apx-axt-color: #f3f4f6;--apx-axt-shadow: 0 4px 12px -4px rgba(0, 0, 0, .55), 0 1px 3px -1px rgba(0, 0, 0, .45) }.apexcharts-xaxistooltip{padding:4px 8px;transition:.15s ease all}.apexcharts-xaxistooltip:after,.apexcharts-xaxistooltip:before{left:50%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}.apexcharts-xaxistooltip:after{border-color:transparent;border-width:5px;margin-left:-5px}.apexcharts-xaxistooltip:before{border-color:transparent;border-width:6px;margin-left:-6px}.apexcharts-xaxistooltip-bottom:after,.apexcharts-xaxistooltip-bottom:before{bottom:100%}.apexcharts-xaxistooltip-top:after,.apexcharts-xaxistooltip-top:before{top:100%}.apexcharts-xaxistooltip-bottom:after{border-bottom-color:var(--apx-axt-bg)}.apexcharts-xaxistooltip-bottom:before{border-bottom-color:var(--apx-axt-border)}.apexcharts-xaxistooltip-top:after{border-top-color:var(--apx-axt-bg)}.apexcharts-xaxistooltip-top:before{border-top-color:var(--apx-axt-border)}.apexcharts-xaxistooltip.apexcharts-active{opacity:1;transition:.15s ease all}.apexcharts-yaxistooltip{padding:3px 8px}.apexcharts-yaxistooltip:after,.apexcharts-yaxistooltip:before{top:50%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}.apexcharts-yaxistooltip:after{border-color:transparent;border-width:5px;margin-top:-5px}.apexcharts-yaxistooltip:before{border-color:transparent;border-width:6px;margin-top:-6px}.apexcharts-yaxistooltip-left:after,.apexcharts-yaxistooltip-left:before{left:100%}.apexcharts-yaxistooltip-right:after,.apexcharts-yaxistooltip-right:before{right:100%}.apexcharts-yaxistooltip-left:after{border-left-color:var(--apx-axt-bg)}.apexcharts-yaxistooltip-left:before{border-left-color:var(--apx-axt-border)}.apexcharts-yaxistooltip-right:after{border-right-color:var(--apx-axt-bg)}.apexcharts-yaxistooltip-right:before{border-right-color:var(--apx-axt-border)}.apexcharts-yaxistooltip.apexcharts-active{opacity:1}.apexcharts-yaxistooltip-hidden{display:none}.apexcharts-xcrosshairs,.apexcharts-ycrosshairs{pointer-events:none;opacity:0;transition:.15s ease all}.apexcharts-xcrosshairs.apexcharts-active,.apexcharts-ycrosshairs.apexcharts-active{opacity:1;transition:.15s ease all}.apexcharts-ycrosshairs-hidden{opacity:0}.apexcharts-selection-rect{cursor:move}.svg_select_shape{stroke-width:1;stroke-dasharray:10 10;stroke:#000;stroke-opacity:.1;pointer-events:none;fill:none}.svg_select_handle{stroke-width:3;stroke:#000;fill:none}.svg_select_handle_r{cursor:e-resize}.svg_select_handle_l{cursor:w-resize}.apexcharts-svg.apexcharts-zoomable.hovering-zoom{cursor:crosshair}.apexcharts-svg.apexcharts-zoomable.hovering-pan{cursor:move}.apexcharts-menu-icon,.apexcharts-measure-icon,.apexcharts-pan-icon,.apexcharts-reset-icon,.apexcharts-selection-icon,.apexcharts-toolbar-custom-icon,.apexcharts-zoom-icon,.apexcharts-zoomin-icon,.apexcharts-zoomout-icon{cursor:pointer;width:26px;height:24px;line-height:24px;color:#6e8192;text-align:center;padding:0;margin:0;background:transparent;border:0;border-radius:5px;display:inline-flex;align-items:center;justify-content:center;transition:background-color .12s ease,color .12s ease}.apexcharts-menu-icon svg,.apexcharts-measure-icon svg,.apexcharts-pan-icon svg,.apexcharts-reset-icon svg,.apexcharts-selection-icon svg,.apexcharts-zoom-icon svg,.apexcharts-zoomin-icon svg,.apexcharts-zoomout-icon svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.apexcharts-theme-dark .apexcharts-menu-icon,.apexcharts-theme-dark .apexcharts-measure-icon,.apexcharts-theme-dark .apexcharts-pan-icon,.apexcharts-theme-dark .apexcharts-reset-icon,.apexcharts-theme-dark .apexcharts-selection-icon,.apexcharts-theme-dark .apexcharts-toolbar-custom-icon,.apexcharts-theme-dark .apexcharts-zoom-icon,.apexcharts-theme-dark .apexcharts-zoomin-icon,.apexcharts-theme-dark .apexcharts-zoomout-icon{color:#d4d6dc}.apexcharts-canvas .apexcharts-measure-icon.apexcharts-selected,.apexcharts-canvas .apexcharts-pan-icon.apexcharts-selected,.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected,.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected,.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected{background:#008ffb1f;color:#008ffb}.apexcharts-theme-light .apexcharts-menu-icon:hover,.apexcharts-theme-light .apexcharts-measure-icon:not(.apexcharts-selected):hover,.apexcharts-theme-light .apexcharts-pan-icon:not(.apexcharts-selected):hover,.apexcharts-theme-light .apexcharts-reset-icon:hover,.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover,.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover,.apexcharts-theme-light .apexcharts-zoomin-icon:hover,.apexcharts-theme-light .apexcharts-zoomout-icon:hover{background:#0f172a0f;color:#1f2937}.apexcharts-theme-dark .apexcharts-menu-icon:hover,.apexcharts-theme-dark .apexcharts-measure-icon:not(.apexcharts-selected):hover,.apexcharts-theme-dark .apexcharts-pan-icon:not(.apexcharts-selected):hover,.apexcharts-theme-dark .apexcharts-reset-icon:hover,.apexcharts-theme-dark .apexcharts-selection-icon:not(.apexcharts-selected):hover,.apexcharts-theme-dark .apexcharts-zoom-icon:not(.apexcharts-selected):hover,.apexcharts-theme-dark .apexcharts-zoomin-icon:hover,.apexcharts-theme-dark .apexcharts-zoomout-icon:hover{background:#ffffff14;color:#fff}.apexcharts-menu-icon,.apexcharts-selection-icon{position:relative}.apexcharts-toolbar{position:absolute;z-index:11;display:inline-flex;align-items:center;gap:1px;padding:3px;border-radius:8px;background:#ffffffd9;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}.apexcharts-theme-dark .apexcharts-toolbar{background:#1c1c1fd1}.apexcharts-menu{background:#fffffff2;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);position:absolute;top:calc(100% + 4px);border:1px solid rgba(15,23,42,.08);border-radius:8px;padding:4px;right:0;opacity:0;min-width:120px;transition:opacity .15s ease,transform .15s ease;transform:translateY(-2px);pointer-events:none;box-shadow:0 4px 16px -4px #0f172a1f,0 2px 4px -1px #0f172a0f}.apexcharts-menu.apexcharts-menu-open{opacity:1;transform:translateY(0);pointer-events:all}.apexcharts-menu-item{padding:6px 9px;font-size:12px;border-radius:5px;cursor:pointer}.apexcharts-theme-light .apexcharts-menu-item:hover{background:#0f172a0f}.apexcharts-theme-dark .apexcharts-menu{background:#1c1c1feb;border-color:#ffffff14;color:#f3f4f6;box-shadow:0 4px 16px -4px #00000080,0 2px 4px -1px #0006}.apexcharts-theme-dark .apexcharts-menu-item:hover{background:#ffffff14}@media screen and (min-width:768px){.apexcharts-canvas:hover .apexcharts-toolbar{opacity:1}}.apexcharts-toolbar:focus-within{opacity:1}.apexcharts-menu-icon:focus-visible,.apexcharts-measure-icon:focus-visible,.apexcharts-pan-icon:focus-visible,.apexcharts-reset-icon:focus-visible,.apexcharts-selection-icon:focus-visible,.apexcharts-toolbar-custom-icon:focus-visible,.apexcharts-zoom-icon:focus-visible,.apexcharts-zoomin-icon:focus-visible,.apexcharts-zoomout-icon:focus-visible{outline:2px solid var(--apexcharts-focus-color, #008FFB);outline-offset:1px;border-radius:5px}.apexcharts-menu-item:focus-visible{outline:2px solid var(--apexcharts-focus-color, #008FFB);outline-offset:-2px;background:#eee}.apexcharts-canvas .apexcharts-element-hidden,.apexcharts-datalabel.apexcharts-element-hidden,.apexcharts-hide .apexcharts-series-points{opacity:0}.apexcharts-hidden-element-shown{opacity:1;transition:.25s ease all}.apexcharts-datalabel,.apexcharts-datalabel-label,.apexcharts-datalabel-value,.apexcharts-datalabels,.apexcharts-pie-label,.apexcharts-pie-name-label,.apexcharts-pie-name-label-group,.apexcharts-pie-label-connector,.apexcharts-unit-outer-label,.apexcharts-unit-outer-label-group,.apexcharts-unit-label-connector{cursor:default;pointer-events:none}.apexcharts-pie-label-connector,.apexcharts-unit-label-connector{fill:none}.apexcharts-pie-label-delay,.apexcharts-unit-label-delay{opacity:0;animation-name:opaque;animation-duration:.3s;animation-fill-mode:forwards;animation-timing-function:ease}.apexcharts-unit-label-delay{animation-duration:.5s}.apexcharts-radialbar-label{cursor:pointer}.apexcharts-annotation-rect,.apexcharts-area-series .apexcharts-area,.apexcharts-gridline,.apexcharts-line,.apexcharts-point-annotation-label,.apexcharts-radar-series path:not(.apexcharts-marker),.apexcharts-radar-series polygon,.apexcharts-toolbar svg,.apexcharts-tooltip .apexcharts-marker,.apexcharts-xaxis-annotation-label,.apexcharts-yaxis-annotation-label,.apexcharts-zoom-rect,.no-pointer-events{pointer-events:none}.apexcharts-tooltip-active .apexcharts-marker{transition:.15s ease all}.apexcharts-radar-series .apexcharts-yaxis,.apexcharts-bar-goals-markers,.apexcharts-bar-shadows,.apexcharts-rangebar-goals-markers{pointer-events:none}.apexcharts-drilldown-target{cursor:pointer}.apexcharts-breadcrumb{position:absolute;z-index:11;display:inline-flex;align-items:center;gap:2px;font-size:12px;font-family:inherit;padding:2px 4px}.apexcharts-breadcrumb-item{background:transparent;border:none;padding:2px 6px;border-radius:3px;font:inherit;color:inherit;cursor:pointer;line-height:1.2}.apexcharts-breadcrumb-item:hover:not(.apexcharts-breadcrumb-current){background:#00000014}.apexcharts-breadcrumb-arrow{margin-right:4px;font-weight:600;user-select:none}.apexcharts-breadcrumb-current{cursor:default;font-weight:600;opacity:.85}.apexcharts-breadcrumb-separator{opacity:.5;user-select:none}.apexcharts-theme-dark .apexcharts-breadcrumb-item:hover:not(.apexcharts-breadcrumb-current){background:#ffffff1f}.apexcharts-drilldown-loading{position:absolute;inset:0;z-index:12;display:flex;align-items:center;justify-content:center;gap:10px;font-size:13px;font-family:inherit;color:inherit;background:#ffffff9e;cursor:progress}.apexcharts-drilldown-loading-spinner{width:26px;height:26px;border-radius:50%;border:2.5px solid rgba(0,0,0,.16);border-top-color:#0000008c;animation:apexcharts-drilldown-spin .7s linear infinite}.apexcharts-drilldown-loading-text{opacity:.8}.apexcharts-theme-dark .apexcharts-drilldown-loading{background:#1e1e1e9e}.apexcharts-theme-dark .apexcharts-drilldown-loading-spinner{border-color:#ffffff38;border-top-color:#ffffffb3}@keyframes apexcharts-drilldown-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.apexcharts-canvas:not(.apexcharts-ignore-reduced-motion) .apexcharts-drilldown-loading-spinner{animation:apexcharts-drilldown-pulse 1.4s ease-in-out infinite!important}@keyframes apexcharts-drilldown-pulse{0%,to{opacity:.35}50%{opacity:1}}}.apexcharts-disable-transitions *{transition:none!important}.apexcharts-trellis{position:relative}.apexcharts-trellis-grid{display:grid}.apexcharts-trellis-cell{min-width:0;position:relative}.apexcharts-trellis-header{font-size:12px;font-weight:600;line-height:22px;height:22px;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--apx-fore, var(--apx-trellis-fore, #373d3f))}.apexcharts-trellis-title{font-size:14px;font-weight:700;padding:2px 0 6px;color:var(--apx-fore, var(--apx-trellis-fore, #373d3f))}.apexcharts-trellis-mute-y .apexcharts-yaxis,.apexcharts-trellis-mute-x .apexcharts-xaxis{opacity:0}.apexcharts-trellis-has-toolbar{padding-top:24px}.apexcharts-trellis-strip{font-size:12px;font-weight:600;color:var(--apx-fore, var(--apx-trellis-fore, #373d3f));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.apexcharts-trellis-strip-column{text-align:center;line-height:22px;height:22px;align-self:end}.apexcharts-trellis-strip-row{align-self:center;max-width:140px;padding-right:6px}.apexcharts-trellis-cell-empty{position:relative}.apexcharts-trellis-empty-label{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:12px;color:var(--apx-fore, var(--apx-trellis-fore, #373d3f));opacity:.45;pointer-events:none}.apexcharts-trellis-cell-hidden>*{visibility:hidden}.apexcharts-trellis-gradient-legend{margin:10px auto 0}.apexcharts-trellis-panel.apexcharts-trellis-skeleton{background:var(--apx-fore, var(--apx-trellis-fore, #373d3f));opacity:.05;border-radius:4px}.apexcharts-trellis[data-tooltip-mode=panel] .apexcharts-trellis-cell:not(:hover) .apexcharts-tooltip,.apexcharts-trellis[data-tooltip-mode=panel] .apexcharts-trellis-cell:not(:hover) .apexcharts-xaxistooltip,.apexcharts-trellis[data-tooltip-mode=panel] .apexcharts-trellis-cell:not(:hover) .apexcharts-yaxistooltip{opacity:0!important}.apexcharts-trellis[data-tooltip-mode=grid] .apexcharts-trellis-cell .apexcharts-tooltip,.apexcharts-trellis[data-tooltip-mode=grid] .apexcharts-trellis-cell .apexcharts-xaxistooltip,.apexcharts-trellis[data-tooltip-mode=grid] .apexcharts-trellis-cell .apexcharts-yaxistooltip{opacity:0!important}.apexcharts-trellis-tooltip{position:absolute;top:0;left:0;z-index:14;pointer-events:none;opacity:0;transition:opacity .1s ease;background:var(--apx-bg, #fff);color:var(--apx-fore, var(--apx-trellis-fore, #373d3f));border:1px solid rgba(120,120,120,.25);border-radius:5px;box-shadow:2px 2px 6px -4px #0006;font-size:12px;min-width:140px;max-width:320px}.apexcharts-trellis-tooltip-active{opacity:1}.apexcharts-trellis-tooltip .apexcharts-tooltip-title{padding:5px 10px;font-weight:600;background:#78787814;border-bottom:1px solid rgba(120,120,120,.18);margin-bottom:2px}.apexcharts-trellis-tooltip-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:2px 10px;line-height:1.6}.apexcharts-trellis-tooltip-row-active{background:#7878781a;font-weight:600}.apexcharts-trellis-tooltip-key{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.apexcharts-trellis-tooltip-vals{display:flex;gap:10px;white-space:nowrap}.apexcharts-trellis-tooltip-val{display:inline-flex;align-items:center;gap:5px}.apexcharts-trellis-tooltip-marker{width:8px;height:8px;border-radius:50%;display:inline-block;flex:none}.apexcharts-trellis-cell-promoted{grid-column:1 / -1}.apexcharts-trellis-cell-parked{display:none}.apexcharts-trellis-cell-promoted.apexcharts-trellis-mute-y .apexcharts-yaxis,.apexcharts-trellis-cell-promoted.apexcharts-trellis-mute-x .apexcharts-xaxis{opacity:1}.apexcharts-trellis-header-clickable{cursor:pointer}.apexcharts-trellis-header-clickable:hover{text-decoration:underline;text-underline-offset:3px}.apexcharts-trellis-breadcrumb{display:flex;align-items:center;gap:6px;font-size:12px;padding:2px 0 6px;color:var(--apx-fore, var(--apx-trellis-fore, #373d3f))}.apexcharts-trellis-breadcrumb-back{border:none;background:none;padding:0;font-size:12px;cursor:pointer;color:var(--apx-accent, #008ffb)}.apexcharts-trellis-breadcrumb-back:hover{text-decoration:underline}.apexcharts-trellis-breadcrumb-sep{opacity:.5}.apexcharts-trellis-breadcrumb-current{font-weight:600}.apexcharts-trellis-menu{position:absolute;top:26px;right:0;display:none;flex-direction:column;min-width:132px;background:var(--apx-bg, #fff);border:1px solid rgba(120,120,120,.25);border-radius:5px;box-shadow:2px 2px 6px -4px #0006;padding:4px;z-index:15}.apexcharts-trellis-menu-open{display:flex}.apexcharts-trellis-menu-item{border:none;background:none;text-align:left;font-size:12px;padding:5px 8px;border-radius:3px;cursor:pointer;color:var(--apx-fore, var(--apx-trellis-fore, #373d3f))}.apexcharts-trellis-menu-item:hover{background:#7878781f}.apexcharts-trellis-toolbar{position:absolute;top:0;right:0;display:flex;gap:2px;z-index:12}.apexcharts-trellis-tool{border:0;background:transparent;padding:2px;cursor:pointer;border-radius:3px;color:#6e8192;line-height:0}.apexcharts-trellis-tool:hover{color:var(--apx-fore, var(--apx-trellis-fore, #373d3f))}.apexcharts-trellis-tool.apexcharts-selected{color:var(--apx-accent, #008ffb)}.apexcharts-trellis-legend{display:flex;flex-wrap:wrap;justify-content:center;gap:4px 14px;padding:8px 10px 2px}.apexcharts-trellis-legend-item{display:flex;align-items:center;gap:6px;cursor:pointer;line-height:1}.apexcharts-trellis-legend-item .apexcharts-legend-marker{width:12px;height:12px;border-radius:50%;display:inline-block}.apexcharts-trellis-legend-item .apexcharts-legend-text{font-size:12px;color:var(--apx-fore, var(--apx-trellis-fore, #373d3f))}.apexcharts-trellis-legend-item.apexcharts-inactive-legend{opacity:.45}@media print{.apexcharts-canvas.apexcharts-printing,.apexcharts-canvas.apexcharts-printing svg{max-width:100%!important}.apexcharts-canvas.apexcharts-printing svg{height:auto!important}.apexcharts-canvas.apexcharts-printing{height:auto!important}.apexcharts-toolbar{display:none!important}}';const a=(null==(f=this.opts.chart)?void 0:f.nonce)||this.w.config.chart.nonce;a&&s.setAttribute("nonce",a),e?t.prepend(s):!1!==this.w.config.chart.injectStyleSheet&&i.head.prepend(s)}}if(w)return void this.trellis.render().then(()=>{Va(this.w,this),"function"==typeof this.w.config.chart.events.mounted&&this.w.config.chart.events.mounted(this,this.w),this.events.fireEvent("mounted",[this,this.w]),t(this)}).catch(t=>{var i,s;const a=t instanceof Error?t:new Error(String(t)),r=a;r.chartId=null==(s=null==(i=this.w)?void 0:i.globals)?void 0:s.chartID,r.el=this.el,e(a)});const S=this.create(this.w.config.series,{});if(!S)return t(this);this.mount(S).then(()=>{"function"==typeof this.w.config.chart.events.mounted&&this.w.config.chart.events.mounted(this,this.w),this.events.fireEvent("mounted",[this,this.w]),t(S)}).catch(t=>{var i,s;const a=t instanceof Error?t:new Error(String(t)),r=a;r.chartId=null==(s=null==(i=this.w)?void 0:i.globals)?void 0:s.chartID,r.el=this.el,e(a)})}else e(new Error("Element not found"))});return this._renderPromise=i,i.catch(()=>{this._renderPromise===i&&(this._renderPromise=null,this._detachHost())}),i}_unregister(){const t=Apex._chartInstances;for(let e=t?t.length:0;e--;)t[e].chart===this&&t.splice(e,1)}_detachHost(){d.isBrowser()&&(window.removeEventListener("resize",this.windowResizeHandler),_a(this.el&&this.el.parentNode,this.parentResizeHandler),window.removeEventListener("beforeprint",this.beforePrintHandler),window.removeEventListener("afterprint",this.afterPrintHandler)),this._unregister()}create(t,e,i=!0){var s,a,r,o,c,h;const p=this.w;if(!this.core){new xa(this).initModules()}const u=this.w.globals;if(u.noData=!1,u.animationEnded=!1,!A.elementExists(this.el))return u.animationEnded=!0,null;if(this.responsive.checkResponsiveConfig(e),Vt(p),p.config.xaxis.convertedCatToNumeric){new Z(p.config).convertCatToNumericXaxis(p.config)}if(this.core.setupElements(),0===u.svgWidth)return u.animationEnded=!0,null;let g=t;const x=[];t.forEach((t,e)=>{t.hidden&&(g=this.legend.legendHelpers.getSeriesAfterCollapsing({realIndex:e}),x.push(e))});const f=gt.checkComboSeries(g,p.config.chart.type);u.comboCharts=f.comboCharts,u.comboBarCount=f.comboBarCount;const m=g.every(t=>t.data&&0===t.data.length);if((0===g.length||m&&u.collapsedSeries.length<1)&&this.series.handleNoData(),d.isBrowser()&&this.events.setupEventHandlers(),this.data.parseData(g,i),i&&x.length){const t=u._initialSeriesPeek||[],e=u.collapsedSeries.concat(u.ancillaryCollapsedSeries);u.initialSeries=t.map((t,i)=>{if(-1===x.indexOf(i)||!A.isObject(t))return t;const s=e.find(t=>t.index===i);return s&&Array.isArray(s.data)&&s.data.length?l(n({},t),{data:s.data.slice()}):t})}null==(s=this.rendererController)||s.resolve(),null==(a=this.weave)||a.dispatch("afterParse"),this.theme.init();new ce(this.w,this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),u.noData&&u.collapsedSeries.length!==p.seriesData.series.length&&!p.config.legend.showForSingleSeries||null==(r=this.legend)||r.init(),this.series.hasAllSeriesEqualX(),u.axisCharts&&(this.core.coreCalculations(),"category"!==p.config.xaxis.type&&this.formatters.setLabelFormatters()),this.formatters.heatmapLabelFormatters();new gt(this.w).getLargestMarkerSize();const b=this.dimensions.plotCoords();this._writeLayoutCoords(b.layout);const y=this.core.xySettings();null==(o=this.weave)||o.dispatch("afterScales",{xyRatios:y}),this.grid.createGridMask();const v=this.core.plotChartType(g,y),w=new fe(this.w,this);w.bringForward(),w.avoidOverlaps(),p.config.dataLabels.background.enabled&&w.dataLabelsBackground(),this.core.shiftGraphPosition(),null==(h=null==(c=this.legend)?void 0:c.heatmapGradientLegend)||h.repositionToPlot(),p.globals.dataPoints>50&&p.dom.elWrap.classList.add("apexcharts-disable-transitions");return{elGraph:v,xyRatios:y,dimensions:{plot:{left:p.layout.translateX,top:p.layout.translateY,width:p.layout.gridWidth,height:p.layout.gridHeight}}}}mount(t=null){const e=this,i=e.w;return new Promise((s,a)=>{var r,o,c,h,p,u,g,x,f,m,b,y,v;if(null===e.el)return a(new Error("Not enough data to display or target element not found"));i.globals.allSeriesCollapsed&&e.series.handleNoData(),e.grid=new ve(e.w,e);const w=e.grid.drawGrid(),A=xa._featureRegistry.get("annotations");if(e.annotations=A?new A(e.w,{theme:e.theme,timeScale:e.timeScale}):null,null==(r=e.annotations)||r.drawImageAnnos(),null==(o=e.annotations)||o.drawTextAnnos(),"back"===i.config.grid.position&&(w&&i.dom.elGraphical.add(w.el),(null==(c=null==w?void 0:w.elGridBorders)?void 0:c.node)&&i.dom.elGraphical.add(w.elGridBorders)),Array.isArray(t.elGraph))for(let e=0;e<t.elGraph.length;e++)i.dom.elGraphical.add(t.elGraph[e]);else i.dom.elGraphical.add(t.elGraph);this.series.settleCollapsedShapes(t.elGraph),"front"===i.config.grid.position&&(w&&i.dom.elGraphical.add(w.el),(null==(h=null==w?void 0:w.elGridBorders)?void 0:h.node)&&i.dom.elGraphical.add(w.elGridBorders)),null==(p=e.waterfall)||p.drawConnectors(),null==(u=e.streamgraph)||u.draw(),"front"===i.config.xaxis.crosshairs.position&&e.crosshairs.drawXCrosshairs(),"front"===i.config.yaxis[0].crosshairs.position&&e.crosshairs.drawYCrosshairs(),"treemap"!==i.config.chart.type&&e.axes.drawAxis(i.config.chart.type,w);const S=new ye(this.w,this.ctx,w),C=new Ce(this.w,{theme:this.theme,timeScale:this.timeScale},w);let k;null!==w&&(S.xAxisLabelCorrections(),C.setYAxisTextAlignments(),i.config.yaxis.map((t,e)=>{-1===i.globals.ignoreYAxisIndexes.indexOf(e)&&C.yAxisTitleRotate(e,t.opposite)})),be.pruneRedundantLabelTitles(i.dom.baseEl),null==(g=e.annotations)||g.drawAxesAnnotations(),i.globals.noData||(d.isBrowser()&&i.config.tooltip.enabled&&!i.globals.noData&&(null==(x=e.w.globals.tooltip)||x.drawTooltip(t.xyRatios)),i.config.chart.accessibility.enabled&&i.config.chart.accessibility.keyboard.enabled&&i.config.chart.accessibility.keyboard.navigation.enabled&&(null==(f=e.keyboardNavigation)||f.init()),d.isBrowser()&&i.globals.axisCharts&&(i.axisFlags.isXNumeric||i.config.xaxis.convertedCatToNumeric||i.axisFlags.isRangeBar)?(i.config.chart.zoom.enabled||i.config.chart.selection&&i.config.chart.selection.enabled||i.config.chart.pan&&i.config.chart.pan.enabled)&&(null==(m=e.zoomPanSelection)||m.init({xyRatios:t.xyRatios})):(k=i.config.chart.toolbar.tools,i.config.chart.toolbar.tools=l(n({},k),{zoom:!1,zoomin:!1,zoomout:!1,selection:!1,pan:!1,reset:!1})),i.config.chart.toolbar.show&&!i.globals.allSeriesCollapsed?null==(b=e.toolbar)||b.createToolbar():!i.globals.allSeriesCollapsed&&(null==(y=e.toolbar)?void 0:y.resetControlDue())&&e.toolbar.createToolbar({resetOnly:!0}),k&&(i.config.chart.toolbar.tools=k)),null==(v=e.weave)||v.dispatch("draw",{pass:"full",xyRatios:null==t?void 0:t.xyRatios}),i.globals.memory.methodsToExec.length>0&&i.globals.memory.methodsToExec.forEach(t=>{t.method(t.params,!1,t.context)}),i.globals.axisCharts||i.globals.noData||e.core.resizeNonAxisCharts(),Va(i,e),s(e)})}destroy(){var t,e,i;this.trellis&&this.trellis.teardown(),this._renderPromise=null,this._detachHost(),clearTimeout(null!=(t=this.w.globals.resizeTimer)?t:void 0),clearTimeout(null!=(e=this._parentResizeWaiter)?e:void 0),this._parentResizeWaiter=null,this._keyboardNavigation&&this._keyboardNavigation.destroy(),ja(this),i=this,$a.delete(i),new fa(this.ctx).clear({isUpdating:!1})}updateOptions(t,e=!1,i=!0,s=!0,a=!0){var r;const o=this.w;if(!this.core||!A.isObject(t))return console.warn("ApexCharts: updateOptions() ignored the call: no options object, or a destroyed chart."),Promise.resolve(this);t&&"series"in t&&!Array.isArray(t.series)&&(console.warn("ApexCharts: updateOptions() ignored `series` because it is not an array."),delete(t=n({},t)).series),t=Ka(t,t.series);const l=Za(null==(r=null==(t=nt.dropEmptyOptions(t))?void 0:t.chart)?void 0:r.type,null==t?void 0:t.series);if(l)return l;if(this.trellis&&(this.trellis._mounted||this.trellis._rendering)){const e=this.trellis.canApplyInPlace(t);this.opts=A.extend(this.opts||{},t||{}),this.w.config=A.extend(o.config,t||{});return(this.trellis._rendering?this.trellis.whenSettled():Promise.resolve()).then(()=>e&&this.trellis.canApplyInPlace(t)?this.trellis.applyPanelOptions(i).then(()=>this):(this.trellis.teardown(),this.render()))}if(o.interact.selection=void 0,this.lastUpdateOptions){if(A.shallowEqual(this.lastUpdateOptions,t))return Promise.resolve(this);if(t.series&&this.lastUpdateOptions.series&&!Ja._optionsTooBigToCompare(t)&&A.stringifyForCompare(this.lastUpdateOptions.series)===A.stringifyForCompare(t.series)){const e=n({},t),i=n({},this.lastUpdateOptions);if(delete e.series,delete i.series,A.shallowEqual(e,i))return Promise.resolve(this)}}return t.series&&(this.data.resetParsingFlags(),this.series.resetSeries(!1,!0,!1),t.series.length&&t.series[0].data&&(t.series=t.series.map((t,e)=>this.updateHelpers._extendSeries(t,e))),this.updateHelpers.revertDefaultAxisMinMax()),t.xaxis&&(t=this.updateHelpers.forceXAxisUpdate(t)),t.yaxis&&(t=this.updateHelpers.forceYAxisUpdate(t)),o.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),t.theme&&(t=this.theme.updateThemeOptions(t)),this.updateHelpers._updateOptions(t,e,i,s,a)}updateSeries(t=[],e=!0,i=!0){if(!this.core||!Array.isArray(t))return console.warn("ApexCharts: updateSeries() ignored the call: no series array, or a destroyed chart."),Promise.resolve(this);const s=Za(void 0,t=Ka(t,t));return s||(this.trellis&&this.trellis._rendering?this.trellis.whenSettled().then(()=>this.trellis.updateSeries(t,e)):this.trellis&&this.trellis._mounted?this.trellis.updateSeries(t,e):(this.data.resetParsingFlags(),this.series.prepareDataUpdate(),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(t,e,i)))}appendSeries(t,e=!0,i=!0){return this.updateSeries([...this.w.config.series,t],e,i)}appendData(t,e=!0){var i;const s=this,a=s.w.globals;if(!s.core)return Promise.resolve(s);const r=s.trellis;if(r&&(r._mounted||r._rendering))return s.updateSeries(s.w.config.series.map((e,i)=>t[i]?l(n({},e),{data:e.data.concat(t[i].data)}):e));s.data.resetParsingFlags(),s.w.globals.dataChanged=!0,s.w.globals.shouldAnimate=!0,s.w.config.chart.animations.enabled&&s.series.getPreviousPaths();const o=s.w.globals.histogramRawSeries||s.w.globals.waterfallRawSeries||s.w.globals.dumbbellRawSeries||s.w.globals.streamgraphRawSeries;if(o){for(let e=0;e<o.length;e++){const i=t[e];i&&Array.isArray(i.data)&&Array.isArray(o[e].data)&&(o[e].data=o[e].data.concat(i.data))}return this.update(void 0,e)}const c=s.w.config.series.slice(),h=a.dataReducerRawSeries,d=[...a.collapsedSeries,...a.ancillaryCollapsedSeries];for(let e=0;e<c.length;e++)if(null!==t[e]&&void 0!==t[e]){const s=t[e],a=d.find(t=>t.index===e),r=a&&Array.isArray(a.data)?a:c[e];r.data=r.data.concat(s.data),h&&Array.isArray(null==(i=h[e])?void 0:i.data)&&(h[e].data=h[e].data.concat(s.data))}return Ne(c,s.w),h&&Ne(h,s.w),s.w.config.series=c,this.update(void 0,e)}static _optionsTooBigToCompare(t){const e=t&&t.series;if(!Array.isArray(e))return!1;let i=0;for(let t=0;t<e.length;t++){const s=e[t]&&e[t].data;if(i+=Array.isArray(s)?s.length:1,i>1e3)return!0}return!1}update(t,e=!1){const i=this.trellis;return i&&(i._mounted||i._rendering)?i.whenSettled().then(()=>(i.teardown(),this.render())):new Promise((i,s)=>{var a;if(t&&this.lastUpdateOptions&&!Ja._optionsTooBigToCompare(t)&&A.stringifyForCompare(this.lastUpdateOptions)===A.stringifyForCompare(t))return i(this);this.lastUpdateOptions=t&&!Ja._optionsTooBigToCompare(t)?A.clone(t):null,null==(a=this.morphTypeChange)||a.retire(),new fa(this.ctx).clear({isUpdating:!0});const r=this.create(this.w.config.series,null!=t?t:{},e);if(!r)return i(this);this.mount(r).then(()=>{var t,e,s;null==(t=this.morphTypeChange)||t.applyChromeFade(),ui(this.w,{layout:!(null==(e=this.morphTypeChange)?void 0:e.isActive())}),yi(this.w,{layout:!(null==(s=this.morphTypeChange)?void 0:s.isActive())}),Li(this.w),Di(this.w),"function"==typeof this.w.config.chart.events.updated&&this.w.config.chart.events.updated(this,this.w),this.events.fireEvent("updated",[this,this.w]),this.w.globals.isDirty=!0,i(this)}).catch(t=>{s(t)})})}_fastAxisChromeRefresh(t){const e=this.w,i=e.globals;this._fastAxisBailReason="";try{if(i.isBarHorizontal)return this._fastAxisBailReason="barHorizontal",!1;if(e.config.chart.sparkline.enabled)return!0;const t=e.config.annotations;if(i.memory.methodsToExec.length||t&&(t.yaxis&&t.yaxis.length||t.xaxis&&t.xaxis.length||t.points&&t.points.length||t.texts&&t.texts.length||t.images&&t.images.length))return this._fastAxisBailReason="annotations",!1;if(e.config.chart.ink&&e.config.chart.ink.enabled)return this._fastAxisBailReason="ink",!1;const s=this.dimensions;if(!s||!s.dimYAxis)return this._fastAxisBailReason="noDimensions",!1;const a=e.layout.yLabelsCoords,r=e.layout.yTitleCoords,o=s.dimYAxis.getyAxisLabelsCoords(),n=s.dimYAxis.getyAxisTitleCoords();e.layout.yLabelsCoords=[],e.layout.yTitleCoords=[],e.config.yaxis.map((t,i)=>{e.layout.yLabelsCoords.push({width:o[i].width,index:i}),e.layout.yTitleCoords.push({width:n[i].width,index:i})});const l=s.dimYAxis.getTotalYAxisWidth();if(l>s.yAxisWidth+2)return e.layout.yLabelsCoords=a,e.layout.yTitleCoords=r,this._fastAxisBailReason=`labelWidth ${l} > ${s.yAxisWidth}`,!1;const c=e.dom.elGraphical.node,h=c.querySelector(".apexcharts-grid"),d=c.querySelector(".apexcharts-grid-borders");if(!h)return this._fastAxisBailReason="missingGridNode",!1;const p=h.parentNode,u=d?d.nextSibling:h.nextSibling;h.remove(),d&&d.remove(),c.querySelectorAll(".apexcharts-xaxis-tick").forEach(t=>t.remove()),this.grid=new ve(e,this);const g=this.grid.drawGrid();g&&g.el&&(p.insertBefore(g.el.node,u),g.elGridBorders&&g.elGridBorders.node&&p.insertBefore(g.elGridBorders.node,u));const x=new ye(this.w,this.ctx,g),f=c.querySelector(".apexcharts-xaxis");if(f){const t=f.parentNode,e=f.nextSibling;f.remove();const i=x.drawXaxis();t.insertBefore(i.node,e)}const m=new Ce(this.w,{theme:this.theme,timeScale:this.timeScale},g);for(let t=0;t<e.config.yaxis.length;t++){if(-1!==i.ignoreYAxisIndexes.indexOf(t))continue;const s=e.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${t}']`);if(!s)return this._fastAxisBailReason="missingYAxisNode",!1;const a=s.parentNode;if(!a)return this._fastAxisBailReason="missingYAxisParent",!1;const r=s.nextSibling;s.remove();const o=m.drawYaxis(t);a.insertBefore(o.node,r)}return null!==g&&(x.xAxisLabelCorrections(),m.setYAxisTextAlignments(),e.config.yaxis.map((t,e)=>{-1===i.ignoreYAxisIndexes.indexOf(e)&&m.yAxisTitleRotate(e,t.opposite)})),be.pruneRedundantLabelTitles(e.dom.baseEl),!0}catch(t){return this._fastAxisBailReason="error: "+(t&&t.message),!1}}fastUpdate(t,e){return new Promise((i,s)=>{var a,r,o,n,l,c;try{const h=this.w,p=h.globals;null==(a=this.morphTypeChange)||a.retire(),this.lastUpdateOptions=null;const u=h.dom.elDefs&&h.dom.elDefs.node,g=u&&u.childElementCount;p.shouldAnimate=t,p.dataChanged=!0,p.animationEnded=!1,me.invalidateSelectors(h),this.series.hasAllSeriesEqualX(),p.axisCharts&&(this.core.coreCalculations(),"category"!==h.config.xaxis.type&&this.formatters.setLabelFormatters()),this.formatters.heatmapLabelFormatters();const x=this.core.xySettings();this._zoomPanSelection&&(this._zoomPanSelection.xyRatios=x);const f=JSON.stringify({y:(p.yAxisScale||[]).map(t=>t?t.result:null),xMin:p.minX,xMax:p.maxX}),m=p.axisCharts&&null!=e&&f!==e;if(m&&!this._fastAxisChromeRefresh(x))return this._updateStats.full++,this.update().then(()=>i(this)).catch(s);m?this._updateStats.fastWithAxes++:this._updateStats.fast++,null==(r=this.weave)||r.dispatch("afterScales",{pass:"fast",xyRatios:x});const b=this.ctx.renderer,y=!!(b&&"canvas"===b.kind&&b.canRepaintInPlace&&b.canRepaintInPlace());y&&(b._repaintHostInPlace=!0);const v=h.dom.elGraphical.node;v.querySelectorAll((y?"":".apexcharts-canvas-series-wrap, ")+".apexcharts-plot-series, .apexcharts-series, .apexcharts-datalabels, .apexcharts-datalabels-background").forEach(t=>{var e;return null==(e=t.parentNode)?void 0:e.removeChild(t)}),u&&u.querySelectorAll("[id*=orecastMask]>*").forEach(t=>t.remove());const w=this.core.plotChartType(h.config.series,x),A=v.querySelector(".apexcharts-grid"),S=v.querySelector(".apexcharts-xaxis"),C=Array.isArray(w)?w:[w],k=A&&"front"===h.config.grid.position?A:S;k?C.forEach(t=>{const e=t&&t.node?t.node:t;e&&v.insertBefore(e,k)}):C.forEach(t=>{h.dom.elGraphical.add(t)}),this.series.settleCollapsedShapes(C);const M=new fe(h,this);if(M.bringForward(),M.avoidOverlaps(),h.config.dataLabels.background.enabled&&M.dataLabelsBackground(),null==(o=this.waterfall)||o.drawConnectors(),null==(n=this.streamgraph)||n.draw(),p.streamScrolled?li(h):ui(h),Li(h),Di(h),d.isBrowser()&&h.config.tooltip.enabled&&!p.noData&&(null==(l=h.globals.tooltip)||l.drawTooltip(x)),null==(c=this.weave)||c.dispatch("draw",{pass:"fast",xyRatios:x}),u&&u.childElementCount>g){const t=new Set;this.el.querySelectorAll("[fill^=url],[stroke^=url],[filter^=url]").forEach(e=>{for(const i of e.attributes)t.add(i.value.slice(5,-1))}),u.querySelectorAll("[id^=Svgjs]").forEach(e=>t.has(e.id)||e.remove())}"function"==typeof h.config.chart.events.updated&&h.config.chart.events.updated(this,h),this.events.fireEvent("updated",[this,h]),Va(h,this),p.isDirty=!0,i(this)}catch(t){s(t)}})}getSyncedCharts(){const t=this.getGroupedCharts();return t.splice(0,0,this),t}getPanels(){return this.trellis?this.trellis.getPanels():[]}getPanel(t){return this.trellis?this.trellis.getPanel(t):null}getGroupedCharts(){return Apex._chartInstances.filter(t=>this!==t.chart&&!!this.w.config.chart.group&&this.w.config.chart.group===t.group).map(t=>t.chart)}static getChartByID(t){const e=A.escapeString(t);if(!Apex._chartInstances)return;const i=Apex._chartInstances.filter(t=>t.id===e)[0];return i&&i.chart}static trellis(t,e){if(!xa._featureRegistry.get("trellis"))return ns("ApexCharts.trellis()","trellis"),null;const i=new Ja(t,e);return i.render(),i}static initOnLoad(){y.querySelectorAll("[data-apexcharts]").forEach(t=>{try{new Ja(t,JSON.parse(t.getAttribute("data-options"))).render()}catch(t){console.warn("ApexCharts.initOnLoad():",t)}})}static exec(t,e,...i){const s=this.getChartByID(t);if(!s)return;if(-1===s.publicMethods.indexOf(e))return null;const a=s.w.globals;a.isExecCalled=!0;const r=s[e](...i);return a.isExecCalled=!1,r}static merge(t,e){return A.extend(t,e)}static getThemePalettes(){return{palette1:["#008FFB","#00A86F","#CA8501","#FF4560","#846DD5"],palette2:["#6978CB","#039DE2","#49A84D","#B39105","#D68000"],palette3:["#209FCC","#648291","#D4526E","#0FA783","#A19285"],palette4:["#2FA59D","#73A20B","#099DE1","#FD5D5D","#648291"],palette5:["#2B908F","#F56566","#2EAB16","#FA4443","#1EA2BD"],palette6:["#449DD1","#F86624","#EA3A4A","#9C63D1","#899E2A"],palette7:["#DF475B","#1B998B","#7E75B7","#F46036","#B1911B"],palette8:["#9C63D1","#F86624","#B38F04","#EA3A4A","#2FA2B3"],palette9:["#98776F","#A19285","#A8705E","#BA6560","#A0927F"],palette10:["#C91EFF","#A94BFD","#6C6AFE","#2983FF","#009ED8"],cvdDeuteranopia:["#0072B2","#E69F00","#56B4E9","#009E73","#F0E442","#D55E00","#CC79A7"],cvdProtanopia:["#0077BB","#EE7733","#009988","#EE3377","#BBBBBB","#33BBEE","#CC3311"],cvdTritanopia:["#CC3311","#009988","#EE7733","#0077BB","#EE3377","#BBBBBB","#33BBEE"],highContrast:["#005A9C","#C00000","#007A33","#6C3483","#7B3F00","#0097A7","#4A235A"]}}static use(t){at(t)}static registerFeatures(t){xa.registerFeatures(t)}static setLicense(t){return Ia.setLicense(t),qa(),Ja}static registerPlugin(t){return function(t){t&&"string"==typeof t.name&&"function"==typeof t.setup?Ma()[t.name]=t:console.error("[apexcharts] registerPlugin: a plugin needs a { name, setup } shape.")}(t),Ja}static unregisterPlugin(t){return function(t){delete Ma()[t]}(t),Ja}static registerRenderer(t,e){Ks.registerRenderer(t,e)}static registerSeriesType(t,e){const i=Ja._customSeriesFactory;return i?e&&"function"==typeof e.renderItem?st(t)&&!it(t)||_[t]||N.includes(t)?(console.warn(`[apexcharts] registerSeriesType("${t}") would override the built-in "${t}" chart type; pick another name.`),Ja):(at({[t]:i(t,e)}),function(t){et().add(t)}(t),Ja):(console.warn(`[apexcharts] registerSeriesType("${t}") needs a def with a renderItem() function.`),Ja):(console.warn(`[apexcharts] registerSeriesType("${t}") requires the Marks feature: import 'apexcharts/features/marks'.`),Ja)}static unregisterSeriesType(t){return it(t)&&function(t){delete tt()[t],et().delete(t)}(t),Ja}static registerTheme(t,e){return function(t,e){t&&"string"==typeof t?null==e||"object"==typeof e&&!Array.isArray(e)?Ri()[t]=e||{}:console.warn(`ApexCharts: registerTheme("${t}") expects an object like { mode, palette, tokens, monochrome, accessibility }.`):console.warn("ApexCharts: registerTheme requires a non-empty name.")}(t,e),Ja}static unregisterTheme(t){return function(t){t&&delete Ri()[t]}(t),Ja}static registerEasing(t,e){return Xt(t,e),Ja}static registerUnitLayout(t,e){return function(t,e){t&&"string"==typeof t?"function"==typeof e?ba()[t]=e:console.warn(`ApexCharts: registerUnitLayout("${t}") expects a function (objects, rect) => [{id, x, y}].`):console.warn("ApexCharts: registerUnitLayout requires a non-empty name.")}(t,e),Ja}static unregisterUnitLayout(t){return function(t){delete ba()[t]}(t),Ja}static registerUnitMark(t,e){return wa(t,e),Ja}static unregisterUnitMark(t){return function(t){delete va()[t]}(t),Ja}static registerRowSource(t,e){return function(t,e){t&&"string"==typeof t?"function"==typeof e?Sa()[t]=e:console.warn(`ApexCharts: registerRowSource("${t}") expects a function (w, opts) => series.`):console.warn("ApexCharts: registerRowSource requires a non-empty name.")}(t,e),Ja}static unregisterRowSource(t){return function(t){delete Sa()[t]}(t),Ja}rowSeries(t){const e=function(t){const e=t&&t.config&&t.config.chart;return e?Ca(e.requestedType)||Ca(e.type):null}(this.w);return e&&e(this.w,t)||null}static crossfilter(t){if(!t||"string"!=typeof t.id)throw new Error("ApexCharts.crossfilter requires an { id } string.");const e=xa._featureRegistry.get("crossfilter");if(!e)return ns("ApexCharts.crossfilter()","link"),null;const i=e.getOrCreate(t);return qa(),i}static getCrossfilter(t){const e=xa._featureRegistry.get("crossfilter");return e?e.get(t):null}clearCrossfilter(){var t;null==(t=this.linkedViews)||t.clearGroup()}startMeasure(){var t;null==(t=this.measure)||t.startMeasure()}stopMeasure(){var t;null==(t=this.measure)||t.stopMeasure()}clearMeasures(){var t;null==(t=this.measure)||t.clearMeasures()}toggleSeries(t){return this.series.toggleSeries(t)}highlightSeriesOnLegendHover(t,e){return this.series.toggleSeriesOnHover(t,e)}showSeries(t){this.series.showSeries(t)}hideSeries(t){this.series.hideSeries(t)}highlightSeries(t){this.series.highlightSeries(t)}isSeriesHidden(t){return this.series.isSeriesHidden(t)}resetSeries(t=!0,e=!0){this.series&&this.series.resetSeries(t,e)}addEventListener(t,e){this.events.addEventListener(t,e)}removeEventListener(t,e){this.events.removeEventListener(t,e)}addXaxisAnnotation(t,e=!0,i=void 0){var s;let a=this;i&&(a=i),null==(s=a.annotations)||s.addXaxisAnnotationExternal(t,e,a)}addYaxisAnnotation(t,e=!0,i=void 0){var s;let a=this;i&&(a=i),null==(s=a.annotations)||s.addYaxisAnnotationExternal(t,e,a)}addPointAnnotation(t,e=!0,i=void 0){var s;let a=this;i&&(a=i),null==(s=a.annotations)||s.addPointAnnotationExternal(t,e,a)}clearAnnotations(t=void 0){var e;let i=this;t&&(i=t),i.lastUpdateOptions=null,null==(e=i.annotations)||e.clearAnnotations(i)}removeAnnotation(t,e=void 0){var i;let s=this;e&&(s=e),s.lastUpdateOptions=null,null==(i=s.annotations)||i.removeAnnotation(s,t)}getChartArea(){return this.w.dom.baseEl.querySelector(".apexcharts-inner")}getSeriesTotalXRange(t,e){return this.coreUtils.getSeriesTotalsXRange(t,e)}getHighestValueInSeries(t=0){return new Ae(this.w).getMinYMaxY(t).highestY}getLowestValueInSeries(t=0){return new Ae(this.w).getMinYMaxY(t).lowestY}getSeriesTotal(){return this.w.globals.seriesTotals}getState(){const t=this.w,e=t.globals;return{config:t.config,series:t.seriesData.series,seriesNames:t.seriesData.seriesNames,colors:e.colors,labels:t.labelData.labels,seriesTotals:e.seriesTotals,seriesPercent:e.seriesPercent,seriesXvalues:e.seriesXvalues,seriesYvalues:e.seriesYvalues,minX:e.minX,maxX:e.maxX,minY:e.minY,maxY:e.maxY,minYArr:e.minYArr,maxYArr:e.maxYArr,minXDiff:e.minXDiff,dataPoints:e.dataPoints,xAxisScale:e.xAxisScale,yAxisScale:e.yAxisScale,xTickAmount:e.xTickAmount,isXNumeric:t.axisFlags.isXNumeric,seriesYAxisMap:e.seriesYAxisMap,seriesYAxisReverseMap:e.seriesYAxisReverseMap,svgWidth:e.svgWidth,svgHeight:e.svgHeight,gridWidth:t.layout.gridWidth,gridHeight:t.layout.gridHeight,selectedDataPoints:t.interact.selectedDataPoints,collapsedSeriesIndices:e.collapsedSeriesIndices,zoomed:t.interact.zoomed,seriesX:t.seriesData.seriesX,seriesZ:t.seriesData.seriesZ,seriesCandleO:t.candleData.seriesCandleO,seriesCandleH:t.candleData.seriesCandleH,seriesCandleM:t.candleData.seriesCandleM,seriesCandleL:t.candleData.seriesCandleL,seriesCandleC:t.candleData.seriesCandleC,seriesRangeStart:t.rangeData.seriesRangeStart,seriesRangeEnd:t.rangeData.seriesRangeEnd,seriesGoals:t.seriesData.seriesGoals}}toggleDataPointSelection(t,e){return this.updateHelpers.toggleDataPointSelection(t,e)}zoomX(t,e){var i;null==(i=this.ctx.toolbar)||i.zoomUpdateOptions(t,e)}setLocale(t){this.localization.setCurrentLocaleValues(t)}dataURI(t){if(!this.ctx.exports)throw new Error("apexcharts: Exports feature is not registered. Import apexcharts/features/exports.");return this.trellis&&this.trellis._mounted?this.trellis.exports.dataURI(t):this.ctx.exports.dataURI(t)}getSvgString(t){if(!this.ctx.exports)throw new Error("apexcharts: Exports feature is not registered. Import apexcharts/features/exports.");return this.trellis&&this.trellis._mounted?this.trellis.exports.svgString(t):this.ctx.exports.getSvgString(t)}exportToCSV(t={}){if(!this.ctx.exports)throw new Error("apexcharts: Exports feature is not registered. Import apexcharts/features/exports.");return this.trellis&&this.trellis._mounted?this.trellis.exports.download("csv",t):this.ctx.exports.exportToCSV(t)}promotePanel(t){return this.trellis&&this.trellis._mounted?this.trellis.promote(t):Promise.resolve()}restorePanels(){return this.trellis&&this.trellis._mounted?this.trellis.restorePromotion():Promise.resolve()}paper(){return this.w.dom.Paper}getActiveRenderer(){return this.rendererController?this.rendererController.getActiveKind():"svg"}refreshTokens(){return this.lastUpdateOptions=null,this.update()}drillDown(t){if(!this.ctx.drilldown)throw new Error("apexcharts: Drilldown feature is not registered. Import apexcharts/features/drilldown.");return this.ctx.drilldown.drillDown(t)}drillUp(){if(!this.ctx.drilldown)throw new Error("apexcharts: Drilldown feature is not registered. Import apexcharts/features/drilldown.");return this.ctx.drilldown.drillUp()}drillToRoot(){if(!this.ctx.drilldown)throw new Error("apexcharts: Drilldown feature is not registered. Import apexcharts/features/drilldown.");return this.ctx.drilldown.drillToRoot()}clearDrilldownCache(t){if(!this.ctx.drilldown)throw new Error("apexcharts: Drilldown feature is not registered. Import apexcharts/features/drilldown.");return this.ctx.drilldown.clearCache(t)}_writeLayoutCoords(t){for(const e of Object.keys(t)){const i=Object.getOwnPropertyDescriptor(t,e);i&&"value"in i&&(this.w.layout[e]=i.value)}}_parentResizeCallback(){this.w.config.chart.redrawOnParentResize&&(this.w.globals.animationEnded?this._windowResize():this._deferParentResize())}_deferParentResize(){var t;if(this._parentResizeWaiter)return;const e=Date.now(),i=(null==(t=this.w.config.chart.animations)?void 0:t.speed)||800,s=Math.min(Math.max(1e3+2*i,1500),15e3),a=()=>{this._parentResizeWaiter=null,!this.w.globals.isDestroyed&&A.elementExists(this.el)&&(this.w.globals.animationEnded||Date.now()-e>=s?this._windowResize():this._parentResizeWaiter=window.setTimeout(a,100))};this._parentResizeWaiter=window.setTimeout(a,100)}_printEnabled(){const t=this.w.config.chart.print;return!1!==t&&!1!==(null==t?void 0:t.enabled)}_beforePrint(){var t,e,i,s,a,r;if(this._printRestore||!this._printEnabled())return;const o=this.w,n=null!=(e=null==(t=o.config.chart.print)?void 0:t.width)?e:700;this._printRestore={width:this.responsive.withoutBreakpoints(o.config).chart.width},"number"==typeof n&&n>0&&o.globals.svgWidth>n&&this.updateHelpers._updateOptions({chart:{width:n}},!1,!1,!1,!1);const l=null==(s=null==(i=o.dom)?void 0:i.Paper)?void 0:s.node;if(l&&!l.getAttribute("viewBox")){l.setAttribute("viewBox",`0 0 ${o.globals.svgWidth} ${o.globals.svgHeight}`),this._printRestore.viewBoxAdded=!0,null==(r=null==(a=o.dom)?void 0:a.elWrap)||r.classList.add("apexcharts-printing");const t=this.el;t&&t.style&&(this._printRestore.minHeight=t.style.minHeight,t.style.minHeight="0")}}_afterPrint(){var t,e,i,s,a,r,o;if(!this._printRestore)return;const n=this.w,l=this._printRestore;if(this._printRestore=null,l.viewBoxAdded){null==(i=null==(e=null==(t=n.dom)?void 0:t.Paper)?void 0:e.node)||i.removeAttribute("viewBox"),null==(a=null==(s=n.dom)?void 0:s.elWrap)||a.classList.remove("apexcharts-printing");const o=this.el;o&&o.style&&(o.style.minHeight=null!=(r=l.minHeight)?r:"")}n.config.chart.width!==l.width&&(this.updateHelpers._updateOptions({chart:{width:l.width}},!1,!1,!1,!1),clearTimeout(null!=(o=n.globals.resizeTimer)?o:void 0))}_windowResize(){var t;clearTimeout(null!=(t=this.w.globals.resizeTimer)?t:void 0),this.w.globals.resizeTimer=window.setTimeout(()=>{const t=this.w.globals;if(this.core&&t.lastResizeSignature){const e=this.core.getResizeSignature();if(e.w===t.lastResizeSignature.w&&e.h===t.lastResizeSignature.h&&e.iw===t.lastResizeSignature.iw)return}t.resized=!0,t.dataChanged=!1,this.ctx.update()},150)}_windowResizeHandler(){var t;clearTimeout(null!=(t=this.w.globals.resizeTimer)?t:void 0);let{redrawOnWindowResize:e}=this.w.config.chart;"function"==typeof e&&(e=e()),e&&this._windowResize()}}const Qa=Object.freeze(Object.defineProperty({__proto__:null,__apex_Animations:Jt,__apex_Animations_applyAnimationPolicy:Vt,__apex_Animations_applyProgressiveReveal:jt,__apex_Animations_computeStagger:qt,__apex_Animations_prefersReducedMotion:Ut,__apex_Base:ut,__apex_BrowserAPIs_BrowserAPIs:y,__apex_ChartFactory_getChartClass:rt,__apex_ChartFactory_isCustom:it,__apex_ChartFactory_register:at,__apex_Config:nt,__apex_Constants_LINE_HEIGHT_RATIO:lt,__apex_Constants_NICE_SCALE_ALLOWED_MAG_MSD:ht,__apex_Constants_NICE_SCALE_DEFAULT_TICKS:dt,__apex_Core:as,__apex_CoreUtils:gt,__apex_Crosshairs:_e,__apex_DOMShim_SSRClassList:g,__apex_DOMShim_SSRDOMShim:x,__apex_DOMShim_SSRElement:u,__apex_Data:vs,__apex_DataLabels:fe,__apex_DateTime:S,__apex_Defaults:Z,__apex_Easing_DEFAULT_EASING_NAME:"easeInOutSine",__apex_Easing_cubicBezier:It,__apex_Easing_easeInOutSine:zt,__apex_Easing_registerEasing:Xt,__apex_Easing_resolveEasing:Ht,__apex_Environment_Environment:d,__apex_Events:ke,__apex_Fill:re,__apex_Filters:ee,__apex_Formatters:C,__apex_Globals:pt,__apex_Graphics:ae,__apex_Markers:ce,__apex_Options:T,__apex_PathMorphing_arrayToPath:wt,__apex_PathMorphing_morphPaths:Tt,__apex_PathMorphing_parsePath:yt,__apex_PathMorphing_pathBbox:vt,__apex_PerformanceCache:me,__apex_Range:Ae,__apex_Resize_addResizeListener:Da,__apex_Resize_removeResizeListener:_a,__apex_Responsive:Be,__apex_SVGAnimation_SVGAnimationRunner:Nt,__apex_SVGAnimation_installAnimationMethods:Rt,__apex_SVGContainer:aa,__apex_SVGDraggable_installDraggable:da,__apex_SVGElement:Js,__apex_SVGFilter_FilterBuilder:ca,__apex_SVGFilter_SVGFilter:la,__apex_SVGFilter_installFilterMethods:ha,__apex_SVGGradient_SVGGradient:ta,__apex_SVGPattern_SVGPattern:sa,__apex_SVGSelectable_installSelectable:pa,__apex_Scales:we,__apex_Series:Pi,__apex_Theme:Xi,__apex_ThemePalettes_getThemePalettes:Se,__apex_TimeScale:ss,__apex_TitleSubtitle:Hi,__apex_Utils:A,__apex_axes_Axes:Te,__apex_axes_AxesUtils:be,__apex_axes_Grid:ve,__apex_axes_XAxis:ye,__apex_axes_YAxis:Ce,__apex_charts_Scatter:he,__apex_dimensions_Dimensions:ji,__apex_dimensions_Grid:Gi,__apex_dimensions_Helpers:Yi,__apex_dimensions_XAxis:Wi,__apex_dimensions_YAxis:$i,__apex_helpers_Destroy:fa,__apex_helpers_InitCtxVariables:xa,__apex_helpers_Localization:Me,__apex_helpers_UpdateHelpers:Cs,__apex_index_Box:bt,__apex_index_SVG:ua,__apex_math_Box:bt,__apex_math_Matrix:mt,__apex_math_Point:ft,__apex_math_SVGNS:xt,__apex_tooltip_AxesTooltip:Us,__apex_tooltip_Intersect:Gs,__apex_tooltip_Labels:$s,__apex_tooltip_Marker:Ws,__apex_tooltip_Position:Hs,__apex_tooltip_Tooltip:js,__apex_tooltip_Utils:ks,default:Ja},Symbol.toStringTag,{value:"Module"}));return Object.defineProperty(Ja,"__internals",{value:Qa,enumerable:!1,writable:!1,configurable:!1}),function(t){Object.prototype.hasOwnProperty.call(t,"__drainsAddons")||Object.defineProperty(t,"__drainsAddons",{value:!0});const e=globalThis,i=()=>{var t;const i=e.__apexcharts_pending_addons__;if(!Array.isArray(i)||!i.length)return;if(!e.ApexCharts||!e.ApexCharts.__internals)return;const s=i.splice(0);for(const t of s)t.done=!0;for(const i of s)try{i.run.call(e)}catch(s){e.console.error(`ApexCharts: ${i.file}, loaded before the ApexCharts script, failed to register: ${null!=(t=null==s?void 0:s.message)?t:s}`)}};"function"==typeof queueMicrotask?queueMicrotask(i):Promise.resolve().then(i)}(Ja),Ja});
|
|
5
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).ApexCharts=e()}(this,function(){"use strict";var t=Object.defineProperty,e=Object.defineProperties,i=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,o=Math.pow,n=(e,i,s)=>i in e?t(e,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[i]=s,l=(t,e)=>{for(var i in e||(e={}))a.call(e,i)&&n(t,i,e[i]);if(s)for(var i of s(e))r.call(e,i)&&n(t,i,e[i]);return t},c=(t,s)=>e(t,i(s)),h=(t,e)=>{var i={};for(var o in t)a.call(t,o)&&e.indexOf(o)<0&&(i[o]=t[o]);if(null!=t&&s)for(var o of s(t))e.indexOf(o)<0&&r.call(t,o)&&(i[o]=t[o]);return i},d=(t,e,i)=>n(t,"symbol"!=typeof e?e+"":e,i);class p{static isSSR(){return"undefined"==typeof window||"undefined"==typeof document}static isBrowser(){return!this.isSSR()}static hasAPI(t){return!this.isSSR()&&void 0!==window[t]}static getApex(){return"undefined"!=typeof window&&window.Apex?window.Apex:"undefined"!=typeof global&&global.Apex?global.Apex:{}}}const u=t=>String(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");class g{constructor(t,e=null){this.nodeName=t,this.namespaceURI=e,this.attributes=new Map,this.children=[],this._text="",this._rawHTML=!1,this.style={},this.classList=new x,this.parentNode=null,this._ssrWidth=void 0,this._ssrHeight=void 0,this._ssrMode=void 0}setAttribute(t,e){this.attributes.set(t,e)}setAttributeNS(t,e,i){this.setAttribute(e,i)}getAttribute(t){return this.attributes.get(t)}removeAttribute(t){this.attributes.delete(t)}hasAttribute(t){return this.attributes.has(t)}appendChild(t){if(t&&t!==this){if(t.parentNode&&t.parentNode!==this)t.parentNode.removeChild(t);else if(t.parentNode===this){const e=this.children.indexOf(t);-1!==e&&this.children.splice(e,1)}t.parentNode=this,this.children.push(t)}return t}removeChild(t){const e=this.children.indexOf(t);return-1!==e&&(this.children.splice(e,1),t.parentNode=null),t}insertBefore(t,e){if(!e)return this.appendChild(t);if(t.parentNode&&t.parentNode!==this)t.parentNode.removeChild(t);else if(t.parentNode===this){const e=this.children.indexOf(t);-1!==e&&this.children.splice(e,1)}const i=this.children.indexOf(e);return-1!==i&&(t.parentNode=this,this.children.splice(i,0,t)),t}cloneNode(t=!1){const e=new this.constructor(this.nodeName,this.namespaceURI);return e._text=this._text,e._rawHTML=this._rawHTML,this.attributes.forEach((t,i)=>{e.attributes.set(i,t)}),Object.assign(e.style,this.style),t&&this.children.forEach(t=>{t.cloneNode&&e.appendChild(t.cloneNode(!0))}),e}getBoundingClientRect(){return{width:this._ssrWidth||0,height:this._ssrHeight||0,top:0,left:0,right:this._ssrWidth||0,bottom:this._ssrHeight||0,x:0,y:0}}getBBox(){if("text"!==this.nodeName&&"tspan"!==this.nodeName)return{x:0,y:0,width:0,height:0};const t=this._textLines(),e=t.reduce((t,e)=>Math.max(t,e.length),0);if(!e)return{x:0,y:0,width:0,height:0};const i=parseFloat(this.attributes.get("font-size"))||11,s=e*i*.55,a=1.167*i+(t.length-1)*i*1.1,r=this.attributes.get("text-anchor"),o=parseFloat(this.attributes.get("x"))||0;return{x:"middle"===r?o-s/2:"end"===r?o-s:o,y:(parseFloat(this.attributes.get("y"))||0)-.917*i,width:s,height:a}}_textLines(){var t;const e=this.children.filter(t=>"tspan"===t.nodeName);return e.length?e.map(t=>{var e;return String(null!=(e=t.textContent)?e:"")}):[String(null!=(t=this.textContent)?t:"")]}getRootNode(){let t=this;for(;t.parentNode;)t=t.parentNode;return t}querySelector(){return null}querySelectorAll(){return[]}getElementsByClassName(){return[]}addEventListener(){}removeEventListener(){}get childNodes(){return this.children}toString(){let t="";if(this.attributes.forEach((e,i)=>{t+=` ${i}="${(t=>u(t).replace(/"/g,"""))(e)}"`}),0===this.children.length&&!this._text)return`<${this.nodeName}${t}/>`;const e=this._rawHTML?this._text:u(this._text),i=this.children.map(t=>t.toString()).join("");return`<${this.nodeName}${t}>${e}${i}</${this.nodeName}>`}get textContent(){return this._text}set textContent(t){this._text=t,this._rawHTML=!1}get innerHTML(){return this.children.map(t=>t.toString()).join("")}set innerHTML(t){this.children=[],this._text=t,this._rawHTML=!0}get outerHTML(){return this.toString()}get isConnected(){return!0}}class x{constructor(){this.classes=new Set}add(...t){t.forEach(t=>this.classes.add(t))}remove(...t){t.forEach(t=>this.classes.delete(t))}contains(t){return this.classes.has(t)}toggle(t,e){return!0===e?(this.classes.add(t),!0):!1===e||this.classes.has(t)?(this.classes.delete(t),!1):(this.classes.add(t),!0)}toString(){return Array.from(this.classes).join(" ")}}class f{createElementNS(t,e){return new g(e,t)}createTextNode(t){const e={nodeName:"#text",nodeType:3,textContent:t,toString:()=>u(e.textContent)};return e}getBoundingClientRect(t){return t&&t.getBoundingClientRect?t.getBoundingClientRect():{width:0,height:0,top:0,left:0,right:0,bottom:0,x:0,y:0}}createXMLSerializer(){return{serializeToString:t=>t.toString?t.toString():""}}createDOMParser(){return{parseFromString(t,e){const i=new g("root");return i.innerHTML=t,{documentElement:i}}}}}let m=null,b=null,y=null;class v{static init(t){!p.isSSR()||!t&&m||(m=t||new f)}static createElement(t){return p.isSSR()?(m||this.init(),m.createElementNS(null,t)):document.createElement(t)}static createElementNS(t,e){return p.isSSR()?(m||this.init(),m.createElementNS(t,e)):document.createElementNS(t,e)}static createTextNode(t){return p.isSSR()?(m||this.init(),m.createTextNode(t)):document.createTextNode(t)}static querySelector(t){return p.isSSR()?null:document.querySelector(t)}static querySelectorAll(t){return p.isSSR()?[]:document.querySelectorAll(t)}static getComputedStyle(t){return p.isSSR()?{}:window.getComputedStyle(t)}static matchMedia(t){if(p.isSSR()||"function"!=typeof window.matchMedia)return null;try{return window.matchMedia(t)}catch(t){return null}}static getBoundingClientRect(t){return p.isSSR()?(m||this.init(),m.getBoundingClientRect(t)):t?t.getBoundingClientRect():{width:0,height:0,top:0,left:0,right:0,bottom:0,x:0,y:0}}static getXMLSerializer(){return p.isSSR()?(m||this.init(),b||(b=m.createXMLSerializer()),b):(b||(b=new XMLSerializer),b)}static getDOMParser(){return p.isSSR()?(m||this.init(),y||(y=m.createDOMParser()),y):(y||(y=new DOMParser),y)}static addWindowEventListener(t,e,i){p.isBrowser()&&window.addEventListener(t,e,i)}static removeWindowEventListener(t,e,i){p.isBrowser()&&window.removeEventListener(t,e,i)}static requestAnimationFrame(t){return p.isBrowser()?window.requestAnimationFrame(t):(t(0),null)}static cancelAnimationFrame(t){p.isBrowser()&&t&&window.cancelAnimationFrame(t)}static elementExists(t){return!!t&&(p.isSSR()?!0===t._ssrMode||void 0!==t.nodeName:!!t.getRootNode&&(t.getRootNode({composed:!0})===document||t.isConnected))}static getWindow(){return p.isBrowser()?window:null}static getDocument(){return p.isBrowser()?document:null}static _getShim(){return m}static _resetShim(){m=null,b=null,y=null}}const w=new WeakMap;let A=0,S=class t{static isObject(t){return t&&"object"==typeof t&&!Array.isArray(t)}static is(t,e){return Object.prototype.toString.call(e)==="[object "+t+"]"}static isSafari(){return p.isBrowser()&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}static extend(t,e){if(!this.isObject(t)&&this.isObject(e))return this.clone(e);const i=Object.assign({},t);return this.isObject(t)&&this.isObject(e)&&Object.keys(e).forEach(s=>{this.isObject(e[s])?s in t?i[s]=this.extend(t[s],e[s]):Object.assign(i,{[s]:e[s]}):Object.assign(i,{[s]:e[s]})}),i}static copySeriesShallow(t){return Array.isArray(t)?t.map(t=>this.isObject(t)?l({},t):t):t}static extendArray(e,i){const s=[];return e.map(e=>{s.push(t.extend(i,e))}),e=s}static clone(t,e=new WeakMap){if(null===t||"object"!=typeof t)return t;if(e.has(t))return e.get(t);let i;if(Array.isArray(t)){i=[],e.set(t,i);for(let s=0;s<t.length;s++)i[s]=this.clone(t[s],e)}else if(t instanceof Date)i=new Date(t.getTime());else{i={},e.set(t,i);for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(i[s]=this.clone(t[s],e))}return i}static stringifyForCompare(t){return JSON.stringify(t,(t,e)=>{if("function"!=typeof e)return e;let i=w.get(e);return void 0===i&&(i=++A,w.set(e,i)),`__apx_fn_${i}`})}static shallowEqual(t,e){if(t===e)return!0;if(!t||!e)return!1;if("object"!=typeof t||"object"!=typeof e)return t===e;const i=Object.keys(t),s=Object.keys(e);if(i.length!==s.length)return!1;for(const s of i)if(t[s]!==e[s])return!1;return!0}static parseNumber(t){return"number"==typeof t||null===t?t:parseFloat(t)}static stripNumber(t,e=2){return Number.isInteger(t)?t:parseFloat(t.toPrecision(e))}static randomId(){return(Math.random()+1).toString(36).substring(4)}static noExponents(t){return t.toString().includes("e")?Math.round(t):t}static decimalPlaces(t){const[e,i]=String(t).split("e"),s=e.indexOf(".");return Math.max(0,(s<0?0:e.length-s-1)-(+i||0))}static elementExists(t){return!(!t||!t.isConnected)}static getDimensions(t){if(!t)return[0,0];if(p.isSSR())return[t._ssrWidth||400,t._ssrHeight||300];let e;try{e=getComputedStyle(t,null)}catch(e){return[t.clientWidth||0,t.clientHeight||0]}let i=t.clientWidth,s=t.clientHeight;if(!i||!s){const e=t.getBoundingClientRect();i=i||e.width,s=s||e.height}return s-=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),i-=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight),[i,s]}static getBoundingClientRect(t){if(!t)return{top:0,right:0,bottom:0,left:0,width:0,height:0,x:0,y:0};if(p.isSSR())return v.getBoundingClientRect(t);const e=t.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:t.clientWidth,height:t.clientHeight,x:e.left,y:e.top}}static getLargestStringFromArr(t){const e=(t,i)=>(Array.isArray(i)&&(i=i.reduce(e,"")),String(t).length>String(i).length?t:i);return t.length?t.reduce(e,""):0}static hexToRgba(e="#999999",i=.6){const s=t.parseColor("#"===e[0]?e:"#999999");return s?"rgba("+s[0]+","+s[1]+","+s[2]+","+i*s[3]+")":e}static parseColor(t){const e=/^#([\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$/i.exec(t);if(e){let t=e[1];return t.length<5&&(t=t.replace(/./g,"$&$&")),[0,2,4,6].map(e=>e<t.length?parseInt(t.substr(e,2),16)/(e>4?255:1):1)}const i=/^rgba?\(/i.test(t)&&t.match(/[\d.]+/g);return i?[+i[0],+i[1],+i[2],i[3]?+i[3]:1]:null}static getOpacityFromRGBA(t){return parseFloat(t.replace(/^.*,(.+)\)/,"$1"))}static parseHex(t){if("string"!=typeof t)return null;let e=t.trim().replace("#","");return 3===e.length&&(e=e.split("").map(t=>t+t).join("")),/^[0-9a-fA-F]{6}$/.test(e)?[parseInt(e.slice(0,2),16),parseInt(e.slice(2,4),16),parseInt(e.slice(4,6),16)]:null}static relativeLuminance([t,e,i]){const s=t=>{const e=t/255;return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)};return.2126*s(t)+.7152*s(e)+.0722*s(i)}static getContrastRatio(e,i){const s=t.parseHex(e),a=t.parseHex(i);if(!s||!a)return 0;const r=t.relativeLuminance(s),o=t.relativeLuminance(a);return(Math.max(r,o)+.05)/(Math.min(r,o)+.05)}static rgb2hex(t){return(t=t.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===t.length?"#"+("0"+parseInt(t[1],10).toString(16)).slice(-2)+("0"+parseInt(t[2],10).toString(16)).slice(-2)+("0"+parseInt(t[3],10).toString(16)).slice(-2):""}shadeColor(e,i){const s=t.parseColor(i)||t.parseColor(t.resolveColor(i));if(!s)return i;const a=e<0?0:255;e=Math.abs(e);for(let t=0;t<3;t++)s[t]+=Math.round((a-s[t])*e);const r=s.pop();return"#"===i[0]?"#"+s.concat(r<1?Math.round(255*r):[]).map(t=>(256|t).toString(16).slice(1)).join(""):(r<1?"rgba(":"rgb(")+s.concat(r<1?r:[]).join(",")+")"}static resolveColor(t,e){if(p.isSSR())return t;const i=document.createElement("div");if(i.style.cssText="position:fixed;left:-9999px;visibility:hidden",i.style.color=t,!i.style.color)return t;(e||document.body).appendChild(i);try{return window.getComputedStyle(i).color}finally{i.remove()}}static isColorHex(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)|(^#[0-9A-F]{8}$)/i.test(t)}static isCSSVariable(t){if("string"!=typeof t)return!1;const e=t.trim();return e.startsWith("var(")&&e.endsWith(")")}static getThemeColor(e,i){return t.isCSSVariable(e)?t.resolveColor(e,i):e}static applyOpacityToColor(t,e){const i=Number(e);if(!Number.isFinite(i))return t;if(i<=0)return"transparent";if(i>=1)return t;return`color-mix(in srgb, ${t} ${Math.round(100*i)}%, transparent)`}static getPolygonPos(t,e){const i=[],s=2*Math.PI/e;for(let a=0;a<e;a++){const e={};e.x=t*Math.sin(a*s),e.y=-t*Math.cos(a*s),i.push(e)}return i}static polarToCartesian(t,e,i,s){const a=(s-90)*Math.PI/180;return{x:t+i*Math.cos(a),y:e+i*Math.sin(a)}}static escapeString(t,e="x"){let i=t.toString().slice();return i=i.replace(/[` ~!@#$%^&*()|+=?;:'",.<>{}[\]\\/]/gi,e),i}static negToZero(t){return t<0?0:t}static moveIndexInArray(t,e,i){if(i>=t.length){let e=i-t.length+1;for(;e--;)t.push(void 0)}return t.splice(i,0,t.splice(e,1)[0]),t}static findAncestor(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}static setELstyles(t,e){for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t.style[i]=e[i])}static preciseAddition(t,e){const i=(String(t).split(".")[1]||"").length,s=(String(e).split(".")[1]||"").length,a=Math.pow(10,Math.max(i,s));return(Math.round(t*a)+Math.round(e*a))/a}static isNumber(t){return!isNaN(t)&&parseFloat(String(Number(t)))===t&&!isNaN(parseInt(t,10))}static isFloat(t){return Number(t)===t&&t%1!=0}static editDistance(t,e,i){if(Math.abs(t.length-e.length)>i)return i+1;let s=Array.from({length:e.length+1},(t,e)=>e);for(let a=1;a<=t.length;a++){const r=[a];let o=a;for(let i=1;i<=e.length;i++)r[i]=Math.min(s[i]+1,r[i-1]+1,s[i-1]+(t[a-1]===e[i-1]?0:1)),r[i]<o&&(o=r[i]);if(o>i)return i+1;s=r}return s[e.length]}static nearestName(e,i){const s=String(e).trim().toLowerCase(),a=s.length>4?2:1;let r="",o=a+1;return i.forEach(e=>{const i=t.editDistance(s,e.toLowerCase(),a);i<o&&(o=i,r=e)}),o<=a?r:""}static getGCD(t,e,i=7){let s=Math.pow(10,i-Math.floor(Math.log10(Math.max(t,e))));for(s>1?(t=Math.round(Math.abs(t)*s),e=Math.round(Math.abs(e)*s)):s=1;e;){const i=e;e=t%e,t=i}return t/s}static getPrimeFactors(t){const e=[];if(t=Math.round(Math.abs(t)),!Number.isFinite(t))return e;for(let i=2;i*i<=t;i++)for(;t%i===0;)e.push(i),t/=i;return t>=2&&e.push(t),e}static mod(t,e,i=7){const s=Math.pow(10,i-Math.floor(Math.log10(Math.max(t,e))));return(t=Math.round(Math.abs(t)*s))%(e=Math.round(Math.abs(e)*s))/s}};class C{constructor(t){this.w=t}isValidDate(t){return"number"!=typeof t&&!isNaN(this.parseDate(t))}getTimeStamp(t){if(isNaN(Date.parse(t)))return t;return this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(t).toISOString().substr(0,25)).getTime():new Date(t).getTime()}getDate(t){return new Date(t)}parseDate(t){const e=Date.parse(t);if(!isNaN(e))return this.getTimeStamp(t);if("string"!=typeof t)return NaN;let i=Date.parse(t.replace(/-/g,"/").replace(/[a-z]+/gi," "));return i=this.getTimeStamp(i),i}formatDate(t,e){const i=this.w.globals.locale,s=this.w.config.xaxis.labels.datetimeUTC,a=["\0",...i.months],r=["\x01",...i.shortMonths],o=["\x02",...i.days],n=["\x03",...i.shortDays];function l(t,e=2){let i=t+"";for(;i.length<e;)i="0"+i;return i}const c=s?t.getUTCFullYear():t.getFullYear();e=(e=(e=e.replace(/(^|[^\\])yyyy+/g,"$1"+c)).replace(/(^|[^\\])yy/g,"$1"+c.toString().substr(2,2))).replace(/(^|[^\\])y/g,"$1"+c);const h=(s?t.getUTCMonth():t.getMonth())+1;e=(e=(e=(e=e.replace(/(^|[^\\])MMMM+/g,"$1"+a[0])).replace(/(^|[^\\])MMM/g,"$1"+r[0])).replace(/(^|[^\\])MM/g,"$1"+l(h))).replace(/(^|[^\\])M/g,"$1"+h);const d=s?t.getUTCDate():t.getDate();e=(e=(e=(e=e.replace(/(^|[^\\])dddd+/g,"$1"+o[0])).replace(/(^|[^\\])ddd/g,"$1"+n[0])).replace(/(^|[^\\])dd/g,"$1"+l(d))).replace(/(^|[^\\])d/g,"$1"+d);const p=s?t.getUTCHours():t.getHours(),u=p>12?p-12:0===p?12:p;e=(e=(e=(e=e.replace(/(^|[^\\])HH+/g,"$1"+l(p))).replace(/(^|[^\\])H/g,"$1"+p)).replace(/(^|[^\\])hh+/g,"$1"+l(u))).replace(/(^|[^\\])h/g,"$1"+u);const g=s?t.getUTCMinutes():t.getMinutes();e=(e=e.replace(/(^|[^\\])mm+/g,"$1"+l(g))).replace(/(^|[^\\])m/g,"$1"+g);const x=s?t.getUTCSeconds():t.getSeconds();e=(e=e.replace(/(^|[^\\])ss+/g,"$1"+l(x))).replace(/(^|[^\\])s/g,"$1"+x);let f=s?t.getUTCMilliseconds():t.getMilliseconds();e=e.replace(/(^|[^\\])fff+/g,"$1"+l(f,3)),f=Math.round(f/10),e=e.replace(/(^|[^\\])ff/g,"$1"+l(f)),f=Math.round(f/10);const m=p<12?"AM":"PM";e=(e=(e=e.replace(/(^|[^\\])f/g,"$1"+f)).replace(/(^|[^\\])TT+/g,"$1"+m)).replace(/(^|[^\\])T/g,"$1"+m.charAt(0));const b=m.toLowerCase();e=(e=e.replace(/(^|[^\\])tt+/g,"$1"+b)).replace(/(^|[^\\])t/g,"$1"+b.charAt(0));let y=-t.getTimezoneOffset(),v=s||!y?"Z":y>0?"+":"-";if(!s){y=Math.abs(y);const t=y%60;v+=l(Math.floor(y/60))+":"+l(t)}e=e.replace(/(^|[^\\])K/g,"$1"+v);const w=(s?t.getUTCDay():t.getDay())+1;return e=(e=(e=(e=(e=e.replace(new RegExp(o[0],"g"),o[w])).replace(new RegExp(n[0],"g"),n[w])).replace(new RegExp(a[0],"g"),a[h])).replace(new RegExp(r[0],"g"),r[h])).replace(/\\(.)/g,"$1")}getDateFields(t,e){const i=new Date(t);return e?{year:i.getUTCFullYear(),month:i.getUTCMonth(),date:i.getUTCDate(),hour:i.getUTCHours(),minute:i.getUTCMinutes(),second:i.getUTCSeconds(),ms:i.getUTCMilliseconds(),weekday:i.getUTCDay()}:{year:i.getFullYear(),month:i.getMonth(),date:i.getDate(),hour:i.getHours(),minute:i.getMinutes(),second:i.getSeconds(),ms:i.getMilliseconds(),weekday:i.getDay()}}addInterval(t,e,i,s){const a=new Date(t);if(s)switch(e){case"year":a.setUTCFullYear(a.getUTCFullYear()+i);break;case"month":a.setUTCMonth(a.getUTCMonth()+i);break;case"week":a.setUTCDate(a.getUTCDate()+7*i);break;case"day":a.setUTCDate(a.getUTCDate()+i);break;case"hour":a.setUTCHours(a.getUTCHours()+i);break;case"minute":a.setUTCMinutes(a.getUTCMinutes()+i);break;case"second":a.setUTCSeconds(a.getUTCSeconds()+i)}else switch(e){case"year":a.setFullYear(a.getFullYear()+i);break;case"month":a.setMonth(a.getMonth()+i);break;case"week":a.setDate(a.getDate()+7*i);break;case"day":a.setDate(a.getDate()+i);break;case"hour":a.setHours(a.getHours()+i);break;case"minute":a.setMinutes(a.getMinutes()+i);break;case"second":a.setSeconds(a.getSeconds()+i)}return a.getTime()}ceilToBoundary(t,e,i,s){const a=new Date(t);if(s)switch(e){case"second":{const e=a.getUTCSeconds(),s=Math.ceil(e/i)*i;return s===e&&0===a.getUTCMilliseconds()?t:(a.setUTCMilliseconds(0),a.setUTCSeconds(s),a.getTime())}case"minute":{const e=a.getUTCMinutes(),s=Math.ceil(e/i)*i;return s===e&&0===a.getUTCSeconds()&&0===a.getUTCMilliseconds()?t:(a.setUTCMilliseconds(0),a.setUTCSeconds(0),a.setUTCMinutes(s),a.getTime())}case"hour":{const e=a.getUTCHours(),s=Math.ceil(e/i)*i;return s===e&&0===a.getUTCMinutes()&&0===a.getUTCSeconds()&&0===a.getUTCMilliseconds()?t:(a.setUTCMilliseconds(0),a.setUTCSeconds(0),a.setUTCMinutes(0),a.setUTCHours(s),a.getTime())}case"day":return 0===a.getUTCHours()&&0===a.getUTCMinutes()&&0===a.getUTCSeconds()&&0===a.getUTCMilliseconds()?t:(a.setUTCMilliseconds(0),a.setUTCSeconds(0),a.setUTCMinutes(0),a.setUTCHours(0),a.setUTCDate(a.getUTCDate()+1),a.getTime());case"week":{const e=6048e5,s=Date.UTC(1970,0,5);a.setUTCMilliseconds(0),a.setUTCSeconds(0),a.setUTCMinutes(0),a.setUTCHours(0);const r=a.getTime(),o=Math.ceil((r-s)/e),n=s+Math.ceil(o/i)*i*e;return n>=t?n:n+i*e}case"month":{const e=a.getUTCMonth(),s=Math.ceil(e/i)*i;return s===e&&1===a.getUTCDate()&&0===a.getUTCHours()&&0===a.getUTCMinutes()&&0===a.getUTCSeconds()&&0===a.getUTCMilliseconds()?t:(a.setUTCMilliseconds(0),a.setUTCSeconds(0),a.setUTCMinutes(0),a.setUTCHours(0),a.setUTCDate(1),a.setUTCMonth(s),a.getTime())}case"year":{const e=a.getUTCFullYear(),s=Math.ceil(e/i)*i;return s===e&&0===a.getUTCMonth()&&1===a.getUTCDate()&&0===a.getUTCHours()&&0===a.getUTCMinutes()&&0===a.getUTCSeconds()&&0===a.getUTCMilliseconds()?t:Date.UTC(s,0,1)}}else switch(e){case"second":{const e=a.getSeconds(),s=Math.ceil(e/i)*i;if(s===e&&0===a.getMilliseconds())return t;a.setMilliseconds(0),a.setSeconds(s);break}case"minute":{const e=a.getMinutes(),s=Math.ceil(e/i)*i;if(s===e&&0===a.getSeconds()&&0===a.getMilliseconds())return t;a.setMilliseconds(0),a.setSeconds(0),a.setMinutes(s);break}case"hour":{const e=a.getHours(),s=Math.ceil(e/i)*i;if(s===e&&0===a.getMinutes()&&0===a.getSeconds()&&0===a.getMilliseconds())return t;a.setMilliseconds(0),a.setSeconds(0),a.setMinutes(0),a.setHours(s);break}case"day":return 0===a.getHours()&&0===a.getMinutes()&&0===a.getSeconds()&&0===a.getMilliseconds()?t:(a.setMilliseconds(0),a.setSeconds(0),a.setMinutes(0),a.setHours(0),a.setDate(a.getDate()+1),a.getTime());case"week":{const e=Date.UTC(a.getFullYear(),a.getMonth(),a.getDate())/864e5-4,s=Math.ceil(Math.ceil(e/7)/i)*i,r=new Date(1970,0,5+7*s).getTime();return r>=t?r:new Date(1970,0,5+7*(s+i)).getTime()}case"month":{const e=a.getMonth(),s=Math.ceil(e/i)*i;return s===e&&1===a.getDate()&&0===a.getHours()&&0===a.getMinutes()&&0===a.getSeconds()&&0===a.getMilliseconds()?t:(a.setMilliseconds(0),a.setSeconds(0),a.setMinutes(0),a.setHours(0),a.setDate(1),a.setMonth(s),a.getTime())}case"year":{const e=a.getFullYear(),s=Math.ceil(e/i)*i;return s===e&&0===a.getMonth()&&1===a.getDate()&&0===a.getHours()&&0===a.getMinutes()&&0===a.getSeconds()&&0===a.getMilliseconds()?t:new Date(s,0,1).getTime()}}const r=a.getTime(),o=new Date(t).getTimezoneOffset()-a.getTimezoneOffset();return r<t?r+6e4*o:r}}class k{constructor(t){this.w=t,this.tooltipKeyFormat="dd MMM"}xLabelFormat(t,e,i,s){const a=this.w;if("datetime"===a.config.xaxis.type&&void 0===a.config.xaxis.labels.formatter&&void 0===a.config.tooltip.x.formatter){const t=new C(this.w);return t.formatDate(t.getDate(e),a.config.tooltip.x.format)}return t(e,i,s)}defaultGeneralFormatter(t){return Array.isArray(t)?t.map(t=>t):t}defaultYFormatter(t,e){const i=this.w;if(S.isNumber(t))if(0!==i.globals.yValueDecimal)t=t.toFixed(void 0!==e.decimalsInFloat?e.decimalsInFloat:i.globals.yValueDecimal);else{const e=t.toFixed(0);t=Number(e)===t?e:t.toFixed(1)}return t}setLabelFormatters(){const t=this.w,e=t.formatters,i=t.axisFlags.isXNumeric&&t.axisFlags.dataFormatXNumeric&&"datetime"!==t.config.xaxis.type&&!t.config.xaxis.convertedCatToNumeric&&!t.globals.isBarHorizontal;if(e.xaxisTooltipFormatter=t=>this.defaultGeneralFormatter(t),e.ttKeyFormatter=t=>this.defaultGeneralFormatter(t),e.ttZFormatter=t=>t,e.legendFormatter=t=>this.defaultGeneralFormatter(t),e.ttVal=void 0,void 0!==t.config.xaxis.labels.formatter?e.xLabelFormatter=t.config.xaxis.labels.formatter:e.xLabelFormatter=e=>{var s;if(S.isNumber(e)){if(!t.config.xaxis.convertedCatToNumeric&&!t.globals.isBarHorizontal&&("numeric"===t.config.xaxis.type||i)){const a=null==(s=t.globals.xAxisScale)?void 0:s.result;if(i&&Array.isArray(a)&&a.every(Number.isInteger))return e.toFixed(0);if(S.isNumber(t.config.xaxis.decimalsInFloat))return e.toFixed(t.config.xaxis.decimalsInFloat);{const i=t.globals.maxX-t.globals.minX;if(i>0){const t=i/10,s=Math.max(0,-Math.floor(Math.log10(t)));return e.toFixed(s)}return e.toFixed(0)}}if(t.globals.isBarHorizontal){if(t.globals.maxY-t.globals.minY<4)return e.toFixed(1)}return e.toFixed(0)}return e},"function"==typeof t.config.tooltip.x.formatter)e.ttKeyFormatter=t.config.tooltip.x.formatter;else if(void 0===t.config.xaxis.labels.formatter&&i){const t=e.xLabelFormatter;e.ttKeyFormatter=e=>Number.isInteger(e)?e.toFixed(0):t(e)}else e.ttKeyFormatter=e.xLabelFormatter;return"function"==typeof t.config.xaxis.tooltip.formatter&&(e.xaxisTooltipFormatter=t.config.xaxis.tooltip.formatter),(Array.isArray(t.config.tooltip.y)||void 0!==t.config.tooltip.y.formatter)&&(e.ttVal=t.config.tooltip.y),void 0!==t.config.tooltip.z.formatter&&(e.ttZFormatter=t.config.tooltip.z.formatter),void 0!==t.config.legend.formatter&&(e.legendFormatter=t.config.legend.formatter),e.yLabelFormatters=[],t.config.yaxis.forEach((i,s)=>{if(void 0!==i.labels.formatter)e.yLabelFormatters[s]=i.labels.formatter;else if("violin"===t.config.chart.type){const i=t=>"number"==typeof t&&isFinite(t)?""+Math.round(100*t)/100:t;e.yLabelFormatters[s]=e=>t.globals.xyCharts?Array.isArray(e)?e.map(i):i(e):e}else e.yLabelFormatters[s]=e=>t.globals.xyCharts?Array.isArray(e)?e.map(t=>this.defaultYFormatter(t,i)):this.defaultYFormatter(e,i):e}),t.globals}heatmapLabelFormatters(){const t=this.w;if("heatmap"===t.config.chart.type){const e=t.seriesData.seriesNames.slice();t.config.yaxis[0].reversed?e.unshift(""):e.push(""),t.globals.yAxisScale[0].result=e;const i=t.seriesData.seriesNames.reduce((t,e)=>t.length>e.length?t:e,0);t.globals.yAxisScale[0].niceMax=i,t.globals.yAxisScale[0].niceMin=i}}}const M={name:"en",options:{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"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],toolbar:{exportToSVG:"Download SVG",exportToPNG:"Download PNG",exportToCSV:"Download CSV",menu:"Menu",selection:"Selection",selectionZoom:"Selection Zoom",zoomIn:"Zoom In",zoomOut:"Zoom Out",pan:"Panning",reset:"Reset Zoom",measure:"Measure",wheelZoomHint:"Use {key} + scroll to zoom"}}},T=t=>{var e;const i=null==t?void 0:t.config.plotOptions.radialBar;return!i||!i.min&&100===(null!=(e=i.max)?e:100)?"%":""};class _{constructor(){this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount:void 0,stepSize:void 0,forceNiceScale:!1,alignZero:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,showDuplicates:!1,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:"11px",fontWeight:400,fontFamily:void 0,cssClass:""},formatter:void 0},axisBorder:{show:!1,color:"#e0e0e0",width:1,offsetX:0,offsetY:0},axisTicks:{show:!1,color:"#e0e0e0",width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:"11px",fontWeight:900,fontFamily:void 0,cssClass:""}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:"front",stroke:{color:"#b6b6b6",width:1,dashArray:0}}},this.pointAnnotation={id:void 0,x:0,y:null,yAxisIndex:0,seriesIndex:void 0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,marker:{size:4,fillColor:"#fff",strokeWidth:2,strokeColor:"#333",shape:"circle",offsetX:0,offsetY:0,cssClass:""},label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}},customSVG:{SVG:void 0,cssClass:void 0,offsetX:0,offsetY:0},image:{path:void 0,width:20,height:20,offsetX:0,offsetY:0},tooltip:{enabled:!1,text:void 0,formatter:void 0,theme:void 0,offsetX:0,offsetY:0}},this.yAxisAnnotation={id:void 0,y:0,y2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,width:"100%",yAxisIndex:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"end",position:"right",offsetX:0,offsetY:-3,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.xAxisAnnotation={id:void 0,x:0,x2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",orientation:"vertical",position:"top",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:"",textAnchor:"start",foreColor:void 0,fontSize:"13px",fontFamily:void 0,fontWeight:400,appendTo:".apexcharts-annotations",backgroundColor:"transparent",borderColor:"#c2c2c2",borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}init(){return{annotations:{yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},plugins:[],trellis:{by:void 0,row:void 0,column:void 0,emptyPanels:"placeholder",data:void 0,x:void 0,y:void 0,seriesBy:void 0,columns:"auto",minPanelWidth:220,gap:12,aspectRatio:1.6,panelHeight:void 0,minPanelHeight:80,order:"first-seen",limit:void 0,virtualize:"auto",scales:{x:"shared",y:"shared",color:"shared",size:"shared"},header:{show:!0,formatter:void 0,style:{fontSize:void 0,fontWeight:void 0,color:void 0}},axes:{labels:"edges"},legend:"shared",toolbar:"shared",tooltip:"panel",zoom:"sync",promote:!1,radiusByTotal:!1,targetTicks:3,panel:void 0},chart:{animations:{enabled:!0,speed:800,easing:"easeInOutSine",animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350,easing:void 0},chartTypeMorph:{enabled:!0,speed:600},respectReducedMotion:!0,largeDatasetThreshold:1e3},background:"",locales:[M],defaultLocale:"en",perspectives:{serializeOptions:["theme","xaxis","yaxis","title","subtitle"]},history:{enabled:!1,maxDepth:100,coalesceMs:250,keyboard:!0},renderer:"svg",rendererThreshold:8e3,dropShadow:{enabled:!1,enabledOnSeries:void 0,top:2,left:2,blur:4,color:"#000",opacity:.7},events:{animationEnd:void 0,beforeMount:void 0,mounted:void 0,updated:void 0,click:void 0,mouseMove:void 0,mouseLeave:void 0,xAxisLabelClick:void 0,legendClick:void 0,markerClick:void 0,selection:void 0,dataPointSelection:void 0,dataPointMouseEnter:void 0,dataPointMouseLeave:void 0,beforeZoom:void 0,beforeResetZoom:void 0,zoomed:void 0,scrolled:void 0,brushScrolled:void 0,crossFilter:void 0,filterChange:void 0,highlightFilterChanged:void 0,annotationDragged:void 0,annotationEdited:void 0,annotationCreated:void 0,annotationStyled:void 0,annotationDeleted:void 0,measured:void 0,keyDown:void 0,keyUp:void 0},foreColor:"#373d3f",fontFamily:"Helvetica, Arial, sans-serif",height:"auto",parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,print:{enabled:!0,width:700},id:void 0,group:void 0,nonce:void 0,license:void 0,offsetX:0,offsetY:0,injectStyleSheet:!0,selection:{enabled:!1,type:"x",fill:{color:"#24292e",opacity:.1},stroke:{width:1,color:"#24292e",opacity:.4,dashArray:3},xaxis:{min:void 0,max:void 0},yaxis:{min:void 0,max:void 0}},sparkline:{enabled:!1},brush:{enabled:!1,autoScaleYaxis:!0,target:void 0,targets:void 0},link:{enabled:!1,mode:"highlight",dimOpacity:.2,id:void 0,dimension:void 0,reduce:void 0,type:void 0,bins:void 0,order:void 0,seriesName:void 0},ink:{enabled:!1,palette:!1,snap:!1,noteColors:void 0},measure:{enabled:!1,mode:"span",key:"m",pinOnRelease:!0,colors:{up:void 0,down:void 0,neutral:void 0,guide:void 0},band:!0,guides:!0,markers:!0,format:{x:void 0,y:void 0,percent:void 0},label:void 0},contextMenu:{enabled:!1,items:["annotate","xline","yline","measure"],labels:{annotate:void 0,xline:void 0,yline:void 0,measure:void 0},noteText:"Note",line:{text:"",strokeDashArray:4,color:void 0}},stacked:!1,stackOnlyBar:!0,stackType:"normal",streaming:{enabled:!1,maxPoints:void 0},toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,measure:!0,customIcons:[]},export:{csv:{filename:void 0,columnDelimiter:",",headerCategory:"category",headerValue:"value",categoryFormatter:void 0,valueFormatter:void 0},png:{filename:void 0},svg:{filename:void 0},scale:void 0,width:void 0,embedFonts:!0},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,allowMouseWheelZoom:"auto",wheelHint:!0,pinch:"auto",resetControl:"auto",zoomedArea:{fill:{color:"#90CAF9",opacity:.4},stroke:{color:"#0D47A1",opacity:.4,width:1}}},pan:{inertia:!0,friction:.92},accessibility:{enabled:!0,description:void 0,announcements:{enabled:!0},keyboard:{enabled:!0,navigation:{enabled:!0,wrapAround:!1}}},dataReducer:{enabled:!1,targetPoints:250,threshold:500}},parsing:{x:void 0,y:void 0},plotOptions:{line:{isSlopeChart:!1,colors:{threshold:0,colorAboveThreshold:void 0,colorBelowThreshold:void 0}},area:{fillTo:"origin"},bar:{horizontal:!1,columnWidth:"70%",barHeight:"70%",distributed:!1,borderRadius:0,borderRadiusApplication:"around",borderRadiusWhenStacked:"all",rangeBarOverlap:!0,rangeBarGroupRows:!1,hideZeroBarsWhenGrouped:!1,isDumbbell:!1,dumbbellColors:void 0,dumbbell:{connector:{color:void 0,opacity:.55},dataLabels:{enabled:!1,offset:6,colorFromMarker:!0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0}},tooltip:{differenceLabel:"Difference"}},isFunnel:!1,isFunnel3d:!0,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:"top",maxItems:100,hideOverflowingLabels:!0,orientation:"horizontal",total:{enabled:!1,formatter:void 0,offsetX:0,offsetY:0,style:{color:"#373d3f",fontSize:"12px",fontFamily:void 0,fontWeight:600}}}},bubble:{zScaling:!0,minBubbleRadius:void 0,maxBubbleRadius:void 0,minZ:void 0,maxZ:void 0},scatter:{jitter:{enabled:!1,x:0,y:0,distributed:!1,maxPoints:5e3}},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},boxPlot:{colors:{upper:"#00E396",lower:"#008FFB"},whiskers:"minmax",points:{show:!1,shape:"circle",size:2.5,jitter:.5,maxPoints:3e3,opacity:.9,fillColor:"series-dark",strokeColor:"#fff",strokeWidth:1}},violin:{bandwidthScale:1,kde:{bandwidth:void 0,resolution:64},normalize:"individual",side:"both",box:{show:!1,width:"15%",whiskers:"minmax",strokeWidth:1,fillColor:void 0,capWidth:.5},points:{show:!0,shape:"circle",size:2.5,jitter:.5,constrainToViolin:!0,position:"center",laneWidth:"40%",maxPoints:3e3,opacity:.9,fillColor:"series-dark",strokeColor:"#fff",strokeWidth:1}},histogram:{bins:"auto",binWidth:void 0,range:void 0,normalize:"count",cumulative:!1,overlap:!0},heatmap:{shape:"rect",radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0,gradientLegend:{enabled:!1,width:"70%",height:"70%",thickness:12,align:"center",stops:16,showLabels:!0,showHoverValue:!0,labelStyle:{fontSize:"11px",fontFamily:void 0,colors:void 0},arrow:{size:8,color:void 0},formatter:void 0}}},waterfall:{colors:{positive:"#00A86F",negative:"#FF4560",subtotal:void 0,total:void 0},connectors:{show:!0,color:void 0,strokeWidth:1,strokeDashArray:3}},streamgraph:{offset:"wiggle",order:"inside-out",hover:{show:!0,opacity:.35},labels:{show:!0,minWidth:24,minFontSize:9,maxFontSize:30,style:{fontSize:"auto",fontFamily:void 0,fontWeight:600,colors:void 0}}},funnel:{shape:"rectangle",lastShape:"flat"},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,borderRadius:4,dataLabels:{format:"scale",minFontSize:4},colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0,colorValue:void 0,gradient:{enabled:void 0,min:void 0,max:void 0,midpoint:void 0,symmetric:!0,colors:void 0,stops:void 0},gradientLegend:{enabled:!1,width:"70%",height:"70%",thickness:12,align:"center",stops:16,showLabels:!0,showHoverValue:!0,labelStyle:{fontSize:"11px",fontFamily:void 0,colors:void 0},arrow:{size:8,color:void 0},formatter:void 0}},nested:{enabled:void 0,drilldownAsLevels:!1},parents:{show:"auto",padding:4,fill:void 0,fillOpacity:1,borderColor:void 0,borderWidth:1,borderRadius:void 0,hover:{show:!0,color:void 0,width:2},header:{show:!0,height:22,minWidth:40,align:"left",offsetX:0,offsetY:0,showValue:!1,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,color:void 0,background:void 0,cssClass:""}},tooltip:{formatter:void 0}},levels:[],zoom:{enabled:!1,breadcrumb:void 0},seriesTitle:{show:!0,offsetY:1,offsetX:1,borderColor:"#000",borderWidth:1,borderRadius:2,style:{background:"rgba(0, 0, 0, 0.6)",color:"#fff",fontSize:"12px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:6,right:6,top:2,bottom:2}}}},unit:{layout:"grouped",positions:void 0,transition:"group",shape:"circle",image:{src:void 0,width:20,height:20,tint:!1},pictogram:{mark:void 0,fit:"contain",scale:1,padding:0,fallback:"circle"},size:"auto",columns:{size:"inherit"},grid:{columns:10,total:void 0,fillFrom:"bottom",split:!1,tileColumns:void 0,max:void 0,trackColor:void 0},scatter:{y:"lanes",spread:"swarm",orientation:"horizontal",tickAmount:5,xMin:void 0,xMax:void 0,xTitle:void 0,xFormatter:void 0,yTickAmount:5,yMin:void 0,yMax:void 0,yTitle:void 0,yFormatter:void 0,sizeField:"z",sizeRange:void 0,laneLabelWidth:void 0,gridlines:!0},sizeByValue:{enabled:!1,maxRadius:"auto",minRadius:void 0,scale:"area"},spacing:1.05,borderRadius:0,gather:{motion:"auto",spring:"crisp",easing:"outCubic",overshoot:1.70158,enter:"burst"},arc:{startAngle:-90,endAngle:90,innerRadiusRatio:.4,rows:"auto"},unitValue:1,maxUnits:5e3,sortByGroup:!0,clusterLabels:{show:!0,position:"top",curved:!0,fontSize:"13px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter:void 0,external:{show:!1,connector:{show:!0,width:1.5,color:void 0,gap:8,length:22},offsetX:0,offsetY:0}},tooltip:{formatter:void 0}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,shape:"arc",min:0,max:100,bands:[],bandsStyle:{strokeWidth:"40%",gap:0,hideTrackWhenPresent:!0},ticks:{show:!1,major:{count:11,length:10,width:2,color:"#666",placement:"outside"},minor:{count:4,length:5,width:1,color:"#999",placement:"outside"},labels:{show:!1,offset:6,fontSize:"11px",fontFamily:void 0,fontWeight:400,color:"#666",formatter:t=>String(t)}},needle:{color:"#333",length:"85%",baseWidth:4,tipWidth:1,offsetY:0,showValueArc:!1,animation:{enabled:!0,duration:void 0}},hollow:{margin:5,size:"50%",background:"transparent",image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:"front",stroke:void 0,strokeWidth:1,strokeDasharray:void 0,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},track:{show:!0,startAngle:void 0,endAngle:void 0,background:"#f2f2f2",strokeWidth:"97%",opacity:1,margin:5,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},dataLabels:{show:!0,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter:t=>t},value:{show:!0,fontSize:"14px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter:(t,e)=>t+T(e)},total:{show:!1,label:"Total",fontSize:"16px",fontWeight:600,fontFamily:void 0,color:void 0,formatter:t=>t.globals.seriesTotals.reduce((t,e)=>t+e,0)/t.seriesData.series.length+T(t)}},barLabels:{enabled:!1,offsetX:0,offsetY:0,useSeriesColors:!0,fontFamily:void 0,fontWeight:600,fontSize:"16px",formatter:t=>t,onClick:void 0}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!0,expandOffset:10,hoverOutline:{show:!0,size:8,gap:0,opacity:.3,color:void 0},borderRadius:0,spacing:0,dataLabels:{offset:0,minAngleToShowLabel:10,external:{show:!1,offsetX:0,offsetY:0,fontSize:void 0,fontFamily:void 0,fontWeight:void 0,color:void 0,formatter:void 0,connector:{show:!0,width:1,color:void 0,length:16,gap:6}}},donut:{size:"65%",background:"transparent",labels:{show:!1,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter:t=>t},value:{show:!0,fontSize:"20px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter:t=>t},total:{show:!1,showAlways:!1,label:"Total",fontSize:"16px",fontWeight:400,fontFamily:void 0,color:void 0,formatter:t=>t.globals.seriesTotals.reduce((t,e)=>t+e,0)}}}},polarArea:{rings:{strokeWidth:1,strokeColor:"#e8e8e8"},spokes:{strokeWidth:1,connectorColors:"#e8e8e8"}},icicle:{direction:"down",levelSize:"equal",maxDepth:"auto",spacing:1,borderRadius:0,leaf:"stop",partition:"normalize",sort:"none",tint:0,zoomOnClick:!0,zoomType:"value",dataLabels:{show:!0,minSizeToShow:30,align:"center",rotate:"auto",showValue:!1,style:{fontSize:"12px",fontFamily:void 0,fontWeight:400,colors:void 0}}},sunburst:{offsetX:0,offsetY:0,startAngle:0,endAngle:360,innerSize:"15%",borderRadius:0,spacing:1,leaf:"extend",partition:"normalize",tint:.14,zoomOnClick:!0,dataLabels:{show:!0,minAngleToShow:8,style:{fontSize:"12px",fontFamily:void 0,fontWeight:400,colors:void 0}}},radar:{size:void 0,offsetX:0,offsetY:0,polygons:{strokeWidth:1,strokeColors:"#e8e8e8",connectorColors:"#e8e8e8",fill:{colors:void 0}}}},colors:void 0,dataLabels:{enabled:!0,enabledOnSeries:void 0,formatter:t=>null!==t?t:"",textAnchor:"middle",distributed:!1,avoidOverlap:!0,offsetX:0,offsetY:0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0},background:{enabled:!0,foreColor:"#fff",backgroundColor:void 0,borderRadius:2,padding:4,opacity:.9,borderWidth:1,borderColor:"#fff",dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8}},dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8},animate:{enabled:!0},countUp:{enabled:!1}},fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:"squares",width:6,height:6,strokeWidth:2}},forecastDataPoints:{count:0,fillOpacity:.5,strokeWidth:void 0,dashArray:4},highlightFilter:{enabled:!0,data:void 0,fadeOpacity:.2,outline:{width:1,opacity:1},enter:"whole",axis:"extend",dataLabels:{value:"part",total:"part"},tooltip:{show:!0,share:!1,formatter:void 0},line:{dashArray:4},pie:{encoding:"radius"},radialBar:{indicator:void 0,needle:{}}},grid:{show:!0,borderColor:"#e0e0e0",strokeDashArray:0,position:"back",xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],drilldown:{enabled:!1,series:[],breadcrumb:{show:!0,position:"top-left",separator:" / ",rootLabel:"All",offsetX:0,offsetY:0},animation:{enabled:!0,zoomFromPoint:!1,speed:260},loading:{show:!0},cache:!0,marker:{show:!0,size:6,strokeColor:"#fff"}},legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:"bottom",horizontalAlign:"center",inverseOrder:!1,fontSize:"12px",fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],clusterGroupedSeries:!0,clusterGroupedSeriesOrientation:"vertical",labels:{colors:void 0,useSeriesColors:!1},markers:{size:7,fillColors:void 0,strokeWidth:1,shape:void 0,offsetX:0,offsetY:0,customHTML:void 0,onClick:void 0},itemMargin:{horizontal:5,vertical:4},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:"#fff",strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:"circle",offsetX:0,offsetY:0,showNullDataPoints:!0,onClick:void 0,onDblClick:void 0,hover:{size:void 0,sizeOffset:3},largeDatasetThreshold:0},noData:{text:void 0,align:"center",offsetX:0,offsetY:0,style:{color:void 0,fontSize:"14px",fontFamily:void 0}},responsive:[],series:void 0,states:{hover:{filter:{type:"lighten",value:.15}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken",value:.35}}},title:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:"14px",fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:"12px",fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:"smooth",lineCap:"butt",width:2,colors:void 0,dashArray:0,fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]}}},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,hideEmptySeries:!1,followCursor:!1,intersect:!1,inverseOrder:!1,interactive:!1,arrow:!0,compact:!1,custom:void 0,fillSeriesColor:!1,theme:"light",cssClass:"",style:{fontSize:"12px",fontFamily:void 0,background:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:"dd MMM",formatter:void 0},y:{formatter:void 0,title:{formatter:t=>t?t+": ":""}},z:{formatter:void 0,title:"Size: "},marker:{show:!0,fillColors:void 0},items:{display:"flex"},fixed:{enabled:!1,position:"topRight",offsetX:0,offsetY:0}},xaxis:{type:"category",categories:[],convertedCatToNumeric:!1,offsetX:0,offsetY:0,overwriteCategories:void 0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!1,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!0,datetimeFormatter:{year:"yyyy",month:"MMM",day:"dd MMM",hour:"HH:mm",minute:"HH:mm",second:"HH:mm:ss"}},group:{groups:[],style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""}},axisBorder:{show:!0,color:"#e0e0e0",width:"100%",height:1,offsetX:0,offsetY:0},axisTicks:{show:!0,color:"#e0e0e0",height:6,offsetX:0,offsetY:0},stepSize:void 0,tickAmount:void 0,tickPlacement:"on",min:void 0,max:void 0,range:void 0,floating:!1,decimalsInFloat:void 0,position:"bottom",title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:"12px",fontWeight:900,fontFamily:void 0,cssClass:""}},crosshairs:{show:!0,width:1,position:"back",opacity:.9,stroke:{color:"#b6b6b6",width:1,dashArray:3},fill:{type:"solid",color:"#B1B9C4",gradient:{colorFrom:"#D8E3F0",colorTo:"#BED1E6",stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.8}},tooltip:{enabled:!1,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"",palette:"palette1",tokens:!0,follow:!1,name:"",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65},accessibility:{colorBlindMode:""}}}}}const D=["icicle","unit","sunburst","violin"],F=Object.setPrototypeOf({funnel:"bar",pyramid:"bar",gauge:"radialBar",waffle:"unit",histogram:"bar",waterfall:"rangeBar",dumbbell:"rangeBar",streamgraph:"rangeArea",raincloud:"violin",column:"bar"},null),L={histogram:"stats",raincloud:"raincloud",waterfall:"waterfall",dumbbell:"dumbbell",streamgraph:"streamgraph"},E={area:"line",scatter:"line",bubble:"line",rangeArea:"line",column:"bar",barStacked:"bar",rangeBar:"bar",boxPlot:"candlestick",donut:"pie",polarArea:"pie"},P=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","violin","scatter","bubble"],B=["bar","rangeBar","candlestick","boxPlot","violin"],N=["radar","heatmap","treemap"],z=["pie","donut","polarArea","radialBar","unit","sunburst","icicle"],R=[...P,...N,...z],I=[...P,...N],O=[...N,...z],X="_apexOwnedByType",H="_apexStacked100",Y=t=>(t[X]=!0,t),W=["tooltip.custom","tooltip.shared","tooltip.intersect","tooltip.followCursor","dataLabels.enabled","dataLabels.formatter","plotOptions.bar.dataLabels.position","markers.size","plotOptions.violin.side","plotOptions.violin.box.show","plotOptions.violin.box.whiskers","plotOptions.violin.points.position","plotOptions.violin.points.jitter","plotOptions.bar.isDumbbell","plotOptions.unit.layout","plotOptions.unit.shape","grid.show","states.hover.filter.type","states.active.filter.type","xaxis.type","xaxis.crosshairs.width","xaxis.tickPlacement","xaxis.tooltip.enabled","chart.zoom.enabled","chart.animations.dynamicAnimation.enabled"],$=t=>S.isNumber(t)?Math.floor(t):t,G=t=>"number"==typeof t?t.toFixed(1)+"%":t,j=t=>S.extend((new _).init(),Q.forType(t)),U=(t,e)=>{let i=t;for(const t of e.split(".")){if(null==i||"object"!=typeof i)return;i=i[t]}return i},V=(t,e,i)=>{const s=e.split("."),a=s.pop();let r=t;for(const t of s)null!=r[t]&&"object"==typeof r[t]||(r[t]={}),r=r[t];void 0===i?delete r[a]:r[a]=i},q=(t,e)=>{var i,s,a,r;const o=F[t];return{chart:{type:o||t,requestedType:o?t:void 0,stacked:null==(i=e.chart)?void 0:i.stacked},plotOptions:{bar:{isFunnel:"funnel"===t||"pyramid"===t,horizontal:null==(a=null==(s=e.plotOptions)?void 0:s.bar)?void 0:a.horizontal},histogram:null==(r=e.plotOptions)?void 0:r.histogram},series:e.series,yaxis:[{title:{},labels:{},axisBorder:{},axisTicks:{}}]}},Z=(t,e)=>{if("function"==typeof t)return!!t[X]||"function"==typeof e&&String(t)===String(e);if("function"==typeof e)return void 0===t;if(t===e)return!0;try{return JSON.stringify(t)===JSON.stringify(e)}catch(t){return!1}},K=({isTimeline:t,seriesIndex:e,dataPointIndex:i,y1:s,y2:a,w:r})=>{var o;let n=r.rangeData.seriesRangeStart[e][i],l=r.rangeData.seriesRangeEnd[e][i],c=r.labelData.labels[i],h=r.config.series[e].name?r.config.series[e].name:"";const d=r.formatters.ttKeyFormatter,p=r.config.tooltip.y.title.formatter,u={w:r,seriesIndex:e,dataPointIndex:i,start:n,end:l};if("function"==typeof p&&(h=p(h,u)),(null==(o=r.config.series[e].data[i])?void 0:o.x)&&(c=r.config.series[e].data[i].x),!t&&"datetime"===r.config.xaxis.type){c=new k(r).xLabelFormat(r.formatters.ttKeyFormatter,c,c,{i:void 0,dateFormatter:new C(r).formatDate,w:r})}"function"==typeof d&&(c=d(c,u)),Number.isFinite(s)&&Number.isFinite(a)&&(n=s,l=a);let g="",x="";const f=r.globals.colors[e];if(void 0===r.config.tooltip.x.formatter)if("datetime"===r.config.xaxis.type){const t=new C(r);g=t.formatDate(t.getDate(n),r.config.tooltip.x.format),x=t.formatDate(t.getDate(l),r.config.tooltip.x.format)}else g=n,x=l;else g=r.config.tooltip.x.formatter(n),x=r.config.tooltip.x.formatter(l);return{start:n,end:l,startVal:g,endVal:x,ylabel:c,color:f,seriesName:h}},J=t=>{let{color:e,seriesName:i,ylabel:s,start:a,end:r,seriesIndex:o,dataPointIndex:n}=t;const l=t.w.globals.tooltip.tooltipLabels.getFormatters(o);a=l.yLbFormatter(a),r=l.yLbFormatter(r);const c=l.yLbFormatter(t.w.seriesData.series[o][n]);let h="";const d=`<span class="value start-value">\n ${a}\n </span> <span class="separator">-</span> <span class="value end-value">\n ${r}\n </span>`;return h=t.w.globals.comboCharts?"rangeArea"===t.w.config.series[o].type||"rangeBar"===t.w.config.series[o].type?d:`<span>${c}</span>`:d,'<div class="apexcharts-tooltip-rangebar"><div> <span class="series-name" style="color: '+e+'">'+(i||"")+'</span></div><div> <span class="category">'+s+": </span> "+h+" </div></div>"};class Q{constructor(t){this.opts=t}static forType(t){var e,i;const s=new Q(t),a=R,r=t.chart.requestedType;let o;const n=F[r]&&s[r];return o=n?n.call(s):"waffle"===r?S.extend(s.unit(),{plotOptions:{unit:{layout:"grid",shape:"square"}}}):-1!==a.indexOf(t.chart.type)?s[t.chart.type]():s.line(),(null==(i=null==(e=t.plotOptions)?void 0:e.bar)?void 0:i.isFunnel)&&(o=s.funnel()),t.chart.stacked&&"bar"===t.chart.type&&(o=S.extend(o,{plotOptions:{bar:{borderRadiusApplication:"end"}}})),o}static handOverTypeDefaults(t,e,i){var s,a;Q.reconcile(t,!0);const r=null==i?void 0:i.chart;if(r&&("stacked"in r||"stackType"in r)&&!(null==(s=i.dataLabels)?void 0:s.formatter)){const e=t.dataLabels.formatter,i=(new _).init().dataLabels.formatter;if(t.chart.stacked&&"100%"===t.chart.stackType)Z(e,i)&&(t.dataLabels.formatter=void 0,new Q(t).stacked100(t));else if(null==e?void 0:e[H]){t.dataLabels.formatter=i;for(const e of t.yaxis)0===e.min&&100===e.max&&(e.min=e.max=void 0)}}const o=t.chart.requestedType||t.chart.type,n=e===o&&"histogram"===o&&(null==i?void 0:i.series);if(!e||e===o&&!n)return;const h=(new _).init(),d=S.extend(h,Q.forType(q(e,n?c(l({},t),{series:t.series[1]?[]:[0,0]}):t))),p=S.extend(h,Q.forType(q(o,t)));for(const e of n?["fill.opacity","stroke.show","stroke.width","stroke.colors","tooltip.shared"]:W){if(i&&void 0!==U(i,e))continue;const s=U(d,e),a=U(p,e);void 0===s&&void 0===a||Z(U(t,e),s)&&V(t,e,a)}const u=Q.typeYAxisDefaults(e),g=Q.typeYAxisDefaults(o),x=(new _).yAxis,f=[].concat(null!=(a=null==i?void 0:i.yaxis)?a:[]);for(const e of new Set([...Object.keys(u),...Object.keys(g)])){if(f.some(t=>t&&void 0!==t[e]))continue;const i=e in u?u[e]:x[e],s=e in g?g[e]:x[e];for(const a of t.yaxis||[])a&&a[e]===i&&(a[e]=s)}}static syncSparkline(t,e,i){var s;const a=!!(null==(s=t.chart.sparkline)?void 0:s.enabled);if(a===!!e)return;const r=new Q({yaxis:[{title:{},axisBorder:{},axisTicks:{}}]}),o=j(t),n=(t,e,i,s,r="")=>{for(const o of Object.keys(t)){const l=r+o;if(S.isObject(t[o]))n(t[o],e,i,s,l+".");else if(void 0===U(s,l)){const s=t[o],r=U(i,l);Z(U(e,l),a?r:s)&&V(e,l,a?s:r)}}};n(r.sparkline({}),t,o,i);const l=null==i?void 0:i.yaxis;n(r.opts.yaxis[0],t.yaxis[0],(new _).yAxis,Array.isArray(l)?l[0]:l)}static isHorizontalBar(t){return"bar"===t.chart.type&&!!t.plotOptions.bar.horizontal}static syncHorizontal(t,e,i){if(!e||Q.isHorizontalBar(t))return;const s=j(t);for(const e of["chart.zoom.enabled","xaxis.tooltip.enabled"])void 0===U(i,e)&&!1===U(t,e)&&V(t,e,U(s,e))}static reconcile(t,e){const i=t=>{if(!e)throw new Error(t);console.warn(t)};t.tooltip.shared&&t.tooltip.intersect&&i("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false."),Q.isHorizontalBar(t)&&(t.yaxis.length>1&&i("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false"),t.yaxis[0].reversed&&(t.yaxis[0].opposite=!0),t.xaxis.tooltip.enabled=!1,t.yaxis[0].tooltip.enabled=!1,t.chart.zoom.enabled=!1),"bar"!==t.chart.type&&"rangeBar"!==t.chart.type||t.tooltip.shared&&"barWidth"===t.xaxis.crosshairs.width&&t.series.length>1&&(t.xaxis.crosshairs.width="tickWidth"),"candlestick"!==t.chart.type&&"boxPlot"!==t.chart.type||(t.yaxis[0].reversed&&(console.warn(`Reversed y-axis in ${t.chart.type} chart is not supported.`),t.yaxis[0].reversed=!1),"candlestick"===t.chart.type&&t.plotOptions.bar.horizontal&&(console.warn("Horizontal candlestick chart is not supported."),t.plotOptions.bar.horizontal=!1))}static typeYAxisDefaults(t){return"streamgraph"===t||"treemap"===t?{show:!1}:{}}hideYAxis(){this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text="",this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0}line(){return{dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}sparkline(t){this.hideYAxis();return S.extend(t,{grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}})}slope(){return this.hideYAxis(),{chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!0,formatter(t,e){const i=e.w.config.series[e.seriesIndex].name;return null!==t?i+": "+t:""},background:{enabled:!1},offsetX:-5},grid:{xaxis:{lines:{show:!0}},yaxis:{lines:{show:!1}}},xaxis:{position:"top",labels:{style:{fontSize:14,fontWeight:900}},tooltip:{enabled:!1},crosshairs:{show:!1}},markers:{size:8,hover:{sizeOffset:1}},legend:{show:!1},tooltip:{shared:!1,intersect:!0,followCursor:!0},stroke:{width:5,curve:"straight"}}}bar(){return{chart:{stacked:!1},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]},background:{enabled:!1}},stroke:{width:0,lineCap:"square"},fill:{opacity:.85},legend:{markers:{shape:"square"}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:"between",crosshairs:{width:"barWidth",position:"back",fill:{type:"gradient"},dropShadow:{enabled:!1},stroke:{width:0}}}}}funnel(){return this.hideYAxis(),c(l({},this.bar()),{chart:{animations:{speed:800,animateGradually:{enabled:!1}}},plotOptions:{bar:{horizontal:!0,borderRadiusApplication:"around",borderRadius:0,dataLabels:{position:"center"}}},grid:{show:!1,padding:{left:0,right:0}},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}}})}pyramid(){return this.funnel()}gauge(){const t=this.radialBar();return c(l({},t),{plotOptions:{radialBar:{startAngle:-135,endAngle:135,hollow:{margin:0,size:"60%"},track:{background:"#e7e7e7",strokeWidth:"100%",margin:5},dataLabels:{name:{show:!1},value:{show:!0,fontSize:"32px",fontWeight:600,offsetY:void 0}}}}})}waterfall(){var t;const e=this.rangeBar();return c(l({},e),{chart:{stacked:!1,zoom:{enabled:!1},animations:{animateGradually:{enabled:!0}}},plotOptions:c(l({},e.plotOptions),{bar:c(l({},e.plotOptions.bar),{columnWidth:"60%",barHeight:"60%"})}),dataLabels:c(l({},e.dataLabels),{enabled:!0,background:{enabled:!1},style:c(l({},null==(t=e.dataLabels)?void 0:t.style),{colors:[t=>t.w.config.chart.foreColor]})}),legend:{show:!1},tooltip:{shared:!1,intersect:!0,followCursor:!1}})}histogram(){var t,e,i,s;const a=Array.isArray(null==(t=this.opts)?void 0:t.series)&&this.opts.series.length>1&&!1!==(null==(s=null==(i=null==(e=this.opts)?void 0:e.plotOptions)?void 0:i.histogram)?void 0:s.overlap);return c(l({},this.bar()),{chart:{stacked:!1,zoom:{enabled:!1},animations:{animateGradually:{enabled:!1}}},plotOptions:{bar:{columnWidth:"100%",borderRadius:0,dataLabels:{position:"top"}}},dataLabels:{enabled:!1},fill:a?{opacity:.65}:{},stroke:a?{show:!1}:{show:!0,width:1,colors:["#fff"]},xaxis:{type:"numeric",tooltip:{enabled:!1}},tooltip:{shared:a,intersect:!1,x:{formatter:(t,e)=>{var i,s;const a=null==(s=null==(i=null==e?void 0:e.w)?void 0:i.histogramData)?void 0:s.edges,r=null==e?void 0:e.dataPointIndex;if(!Array.isArray(a)||"number"!=typeof r||r<0)return String(t);const o=a[r],n=a[r+1];if(void 0===o||void 0===n)return String(t);const l=t=>Number.isInteger(t)?String(t):t.toFixed(2);return`${l(o)} to ${l(n)}`}}}})}candlestick(){return{stroke:{width:1},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:Y(({seriesIndex:t,dataPointIndex:e,w:i})=>this._getBoxTooltip(i,t,e,["Open","High","","Low","Close"],"candlestick"))},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}boxPlot(){return{stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:Y(({seriesIndex:t,dataPointIndex:e,w:i})=>this._getBoxTooltip(i,t,e,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot"))},markers:{size:7,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}violin(){return{chart:{zoom:{enabled:!1},animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},fill:{opacity:.7},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:Y(({seriesIndex:t,dataPointIndex:e,w:i})=>this._getViolinTooltip(i,t,e))},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}raincloud(){var t,e,i;const s=this.violin(),a=!0===(null==(i=null==(e=null==(t=this.opts)?void 0:t.plotOptions)?void 0:e.bar)?void 0:i.horizontal);return c(l({},s),{plotOptions:{violin:{side:a?"top":"right",box:{show:!0,whiskers:"tukey"},points:{position:a?"bottom":"left",jitter:.85}}},tooltip:c(l({},s.tooltip),{custom:Y(({seriesIndex:t,dataPointIndex:e,w:i})=>this._getRaincloudTooltip(i,t,e))})})}rangeBar(){return{chart:{animations:{animateGradually:{enabled:!1}}},stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter(t,{seriesIndex:e,dataPointIndex:i,w:s}){const a=()=>{const t=s.rangeData.seriesRangeStart[e][i];return s.rangeData.seriesRangeEnd[e][i]-t};return s.globals.comboCharts?"rangeBar"===s.config.series[e].type||"rangeArea"===s.config.series[e].type?a():t:a()},background:{enabled:!1},style:{colors:["#fff"]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom:Y(t=>t.w.config.plotOptions&&t.w.config.plotOptions.bar&&t.w.config.plotOptions.bar.horizontal?(t=>{const{color:e,seriesName:i,ylabel:s,startVal:a,endVal:r}=K(c(l({},t),{isTimeline:!0}));return J(c(l({},t),{color:e,seriesName:i,ylabel:s,start:a,end:r}))})(t):(t=>{const{color:e,seriesName:i,ylabel:s,start:a,end:r}=K(t);return J(c(l({},t),{color:e,seriesName:i,ylabel:s,start:a,end:r}))})(t))},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}dumbbell(){const t=this.rangeBar(),e=(t,e,i)=>'<div class="apexcharts-tooltip-dumbbell-endpoint"><span class="series-name" style="color: '+e+'">'+t+'</span> <span class="value">'+i+"</span></div>";return c(l({},t),{chart:{stacked:!1,zoom:{enabled:!1}},plotOptions:c(l({},t.plotOptions),{bar:c(l({},t.plotOptions.bar),{barHeight:6,columnWidth:6,isDumbbell:!0,dumbbell:{dataLabels:{enabled:!0}}})}),dataLabels:c(l({},t.dataLabels),{enabled:!1}),legend:{show:!0,position:"bottom",horizontalAlign:"left",markers:{shape:"circle"}},tooltip:{shared:!1,intersect:!0,followCursor:!1,custom:Y(t=>{var i;const{w:s,dataPointIndex:a,seriesIndex:r}=t,o=s.dumbbellData;if(!o||"series"!==o.form){const{color:e,seriesName:i,ylabel:s,start:a,end:r}=K(t);return J(c(l({},t),{color:e,seriesName:i,ylabel:s,start:a,end:r}))}const n=o.values[a]||[],h=s.globals.tooltip.tooltipLabels.getFormatters(r),d=null!=(i=s.labelData.labels[a])?i:"";let p="";const u=[];for(let t=0;t<n.length;t++)null!==n[t]&&-1===o.hidden.indexOf(t)&&(u.push(n[t]),p+=e(o.names[t],s.globals.colors[t],h.yLbFormatter(n[t])));return'<div class="apexcharts-tooltip-rangebar apexcharts-tooltip-dumbbell"><div><span class="category">'+d+"</span></div>"+p+(2===u.length?'<div class="apexcharts-tooltip-dumbbell-gap"><span class="category">'+s.config.plotOptions.bar.dumbbell.tooltip.differenceLabel+': </span><span class="value">'+h.yLbFormatter(Math.abs(u[1]-u[0]))+"</span></div>":"")+"</div>"})}})}dumbbellSizing(t){var e,i;return(null==(e=t.plotOptions.bar)?void 0:e.barHeight)||(t.plotOptions.bar.barHeight=2),(null==(i=t.plotOptions.bar)?void 0:i.columnWidth)||(t.plotOptions.bar.columnWidth=2),t}area(){return{stroke:{width:4,fill:{type:"solid",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}}},fill:{type:"gradient",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}rangeArea(){return{stroke:{curve:"straight",width:0},fill:{type:"solid",opacity:.6},markers:{size:0},states:{hover:{filter:{type:"none"}},active:{filter:{type:"none"}}},tooltip:{intersect:!1,shared:!0,followCursor:!0,custom:Y(t=>(t=>{const{color:e,seriesName:i,ylabel:s,start:a,end:r}=K(t);return J(c(l({},t),{color:e,seriesName:i,ylabel:s,start:a,end:r}))})(t))}}}streamgraph(){const t=this.rangeArea();return c(l({},t),{chart:{stacked:!1},stroke:{curve:"monotoneCubic",width:0},fill:{type:"solid",opacity:1},dataLabels:{enabled:!1},grid:{yaxis:{lines:{show:!1}}},markers:{size:0,hover:{size:0,sizeOffset:0}},tooltip:{intersect:!1,shared:!1,followCursor:!0,custom:Y(t=>(t=>{var e;const{w:i,dataPointIndex:s,seriesIndex:a}=t,r=i.streamgraphData;if(!r||!Array.isArray(r.order)){const{color:e,seriesName:i,ylabel:s,start:a,end:r}=K(t);return J(c(l({},t),{color:e,seriesName:i,ylabel:s,start:a,end:r}))}const{ylabel:o}=K(t),n=(()=>{const t=i.streamgraphData,e=i.dom.baseEl&&i.dom.baseEl.querySelector(".apexcharts-svg"),r=i.interact&&i.interact.clientY,o=i.globals.maxY-i.globals.minY;if(!e||null==r||!o||!isFinite(o))return a;const n=e.getBoundingClientRect(),l=i.globals.svgWidth?n.width/i.globals.svgWidth:1,c=(r-n.top)/(l||1)-i.layout.translateY,h=i.layout.gridHeight,d=t=>{var e;const s=(t-i.globals.minY)/o;return(null==(e=i.config.yaxis[0])?void 0:e.reversed)?s*h:h-s*h};let p=a,u=1/0;for(let e=0;e<t.order.length;e++){const i=t.order[e],a=t.lows[i]&&t.lows[i][s],r=t.highs[i]&&t.highs[i][s];if(null==a||null==r)continue;const o=d(r),n=d(a),l=Math.min(o,n),h=Math.max(o,n);if(c>=l&&c<=h)return i;const g=c<l?l-c:c-h;g<u&&(u=g,p=i)}return p})(),h=void 0!==i.formatters.ttVal,d=(t,e)=>{if(h){const s=i.globals.tooltip.tooltipLabels.getFormatters(t);if("function"==typeof s.yLbFormatter)return s.yLbFormatter(e)}return Number.isInteger(e)?String(e):String(Number(e.toFixed(6)))};let p="",u=0;for(let t=r.order.length-1;t>=0;t--){const a=r.order[t],o=null==(e=r.values[a])?void 0:e[s];null!=o&&isFinite(o)&&(u+=o,p+='<div class="apexcharts-tooltip-stream-band'+(a===n?" apexcharts-active":"")+'"><span class="apexcharts-tooltip-marker" style="background-color: '+i.globals.colors[a]+'"></span><span class="series-name">'+r.names[a]+'</span> <span class="value">'+d(a,o)+"</span></div>")}return'<div class="apexcharts-tooltip-stream"><div class="apexcharts-tooltip-title">'+o+"</div>"+p+("expand"===r.offset?"":'<div class="apexcharts-tooltip-stream-total"><span class="series-name">Total</span> <span class="value">'+d(a,u)+"</span></div>")+"</div>"})(t))},legend:{show:!0,position:"top",horizontalAlign:"center"}})}brush(t){return S.extend(t,{chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}stacked100(t){if(t.dataLabels=t.dataLabels||{},t.yaxis.forEach((e,i)=>{t.yaxis[i].min=0,t.yaxis[i].max=100}),t.dataLabels.formatter)return t;const e=t.chart.type,i=(t.series||[]).some(t=>t.type?"bar"===t.type||"column"===t.type:"bar"===e||"column"===e),s=(t,e)=>{var s,a,r;const o=null==(r=null==(a=null==(s=null==e?void 0:e.w)?void 0:s.globals)?void 0:a.columnSeries)?void 0:r.i;return(o?o.includes(null==e?void 0:e.seriesIndex):i)?(t=>"number"==typeof t&&t?t.toFixed(0)+"%":t)(t):(t=>null!==t?t:"")(t)};return s[H]=!0,t.dataLabels.formatter=s,t}static catToNumeric(t,e,i){var s,a,r,o,n,l,c,h;const d=("bar"===t||"boxPlot"===t||"violin"===t)&&(null==(a=null==(s=e.plotOptions)?void 0:s.bar)?void 0:a.horizontal),p=O.includes(t),u=null!=(o=e.xaxis.type)?o:null==(r=i.xaxis)?void 0:r.type,g=("scatter"===t||"bubble"===t)&&(null==(c=null==(l=null==(n=e.plotOptions)?void 0:n.scatter)?void 0:l.jitter)?void 0:c.enabled),x=e.xaxis.tickPlacement||(null==(h=i.xaxis)?void 0:h.tickPlacement);return!d&&!p&&!g&&"datetime"!==u&&"numeric"!==u&&"between"!==x}static syncCatToNumeric(t,e){var i,s,a,r;const o=t.xaxis,n=!!o.convertedCatToNumeric;let h=null==(i=null==e?void 0:e.xaxis)?void 0:i.type;n&&"numeric"===h&&(h=void 0);const d=Q.forType(t),p=Q.catToNumeric(t.chart.type,c(l({},t),{xaxis:c(l({},o),{type:n?h:o.type})}),d);if(p===n)return;if(o.convertedCatToNumeric=p,p)return;const u=o.labels.formatter,g=(null==u?void 0:u.baseFormatter)||u;o.labels.formatter=g===$?void 0:g,(null==u?void 0:u.categoryNames)&&!(null==(s=o.categories)?void 0:s.length)&&(o.categories=u.categoryNames),o.type=h||(null==(a=d.xaxis)?void 0:a.type)||"category","dataPoints"!==o.tickAmount||(null==(r=null==e?void 0:e.xaxis)?void 0:r.tickAmount)||(o.tickAmount=void 0)}convertCatToNumericXaxis(t,e){t.xaxis.type="numeric",t.xaxis.labels=t.xaxis.labels||{},t.xaxis.labels.formatter=t.xaxis.labels.formatter||$;const i=t.xaxis.labels.formatter,s=i.baseFormatter||i;let a=t.xaxis.categories&&t.xaxis.categories.length?t.xaxis.categories:t.labels;if(e&&e.length&&(a=e.map(t=>Array.isArray(t)?t:String(t))),a&&a.length){const e=a,i=function(t){if(!S.isNumber(t))return s(t);const i=e[Math.floor(t)-1];return void 0===i?"":s(i)};i.categoryNames=e,i.baseFormatter=s,t.xaxis.labels.formatter=i}return t.xaxis.categories=[],t.labels=[],t.xaxis.tickAmount=t.xaxis.tickAmount||"dataPoints",t}bubble(){return{dataLabels:{style:{colors:["#fff"]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:"solid",gradient:{shade:"light",inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}scatter(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}heatmap(){return{chart:{stacked:!1,zoom:{enabled:!1}},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!1,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square"}},grid:{padding:{right:20}}}}treemap(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:["#fff"]}},stroke:{show:!0,width:2,colors:["#fff"]},legend:{show:!1},fill:{opacity:1,gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{show:!1,padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1},axisTicks:{show:!1}}}}unit(){return{chart:{toolbar:{show:!1}},dataLabels:{enabled:!1},stroke:{show:!1,width:0},fill:{opacity:1},tooltip:{followCursor:!0,x:{show:!1}},legend:{show:!0,position:"bottom"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}icicle(){return{chart:{toolbar:{show:!1}},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},fill:{opacity:1},legend:{show:!1,position:"bottom"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}sunburst(){return{chart:{toolbar:{show:!1}},dataLabels:{style:{colors:["#fff"]},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}pie(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:G,style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}donut(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:G,style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}polarArea(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:G,enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}radar(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:"11px"}},stroke:{width:2},markers:{size:5,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},xaxis:{labels:{formatter:t=>t,style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}radialBar(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},stroke:{lineCap:"butt"},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}_getBoxTooltip(t,e,i,s,a){const r=t.candleData.seriesCandleO[e][i],o=t.candleData.seriesCandleH[e][i],n=t.candleData.seriesCandleM[e][i],l=t.candleData.seriesCandleL[e][i],c=t.candleData.seriesCandleC[e][i],h=t.config.series[e];return h.type&&h.type!==a?`<div class="apexcharts-custom-tooltip">\n ${h.name?h.name:"series-"+(e+1)}: <strong>${t.seriesData.series[e][i]}</strong>\n </div>`:`<div class="apexcharts-tooltip-box apexcharts-tooltip-${t.config.chart.type}"><div>${s[0]}: <span class="value">`+r+`</span></div><div>${s[1]}: <span class="value">`+o+"</span></div>"+(s[2]&&null!=n&&!Number.isNaN(n)?`<div>${s[2]}:<span class="value">`+n+"</span></div>":"")+`<div>${s[3]}: <span class="value">`+l+`</span></div><div>${s[4]}: <span class="value">`+c+"</span></div></div>"}_getViolinTooltip(t,e,i){var s,a,r;const o=null==(s=t.violinData.seriesViolinMin[e])?void 0:s[i],n=null==(a=t.violinData.seriesViolinMax[e])?void 0:a[i],l=(null==(r=t.violinData.seriesViolinPoints[e])?void 0:r[i])||[],c=t.config.series[e].name||"series-"+(e+1);return`<div class="apexcharts-tooltip-box apexcharts-tooltip-${t.config.chart.type}"><div class="apexcharts-tooltip-violin-name">${c}</div><div>Min: <span class="value">${o}</span></div><div>Max: <span class="value">${n}</span></div><div>Observations: <span class="value">${l.length}</span></div></div>`}_getRaincloudTooltip(t,e,i){var s,a;const r=null==(s=t.violinData.seriesViolinSummary[e])?void 0:s[i];if(!r)return this._getViolinTooltip(t,e,i);const o=(null==(a=t.violinData.seriesViolinPoints[e])?void 0:a[i])||[],n=t.config.series[e].name||"series-"+(e+1),l=t=>{if(!isFinite(t))return String(t);const e=Math.round(t);return Math.abs(t-e)<1e-6?String(e):String(Number(t.toFixed(2)))},[c,h,d,p,u]=r;return`<div class="apexcharts-tooltip-box apexcharts-tooltip-${t.config.chart.type}"><div class="apexcharts-tooltip-violin-name">${n}</div><div>Whisker high: <span class="value">${l(u)}</span></div><div>Q3: <span class="value">${l(p)}</span></div><div>Median: <span class="value">${l(d)}</span></div><div>Q1: <span class="value">${l(h)}</span></div><div>Whisker low: <span class="value">${l(c)}</span></div><div>Observations: <span class="value">${o.length}</span></div></div>`}}const tt="__apexcharts_registry__",et="__apexcharts_custom_types__";globalThis[tt]||(globalThis[tt]={});const it="__apexcharts_missing_types__";function st(){return globalThis[tt]}function at(){return globalThis[et]}function rt(t){return at().has(t)}function ot(t){return!!st()[t]}function nt(t){Object.assign(st(),t)}function lt(t,e){const i=st()[t];if(!i){const i=t=>E[t]||t,s=e&&F[e]&&i(F[e])===i(t)?e:void 0,a=s||t,r=s?L[s]:void 0,o=r?s:i(t),n=(r?[`${i(t)}.js`,`features/${r}.js`]:[`${i(t)}.js`]).map(t=>`<script src=".../dist/${t}">`).join(" and "),l=D.includes(t)||!!r&&"stats"!==r,c=`ApexCharts: chart type "${a}" is not registered`+(a!==t?` (it draws through "${t}")`:"")+`. Bundler: import 'apexcharts/${o}'`+(l?" (or import ApexCharts from 'apexcharts/full')":"")+`. Script tag: add ${n} after the ApexCharts script`+(l?", or load apexcharts.full.min.js instead, which has every type. This type is not in the default apexcharts.min.js.":", or load the default apexcharts.min.js instead."),h=globalThis[it];throw h.has(a)||(h.add(a),globalThis.console.error(c)),new Error(c)}return i}globalThis[et]||(globalThis[et]=new Set),globalThis[it]||(globalThis[it]=new Set);const ct=class t{constructor(t){this.opts=t}init({responsiveOverride:e}){var i,s,a,r,o,n,c,h;let d=(new _).init(),u=l({},t.dropEmptyOptions(this.opts,d));["chart","xaxis","yaxis","theme","tooltip","dataLabels","annotations","plotOptions"].forEach(t=>{(S.isObject(u[t])||"chart"===t)&&(u[t]=l({},u[t]))}),u.plotOptions&&(u.plotOptions.bar=l({},u.plotOptions.bar));const g=new Q(u);u.chart.type||(u.chart.type="line"),u=this.normalizeAliasedChartType(u),e||t.warnUnknownOptionKeys(this.opts,Object.keys(d)),this.chartType=u.chart.type,u=this.extendYAxis(u),u=this.extendAnnotations(u);let x={};if(u&&"object"==typeof u){let t=Q.forType(u);(null==(i=u.chart.brush)?void 0:i.enabled)&&(t=g.brush(t)),(null==(a=null==(s=u.plotOptions)?void 0:s.line)?void 0:a.isSlopeChart)&&(t=g.slope()),u.chart.stacked&&"100%"===u.chart.stackType&&(u=g.stacked100(u)),(null==(o=null==(r=u.plotOptions)?void 0:r.bar)?void 0:o.isDumbbell)&&"dumbbell"!==u.chart.requestedType&&(u=g.dumbbellSizing(u)),this.checkForDarkTheme(p.getApex()),this.checkForDarkTheme(u),u.xaxis=u.xaxis||l({},p.getApex().xaxis),e||(u.xaxis.convertedCatToNumeric=!1),Q.catToNumeric(this.chartType,u,t)&&(u.xaxis.convertedCatToNumeric=!0),((null==(n=u.chart.sparkline)?void 0:n.enabled)||(null==(h=null==(c=p.getApex().chart)?void 0:c.sparkline)?void 0:h.enabled))&&(t=g.sparkline(t)),x=S.extend(d,t)}const f=S.extend(x,p.getApex());return d=S.extend(f,u),t.normalizeAxisBounds(d),Q.reconcile(d),d}normalizeAliasedChartType(e){if(!e||!e.chart)return e;if(void 0!==e.chart.type&&t.assertKnownChartType(e.chart.type),"column"===e.chart.type)return e.chart.type="bar",e;const i=e.chart.type;if(!i||!F[i])return e;if(e.chart.requestedType=i,"waffle"===i)e.chart.type="unit";else if("funnel"===i||"pyramid"===i)e.plotOptions=e.plotOptions||{},e.plotOptions.bar=e.plotOptions.bar||{},e.plotOptions.bar.isFunnel=!0,e.plotOptions.bar.horizontal=!0,e.chart.type="bar",e.plotOptions.bar.isPyramid="pyramid"===i;else if("gauge"===i)e.chart.type="radialBar";else if("waterfall"===i)e.chart.stacked=!1,e.chart.type="rangeBar";else if("dumbbell"===i)e.plotOptions=e.plotOptions||{},e.plotOptions.bar=e.plotOptions.bar||{},null==e.plotOptions.bar.horizontal&&(e.plotOptions.bar.horizontal=!0),e.chart.stacked=!1,e.chart.type="rangeBar";else if("streamgraph"===i){if(e.chart.stacked=!1,e.yaxis=e.yaxis||{},!Array.isArray(e.yaxis)){const t=Q.typeYAxisDefaults(i);for(const i of Object.keys(t))null==e.yaxis[i]&&(e.yaxis[i]=t[i])}e.chart.type="rangeArea"}else e.chart.type="histogram"===i?"bar":"raincloud"===i?"violin":F[i];return e}extendYAxis(t,e){var i;const s=new _,a=(null==(i=t.chart)?void 0:i.type)?t.chart:null==e?void 0:e.config.chart;s.yAxis=S.extend(s.yAxis,Q.typeYAxisDefaults((null==a?void 0:a.requestedType)||(null==a?void 0:a.type))),(void 0===t.yaxis||!t.yaxis||Array.isArray(t.yaxis)&&0===t.yaxis.length)&&(t.yaxis={});const r=p.getApex();t.yaxis.constructor!==Array&&r.yaxis&&r.yaxis.constructor!==Array&&(t.yaxis=S.extend(r.yaxis,t.yaxis)),t.yaxis.constructor!==Array?t.yaxis=[S.extend(s.yAxis,t.yaxis)]:t.yaxis=S.extendArray(t.yaxis,s.yAxis);let o=!1;t.yaxis.forEach(t=>{t.logarithmic&&(o=!0)});const n=t.series||(null==e?void 0:e.config.series)||[];return o&&n.length!==t.yaxis.length&&n.length&&(t.yaxis=n.map((e,i)=>{if(e.name||(n[i].name=`series-${i+1}`),t.yaxis[i])return t.yaxis[i].seriesName=n[i].name,t.yaxis[i];{const e=S.extend(s.yAxis,t.yaxis[0]);return e.show=!1,e}})),o&&n.length>1&&n.length!==t.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes"),t}extendAnnotations(t){return void 0===t.annotations&&(t.annotations={},t.annotations.yaxis=[],t.annotations.xaxis=[],t.annotations.points=[]),t=this.extendYAxisAnnotations(t),t=this.extendXAxisAnnotations(t),t=this.extendPointAnnotations(t)}extendYAxisAnnotations(t){const e=new _;return t.annotations.yaxis=S.extendArray(void 0!==t.annotations.yaxis?t.annotations.yaxis:[],e.yAxisAnnotation),t}extendXAxisAnnotations(t){const e=new _;return t.annotations.xaxis=S.extendArray(void 0!==t.annotations.xaxis?t.annotations.xaxis:[],e.xAxisAnnotation),t}extendPointAnnotations(t){const e=new _;return t.annotations.points=S.extendArray(void 0!==t.annotations.points?t.annotations.points:[],e.pointAnnotation),t}checkForDarkTheme(t){t.theme&&"dark"===t.theme.mode&&(t.tooltip||(t.tooltip={}),"light"!==t.tooltip.theme&&(t.tooltip.theme="dark"),t.chart.foreColor||(t.chart.foreColor="#f6f7f8"),t.theme.palette||(t.theme.palette="palette4"))}static assertKnownChartType(t){if("string"!=typeof t)throw new Error(`ApexCharts: chart.type must be a string, got ${typeof t}.`);if(R.includes(t)||void 0!==F[t]||rt(t))return;const e=R.concat(Object.keys(F)),i=S.nearestName(t,e);throw new Error(`ApexCharts: unknown chart.type "${t}".`+(i?` Did you mean "${i}"?`:"")+` Known types: ${e.sort().join(", ")}.`)}static _defaultsTree(){return t._defaults||(t._defaults=(new _).init()),t._defaults}static dropEmptyOptions(e,i=t._defaultsTree()){if(!S.isObject(e)||!S.isObject(i))return e;let s=e;const a=(t,i)=>{s===e&&(s=l({},e)),void 0===i?delete s[t]:s[t]=i};for(const s of Object.keys(e)){const r=e[s],o=i[s];if(null==r){S.isObject(o)?a(s,void 0):Array.isArray(o)&&a(s,[]);continue}const n=Array.isArray(o)?o[0]:o;if(Array.isArray(r)&&S.isObject(n)){const e=r.map(e=>t.dropEmptyOptions(e,n));e.some((t,e)=>t!==r[e])&&a(s,e);continue}if(S.isObject(r)&&S.isObject(o)){const e=t.dropEmptyOptions(r,o);e!==r&&a(s,e)}}return s}static warnUnknownOptionKeys(t,e){if(!t||"object"!=typeof t)return;const i=Object.keys(t).filter(t=>!e.includes(t));if(!i.length)return;const s=i.map(t=>{const i=S.nearestName(t,e);return i?`${t} (did you mean "${i}"?)`:t});console.warn(`ApexCharts: unrecognized top-level option${i.length>1?"s":""}: ${s.join(", ")}. ${i.length>1?"They are":"It is"} kept in the config but never read.`)}static _coerceAxisBound(e,i,s,a){if(null!=e){if("number"==typeof e)return Number.isFinite(e)?e:t._rejectBound(e,a);if(i){const i=new C({config:{xaxis:{labels:{datetimeUTC:s}}}}).parseDate(e);return Number.isFinite(i)?i:t._rejectBound(e,a)}if("string"==typeof e&&""!==e.trim()){const t=Number(e);if(Number.isFinite(t))return t}return t._rejectBound(e,a)}}static _rejectBound(t,e){console.warn(`ApexCharts: ${e} cannot be read as a number. got ${"string"==typeof t?`"${t}"`:String(t)}. The bound is ignored and the axis scales to the data.`)}static normalizeAxisBounds(e,i={}){var s,a,r;if(!e||"object"!=typeof e)return e;const o=e.xaxis;if(o){const e="datetime"===(null!=(s=o.type)?s:i.xaxisType),n=null!=(r=null==(a=o.labels)?void 0:a.datetimeUTC)?r:i.datetimeUTC;["min","max"].forEach(i=>{void 0!==o[i]&&(o[i]=t._coerceAxisBound(o[i],e,n,`xaxis.${i}`))})}const n=Array.isArray(e.yaxis)?e.yaxis:e.yaxis?[e.yaxis]:[];return n.forEach((e,i)=>{e&&["min","max"].forEach(s=>{void 0!==e[s]&&"function"!=typeof e[s]&&(e[s]=t._coerceAxisBound(e[s],!1,void 0,`yaxis${n.length>1?`[${i}]`:""}.${s}`))})}),e}};d(ct,"_defaults",null);let ht=ct;const dt=1.618,pt=[1,1,2,5,5,5,10,10,10,10,10],ut=[pt,pt],gt=[1,2,4,4,6,6,6,6,6,6,6,6,6,6,6,6,6,6,12,12,12,12,12,12,12,12,12,24];class xt{initGlobalVars(t){t.series=[],t.seriesCandleO=[],t.seriesCandleH=[],t.seriesCandleM=[],t.seriesCandleL=[],t.seriesCandleC=[],t.seriesRangeStart=[],t.seriesRangeEnd=[],t.seriesRange=[],t.seriesPercent=[],t.seriesGoals=[],t.seriesX=[],t.seriesZ=[],t.seriesNames=[],t.seriesTotals=[],t.seriesLog=[],t.seriesColors=[],t.stackedSeriesTotals=[],t.seriesXvalues=[],t.seriesYvalues=[],t.dataWasParsed=!1,t.maxValsInArrayIndex=0,t.yValueDecimal=0,t.allSeriesHasEqualX=!0,t.hasNullValues=!1,t.invalidLogScale=!1,t.seriesRangeName={},t.themeColors=Object.create(null),t.labels=[],t.hasXaxisGroups=!1,t.groups=[],t.barGroups=[],t.lineGroups=[],t.areaGroups=[],t.hasSeriesGroups=!1,t.seriesGroups=[],t.categoryLabels=[],t.timescaleLabels=[],t.noLabelsProvided=!1,t.isXNumeric=!1,t.dataFormatXNumeric=!1,t.isRangeData=!1,t.isRangeBar=!1,t.skipLastTimelinelabel=!1,t.skipFirstTimelinelabel=!1,t.isDataXYZ=!1,t.isMultiLineX=!1,t.isMultipleYAxis=!1,t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE,t.minYArr=[],t.maxYArr=[],t.maxX=-Number.MAX_VALUE,t.minX=Number.MAX_VALUE,t.initialMaxX=-Number.MAX_VALUE,t.initialMinX=Number.MAX_VALUE,t.maxDate=0,t.minDate=Number.MAX_VALUE,t.minZ=Number.MAX_VALUE,t.maxZ=-Number.MAX_VALUE,t.minXDiff=Number.MAX_VALUE,t.yAxisScale=[],t.xAxisScale=null,t.xAxisTicksPositions=[],t.xRange=0,t.yRange=[],t.zRange=0,t.dataPoints=0,t.xTickAmount=0,t.multiAxisTickAmount=0,t.disableZoomIn=!1,t.disableZoomOut=!1,t.yLabelsCoords=[],t.yTitleCoords=[],t.barPadForNumericAxis=0,t.padHorizontal=0,t.rotateXLabels=!1,t.overlappingXLabels=!1,t.radialSize=0,t.circleGeometry=null,t.pieExternalLabelMarginY=0,t.barHeight=0,t.barWidth=0,t.animationEnded=!1,t.isDestroyed=!1,t.bulkRevealScheduled=!1,t.fadeRevealEls=[],t.morphBatch={pending:0,onDone:null,series:new Map},t.delayedElements=[],t.pointsArray=[],t.barCanvasCoords=null,t.dataLabelsRects=[],t.lastDrawnDataLabelsIndexes=[],t.textRectsCache=new Map,t.domCache=new Map,t.dimensionCache={},t.cachedSelectors={},t.seriesNS||this._attachNamespaces(t)}_attachNamespaces(t){const e=(e,i,s=i)=>{Object.defineProperty(e,s,{get:()=>t[i],set(e){t[i]=e},enumerable:!0,configurable:!0})},i={};e(i,"series","data");for(const t of["seriesNames","seriesX","seriesZ","seriesXvalues","seriesYvalues","seriesGoals","seriesLog","seriesColors","seriesPercent","seriesTotals","stackedSeriesTotals","seriesCandleO","seriesCandleH","seriesCandleM","seriesCandleL","seriesCandleC","seriesRangeStart","seriesRangeEnd","seriesRange","seriesYAxisMap","seriesYAxisReverseMap","seriesGroups","barGroups","lineGroups","areaGroups","collapsedSeries","collapsedSeriesIndices","ancillaryCollapsedSeries","ancillaryCollapsedSeriesIndices","collapsingSeriesIndices","allSeriesCollapsed","risingSeries","previousPaths","ignoreYAxisIndexes","labels","categoryLabels","timescaleLabels","groups"])e(i,t);Object.defineProperty(t,"seriesNS",{value:i,writable:!1,enumerable:!1,configurable:!0});const s={};for(const t of["minX","maxX","initialMinX","initialMaxX","minY","maxY","minYArr","maxYArr","minZ","maxZ","minDate","maxDate","minXDiff","xRange","yRange","zRange","xAxisScale","yAxisScale","xAxisTicksPositions","xTickAmount","multiAxisTickAmount","dataPoints","maxValsInArrayIndex","isXNumeric","isMultipleYAxis","isMultiLineX","isDataXYZ","dataFormatXNumeric","allSeriesHasEqualX","hasNullValues","dataWasParsed","hasXaxisGroups","hasSeriesGroups","skipFirstTimelinelabel","skipLastTimelinelabel","yValueDecimal","invalidLogScale","noLabelsProvided"])e(s,t);Object.defineProperty(t,"axes",{value:s,writable:!1,enumerable:!1,configurable:!0});const a={};for(const t of["svgWidth","svgHeight","gridWidth","gridHeight","translateX","translateY","translateXAxisX","translateXAxisY","translateYAxisX","xAxisLabelsHeight","xAxisGroupLabelsHeight","xAxisLabelsWidth","yAxisLabelsWidth","yAxisWidths","yLabelsCoords","yTitleCoords","padHorizontal","barPadForNumericAxis","rotateXLabels","scaleX","scaleY","radialSize","defaultLabels","overlappingXLabels"])e(a,t);Object.defineProperty(t,"layout",{value:a,writable:!1,enumerable:!1,configurable:!0});const r={};for(const t of["domCache","dimensionCache","cachedSelectors","textRectsCache","pointsArray","dataLabelsRects","lastDrawnDataLabelsIndexes","delayedElements","resizeTimer","selectionResizeTimer","resizeObserver"])e(r,t);Object.defineProperty(t,"cache",{value:r,writable:!1,enumerable:!1,configurable:!0})}globalVars(t){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],fill:{colors:[]},radialNeedleRAF:null,unitGatherRAF:null,unitExitRAF:null,radialNeedleAngle:void 0,radialTickTimer:null,resizeTimer:null,selectionResizeTimer:null,stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:t.markers.size,largestSize:0,batched:!1},LINE_HEIGHT_RATIO:dt,axisCharts:!0,comboCharts:!1,initialConfig:null,initialSeries:[],tokenSurface:void 0,tokenChrome:void 0,namedThemeApplied:void 0,lastXAxis:[],lastYAxis:[],allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],collapsingSeriesIndices:[],risingSeries:[],ignoreYAxisIndexes:[],isDirty:!1,isExecCalled:!1,dataChanged:!1,resized:!1,columnSeries:null,yaxis:null,total:0,shouldAnimate:!0,reducedMotionLatch:null,previousPaths:[],prevPolarAngles:null,prevPolarSizes:null,prevStreamFrame:null,exitLabels:null,riseLabels:null,prevTreemapParents:null,pendingCapture:null,treemapZoom:null,prevTreemapView:null,streamScrolled:!1,prevChromeFrame:null,layoutTween:null,chromeTweens:null,prevCircleFrame:null,circleTween:null,svgWidth:0,svgHeight:0,lastResizeSignature:null,defaultLabels:!1,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateYAxisX:[],yAxisWidths:[],tooltip:null,resizeObserver:null,activeRenderer:null,locale:{},memory:{methodsToExec:[]},niceScaleAllowedMagMsd:ut,niceScaleDefaultTicks:gt,seriesYAxisMap:[],seriesYAxisReverseMap:[],noData:!1}}defineLazyInitialSeries(t){let e=[],i=null;Object.defineProperty(t,"initialSeries",{configurable:!0,enumerable:!0,get:()=>(null===i&&(i=S.clone(e)),i),set(s){e=S.copySeriesShallow(s),i=null,t._initialSeriesPeek=e}}),t._initialSeriesPeek=e}init(t){const e=this.globalVars(t);this.initGlobalVars(e),this.defineLazyInitialSeries(e);const i=S.extend({},t);return i.series=S.copySeriesShallow(t.series),e.initialConfig=i,e.initialSeries=t.series,e.lastXAxis=S.clone(e.initialConfig.xaxis),e.lastYAxis=S.clone(e.initialConfig.yaxis),e}}class ft{constructor(t){this.opts=t}init(){const t=new ht(this.opts).init({responsiveOverride:!1}),e=(new xt).init(t),i={config:t,globals:e,dom:{},interact:{zoomEnabled:"zoom"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.zoom&&t.chart.zoom.enabled,panEnabled:"pan"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.pan,selectionEnabled:"selection"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.selection,measureEnabled:"measure"===t.chart.toolbar.autoSelected&&!!t.chart.toolbar.tools.measure&&!(!t.chart.measure||!t.chart.measure.enabled),zoomed:!1,selection:void 0,visibleXRange:void 0,selectedDataPoints:[],mousedown:!1,clientX:null,clientY:null,lastClientPosition:{},capturedSeriesIndex:-1,capturedDataPointIndex:-1,disableZoomIn:!1,disableZoomOut:!1,isTouchDevice:!!p.isBrowser()&&("ontouchstart"in window||navigator.maxTouchPoints>0)},formatters:{xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,legendFormatter:void 0},candleData:{seriesCandleO:[],seriesCandleH:[],seriesCandleM:[],seriesCandleL:[],seriesCandleC:[],seriesBoxPoints:[]},rangeData:{seriesRangeStart:[],seriesRangeEnd:[],seriesRange:[]},violinData:{seriesViolinDensity:[],seriesViolinPoints:[],seriesViolinSummary:[],seriesViolinMin:[],seriesViolinMax:[]},histogramData:{edges:[],binWidth:0,counts:[],rule:"",capped:!1},seriesObservations:null,waterfallData:{values:[],cumulative:[],kinds:[],geometry:null},dumbbellData:null,highlightData:null,streamgraphData:null,labelData:{labels:[],categoryLabels:[],timescaleLabels:[],hasXaxisGroups:!1,groups:[],seriesGroups:[],seriesGroupIndex:[]},axisFlags:{isXNumeric:!1,dataFormatXNumeric:!1,isDataXYZ:!1,isRangeData:!1,isRangeBar:!1,isMultiLineX:!1,noLabelsProvided:!1,dataWasParsed:!1},seriesData:{series:[],seriesNames:[],seriesX:[],seriesZ:[],seriesColors:[],seriesGoals:[],stackedSeriesTotals:[],stackedSeriesTotalsByGroups:[],unitData:[]},layout:{gridHeight:0,gridWidth:0,translateX:0,translateY:0,translateXAxisX:0,translateXAxisY:0,rotateXLabels:!1,xAxisHeight:0,xAxisLabelsHeight:0,xAxisGroupLabelsHeight:0,xAxisLabelsWidth:0,yLabelsCoords:[],yTitleCoords:[],gridPad:{top:0,right:0,bottom:0,left:0}}};Object.defineProperty(e,"dom",{get:()=>i.dom,set(t){i.dom=t},enumerable:!1,configurable:!0});for(const t of["xLabelFormatter","yLabelFormatters","xaxisTooltipFormatter","ttKeyFormatter","ttVal","ttZFormatter","legendFormatter"])Object.defineProperty(e,t,{get:()=>i.formatters[t],set(e){i.formatters[t]=e},enumerable:!1,configurable:!0});for(const t of["zoomEnabled","panEnabled","selectionEnabled","zoomed","selection","visibleXRange","selectedDataPoints","mousedown","clientX","clientY","lastClientPosition","capturedSeriesIndex","capturedDataPointIndex","disableZoomIn","disableZoomOut","isTouchDevice"])Object.defineProperty(e,t,{get:()=>i.interact[t],set(e){i.interact[t]=e},enumerable:!1,configurable:!0});for(const t of["gridHeight","gridWidth","translateX","translateY","translateXAxisX","translateXAxisY","rotateXLabels","xAxisHeight","xAxisLabelsHeight","xAxisGroupLabelsHeight","xAxisLabelsWidth","yLabelsCoords","yTitleCoords","gridPad"])Object.defineProperty(e,t,{get:()=>i.layout[t],set(e){i.layout[t]=e},enumerable:!1,configurable:!0});for(const t of["series","seriesNames","seriesX","seriesZ","seriesColors","seriesGoals","stackedSeriesTotals","stackedSeriesTotalsByGroups"])Object.defineProperty(e,t,{get:()=>i.seriesData[t],set(e){i.seriesData[t]=e},enumerable:!1,configurable:!0});for(const t of["isXNumeric","dataFormatXNumeric","isDataXYZ","isRangeData","isRangeBar","isMultiLineX","noLabelsProvided","dataWasParsed"])Object.defineProperty(e,t,{get:()=>i.axisFlags[t],set(e){i.axisFlags[t]=e},enumerable:!1,configurable:!0});for(const t of["labels","categoryLabels","timescaleLabels","hasXaxisGroups","groups","seriesGroups"])Object.defineProperty(e,t,{get:()=>i.labelData[t],set(e){i.labelData[t]=e},enumerable:!1,configurable:!0});for(const t of["seriesRangeStart","seriesRangeEnd","seriesRange"])Object.defineProperty(e,t,{get:()=>i.rangeData[t],set(e){i.rangeData[t]=e},enumerable:!1,configurable:!0});for(const t of["seriesCandleO","seriesCandleH","seriesCandleM","seriesCandleL","seriesCandleC"])Object.defineProperty(e,t,{get:()=>i.candleData[t],set(e){i.candleData[t]=e},enumerable:!1,configurable:!0});for(const t of["seriesViolinDensity","seriesViolinPoints","seriesViolinMin","seriesViolinMax"])Object.defineProperty(e,t,{get:()=>i.violinData[t],set(e){i.violinData[t]=e},enumerable:!1,configurable:!0});return i}}class mt{constructor(t){this.w=t}static checkComboSeries(t,e){let i=!1,s=0,a=0;return void 0===e&&(e="line"),t.length&&void 0!==t[0].type&&t.forEach(t=>{"bar"!==t.type&&"column"!==t.type&&"candlestick"!==t.type&&"boxPlot"!==t.type&&"violin"!==t.type||s++,void 0!==t.type&&t.type!==e&&a++}),a>0&&(i=!0),{comboBarCount:s,comboCharts:i}}getStackedSeriesTotals(t=[]){const e=this.w,i=[];if(0===e.seriesData.series.length)return i;for(let s=0;s<e.seriesData.series[e.globals.maxValsInArrayIndex].length;s++){let a=0;for(let i=0;i<e.seriesData.series.length;i++)void 0!==e.seriesData.series[i][s]&&-1===t.indexOf(i)&&(a+=e.seriesData.series[i][s]);i.push(a)}return i}getSeriesTotalByIndex(t=null){if(null===t)return this.w.config.series.reduce((t,e)=>t+e,0);{const e=this.w.seriesData.series[t];return Array.isArray(e)?e.reduce((t,e)=>t+e,0):null!=e?e:0}}getStackedSeriesTotalsByGroups(){const t=this.w,e=[];return t.labelData.seriesGroups.forEach((i,s)=>{e.push(this.getStackedSeriesTotals(t.seriesData.series.map((t,e)=>e).filter(e=>t.labelData.seriesGroupIndex[e]!==s)))}),e}setSeriesYAxisMappings(){const t=this.w.globals,e=this.w.config;let i=[];const s=[],a=[],r=e.series.length>e.yaxis.length||e.yaxis.some(t=>Array.isArray(t.seriesName));e.series.forEach((t,e)=>{a.push(e),s.push(null)}),e.yaxis.forEach((t,e)=>{i[e]=[]});const o=[];e.yaxis.forEach((t,s)=>{let n=!1;if(t.seriesName){let o=[];Array.isArray(t.seriesName)?o=t.seriesName:o.push(t.seriesName),o.forEach(t=>{e.series.forEach((e,o)=>{if(e.name===t){let t=o;s===o||r?!r||a.indexOf(o)>-1?i[s].push([s,o]):console.warn("Series '"+e.name+"' referenced more than once in what looks like the new style. That is, when using either seriesName: [], or when there are more series than yaxes."):(i[o].push([o,s]),t=s),n=!0,t=a.indexOf(t),-1!==t&&a.splice(t,1)}})})}n||o.push(s)}),i=i.map(t=>{const e=[];return t.forEach(t=>{s[t[1]]=t[0],e.push(t[1])}),e});let n=e.yaxis.length-1;for(let t=0;t<o.length&&(n=o[t],i[n]=[],a);t++){const t=a[0];a.shift(),i[n].push(t),s[t]=n}a.forEach(t=>{i[n].push(t),s[t]=n}),t.seriesYAxisMap=i.map(t=>t),t.seriesYAxisReverseMap=s.map(t=>t)}isSeriesNull(t=null){let e=[];if(null===t){e=this.w.config.series.filter(t=>null!==t)}else{const i=this.w.seriesData.series[t];e=Array.isArray(i)?i.filter(t=>null!==t):null!=i?[i]:[]}return 0===e.length}seriesHaveSameValues(t){const e=this.w.seriesData.series[t];return!Array.isArray(e)||e.every((t,e,i)=>t===i[0])}getCategoryLabels(t){const e=this.w;let i=t.slice();return e.config.xaxis.convertedCatToNumeric&&(i=t.map(t=>e.config.xaxis.labels.formatter(t-e.globals.minX+1))),i}getLargestSeries(){const t=this.w;t.globals.maxValsInArrayIndex=t.seriesData.series.map(t=>t.length).indexOf(Math.max.apply(Math,t.seriesData.series.map(t=>t.length)))}getLargestMarkerSize(){const t=this.w;let e=0;return t.globals.markers.size.forEach(t=>{e=Math.max(e,t)}),t.config.markers.discrete&&t.config.markers.discrete.length&&t.config.markers.discrete.forEach(t=>{e=Math.max(e,t.size||0)}),e>0&&(t.config.markers.hover.size>0?e=t.config.markers.hover.size:e+=t.config.markers.hover.sizeOffset),t.globals.markers.largestSize=e,e}getSeriesTotals(){const t=this.w;t.globals.seriesTotals=t.seriesData.series.map(t=>{let e=0;if(Array.isArray(t))for(let i=0;i<t.length;i++)e+=t[i];else e+=t;return e})}getSeriesTotalsXRange(t,e){const i=this.w;return i.seriesData.series.map((s,a)=>{let r=0;for(let o=0;o<s.length;o++)i.seriesData.seriesX[a][o]>t&&i.seriesData.seriesX[a][o]<e&&(r+=s[o]);return r})}getPercentSeries(){const t=this.w,e=t.config.chart.type,i=t=>t.type?"bar"===t.type||"column"===t.type:"bar"===e||"column"===e,s=t.config.series.some(i)?t.config.series.map((t,e)=>i(t)?-1:e).filter(t=>-1!==t):[],a=s.length?this.getStackedSeriesTotals(s):t.seriesData.stackedSeriesTotals,r=t.axisFlags.isXNumeric&&t.seriesData.seriesX,o=t.labelData.seriesGroupIndex,n=r||t.labelData.seriesGroups.length>1,l=(t,e)=>o[t]+" "+(r?r[t][e]:e),c=new Map;n&&t.seriesData.series.forEach((t,e)=>{s.indexOf(e)<0&&t.forEach((t,i)=>c.set(l(e,i),(c.get(l(e,i))||0)+t))}),t.globals.seriesPercent=t.seriesData.series.map((e,i)=>{const s=[];if(Array.isArray(e))for(let t=0;t<e.length;t++){const r=n?c.get(l(i,t)):a[t];let o=0;r&&(o=100*e[t]/r),s.push(o)}else{const i=100*e/t.globals.seriesTotals.reduce((t,e)=>t+e,0);s.push(i)}return s})}getCalculatedRatios(){const t=this.w,e=t.globals,i=[];let s=0,a=0,r=0,o=0,n=[],l=.1,c=0;if(e.yRange=[],e.isMultipleYAxis)for(let t=0;t<e.minYArr.length;t++)e.yRange.push(Math.abs(e.minYArr[t]-e.maxYArr[t])),n.push(0);else e.yRange.push(Math.abs(e.minY-e.maxY));e.xRange=Math.abs(e.maxX-e.minX),e.zRange=Math.abs(e.maxZ-e.minZ);for(let t=0;t<e.yRange.length;t++)i.push(e.yRange[t]/this.w.layout.gridHeight);a=e.xRange/this.w.layout.gridWidth,s=e.yRange[0]/this.w.layout.gridWidth,r=e.xRange/this.w.layout.gridHeight,o=e.zRange/this.w.layout.gridHeight*16,o||(o=1);if(e.hasNegs=e.minY!==Number.MIN_VALUE&&0!==Math.abs(e.minY),t.globals.seriesYAxisReverseMap.length>0){const r=(e,s)=>{const a=t.config.yaxis[t.globals.seriesYAxisReverseMap[s]];if(!a)return 0;if(a.logarithmic)return 0;return-(e<0?-1:1)*(e=Math.abs(e))/i[s]};if(e.isMultipleYAxis){n=[];for(let t=0;t<i.length;t++)n.push(r(e.minYArr[t],t))}else n=[],n.push(r(e.minY,0)),e.minY!==Number.MIN_VALUE&&0!==Math.abs(e.minY)&&(l=-e.minY/s,c=e.minX/a)}else n=[],n.push(0),l=0,c=0;return{yRatio:i,invertedYRatio:s,zRatio:o,xRatio:a,invertedXRatio:r,baseLineInvertedY:l,baseLineY:n,baseLineX:c}}getLogSeries(t,e){const i=this.w;return i.globals.seriesLog=t.map((t,s)=>{e&&(s=e[s]);const a=i.globals.seriesYAxisReverseMap[s];return i.config.yaxis[a]&&i.config.yaxis[a].logarithmic?t.map(t=>null===t?null:this.getLogVal(i.config.yaxis[a].logBase,t,s)):t}),i.globals.invalidLogScale?t:i.globals.seriesLog}getLogValAtSeriesIndex(t,e){if(null===t)return null;const i=this.w,s=i.globals.seriesYAxisReverseMap[e];return i.config.yaxis[s]&&i.config.yaxis[s].logarithmic?this.getLogVal(i.config.yaxis[s].logBase,t,e):t}getBaseLog(t,e){return Math.log(e)/Math.log(t)}getLogVal(t,e,i){if(e<=0)return 0;const s=this.w,a=0===s.globals.minYArr[i]?-1:this.getBaseLog(t,s.globals.minYArr[i]),r=(0===s.globals.maxYArr[i]?0:this.getBaseLog(t,s.globals.maxYArr[i]))-a;return(this.getBaseLog(t,e)-a)/r}getLogYRatios(t){const e=this.w,i=this.w.globals,s=i;return s.yLogRatio=t.slice(),s.logYRange=i.yRange.map((t,a)=>{const r=e.globals.seriesYAxisReverseMap[a];if(e.config.yaxis[r]&&this.w.config.yaxis[r].logarithmic){const t=1;return s.yLogRatio[a]=t/this.w.layout.gridHeight,t}return i.yRange[a]}),s.invalidLogScale?t.slice():s.yLogRatio}static extendArrayProps(t,e,i){var s,a;return(null==e?void 0:e.yaxis)&&(e=t.extendYAxis(e,i)),(null==e?void 0:e.annotations)&&(e.annotations.yaxis&&(e=t.extendYAxisAnnotations(e)),(null==(s=null==e?void 0:e.annotations)?void 0:s.xaxis)&&(e=t.extendXAxisAnnotations(e)),(null==(a=null==e?void 0:e.annotations)?void 0:a.points)&&(e=t.extendPointAnnotations(e))),e}drawSeriesByGroup(t,e,i,s){const a=this.w,r=[];return t.series.length>0&&e.forEach(e=>{const o=[],n=[];t.i.forEach((i,s)=>{a.labelData.seriesGroupIndex[i]===e&&(o.push(t.series[s]),n.push(i))}),o.length>0&&r.push(s.draw(o,i,n))}),r}}const bt="http://www.w3.org/2000/svg";class yt{constructor(t,e){"object"==typeof t?(this.x=t.x,this.y=t.y):(this.x=t||0,this.y=e||0)}transform(t){return t.apply(this)}clone(){return new yt(this.x,this.y)}}class vt{constructor(t,e,i,s,a,r){this.a=null!=t?t:1,this.b=null!=e?e:0,this.c=null!=i?i:0,this.d=null!=s?s:1,this.e=null!=a?a:0,this.f=null!=r?r:0}rotate(t){const e=t*Math.PI/180,i=Math.cos(e),s=Math.sin(e);return this.multiply(new vt(i,s,-s,i,0,0))}scale(t,e){return this.multiply(new vt(t,0,0,null!=e?e:t,0,0))}multiply(t){return new vt(this.a*t.a+this.c*t.b,this.b*t.a+this.d*t.b,this.a*t.c+this.c*t.d,this.b*t.c+this.d*t.d,this.a*t.e+this.c*t.f+this.e,this.b*t.e+this.d*t.f+this.f)}apply(t){return new yt(this.a*t.x+this.c*t.y+this.e,this.b*t.x+this.d*t.y+this.f)}}class wt{constructor(t,e,i,s){this.x=t,this.y=e,this.w=i,this.h=s,this.width=i,this.height=s,this.x2=t+i,this.y2=e+s}}function At(t){if(!t||"string"!=typeof t)return[["M",0,0]];const e=[],i=/([MmLlHhVvCcSsQqTtAaZz])\s*/g,s=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi;let a;const r=[],o=[];for(;null!==(a=i.exec(t));)r.push(a[1]),o.push(a.index);for(let i=0;i<r.length;i++){const a=o[i]+r[i].length,n=i+1<o.length?o[i+1]:t.length,l=t.substring(a,n),c=[];let h;for(s.lastIndex=0;null!==(h=s.exec(l));)c.push(parseFloat(h[0]));const d=r[i].toUpperCase();if("Z"===d)e.push(["Z"]);else if("M"===d||"L"===d||"T"===d)for(let t=0;t<c.length;t+=2)e.push([d,c[t],c[t+1]]);else if("H"===d)for(let t=0;t<c.length;t++)e.push([d,c[t]]);else if("V"===d)for(let t=0;t<c.length;t++)e.push([d,c[t]]);else if("C"===d)for(let t=0;t<c.length;t+=6)e.push([d,c[t],c[t+1],c[t+2],c[t+3],c[t+4],c[t+5]]);else if("S"===d||"Q"===d)for(let t=0;t<c.length;t+=4)e.push([d,c[t],c[t+1],c[t+2],c[t+3]]);else if("A"===d)for(let t=0;t<c.length;t+=7)e.push([d,c[t],c[t+1],c[t+2],c[t+3],c[t+4],c[t+5],c[t+6]])}return 0===e.length&&e.push(["M",0,0]),e}function St(t){let e=1/0,i=1/0,s=-1/0,a=-1/0;return t.forEach(t=>{for(let r=1;r<t.length;r+=2)if(r+1<=t.length){const o=t[r],n=t[r+1];"number"==typeof o&&"number"==typeof n&&(o<e&&(e=o),o>s&&(s=o),n<i&&(i=n),n>a&&(a=n))}}),e===1/0?{x:0,y:0,width:0,height:0}:{x:e,y:i,width:s-e,height:a-i}}function Ct(t){return t.map(t=>t.join(" ")).join(" ")}function kt(t){switch(t[0]){case"z":case"Z":t[0]="L",t[1]=this.start[0],t[2]=this.start[1];break;case"H":t[0]="L",t[2]=this.pos[1];break;case"V":t[0]="L",t[2]=t[1],t[1]=this.pos[0];break;case"T":t[0]="Q",t[3]=t[1],t[4]=t[2],t[1]=this.reflection[1],t[2]=this.reflection[0];break;case"S":t[0]="C",t[6]=t[4],t[5]=t[3],t[4]=t[2],t[3]=t[1],t[2]=this.reflection[1],t[1]=this.reflection[0]}return t}function Mt(t){var e=t.length;return this.pos=[t[e-2],t[e-1]],-1!="SCQT".indexOf(t[0])&&(this.reflection=[2*this.pos[0]-t[e-4],2*this.pos[1]-t[e-3]]),t}function Tt(t){var e,i=[t];switch(t[0]){case"M":return this.pos=this.start=[t[1],t[2]],i;case"L":t[5]=t[3]=t[1],t[6]=t[4]=t[2],t[1]=this.pos[0],t[2]=this.pos[1];break;case"Q":t[6]=t[4],t[5]=t[3],t[4]=1*t[4]/3+2*t[2]/3,t[3]=1*t[3]/3+2*t[1]/3,t[2]=1*this.pos[1]/3+2*t[2]/3,t[1]=1*this.pos[0]/3+2*t[1]/3;break;case"A":i=function(t,e){var i,s,a,r,o,n,l,c,h,d,p,u,g,x,f,m,b,y,v,w,A,S,C,k,M,T,_=Math.abs(e[1]),D=Math.abs(e[2]),F=e[3]%360,L=e[4],E=e[5],P=e[6],B=e[7],N=new yt(t[0],t[1]),z=new yt(P,B),R=[];if(0===_||0===D||N.x===z.x&&N.y===z.y)return[["C",N.x,N.y,z.x,z.y,z.x,z.y]];i=new yt((N.x-z.x)/2,(N.y-z.y)/2).transform((new vt).rotate(F)),(s=i.x*i.x/(_*_)+i.y*i.y/(D*D))>1&&(_*=s=Math.sqrt(s),D*=s);a=(new vt).rotate(F).scale(1/_,1/D).rotate(-F),N=N.transform(a),z=z.transform(a),r=[z.x-N.x,z.y-N.y],n=r[0]*r[0]+r[1]*r[1],o=Math.sqrt(n),r[0]/=o,r[1]/=o,l=n<4?Math.sqrt(1-n/4):0,L===E&&(l*=-1);c=new yt((z.x+N.x)/2+l*-r[1],(z.y+N.y)/2+l*r[0]),h=new yt(N.x-c.x,N.y-c.y),d=new yt(z.x-c.x,z.y-c.y),p=Math.acos(h.x/Math.sqrt(h.x*h.x+h.y*h.y)),h.y<0&&(p*=-1);u=Math.acos(d.x/Math.sqrt(d.x*d.x+d.y*d.y)),d.y<0&&(u*=-1);E&&p>u&&(u+=2*Math.PI);!E&&p<u&&(u-=2*Math.PI);for(x=Math.ceil(2*Math.abs(p-u)/Math.PI),m=[],b=p,g=(u-p)/x,f=4*Math.tan(g/4)/3,A=0;A<=x;A++)v=Math.cos(b),y=Math.sin(b),w=new yt(c.x+v,c.y+y),m[A]=[new yt(w.x+f*y,w.y-f*v),w,new yt(w.x-f*y,w.y+f*v)],b+=g;for(m[0][0]=m[0][1].clone(),m[m.length-1][2]=m[m.length-1][1].clone(),a=(new vt).rotate(F).scale(_,D).rotate(-F),A=0,S=m.length;A<S;A++)m[A][0]=m[A][0].transform(a),m[A][1]=m[A][1].transform(a),m[A][2]=m[A][2].transform(a);for(A=1,S=m.length;A<S;A++)C=(w=m[A-1][2]).x,k=w.y,M=(w=m[A][0]).x,T=w.y,P=(w=m[A][1]).x,B=w.y,R.push(["C",C,k,M,T,P,B]);return R}(null!=(e=this.pos)?e:[],t),t=i[0]}return t[0]="C",this.pos=[t[5],t[6]],this.reflection=[2*t[5]-t[3],2*t[6]-t[4]],i}function _t(t,e){if(!1===e)return!1;for(var i=e,s=t.length;i<s;++i)if("M"==t[i][0])return i;return!1}function Dt(t,e,i,s,a,r){for(var o=t.slice(e,i||void 0),n=s.slice(a,r||void 0),l=0,c={pos:[0,0],start:[0,0]},h={pos:[0,0],start:[0,0]};o[l]=kt.call(c,o[l]),n[l]=kt.call(h,n[l]),o[l][0]!=n[l][0]||"M"==o[l][0]||"A"==o[l][0]&&(o[l][4]!=n[l][4]||o[l][5]!=n[l][5])?(Array.prototype.splice.apply(o,[l,1].concat(Tt.call(c,o[l]))),Array.prototype.splice.apply(n,[l,1].concat(Tt.call(h,n[l])))):(o[l]=Mt.call(c,o[l]),n[l]=Mt.call(h,n[l])),++l!=o.length||l!=n.length;)l==o.length&&o.push(["C",c.pos[0],c.pos[1],c.pos[0],c.pos[1],c.pos[0],c.pos[1]]),l==n.length&&n.push(["C",h.pos[0],h.pos[1],h.pos[0],h.pos[1],h.pos[0],h.pos[1]]);return{start:o,dest:n}}function Ft(t,e){var i=function(t,e){for(var i,s=At(t),a=At(e),r=0,o=0,n=!1,l=!1;!1!==r||!1!==o;){if(n=_t(s,!1!==r&&r+1),l=_t(a,!1!==o&&o+1),!1===r){const t=St(i.start);r=0==t.height||0==t.width?s.push(s[0])-1:s.push(["M",t.x+t.width/2,t.y+t.height/2])-1}if(!1===o){const t=St(i.dest);o=0==t.height||0==t.width?a.push(a[0])-1:a.push(["M",t.x+t.width/2,t.y+t.height/2])-1}i=Dt(s,r,n,a,o,l),s=s.slice(0,r).concat(i.start,!1===n?[]:s.slice(n)),a=a.slice(0,o).concat(i.dest,!1===l?[]:a.slice(l)),r=!1!==n&&r+i.start.length,o=!1!==l&&o+i.dest.length}return{start:s,dest:a}}(t,e),s=i.start,a=i.dest;return function(t){return Ct(s.map(function(e,i){return a[i].map(function(s,r){return 0===r?s:e[r]+(a[i][r]-e[r])*t})}))}}let Lt=null,Et=null;function Pt(t,e){const i=new Array(e);if(!p.isBrowser()){const s=St(At(t)),a=s.x+s.width/2,r=s.y+s.height/2;for(let t=0;t<e;t++)i[t]={x:a,y:r};return i}Lt||(Lt=document.createElementNS("http://www.w3.org/2000/svg","svg"),Lt.setAttribute("width","0"),Lt.setAttribute("height","0"),Lt.setAttribute("style","position:absolute;width:0;height:0;visibility:hidden;pointer-events:none;"),Et=document.createElementNS("http://www.w3.org/2000/svg","path"),Lt.appendChild(Et),document.body.appendChild(Lt)),Et.setAttribute("d",t||"M0 0");let s=0;try{s=Et.getTotalLength()}catch(t){s=0}if(!s||!isFinite(s)){const s=St(At(t)),a=s.x+s.width/2,r=s.y+s.height/2;for(let t=0;t<e;t++)i[t]={x:a,y:r};return i}for(let t=0;t<e;t++)try{const a=Et.getPointAtLength(t/e*s);i[t]={x:a.x,y:a.y}}catch(e){i[t]={x:0,y:0}}return i}function Bt(t){return-Math.cos(t*Math.PI)/2+.5}let Nt=Bt;function zt(t){if(!t||"string"!=typeof t)return null;if("#"===t[0]){let e=t.slice(1);3===e.length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);const i=parseInt(e,16);return[i>>16&255,i>>8&255,255&i,1]}const e=t.match(/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+))?\s*\)/);return e?[+e[1],+e[2],+e[3],void 0!==e[4]?+e[4]:1]:null}function Rt(t,e,i){return`rgba(${Math.round(t[0]+(e[0]-t[0])*i)},${Math.round(t[1]+(e[1]-t[1])*i)},${Math.round(t[2]+(e[2]-t[2])*i)},${t[3]+(e[3]-t[3])*i})`}class It{constructor(t,e,i){this.el=t,this.duration=null!=e?e:300,this.delay=i||0,this._attrTarget=null,this._plotTarget=null,this._plotSnap=null,this._plotAlgorithm="commands",this._afterCb=null,this._duringCb=null,this._easing=null,this._next=null,this._root=null,this._scheduled=!1}ease(t){return"function"==typeof t&&(this._easing=t),this._schedule(),this}attr(t){return this._attrTarget=t,this._schedule(),this}plot(t,e,i){return this._plotTarget=t,e&&(this._plotAlgorithm=e),this._plotSnap=i||null,this._schedule(),this}after(t){return this._afterCb=t,this._schedule(),this}during(t){return this._duringCb=t,this._schedule(),this}animate(t,e){const i=new It(this.el,t,e);return this._next=i,i._root=this._root||this,i}_schedule(){const t=this._root||this;t._scheduled||(t._scheduled=!0,queueMicrotask(()=>t._executeChain()))}_executeChain(){const t=[];let e=this;for(;e;)t.push(e),e=e._next;let i=0;t.forEach(t=>{i+=t.delay,t._execute(i),i+=t.duration})}_execute(t){const e=this.el,i=this.duration;if(i<=1){const i=()=>{this._attrTarget&&e.attr(this._attrTarget),this._plotTarget&&e.plot(this._plotSnap||this._plotTarget),this._afterCb&&this._afterCb.call(e)};return void(t>0?setTimeout(i,t):i())}const s=()=>{const t={},s={},a={};if(this._attrTarget)for(const i of Object.keys(this._attrTarget)){const r=e.attr(i);t[i]=r;const o=zt(r),n=zt(String(this._attrTarget[i]));o&&n&&(s[i]=o,a[i]=n)}let r=null;if(this._plotTarget){const t=e.attr("d")||"";try{r="polygons"===this._plotAlgorithm?function(t,e,i=96){const s=Pt(t,i),a=Pt(e,i);let r=0,o=1/0;for(let t=0;t<i;t++){let e=0;for(let r=0;r<i;r++){const n=s[(r+t)%i],l=a[r],c=n.x-l.x,h=n.y-l.y;if(e+=c*c+h*h,e>=o)break}e<o&&(o=e,r=t)}const n=new Array(i);for(let t=0;t<i;t++)n[t]=s[(t+r)%i];return function(t){let e="";for(let s=0;s<i;s++){const i=n[s],r=a[s],o=i.x+(r.x-i.x)*t,l=i.y+(r.y-i.y)*t;e+=(0===s?"M":"L")+o.toFixed(3)+" "+l.toFixed(3)+" "}return e+"Z"}}(t,this._plotTarget):Ft(t,this._plotTarget)}catch(t){r=null}}const o=performance.now(),n=e.node&&e.node.ownerSVGElement,l=this._easing||n&&n.__apexEase||Nt,c=n=>{const h=n-o,d=Math.min(h/i,1),p=l(d);if(this._attrTarget)if(d>=1)e.attr(this._attrTarget);else{const i={};for(const e of Object.keys(this._attrTarget))if(s[e]&&a[e])i[e]=Rt(s[e],a[e],p);else{const s=parseFloat(t[e]),a=parseFloat(this._attrTarget[e]);isNaN(s)||isNaN(a)||(i[e]=s+(a-s)*p)}e.attr(i)}r&&d<1&&e.attr("d",r(p)),this._duringCb&&this._duringCb(p),d<1?v.requestAnimationFrame(c):(this._plotTarget&&e.attr("d",this._plotSnap||this._plotTarget),this._afterCb&&this._afterCb.call(e))};v.requestAnimationFrame(c)};t>0?setTimeout(s,t):s()}}function Ot(t){t.prototype.animate=function(t,e){return new It(this,t,e)}}function Xt(t){return-Math.cos(t*Math.PI)/2+.5}function Ht(t,e,i,s){t=Math.min(Math.max(t,0),1),i=Math.min(Math.max(i,0),1);const a=3*t,r=3*(i-t)-a,o=1-a-r,n=3*e,l=3*(s-e)-n,c=1-n-l,h=t=>((o*t+r)*t+a)*t;return t=>t<=0?0:t>=1?1:(t=>((c*t+l)*t+n)*t)((t=>{let e=0,i=1,s=t;if(s<e)return e;if(s>i)return i;for(;e<i;){const a=h(s);if(Math.abs(a-t)<1e-4)return s;t>a?e=s:i=s,s=(e+i)/2}return s})(t))}const Yt=new Map;function Wt(t,e){"string"==typeof t&&t&&"function"==typeof e&&Yt.set(t,e)}function $t(t){return"function"==typeof t?Gt(t):(e=t,Array.isArray(e)&&4===e.length&&e.every(t=>"number"==typeof t)?Ht(t[0],t[1],t[2],t[3]):"string"==typeof t&&Yt.has(t)?Gt(Yt.get(t)):Xt);var e}function Gt(t){return e=>{const i=t(e);return"number"==typeof i&&isFinite(i)?i:e}}Yt.set("linear",t=>t),Yt.set("easeInOutSine",Xt),Yt.set("easeInSine",t=>1-Math.cos(t*Math.PI/2)),Yt.set("easeOutSine",t=>Math.sin(t*Math.PI/2)),Yt.set("easeInQuad",t=>t*t),Yt.set("easeOutQuad",t=>1-(1-t)*(1-t)),Yt.set("easeInOutQuad",t=>t<.5?2*t*t:1-Math.pow(-2*t+2,2)/2),Yt.set("easeInCubic",t=>t*t*t),Yt.set("easeOutCubic",t=>1-Math.pow(1-t,3)),Yt.set("easeInOutCubic",t=>t<.5?4*t*t*t:1-Math.pow(-2*t+2,3)/2),Yt.set("easeOutBack",t=>{const e=1.70158;return 1+2.70158*Math.pow(t-1,3)+e*Math.pow(t-1,2)}),Yt.set("easeInOutBack",t=>{const e=2.5949095;return t<.5?Math.pow(2*t,2)*(7.189819*t-e)/2:(Math.pow(2*t-2,2)*((e+1)*(2*t-2)+e)+2)/2});const jt="http://www.w3.org/2000/svg";function Ut(t){return 1-Math.pow(1-t,3)}const Vt=new WeakMap;function qt(t,e){let i=Vt.get(t);return i||Vt.set(t,i={n:0,q:[]}),i.q.push(e)<2&&v.requestAnimationFrame(e=>{const s=i.q;i.q=[];for(const a of s){if(t.globals.isDestroyed){i.n=0;break}try{const i=a(e);!0===i?qt(t,a):i&&s.push(i)}catch(t){setTimeout(()=>{throw t})}}}),i}let Zt=null;function Kt(){if(!p.isBrowser())return!1;try{return Zt||(Zt=window.matchMedia("(prefers-reduced-motion: reduce)")),!!Zt.matches}catch(t){return!1}}function Jt(t,e,i){if(!function(t){const e=t.globals,i=t.config.chart.animations,s=t.config.chart.type;return p.isBrowser()&&!e.dataChanged&&!e.resized&&e.shouldAnimate&&!!i&&!1!==i.enabled&&!(2*i.speed<1)&&("line"===s||"area"===s||"rangeArea"===s)&&"canvas"!==(e.activeRenderer||{}).kind&&t.layout.gridWidth>0}(i))return!1;const s=2*(i.config.chart.animations.speed||800),a=Math.max(0,Math.min(1,e/i.layout.gridWidth)),r=(1-Math.cbrt(1-a))*s,o=t.node.style;o.opacity="0";let n=-1;return qt(i,t=>{if(n<0&&(n=t),t-n<r)return!0;o.opacity=""}),!0}function Qt(t){const e=t.config.chart.animations;if(!e)return;const i=e.dynamicAnimation,s=t.globals;!1!==e.respectReducedMotion&&Kt()?(s.reducedMotionLatch?(!1!==e.enabled&&(s.reducedMotionLatch.enabled=e.enabled),i&&!1!==i.enabled&&(s.reducedMotionLatch.dynamicEnabled=i.enabled)):s.reducedMotionLatch={enabled:e.enabled,dynamicEnabled:i?i.enabled:void 0},e.enabled=!1,i&&(i.enabled=!1)):s.reducedMotionLatch&&(e.enabled=s.reducedMotionLatch.enabled,i&&void 0!==s.reducedMotionLatch.dynamicEnabled&&(i.enabled=s.reducedMotionLatch.dynamicEnabled),s.reducedMotionLatch=null);const a=$t(e.easing);var r;ie.set(t,a),Nt="function"==typeof(r=a)?r:Bt}function te(t){const e=t.style,i=t.index||0,s="number"==typeof t.baseDelay?t.baseDelay:40;switch(e){case"none":return 0;case"diagonal":return((t.row||0)+(t.col||0))*s;default:return i*s}}const ee=new WeakMap,ie=new WeakMap;class se{constructor(t,e){var i,s;this.w=t,this.ctx=e,e&&t&&!ee.has(t)&&ee.set(t,e);const a=null==(s=null==(i=null==t?void 0:t.dom)?void 0:i.Paper)?void 0:s.node;a&&(a.__apexEase=ie.get(t))}animatePop(t,{speed:e,delay:i=0,onComplete:s}){const a=this.w;if(!p.isBrowser()||!a.globals.shouldAnimate||e<1)return void(s&&s());const r=t.node.style;r.transformBox="fill-box",r.transformOrigin="center",r.transform="scale(0)",r.opacity="0";const o=performance.now()+i,n=qt(a,t=>{const i=Math.max(0,Math.min(1,(t-o)/e));if(r.transform=`scale(${function(t){const e=1.70158;return 1+2.70158*Math.pow(t-1,3)+e*Math.pow(t-1,2)}(i)})`,r.opacity=String(Math.min(1,2*i)),i<1)return!0;r.transform="",r.transformOrigin="",r.transformBox="",r.opacity="",! --n.n&&s&&s()});n.n++}animateRect(t,e,i,s,a,r=0){return t.attr(e).animate(s,r).attr(i).after(()=>a())}animatePathsGradually(t){const{el:e,realIndex:i,j:s,fill:a,pathFrom:r,pathTo:o,pathToInterp:n,speed:l,delay:c,scrollMorph:h}=t,d=this.w;let p=0;d.config.chart.animations.animateGradually.enabled&&(p=d.config.chart.animations.animateGradually.delay),d.config.chart.animations.dynamicAnimation.enabled&&d.globals.dataChanged&&"bar"!==d.config.chart.type&&(p=0),this.morphSVG(e,i,s,"line"!==d.config.chart.type||d.globals.comboCharts?a:"stroke",r,o,l,c*p,h,n)}revealBulk(t){const e=this.w;t.node.classList.add("apexcharts-element-hidden"),e.globals.delayedElements.push({el:t.node}),e.globals.fadeRevealEls.push(t.node),p.isBrowser()&&e.globals.shouldAnimate?e.globals.bulkRevealScheduled||(e.globals.bulkRevealScheduled=!0,qt(e,()=>{e.globals.bulkRevealScheduled=!1;const i=e.globals.fadeRevealEls;e.globals.fadeRevealEls=[];const s=e.globals.morphBatch;if(s&&s.pending>0)return i.forEach(t=>{t.classList.remove("apexcharts-element-hidden"),t.classList.add("apexcharts-hidden-element-shown")}),void(s.onDone=()=>this.animationCompleted(t));this.animationCompleted(t)})):this.animationCompleted(t)}showDelayedElements(){this.w.globals.delayedElements.forEach(t=>{if(t.holdUntilComplete&&!this.w.globals.animationEnded)return;const e=t.el;e.classList.remove("apexcharts-element-hidden"),e.classList.add("apexcharts-hidden-element-shown")})}animationCompleted(t){const e=this.w;e.globals.animationEnded||e.globals.isDestroyed||(e.globals.animationEnded=!0,this.showDelayedElements(),"function"==typeof e.config.chart.events.animationEnd&&e.config.chart.events.animationEnd(this.ctx||ee.get(e),{el:t,w:e}))}animateDraw(t,{realIndex:e,j:i,isFill:s,isLast:a,speed:r,delay:o,mask:n}){const l=this.w,c=this,h=()=>{a&&l.globals.shouldAnimate&&c.animationCompleted(t),c.showDelayedElements()};if(!p.isBrowser()||!l.globals.shouldAnimate||r<1)return void h();const d=t.node,u=()=>{const t=n&&"radial"===n.type,a=l.layout.gridWidth+8,c=n&&n.cx||0,p=n&&n.cy||0,u=(n&&n.r||l.layout.gridWidth/2)+4,g=`apexDrawMask${l.globals.cuid}-${e}-${null!=i?i:0}-${s?"f":"s"}`,x=v.createElementNS(jt,"mask");let f;if(x.setAttribute("id",g),x.setAttribute("maskUnits","userSpaceOnUse"),t){const t=u;x.setAttribute("x",String(c-t)),x.setAttribute("y",String(p-t)),x.setAttribute("width",String(2*t)),x.setAttribute("height",String(2*t)),f=v.createElementNS(jt,"circle"),f.setAttribute("cx",String(c)),f.setAttribute("cy",String(p)),f.setAttribute("r","0"),f.setAttribute("fill","#fff")}else x.setAttribute("x",String(-4)),x.setAttribute("y",String(-4)),x.setAttribute("width",String(a)),x.setAttribute("height",String(l.layout.gridHeight+8)),f=v.createElementNS(jt,"rect"),f.setAttribute("x",String(-4)),f.setAttribute("y",String(-4)),f.setAttribute("width","0"),f.setAttribute("height",String(l.layout.gridHeight+8)),f.setAttribute("fill","#fff");x.appendChild(f),l.dom.elDefs.node.appendChild(x),d.setAttribute("mask",`url(#${g})`);const m=performance.now()+(o||0);qt(l,e=>{const i=Math.max(0,Math.min(1,(e-m)/r)),s=Ut(i);if(t?f.setAttribute("r",String(s*u)):f.setAttribute("width",String(s*a)),i<1)return!0;d.removeAttribute("mask"),x.parentNode&&x.parentNode.removeChild(x),h()})};qt(l,()=>{const t=d.getAttribute("stroke-dasharray");if(s||t&&"0"!==t)return u;let e=0;try{e=d.getTotalLength()}catch(t){}return e?()=>(t=>{d.setAttribute("stroke-dasharray",String(t)),d.setAttribute("stroke-dashoffset",String(t));const e=performance.now()+(o||0);qt(l,i=>{const s=Math.max(0,Math.min(1,(i-e)/r));if(d.setAttribute("stroke-dashoffset",String(t*(1-Ut(s)))),s<1)return!0;d.removeAttribute("stroke-dasharray"),d.removeAttribute("stroke-dashoffset"),h()})})(e):h})}morphSVG(t,e,i,s,a,r,o,n,l,c){var h,d;const p=this.w;a||(a=t.attr("pathFrom")),r||(r=t.attr("pathTo"));const u=()=>("radar"===p.config.chart.type&&(o=1),`M 0 ${p.layout.gridHeight}`);(!a||a.indexOf("undefined")>-1||a.indexOf("NaN")>-1)&&(a=u()),(!r.trim()||r.indexOf("undefined")>-1||r.indexOf("NaN")>-1)&&(r=u(),c=void 0),c&&(!c.trim()||c.indexOf("undefined")>-1||c.indexOf("NaN")>-1)&&(c=void 0),p.globals.shouldAnimate||(o=1);const g=!0===(null==(d=null==(h=this.ctx)?void 0:h.morphTypeChange)?void 0:d.isActive())?"polygons":"commands";let x=null;if(p.globals.dataChanged){const t=p.config.chart.animations.dynamicAnimation.easing;null!=t?x=$t(t):l&&(x=$t("linear"))}const f=p.globals.morphBatch;f&&f.pending++;const m=se.trackSeriesTween(p,e),b=t.plot(a).animate(o,n);x&&b.ease(x),b.plot(c||r,g,c?r:void 0).after(()=>{if(S.isNumber(i)){const e=p.seriesData.series[p.globals.maxValsInArrayIndex];e&&i===e.length-2&&p.globals.shouldAnimate&&this.animationCompleted(t)}else"none"!==s&&p.globals.shouldAnimate&&(!p.globals.comboCharts&&e===p.seriesData.series.length-1||p.globals.comboCharts)&&this.animationCompleted(t);if(this.showDelayedElements(),f&&--f.pending<=0){if(f.onDone){const t=f.onDone;f.onDone=null,t()}f===p.globals.morphBatch&&p.globals.shouldAnimate&&this.animationCompleted(t)}m()})}static trackSeriesTween(t,e){var i;const s=null==(i=t.globals.morphBatch)?void 0:i.series;if(!s||!S.isNumber(e))return()=>{};let a=s.get(e);a||(a={pending:0,onDone:null},s.set(e,a));const r=a;r.pending++;let o=!1;return()=>{if(!o&&(o=!0,r.pending--,r.pending<=0&&r.onDone)){const t=r.onDone;r.onDone=null,t()}}}}class ae{constructor(t,e){this.w=t,this.ctx=e,this.documentEvent=this.documentEvent.bind(this)}addEventListener(t,e){const i=this.w;Object.prototype.hasOwnProperty.call(i.globals.events,t)?i.globals.events[t].push(e):i.globals.events[t]=[e]}removeEventListener(t,e){const i=this.w;if(!Object.prototype.hasOwnProperty.call(i.globals.events,t))return;const s=i.globals.events[t].indexOf(e);-1!==s&&i.globals.events[t].splice(s,1)}fireEvent(t,e){const i=this.w;if(!Object.prototype.hasOwnProperty.call(i.globals.events,t))return;e&&e.length||(e=[]);const s=i.globals.events[t],a=s.length;for(let t=0;t<a;t++)s[t].apply(null,e)}setupEventHandlers(){const t=this.w,e=this.ctx,i=t.dom.baseEl.querySelector(t.globals.chartClass);this.ctx.eventList.forEach(s=>{null==i||i.addEventListener(s,i=>{const s=null===i.target.getAttribute("i")&&-1!==t.interact.capturedSeriesIndex?t.interact.capturedSeriesIndex:i.target.getAttribute("i"),a=null===i.target.getAttribute("j")&&-1!==t.interact.capturedDataPointIndex?t.interact.capturedDataPointIndex:i.target.getAttribute("j"),r=Object.assign({},t,{seriesIndex:t.globals.axisCharts?s:0,dataPointIndex:a});"keydown"===i.type?t.config.chart.accessibility.enabled&&t.config.chart.accessibility.keyboard.enabled&&("function"==typeof t.config.chart.events.keyDown&&t.config.chart.events.keyDown(i,e,r),e.ctx.events.fireEvent("keydown",[i,e,r])):"keyup"===i.type?t.config.chart.accessibility.enabled&&t.config.chart.accessibility.keyboard.enabled&&("function"==typeof t.config.chart.events.keyUp&&t.config.chart.events.keyUp(i,e,r),e.ctx.events.fireEvent("keyup",[i,e,r])):"mousemove"===i.type||"touchmove"===i.type?"function"==typeof t.config.chart.events.mouseMove&&t.config.chart.events.mouseMove(i,e,r):"mouseleave"===i.type||"touchleave"===i.type?"function"==typeof t.config.chart.events.mouseLeave&&t.config.chart.events.mouseLeave(i,e,r):("mouseup"===i.type&&1===i.which||"touchend"===i.type)&&("function"==typeof t.config.chart.events.click&&t.config.chart.events.click(i,e,r),e.ctx.events.fireEvent("click",[i,e,r]))},{capture:!1,passive:!0})}),this.ctx.eventList.forEach(e=>{t.dom.baseEl.addEventListener(e,this.documentEvent,{passive:!0})}),this.ctx.core.setupBrushHandler()}documentEvent(t){const e=this.w,i=t.target.className;if("click"===t.type){const t=e.dom.baseEl.querySelector(".apexcharts-menu");t&&t.classList.contains("apexcharts-menu-open")&&"apexcharts-menu-icon"!==i&&t.classList.remove("apexcharts-menu-open")}e.interact.clientX="touchmove"===t.type?t.touches[0].clientX:t.clientX,e.interact.clientY="touchmove"===t.type?t.touches[0].clientY:t.clientY}}class re{constructor(t){this.w=t}setCurrentLocaleValues(t){let e=this.w.config.chart.locales;const i=p.getApex();i.chart&&i.chart.locales&&i.chart.locales.length>0&&(e=this.w.config.chart.locales.concat(i.chart.locales));const s=e.filter(e=>e.name===t)[0];if(!s)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");{const t=S.extend(M,s);this.w.globals.locale=t.options}}}class oe{constructor(t,{theme:e=null,timeScale:i=null}={}){this.w=t,this.theme=e,this.timeScale=i}getLabel(t,e,i,s,a=[],r="12px",o=!0){const n=this.w,l=void 0===t[s]?"":t[s];let c=l;const h=n.formatters.xLabelFormatter,d=n.config.xaxis.labels.formatter,p=new k(this.w),u=l;o&&(c=p.xLabelFormat(h,l,u,{i:s,dateFormatter:new C(this.w).formatDate,w:n}),void 0!==d&&(c=d(l,t[s],{i:s,dateFormatter:new C(this.w).formatDate,w:n}))),e.length>0?(i=e[s].position,c=e[s].value):"datetime"===n.config.xaxis.type&&void 0===d&&(c=""),void 0===c&&(c=""),c=Array.isArray(c)?c:c.toString();const g=new xa(this.w);let x={};x=n.layout.rotateXLabels&&o?g.getTextRects(c,parseInt(r,10).toString(),null,`rotate(${n.config.xaxis.labels.rotate} 0 0)`,!1):g.getTextRects(c,parseInt(r,10).toString());const f=!n.config.xaxis.labels.showDuplicates&&this.timeScale;return!Array.isArray(c)&&("NaN"===String(c)||a.indexOf(c)>=0&&f)&&(c=""),{x:i,text:c,textRect:x}}checkLabelBasedOnTickamount(t,e,i){const s=this.w;let a=s.config.xaxis.tickAmount;if("dataPoints"===a&&(a=Math.round(s.layout.gridWidth/120)),a>i)return e;return t%Math.round(i/(a+1))===0||(e.text=""),e}checkForOverflowingLabels(t,e,i,s,a){const r=this.w;if(0===t&&r.globals.skipFirstTimelinelabel&&(e.text=""),t===i-1&&r.globals.skipLastTimelinelabel&&(e.text=""),r.config.xaxis.labels.hideOverlappingLabels&&s.length>0){const t=a[a.length-1];if(r.config.xaxis.labels.trim&&"datetime"!==r.config.xaxis.type)return e;e.x<t.textRect.width/(r.layout.rotateXLabels?Math.max(Math.abs(r.config.xaxis.labels.rotate),1)/12:1.01)+t.x&&(e.text="")}return e}checkForReversedLabels(t,e){const i=this.w;return i.config.yaxis[t]&&i.config.yaxis[t].reversed&&e.reverse(),e}yAxisAllSeriesCollapsed(t){const e=this.w.globals;return!e.seriesYAxisMap[t].some(t=>-1===e.collapsedSeriesIndices.indexOf(t))}translateYAxisIndex(t){const e=this.w,i=e.globals,s=e.config.yaxis;return e.seriesData.series.length>s.length||s.some(t=>Array.isArray(t.seriesName))?t:i.seriesYAxisReverseMap[t]}isYAxisHidden(t){const e=this.w,i=e.config.yaxis[t];if(!i.show||this.yAxisAllSeriesCollapsed(t))return!0;if(!i.showForNullSeries){const i=e.globals.seriesYAxisMap[t],s=new mt(this.w);return i.every(t=>s.isSeriesNull(t))}return!1}getYAxisForeColor(t,e){var i;const s=this.w;return Array.isArray(t)&&s.globals.yAxisScale[e]&&(null==(i=this.theme)||i.pushExtraColors(t,s.globals.yAxisScale[e].result.length,!1)),t}drawYAxisTicks(t,e,i,s,a,r,o){const n=this.w,l=new xa(this.w);let c=n.layout.translateY+n.config.yaxis[a].labels.offsetY;if(n.globals.isBarHorizontal?c=0:"heatmap"===n.config.chart.type&&(c+=r/2),s.show&&e>0){!0===n.config.yaxis[a].opposite&&(t+=s.width);for(let a=e;a>=0;a--){const e=l.drawLine(t+i.offsetX-s.width+s.offsetX,c+s.offsetY,t+i.offsetX+s.offsetX,c+s.offsetY,s.color);o.add(e),c+=r}}}static pruneRedundantLabelTitles(t){if(!t)return;t.querySelectorAll(".apexcharts-xaxis-label, .apexcharts-xaxis-group-label, .apexcharts-yaxis-label").forEach(t=>{var e;const i=t.querySelector("title");if(!i)return;Array.prototype.filter.call(t.childNodes,t=>t!==i).map(t=>{var e;return(null!=(e=t.textContent)?e:"").trim()}).filter(t=>""!==t).join(" ")===(null!=(e=i.textContent)?e:"").trim()&&i.remove()})}}class ne{constructor(t,e,i){this.w=t,this.ctx=e,this.elgrid=i,this.axesUtils=new oe(t,{theme:e.theme,timeScale:e.timeScale}),this.xaxisLabels=t.labelData.labels.slice(),t.labelData.timescaleLabels.length>0&&!t.globals.isBarHorizontal&&(this.xaxisLabels=t.labelData.timescaleLabels.slice()),t.config.xaxis.overwriteCategories&&(this.xaxisLabels=t.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],"top"===t.config.xaxis.position?this.offY=0:this.offY=t.layout.gridHeight,this.offY=this.offY+t.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal="bar"===t.config.chart.type&&t.config.plotOptions.bar.horizontal,this.xaxisFontSize=t.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=t.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=t.config.xaxis.labels.style.colors,this.xaxisBorderWidth=t.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=t.config.yaxis[0].axisBorder.width.toString()),String(this.xaxisBorderWidth).indexOf("%")>-1?this.xaxisBorderWidth=t.layout.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=t.config.xaxis.axisBorder.height,this.yaxis=t.config.yaxis[0]}drawXaxis(){const t=this.w,e=new xa(this.w),i=e.group({class:"apexcharts-xaxis",transform:`translate(${t.config.xaxis.offsetX}, ${t.config.xaxis.offsetY})`}),s=e.group({class:"apexcharts-xaxis-texts-g",transform:`translate(${t.layout.translateXAxisX}, ${t.layout.translateXAxisY})`});i.add(s);let a=[];for(let t=0;t<this.xaxisLabels.length;t++)a.push(this.xaxisLabels[t]);if(this.drawXAxisLabelAndGroup(!0,e,s,a,t.axisFlags.isXNumeric,(t,e)=>e),t.labelData.hasXaxisGroups){const i=t.labelData.groups;a=[];for(let t=0;t<i.length;t++)a.push(i[t].title);const r={};t.config.xaxis.group.style&&(r.xaxisFontSize=t.config.xaxis.group.style.fontSize,r.xaxisFontFamily=t.config.xaxis.group.style.fontFamily,r.xaxisForeColors=t.config.xaxis.group.style.colors,r.fontWeight=t.config.xaxis.group.style.fontWeight,r.cssClass=t.config.xaxis.group.style.cssClass),this.drawXAxisLabelAndGroup(!1,e,s,a,!1,(t,e)=>i[t].cols*e,r)}if(void 0!==t.config.xaxis.title.text){const s=e.group({class:"apexcharts-xaxis-title"}),a=e.drawText({x:t.layout.gridWidth/2+t.config.xaxis.title.offsetX,y:this.offY+parseFloat(this.xaxisFontSize)+("bottom"===t.config.xaxis.position?t.layout.xAxisLabelsHeight:-t.layout.xAxisLabelsHeight-10)+t.config.xaxis.title.offsetY,text:t.config.xaxis.title.text,textAnchor:"middle",fontSize:t.config.xaxis.title.style.fontSize,fontFamily:t.config.xaxis.title.style.fontFamily,fontWeight:t.config.xaxis.title.style.fontWeight,foreColor:t.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text "+t.config.xaxis.title.style.cssClass});s.add(a),i.add(s)}if(t.config.xaxis.axisBorder.show){const s=t.globals.barPadForNumericAxis,a=e.drawLine(t.globals.padHorizontal+t.config.xaxis.axisBorder.offsetX-s,this.offY,this.xaxisBorderWidth+s,this.offY,t.config.xaxis.axisBorder.color,0,this.xaxisBorderHeight);this.elgrid&&this.elgrid.elGridBorders&&t.config.grid.show?this.elgrid.elGridBorders.add(a):i.add(a)}return i}drawXAxisLabelAndGroup(t,e,i,s,a,r,o={}){var n,l;const c=[],h=[],d=this.w,p=o.xaxisFontSize||this.xaxisFontSize,u=o.xaxisFontFamily||this.xaxisFontFamily,g=o.xaxisForeColors||this.xaxisForeColors,x=o.fontWeight||d.config.xaxis.labels.style.fontWeight,f=o.cssClass||d.config.xaxis.labels.style.cssClass;let m,b=d.globals.padHorizontal;const y=s.length;let w="category"===d.config.xaxis.type?d.globals.dataPoints:y;if(0===w&&y>w&&(w=y),a){const t=Math.max(Number(d.config.xaxis.tickAmount)||1,w>1?w-1:w);m=d.layout.gridWidth/Math.min(t,y-1),b=b+r(0,m)/2+d.config.xaxis.labels.offsetX}else m=d.layout.gridWidth/w,b=b+r(0,m)+d.config.xaxis.labels.offsetX;for(let a=0;a<=y-1;a++){let o=b-r(a,m)/2+d.config.xaxis.labels.offsetX;0===a&&1===y&&m/2===b&&1===w&&(o=d.layout.gridWidth/2);let A=this.axesUtils.getLabel(s,d.labelData.timescaleLabels,o,a,c,p,t),S=28;d.layout.rotateXLabels&&t&&(S=22),d.config.xaxis.title.text&&"top"===d.config.xaxis.position&&(S+=parseFloat(d.config.xaxis.title.style.fontSize)+2),t||(S=S+parseFloat(p)+(d.layout.xAxisLabelsHeight-d.layout.xAxisGroupLabelsHeight)+(d.layout.rotateXLabels?10:0));A=void 0!==d.config.xaxis.tickAmount&&"dataPoints"!==d.config.xaxis.tickAmount&&"datetime"!==d.config.xaxis.type?this.axesUtils.checkLabelBasedOnTickamount(a,A,y):this.axesUtils.checkForOverflowingLabels(a,A,y,c,h);const C=()=>t&&d.config.xaxis.convertedCatToNumeric?g[d.globals.minX+a-1]:g[a],k=(null!=(l=null==(n=A.textRect)?void 0:n.width)?l:0)/2,M=A.x+k<0;if(d.config.xaxis.labels.show&&!M){const s=e.drawText({x:A.x,y:this.offY+d.config.xaxis.labels.offsetY+S-("top"===d.config.xaxis.position?d.layout.xAxisHeight+d.config.xaxis.axisTicks.height-2:0),text:A.text,textAnchor:"middle",fontWeight:x,fontSize:p,fontFamily:u,foreColor:Array.isArray(g)?C():g,isPlainText:!1,cssClass:(t?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+f});if(i.add(s),s.on("click",t=>{if("function"==typeof d.config.chart.events.xAxisLabelClick){const e=Object.assign({},d,{labelIndex:a});d.config.chart.events.xAxisLabelClick(t,this.ctx,e)}}),t){const t=v.createElementNS(bt,"title");t.textContent=Array.isArray(A.text)?A.text.join(" "):A.text,s.node.appendChild(t),""!==A.text&&(c.push(A.text),h.push(A))}}a<y-1&&(b+=r(a+1,m))}}drawXaxisInversed(t){const e=this.w,i=new xa(this.w),s=e.config.yaxis[0].opposite?e.globals.translateYAxisX[t]:0,a=i.group({class:"apexcharts-yaxis apexcharts-xaxis-inversed",rel:t}),r=i.group({class:"apexcharts-yaxis-texts-g apexcharts-xaxis-inversed-texts-g",transform:"translate("+s+", 0)"});a.add(r);const o=[];if(e.config.yaxis[t].show)for(let t=0;t<this.xaxisLabels.length;t++)o.push(this.xaxisLabels[t]);const n=e.layout.gridHeight/o.length;let l=-n/2.2;const c=e.config.yaxis[0].labels;let h=e.formatters.yLabelFormatters[0];if("datetime"===e.config.xaxis.type&&void 0===c.formatter&&!e.axisFlags.isRangeBar){const t=new C(e),i=e.config.xaxis.labels.format||e.config.tooltip.x.format;h=e=>"number"==typeof e?t.formatDate(t.getDate(e),i):e}if(c.show)for(let s=0;s<=o.length-1;s++){let a=void 0===o[s]?"":o[s];a=h(a,{seriesIndex:t,dataPointIndex:s,w:e},e);const d=this.axesUtils.getYAxisForeColor(c.style.colors,t),p=()=>Array.isArray(d)?d[s]:d;let u=0;Array.isArray(a)&&(u=a.length/2*parseInt(c.style.fontSize,10));let g=c.offsetX-15,x="end";this.yaxis.opposite&&(x="start"),"left"===e.config.yaxis[0].labels.align?(g=c.offsetX,x="start"):"center"===e.config.yaxis[0].labels.align?(g=c.offsetX,x="middle"):"right"===e.config.yaxis[0].labels.align&&(x="end");const f=i.drawText({x:g,y:l+n+c.offsetY-u,text:a,textAnchor:x,foreColor:p(),fontSize:c.style.fontSize,fontFamily:c.style.fontFamily,fontWeight:c.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+c.style.cssClass,maxWidth:c.maxWidth});r.add(f),f.on("click",t=>{if("function"==typeof e.config.chart.events.xAxisLabelClick){const i=Object.assign({},e,{labelIndex:s});e.config.chart.events.xAxisLabelClick(t,this.ctx,i)}});const m=v.createElementNS(bt,"title");if(m.textContent=Array.isArray(a)?a.join(" "):a,f.node.appendChild(m),0!==e.config.yaxis[t].labels.rotate){const s=i.rotateAroundCenter(f.node);f.node.setAttribute("transform",`rotate(${e.config.yaxis[t].labels.rotate} 0 ${s.y})`)}l+=n}if(void 0!==e.config.yaxis[0].title.text){const t=i.group({class:"apexcharts-yaxis-title apexcharts-xaxis-title-inversed",transform:"translate("+s+", 0)"}),r=i.drawText({x:e.config.yaxis[0].title.offsetX,y:e.layout.gridHeight/2+e.config.yaxis[0].title.offsetY,text:e.config.yaxis[0].title.text,textAnchor:"middle",foreColor:e.config.yaxis[0].title.style.color,fontSize:e.config.yaxis[0].title.style.fontSize,fontWeight:e.config.yaxis[0].title.style.fontWeight,fontFamily:e.config.yaxis[0].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+e.config.yaxis[0].title.style.cssClass});t.add(r),a.add(t)}let d=0;this.isCategoryBarHorizontal&&e.config.yaxis[0].opposite&&(d=e.layout.gridWidth);const p=e.config.xaxis.axisBorder;if(p.show){const t=i.drawLine(e.globals.padHorizontal+p.offsetX+d,1+p.offsetY,e.globals.padHorizontal+p.offsetX+d,e.layout.gridHeight+p.offsetY,p.color,0);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(t):a.add(t)}return e.config.yaxis[0].axisTicks.show&&this.axesUtils.drawYAxisTicks(d,o.length,e.config.yaxis[0].axisBorder,e.config.yaxis[0].axisTicks,0,n,a),a}drawXaxisTicks(t,e,i){const s=this.w,a=t;if(t<0||t-2>s.layout.gridWidth)return;const r=this.offY+s.config.xaxis.axisTicks.offsetY;if(e=e+r+s.config.xaxis.axisTicks.height,"top"===s.config.xaxis.position&&(e=r-s.config.xaxis.axisTicks.height),s.config.xaxis.axisTicks.show){const o=new xa(this.w).drawLine(t+s.config.xaxis.axisTicks.offsetX,r+s.config.xaxis.offsetY,a+s.config.xaxis.axisTicks.offsetX,e+s.config.xaxis.offsetY,s.config.xaxis.axisTicks.color);i.add(o),o.node.classList.add("apexcharts-xaxis-tick")}}getXAxisTicksPositions(){const t=this.w,e=[],i=this.xaxisLabels.length;let s=t.globals.padHorizontal;if(t.labelData.timescaleLabels.length>0)for(let t=0;t<i;t++)s=this.xaxisLabels[t].position,e.push(s);else{const a=i;for(let i=0;i<a;i++){let i=a;t.axisFlags.isXNumeric&&"bar"!==t.config.chart.type&&(i-=1),s+=t.layout.gridWidth/i,e.push(s)}}return e}xAxisLabelCorrections(){var t,e,i;const s=this.w,a=new xa(this.w),r=s.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g"),o=s.dom.baseEl.querySelectorAll(".apexcharts-xaxis-texts-g text:not(.apexcharts-xaxis-group-label)"),n=s.dom.baseEl.querySelectorAll(".apexcharts-yaxis-inversed text"),l=s.dom.baseEl.querySelectorAll(".apexcharts-xaxis-inversed-texts-g text tspan");if(s.layout.rotateXLabels||s.config.xaxis.labels.rotateAlways)for(let t=0;t<o.length;t++){const e=a.rotateAroundCenter(o[t]);e.y=e.y-1,e.x=e.x+1,o[t].setAttribute("transform",`rotate(${s.config.xaxis.labels.rotate} ${e.x} ${e.y})`),o[t].setAttribute("text-anchor","end"),null==r||r.setAttribute("transform","translate(0, -10)");const i=o[t].childNodes;s.config.xaxis.labels.trim&&Array.prototype.forEach.call(i,t=>{a.placeTextWithEllipsis(t,t.textContent,s.layout.xAxisLabelsHeight-("bottom"===s.config.legend.position?20:10))})}else{const t=s.layout.gridWidth/(s.labelData.labels.length+1);for(let e=0;e<o.length;e++){const i=o[e].childNodes;s.config.xaxis.labels.trim&&"datetime"!==s.config.xaxis.type&&Array.prototype.forEach.call(i,e=>{a.placeTextWithEllipsis(e,e.textContent,t)})}}if(n.length>0){const r=n[n.length-1].getBBox(),o=n[0].getBBox();r.x<-20&&(null==(t=n[n.length-1].parentNode)||t.removeChild(n[n.length-1])),o.x+o.width>s.layout.gridWidth&&!s.globals.isBarHorizontal&&(null==(e=n[0].parentNode)||e.removeChild(n[0]));for(let t=0;t<l.length;t++)a.placeTextWithEllipsis(l[t],null!=(i=l[t].textContent)?i:"",s.config.yaxis[0].labels.maxWidth-(s.config.yaxis[0].title.text?2*parseFloat(s.config.yaxis[0].title.style.fontSize):0)-15)}}}class le{constructor(t,{theme:e=null,timeScale:i=null}={},s){this.w=t,this.elgrid=s,this.xaxisFontSize=t.config.xaxis.labels.style.fontSize,this.axisFontFamily=t.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=t.config.xaxis.labels.style.colors,this.xAxisoffX="bottom"===t.config.xaxis.position?t.layout.gridHeight:0,this.drawnLabels=[],this.axesUtils=new oe(t,{theme:e,timeScale:i})}drawYaxis(t){const e=this.w,i=new xa(this.w),s=e.config.yaxis[t].labels.style,{fontSize:a,fontFamily:r,fontWeight:o}=s,n=i.group({class:"apexcharts-yaxis",rel:t,transform:`translate(${e.globals.translateYAxisX[t]}, 0)`});if(this.axesUtils.isYAxisHidden(t))return n;const l=i.group({class:"apexcharts-yaxis-texts-g"});n.add(l);const c=e.globals.yAxisScale[t].result.length-1,h=e.layout.gridHeight/c,d=e.formatters.yLabelFormatters[t],p=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice());let u=1;if("heatmap"===e.config.chart.type&&!e.config.yaxis[t].labels.formatter){const t=parseInt(a,10)||11,i=Math.max(1,Math.floor(e.layout.gridHeight/(1.4*t))),s=c+1;s>i&&(u=Math.ceil(s/i))}if(e.config.yaxis[t].labels.show){let n=e.layout.translateY+e.config.yaxis[t].labels.offsetY;e.globals.isBarHorizontal?n=0:"heatmap"===e.config.chart.type&&(n-=h/2),n+=parseInt(a,10)/3;let g=null;const x=new Set;for(let f=c;f>=0;f--){const c=u>1&&f%u!==0?"":d(p[f],f,e);let m=e.config.yaxis[t].labels.padding;e.config.yaxis[t].opposite&&0!==e.config.yaxis.length&&(m*=-1);const b=this.getTextAnchor(e.config.yaxis[t].labels.align,e.config.yaxis[t].opposite),y=this.axesUtils.getYAxisForeColor(s.colors,t),v=Array.isArray(y)?y[f]:y,w=x.size,A=x.add(String(c)).size===w,S=i.drawText({x:m,y:n,text:A&&!e.config.yaxis[t].labels.showDuplicates?"":c,textAnchor:b,fontSize:a,fontFamily:r,fontWeight:o,maxWidth:e.config.yaxis[t].labels.maxWidth,foreColor:v,isPlainText:!1,cssClass:`apexcharts-yaxis-label ${s.cssClass}`});l.add(S),this.addTooltip(S,c),null===g&&(g=S),0!==e.config.yaxis[t].labels.rotate&&this.rotateLabel(i,S,g,e.config.yaxis[t].labels.rotate),n+=h}}return this.addYAxisTitle(i,n,t),this.addAxisBorder(i,n,t,c,h),n}getTextAnchor(t,e){return"left"===t?"start":"center"===t?"middle":"right"===t?"end":e?"start":"end"}addTooltip(t,e){const i=v.createElementNS(bt,"title");i.textContent=Array.isArray(e)?e.join(" "):e,t.node.appendChild(i)}rotateLabel(t,e,i,s){const a=t.rotateAroundCenter(i.node),r=t.rotateAroundCenter(e.node);e.node.setAttribute("transform",`rotate(${s} ${a.x} ${r.y})`)}addYAxisTitle(t,e,i){const s=this.w;if(void 0!==s.config.yaxis[i].title.text){const a=t.group({class:"apexcharts-yaxis-title"}),r=s.config.yaxis[i].opposite?s.globals.translateYAxisX[i]:0,o=t.drawText({x:r,y:s.layout.gridHeight/2+s.layout.translateY+s.config.yaxis[i].title.offsetY,text:s.config.yaxis[i].title.text,textAnchor:"end",foreColor:s.config.yaxis[i].title.style.color,fontSize:s.config.yaxis[i].title.style.fontSize,fontWeight:s.config.yaxis[i].title.style.fontWeight,fontFamily:s.config.yaxis[i].title.style.fontFamily,cssClass:`apexcharts-yaxis-title-text ${s.config.yaxis[i].title.style.cssClass}`});a.add(o),e.add(a)}}addAxisBorder(t,e,i,s,a){const r=this.w,o=r.config.yaxis[i].axisBorder;let n=31+o.offsetX;if(r.config.yaxis[i].opposite&&(n=-31-o.offsetX),o.show){const i=t.drawLine(n,r.layout.translateY+o.offsetY-2,n,r.layout.gridHeight+r.layout.translateY+o.offsetY+2,o.color,0,o.width);e.add(i)}r.config.yaxis[i].axisTicks.show&&this.axesUtils.drawYAxisTicks(n,s,o,r.config.yaxis[i].axisTicks,i,a,e)}drawYaxisInversed(t){const e=this.w,i=new xa(this.w),s=i.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),a=i.group({class:"apexcharts-xaxis-texts-g",transform:`translate(${e.layout.translateXAxisX}, ${e.layout.translateXAxisY})`});s.add(a);let r=e.globals.yAxisScale[t].result.length-1;const o=e.layout.gridWidth/r+.1;let n=o+e.config.xaxis.labels.offsetX;const l=e.formatters.xLabelFormatter;let c=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice());const h=e.labelData.timescaleLabels;if(h.length>0&&(c=h.slice(),r=c.length),e.config.xaxis.labels.show)for(let t=h.length?0:r;h.length?t<h.length:t>=0;h.length?t++:t--){let s=null==l?void 0:l(c[t],t,e),r=e.layout.gridWidth+e.globals.padHorizontal-(n-o+e.config.xaxis.labels.offsetX);if(h.length){const i=this.axesUtils.getLabel(c,h,r,t,this.drawnLabels,this.xaxisFontSize);r=i.x,s=i.text,this.drawnLabels.push(i.text),0===t&&e.globals.skipFirstTimelinelabel&&(s=""),t===c.length-1&&e.globals.skipLastTimelinelabel&&(s="")}const d=i.drawText({x:r,y:this.xAxisoffX+e.config.xaxis.labels.offsetY+30-("top"===e.config.xaxis.position?e.layout.xAxisHeight+e.config.xaxis.axisTicks.height-2:0),text:s,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[t]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.axisFontFamily,fontWeight:e.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:`apexcharts-xaxis-label ${e.config.xaxis.labels.style.cssClass}`});a.add(d),this.addTooltip(d,s),n+=o}return this.inversedYAxisTitleText(s),this.inversedYAxisBorder(s),s}inversedYAxisBorder(t){const e=this.w,i=new xa(this.w),s=e.config.xaxis.axisBorder;if(s.show){let a=0;"bar"===e.config.chart.type&&e.axisFlags.isXNumeric&&(a-=15);const r=i.drawLine(e.globals.padHorizontal+a+s.offsetX,this.xAxisoffX,e.layout.gridWidth,this.xAxisoffX,s.color,0,s.height);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(r):t.add(r)}}inversedYAxisTitleText(t){const e=this.w,i=new xa(this.w);if(void 0!==e.config.xaxis.title.text){const s=i.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),a=i.drawText({x:e.layout.gridWidth/2+e.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(e.config.xaxis.title.style.fontSize)+e.config.xaxis.title.offsetY+20,text:e.config.xaxis.title.text,textAnchor:"middle",fontSize:e.config.xaxis.title.style.fontSize,fontFamily:e.config.xaxis.title.style.fontFamily,fontWeight:e.config.xaxis.title.style.fontWeight,foreColor:e.config.xaxis.title.style.color,cssClass:`apexcharts-xaxis-title-text ${e.config.xaxis.title.style.cssClass}`});s.add(a),t.add(s)}}yAxisTitleRotate(t,e){const i=this.w;if(void 0===i.config.yaxis[t].title.text)return;const s=new xa(this.w),a=i.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${t}'] .apexcharts-yaxis-texts-g`),r=a?a.getBoundingClientRect():{width:0,height:0},o=i.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${t}'] .apexcharts-yaxis-title text`),n=o?o.getBoundingClientRect():{width:0,height:0};if(o){const a=this.xPaddingForYAxisTitle(t,r,n,e);o.setAttribute("x",String(a.xPos-(e?10:0)));const l=s.rotateAroundCenter(o);o.setAttribute("transform",`rotate(${e?-1*i.config.yaxis[t].title.rotate:i.config.yaxis[t].title.rotate} ${l.x} ${l.y})`)}}xPaddingForYAxisTitle(t,e,i,s){const a=this.w;let r=0,o=10;return void 0===a.config.yaxis[t].title.text||t<0?{xPos:r,padd:0}:(s?r=e.width+a.config.yaxis[t].title.offsetX+i.width/2+o/2:(r=-1*e.width+a.config.yaxis[t].title.offsetX+o/2+i.width/2,a.globals.isBarHorizontal&&(o=25,r=-1*e.width-a.config.yaxis[t].title.offsetX-o)),{xPos:r,padd:o})}setYAxisXPosition(t,e){const i=this.w;let s=0,a=0,r=18,o=1;i.config.yaxis.forEach((n,l)=>{const c=i.globals.ignoreYAxisIndexes.includes(l)||!n.show||n.floating||0===t[l].width,h=t[l].width+e[l].width;n.opposite?i.globals.isBarHorizontal?(a=i.layout.gridWidth+i.layout.translateX-1,i.globals.translateYAxisX[l]=a-n.labels.offsetX):(a=i.layout.gridWidth+i.layout.translateX+o,c||(o+=h+20),i.globals.translateYAxisX[l]=a-n.labels.offsetX+20):(s=i.layout.translateX-r,c||(r+=h+20),i.globals.translateYAxisX[l]=s+n.labels.offsetX)})}setYAxisTextAlignments(){const t=this.w;t.config.yaxis.forEach((e,i)=>{if(e&&!e.floating&&void 0!==e.labels.align){const s=t.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${i}'] .apexcharts-yaxis-texts-g`);if(!s)return;const a=Array.from(t.dom.baseEl.querySelectorAll(`.apexcharts-yaxis[rel='${i}'] .apexcharts-yaxis-label`)),r=s.getBoundingClientRect();a.forEach(t=>{t.setAttribute("text-anchor",e.labels.align)}),"left"!==e.labels.align||e.opposite?"center"===e.labels.align?s.setAttribute("transform",`translate(${r.width/2*(e.opposite?1:-1)}, 0)`):"right"===e.labels.align&&e.opposite&&s.setAttribute("transform",`translate(${r.width}, 0)`):s.setAttribute("transform",`translate(-${r.width}, 0)`)}})}}class ce{constructor(t,e){this.w=t,this.ctx=e}drawAxis(t,e){const i=this.w.globals,s=this.w.config,a=new ne(this.w,this.ctx,e),r=new le(this.w,{theme:this.ctx.theme,timeScale:this.ctx.timeScale},e);if(i.axisCharts&&"radar"!==t){let t,e;i.isBarHorizontal?(e=r.drawYaxisInversed(0),t=a.drawXaxisInversed(0),this.w.dom.elGraphical.add(t),this.w.dom.elGraphical.add(e)):(t=a.drawXaxis(),this.w.dom.elGraphical.add(t),s.yaxis.map((t,s)=>{if(-1===i.ignoreYAxisIndexes.indexOf(s)&&(e=r.drawYaxis(s),this.w.dom.Paper.add(e),"back"===this.w.config.grid.position)){const t=this.w.dom.Paper.children()[1];t&&(t.remove(),this.w.dom.Paper.add(t))}}))}}}const he=(t,e,i)=>{var s;t.dom.elGraphical.add(e),null==(s=i[0])||s.before(e.node)};class de{constructor(t){this.w=t}drawXCrosshairs(){const t=this.w,e=[...t.dom.elGraphical.node.querySelectorAll(":scope > .apexcharts-xcrosshairs")],i=new xa(this.w),s=new pa(this.w),a=t.config.xaxis.crosshairs.fill.gradient,r=t.config.xaxis.crosshairs.dropShadow,o=t.config.xaxis.crosshairs.fill.type,n=a.colorFrom,l=a.colorTo,c=a.opacityFrom,h=a.opacityTo,d=a.stops,p=r.enabled,u=r.left,g=r.top,x=r.blur,f=r.color,m=r.opacity;let b=t.config.xaxis.crosshairs.fill.color;if(t.config.xaxis.crosshairs.show){"gradient"===o&&(b=i.drawGradient("vertical",n,l,c,h,null,d,[]));let a=1===t.config.xaxis.crosshairs.width?i.drawLine(0,0,0,0):i.drawRect(),r=t.layout.gridHeight;(!S.isNumber(r)||r<0)&&(r=0);let y=t.config.xaxis.crosshairs.width;(!S.isNumber(y)||Number(y)<0)&&(y=0),a.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:r,width:y,height:r,fill:b,filter:"none","fill-opacity":t.config.xaxis.crosshairs.opacity,stroke:t.config.xaxis.crosshairs.stroke.color,"stroke-width":t.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":t.config.xaxis.crosshairs.stroke.dashArray}),p&&(a=s.dropShadow(a,{left:u,top:g,blur:x,color:f,opacity:m})),he(t,a,e)}e.forEach(t=>t.remove())}drawYCrosshairs(){const t=this.w,e=[...t.dom.elGraphical.node.querySelectorAll(":scope > .apexcharts-ycrosshairs, :scope > .apexcharts-ycrosshairs-hidden")],i=new xa(this.w),s=t.config.yaxis[0].crosshairs,a=t.globals.barPadForNumericAxis;if(t.config.yaxis[0].crosshairs.show){const r=i.drawLine(-a,0,t.layout.gridWidth+a,0,s.stroke.color,s.stroke.dashArray,s.stroke.width);r.attr({class:"apexcharts-ycrosshairs"}),he(t,r,e)}const r=i.drawLine(-a,0,t.layout.gridWidth+a,0,s.stroke.color,0,0);r.attr({class:"apexcharts-ycrosshairs-hidden"}),he(t,r,e),e.forEach(t=>t.remove())}}class pe{constructor(t,e){this.w=t,this.ctx=e,this.xaxisLabels=t.labelData.labels.slice(),this.axesUtils=new oe(e.w,{theme:e.theme,timeScale:e.timeScale}),this.isRangeBar=t.rangeData.seriesRange.length&&t.globals.isBarHorizontal,t.labelData.timescaleLabels.length>0&&(this.xaxisLabels=t.labelData.timescaleLabels.slice())}drawGridArea(t=null){const e=this.w,i=new xa(this.w);t||(t=i.group({class:"apexcharts-grid"}));const s=i.drawLine(e.globals.padHorizontal,1,e.globals.padHorizontal,e.layout.gridHeight,"transparent"),a=i.drawLine(e.globals.padHorizontal,e.layout.gridHeight,e.layout.gridWidth,e.layout.gridHeight,"transparent");return t.add(a),t.add(s),t}drawGrid(){if(this.w.globals.axisCharts){const t=this.renderGrid();return this.drawGridArea(t.el),t}return null}static maskRects(t){const e=t.globals,i=Array.isArray(t.config.stroke.width)?Math.max(...t.config.stroke.width):t.config.stroke.width;let s=0,a=0;(B.includes(t.config.chart.type)||e.comboBarCount>0)&&t.axisFlags.isXNumeric&&!e.isBarHorizontal&&(s=Math.max(t.layout.gridPad.left,e.barPadForNumericAxis),a=Math.max(t.layout.gridPad.right,e.barPadForNumericAxis));const r=e.markers.largestSize;return{grid:{x:-i/2-2,y:-i/2-2,width:t.layout.gridWidth+i+4,height:t.layout.gridHeight+i+4},bar:{x:-i/2-s-2,y:-i/2-2,width:t.layout.gridWidth+i+a+s+4,height:t.layout.gridHeight+i+4},marker:{x:Math.min(-i/2-s-2,-r),y:-r,width:t.layout.gridWidth+Math.max(i+a+s+4,2*r),height:t.layout.gridHeight+2*r}}}createGridMask(){const t=this.w,e=t.globals,i=new xa(this.w),s=t=>{const e=v.createElementNS(bt,"clipPath");return e.setAttribute("id",t),e};t.dom.elGridRectMask=s(`gridRectMask${e.cuid}`),t.dom.elGridRectBarMask=s(`gridRectBarMask${e.cuid}`),t.dom.elGridRectMarkerMask=s(`gridRectMarkerMask${e.cuid}`),t.dom.elForecastMask=s(`forecastMask${e.cuid}`),t.dom.elNonForecastMask=s(`nonForecastMask${e.cuid}`);const a=pe.maskRects(t),r=t=>i.drawRect(t.x,t.y,t.width,t.height,0,"#fff");t.dom.elGridRect=r(a.grid),t.dom.elGridRectBar=r(a.bar),t.dom.elGridRectMarker=r(a.marker),t.dom.elGridRectMask.appendChild(t.dom.elGridRect.node),t.dom.elGridRectBarMask.appendChild(t.dom.elGridRectBar.node),t.dom.elGridRectMarkerMask.appendChild(t.dom.elGridRectMarker.node);const o=t.dom.elDefs.node;o.appendChild(t.dom.elGridRectMask),o.appendChild(t.dom.elGridRectBarMask),o.appendChild(t.dom.elGridRectMarkerMask),o.appendChild(t.dom.elForecastMask),o.appendChild(t.dom.elNonForecastMask)}_drawGridLines({i:t,x1:e,y1:i,x2:s,y2:a,xCount:r,parent:o}){const n=this.w;if(!(0===t&&n.globals.skipFirstTimelinelabel||t===r-1&&n.globals.skipLastTimelinelabel&&!n.config.xaxis.labels.formatter||"radar"===n.config.chart.type)){n.config.grid.xaxis.lines.show&&this._drawGridLine({i:t,x1:e,y1:i,x2:s,y2:a,xCount:r,parent:o});let l=0;if(n.labelData.hasXaxisGroups&&"between"===n.config.xaxis.tickPlacement){const e=n.labelData.groups;if(e){let i=0;for(let s=0;i<t&&s<e.length;s++)i+=e[s].cols;i===t&&(l=.6*n.layout.xAxisLabelsHeight)}}this._drawXTick(e,l)}}_drawXTick(t,e){this.w.config.xaxis.axisTicks.show&&(this._xTicks||(this._xTicks=new ne(this.w,this.ctx))).drawXaxisTicks(t,e,this.w.dom.elGraphical)}_drawGridLine({i:t,x1:e,y1:i,x2:s,y2:a,xCount:r,parent:o}){const n=this.w,l=o.node.classList.contains("apexcharts-gridlines-horizontal"),c=n.globals.barPadForNumericAxis,h=0===i&&0===a||0===e&&0===s||i===n.layout.gridHeight&&a===n.layout.gridHeight||n.globals.isBarHorizontal&&(0===t||t===r-1),d=new xa(this.w).drawLine(e-(l?c:0),i,s+(l?c:0),a,n.config.grid.borderColor,n.config.grid.strokeDashArray);d.node.classList.add("apexcharts-gridline"),h&&n.config.grid.show?this.elGridBorders.add(d):o.add(d)}_drawGridBandRect({c:t,x1:e,y1:i,x2:s,y2:a,type:r}){const o=this.w,n=new xa(this.w),l=o.globals.barPadForNumericAxis,c=o.config.grid[r].colors[t],h=n.drawRect(e-("row"===r?l:0),i,s+("row"===r?2*l:0),a,0,c,o.config.grid[r].opacity);this.elg.add(h),h.attr("clip-path",`url(#gridRectMask${o.globals.cuid})`),h.node.classList.add(`apexcharts-grid-${r}`)}_drawXYLines({xCount:t,tickAmount:e}){var i;const s=this.w,a=({xC:e,x1:i,y1:a,x2:r,y2:o})=>{for(let n=0;n<e;n++)i=this.xaxisLabels[n].position,r=this.xaxisLabels[n].position,i<0||i-2>s.layout.gridWidth||this._drawGridLines({i:n,x1:i,y1:a,x2:r,y2:o,xCount:t,parent:this.elgridLinesV})},r=({xC:e,x1:i,y1:a,x2:r,y2:o})=>{for(let n=0;n<e+(s.axisFlags.isXNumeric?0:1);n++)0===n&&1===e&&1===s.globals.dataPoints&&(r=i=s.layout.gridWidth/2),this._drawGridLines({i:n,x1:i,y1:a,x2:r,y2:o,xCount:t,parent:this.elgridLinesV}),r=i+=s.layout.gridWidth/(s.axisFlags.isXNumeric?e-1:e)};if(s.config.grid.xaxis.lines.show||s.config.xaxis.axisTicks.show){const e=s.globals.padHorizontal,o=0;let n;const l=s.layout.gridHeight;s.labelData.timescaleLabels.length?a({xC:t,x1:e,y1:o,x2:n,y2:l}):(s.axisFlags.isXNumeric&&(t=null==(i=s.globals.xAxisScale)?void 0:i.result.length),r({xC:t,x1:e,y1:o,x2:n,y2:l}))}if(s.config.grid.yaxis.lines.show){const t=0;let i=0,a=0;const r=s.layout.gridWidth;let o=e+1;this.isRangeBar&&(o=s.labelData.labels.length);for(let n=0;n<o+(this.isRangeBar?1:0);n++)this._drawGridLine({i:n,xCount:o+(this.isRangeBar?1:0),x1:t,y1:i,x2:r,y2:a,parent:this.elgridLinesH}),i+=s.layout.gridHeight/(this.isRangeBar?o:e),a=i}}_drawInvertedXYLines({xCount:t}){const e=this.w;if(e.config.grid.xaxis.lines.show||e.config.xaxis.axisTicks.show){let i=e.globals.padHorizontal;const s=0;let a;const r=e.layout.gridHeight;for(let o=0;o<t+1;o++)e.config.grid.xaxis.lines.show&&this._drawGridLine({i:o,xCount:t+1,x1:i,y1:s,x2:a,y2:r,parent:this.elgridLinesV}),this._drawXTick(i,0),i+=e.layout.gridWidth/t,a=i}if(e.config.grid.yaxis.lines.show){const t=0;let i=0,s=0;const a=e.layout.gridWidth;for(let r=0;r<e.globals.dataPoints+1;r++)this._drawGridLine({i:r,xCount:e.globals.dataPoints+1,x1:t,y1:i,x2:a,y2:s,parent:this.elgridLinesH}),i+=e.layout.gridHeight/e.globals.dataPoints,s=i}}renderGrid(){var t,e,i;const s=this.w,a=s.globals,r=new xa(this.w);this._xTicks=null,this.elg=r.group({class:"apexcharts-grid"}),this.elgridLinesH=r.group({class:"apexcharts-gridlines-horizontal"}),this.elgridLinesV=r.group({class:"apexcharts-gridlines-vertical"}),this.elGridBorders=r.group({class:"apexcharts-grid-borders"}),this.elg.add(this.elgridLinesH),this.elg.add(this.elgridLinesV),s.config.grid.show||(this.elgridLinesV.hide(),this.elgridLinesH.hide(),this.elGridBorders.hide());let o=0;for(;o<a.seriesYAxisMap.length&&a.ignoreYAxisIndexes.includes(o);)o++;o===a.seriesYAxisMap.length&&(o=0);let n,l=a.yAxisScale[o].result.length-1;return!a.isBarHorizontal||this.isRangeBar?(n=this.xaxisLabels.length,this.isRangeBar&&(l=s.labelData.labels.length,s.config.xaxis.tickAmount&&s.config.xaxis.labels.formatter&&(n=s.config.xaxis.tickAmount),(null==(i=null==(e=null==(t=a.yAxisScale)?void 0:t[o])?void 0:e.result)?void 0:i.length)>0&&"datetime"!==s.config.xaxis.type&&(n=a.yAxisScale[o].result.length-1)),this._drawXYLines({xCount:n,tickAmount:l})):(n=l,l=a.xTickAmount,this._drawInvertedXYLines({xCount:n,tickAmount:l})),this.drawGridBands(n,l),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:s.layout.gridWidth/n}}drawGridBands(t,e){var i,s,a,r,o;const n=this.w,l=(t,i,s,a,r,o)=>{for(let l=0,c=0;l<i;l++,c++)c>=n.config.grid[t].colors.length&&(c=0),this._drawGridBandRect({c:c,x1:s,y1:a,x2:r,y2:o,type:t}),a+=n.layout.gridHeight/e};if((null==(i=n.config.grid.row.colors)?void 0:i.length)>0&&l("row",e,0,0,n.layout.gridWidth,n.layout.gridHeight/e),(null==(s=n.config.grid.column.colors)?void 0:s.length)>0){let e=n.globals.isBarHorizontal||"on"!==n.config.xaxis.tickPlacement||"category"!==n.config.xaxis.type&&!n.config.xaxis.convertedCatToNumeric?t:t-1;n.axisFlags.isXNumeric&&(e=(null!=(r=null==(a=n.globals.xAxisScale)?void 0:a.result.length)?r:1)-1);let i=n.globals.padHorizontal;const s=0;let l=n.globals.padHorizontal+n.layout.gridWidth/e;const c=n.layout.gridHeight;for(let a=0,r=0;a<t;a++,r++)r>=n.config.grid.column.colors.length&&(r=0),"datetime"===n.config.xaxis.type&&(i=this.xaxisLabels[a].position,l=((null==(o=this.xaxisLabels[a+1])?void 0:o.position)||n.layout.gridWidth)-this.xaxisLabels[a].position),this._drawGridBandRect({c:r,x1:i,y1:s,x2:l,y2:c,type:"column"}),i+=n.layout.gridWidth/e}}}function ue(t,e){if(!S.isObject(t)||!S.isObject(e))return void 0!==e?e:t;const i=l({},t);for(const s of Object.keys(e)){const a=e[s];void 0!==a&&(S.isObject(a)&&S.isObject(t[s])?i[s]=ue(t[s],a):i[s]=a)}return i}function ge(t,e,i,s){for(const a of Object.keys(t)){const r=[...i,a],o=t[a],n=S.isObject(e)?e[a]:void 0;S.isObject(o)&&S.isObject(n)?ge(o,n,r,s):s.push(r)}return s}function xe(t,e){let i=t;for(const t of e){if(!S.isObject(i)||!(t in i))return{found:!1};i=i[t]}return{found:!0,value:i}}function fe(t,e,i){let s=t;for(let t=0;t<e.length-1;t++){if(!S.isObject(s[e[t]]))return;s[e[t]]=l({},s[e[t]]),s=s[e[t]]}const a=e[e.length-1];void 0===i?delete s[a]:s[a]=S.clone(i)}class me{constructor(t){this.w=t,this._activeBreakpoint=null,this._base=new Map}absorb(t){if(t&&this._base.size)for(const e of this._base.values()){const i=xe(t,e.path);i.found&&(e.value=S.isObject(i.value)&&S.isObject(e.value)?S.extend(e.value,i.value):S.clone(i.value))}}withoutBreakpoints(t){const e=l({},t);for(const{path:t,value:i}of this._base.values())fe(e,t,i);return e}checkResponsiveConfig(t){var e;const i=this.w,s=i.config,a=(s.responsive||[]).slice();if(0===a.length&&null===this._activeBreakpoint)return;a.sort((t,e)=>t.breakpoint>e.breakpoint?1:e.breakpoint>t.breakpoint?-1:0).reverse();const r=p.isBrowser()?window.innerWidth>0?window.innerWidth:screen.width:0,o=a.filter(t=>r<t.breakpoint);if(0===o.length&&null===this._activeBreakpoint)return;const n=new ht({});this.absorb(t);let d=S.extend({},s);if(t){const e=t,{series:s}=e,a=h(e,["series"]);d=S.extend(d,mt.extendArrayProps(n,a,i))}if(d=this.withoutBreakpoints(d),this._base=new Map,this._activeBreakpoint=null,o.length){for(const t of o)for(const e of ge(t.options||{},d,[],[])){const t=e.join(".");this._base.has(t)||this._base.set(t,{path:e,value:S.clone(xe(d,e).value)})}for(const t of o){const s=(null==(e=t.options)?void 0:e.yaxis)?S.clone(t.options.yaxis):null,a=d.yaxis;if(d=S.extend(d,mt.extendArrayProps(n,t.options,i)),Array.isArray(a)&&s){const t=Array.isArray(s)?s:[s];d=c(l({},d),{yaxis:a.map((e,i)=>ue(e,t[i]))})}this._activeBreakpoint=t.breakpoint}}this.overrideResponsiveOptions(d)}overrideResponsiveOptions(t){const e=new ht(t).init({responsiveOverride:!0});this.w.config=e}}function be(t,e){const i=e.config.chart.streaming;if(!i||!i.enabled)return;const s=i.maxPoints,a=e.config.xaxis.range,r="datetime"===e.config.xaxis.type,o=t=>{const e=Array.isArray(t)?t[0]:t&&t.x,i=r&&null!=e?new Date(e).getTime():e;return"number"==typeof i&&i==i?i:null};t.forEach(t=>{var e;const i=null==t?void 0:t.data;if(!Array.isArray(i)||i.length<2)return;if("number"==typeof s&&s>0)return void(i.length>s&&(t.data=i.slice(i.length-s)));if(!a)return;const r=o(i[i.length-1]),n=o(i[0]);if(null==r||null==n||r<=n)return;const l=(r-n)/(i.length-1),c=r-a-2*l;let h=0;for(;h<i.length&&(null!=(e=o(i[h]))?e:c)<c;)h++;h>0&&(t.data=i.slice(h))})}function ye(t){const e=(t.getAttribute("transform")||"").trim();if(!e)return[0,0];const i=/^translate\(\s*([-+.\deE]+)(?:[\s,]+([-+.\deE]+))?\s*\)$/.exec(e);if(!i)return null;const s=parseFloat(i[1]),a=void 0===i[2]?0:parseFloat(i[2]);return Number.isFinite(s)&&Number.isFinite(a)?[s,a]:null}function ve(t){var e,i,s;const a=t.globals.layoutTween;if(a&&a.graphical===(null==(e=t.dom.elGraphical)?void 0:e.node))return l({},a.rect);const r=t.layout;return{x:null!=(i=r.translateX)?i:0,y:null!=(s=r.translateY)?s:0,w:r.gridWidth,h:r.gridHeight}}function we(t){const e=c(l({},t),{pending:!0});return v.requestAnimationFrame(()=>{e.pending=!1}),e}const Ae=["pointerdown","touchstart","wheel","keydown"];function Se(t,e){const i=t.dom.elWrap,s=t=>{var i;const s=t.target;(null==(i=null==s?void 0:s.closest)?void 0:i.call(s,".apexcharts-legend, .apexcharts-toolbar, .apexcharts-menu"))||e()};return Ae.forEach(t=>null==i?void 0:i.addEventListener(t,s,!0)),()=>Ae.forEach(t=>null==i?void 0:i.removeEventListener(t,s,!0))}function Ce(t,e){if(!t)return;const i=e.map(e=>parseFloat(t.getAttribute(e)||""));return i.every(Number.isFinite)?i:void 0}function ke(t){const e=t.parentNode;return((null==e?void 0:e.getAttribute("class"))||"").split(" ")[0]}function Me(t){var e;const i={};t.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel]").forEach(t=>{const e=ye(t);e&&(i[`g${t.getAttribute("rel")}`]=e)});const s={},a=null==(e=t.dom.elGraphical)?void 0:e.node;if(a){a.querySelectorAll(".apexcharts-grid line:not(.apexcharts-tick-ghost), .apexcharts-grid-borders line").forEach(t=>{const e=Ce(t,["x1","y1","x2","y2"]);if(!e)return;const i=ke(t);s[`h:${i}`]||e[1]!==e[3]||(s[`h:${i}`]=[e[0],e[2]]),s[`v:${i}`]||e[0]!==e[2]||(s[`v:${i}`]=[e[1],e[3]])});const t=Ce(a.querySelector(".apexcharts-grid-row"),["x","width"]);t&&(s.row=t);const e=Ce(a.querySelector(".apexcharts-grid-column"),["y","height"]);e&&(s.col=e);const i=Ce(a.querySelector(".apexcharts-xaxis > line"),["x1","x2"]);i&&(s.xline=i)}const r=["x","y","width","height"];return[t.dom.elGridRect,t.dom.elGridRectBar,t.dom.elGridRectMarker].forEach((t,e)=>{const i=Ce(null==t?void 0:t.node,r);i&&(s[`clip${e}`]=i)}),{rect:ve(t),shifts:i,ends:s}}function Te(t,e,{driven:i,duration:s,ease:a}){var r,o,n,c;const h=t.globals;h.layoutTween&&h.layoutTween.finish();const d=null==(r=t.dom.elGraphical)?void 0:r.node;if(!e||!e.rect||!d)return;const p=t.layout,u={x:null!=(o=p.translateX)?o:0,y:null!=(n=p.translateY)?n:0,w:p.gridWidth,h:p.gridHeight},g=e.rect,x=t=>[t.x,t.y,t.w,t.h].every(Number.isFinite)&&t.w>0&&t.h>0;if(!x(u)||!x(g))return;const f=t.dom.baseEl,m=[],b=[];let y=Math.max(Math.abs(g.x-u.x),Math.abs(g.y-u.y),Math.abs(g.w-u.w),Math.abs(g.h-u.h));const w=(t,e,i)=>{const s=e.map(e=>t.getAttribute(e)),a=s.map(t=>parseFloat(null!=t?t:""));a.every(Number.isFinite)&&(m.push((s,r)=>e.forEach((e,o)=>t.setAttribute(e,String(i(a[o],s,r,o))))),b.push(()=>e.forEach((e,i)=>t.setAttribute(e,s[i]))))},A=(t,e,i,s)=>{if(!i)return w(t,e,s);e.forEach((e,s)=>{const a=parseFloat(t.getAttribute(e)||"");Number.isFinite(a)&&(y=Math.max(y,Math.abs(a-i[s])))}),w(t,e,(t,e,s,a)=>i[a]+(t-i[a])*s)},S=e.ends||{},C=(t,e)=>{const i=t.getAttribute("transform");m.push(s=>{const[a,r]=e(s);t.setAttribute("transform",`translate(${a}, ${r}) ${i||""}`.trim())}),b.push(()=>{i?t.setAttribute("transform",i):t.removeAttribute("transform")})},k=(t,e)=>t*e.w/u.w,M=(t,e)=>t*e.h/u.h,T=t=>t.w-u.w,_=t=>t.h-u.h;m.push(t=>d.setAttribute("transform",`translate(${t.x}, ${t.y})`));const D=d.getAttribute("transform");b.push(()=>{D&&d.setAttribute("transform",D)}),[t.dom.elGridRect,t.dom.elGridRectBar,t.dom.elGridRectMarker].forEach((t,e)=>{const i=null==t?void 0:t.node;if(!i)return;const s=S[`clip${e}`];s?A(i,["x","y","width","height"],s,t=>t):(w(i,["width"],(t,e)=>t+T(e)),w(i,["height"],(t,e)=>t+_(e)))}),d.querySelectorAll(".apexcharts-grid line:not(.apexcharts-tick-ghost), .apexcharts-grid-borders line").forEach(t=>{const e=t.getAttribute("y1")===t.getAttribute("y2"),s=t.getAttribute("x1")===t.getAttribute("x2"),a=i.has(t),r=ke(t);e?A(t,["x1","x2"],S[`h:${r}`],k):a||w(t,["x1","x2"],k),s?A(t,["y1","y2"],S[`v:${r}`],M):a||w(t,["y1","y2"],M)}),d.querySelectorAll(".apexcharts-grid rect").forEach(t=>{const e=t.classList.contains("apexcharts-grid-row"),i=t.classList.contains("apexcharts-grid-column");e?A(t,["x","width"],S.row,k):w(t,["x","width"],k),i?A(t,["y","height"],S.col,M):w(t,["y","height"],M)});const F="top"!==t.config.xaxis.position;if(d.querySelectorAll(".apexcharts-xaxis-tick").forEach(t=>{w(t,["x1","x2"],k),F&&w(t,["y1","y2"],(t,e)=>t+_(e))}),d.querySelectorAll(".apexcharts-xaxis").forEach(t=>{t.closest(".apexcharts-radar-series")||(F&&C(t,t=>[0,_(t)]),t.querySelectorAll(":scope > line").forEach(t=>A(t,["x1","x2"],S.xline,k)),t.querySelectorAll(":scope > .apexcharts-xaxis-title").forEach(t=>C(t,t=>[T(t)/2,0])))}),h.isBarHorizontal&&(null==(c=t.config.yaxis[0])?void 0:c.opposite)&&d.querySelectorAll(".apexcharts-xaxis-inversed-texts-g, .apexcharts-xaxis-title-inversed").forEach(t=>C(t,t=>[T(t),0])),f.querySelectorAll(".apexcharts-yaxis[rel]").forEach(t=>{((t,e)=>{const i=ye(t);if(!e||!i)return;const s=Math.max(Math.abs(e[0]-i[0]),Math.abs(e[1]-i[1]));if(s<.5)return;y=Math.max(y,s);const a=t.getAttribute("transform");m.push((s,a)=>{const r=e[0]+(i[0]-e[0])*a,o=e[1]+(i[1]-e[1])*a;t.setAttribute("transform",`translate(${r}, ${o})`)}),b.push(()=>{a?t.setAttribute("transform",a):t.removeAttribute("transform")})})(t,e.shifts[`g${t.getAttribute("rel")}`]);const i=!!t.closest(".apexcharts-graphical"),s=i?M:(t,e)=>e.y+(t-u.y)*e.h/u.h;t.querySelectorAll(":scope > line").forEach(t=>w(t,["y1","y2"],s)),t.querySelectorAll(":scope > .apexcharts-yaxis-title").forEach(t=>C(t,t=>[0,(i?0:t.y-u.y)+_(t)/2]))}),y<.5)return;const L=(t,e,i)=>t+(e-t)*i;let E=()=>{};const P={graphical:d,rect:l({},g),done:!1,finish(){P.done||(P.done=!0,E(),b.forEach(t=>t()),h.layoutTween===P&&(h.layoutTween=null))}},B=t=>{const e={x:L(g.x,u.x,t),y:L(g.y,u.y,t),w:L(g.w,u.w,t),h:L(g.h,u.h,t)};P.rect=e,m.forEach(i=>i(e,t))};h.layoutTween=P,E=Se(t,()=>P.finish()),B(0);const N=performance.now(),z=e=>{var i;if(P.done)return;if(h.isDestroyed||(null==(i=t.dom.elGraphical)?void 0:i.node)!==d)return P.done=!0,E(),void(h.layoutTween===P&&(h.layoutTween=null));const r=Math.max(0,Math.min(1,(e-N)/s));r<1?(B(a(r)),v.requestAnimationFrame(z)):P.finish()};v.requestAnimationFrame(z)}function _e(t){var e;const i=t.config.chart.animations;if(!i||!1===i.enabled)return!1;if(!i.dynamicAnimation||!1===i.dynamicAnimation.enabled)return!1;const s=null!=(e=i.largeDatasetThreshold)?e:0;return!(s>0&&t.globals.dataPoints>s)&&!!(p.isBrowser()&&t.globals.dataChanged&&t.globals.shouldAnimate)}function De(t){const e=new Map;return t.map(t=>{const i=e.get(t)||0;return e.set(t,i+1),0===i?t:`${t}#${i}`})}function Fe(t,e,i=0|(i=>null==(i=t.seriesData.series[e])?void 0:i.length)()){return De(Array.from({length:i},(i,s)=>function(t,e,i){var s,a,r,o;if(null==(s=t.axisFlags)?void 0:s.isXNumeric){const s=null==(r=null==(a=t.seriesData)?void 0:a.seriesX)?void 0:r[e];if(s&&s.length&&null!=s[i])return"x:"+s[i]}const n=null==(o=t.globals.labels)?void 0:o[i];return null!=n&&""!==String(n)?"c:"+(Array.isArray(n)?n.join(" "):String(n)):"j:"+i}(t,e,s)))}function Le(t,e,i=!1,s=!1){var a,r;if(!_e(t))return null;const o=t.globals.prevStreamFrame;if(!o)return null;const n=null==(a=o.seriesY)?void 0:a[e],l=null==(r=t.seriesData.series)?void 0:r[e];if(!Array.isArray(n)||!Array.isArray(l))return null;if(!n.length||!l.length)return null;const c=De(n.map((t,i)=>function(t,e,i){var s,a;if(t.isXNumeric){const a=null==(s=t.seriesX)?void 0:s[e];if(a&&a.length&&null!=a[i])return"x:"+a[i]}const r=null==(a=t.labels)?void 0:a[i];return null!=r&&""!==String(r)?"c:"+(Array.isArray(r)?r.join(" "):String(r)):"j:"+i}(o,e,i))),h=Fe(t,e),d=function(t,e){const i=new Map;t.forEach((t,e)=>{i.has(t)||i.set(t,e)});const s=new Array(e.length),a=new Set;let r=-1,o=!0,n=t.length===e.length;e.forEach((t,e)=>{const l=i.has(t)&&!a.has(i.get(t))?i.get(t):-1;s[e]=l,-1!==l&&(a.add(l),l<r&&(o=!1),r=l),l!==e&&(n=!1)});const l=[];for(let e=0;e<t.length;e++)a.has(e)||l.push(e);return{toOld:s,exits:l,ordered:o,changed:!n}}(c,h);return(d.ordered||s)&&(d.changed||i)?{join:d,oldKeys:c,newKeys:h}:null}function Ee(t){var e,i;const s=t.config.chart.animations;return $t(null!=(i=null==(e=s.dynamicAnimation)?void 0:e.easing)?i:s.easing)}function Pe(t,e,i,s,a){const r=performance.now(),o=n=>{if(t.globals.isDestroyed)return;const l=Math.max(0,Math.min(1,(n-r)/e));s(i(l),l),l<1?v.requestAnimationFrame(o):a&&a()};v.requestAnimationFrame(o)}function Be(t){const e={};return t.map(t=>{const i=`${(t.closest(".apexcharts-yaxis")||t).getAttribute("rel")}|${t.textContent}`;return`${i}#${e[i]=(e[i]||0)+1}`})}function Ne(t,e,i){const s=[...t.querySelectorAll(e)],a=Be(s);return s.map((t,e)=>{var s,r,o;return{text:a[e],display:null!=(o=null!=(r=null==(s=t.querySelector("tspan"))?void 0:s.textContent)?r:t.textContent)?o:"",pos:parseFloat(t.getAttribute(i)||""),transform:t.getAttribute("transform")}})}function ze(t,e,i){return[...t.querySelectorAll(e)].map(t=>parseFloat(t.getAttribute(i)||""))}const Re=":not(.apexcharts-tick-ghost)",Ie=`.apexcharts-xaxis-texts-g text:not(.apexcharts-xaxis-group-label)${Re}`,Oe=`.apexcharts-yaxis-texts-g text${Re}`,Xe=`.apexcharts-gridlines-vertical line${Re}`,He=`.apexcharts-gridlines-horizontal line${Re}`;function Ye(t){var e,i;const s=t.globals;if(!(null==(e=t.axisFlags)?void 0:e.isXNumeric)||s.isBarHorizontal)return null;if(null==(i=t.config.xaxis)?void 0:i.reversed)return null;const a=s.minX,r=s.maxX,o=t.layout.gridWidth;return isFinite(a)&&isFinite(r)&&r>a&&o>0?{min:a,max:r,width:o}:null}function We(t,e){var i;const s=t.globals;if(s.isBarHorizontal)return null;if(!Array.isArray(t.config.yaxis)||1!==t.config.yaxis.length)return null;if(null==(i=t.config.yaxis[0])?void 0:i.logarithmic)return null;const a=s.minY,r=s.maxY;if(!(isFinite(a)&&isFinite(r)&&r>a))return null;const o=e.map(t=>t.pos).filter(t=>isFinite(t));return o.length<2?null:{min:a,max:r,pLo:Math.max(...o),pHi:Math.min(...o)}}function $e(t,e){if(!t||!e)return null;const i=t.pHi-t.pLo,s=e.pHi-e.pLo,a=t.max-t.min,r=e.max-e.min;if(!(i&&s&&a>0&&r>0))return null;return{toNew:o=>e.pLo+((e=>t.min+(e-t.pLo)/i*a)(o)-e.min)/r*s,toOld:o=>t.pLo+((t=>e.min+(t-e.pLo)/s*r)(o)-t.min)/a*i}}function Ge(t,e,i,s,a){t.globals.chromeTweens||(t.globals.chromeTweens=new Set);const r=t.globals.chromeTweens;let o=!1;const n=()=>{o||(o=!0,r.delete(n),a())};r.add(n),Pe(t,e,i,t=>{o||s(t)},n)}function je(t){const e=t.globals;e.layoutTween&&e.layoutTween.finish(),function(t){const e=t.globals.chromeTweens;e&&e.size&&[...e].forEach(t=>t())}(t)}function Ue(t,e,i,s){const a=e.style;a.opacity="0",Ge(t,i,s,t=>{a.opacity=String(t)},()=>{a.opacity=""})}function Ve(t,e,i,s,a,r,o){i.forEach(t=>e.setAttribute(t,String(s))),Ge(t,r,o,t=>{const r=String(s+(a-s)*t);i.forEach(t=>e.setAttribute(t,r))},()=>{i.forEach(t=>e.setAttribute(t,String(a)))})}function qe(t,{template:e,display:i,attrs:s,from:a,to:r,duration:o,ease:n}){const l=e.parentNode;if(!l)return;const c=e.cloneNode(!0);if(c.classList.add("apexcharts-tick-ghost"),c.setAttribute("pointer-events","none"),c.removeAttribute("id"),c.removeAttribute("transform"),void 0!==i){const t=c.querySelector("tspan");t?t.textContent=i:c.textContent=i;const e=c.querySelector("title");e&&(e.textContent=i)}s.forEach(t=>c.setAttribute(t,String(a)));const h=c.style;h.opacity="1",l.appendChild(c),Ge(t,o,n,t=>{const e=String(a+(r-a)*t);s.forEach(t=>c.setAttribute(t,e)),h.opacity=String(1-t)},()=>{c.parentNode&&c.parentNode.removeChild(c)})}function Ze(t,{newLabels:e,oldLabels:i,posAttr:s,newLines:a,oldLines:r,lineAttrs:o,duration:n,ease:h,project:d,driven:p}){const u=new Map;i.forEach((t,e)=>u.set(t.text,c(l({},t),{i:e})));const g=Be(e),x=new Set,f=a.length===e.length,m=r.length===i.length,b=i.map(t=>t.pos).concat(e.map(t=>parseFloat(t.getAttribute(s)||""))).filter(t=>isFinite(t)),y=Math.min(...b),v=Math.max(...b),w=Math.max(40,.25*(v-y)),A=t=>Math.max(y-w,Math.min(v+w,t)),S=(e,i)=>{if(!e)return;const s=parseFloat(e.getAttribute(o[0])||""),a=r[i.i];isFinite(s)&&isFinite(a)&&(p.add(e),Ve(t,e,o,a,s,n,h))};if(e.forEach((e,i)=>{const r=parseFloat(e.getAttribute(s)||""),l=u.get(g[i]),c=f?a[i]:null;l&&x.add(l.i);const m=e.getAttribute("transform");if(l&&isFinite(l.pos)){if(isFinite(r)&&!(Math.abs(l.pos-r)<.5)){if(m||l.transform){const i=l.pos-r;if(isFinite(i)){p.add(e);const a=m||"";Ge(t,n,h,t=>{const r=i*(1-t),o="x"===s?`translate(${r} 0)`:`translate(0 ${r})`;e.setAttribute("transform",`${o} ${a}`.trim())},()=>{a?e.setAttribute("transform",a):e.removeAttribute("transform")})}return void S(c,l)}p.add(e),Ve(t,e,[s],l.pos,r,n,h),S(c,l)}}else if(!l){if(d&&isFinite(r)&&!m){const i=isFinite(d.toOld(r))?A(d.toOld(r)):NaN;isFinite(i)&&Math.abs(i-r)>.5&&(p.add(e),Ve(t,e,[s],i,r,n,h),c&&(p.add(c),Ve(t,c,o,i,r,n,h)))}Ue(t,e,n,h),c&&Ue(t,c,n,h)}}),!d||!e.length)return;let C=0;i.forEach((i,l)=>{if(x.has(l))return;if(!isFinite(i.pos)||i.transform)return;if(C>=20)return;const c=d.toNew(i.pos);!isFinite(c)||Math.abs(c-i.pos)<.5||(C++,qe(t,{template:e[0],display:i.display,attrs:[s],from:i.pos,to:A(c),duration:n,ease:h}),m&&a.length&&isFinite(r[l])&&qe(t,{template:a[0],attrs:o,from:r[l],to:A(d.toNew(r[l])),duration:n,ease:h}))})}function Ke(t,{layout:e=!0}={}){const i=t.globals,s=i.prevChromeFrame;if(i.prevChromeFrame=null,s&&je(t),!(null==s?void 0:s.pending)||!i.axisCharts||!p.isBrowser())return;if(!_e(t))return;if(!(t.seriesData.series||[]).some((e,i)=>null!==Le(t,i,!0,!0)))return;const a=t.dom.baseEl;if(!S.elementExists(a))return;const r=Math.max(1,t.config.chart.animations.dynamicAnimation.speed||1),o=Ee(t),n=new Set;try{const i=[...a.querySelectorAll(Oe)],l=function(t,e){if(!t||!e)return null;const i=t.max-t.min,s=e.max-e.min;return i>0&&s>0&&t.width>0&&e.width>0?{toNew:a=>(t.min+a/t.width*i-e.min)/s*e.width,toOld:a=>(e.min+a/e.width*s-t.min)/i*t.width}:null}(s.xScale,Ye(t)),c=$e(s.yAnchors,We(t,i.map(t=>({pos:parseFloat(t.getAttribute("y")||"")}))));Ze(t,{newLabels:[...a.querySelectorAll(Ie)],oldLabels:s.xLabels,posAttr:"x",newLines:[...a.querySelectorAll(Xe)],oldLines:s.vGrid,lineAttrs:["x1","x2"],duration:r,ease:o,project:l,driven:n}),Ze(t,{newLabels:i,oldLabels:s.yLabels,posAttr:"y",newLines:[...a.querySelectorAll(He)],oldLines:s.hGrid,lineAttrs:["y1","y2"],duration:r,ease:o,project:c,driven:n}),e&&Te(t,s.layout,{driven:n,duration:r,ease:o})}catch(t){}}function Je(t,e){const i=t.globals.circleTween;return i&&!i.done&&i.node===e.node?l({},i.circle):{cx:e.cx,cy:e.cy,r:e.r}}function Qe(t,e){var i,s;const a=null==(i=t.getCTM)?void 0:i.call(t),r=null==(s=e.getCTM)?void 0:s.call(e);if(!a||!r)return null;const o=r.inverse().multiply(a);return new DOMMatrix([o.a,o.b,o.c,o.d,o.e,o.f])}function ti(t,e){var i;try{const s=Qe(t,e),a=t.getBBox();if(!s||!(a.width>0||a.height>0))return null;const r=new DOMPoint(a.x+a.width/2,a.y+a.height/2).matrixTransform(s),o=Math.hypot(s.a,s.b),n=parseFloat(null!=(i=t.getAttribute("opacity"))?i:""),l=Number.isFinite(n)?n:1;return[r.x,r.y,o].every(Number.isFinite)&&o>0?{x:r.x,y:r.y,k:o,o:l}:null}catch(t){return null}}function ei(t,e,i){const s=new Map,a={};return t.querySelectorAll("text").forEach(r=>{var o,n;const l=r.closest("[data\\:slice], [rel]"),c=l&&t.contains(l)?null!=(o=l.getAttribute("data:slice"))?o:l.getAttribute("rel"):"",h=`${r.getAttribute("class")||""}|${c}`;a[h]=(null!=(n=a[h])?n:-1)+1;const d=`${h}#${a[h]}`,p=ti(r,e);p&&s.set(d,p),i&&i(r,d)}),s}function ii(t,e){const i=e.ownerSVGElement;if(!i)return null;const s=i.getBoundingClientRect(),a=t.getBoundingClientRect();return a.width>0&&a.height>0&&s.width>0&&s.height>0?{l:a.left-s.left,t:a.top-s.top,r:a.right-s.left,b:a.bottom-s.top,W:s.width,H:s.height}:null}function si(t,{layout:e=!0}={}){var i;const s=t.globals,a=s.prevCircleFrame;s.prevCircleFrame=null;const r=s.circleGeometry;if(s.circleTween&&s.circleTween.node!==(null==r?void 0:r.node)&&s.circleTween.finish(),!(null==a?void 0:a.pending)||!e||!p.isBrowser())return;if(!_e(t))return;const o=null==(i=t.dom.elGraphical)?void 0:i.node;if(!r||!o||!o.contains(r.node))return;if(!function(t,e){const i=t.drawn,s=e.ownerSVGElement;if(!i||!s)return!0;const a=s.getBoundingClientRect();if(!(a.width>0&&a.height>0))return!0;const r=2,o=(t,e)=>e<=Math.max(0,t)+r;return o(-i.l,-i.l)&&o(-i.t,-i.t)&&o(i.r-i.W,i.r-a.width)&&o(i.b-i.H,i.b-a.height)}(a,o))return;const n=Math.max(1,t.config.chart.animations.dynamicAnimation.speed||1),c=Ee(t);try{!s.axisCharts&&a.layout&&Te(t,a.layout,{driven:new Set,duration:n,ease:c}),function(t,{from:e,texts:i,to:s,graphical:a,duration:r,ease:o}){const n=t.globals,c=s.node,h={cx:s.cx,cy:s.cy,r:s.r},d=t=>[t.cx,t.cy,t.r].every(Number.isFinite)&&t.r>0;if(!d(e)||!d(h))return;if(Math.max(Math.abs(e.cx-h.cx),Math.abs(e.cy-h.cy),Math.abs(e.r-h.r))<.5)return;const p=(t,e,i)=>t+(e-t)*i,u=c.getAttribute("transform"),g=[],x=[],f=(t,e)=>{e?t.setAttribute("transform",e):t.removeAttribute("transform")},m=e.r/h.r;ei(c,a,(t,s)=>{const r=t.parentNode,o=r?Qe(r,a):null,n=ti(t,a);if(!o||!n)return;const l=i.get(s),c=null!=l?l:{x:e.cx+m*(n.x-h.cx),y:e.cy+m*(n.y-h.cy),k:n.k},d=t.getAttribute("transform"),u=t.getAttribute("opacity"),b=o.inverse(),y=(t.getAttribute("transform-origin")||"").split(/[\s,]+/).map(t=>parseFloat(t)),[v,w]=2===y.length&&y.every(Number.isFinite)?y:[0,0],A=l?l.o:0;x.push((e,i,s)=>{const a={x:p(c.x,n.x,s),y:p(c.y,n.y,s)},r=p(c.k/n.k,1,s),l=new DOMMatrix([r/i,0,0,r/i,h.cx+(a.x-e.cx-r*n.x)/i,h.cy+(a.y-e.cy-r*n.y)/i]);let u=b.multiply(l).multiply(o);(v||w)&&(u=(new DOMMatrix).translate(-v,-w).multiply(u).translate(v,w)),t.setAttribute("transform",`matrix(${u.a}, ${u.b}, ${u.c}, ${u.d}, ${u.e}, ${u.f}) ${d||""}`.trim()),A<.999&&t.setAttribute("opacity",String(p(A,1,s)))}),g.push(()=>{f(t,d),A<.999&&(null===u?t.removeAttribute("opacity"):t.setAttribute("opacity",u))})}),c.querySelectorAll(".apexcharts-slices path[transform]").forEach(t=>{const e=t.getAttribute("transform")||"",i=/^translate\(\s*([-+.\deE]+)[\s,]+([-+.\deE]+)\s*\)$/.exec(e.trim());if(!i)return;const s=parseFloat(i[1]),a=parseFloat(i[2]);let r=e,o=!0;x.push((e,i)=>{o&&(t.getAttribute("transform")===r?(r=`translate(${s/i} ${a/i})`,t.setAttribute("transform",r)):o=!1)}),g.push(()=>{o&&t.getAttribute("transform")===r&&t.setAttribute("transform",e)})});let b=()=>{};const y={node:c,circle:l({},e),target:l({},h),done:!1,finish(){y.done||(y.done=!0,b(),f(c,u),g.forEach(t=>t()),n.circleTween===y&&(n.circleTween=null))}},w=t=>{const i={cx:p(e.cx,h.cx,t),cy:p(e.cy,h.cy,t),r:p(e.r,h.r,t)};y.circle=i;const s=i.r/h.r;c.setAttribute("transform",`translate(${i.cx}, ${i.cy}) scale(${s}) translate(${-h.cx}, ${-h.cy}) ${u||""}`.trim()),x.forEach(e=>e(i,s,t))};n.circleTween=y,b=Se(t,()=>y.finish()),w(0);const A=performance.now(),S=e=>{var i;if(y.done)return;if(n.isDestroyed||(null==(i=t.dom.elGraphical)?void 0:i.node)!==a||!a.contains(c))return y.done=!0,b(),void(n.circleTween===y&&(n.circleTween=null));const s=Math.max(0,Math.min(1,(e-A)/r));s<1?(w(o(s)),v.requestAnimationFrame(S)):y.finish()};v.requestAnimationFrame(S)}(t,{from:a.circle,texts:a.texts,to:r,graphical:o,duration:n,ease:c})}catch(t){s.circleTween&&!s.circleTween.done&&s.circleTween.finish()}}const ai=".apexcharts-data-labels[data\\:dlKey]",ri=".apexcharts-datalabel",oi=".apexcharts-datalabel-total[data\\:dlTotalKey]";function ni(t){var e,i;const s=t.config.dataLabels;return!(!(null==(e=null==s?void 0:s.animate)?void 0:e.enabled)&&!(null==(i=null==s?void 0:s.countUp)?void 0:i.enabled))}function li(t){if(!isFinite(t))return 0;const e=String(Math.abs(t)),i=e.indexOf("e");if(-1!==i){const t=e.slice(0,i),s=parseInt(e.slice(i+1),10),a=t.indexOf("."),r=-1===a?0:t.length-a-1;return Math.min(6,Math.max(0,r-s))}const s=e.indexOf(".");return-1===s?0:Math.min(6,e.length-s-1)}function ci(t,e){const i=t.querySelectorAll("tspan");[].concat(e).forEach((e,s)=>{const a=i.length?i[s]:t;a&&(a.textContent=e)})}const hi=t=>"number"==typeof t?t:NaN;function di(t,e){let i=-1,s=1/0;for(let a=0;a<t.length;a++){const r=t[a];if(null==r)continue;const o=Math.abs(r-e);o<s&&(s=o,i=a)}return i}function pi(t){var e;const i=t.globals,s=i.exitLabels,a=i.riseLabels;if(i.exitLabels=null,i.riseLabels=null,!p.isBrowser())return;if(a&&function(t,e){const i=t.globals,s=t.dom.baseEl;if(!S.elementExists(s))return;const a=Math.max(1,t.config.chart.animations.dynamicAnimation.speed||1),r=Ee(t);try{e.forEach(({oldX:e,oldY:o},n)=>{var l,c;const h=(null==(l=i.seriesXvalues)?void 0:l[n])||[],d=(null==(c=i.seriesYvalues)?void 0:c[n])||[];s.querySelectorAll(`.apexcharts-datalabels[data\\:realIndex="${n}"] .apexcharts-data-labels:not([data\\:dlKey]) ${ri}`).forEach(i=>{const s=di(h,parseFloat(i.getAttribute("cx")||"")),n=hi(e[s])-hi(h[s]),l=hi(o[s])-hi(d[s]);if(s<0||!isFinite(n)||!isFinite(l))return;const c=i.previousElementSibling,p=c&&"rect"===c.tagName.toLowerCase()?[c,i]:[i],u=p.map(t=>t.getAttribute("transform")||""),g=t=>p.forEach((e,i)=>{const s=1-t;e.setAttribute("transform",`translate(${n*s} ${l*s}) ${u[i]}`.trim()),e.setAttribute("opacity",String(t))});g(0),Pe(t,a,r,g,()=>p.forEach((t,e)=>{u[e]?t.setAttribute("transform",u[e]):t.removeAttribute("transform"),t.removeAttribute("opacity")}))})})}catch(t){}}(t,a),!s)return;const r=null==(e=t.dom.elGraphical)?void 0:e.node;if(!r)return;const o=t.dom.baseEl,n=document.createElementNS("http://www.w3.org/2000/svg","g");n.setAttribute("class","apexcharts-label-exit"),n.setAttribute("pointer-events","none"),r.appendChild(n);const l=Math.max(1,t.config.chart.animations.dynamicAnimation.speed||1),c=Ee(t),h=t=>1-Math.pow(1-t,3),d=!!t.globals.isBarHorizontal;let u=0;const g=()=>{--u<=0&&n.remove()};try{s.forEach(({realIndex:e,node:s,key:a,oldX:r,oldY:p})=>{var x,f,m;if(o.querySelector(`.apexcharts-datalabels[data\\:realIndex="${e}"] .apexcharts-data-labels`))return;n.appendChild(s);const b=[...s.querySelectorAll(ri)].map(t=>{const e=t.previousElementSibling;return e&&"rect"===e.tagName.toLowerCase()?[e,t]:[t]}),y=[];let v=c;const w=a?o.querySelector(`.apexcharts-bar-ghost[data\\:ghostKey="${a}"]`):null,A=parseFloat(null!=(x=null==w?void 0:w.getAttribute("data:ghostEdge"))?x:"");if(w&&isFinite(A))v=h,b.forEach(t=>{const e=t[t.length-1],i=parseFloat(e.getAttribute(d?"cx":"cy")||"");if(!isFinite(i))return;const s=A-i;y.push({els:t,dx:d?s:0,dy:d?0:s})});else if(!a){const t=(null==(f=i.seriesXvalues)?void 0:f[e])||[],s=(null==(m=i.seriesYvalues)?void 0:m[e])||[];b.forEach(e=>{const i=e[e.length-1],a=di(r,parseFloat(i.getAttribute("cx")||"")),o=hi(t[a])-hi(r[a]),n=hi(s[a])-hi(p[a]);a<0||!isFinite(o)||!isFinite(n)||y.push({els:e,dx:o,dy:n})})}const S=y.flatMap(({els:t})=>t.map(t=>({el:t,base:t.getAttribute("transform")||""})));u++,Pe(t,l,v,t=>{s.setAttribute("opacity",String(1-t));let e=0;y.forEach(({els:i,dx:s,dy:a})=>{i.forEach(i=>{const{base:r}=S[e++];i.setAttribute("transform",`translate(${s*t} ${a*t}) ${r}`.trim())})})},g)})}catch(t){}u||n.remove()}function ui(t,{el:e,oldCx:i,oldCy:s,duration:a,ease:r,delay:o=0}){const n=e.hasAttribute("cx")?e:e.querySelector(ri);if(!n)return;const l=i-parseFloat(n.getAttribute("cx")||""),c=s-parseFloat(n.getAttribute("cy")||"");if(!isFinite(l)||!isFinite(c))return;if(Math.abs(l)+Math.abs(c)<=.5)return;const h=e.getAttribute("transform")||"",d=()=>Pe(t,a,r,t=>{const i=1-t;e.setAttribute("transform",`translate(${l*i} ${c*i}) ${h}`.trim())},()=>{h?e.setAttribute("transform",h):e.removeAttribute("transform")});e.setAttribute("transform",`translate(${l} ${c}) ${h}`.trim()),o>0?setTimeout(()=>{t.globals.isDestroyed||d()},o):d()}function gi(t,{el:e,from:i,to:s,formatter:a,fmtOpts:r,duration:o,ease:n,delay:l=0}){if(!isFinite(i)||!isFinite(s))return;if(Math.abs(s-i)<=1e-9)return;const c=Math.max(li(i),li(s)),h=t=>{const e=Number(t.toFixed(c));let i=e;if("function"==typeof a)try{i=a(e,r)}catch(t){i=e}return i},d=e.cloneNode(!0),p=()=>Pe(t,o,n,t=>{ci(e,h(i+(s-i)*t))},()=>{e.replaceChildren(...Array.from(d.childNodes))});ci(e,h(i)),l>0?setTimeout(()=>{t.globals.isDestroyed||p()},l):p()}function xi(t){var e,i;const s=t.globals,a=s.prevDataLabels;if(s.prevDataLabels=null,!a||!s.axisCharts||!p.isBrowser())return;if(!ni(t))return;if(!_e(t))return;const r=t.dom.baseEl;if(!S.elementExists(r))return;const o=t.config.dataLabels,n=!!(null==(e=o.animate)?void 0:e.enabled),h=!!(null==(i=o.countUp)?void 0:i.enabled),d=o.formatter,u=Math.max(1,t.config.chart.animations.dynamicAnimation.speed||1),g=Ee(t);try{r.querySelectorAll(ai).forEach(e=>{const i=e.getAttribute("data:dlKey");if(!i)return;const s=e.querySelector(ri);if(!s)return;const r=a.get(i),o=parseInt(e.getAttribute("data:dlDelay")||"0",10)||0;if(n&&(r&&isFinite(r.cx)&&isFinite(r.cy)?ui(t,{el:e,oldCx:r.cx,oldCy:r.cy,duration:u,ease:g,delay:o}):r||function(t,e,i,s){const a=e.style;a.opacity="0",Pe(t,i,s,t=>{a.opacity=String(t)},()=>{a.opacity=""})}(t,e,u,g)),h&&r){const a=parseInt(i,10),n=parseInt(e.getAttribute("data:dlJ")||"",10);gi(t,{el:s,from:r.val,to:parseFloat(e.getAttribute("data:dlVal")||""),formatter:d,fmtOpts:c(l({},t),{seriesIndex:a,dataPointIndex:isFinite(n)?n:0,w:t}),duration:u,ease:g,delay:o})}});const e=t.config.plotOptions.bar.dataLabels.total.formatter||d;r.querySelectorAll(oi).forEach(i=>{const s=i.getAttribute("data:dlTotalKey");if(!s)return;const r=a.get(`total::${s}`);if(!r)return;const o=parseInt(i.getAttribute("data:dlDelay")||"0",10)||0;if(n&&isFinite(r.cx)&&isFinite(r.cy)&&ui(t,{el:i,oldCx:r.cx,oldCy:r.cy,duration:u,ease:g,delay:o}),h){const a=parseInt(i.getAttribute("data:dlTotalSeries")||s,10);gi(t,{el:i,from:r.val,to:parseFloat(i.getAttribute("data:dlTotalVal")||""),formatter:e,fmtOpts:c(l({},t),{seriesIndex:a,dataPointIndex:0,w:t}),duration:u,ease:g,delay:o})}})}catch(t){}}const fi=class t{constructor(t,{toggleDataSeries:e,revertDefaultAxisMinMax:i,updateSeries:s}={}){this.w=t,this._toggleDataSeries=e||null,this._revertDefaultAxisMinMax=i||null,this._updateSeries=s||null,this.legendInactiveClass="legend-mouseover-inactive"}clearSeriesCache(){const t=this.w;t.globals.cachedSelectors&&delete t.globals.cachedSelectors.highlightSeriesEls}getSeriesByName(t){return this.w.dom.baseEl.querySelector(`.apexcharts-inner .apexcharts-series[seriesName='${S.escapeString(t)}']`)}isSeriesHidden(t){var e;const i=this.getSeriesByName(t);if(!i)return{isHidden:!1,realIndex:-1};const s=parseInt(null!=(e=i.getAttribute("data:realIndex"))?e:"0",10),a=this.w.globals;return{isHidden:i.classList.contains("apexcharts-series-collapsed")||a.collapsedSeriesIndices.includes(s)||a.ancillaryCollapsedSeriesIndices.includes(s),realIndex:s}}static addCollapsedClassToSeries(t,e,i){let s=!1;function a(t){for(let a=0;a<t.length;a++)t[a].index===i&&(e.node.classList.add("apexcharts-series-collapsed"),s=!0)}if(a(t.globals.collapsedSeries),a(t.globals.ancillaryCollapsedSeries),!s)return;if(-1===(t.globals.collapsingSeriesIndices||[]).indexOf(i))return;if(e.node.classList.add("apexcharts-series-collapsing"),!p.isBrowser())return;const r=t.config.chart.animations,o=(r.dynamicAnimation.speed||0)+(r.speed||0)+100;setTimeout(()=>{t.globals.isDestroyed||e.node.classList.remove("apexcharts-series-collapsing")},o)}static treemapLabelLook(t){const e=t.querySelector("text"),i=((null==e?void 0:e.textContent)||"").trim();if(!e||!i)return"";const s=/rotate\(/.test(`${t.getAttribute("transform")||""} ${e.getAttribute("transform")||""}`);return`${i}|${e.getAttribute("font-size")}|${s}`}static treemapHeaderLook(t){return t?`${t.textContent}|${t.getAttribute("font-size")}`:""}static settleCollapsedShapes(t,e){var i;const s=(Array.isArray(e)?e:[e]).map(t=>t&&t.node?t.node:t).filter(t=>t&&"function"==typeof t.querySelectorAll),a=[],r=[];if(s.forEach(t=>{t.querySelectorAll(".apexcharts-series-collapsed").forEach(t=>a.push(t)),t.querySelectorAll(".apexcharts-leaving").forEach(t=>r.push(t))}),!a.length&&!r.length)return;const o=e=>{t.globals.isDestroyed||(e.classList.remove("apexcharts-series-collapsing"),e.querySelectorAll(".apexcharts-marker-exit, .apexcharts-bar-ghost").forEach(t=>t.remove()),e.querySelectorAll("path").forEach(t=>{t.setAttribute("d","")}))},n=()=>{t.globals.isDestroyed||r.forEach(t=>t.remove())},l=t.config.chart.animations;if(!(p.isBrowser()&&l.enabled&&!1!==t.globals.shouldAnimate&&(!t.globals.dataChanged||l.dynamicAnimation.enabled)))return n(),void a.forEach(o);const c=null==(i=t.globals.morphBatch)?void 0:i.series,h=[];a.forEach(t=>{const e=t.getAttribute("data:realIndex"),i=null===e?null:null==c?void 0:c.get(Number(e));if(!i||i.pending<=0)return void h.push(t);const s=i.onDone;i.onDone=()=>{null==s||s(),o(t)}});const d=(l.dynamicAnimation.speed||0)+(l.speed||0)+100;setTimeout(()=>{n(),h.forEach(o)},d)}settleCollapsedShapes(e){t.settleCollapsedShapes(this.w,e)}toggleSeries(t){var e;const{isHidden:i,realIndex:s}=this.isSeriesHidden(t);return s>-1&&(null==(e=this._toggleDataSeries)||e.call(this,s,i)),i}showSeries(t){var e;const i=this.isSeriesHidden(t);i.isHidden&&(null==(e=this._toggleDataSeries)||e.call(this,i.realIndex,!0))}hideSeries(t){var e;const i=this.isSeriesHidden(t);!i.isHidden&&i.realIndex>-1&&(null==(e=this._toggleDataSeries)||e.call(this,i.realIndex,!1))}prepareDataUpdate(){const t=this.w;this.clearSeriesCache(),t.globals.previousPaths=[],t.globals.axisCharts||(t.globals.collapsedSeries=[],t.globals.ancillaryCollapsedSeries=[],t.globals.collapsedSeriesIndices=[],t.globals.ancillaryCollapsedSeriesIndices=[])}resetSeries(t=!0,e=!0,i=!0){var s,a;const r=this.w;this.clearSeriesCache();let o=S.clone(r.globals._initialSeriesPeek);Array.isArray(o)||(o=S.clone(r.config.series)||[]),r.globals.previousPaths=[],i?(r.globals.collapsedSeries=[],r.globals.ancillaryCollapsedSeries=[],r.globals.collapsedSeriesIndices=[],r.globals.ancillaryCollapsedSeriesIndices=[]):o=this.emptyCollapsedSeries(o),r.config.series=o,t&&(e&&(r.interact.zoomed=!1,null==(s=this._revertDefaultAxisMinMax)||s.call(this)),null==(a=this._updateSeries)||a.call(this,o,r.config.chart.animations.dynamicAnimation.enabled))}emptyCollapsedSeries(t){const e=this.w.globals;if(!Array.isArray(t))return t;for(let i=0;i<t.length;i++)(e.collapsedSeriesIndices.includes(i)||e.ancillaryCollapsedSeriesIndices.includes(i))&&(t[i]&&"object"==typeof t[i]?t[i].data=[]:t[i]=0);return t}_deriveSeriesNames(t){const e=this.w,i=t||e.config.series||[],s=e.config.labels||[];return i.map((t,e)=>t&&"object"==typeof t&&null!=t.name?String(t.name):null!=s[e]?String(s[e]):`series-${e+1}`)}reconcileCollapsedByName(t){const e=this.w,i=e.globals,s=t||e.config.series,a=this._deriveSeriesNames(s),r=t=>{const e=[],r=[];return t.forEach(t=>{const o=t&&null!=t.name&&a[t.index]!==t.name?a.indexOf(t.name):t.index;if(null==o||o<0||o>=s.length)return;const n=s[o];t.index=o,i.axisCharts?n&&Array.isArray(n.data)&&n.data.length&&(t.data=n.data.slice()):t.data=n,e.push(t),r.push(o)}),{records:e,indices:r}},o=r(i.collapsedSeries);i.collapsedSeries=o.records,i.collapsedSeriesIndices=o.indices;const n=r(i.ancillaryCollapsedSeries);i.ancillaryCollapsedSeries=n.records,i.ancillaryCollapsedSeriesIndices=n.indices,i.allSeriesCollapsed=i.collapsedSeries.length+i.ancillaryCollapsedSeries.length===s.length,this.emptyCollapsedSeries(s)}canvasRestyle(t){const e=this.w.globals.activeRenderer;e&&"canvas"===e.kind&&"function"==typeof e.restyle&&e.restyle(t)}highlightSeries(t){var e;const i=this.w,s=this.getSeriesByName(t),a=parseInt(null!=(e=null==s?void 0:s.getAttribute("data:realIndex"))?e:"",10),r="highlightSeriesEls";let o=i.globals.cachedSelectors[r];o||(o=i.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis"),i.globals.cachedSelectors[r]=o);let n=null,l=null,c=null;if(i.globals.axisCharts||"radialBar"===i.config.chart.type)if(i.globals.axisCharts){n=i.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${a}']`),l=i.dom.baseEl.querySelector(`.apexcharts-datalabels[data\\:realIndex='${a}']`);const t=i.globals.seriesYAxisReverseMap[a];c=i.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${t}']`)}else n=i.dom.baseEl.querySelector(`.apexcharts-series[rel='${a+1}']`);else n=i.dom.baseEl.querySelector(`.apexcharts-series[rel='${a+1}'] path`);for(let t=0;t<o.length;t++){o[t].classList.add(this.legendInactiveClass)}if(n){if(!i.globals.axisCharts){const t=n.parentNode;null==t||t.classList.remove(this.legendInactiveClass)}n.classList.remove(this.legendInactiveClass),null!==l&&l.classList.remove(this.legendInactiveClass),null!==c&&c.classList.remove(this.legendInactiveClass)}else for(let t=0;t<o.length;t++){o[t].classList.remove(this.legendInactiveClass)}this.canvasRestyle(n&&!Number.isNaN(a)?{active:a,opacity:.2}:null)}toggleSeriesOnHover(t,e){const i=this.w;e||(e=t.target);const s=i.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis");if("mousemove"===t.type){const t=parseInt(e.getAttribute("rel"),10)-1;this.highlightSeries(i.seriesData.seriesNames[t])}else if("mouseout"===t.type){for(let t=0;t<s.length;t++)s[t].classList.remove(this.legendInactiveClass);this.canvasRestyle(null)}}highlightRangeInSeries(t,e){var i,s;const a=this.w,r="treemap"===a.config.chart.type?"treemap":"heatmap",o=a.dom.baseEl.getElementsByClassName(`apexcharts-${r}-rect`),n=t=>{for(let e=0;e<o.length;e++){const i=o[e].classList;"function"==typeof i[t]&&i[t](this.legendInactiveClass)}};if("reset"===e)return void n("remove");const l=a.config.plotOptions[r].colorScale.ranges,c=l&&l[t];if(c){n("add");for(let t=0;t<o.length;t++){const e=o[t],r=Number(null!=(s=e.getAttribute("val"))?s:null==(i=a.seriesData.series[e.getAttribute("i")])?void 0:i[e.getAttribute("j")]);r>=c.from&&r<=c.to&&e.classList.remove(this.legendInactiveClass)}}}getActiveConfigSeriesIndex(t="asc",e=[]){const i=this.w;let s=0;if(i.config.series.length>1){const a=i.config.series.map((t,s)=>t.data&&t.data.length>0&&-1===i.globals.collapsedSeriesIndices.indexOf(s)&&(!i.globals.comboCharts||0===e.length||e.length&&e.indexOf(t.type||i.config.chart.type)>-1)?s:-1);for(let e="asc"===t?0:a.length-1;"asc"===t?e<a.length:e>=0;"asc"===t?e++:e--)if(-1!==a[e]){s=a[e];break}}return s}getActiveConfigSeriesIndexByGroup(t=[]){const e=this.w;return(e.labelData.seriesGroups||[]).map((i,s)=>{let a=-1;return e.config.series.forEach((i,r)=>{if(e.labelData.seriesGroupIndex[r]!==s)return;if(e.globals.comboCharts&&t.length&&-1===t.indexOf(i.type||e.config.chart.type))return;i.data&&i.data.length>0&&-1===e.globals.collapsedSeriesIndices.indexOf(r)&&(a=r)}),a})}getBarSeriesIndices(){const t=this.w;return t.globals.comboCharts?this.w.config.series.map((e,i)=>{const s=e.type||t.config.chart.type;return"bar"===s||"column"===s?i:-1}).filter(t=>-1!==t):this.w.config.series.map((t,e)=>e)}getPreviousPaths(){const e=this.w.globals,i=e.pendingCapture;(null==i?void 0:i.pending)?t.HELD.forEach(t=>{e[t]=i[t]}):(this.capturePreviousPaths(),e.pendingCapture=p.isBrowser()?we(Object.fromEntries(t.HELD.map(t=>[t,e[t]]))):null)}capturePreviousPaths(){var e,i,s,a,r,o,n;const l=this.w;if(function(t){var e,i,s;const a=t.globals;if(a.streamScrolled=!1,!a.axisCharts||!t.seriesData||!Array.isArray(t.seriesData.series)||0===t.seriesData.series.length)return void(a.prevStreamFrame=null);const r=[];(null==(i=null==(e=t.dom)?void 0:e.baseEl)?void 0:i.querySelectorAll)&&t.dom.baseEl.querySelectorAll(".apexcharts-marker").forEach(t=>{var e,i,s,a,o;const n=parseInt(null!=(e=t.getAttribute("index"))?e:"",10),l=parseInt(null!=(s=null!=(i=t.getAttribute("j"))?i:t.getAttribute("rel"))?s:"",10),c=parseFloat(null!=(o=null!=(a=t.getAttribute("r"))?a:t.getAttribute("default-marker-size"))?o:"");isFinite(n)&&isFinite(l)&&isFinite(c)&&((r[n]=r[n]||[])[l]=c)}),a.prevStreamFrame={seriesX:(t.seriesData.seriesX||[]).slice(),seriesY:t.seriesData.series.slice(),xPixels:(a.seriesXvalues||[]).slice(),yPixels:(a.seriesYvalues||[]).slice(),rPixels:r,labels:(a.labels||[]).slice(),isXNumeric:!!(null==(s=t.axisFlags)?void 0:s.isXNumeric)}}(l),function(t){var e;const i=t.globals;if(null==(e=i.prevChromeFrame)?void 0:e.pending)return;if(i.prevChromeFrame=null,!i.axisCharts||!p.isBrowser())return;const s=t.dom.baseEl;if(S.elementExists(s))try{const e=Ne(s,Oe,"y");i.prevChromeFrame=we({xLabels:Ne(s,Ie,"x"),yLabels:e,vGrid:ze(s,Xe,"x1"),hGrid:ze(s,He,"y1"),xScale:Ye(t),yAnchors:We(t,e),layout:Me(t)})}catch(t){i.prevChromeFrame=null}}(l),function(t){var e,i;const s=t.globals;if(null==(e=s.prevCircleFrame)?void 0:e.pending)return;s.prevCircleFrame=null;const a=s.circleGeometry,r=null==(i=t.dom.elGraphical)?void 0:i.node;if(a&&r&&p.isBrowser()&&r.contains(a.node))try{s.prevCircleFrame=we({type:t.config.chart.type,circle:Je(t,a),rendered:{cx:a.cx,cy:a.cy,r:a.r},drawn:ii(a.node,r),layout:s.axisCharts?null:Me(t),texts:ei(a.node,r)})}catch(t){s.prevCircleFrame=null}}(l),function(t){const e=t.globals;if(e.prevDataLabels=null,!e.axisCharts||!p.isBrowser())return;if(!ni(t))return;const i=t.dom.baseEl;if(S.elementExists(i))try{const t=new Map;i.querySelectorAll(ai).forEach(e=>{const i=e.getAttribute("data:dlKey");if(!i)return;const s=e.querySelector(ri);s&&t.set(i,{cx:parseFloat(s.getAttribute("cx")||""),cy:parseFloat(s.getAttribute("cy")||""),val:parseFloat(e.getAttribute("data:dlVal")||"")})}),i.querySelectorAll(oi).forEach(e=>{const i=e.getAttribute("data:dlTotalKey");i&&t.set(`total::${i}`,{cx:parseFloat(e.getAttribute("cx")||""),cy:parseFloat(e.getAttribute("cy")||""),val:parseFloat(e.getAttribute("data:dlTotalVal")||"")})}),e.prevDataLabels=t.size?t:null}catch(t){e.prevDataLabels=null}}(l),function(t){const e=t.globals;e.exitLabels=null,e.riseLabels=null;const i=e.collapsingSeriesIndices||[],s=e.risingSeries||[];if(!i.length&&!s.length)return;if(!e.axisCharts||!p.isBrowser())return;if(!_e(t))return;const a=t.dom.baseEl;if(!S.elementExists(a))return;const r=e.prevStreamFrame,o=[],n=new Map;s.forEach(t=>{var e,i;const s=a.querySelector(`.apexcharts-series[data\\:realIndex="${t}"]`);if(!s||!s.classList.contains("apexcharts-series-collapsed"))return;const o=null==(e=null==r?void 0:r.xPixels)?void 0:e[t],l=null==(i=null==r?void 0:r.yPixels)?void 0:i[t];Array.isArray(o)&&Array.isArray(l)&&o.length&&n.set(t,{oldX:o.slice(),oldY:l.slice()})}),e.riseLabels=n.size?n:null;try{i.forEach(t=>{a.querySelectorAll(`.apexcharts-datalabels[data\\:realIndex="${t}"] .apexcharts-data-labels`).forEach(e=>{var i,s;e.querySelector(ri)&&o.push({realIndex:t,node:e.cloneNode(!0),key:e.getAttribute("data:dlKey"),oldX:((null==(i=null==r?void 0:r.xPixels)?void 0:i[t])||[]).slice(),oldY:((null==(s=null==r?void 0:r.yPixels)?void 0:s[t])||[]).slice()})})})}catch(t){return void(e.exitLabels=null)}e.exitLabels=o.length?o:null}(l),null==(e=l.highlightData)||e.capture(),!l.globals.axisCharts)return void(l.globals.previousPaths=l.seriesData.series);if(!S.elementExists(l.dom.baseEl))return void(l.globals.previousPaths=[]);function c(t,e,i){const s=t[e].childNodes,a={type:i,paths:[],realIndex:t[e].getAttribute("data:realIndex")};for(let t=0;t<s.length;t++)if(s[t].hasAttribute("pathTo")){const e=("line"===i||"area"===i)&&s[t].getAttribute("d")||s[t].getAttribute("pathTo");if(s[t].classList.contains("apexcharts-raincloud-box")){const t=a.paths[a.paths.length-1];t&&(t.box||(t.box=[])).push(e);continue}a.paths.push({d:e,key:s[t].getAttribute("data:pathKey"),fill:s[t].getAttribute("fill"),flip:s[t].classList.contains("apexcharts-flip-y")||s[t].classList.contains("apexcharts-flip-x")})}l.globals.previousPaths.push(a)}l.globals.previousPaths=[];["line","area","bar","rangebar","rangeArea","candlestick","boxPlot","radar","violin"].forEach(t=>{const e=(i=t,l.dom.baseEl.querySelectorAll(`.apexcharts-${i}-series .apexcharts-series`));var i;for(let i=0;i<e.length;i++)c(e,i,t)});const h=l.dom.baseEl.querySelectorAll(`.apexcharts-${l.config.chart.type} .apexcharts-series`);if(h.length>0)for(let e=0;e<h.length;e++){const c=`.apexcharts-${l.config.chart.type} .apexcharts-series[data\\:realIndex='${e}']`,h=l.dom.baseEl.querySelectorAll(`${c} .apexcharts-${l.config.chart.type}-rect`),d=[],p=new Map,u=new Set;l.dom.baseEl.querySelectorAll(`${c} .apexcharts-data-labels[data\\:key]`).forEach(e=>{var i;p.set(e.getAttribute("data:key"),t.treemapLabelLook(e)),parseFloat(null!=(i=e.getAttribute("opacity"))?i:"1")<.999&&u.add(e.getAttribute("data:key"))});for(let t=0;t<h.length;t++){const e=e=>h[t].getAttribute(e),l={rect:{x:parseFloat(null!=(i=e("x"))?i:"0"),y:parseFloat(null!=(s=e("y"))?s:"0"),width:parseFloat(null!=(a=e("width"))?a:"0"),height:parseFloat(null!=(r=e("height"))?r:"0")},color:h[t].getAttribute("color"),fill:h[t].getAttribute("fill"),label:null!=(o=p.get(e("data:key")))?o:"",labelFading:u.has(e("data:key"))},c=parseInt(null!=(n=e("j"))?n:"",10);Number.isFinite(c)&&c>=0?d[c]=l:d.push(l)}l.globals.previousPaths.push(d)}const d=new Map;if("treemap"===l.config.chart.type&&l.dom.baseEl.querySelectorAll(".apexcharts-treemap-parent-rect[data\\:key]").forEach(e=>{var i,s,a,r;const o=["x","y","width","height"].map(t=>{var i;return parseFloat(null!=(i=e.getAttribute(t))?i:"")}),n=null==(i=e.closest(".apexcharts-series"))?void 0:i.getAttribute("data:realIndex"),l=null==(s=e.parentElement)?void 0:s.querySelector(".apexcharts-treemap-parent-header"),c=l?["x","y","width","height"].map(t=>{var e;return parseFloat(null!=(e=l.getAttribute(t))?e:"")}):null;o.every(Number.isFinite)&&null!=n&&d.set(`${n}|${null!=(a=e.getAttribute("data:key"))?a:""}`,{x:o[0],y:o[1],width:o[2],height:o[3],fill:e.getAttribute("fill"),header:l&&c&&c.every(Number.isFinite)?{x:c[0],y:c[1],width:c[2],height:c[3],fill:l.getAttribute("fill"),look:t.treemapHeaderLook(null==(r=e.parentElement)?void 0:r.querySelector(".apexcharts-treemap-parent-label"))}:null})}),l.globals.prevTreemapParents=d.size?d:null,l.globals.prevTreemapView=null,"treemap"===l.config.chart.type&&l.globals.treemapZoom){const e=l.dom.baseEl.querySelector(".apexcharts-treemap");if(e){const i=e.cloneNode(!0),s="zoom"+ ++t.ghostDefs,a=new Map;if(i.querySelectorAll('[fill^="url("], [stroke^="url("], [filter^="url("]').forEach(t=>{["fill","stroke","filter"].forEach(e=>{const i=/^url\(#([^)]+)\)$/.exec(t.getAttribute(e)||"");if(i){if(!a.has(i[1])){const t=l.dom.baseEl.querySelector(`[id="${i[1]}"]`);if(!t)return;const e=t.cloneNode(!0);e.setAttribute("id",`${i[1]}-${s}`),a.set(i[1],e)}t.setAttribute(e,`url(#${i[1]}-${s})`)}})}),a.size){const t=document.createElementNS("http://www.w3.org/2000/svg","defs");t.setAttribute("class","apexcharts-treemap-ghost-defs"),a.forEach(e=>t.appendChild(e)),i.appendChild(t)}l.globals.prevTreemapView=i}}}clearPreviousPaths(){const t=this.w;t.globals.previousPaths=[],t.globals.allSeriesCollapsed=!1}handleNoData(){const t=this.w,e=t.config.noData,i=new xa(this.w);let s=t.globals.svgWidth/2,a=t.globals.svgHeight/2,r="middle";if(t.globals.noData=!0,t.globals.animationEnded=!0,"left"===e.align?(s=10,r="start"):"right"===e.align&&(s=t.globals.svgWidth-10,r="end"),"top"===e.verticalAlign?a=50:"bottom"===e.verticalAlign&&(a=t.globals.svgHeight-50),s+=e.offsetX,a=a+parseInt(e.style.fontSize,10)+2+e.offsetY,void 0!==e.text&&""!==e.text){const o=i.drawText({x:s,y:a,text:e.text,textAnchor:r,fontSize:e.style.fontSize,fontFamily:e.style.fontFamily,foreColor:e.style.color,opacity:1,cssClass:"apexcharts-text-nodata"});t.dom.Paper.add(o)}}setNullSeriesToZeroValues(t){const e=this.w;for(let i=0;i<t.length;i++)if(0===t[i].length)for(let s=0;s<t[e.globals.maxValsInArrayIndex].length;s++)t[i].push(0);return t}hasAllSeriesEqualX(){let t=!0;const e=this.w,i=e.seriesData.seriesX.filter(t=>null==t?void 0:t.length);for(let e=1;t&&e<i.length;e++){const s=i[0],a=i[e],r=s===a?0:Math.min(s.length,a.length);for(let e=0;t&&e<r;e++)t=s[e]===a[e]}return e.globals.allSeriesHasEqualX=t,t}};d(fi,"ghostDefs",0),d(fi,"HELD",["previousPaths","prevStreamFrame","prevChromeFrame","prevCircleFrame","prevDataLabels","exitLabels","riseLabels","prevTreemapParents","prevTreemapView","prevPolarAngles","prevPolarSizes"]);let mi=fi;function bi(){return{palette1:["#008FFB","#00A86F","#CA8501","#FF4560","#846DD5"],palette2:["#6978CB","#039DE2","#49A84D","#B39105","#D68000"],palette3:["#209FCC","#648291","#D4526E","#0FA783","#A19285"],palette4:["#2FA59D","#73A20B","#099DE1","#FD5D5D","#648291"],palette5:["#2B908F","#F56566","#2EAB16","#FA4443","#1EA2BD"],palette6:["#449DD1","#F86624","#EA3A4A","#9C63D1","#899E2A"],palette7:["#DF475B","#1B998B","#7E75B7","#F46036","#B1911B"],palette8:["#9C63D1","#F86624","#B38F04","#EA3A4A","#2FA2B3"],palette9:["#98776F","#A19285","#A8705E","#BA6560","#A0927F"],palette10:["#C91EFF","#A94BFD","#6C6AFE","#2983FF","#009ED8"],cvdDeuteranopia:["#0072B2","#E69F00","#56B4E9","#009E73","#F0E442","#D55E00","#CC79A7"],cvdProtanopia:["#0077BB","#EE7733","#009988","#EE3377","#BBBBBB","#33BBEE","#CC3311"],cvdTritanopia:["#CC3311","#009988","#EE7733","#0077BB","#EE3377","#BBBBBB","#33BBEE"],highContrast:["#005A9C","#C00000","#007A33","#6C3483","#7B3F00","#0097A7","#4A235A"]}}const yi={accent:"--apx-accent",fore:"--apx-fore",grid:"--apx-grid",surface:"--apx-surface"};const vi="__apexcharts_themes__";function wi(){return globalThis[vi]}globalThis[vi]||(globalThis[vi]={});const Ai="#373d3f",Si="#f6f7f8",Ci="#e0e0e0";class ki{constructor(t){this.w=t,this.colors=[],this.isColorFn=!1,this.isHeatmapDistributed=!1,this.isBarDistributed=!1,this._tokens={},this._namedTheme=null}checkHeatmapDistributed(){const{chart:t,plotOptions:e}=this.w.config;return"treemap"===t.type&&e.treemap&&e.treemap.distributed||"heatmap"===t.type&&e.heatmap&&e.heatmap.distributed}checkBarDistributed(){const{chart:t,plotOptions:e}=this.w.config;return e.bar&&e.bar.distributed&&("bar"===t.type||"rangeBar"===t.type)}init(){this.setDefaultColors()}setDefaultColors(){var t;const e=this.w,i=new S;var s;this.isColorFn=!1,this.isHeatmapDistributed=this.checkHeatmapDistributed(),this.isBarDistributed=this.checkBarDistributed(),this._namedTheme=(s=e.config.theme.name)&&wi()[s]||null,this._applyNamedThemeMode(),e.dom.elWrap.classList.add(`apexcharts-theme-${e.config.theme.mode||"light"}`),this._applyModeDefaults(),this._tokens=this._resolveTokens(),this.applyTokenChrome(this._tokens);const a=null==(t=e.config.theme.accessibility)?void 0:t.colorBlindMode;if(a){e.globals.colors=this.getColorBlindColors(a),this.applySeriesColors(e.seriesData.seriesColors,e.globals.colors);const t=e.globals.colors.slice();return this.pushExtraColors(e.globals.colors),this.applyColorTypes(["fill","stroke"],t),this.applyDataLabelsColors(t),this.applyRadarPolygonsColors(),this.applyMarkersColors(t),void("highContrast"===a&&e.dom.elWrap.classList.add("apexcharts-high-contrast"))}const r=[...e.config.colors||e.config.fill.colors||[]];e.globals.colors=this.getColors(r),this.applySeriesColors(e.seriesData.seriesColors,e.globals.colors),e.config.theme.monochrome.enabled&&(e.globals.colors=this.getMonochromeColors(e.config.theme.monochrome,e.seriesData.series,i));const o=e.globals.colors.slice();this.pushExtraColors(e.globals.colors),this.applyColorTypes(["fill","stroke"],o),this.applyDataLabelsColors(o),this.applyRadarPolygonsColors(),this.applyMarkersColors(o)}_applyModeDefaults(t=this.w.config.theme.mode){const e=this.w;"dark"===t?(e.config.chart.foreColor===Ai&&(e.config.chart.foreColor=Si),"palette1"===e.config.theme.palette&&(e.config.theme.palette="palette4"),e.config.tooltip&&"light"!==e.config.tooltip.theme&&(e.config.tooltip.theme="dark")):"light"===t&&(e.config.chart.foreColor===Si&&(e.config.chart.foreColor=Ai),"palette4"===e.config.theme.palette&&(e.config.theme.palette="palette1"))}_applyNamedThemeMode(){var t;const e=this.w,i=e.config.theme,s=e.globals.namedThemeApplied||{},a=e.globals.namedThemeApplied={};s.mode&&i.mode===s.mode&&(i.mode="",this._applyModeDefaults("light"),e.config.tooltip&&(e.config.tooltip.theme="light")),s.accessibility&&(null==(t=i.accessibility)?void 0:t.colorBlindMode)===s.accessibility&&(i.accessibility.colorBlindMode=""),s.monochrome&&i.monochrome.enabled&&(i.monochrome=s.monochrome);const r=this._namedTheme;r&&(r.mode&&!i.mode&&(i.mode=a.mode=r.mode),!r.accessibility||!r.accessibility.colorBlindMode||i.accessibility&&i.accessibility.colorBlindMode||(i.accessibility=i.accessibility||{},i.accessibility.colorBlindMode=a.accessibility=r.accessibility.colorBlindMode),r.monochrome&&r.monochrome.enabled&&!i.monochrome.enabled&&(a.monochrome=i.monochrome,i.monochrome=l(l({},i.monochrome),r.monochrome)))}_resolveTokens(){const t=this._namedTheme&&this._namedTheme.tokens||{},e=this._shouldUseTokens()?function(t){if(!p.isBrowser())return{};const e=t.dom&&(t.dom.elWrap||t.dom.baseEl)||null;if(!e)return{};const i=v.getComputedStyle(e);if(!i||"function"!=typeof i.getPropertyValue)return{};const s=t=>{const e=i.getPropertyValue(t);return e?String(e).trim():""},a={};for(const t in yi){const e=s(yi[t]);e&&(a[t]=e)}const r=[];for(let t=1;t<=24;t++){const e=s(`--apx-series-${t}`);if(!e)break;r.push(e)}return r.length&&(a.series=r),a}(this.w):{};return l(l({},t),e)}_shouldUseTokens(){return!1!==this.w.config.theme.tokens}applyTokenChrome(t){if(!t)return;const e=this.w,i=e.globals.tokenChrome||{},s="dark"===e.config.theme.mode,a=(e,s,a,r,o=r)=>{const n=e&&e[s],l=t[a];e&&(l&&(n===r||n===o)||i[a]&&n===i[a])&&(e[s]=l||r)};a(e.config.chart,"foreColor","fore",s?Si:Ai,s?Ai:Si);const r=[e.config.xaxis].concat(e.config.yaxis);a(e.config.grid,"borderColor","grid",Ci),r.forEach(t=>{t&&(a(t.axisBorder,"color","grid",Ci),a(t.axisTicks,"color","grid",Ci))}),e.globals.tokenChrome=t;const o=e.globals.tokenSurface,n=e.config.chart.background,l=!n||n===o;if(t.surface){if(l){e.config.chart.background=t.surface,e.globals.tokenSurface=t.surface;const i=e.dom.Paper&&e.dom.Paper.node;i&&i.style&&(i.style.background=t.surface)}}else if(o&&n===o){e.config.chart.background="",e.globals.tokenSurface=void 0;const t=e.dom.Paper&&e.dom.Paper.node;t&&t.style&&(t.style.background="")}}getColors(t){const e=this.w;return t&&0!==t.length?Array.isArray(t)&&t.length>0&&"function"==typeof t[0]?(this.isColorFn=!0,e.config.series.map((i,s)=>{const a=t[s]||t[0];return"function"==typeof a?a({value:e.globals.axisCharts?e.seriesData.series[s][0]||0:e.seriesData.series[s],seriesIndex:s,dataPointIndex:s,w:this.w}):a})):t:this.predefined()}applySeriesColors(t,e){t.forEach((t,i)=>{t&&(e[i]=t)})}getMonochromeColors(t,e,i){const{color:s,shadeIntensity:a,shadeTo:r}=t,o=this.isBarDistributed||this.isHeatmapDistributed?this.distributedCount():e.length,n=1/(o/a);let l=0;return Array.from({length:o},()=>{const t="dark"===r?i.shadeColor(-1*l,s):i.shadeColor(l,s);return l+=n,t})}applyColorTypes(t,e){const i=this.w;t.forEach(t=>{i.globals[t].colors=void 0===i.config[t].colors?this.isColorFn&&i.config.colors?i.config.colors.slice():e:i.config[t].colors.slice(),this.pushExtraColors(i.globals[t].colors)})}applyDataLabelsColors(t){const e=this.w;e.globals.dataLabels.style.colors=void 0===e.config.dataLabels.style.colors?t:e.config.dataLabels.style.colors.slice(),this.pushExtraColors(e.globals.dataLabels.style.colors,50)}applyRadarPolygonsColors(){const t=this.w;t.globals.radarPolygons.fill.colors=void 0===t.config.plotOptions.radar.polygons.fill.colors?["dark"===t.config.theme.mode?"#343A3F":"none"]:t.config.plotOptions.radar.polygons.fill.colors.slice(),this.pushExtraColors(t.globals.radarPolygons.fill.colors,20)}applyMarkersColors(t){const e=this.w;e.globals.markers.colors=void 0===e.config.markers.colors?t:e.config.markers.colors.slice(),this.pushExtraColors(e.globals.markers.colors)}pushExtraColors(t,e,i=null){const s=this.w;let a=e||s.seriesData.series.length;if(null===i&&(i=this.isBarDistributed||this.isHeatmapDistributed||"heatmap"===s.config.chart.type&&s.config.plotOptions.heatmap&&s.config.plotOptions.heatmap.colorScale.inverse),i&&s.seriesData.series.length&&(a=this.distributedCount()),t.length<a){const e=a-t.length;for(let i=0;i<e;i++)t.push(t[i])}}distributedCount(){const t=this.w.seriesData.series;return t.length?t[this.w.globals.maxValsInArrayIndex].length*t.length:0}getColorBlindColors(t){const e={palette1:["#008FFB","#00A86F","#CA8501","#FF4560","#846DD5"],palette2:["#6978CB","#039DE2","#49A84D","#B39105","#D68000"],palette3:["#209FCC","#648291","#D4526E","#0FA783","#A19285"],palette4:["#2FA59D","#73A20B","#099DE1","#FD5D5D","#648291"],palette5:["#2B908F","#F56566","#2EAB16","#FA4443","#1EA2BD"],palette6:["#449DD1","#F86624","#EA3A4A","#9C63D1","#899E2A"],palette7:["#DF475B","#1B998B","#7E75B7","#F46036","#B1911B"],palette8:["#9C63D1","#F86624","#B38F04","#EA3A4A","#2FA2B3"],palette9:["#98776F","#A19285","#A8705E","#BA6560","#A0927F"],palette10:["#C91EFF","#A94BFD","#6C6AFE","#2983FF","#009ED8"],cvdDeuteranopia:["#0072B2","#E69F00","#56B4E9","#009E73","#F0E442","#D55E00","#CC79A7"],cvdProtanopia:["#0077BB","#EE7733","#009988","#EE3377","#BBBBBB","#33BBEE","#CC3311"],cvdTritanopia:["#CC3311","#009988","#EE7733","#0077BB","#EE3377","#BBBBBB","#33BBEE"],highContrast:["#005A9C","#C00000","#007A33","#6C3483","#7B3F00","#0097A7","#4A235A"]};return({deuteranopia:e.cvdDeuteranopia,protanopia:e.cvdProtanopia,tritanopia:e.cvdTritanopia,highContrast:e.highContrast}[t]||e.palette1).slice()}updateThemeOptions(t){const e=t.theme.mode,i=this.w.globals.namedThemeApplied;for(const e in i)void 0!==t.theme[e]&&delete i[e];if(void 0===e)return t;t.chart=t.chart||{},t.tooltip=t.tooltip||{};const s="dark"===e;return t.tooltip.theme=t.tooltip.theme||e||"light",t.chart.foreColor=t.chart.foreColor||(s?Si:Ai),t.theme.palette=t.theme.palette||(s?"palette4":"palette1"),t}predefined(){const t={palette1:["#008FFB","#00A86F","#CA8501","#FF4560","#846DD5"],palette2:["#6978CB","#039DE2","#49A84D","#B39105","#D68000"],palette3:["#209FCC","#648291","#D4526E","#0FA783","#A19285"],palette4:["#2FA59D","#73A20B","#099DE1","#FD5D5D","#648291"],palette5:["#2B908F","#F56566","#2EAB16","#FA4443","#1EA2BD"],palette6:["#449DD1","#F86624","#EA3A4A","#9C63D1","#899E2A"],palette7:["#DF475B","#1B998B","#7E75B7","#F46036","#B1911B"],palette8:["#9C63D1","#F86624","#B38F04","#EA3A4A","#2FA2B3"],palette9:["#98776F","#A19285","#A8705E","#BA6560","#A0927F"],palette10:["#C91EFF","#A94BFD","#6C6AFE","#2983FF","#009ED8"],cvdDeuteranopia:["#0072B2","#E69F00","#56B4E9","#009E73","#F0E442","#D55E00","#CC79A7"],cvdProtanopia:["#0077BB","#EE7733","#009988","#EE3377","#BBBBBB","#33BBEE","#CC3311"],cvdTritanopia:["#CC3311","#009988","#EE7733","#0077BB","#EE3377","#BBBBBB","#33BBEE"],highContrast:["#005A9C","#C00000","#007A33","#6C3483","#7B3F00","#0097A7","#4A235A"]},e=t[this.w.config.theme.palette]||t.palette1,i=this._tokens||{};if(Array.isArray(i.series)&&i.series.length)return i.series.slice();if(i.accent)return[i.accent,...e];const s=this._namedTheme;return s&&Array.isArray(s.palette)&&s.palette.length?s.palette.slice():e}}class Mi{constructor(t){this.w=t}draw(){this.drawTitleSubtitle("title"),this.drawTitleSubtitle("subtitle")}drawTitleSubtitle(t){const e=this.w,i="title"===t?e.config.title:e.config.subtitle;let s=e.globals.svgWidth/2,a=i.offsetY,r="middle";if("left"===i.align?(s=10,r="start"):"right"===i.align&&(s=e.globals.svgWidth-10,r="end"),s+=i.offsetX,a=a+parseInt(i.style.fontSize,10)+i.margin/2,void 0!==i.text){const o=new xa(this.w).drawText({x:s,y:a,text:i.text,textAnchor:r,fontSize:i.style.fontSize,fontFamily:i.style.fontFamily,fontWeight:i.style.fontWeight,foreColor:i.style.color,opacity:1});o.node.setAttribute("class",`apexcharts-${t}-text`),e.dom.Paper.add(o)}}}class Ti{constructor(t){this.w=t.w,this.dCtx=t}getTitleSubtitleCoords(t){const e=this.w;let i=0,s=0;const a="title"===t?e.config.title.floating:e.config.subtitle.floating,r=e.dom.baseEl.querySelector(`.apexcharts-${t}-text`);if(null!==r&&!a){const t=r.getBoundingClientRect();i=t.width,s=e.globals.axisCharts?t.height+5:t.height}return{width:i,height:s}}getLegendsRect(){const t=this.w,e=t.dom.elLegendWrap;t.config.legend.height||"top"!==t.config.legend.position&&"bottom"!==t.config.legend.position||e&&(e.style.maxHeight=t.globals.svgHeight/2+"px");const i=Object.assign({},S.getBoundingClientRect(e));return null!==e&&!t.config.legend.floating&&t.config.legend.show?this.dCtx.lgRect={x:i.x,y:i.y,height:i.height,width:0===i.height?0:i.width}:this.dCtx.lgRect={x:0,y:0,height:0,width:0},"left"!==t.config.legend.position&&"right"!==t.config.legend.position||1.5*this.dCtx.lgRect.width>t.globals.svgWidth&&(this.dCtx.lgRect.width=t.globals.svgWidth/1.5),this.dCtx.lgRect}getDatalabelsRect(){const t=this.w,e=[];t.config.series.forEach((i,s)=>{i.data.forEach((i,a)=>{const r=(o=t.seriesData.series[s][a],t.config.dataLabels.formatter(o,{seriesIndex:s,dataPointIndex:a,w:t}));var o;e.push(r)})});const i=S.getLargestStringFromArr(e),s=new xa(this.w),a=t.config.dataLabels.style,r=s.getTextRects(i,parseInt(a.fontSize).toString(),a.fontFamily);return{width:1.05*r.width,height:r.height}}getLargestStringFromMultiArr(t,e){let i=t;if(this.w.axisFlags.isMultiLineX){const t=e.map(t=>Array.isArray(t)?t.length:1),s=Math.max(...t);i=e[t.indexOf(s)]}return i}getSparklineStrokeInset(){const t=this.w,e=Array.isArray(t.config.stroke.width)?Math.max(...t.config.stroke.width):t.config.stroke.width,i=e/2;if(!(t.config.stroke.show&&i>0))return{top:0,bottom:0};const s=t.globals.maxY-t.globals.minY,a=this._getSeriesYExtremes();if(!(this._strokeTracesDataPoints()&&s>0&&a))return{top:i,bottom:i};const r=Math.max(t.globals.svgHeight-e,0),o=r*(t.globals.maxY-a.max)/s,n=r*(a.min-t.globals.minY)/s;return{top:Math.min(Math.max(i-o,0),i),bottom:Math.min(Math.max(i-n,0),i)}}_strokeTracesDataPoints(){const t=this.w;if(!t.globals.axisCharts||t.config.chart.stacked)return!1;const e=["line","area","scatter"];return t.config.series.every(i=>e.includes(i.type||t.config.chart.type))}_getSeriesYExtremes(){let t=1/0,e=-1/0;return this.w.seriesData.series.forEach(i=>{Array.isArray(i)&&i.forEach(i=>{Number.isFinite(i)&&(i<t&&(t=i),i>e&&(e=i))})}),t===1/0?null:{min:t,max:e}}}class _i{constructor(t){this.w=t.w,this.dCtx=t}getxAxisLabelsCoords(){const t=this.w;let e,i=t.labelData.labels.slice();if(t.config.xaxis.convertedCatToNumeric&&0===i.length&&(i=t.labelData.categoryLabels),t.labelData.timescaleLabels.length>0){const i=this.getxAxisTimeScaleLabelsCoords();e={width:i.width,height:i.height},t.layout.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends="left"!==t.config.legend.position&&"right"!==t.config.legend.position||t.config.legend.floating?0:this.dCtx.lgRect.width;const s=t.formatters.xLabelFormatter;let a=S.getLargestStringFromArr(i),r=this.dCtx.dimHelpers.getLargestStringFromMultiArr(a,i);t.globals.isBarHorizontal&&(a=t.globals.yAxisScale[0].result.reduce((t,e)=>t.length>e.length?t:e,0),r=a);const o=new k(this.w),n=a;a=o.xLabelFormat(s,a,n,{i:void 0,dateFormatter:new C(this.w).formatDate,w:t}),r=o.xLabelFormat(s,r,n,{i:void 0,dateFormatter:new C(this.w).formatDate,w:t}),(t.config.xaxis.convertedCatToNumeric&&void 0===a||""===String(a).trim())&&(a="1",r=a);const l=new xa(this.w);let c=l.getTextRects(a,t.config.xaxis.labels.style.fontSize),h=c;if(a!==r&&(h=l.getTextRects(r,t.config.xaxis.labels.style.fontSize)),e={width:c.width>=h.width?c.width:h.width,height:c.height>=h.height?c.height:h.height},e.width*i.length>t.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&0!==t.config.xaxis.labels.rotate||t.config.xaxis.labels.rotateAlways){if(!t.globals.isBarHorizontal){t.layout.rotateXLabels=!0;const i=e=>l.getTextRects(e,t.config.xaxis.labels.style.fontSize,t.config.xaxis.labels.style.fontFamily,`rotate(${t.config.xaxis.labels.rotate} 0 0)`,!1);c=i(a),a!==r&&(h=i(r)),e.height=(c.height>h.height?c.height:h.height)/1.5,e.width=c.width>h.width?c.width:h.width}}else t.layout.rotateXLabels=!1}return t.config.xaxis.labels.show||(e={width:0,height:0}),{width:e.width,height:e.height}}getxAxisGroupLabelsCoords(){var t;const e=this.w;if(!e.labelData.hasXaxisGroups)return{width:0,height:0};const i=(null==(t=e.config.xaxis.group.style)?void 0:t.fontSize)||e.config.xaxis.labels.style.fontSize,s=e.labelData.groups.map(t=>t.title);let a;const r=S.getLargestStringFromArr(s),o=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,s),n=new xa(this.w),l=n.getTextRects(r,i);let c=l;return r!==o&&(c=n.getTextRects(o,i)),a={width:l.width>=c.width?l.width:c.width,height:l.height>=c.height?l.height:c.height},e.config.xaxis.labels.show||(a={width:0,height:0}),{width:a.width,height:a.height}}getxAxisTitleCoords(){const t=this.w;let e=0,i=0;if(void 0!==t.config.xaxis.title.text){const s=new xa(this.w).getTextRects(t.config.xaxis.title.text,t.config.xaxis.title.style.fontSize);e=s.width,i=s.height}return{width:e,height:i}}getxAxisTimeScaleLabelsCoords(){const t=this.w;this.dCtx.timescaleLabels=t.labelData.timescaleLabels.slice();const e=this.dCtx.timescaleLabels.map(t=>t.value),i=e.reduce((t,e)=>void 0===t?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):t.length>e.length?t:e,0),s=new xa(this.w).getTextRects(i,t.config.xaxis.labels.style.fontSize);return 1.05*s.width*e.length>t.layout.gridWidth&&0!==t.config.xaxis.labels.rotate&&(t.globals.overlappingXLabels=!0),s}additionalPaddingXLabels(t){const e=this.w,i=e.globals,s=e.config,a=s.xaxis.type,r=t.width;i.skipLastTimelinelabel=!1,i.skipFirstTimelinelabel=!1;const o=e.config.yaxis[0].opposite&&e.globals.isBarHorizontal,n=t=>{if(this.dCtx.timescaleLabels&&this.dCtx.timescaleLabels.length){const a=this.dCtx.timescaleLabels[0],o=this.dCtx.timescaleLabels[this.dCtx.timescaleLabels.length-1].position+r/1.75-this.dCtx.yAxisWidthRight,n=a.position-r/1.75+this.dCtx.yAxisWidthLeft,l="right"===e.config.legend.position&&this.dCtx.lgRect.width>0?this.dCtx.lgRect.width:0;o>i.svgWidth-e.layout.translateX-l&&(i.skipLastTimelinelabel=!0),n<-(t.show&&!t.floating||!B.includes(s.chart.type)?10:r/1.75)&&(i.skipFirstTimelinelabel=!0)}else"datetime"===a?this.dCtx.gridPad.right<r&&!e.layout.rotateXLabels&&(i.skipLastTimelinelabel=!0):"datetime"!==a&&this.dCtx.gridPad.right<r/2-this.dCtx.yAxisWidthRight&&!e.layout.rotateXLabels&&!e.config.xaxis.labels.trim&&(this.dCtx.xPadRight=r/2+1)},l=(t,e)=>{s.yaxis.length>1&&(t=>-1!==i.collapsedSeriesIndices.indexOf(t))(e)||n(t)};s.yaxis.forEach((t,e)=>{o?(this.dCtx.gridPad.left<r&&(this.dCtx.xPadLeft=r/2+1),this.dCtx.xPadRight=r/2+1):l(t,e)})}}class Di{constructor(t){this.w=t.w,this.dCtx=t}getyAxisLabelsCoords(){const t=this.w,e=[];let i=10;const s=new oe(this.w,{theme:this.dCtx.theme});return t.config.yaxis.map((a,r)=>{const o={seriesIndex:r,dataPointIndex:-1,w:t},n=t.globals.yAxisScale[r];let l=0;if(!s.isYAxisHidden(r)&&a.labels.show&&void 0!==a.labels.minWidth&&(l=a.labels.minWidth),!s.isYAxisHidden(r)&&a.labels.show&&n.result.length){const s=t.formatters.yLabelFormatters[r],c=n.niceMin===Number.MIN_VALUE?0:n.niceMin;let h=n.result.reduce((e,i)=>{var a,r;return(null==(a=String(s(e,o,t)))?void 0:a.length)>(null==(r=String(s(i,o,t)))?void 0:r.length)?e:i},c);h=s(h,o,t);let d=h;if(void 0!==h&&0!==h.length||(h=n.niceMax),1===String(h).length&&(h+=".0",d=h),t.globals.isBarHorizontal){i=0;const e=t.labelData.labels.slice();h=S.getLargestStringFromArr(e),h=s(h,{seriesIndex:r,dataPointIndex:-1,w:t},t),d=this.dCtx.dimHelpers.getLargestStringFromMultiArr(h,e)}const p=new xa(this.w),u="rotate(".concat(a.labels.rotate," 0 0)"),g=p.getTextRects(h,a.labels.style.fontSize,a.labels.style.fontFamily,u,!1);let x=g;h!==d&&(x=p.getTextRects(d,a.labels.style.fontSize,a.labels.style.fontFamily,u,!1)),e.push({width:(l>x.width||l>g.width?l:x.width>g.width?x.width:g.width)+i,height:x.height>g.height?x.height:g.height})}else e.push({width:0,height:0})}),e}getyAxisTitleCoords(){const t=this.w,e=[];return t.config.yaxis.map(t=>{if(t.show&&void 0!==t.title.text){const i=new xa(this.w),s="rotate(".concat(t.title.rotate," 0 0)"),a=i.getTextRects(t.title.text,t.title.style.fontSize,t.title.style.fontFamily,s,!1);e.push({width:a.width,height:a.height})}else e.push({width:0,height:0})}),e}getTotalYAxisWidth(){const t=this.w;let e=0,i=0,s=0;const a=t.globals.yAxisScale.length>1?10:0,r=new oe(this.w,{theme:this.dCtx.theme}),o=(o,n)=>{const l=t.config.yaxis[n].floating;let c=0;o.width>0&&!l?(c=o.width+a,function(e){return t.globals.ignoreYAxisIndexes.indexOf(e)>-1}(n)&&(c=c-o.width-a)):c=l||r.isYAxisHidden(n)?0:5,t.config.yaxis[n].opposite?s+=c:i+=c,e+=c};return t.layout.yLabelsCoords.map((t,e)=>{o(t,e)}),t.layout.yTitleCoords.map((t,e)=>{o(t,e)}),t.globals.isBarHorizontal&&!t.config.yaxis[0].floating&&(e=t.layout.yLabelsCoords[0].width+t.layout.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=i,this.dCtx.yAxisWidthRight=s,e}}class Fi{constructor(t){this.w=t.w,this.dCtx=t}gridPadForColumnsInNumericAxis(t){const{w:e}=this,{config:i,globals:s}=e;if(s.noData||s.collapsedSeries.length+s.ancillaryCollapsedSeries.length===i.series.length)return 0;const a=t=>B.includes(t),r=i.chart.type;let o=0,n=a(r)?i.series.length:1;s.comboBarCount>0&&(n=s.comboBarCount),s.collapsedSeries.forEach(t=>{a(t.type)&&(n-=1)}),i.chart.stacked&&(n=1);const l=a(r)||s.comboBarCount>0,c=Math.abs(s.initialMaxX-s.initialMinX);let h=c;if(l&&e.axisFlags.isXNumeric&&!s.isBarHorizontal&&n>0&&0!==h){h<=3&&(h=s.dataPoints);const e=h/t;let a=s.minXDiff&&s.minXDiff/e>0?s.minXDiff/e:0;a>t/2&&(a/=2),o=a*parseInt(i.plotOptions.bar.columnWidth,10)/100,o<1&&(o=1);const r=parseInt(i.plotOptions.bar.columnWidth,10)/100||0,n=r/2*t/((s.minXDiff>0?c/s.minXDiff:1)+r)+4;o=Math.min(o,Math.max(n,t/8)),s.barPadForNumericAxis=o}return o}gridPadForStackedTotalDataLabels(){const{w:t}=this,e=t.config.plotOptions.bar.dataLabels.total;if(!t.globals.isBarHorizontal||!t.config.chart.stacked||"100%"!==t.config.chart.stackType||!e.enabled)return;const i=t.seriesData.stackedSeriesTotals||[];if(!i.length)return;const s=e.formatter||t.config.dataLabels.formatter,a=i.map((e,i)=>String(s?s(e,c(l({},t),{seriesIndex:0,dataPointIndex:i,w:t})):e)),r=new xa(t).getTextRects(S.getLargestStringFromArr(a),parseFloat(e.style.fontSize).toString(),e.style.fontFamily).width+Math.abs(e.offsetX||0)+2;this.dCtx.xPadRight=Math.max(this.dCtx.xPadRight,r)}gridPadFortitleSubtitle(){const{w:t}=this,{globals:e}=t;let i=this.dCtx.isSparkline||!e.axisCharts?0:10;["title","subtitle"].forEach(s=>{void 0!==t.config[s].text?i+=t.config[s].margin:i+=this.dCtx.isSparkline||!e.axisCharts?0:5}),!t.config.legend.show||"bottom"!==t.config.legend.position||t.config.legend.floating||e.axisCharts||(i+=10);const s=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),a=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");this.dCtx.titleBlockPad=i,t.layout.gridHeight-=s.height+a.height+i,t.layout.translateY+=s.height+a.height+i}setGridXPosForDualYAxis(t,e){const{w:i}=this,s=new oe(this.w,{theme:this.dCtx.theme});i.config.yaxis.forEach((a,r)=>{-1!==i.globals.ignoreYAxisIndexes.indexOf(r)||a.floating||s.isYAxisHidden(r)||(a.opposite&&(i.layout.translateX-=e[r].width+t[r].width+(parseInt(a.labels.style.fontSize,10)||11)/1.2+12),i.layout.translateX<2&&(i.layout.translateX=2))})}}function Li(t,e){const i=t.config.drilldown&&t.config.drilldown.breadcrumb||{};return l(l({show:!0,position:"top-left",separator:" / ",rootLabel:"All",offsetX:0,offsetY:0,formatter:void 0},i),e||{})}class Ei{constructor(t,e){this.w=t,this.ctx=e,this.theme=e.theme,this.lgRect={},this.yAxisWidth=0,this.yAxisWidthLeft=0,this.yAxisWidthRight=0,this.xAxisHeight=0,this.isSparkline=this.w.config.chart.sparkline.enabled,this.dimHelpers=new Ti(this),this.dimYAxis=new Di(this),this.dimXAxis=new _i(this),this.dimGrid=new Fi(this),this.lgWidthForSideLegends=0,this.gridPad=l({},this.w.config.grid.padding),this.xPadRight=0,this.titleBlockPad=0,this.xPadLeft=0,this.datalabelsCoords={width:0,height:0},this.xAxisWidth=0,this.timescaleLabels=[]}plotCoords(){const t=this.w,e=t.globals;if(this.gridPad=l({},t.config.grid.padding),this.xPadRight=0,this.xPadLeft=0,this.lgWidthForSideLegends=0,this.titleBlockPad=0,this.timescaleLabels=[],this.lgRect=this.dimHelpers.getLegendsRect(),this.datalabelsCoords={width:0,height:0},this.isSparkline){this.w.globals.markers.largestSize>0&&Object.entries(this.gridPad).forEach(([t,e])=>{this.gridPad[t]=Math.max(e,this.w.globals.markers.largestSize/1.5)});const t=this.dimHelpers.getSparklineStrokeInset();this.gridPad.top=Math.max(t.top,this.gridPad.top),this.gridPad.bottom=Math.max(t.bottom,this.gridPad.bottom)}if(e.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),this.gridPadForBreadcrumb(),this.dimGrid.gridPadForStackedTotalDataLabels(),"heatmap"===t.config.chart.type&&"hexagon"===t.config.plotOptions.heatmap.shape&&("numeric"!==t.config.xaxis.type&&"datetime"!==t.config.xaxis.type||!t.axisFlags.isXNumeric)){const i=e.dataPoints||1,s=(t.seriesData.series||[]).length||1,a=t.layout.gridWidth-this.xPadRight-this.xPadLeft,r=t.layout.gridHeight,o=t.config.stroke.show?Array.isArray(t.config.stroke.width)?Math.max(...t.config.stroke.width):t.config.stroke.width:0,n=(a+4*i*(o/2+6))/(4*i+2),l=(r+6*s*(o/2))/(6*s+2);this.gridPad.left=Math.max(n,this.gridPad.left),this.gridPad.right=Math.max(n,this.gridPad.right),this.gridPad.top=Math.max(l,this.gridPad.top),this.gridPad.bottom=Math.max(l,this.gridPad.bottom)}t.layout.gridHeight=t.layout.gridHeight-this.gridPad.top-this.gridPad.bottom,t.layout.gridWidth=t.layout.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;const i=this.dimGrid.gridPadForColumnsInNumericAxis(t.layout.gridWidth);return t.layout.gridWidth=t.layout.gridWidth-2*i,t.layout.translateX=t.layout.translateX+this.gridPad.left+this.xPadLeft+(i>0?i:0),t.layout.translateY=t.layout.translateY+this.gridPad.top,{layout:{gridHeight:t.layout.gridHeight,gridWidth:t.layout.gridWidth,translateX:t.layout.translateX,translateY:t.layout.translateY,translateXAxisX:t.layout.translateXAxisX,translateXAxisY:t.layout.translateXAxisY,rotateXLabels:t.layout.rotateXLabels,xAxisHeight:t.layout.xAxisHeight,xAxisLabelsHeight:t.layout.xAxisLabelsHeight,xAxisGroupLabelsHeight:t.layout.xAxisGroupLabelsHeight,xAxisLabelsWidth:t.layout.xAxisLabelsWidth,yLabelsCoords:t.layout.yLabelsCoords,yTitleCoords:t.layout.yTitleCoords,gridPad:l({},this.gridPad)}}}gridPadForBreadcrumb(){var t,e,i,s,a,r,o,n;const l=this.w,c="treemap"===l.config.chart.type;if(c){const i=null==(e=(t=lt("treemap").prototype).zoomLive)?void 0:e.call(t,l,this.ctx.drilldown);if(i){if(!1===Li(l,i.breadcrumb).show)return;return void(this.gridPad.top+=22)}}if("icicle"===l.config.chart.type){if(!1===(null==(s=null==(i=l.config.plotOptions)?void 0:i.icicle)?void 0:s.zoomOnClick))return;if(!1===Li(l).show)return;return void(this.gridPad.top+=22)}if(!l.globals.axisCharts)return;if(!this.ctx.drilldown)return;if(!l.config.drilldown||!l.config.drilldown.enabled)return;if(!1===Li(l).show)return;const h=parseFloat(String(null==(n=null==(o=null==(r=null==(a=l.config.yaxis)?void 0:a[0])?void 0:r.labels)?void 0:o.style)?void 0:n.fontSize))||11,d=24+(c?0:Math.ceil(h*dt/2)),p=c?0:this.titleBlockPad||0;this.gridPad.top+=Math.max(0,d-p)}setDimensionsForAxisCharts(){const t=this.w,e=t.globals,i=this.dimYAxis.getyAxisLabelsCoords(),s=this.dimYAxis.getyAxisTitleCoords();e.isSlopeChart&&(this.datalabelsCoords=this.dimHelpers.getDatalabelsRect()),t.layout.yLabelsCoords=[],t.layout.yTitleCoords=[],t.config.yaxis.map((e,a)=>{t.layout.yLabelsCoords.push({width:i[a].width,index:a}),t.layout.yTitleCoords.push({width:s[a].width,index:a})}),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();const a=this.dimXAxis.getxAxisLabelsCoords(),r=this.dimXAxis.getxAxisGroupLabelsCoords(),o=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(a,o,r),t.layout.translateXAxisY=t.layout.rotateXLabels?this.xAxisHeight/8:-4,t.layout.translateXAxisX=t.layout.rotateXLabels&&t.axisFlags.isXNumeric&&t.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,t.globals.isBarHorizontal&&(t.layout.rotateXLabels=!1,t.layout.translateXAxisY=(parseInt(t.config.xaxis.labels.style.fontSize,10)||12)/1.5*-1),t.layout.translateXAxisY=t.layout.translateXAxisY+t.config.xaxis.labels.offsetY,t.layout.translateXAxisX=t.layout.translateXAxisX+t.config.xaxis.labels.offsetX;let n=this.yAxisWidth,l=this.xAxisHeight;t.layout.xAxisLabelsHeight=this.xAxisHeight-o.height,t.layout.xAxisGroupLabelsHeight=t.layout.xAxisLabelsHeight-a.height,t.layout.xAxisLabelsWidth=this.xAxisWidth,t.layout.xAxisHeight=this.xAxisHeight;let c=10;("radar"===t.config.chart.type||this.isSparkline)&&(n=0,l=0),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||"treemap"===t.config.chart.type)&&(n=0,l=0,c=0),this.isSparkline||"treemap"===t.config.chart.type||this.dimXAxis.additionalPaddingXLabels(a);const h=()=>{t.layout.translateX=n+this.datalabelsCoords.width,t.layout.gridHeight=e.svgHeight-this.lgRect.height-l-(this.isSparkline||"treemap"===t.config.chart.type?0:t.layout.rotateXLabels?10:15),t.layout.gridWidth=e.svgWidth-n-2*this.datalabelsCoords.width};switch("top"===t.config.xaxis.position&&(c=t.layout.xAxisHeight-t.config.xaxis.axisTicks.height-5),t.config.legend.position){case"bottom":t.layout.translateY=c,h();break;case"top":t.layout.translateY=this.lgRect.height+c,h();break;case"left":t.layout.translateY=c,t.layout.translateX=this.lgRect.width+n+this.datalabelsCoords.width,t.layout.gridHeight=e.svgHeight-l-12,t.layout.gridWidth=e.svgWidth-this.lgRect.width-n-2*this.datalabelsCoords.width;break;case"right":t.layout.translateY=c,t.layout.translateX=n+this.datalabelsCoords.width,t.layout.gridHeight=e.svgHeight-l-12,t.layout.gridWidth=e.svgWidth-this.lgRect.width-n-2*this.datalabelsCoords.width-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(s,i);new le(this.w,{theme:this.theme}).setYAxisXPosition(i,s)}setDimensionsForNonAxisCharts(){const t=this.w,e=t.globals,i=t.config;let s=0;if(t.config.legend.show&&!t.config.legend.floating&&(s=20),"unit"===i.chart.type||"icicle"===i.chart.type){const a=i.legend.show&&!i.legend.floating,r=i.legend.position;let o=0,n=0;return a&&("bottom"===r||"top"===r?o=this.lgRect.height:n=this.lgRect.width+s),t.layout.gridWidth=e.svgWidth-n,t.layout.gridHeight=e.svgHeight-o,t.layout.translateX="left"===r?n:0,void(t.layout.translateY="top"===r?o:0)}const a="sunburst"===i.chart.type?"sunburst":"pie"===i.chart.type||"polarArea"===i.chart.type||"donut"===i.chart.type?"pie":"radialBar",r=i.plotOptions[a].offsetY,o=i.plotOptions[a].offsetX;if(!i.legend.show||i.legend.floating)return t.layout.gridHeight=e.svgHeight,t.layout.gridWidth=Math.min(e.svgWidth||0,t.layout.gridHeight),t.layout.translateY=r,void(t.layout.translateX=o+(e.svgWidth-t.layout.gridWidth)/2);switch(i.legend.position){case"bottom":t.layout.gridHeight=e.svgHeight-this.lgRect.height,t.layout.gridWidth=e.svgWidth,t.layout.translateY=r-10,t.layout.translateX=o+(e.svgWidth-t.layout.gridWidth)/2;break;case"top":t.layout.gridHeight=e.svgHeight-this.lgRect.height,t.layout.gridWidth=e.svgWidth,t.layout.translateY=this.lgRect.height+r+10,t.layout.translateX=o+(e.svgWidth-t.layout.gridWidth)/2;break;case"left":t.layout.gridWidth=e.svgWidth-this.lgRect.width-s,t.layout.gridHeight="auto"!==i.chart.height?e.svgHeight:t.layout.gridWidth,t.layout.translateY=r,t.layout.translateX=o+this.lgRect.width+s;break;case"right":t.layout.gridWidth=e.svgWidth-this.lgRect.width-s-5,t.layout.gridHeight="auto"!==i.chart.height?e.svgHeight:t.layout.gridWidth,t.layout.translateY=r,t.layout.translateX=o+10;break;default:throw new Error("Legend position not supported")}}conditionalChecksForAxisCoords(t,e,i){const s=this.w,a=s.labelData.hasXaxisGroups?2:1,r=i.height+t.height+e.height,o=s.axisFlags.isMultiLineX?1.2:dt,n=s.layout.rotateXLabels?22:10,l=s.layout.rotateXLabels&&"bottom"===s.config.legend.position?10:0;this.xAxisHeight=r*o+a*n+l,this.xAxisWidth=t.width,this.xAxisHeight-e.height>s.config.xaxis.labels.maxHeight&&(this.xAxisHeight=s.config.xaxis.labels.maxHeight),s.config.xaxis.labels.minHeight&&this.xAxisHeight<s.config.xaxis.labels.minHeight&&(this.xAxisHeight=s.config.xaxis.labels.minHeight),s.config.xaxis.floating&&(this.xAxisHeight=0);let c=0,h=0;s.config.yaxis.forEach(t=>{c+=t.labels.minWidth,h+=t.labels.maxWidth}),this.yAxisWidth<c&&(this.yAxisWidth=c),this.yAxisWidth>h&&(this.yAxisWidth=h)}}class Pi{constructor(t){this.w=t,this.coreUtils=new mt(this.w)}niceScale(t,e,i=0){const s=1e-11,a=this.w,r=a.globals;let o,n,l,c;r.isBarHorizontal?(o=a.config.xaxis,n=Math.max((r.svgWidth-100)/25,2)):(o=a.config.yaxis[i],n=Math.max((r.svgHeight-100)/15,2)),S.isNumber(n)||(n=10),l=void 0!==o.min&&null!==o.min,c=void 0!==o.max&&null!==o.max;let h=void 0!==o.stepSize&&null!==o.stepSize,d=void 0!==o.tickAmount&&null!==o.tickAmount,p=d?o.tickAmount:gt[Math.min(Math.round(n/2),gt.length-1)];if(r.isMultipleYAxis&&!d&&r.multiAxisTickAmount>0&&(p=r.multiAxisTickAmount,d=!0),p="dataPoints"===p?r.dataPoints-1:Math.abs(Math.round(p)),(t===Number.MIN_VALUE&&0===e||!S.isNumber(t)&&!S.isNumber(e)||t===Number.MIN_VALUE&&e===-Number.MAX_VALUE)&&(t=S.isNumber(o.min)?o.min:0,e=S.isNumber(o.max)?o.max:t+p,r.allSeriesCollapsed=!1),t>e){console.warn("axis.min cannot be greater than axis.max: swapping min and max");const i=e;e=t,t=i}else t===e&&(t=0===t?0:t-1,e=0===e?2:e+1);const u=[];p<1&&(p=1);let g=p,x=Math.abs(e-t);!l&&t>0&&t/x<.15&&(t=0,l=!0),!c&&e<0&&-e/x<.15&&(e=0,c=!0),x=Math.abs(e-t);let f=x/g,m=f;const b=Math.floor(Math.log10(m)),y=Math.pow(10,b);let v=Math.ceil(m/y);if(v=ut[0][v],m=v*y,f=m,r.isBarHorizontal&&o.stepSize&&"datetime"!==o.type?(f=o.stepSize,h=!0):h&&(f=o.stepSize),h&&o.forceNiceScale){const t=Math.floor(Math.log10(f));f*=Math.pow(10,b-t)}if(l&&c){let t=x/g;if(d)if(h)if(0!=S.mod(x,f)){const e=S.getGCD(f,t);f=t/e<10?e:t}else 0==S.mod(f,t)?f=t:(t=f,d=!1);else f=t;else if(h)0==S.mod(x,f)?t=f:f=t;else if(0==S.mod(x,f))t=f;else{g=Math.ceil(x/f),t=x/g;const e=S.getGCD(x,f);x/e<n&&(t=e),f=t}g=Math.round(x/f)}else{if(l||c){if(c)if(d)t=e-f*g;else{const i=t;t=f*Math.floor(t/f),Math.abs(e-t)/S.getGCD(x,f)>n&&(t=e-f*p,t+=f*Math.floor((i-t)/f))}else if(l)if(d)e=t+f*g;else{const i=e;e=f*Math.ceil(e/f),Math.abs(e-t)/S.getGCD(x,f)>n&&(e=t+f*p,e+=f*Math.ceil((i-e)/f))}}else if(r.isMultipleYAxis&&d){const i=f*Math.floor(t/f);let s=i+f*g;s<e&&(f*=2),s=e,e=(t=i)+f*g,x=Math.abs(e-t),t>0&&t<Math.abs(s-e)&&(t=0,e=f*g),e<0&&-e<Math.abs(i-t)&&(e=0,t=-f*g)}else t=f*Math.floor(t/f),e=f*Math.ceil(e/f);x=Math.abs(e-t),f=S.getGCD(x,f),g=Math.round(x/f)}if(d||l||c||(g=Math.ceil((x-s)/(f+s)),g>16&&S.getPrimeFactors(g).length<2&&g++),!d&&o.forceNiceScale&&0===r.yValueDecimal&&Number.isInteger(x)&&g>x&&(g=x,f=Math.round(x/g)),g>n&&(!d&&!h||o.forceNiceScale)){const t=S.getPrimeFactors(g),e=t.length-1;let i=g;t:for(var w=0;w<e;w++)for(var A=0;A<=e-w;A++){const s=Math.min(A+w,e);let a=i,r=1;for(var C=A;C<=s;C++)r*=t[C];if(a/=r,a<n){i=a;break t}}f=i===g?x:x/i,g=Math.round(x/f)}r.isMultipleYAxis&&0==r.multiAxisTickAmount&&r.ignoreYAxisIndexes.indexOf(i)<0&&(r.multiAxisTickAmount=g);let k=t-f;const M=f*s;do{k+=f,u.push(S.stripNumber(k,7))}while(e-k>M);return{result:u,niceMin:u[0],niceMax:u[u.length-1]}}linearScale(t,e,i=10,s=0,a=void 0){const r=Math.abs(e-t);let o=[];if(t===e)return o=[t],{result:o,niceMin:o[0],niceMax:o[o.length-1]};"dataPoints"===i&&(i=this.w.globals.dataPoints-1);const n=i;a||(a=r/n);if(0!==a&&isFinite(a)){const t=Math.floor(Math.log10(Math.abs(a))),e=Math.max(2,2-t),i=Math.pow(10,e);a=Math.round((a+Number.EPSILON)*i)/i}let l=n,c=t;for(;l>=0;)o.push(c),c=S.preciseAddition(c,a),l-=1;return{result:o,niceMin:o[0],niceMax:o[o.length-1]}}_resolveLogTickAmount(t){let e=t.tickAmount;return"dataPoints"===e&&(e=this.w.globals.dataPoints-1),S.isNumber(e)&&e>=1?Number(e):null}_thinToTickAmount(t,e){if(null===e||!S.isNumber(e)||e<1)return t;const i=e+1;if(t.length<=i)return t;const s=t.length-1;let a=null;for(let t=1;t<=s;t++){if(s%t!==0)continue;const e=s/t+1;e>i||(null===a||e>a.count)&&(a={stride:t,count:e})}if(!a)return[t[0],t[t.length-1]];const r=[];for(let e=0;e<t.length;e+=a.stride)r.push(t[e]);return r}logarithmicScaleNice(t,e,i,s=null){e<=0&&(e=Math.max(t,i)),t<=0&&(t=Math.min(e,i));const a=[],r=Math.ceil(Math.log(e)/Math.log(i)+1);for(let e=Math.floor(Math.log(t)/Math.log(i));e<r;e++)a.push(Math.pow(i,e));const o=this._thinToTickAmount(a,s);return{result:o,niceMin:o[0],niceMax:o[o.length-1]}}_logDomainSpan(t,e,i){return i||(i=10),i<=1?0:(e<=0&&(e=Math.max(t,i)),t<=0&&(t=Math.min(e,i)),t<=0||e<=0?0:Math.abs(Math.log(e)/Math.log(i)-Math.log(t)/Math.log(i)))}logarithmicScale(t,e,i,s=null){e<=0&&(e=Math.max(t,i)),t<=0&&(t=Math.min(e,i));const a=[],r=Math.log(e)/Math.log(i),o=Math.log(t)/Math.log(i),n=r-o,l=null!==s?s:Math.max(1,Math.round(n)),c=n/l;for(let t=0,e=o;t<l;t++,e+=c)a.push(Math.pow(i,e));return a.push(Math.pow(i,r)),{result:a,niceMin:t,niceMax:e}}setYScaleForIndex(t,e,i){const s=this.w.globals,a=this.w.config,r=s.isBarHorizontal?a.xaxis:a.yaxis[t];if(void 0===s.yAxisScale[t]&&(s.yAxisScale[t]=[]),r.logarithmic&&e<=Number.MIN_VALUE){const i=this.w.seriesData.series,a=s.isMultipleYAxis&&s.seriesYAxisMap[t],n=r.logBase||10,l=(a?a.map(t=>i[t]):i).flat().reduce((t,e)=>e>0&&(!t||e<t)?e:t,0);e=l&&Math.min(n,o(n,Math.floor(Math.log(l)/Math.log(n))))}const n=Math.abs(i-e),l=r.logarithmic&&this._logDomainSpan(e,i,r.logBase)>=1,c=r.logarithmic&&(l||n>5);if(r.logarithmic&&!c&&(s.invalidLogScale=!0),c){s.allSeriesCollapsed=!1;const a=this._resolveLogTickAmount(r);s.yAxisScale[t]=r.forceNiceScale?this.logarithmicScaleNice(e,i,r.logBase,a):this.logarithmicScale(e,i,r.logBase,a)}else i!==-Number.MAX_VALUE&&S.isNumber(i)&&e!==Number.MAX_VALUE&&S.isNumber(e)?(s.allSeriesCollapsed=!1,s.yAxisScale[t]=this.niceScale(e,i,t)):s.yAxisScale[t]=this.niceScale(Number.MIN_VALUE,0,t)}setXScale(t,e){var i;const s=this.w,a=s.globals;if(e!==-Number.MAX_VALUE&&S.isNumber(e)){const r=s.config.xaxis;let o=void 0===(null!=(i=r.max)?i:r.range)?r.stepSize:void 0;const n=o>0&&!a.isBarHorizontal&&"datetime"!==r.type;if(n){const i=Math.ceil((e-t)/o-1e-9);i>1e3?o=void 0:a.xTickAmount=i}let l=this.linearScale(t,e,a.xTickAmount,0,o);if(n&&o){for(;l.niceMax<e;)l=this.linearScale(t,e,++a.xTickAmount,0,o);a.maxX=l.niceMax}a.xAxisScale=l}else a.xAxisScale=this.linearScale(0,10,10);return a.xAxisScale}scaleMultipleYAxes(){const t=this.w.config,e=this.w.globals;this.coreUtils.setSeriesYAxisMappings();const i=e.seriesYAxisMap,s=e.minYArr,a=e.maxYArr,r=[],o=!e.isBarHorizontal;if(e.allSeriesCollapsed=!0,i.forEach((i,n)=>{const l=[];if(i.forEach(e=>{var i;const s=null==(i=t.series[e])?void 0:i.group;l.indexOf(s)<0&&l.push(s)}),i.length>0){let c,h=Number.MAX_VALUE,d=-Number.MAX_VALUE,p=h,u=d;if(t.chart.stacked){const s=new Array(e.dataPoints).fill(0),a=[],r=[],o=[];l.forEach(()=>{a.push(s.map(()=>Number.MIN_VALUE)),r.push(s.map(()=>Number.MIN_VALUE)),o.push(s.map(()=>Number.MIN_VALUE))});for(let s=0;s<i.length;s++){!c&&t.series[i[s]].type&&(c=t.series[i[s]].type);const n=i[s];!(e.collapsedSeriesIndices.indexOf(n)<0&&e.ancillaryCollapsedSeriesIndices.indexOf(n)<0)||(e.allSeriesCollapsed=!1,l.forEach((e,i)=>{if(t.series[n].group===e)for(let t=0;t<this.w.seriesData.series[n].length;t++){const e=this.w.seriesData.series[n][t];e>=0?r[i][t]+=e:o[i][t]+=e,a[i][t]+=e,p=Math.min(p,e),u=Math.max(u,e)}}))}c||(c=t.chart.type),"bar"===c||"column"===c?l.forEach((t,e)=>{h=Math.min(h,Math.min.apply(null,o[e])),d=Math.max(d,Math.max.apply(null,r[e]))}):(l.forEach((t,e)=>{p=Math.min(p,Math.min.apply(null,a[e])),u=Math.max(u,Math.max.apply(null,a[e]))}),h=p,d=u),h===Number.MIN_VALUE&&d===Number.MIN_VALUE&&(d=-Number.MAX_VALUE)}else for(let t=0;t<i.length;t++){const r=i[t];h=Math.min(h,s[r]),d=Math.max(d,a[r]);!(e.collapsedSeriesIndices.indexOf(r)<0&&e.ancillaryCollapsedSeriesIndices.indexOf(r)<0)||(e.allSeriesCollapsed=!1)}void 0!==t.yaxis[n].min&&(h="function"==typeof t.yaxis[n].min?t.yaxis[n].min(h):t.yaxis[n].min),void 0!==t.yaxis[n].max&&(d="function"==typeof t.yaxis[n].max?t.yaxis[n].max(d):t.yaxis[n].max);const g=t.yaxis[n];o&&!0===g.alignZero&&!g.logarithmic&&void 0===g.min&&void 0===g.max&&e.ignoreYAxisIndexes.indexOf(n)<0&&S.isNumber(h)&&S.isNumber(d)?r.push({ai:n,minY:h,maxY:d}):(this.setYScaleForIndex(n,h,d),i.forEach(t=>{s[t]=e.yAxisScale[n].niceMin,a[t]=e.yAxisScale[n].niceMax}))}else this.setYScaleForIndex(n,0,-Number.MAX_VALUE)}),r.length>=2){r.forEach(t=>{this.setYScaleForIndex(t.ai,t.minY,t.maxY),i[t.ai].forEach(i=>{s[i]=e.yAxisScale[t.ai].niceMin,a[i]=e.yAxisScale[t.ai].niceMax})});let t=0;r.forEach(i=>{const s=e.yAxisScale[i.ai],a=s.niceMax-s.niceMin;if(a>0){const e=-s.niceMin/a;e>t&&(t=e)}}),t>1&&(t=1),t<0&&(t=0);const o=t=>{if(t<=0)return 1;const e=Math.floor(Math.log10(t)),i=Math.pow(10,e),s=t/i;let a;return a=s<=1+1e-9?1:s<=2+1e-9?2:s<=2.5+1e-9?2.5:s<=5+1e-9?5:10,a*i};r.forEach(r=>{const n=e.yAxisScale[r.ai];if(!n.result||n.result.length<2)return;const l=n.niceMax-n.niceMin;if(l<=0)return;const c=-n.niceMin/l;if(Math.abs(c-t)<=1e-9)return;const h=c<t&&t<1-1e-9,d=!h&&c>t&&t>1e-9;if(!h&&!d)return;const p=h?-t*n.niceMax/(1-t):n.niceMin,u=d?-n.niceMin*(1-t)/t:n.niceMax,g=u-p;if(g<=0)return;const x=Math.max(n.result.length,5),f=o(g/Math.max(x-1,1));if(f<=0)return;let m,b;if(h){m=Math.floor(p/f+1e-9)*f;const e=t>1e-9?m*(t-1)/t:n.niceMax,i=Math.max(e,n.niceMax);b=Math.ceil(i/f-1e-9)*f}else{b=Math.ceil(u/f-1e-9)*f;const e=t<1-1e-9?-t*b/(1-t):n.niceMin,i=Math.min(e,n.niceMin);m=Math.floor(i/f+1e-9)*f}n.result=[];for(let t=m;t<=b+1e-9*f;t=S.preciseAddition(t,f))n.result.push(S.stripNumber(t,7));n.niceMin=m,n.niceMax=b,i[r.ai].forEach(t=>{s[t]=n.niceMin,a[t]=n.niceMax})})}else if(1===r.length){const t=r[0];this.setYScaleForIndex(t.ai,t.minY,t.maxY),i[t.ai].forEach(i=>{s[i]=e.yAxisScale[t.ai].niceMin,a[i]=e.yAxisScale[t.ai].niceMax})}}}class Bi{constructor(t){this.w=t,this.scales=new Pi(this.w)}init(){this.setYRange(),this.setXRange(),this.setZRange()}_xPixelTolerance(t){const e=this.w.layout.gridWidth;if(!e||!t||!t.length)return 0;const i=this.w.config.xaxis,s="number"==typeof i.min?i.min:t[0],a="number"==typeof i.max?i.max:t[t.length-1];return a>s?(a-s)/e:0}_autoScaleYEnabled(){var t;const e=this.w.config,i=null==(t=this.w.globals.brushSource)?void 0:t.w.config.chart.brush;return!!(e.chart.zoom.enabled&&e.chart.zoom.autoScaleYaxis||(null==i?void 0:i.enabled)&&(null==i?void 0:i.autoScaleYaxis))}_autoScaleXBounds(t){const e=this.w.config.xaxis;if(!e.min&&!e.max)return null;const i=this._xPixelTolerance(this.w.seriesData.seriesX[t]);return{lo:e.min?e.min-i:-1/0,hi:e.max?e.max+i:1/0}}getMinYMaxY(t,e=Number.MAX_VALUE,i=-Number.MAX_VALUE,s=null){var a,r,o,n,l,c,h,d,p,u;const g=this.w.config,x=this.w.globals;let f=-Number.MAX_VALUE,m=Number.MIN_VALUE;null===s&&(s=t+1);const b=this.w.seriesData.series;let y=b,v=b;"candlestick"===g.chart.type?(y=this.w.candleData.seriesCandleL,v=this.w.candleData.seriesCandleH):"boxPlot"===g.chart.type?(y=this.w.candleData.seriesCandleO,v=this.w.candleData.seriesCandleC):"violin"===g.chart.type?(y=this.w.violinData.seriesViolinMin,v=this.w.violinData.seriesViolinMax):this.w.axisFlags.isRangeData&&(y=this.w.rangeData.seriesRangeStart,v=this.w.rangeData.seriesRangeEnd);let w=!1,A=!1;this.w.seriesData.seriesX.length>=s&&this._autoScaleYEnabled()&&!this._ignoreAutoScaleWindow&&(w=!0);for(let C=t;C<s;C++){x.dataPoints=Math.max(x.dataPoints,b[C].length);const t=g.series[C].type;this.w.labelData.categoryLabels.length&&(x.dataPoints=this.w.labelData.categoryLabels.filter(t=>void 0!==t).length),this.w.labelData.labels.length&&"datetime"!==g.xaxis.type&&0!==this.w.seriesData.series.reduce((t,e)=>t+e.length,0)&&(x.dataPoints=Math.max(x.dataPoints,this.w.labelData.labels.length));let s=0,k=b[C].length-1;if(w){const t=this.w.seriesData.seriesX[C],e=this._autoScaleXBounds(C);if(e&&g.xaxis.min)for(;s<k&&t[s]<e.lo;s++);if(e&&g.xaxis.max)for(;k>s&&t[k]>e.hi;k--);if(e&&t&&t.length){if(!(t[s]>=e.lo&&t[s]<=e.hi)){t[0]<e.lo&&t[t.length-1]>e.hi&&s>0?(k=s,s=k-1):(s=0,k=-1,A=!0)}}}const M=null==(r=null==(a=this.w.highlightData)?void 0:a.ext)?void 0:r[C];if(M)for(let t=s;t<=k&&t<M.length;t++){const i=M[t];null!=i&&(i>f&&(f=i),i<e&&(e=i),i<0&&i<m&&(m=i))}if(y===b&&v===b&&"boxPlot"!==g.chart.type&&"candlestick"!==t&&"boxPlot"!==t&&"violin"!==t&&"rangeArea"!==t&&"rangeBar"!==t&&!(this.w.seriesData.seriesGoals[C]&&this.w.seriesData.seriesGoals[C].length)){const a=b[C],r=Math.min(k,a.length-1),n=null==(o=this.w.seriesData._parsedExtrema)?void 0:o[C];if(n&&n.ref===a&&n.len===a.length&&0===s&&r===a.length-1)n.maxY>f&&(f=n.maxY),n.lowestY<e&&(e=n.lowestY),n.negMinY<0&&n.negMinY<m&&(m=n.negMinY),n.yDec>x.yValueDecimal&&(x.yValueDecimal=n.yDec),n.hasNulls&&(x.hasNullValues=!0);else{let t=x.yValueDecimal,i=!1;for(let o=s;o<=r;o++){const s=a[o];if(null!==s&&"number"==typeof s&&s==s&&s!==1/0&&s!==-1/0){if(s>f&&(f=s),s<e&&(e=s),m>s&&s<0&&(m=s),!Number.isInteger(s)){const e=s<0?-s:s;if(e>=1e-6&&e<1e21){const e=""+s,i=e.indexOf("."),a=-1===i?0:e.length-i-1;a>t&&(t=a)}else t=Math.max(t,S.decimalPlaces(s))}}else i=!0}x.yValueDecimal=t,i&&(x.hasNullValues=!0)}i=f,"bar"!==t&&"column"!==t||(m<0&&f<0&&(f=0,i=Math.max(i,0)),m===Number.MIN_VALUE&&(m=0,e=Math.min(e,0)));continue}for(let a=s;a<=k&&a<this.w.seriesData.series[C].length;a++){const s=b[C][a];if(null!==s&&S.isNumber(s)){switch(void 0!==(null==(n=v[C])?void 0:n[a])&&(f=Math.max(f,v[C][a]),e=Math.min(e,v[C][a])),void 0!==(null==(l=y[C])?void 0:l[a])&&(e=Math.min(e,y[C][a]),i=Math.max(i,y[C][a])),t){case"candlestick":void 0!==this.w.candleData.seriesCandleC[C][a]&&(f=Math.max(f,this.w.candleData.seriesCandleH[C][a]),e=Math.min(e,this.w.candleData.seriesCandleL[C][a]));break;case"boxPlot":void 0!==this.w.candleData.seriesCandleC[C][a]&&(f=Math.max(f,this.w.candleData.seriesCandleC[C][a]),e=Math.min(e,this.w.candleData.seriesCandleO[C][a]));break;case"violin":void 0!==(null==(c=this.w.violinData.seriesViolinMax[C])?void 0:c[a])&&(f=Math.max(f,this.w.violinData.seriesViolinMax[C][a]),e=Math.min(e,this.w.violinData.seriesViolinMin[C][a]))}if(t&&"candlestick"!==t&&"boxPlot"!==t&&"violin"!==t&&"rangeArea"!==t&&"rangeBar"!==t&&(f=Math.max(f,this.w.seriesData.series[C][a]),e=Math.min(e,this.w.seriesData.series[C][a])),this.w.seriesData.seriesGoals[C]&&this.w.seriesData.seriesGoals[C][a]&&Array.isArray(this.w.seriesData.seriesGoals[C][a])&&this.w.seriesData.seriesGoals[C][a].forEach(t=>{f=Math.max(f,t.value),e=Math.min(e,t.value)}),"boxPlot"===this.w.config.chart.type||"boxPlot"===t){const t=null==(d=null==(h=this.w.candleData.seriesBoxPoints)?void 0:h[C])?void 0:d[a];if(t)for(let i=0;i<t.length;i++){const s=t[i];"number"==typeof s&&(f=Math.max(f,s),e=Math.min(e,s))}}i=f,S.isFloat(s)&&(x.yValueDecimal=Math.max(x.yValueDecimal,S.decimalPlaces(s))),m>(null==(p=y[C])?void 0:p[a])&&(null==(u=y[C])?void 0:u[a])<0&&(m=y[C][a])}else x.hasNullValues=!0}"bar"!==t&&"column"!==t||(m<0&&f<0&&(f=0,i=Math.max(i,0)),m===Number.MIN_VALUE&&(m=0,e=Math.min(e,0)))}if("rangeBar"===g.chart.type&&this.w.rangeData.seriesRangeStart.length&&x.isBarHorizontal&&(m=e),"bar"===g.chart.type&&(m<0&&f<0&&(f=0),m===Number.MIN_VALUE&&(m=0)),A&&f===-Number.MAX_VALUE){this._ignoreAutoScaleWindow=!0;try{return this.getMinYMaxY(t,Number.MAX_VALUE,-Number.MAX_VALUE,s)}finally{this._ignoreAutoScaleWindow=!1}}return{minY:m,maxY:f,lowestY:e,highestY:i}}setYRange(){const t=this.w.globals,e=this.w.config;t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE;let i,s=Number.MAX_VALUE;if(t.isMultipleYAxis){s=Number.MAX_VALUE;for(let e=0;e<this.w.seriesData.series.length;e++)i=this.getMinYMaxY(e),t.minYArr[e]=i.lowestY,t.maxYArr[e]=i.highestY,s=Math.min(s,i.lowestY)}i=this.getMinYMaxY(0,s,void 0,this.w.seriesData.series.length),"bar"===e.chart.type?(t.minY=i.minY,t.maxY=i.maxY):(t.minY=i.lowestY,t.maxY=i.highestY),s=i.lowestY,e.chart.stacked&&this._setStackedMinMax(),"line"===e.chart.type||"area"===e.chart.type||"rangeArea"===e.chart.type||"scatter"===e.chart.type||"candlestick"===e.chart.type||"boxPlot"===e.chart.type||"violin"===e.chart.type||"rangeBar"===e.chart.type&&!t.isBarHorizontal?t.minY===Number.MIN_VALUE&&s!==-Number.MAX_VALUE&&s!==t.maxY&&(t.minY=s):t.minY=t.minY!==Number.MIN_VALUE?Math.min(i.minY,t.minY):i.minY;const a=(t,e)=>{if("number"==typeof t)return t;if("function"!=typeof t)return;const i=t(e);return S.isNumber(i)?i:void 0},r=e.yaxis[0];if(!t.isMultipleYAxis&&r){const e=a(r.max,t.maxY);void 0!==e&&(t.maxYArr[0]=t.maxY=e);const i=a(r.min,t.minY);void 0!==i&&(t.minYArr[0]=t.minY=i)}if(t.isBarHorizontal){["min","max"].forEach(i=>{void 0!==e.xaxis[i]&&"number"==typeof e.xaxis[i]&&("min"===i?t.minY=e.xaxis[i]:t.maxY=e.xaxis[i])})}return t.isMultipleYAxis?(this.scales.scaleMultipleYAxes(),t.minY=s):(this.scales.setYScaleForIndex(0,t.minY,t.maxY),t.minY=t.yAxisScale[0].niceMin,t.maxY=t.yAxisScale[0].niceMax,t.minYArr[0]=t.minY,t.maxYArr[0]=t.maxY),t.barGroups=[],t.lineGroups=[],t.areaGroups=[],e.series.forEach((i,s)=>{const a=this.w.labelData.seriesGroupIndex[s];switch(i.type||e.chart.type){case"bar":case"column":t.barGroups.push(a);break;case"line":t.lineGroups.push(a);break;case"area":t.areaGroups.push(a)}}),t.barGroups=t.barGroups.filter((t,e,i)=>i.indexOf(t)===e),t.lineGroups=t.lineGroups.filter((t,e,i)=>i.indexOf(t)===e),t.areaGroups=t.areaGroups.filter((t,e,i)=>i.indexOf(t)===e),{minY:t.minY,maxY:t.maxY,minYArr:t.minYArr,maxYArr:t.maxYArr,yAxisScale:t.yAxisScale}}setXRange(){var t,e;const i=this.w.globals,s=this.w.config,a="numeric"===s.xaxis.type||"datetime"===s.xaxis.type||"category"===s.xaxis.type&&!this.w.axisFlags.noLabelsProvided||this.w.axisFlags.noLabelsProvided||this.w.axisFlags.isXNumeric,r=()=>{var t;let e=i.minX,s=i.maxX;for(let i=0;i<this.w.seriesData.series.length;i++){const a=this.w.labelData.labels[i];if(!a)continue;const r=null==(t=this.w.seriesData._parsedExtrema)?void 0:t[i];if(r&&r.xNumeric&&r.xref===a&&r.len===a.length)r.maxX>s&&(s=r.maxX),r.minX<e&&(e=r.minX);else for(let t=0;t<a.length;t++){const i=a[t];null!==i&&"number"==typeof i&&i==i&&(i>s&&(s=i),i<e&&(e=i))}}i.maxX=s,i.initialMaxX=s,i.minX=e,i.initialMinX=e};if(this.w.axisFlags.isXNumeric&&r(),this.w.axisFlags.noLabelsProvided&&0===s.xaxis.categories.length&&(i.maxX=this.w.labelData.labels[this.w.labelData.labels.length-1],i.initialMaxX=this.w.labelData.labels[this.w.labelData.labels.length-1],i.minX=1,i.initialMinX=1),this.w.axisFlags.isXNumeric||this.w.axisFlags.noLabelsProvided||this.w.axisFlags.dataFormatXNumeric){let r=10;if(void 0===s.xaxis.tickAmount){r=Math.round(i.svgWidth/150);const t=this.w.axisFlags.isXNumeric&&this.w.axisFlags.dataFormatXNumeric&&"datetime"!==s.xaxis.type&&!s.xaxis.convertedCatToNumeric&&!i.isBarHorizontal,e=()=>{const t=parseFloat(s.xaxis.labels.style.fontSize)||12,e=this.w.labelData.labels.reduce((t,e)=>Array.isArray(e)?e.reduce((t,e)=>Math.max(t,String(e).length),t):t,0);return i.dataPoints*e*t*.6<=i.svgWidth};i.dataPoints<30&&("numeric"===s.xaxis.type||t&&e())&&(r=i.dataPoints-1),r>i.dataPoints&&0!==i.dataPoints&&(r=i.dataPoints-1)}else if("dataPoints"===s.xaxis.tickAmount){if(r=Math.max(1,(this.w.seriesData.series[i.maxValsInArrayIndex]||[]).length-1),this.w.axisFlags.isXNumeric){const t=Math.round(i.maxX-i.minX);t<30&&(r=t)}}else r=s.xaxis.tickAmount;if(i.xTickAmount=r,void 0!==s.xaxis.max&&"number"==typeof s.xaxis.max&&(i.maxX=s.xaxis.max),void 0!==s.xaxis.min&&"number"==typeof s.xaxis.min&&(i.minX=s.xaxis.min),void 0!==s.xaxis.range&&(i.minX=i.maxX-s.xaxis.range),"heatmap"===s.chart.type&&(null==(e=(t=lt("heatmap").prototype).padXRange)||e.call(t,this)),i.minX!==Number.MAX_VALUE&&i.maxX!==-Number.MAX_VALUE)if(s.xaxis.convertedCatToNumeric&&!this.w.axisFlags.dataFormatXNumeric){const t=[];for(let e=i.minX-1;e<i.maxX;e++)t.push(e+1);i.xAxisScale={result:t,niceMin:t[0],niceMax:t[t.length-1]}}else i.xAxisScale=this.scales.setXScale(i.minX,i.maxX);else i.xAxisScale=this.scales.linearScale(0,r,r,0,s.xaxis.stepSize),this.w.axisFlags.noLabelsProvided&&this.w.labelData.labels.length>0&&(i.xAxisScale=this.scales.linearScale(1,this.w.labelData.labels.length,r-1,0,s.xaxis.stepSize),this.w.seriesData.seriesX=this.w.labelData.labels.slice());if(a&&i.isBarHorizontal){const t=(this.w.seriesData.seriesX[i.maxValsInArrayIndex]||[]).slice(),e=new Set(t),a=t.length;if("bar"===s.chart.type&&this.w.seriesData.seriesX.forEach(i=>null==i?void 0:i.forEach(i=>{null==i||e.has(i)||(e.add(i),t.push(i))})),t.length>a){const e=t[0]>t[a-1]?-1:1;t.sort((t,i)=>(t-i)*e),i.dataPoints=t.length}this.w.labelData.labels=t}else a&&(this.w.labelData.labels=i.xAxisScale.result.slice())}return i.isBarHorizontal&&this.w.labelData.labels.length&&(i.xTickAmount=this.w.labelData.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:i.minX,maxX:i.maxX}}setZRange(){var t;const e=this.w.globals;if(!this.w.axisFlags.isDataXYZ)return;for(let t=0;t<this.w.seriesData.series.length;t++)if(void 0!==this.w.seriesData.seriesZ[t])for(let i=0;i<this.w.seriesData.seriesZ[t].length;i++)null!==this.w.seriesData.seriesZ[t][i]&&S.isNumber(this.w.seriesData.seriesZ[t][i])&&(e.maxZ=Math.max(e.maxZ,this.w.seriesData.seriesZ[t][i]),e.minZ=Math.min(e.minZ,this.w.seriesData.seriesZ[t][i]));const i=(null==(t=this.w.config.plotOptions)?void 0:t.bubble)||{};S.isNumber(i.minZ)&&i.minZ<e.minZ&&(e.minZ=i.minZ),S.isNumber(i.maxZ)&&i.maxZ>e.maxZ&&(e.maxZ=i.maxZ)}_handleSingleDataPoint(){const t=this.w.globals,e=this.w.config;if(t.minX===t.maxX){const i=new C(this.w);if("datetime"===e.xaxis.type){const s=i.getDate(t.minX);e.xaxis.labels.datetimeUTC?s.setUTCDate(s.getUTCDate()-2):s.setDate(s.getDate()-2),t.minX=new Date(s).getTime();const a=i.getDate(t.maxX);e.xaxis.labels.datetimeUTC?a.setUTCDate(a.getUTCDate()+2):a.setDate(a.getDate()+2),t.maxX=new Date(a).getTime()}else("numeric"===e.xaxis.type||"category"===e.xaxis.type&&!this.w.axisFlags.noLabelsProvided)&&(t.minX=t.minX-2,t.initialMinX=t.minX,t.maxX=t.maxX+2,t.initialMaxX=t.maxX)}}_getMinXDiff(){const t=this.w.globals;this.w.axisFlags.isXNumeric&&this.w.seriesData.seriesX.forEach((e,i)=>{var s;if(e.length){1===e.length&&e.push(this.w.seriesData.seriesX[t.maxValsInArrayIndex][this.w.seriesData.seriesX[t.maxValsInArrayIndex].length-1]);const a=null==(s=this.w.seriesData._parsedExtrema)?void 0:s[i];if(a&&a.xNumeric&&a.xSorted&&a.xref===e&&a.len===e.length)return a.minXDiff<t.minXDiff&&(t.minXDiff=a.minXDiff),void(1!==t.dataPoints&&t.minXDiff!==Number.MAX_VALUE||(t.minXDiff=.5));let r=!0,o=t.minXDiff;for(let t=1;t<e.length;t++){const i=e[t]-e[t-1];if(i>0)i<o&&(o=i);else if(i<0){r=!1;break}}if(r)return t.minXDiff=o,void(1!==t.dataPoints&&t.minXDiff!==Number.MAX_VALUE||(t.minXDiff=.5));const n=e.slice();n.sort((t,e)=>t-e),n.forEach((e,i)=>{if(i>0){const s=e-n[i-1];s>0&&(t.minXDiff=Math.min(s,t.minXDiff))}}),1!==t.dataPoints&&t.minXDiff!==Number.MAX_VALUE||(t.minXDiff=.5)}})}_setStackedMinMax(){const t=this.w.globals,e=this._autoScaleYEnabled();if(!this.w.seriesData.series.length)return;const i=this.w.labelData.seriesGroupIndex,s=this.w.axisFlags.isXNumeric,a=new Map;this.w.config.series.forEach((r,o)=>{const n=e?this._autoScaleXBounds(o):null,l=this.w.seriesData.seriesX[o],c=!!(n&&l&&l.length),h=this.w.config.chart.stacked&&(!t.comboCharts||!this.w.config.chart.stackOnlyBar||"bar"===(null==r?void 0:r.type)||"column"===(null==r?void 0:r.type));for(let e=0;e<this.w.seriesData.series[t.maxValsInArrayIndex].length;e++){if(c&&(l[e]<n.lo||l[e]>n.hi))continue;const t=(i[o]||0)+"|"+(s&&l?l[e]:e);let r=a.get(t);r||a.set(t,r=[0,0]);const d=this.w.seriesData.series[o][e];h&&null!==d&&S.isNumber(d)&&(d>0?r[0]+=1.000001*d:r[1]+=+d)}}),a.forEach(e=>{t.maxY=Math.max(t.maxY,e[0]),t.minY=Math.min(t.minY,e[1])})}}const Ni=1e3,zi=6e4,Ri=36e5,Ii=24*Ri,Oi=7*Ii,Xi=30*Ii,Hi=365*Ii,Yi=10/86400,Wi=[{unit:"second",step:1,approxMs:Ni},{unit:"second",step:5,approxMs:5e3},{unit:"second",step:15,approxMs:15e3},{unit:"second",step:30,approxMs:3e4},{unit:"minute",step:1,approxMs:zi},{unit:"minute",step:5,approxMs:3e5},{unit:"minute",step:15,approxMs:9e5},{unit:"minute",step:30,approxMs:18e5},{unit:"hour",step:1,approxMs:Ri},{unit:"hour",step:3,approxMs:3*Ri},{unit:"hour",step:6,approxMs:6*Ri},{unit:"hour",step:12,approxMs:12*Ri},{unit:"day",step:1,approxMs:Ii},{unit:"day",step:2,approxMs:2*Ii},{unit:"week",step:1,approxMs:Oi},{unit:"week",step:2,approxMs:2*Oi},{unit:"month",step:1,approxMs:Xi},{unit:"month",step:3,approxMs:7776e6},{unit:"month",step:6,approxMs:15552e6},{unit:"year",step:1,approxMs:Hi},{unit:"year",step:2,approxMs:63072e6},{unit:"year",step:5,approxMs:15768e7},{unit:"year",step:10,approxMs:31536e7},{unit:"year",step:25,approxMs:7884e8},{unit:"year",step:50,approxMs:15768e8},{unit:"year",step:100,approxMs:31536e8}];class $i{constructor(t,e){this.w=t,this.ctx=e,this.tickInterval=null,this.timeScaleArray=[],this.utc=t.config.xaxis.labels.datetimeUTC}calculateTimeScaleTicks(t,e){const i=this.w;if(i.globals.allSeriesCollapsed)return i.labelData.labels=[],i.labelData.timescaleLabels=[],this.timeScaleArray=[],[];const s=e-t,a=s/Ii;i.interact.disableZoomIn=!1,i.interact.disableZoomOut=!1,a<Yi?i.interact.disableZoomIn=!0:a>5e4&&(i.interact.disableZoomOut=!0);const r=Number.isFinite(i.config.xaxis.tickAmount)?i.config.xaxis.tickAmount:10;this.tickInterval=function(t,e){(!Number.isFinite(e)||e<=0)&&(e=10);if(t<=0)return Wi[0];const i=t/e;let s=Wi[0],a=1/0;for(const t of Wi){const e=Math.abs(Math.log(t.approxMs/i));e<a&&(a=e,s=t)}return s}(s,r);const o=this.generateBaseTicks(t,e,this.tickInterval);return this.timeScaleArray=o,o}generateBaseTicks(t,e,i){const s=this.w,a=new C(s),r=this.utc,o=s.layout.gridWidth,n=e-t,l=[];let c=a.ceilToBoundary(t,i.unit,i.step,r),h=0;for(;c<=e&&h<5e3;){const e=a.getDateFields(c,r),s=n>0?(c-t)/n*o:0;l.push({timestamp:c,position:s,unit:i.unit,year:e.year,month:e.month+1,day:e.date,hour:e.hour,minute:e.minute,second:e.second,value:c}),c=a.addInterval(c,i.unit,i.step,r),h++}return l}recalcDimensionsBasedOnFormat(t){const e=this.w,i=this.formatDates(t),s=this.removeOverlappingTS(i);e.labelData.timescaleLabels=s.slice();const a=new Ei(this.w,this.ctx).plotCoords();this.ctx._writeLayoutCoords(a.layout)}formatDates(t){const e=this.w,i=new C(e),s=e.config.xaxis.labels.format,a=e.config.xaxis.labels.datetimeFormatter,r=this.utc,o=(t,e=2)=>String(t).padStart(e,"0"),n=s||this._effectiveFormat(t,a);return t.map(t=>{const e=i.getDate(t.timestamp),s=i.formatDate(e,n);return{dateString:`${t.year}-${o(t.month)}-${o(t.day)}T${o(t.hour)}:${o(t.minute)}:${o(t.second)}.000${r?"Z":""}`,position:t.position,value:s,unit:t.unit,year:t.year,month:t.month}})}_effectiveFormat(t,e){if(0===t.length)return e.day||"dd MMM";const i=this.tickInterval&&this.tickInterval.unit||t[0].unit,s=e["week"===i?"day":i]||e.day||"dd MMM",a=t[0],r=t[t.length-1],o=a.year!==r.year,n=o||a.month!==r.month||a.day!==r.day,l=/y/i.test(s),c=/M/.test(s),h=/d/i.test(s);if("month"===i||"week"===i)return o&&!l?s+" yyyy":s;if("day"===i)return o&&!l?s+" yyyy":s;if("hour"===i||"minute"===i||"second"===i){if(n&&!h&&!c){return(o?"dd MMM yyyy":"dd MMM")+" "+s}return s}return s}removeOverlappingTS(t){if(0===t.length)return[];const e=this.w,i=new xa(e);let s,a=!1;t[0].value&&t.every(e=>e.value.length===t[0].value.length)&&(a=!0,s=i.getTextRects(t[0].value,e.config.xaxis.labels.style.fontSize).width);let r=0;return t.map((o,n)=>{if(0===n)return o;if(!e.config.xaxis.labels.hideOverlappingLabels)return o;const l=a?s:i.getTextRects(t[r].value,e.config.xaxis.labels.style.fontSize).width,c=t[r].position;return o.position>c+l+10?(r=n,o):null}).filter(t=>null!==t)}}class Gi{constructor(t,e,i){this.w=e,this.ctx=i,this.el=t}setupElements(){var t;const{globals:e,config:i}=this.w,s=i.chart.type,a=!R.includes(s)&&rt(s);e.axisCharts=I.includes(s)||a,e.xyCharts=P.includes(s)||a,e.isBarHorizontal=["bar","rangeBar","boxPlot","violin"].includes(s)&&i.plotOptions.bar.horizontal,e.isSlopeChart=!!i.plotOptions.line.isSlopeChart,e.chartClass=`.apexcharts${e.chartID}`,this.w.dom.baseEl=this.el,this.w.dom.elWrap=v.createElementNS("http://www.w3.org/1999/xhtml","div");const r=!1===(null==(t=i.chart.animations)?void 0:t.respectReducedMotion);xa.setAttrs(this.w.dom.elWrap,{id:e.chartClass.substring(1),class:`apexcharts-canvas ${e.chartClass.substring(1)}`+(r?" apexcharts-ignore-reduced-motion":"")}),this.el.appendChild(this.w.dom.elWrap);const o=globalThis.SVG;if(this.w.dom.Paper=o().addTo(this.w.dom.elWrap),this.w.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:`translate(${i.chart.offsetX}, ${i.chart.offsetY})`}),this.w.dom.Paper.node.style.background="dark"!==i.theme.mode||i.chart.background?"light"!==i.theme.mode||i.chart.background?i.chart.background:"#fff":"#343A3F",this.setSVGDimensions(),this.w.dom.elLegendForeign=v.createElementNS(bt,"foreignObject"),xa.setAttrs(this.w.dom.elLegendForeign,{x:0,y:0,width:e.svgWidth,height:e.svgHeight}),this.w.dom.elLegendWrap=v.createElementNS("http://www.w3.org/1999/xhtml","div"),this.w.dom.elLegendWrap.classList.add("apexcharts-legend"),this.w.dom.elWrap.appendChild(this.w.dom.elLegendWrap),this.w.dom.Paper.node.appendChild(this.w.dom.elLegendForeign),i.chart.accessibility.enabled&&i.chart.accessibility.announcements.enabled){const t=v.createElement("div");t.className="apexcharts-sr-status",t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-atomic","true"),this.w.dom.elWrap.appendChild(t)}if(i.chart.accessibility.enabled){const t=this.getAccessibleChartLabel(),e=i.chart.accessibility.keyboard.enabled&&i.chart.accessibility.keyboard.navigation.enabled?"application":"img";if(this.w.dom.Paper.attr({role:e,"aria-label":t}),i.chart.accessibility.description){const t=v.createElementNS(bt,"desc");t.textContent=i.chart.accessibility.description,this.w.dom.Paper.node.insertBefore(t,this.w.dom.elLegendForeign.nextSibling)}}this.w.dom.elGraphical=this.w.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}),this.w.dom.elDefs=this.w.dom.Paper.defs(),this.w.dom.Paper.add(this.w.dom.elGraphical),this.w.dom.elGraphical.add(this.w.dom.elDefs)}_classifySeriesByType(t){const{w:e}=this,{config:i,globals:s}=e,a={line:{series:[],i:[]},area:{series:[],i:[]},scatter:{series:[],i:[]},bubble:{series:[],i:[]},bar:{series:[],i:[]},candlestick:{series:[],i:[]},boxPlot:{series:[],i:[]},violin:{series:[],i:[]},rangeBar:{series:[],i:[]},rangeArea:{series:[],seriesRangeEnd:[],i:[]}},r={},o=i.chart.type||"line";let n=null,l=0;return this.w.seriesData.series.forEach((i,s)=>{var c,h;const d="column"===(null==(c=t[s])?void 0:c.type)?"bar":(null==(h=t[s])?void 0:h.type)||("column"===o?"bar":o),p=a;p[d]?("rangeArea"===d?(p[d].series.push(this.w.rangeData.seriesRangeStart[s]),p[d].seriesRangeEnd.push(this.w.rangeData.seriesRangeEnd[s])):p[d].series.push(i),p[d].i.push(s),"bar"===d&&(e.globals.columnSeries=a.bar)):O.includes(d)?n=d:rt(d)?(r[d]||(r[d]={series:[],i:[]}),r[d].series.push(i),r[d].i.push(s)):console.warn(`You have specified an unrecognized series type (${d}).`),o!==d&&"scatter"!==d&&l++}),l>0&&(n&&console.warn(`Chart or series type ${n} cannot appear with other chart or series types.`),a.bar.series.length>0&&i.plotOptions.bar.horizontal&&(l-=a.bar.series.length,a.bar={series:[],i:[]},e.globals.columnSeries={series:[],i:[]},console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"))),s.comboCharts||(s.comboCharts=l>0),{seriesTypes:a,customBuckets:r}}plotChartType(t,e){const{w:i,ctx:s}=this,a=s.renderer&&"canvas"===s.renderer.kind;a&&(s.renderer.beginSeries(),i.globals.barCanvasCoords=null);const{seriesTypes:r,customBuckets:o}=this._classifySeriesByType(t),n=this._instantiateSeriesRenderers(r,e),l=this._assembleSeriesGraphics(r,o,n,e);if(a){new se(i).showDelayedElements();const t=s.renderer;if(t&&t._repaintHostInPlace){t._repaintHostInPlace=!1;const e=this.w.dom.elGraphical.node.querySelector(".apexcharts-canvas-series-wrap");if(e&&t.canRepaintInPlace&&t.canRepaintInPlace()){t.repaintInPlace();return(Array.isArray(l)?l:[l]).forEach(t=>{t&&t.node&&e.appendChild(t.node)}),[]}}const e=s.renderer.present();if(e){const t=new xa(i).group({class:"apexcharts-canvas-series-wrap"});t.add(e);return(Array.isArray(l)?l:[l]).forEach(e=>{e&&t.add(e)}),t}}return l}_instantiateSeriesRenderers(t,e){const{w:i,ctx:s}=this,{config:a,globals:r}=i,o=t.line.series.length>0||t.area.series.length>0||t.scatter.series.length>0||t.bubble.series.length>0||t.rangeArea.series.length>0||!r.comboCharts&&["line","area","scatter","bubble","rangeArea"].includes(a.chart.type)?new(lt("line",a.chart.requestedType))(s.w,s,e):null,n=t.candlestick.series.length>0||t.boxPlot.series.length>0||!r.comboCharts&&["candlestick","boxPlot"].includes(a.chart.type)?new(lt("candlestick"))(s.w,s,e):null,l=t.violin.series.length>0||!r.comboCharts&&"violin"===a.chart.type?new(lt("violin",a.chart.requestedType))(s.w,s,e):null,c=!r.comboCharts&&["pie","donut","polarArea"].includes(a.chart.type);s.pie=c?new(lt("pie"))(s.w,s):null;const h=t.rangeBar.series.length>0||!r.comboCharts&&"rangeBar"===a.chart.type;return s.rangeBar=h?new(lt("rangeBar",a.chart.requestedType))(s.w,s,e):null,{line:o,boxCandlestick:n,violin:l}}_assembleSeriesGraphics(t,e,i,s){const{w:a,ctx:r}=this,{config:o,globals:n}=a,{line:l,boxCandlestick:c,violin:h}=i;"unit"!==o.chart.type&&(r._unitPrevDots=null);let d=[];if(n.comboCharts){const i=new mt(this.w);if(t.area.series.length>0&&d.push(...i.drawSeriesByGroup(t.area,n.areaGroups,"area",l)),t.bar.series.length>0)if(o.chart.stacked){const e=new(lt("barStacked"))(r.w,r,s);d.push(e.draw(t.bar.series,t.bar.i))}else r.bar=new(lt("bar"))(r.w,r,s),d.push(r.bar.draw(t.bar.series,t.bar.i));if(t.rangeArea.series.length>0&&d.push(l.draw(t.rangeArea.series,"rangeArea",t.rangeArea.i,t.rangeArea.seriesRangeEnd)),t.line.series.length>0&&d.push(...i.drawSeriesByGroup(t.line,n.lineGroups,"line",l)),t.candlestick.series.length>0&&d.push(c.draw(t.candlestick.series,"candlestick",t.candlestick.i)),t.boxPlot.series.length>0&&d.push(c.draw(t.boxPlot.series,"boxPlot",t.boxPlot.i)),t.violin.series.length>0&&d.push(h.draw(t.violin.series,"violin",t.violin.i)),t.rangeBar.series.length>0&&d.push(r.rangeBar.draw(t.rangeBar.series,t.rangeBar.i)),t.scatter.series.length>0){const e=new(lt("line"))(r.w,r,s,!0);d.push(e.draw(t.scatter.series,"scatter",t.scatter.i))}if(t.bubble.series.length>0){const e=new(lt("line"))(r.w,r,s,!0);d.push(e.draw(t.bubble.series,"bubble",t.bubble.i))}Object.keys(e).forEach(t=>{const i=e[t];if(i.series.length>0){const e=new(lt(t))(r.w,r,s);d.push(e.draw(i.series,t,i.i))}})}else{const t=o.chart.type;switch(t){case"line":d=l.draw(this.w.seriesData.series,"line");break;case"area":d=l.draw(this.w.seriesData.series,"area");break;case"bar":if(o.chart.stacked){const t=new(lt("barStacked",o.chart.requestedType))(r.w,r,s);d=t.draw(this.w.seriesData.series)}else r.bar=new(lt("bar",o.chart.requestedType))(r.w,r,s),d=r.bar.draw(this.w.seriesData.series);break;case"candlestick":d=c.draw(this.w.seriesData.series,"candlestick");break;case"boxPlot":d=c.draw(this.w.seriesData.series,t);break;case"violin":d=h.draw(this.w.seriesData.series,"violin");break;case"rangeBar":d=r.rangeBar.draw(this.w.seriesData.series);break;case"rangeArea":d=l.draw(this.w.rangeData.seriesRangeStart,"rangeArea",void 0,this.w.rangeData.seriesRangeEnd);break;case"heatmap":{const t=new(lt("heatmap"))(r.w,r,s);d=t.draw(this.w.seriesData.series);break}case"treemap":{const t=new(lt("treemap"))(r.w,r);d=t.draw();break}case"unit":{const t=new(lt("unit",this.w.config.chart.requestedType))(r.w,r);d=t.draw(this.w.seriesData.series);break}case"sunburst":{const t=new(lt("sunburst",this.w.config.chart.requestedType))(r.w,r);d=t.draw(this.w.seriesData.series);break}case"icicle":{const t=new(lt("icicle"))(r.w,r);d=t.draw(this.w.seriesData.series);break}case"pie":case"donut":case"polarArea":d=r.pie.draw(this.w.seriesData.series);break;case"radialBar":{const t=new(lt("radialBar"))(r.w,r);d=t.draw(this.w.seriesData.series);break}case"radar":{const t=new(lt("radar"))(r.w,r);d=t.draw(this.w.seriesData.series);break}default:if(rt(t)){const e=new(lt(t))(r.w,r,s);d=e.draw(this.w.seriesData.series,t)}else{if(!l)throw new Error(`ApexCharts: no renderer for chart.type "${t}".`);d=l.draw(this.w.seriesData.series)}}}return d}_extractDimensionUnit(t){return String(t).split(/[0-9]+/g).pop()}setSVGDimensions(){var t;const{globals:e,config:i}=this.w;i.chart.width=i.chart.width||"100%",i.chart.height=i.chart.height||"auto";const s=i.chart.width,a=i.chart.height;e.svgWidth=NaN,e.svgHeight=NaN;const r=S.getDimensions(this.el),o=this._extractDimensionUnit(s);"%"===o?S.isNumber(r[0])&&(e.svgWidth=r[0]*parseInt(s,10)/100):"px"!==o&&""!==o||(e.svgWidth=parseInt(s,10));const n=this._extractDimensionUnit(a);if("auto"!==a&&""!==a)if("%"===n){const t=S.getDimensions(this.el.parentNode);e.svgHeight=t[1]*parseInt(a,10)/100}else e.svgHeight=parseInt(a,10);else e.svgHeight=e.axisCharts?e.svgWidth/1.61:e.svgWidth/1.2;if(this._applyWeaveReservation(e),e.svgWidth=Math.max(e.svgWidth,0),e.svgHeight=Math.max(e.svgHeight,0),xa.setAttrs(this.w.dom.Paper.node,{width:e.svgWidth,height:e.svgHeight}),"%"!==n&&p.isBrowser()){const s=e.axisCharts&&(i.grid.show||i.dataLabels.enabled||i.xaxis.labels.show||i.xaxis.axisBorder.show||i.xaxis.axisTicks.show||i.yaxis.some(t=>t.show&&(t.labels.show||t.axisBorder.show||t.axisTicks.show))),a=i.chart.sparkline.enabled||!s?0:i.chart.parentHeightOffset,r=this.w.dom.Paper.node;(null==(t=r.parentNode)?void 0:t.parentNode)&&(r.parentNode.parentNode.style.minHeight=`${e.svgHeight+a}px`)}this.w.dom.elWrap.style.width=`${e.svgWidth}px`,this.w.dom.elWrap.style.height=`${e.svgHeight}px`,e.lastResizeSignature=this.getResizeSignature()}_applyWeaveReservation(t){const e=this.ctx&&this.ctx.weave;if(!e||"function"!=typeof e.reservedBox)return;const i=e.reservedBox(),s=i.left+i.right,a=i.top+i.bottom;(s||a)&&(s&&Number.isFinite(t.svgWidth)&&(t.svgWidth-=Math.min(s,t.svgWidth/2)),a&&Number.isFinite(t.svgHeight)&&(t.svgHeight-=Math.min(a,t.svgHeight/2)))}getResizeSignature(){const{config:t}=this.w,e=(t.chart.width||"100%").toString().trim(),i=(t.chart.height||"auto").toString().trim();let s=0,a=0;e.endsWith("%")&&(s=S.getDimensions(this.el)[0]||0),i.endsWith("%")&&(a=S.getDimensions(this.el.parentNode)[1]||0);const r={w:Math.round(s),h:Math.round(a)};return t.responsive&&t.responsive.length&&p.isBrowser()&&(r.iw=window.innerWidth),r}shiftGraphPosition(){const{globals:t}=this.w,{translateY:e,translateX:i}=t;xa.setAttrs(this.w.dom.elGraphical.node,{transform:`translate(${i}, ${e})`})}resizeNonAxisCharts(){var t,e,i,s,a,r,o,n,l,c;const{w:h}=this,d=h.config.chart.height?String(h.config.chart.height):"",u=""!==d&&"auto"!==d,g=d.includes("%");let x=0,f=h.config.chart.sparkline.enabled?1:15;f+=h.layout.gridPad.bottom,["top","bottom"].includes(h.config.legend.position)&&h.config.legend.show&&!h.config.legend.floating&&(x=(null!=(e=null==(t=this.ctx.legend)?void 0:t.legendHelpers.getLegendDimensions().clwh)?e:0)+7);const m=h.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie, .apexcharts-sunburst"),b=h.globals.pieExternalLabelMarginY||0;let y=b>0?2*h.globals.radialSize+2*b:2.05*h.globals.radialSize;const v="sunburst"===h.config.chart.type?"sunburst":"pie"===h.config.chart.type||"donut"===h.config.chart.type||"polarArea"===h.config.chart.type?"pie":"radialBar",w=Math.abs(h.config.plotOptions[v].endAngle-h.config.plotOptions[v].startAngle);if(m&&!h.config.chart.sparkline.enabled&&w<360){const t=S.getBoundingClientRect(this.w.dom.Paper.node);let e=1/0,c=-1/0;const d=i=>{var s,a,r,o;if(null==(s=i.classList)?void 0:s.contains("apexcharts-radialbar-hollow"))return;const n=null==(r=null==(a=i.tagName)?void 0:a.toLowerCase)?void 0:r.call(a);if("text"===n||"tspan"===n)return;const l=Array.from(null!=(o=i.children)?o:[]);if(l.length>0)return void l.forEach(t=>d(t));const h=S.getBoundingClientRect(i);if(h.bottom-h.top>0){const i=h.top-t.top,s=h.bottom-t.top;i<e&&(e=i),s>c&&(c=s)}},u=null==(i=h.globals.circleGeometry)?void 0:i.y;if(u?(e=h.layout.translateY+u[0]-b,c=h.layout.translateY+u[1]+b):Array.from(null!=(s=m.children)?s:[]).forEach(t=>d(t)),Number.isFinite(e)||(e=0),!Number.isFinite(c)){const e=S.getBoundingClientRect(m);c=e.bottom-t.top}const v=Math.max(f,.2*h.globals.radialSize),w=Math.max(v-e,0);0!==w&&(h.layout.translateY=(null!=(a=h.layout.translateY)?a:0)+w,xa.setAttrs(this.w.dom.elGraphical.node,{transform:`translate(${null!=(r=h.layout.translateX)?r:0}, ${h.layout.translateY})`}),c+=w),y=c>0?c:2.05*h.globals.radialSize;const A=Math.max(v,e),C=Math.ceil(y+x+A),k=null!=(o=h.config.chart.offsetY)?o:0,M=C+Math.max(k,0);if(!g){if(this.w.dom.elLegendForeign&&this.w.dom.elLegendForeign.setAttribute("height",String(M)),this.w.dom.elWrap.style.height=`${M}px`,xa.setAttrs(this.w.dom.Paper.node,{height:C}),p.isBrowser()){const t=null==(n=this.w.dom.Paper.node.parentNode)?void 0:n.parentNode;t&&(t.style.minHeight=`${M}px`)}h.globals.svgHeight=C,"bottom"===h.config.legend.position&&h.config.legend.show&&!h.config.legend.floating&&(null==(l=this.ctx.legend)||l.setLegendWrapXY(20,0))}return}if(!(h.globals.radialSize>0))return;const A=Math.ceil(y+this.w.layout.translateY+x+f);if(!u&&(this.w.dom.elLegendForeign&&this.w.dom.elLegendForeign.setAttribute("height",String(A)),this.w.dom.elWrap.style.height=`${A}px`,xa.setAttrs(this.w.dom.Paper.node,{height:A}),p.isBrowser())){const t=null==(c=this.w.dom.Paper.node.parentNode)?void 0:c.parentNode;t&&(t.style.minHeight=`${A}px`)}}coreCalculations(){new Bi(this.w).init()}resetGlobals(){const t=()=>this.w.config.series.map(()=>[]),e=new xt,{globals:i}=this.w,s=this.w.axisFlags.dataWasParsed;e.initGlobalVars(i),i.seriesXvalues=t(),i.seriesYvalues=t(),s&&(this.w.axisFlags.dataWasParsed=!0)}isMultipleY(){return!!(Array.isArray(this.w.config.yaxis)&&this.w.config.yaxis.length>1)&&(this.w.globals.isMultipleYAxis=!0,!0)}xySettings(){const{w:t}=this;let e=null;if(t.globals.axisCharts){if("back"===t.config.xaxis.crosshairs.position&&new de(this.w).drawXCrosshairs(),"back"===t.config.yaxis[0].crosshairs.position&&new de(this.w).drawYCrosshairs(),"datetime"===t.config.xaxis.type&&void 0===t.config.xaxis.labels.formatter){this.ctx.timeScale=new $i(this.w,this.ctx);let e=[];isFinite(t.globals.minX)&&isFinite(t.globals.maxX)&&!t.globals.isBarHorizontal?e=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minX,t.globals.maxX):t.axisFlags.isRangeBar&&(e=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minY,t.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(e)}e=new mt(this.w).getCalculatedRatios()}return e}updateSourceChart(t){this.ctx.w.interact.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:t.w.globals.minX,max:t.w.globals.maxX}}}},!1,!1)}setupBrushHandler(){const{ctx:t,w:e}=this;if(e.config.chart.brush.enabled&&"function"!=typeof e.config.chart.events.selection){const i=Array.isArray(e.config.chart.brush.targets)?e.config.chart.brush.targets:[e.config.chart.brush.target];i.forEach(e=>{const i=t.constructor.getChartByID(e);if(!i)return void console.warn(`ApexCharts: brush target "${e}" was not found. Ensure the target chart is rendered (and its chart.id matches) before the brush chart.`);i.w.globals.brushSource=this.ctx;const s=i.w.config.chart.events;for(const e of["zoomed","scrolled"])("function"!=typeof s[e]||s[e].__apexBrush)&&(s[e]=Object.assign(()=>this.updateSourceChart(i),{__apexBrush:t}))}),e.config.chart.events.selection=(e,s)=>{i.forEach(e=>{const i=t.constructor.getChartByID(e);i&&i.ctx.updateHelpers._updateOptions({xaxis:{min:s.xaxis.min,max:s.xaxis.max}},!1,!1,!1,!1)})}}}unhookBrush(){var t,e;const{ctx:i,w:s}=this,a=s.config.chart.brush;if(a.enabled)for(const s of Array.isArray(a.targets)?a.targets:[a.target]){const a=null==(t=i.constructor.getChartByID(s))?void 0:t.w;if(!a)continue;const r=a.config.chart.events;for(const t of["zoomed","scrolled"])(null==(e=r[t])?void 0:e.__apexBrush)===i&&(r[t]=void 0);a.globals.brushSource===i&&(a.globals.brushSource=void 0)}}getAccessibleChartLabel(){const t=this.w,e=t.config;if(e.chart.accessibility&&e.chart.accessibility.description)return e.chart.accessibility.description;const i=e.chart.type,s=[];if(e.title.text)s.push(`${e.title.text}. ${i} chart`),e.subtitle.text&&s.push(e.subtitle.text);else{const a=Array.isArray(t.seriesData.seriesNames)&&t.seriesData.seriesNames.length?t.seriesData.seriesNames.filter(Boolean):Array.isArray(e.series)?e.series.map(t=>"object"==typeof t&&null!==t?t.name:null).filter(Boolean):[],r=t.seriesData.series.length||(e.series?e.series.length:0);a.length?s.push(`${i} chart with ${r} data series: ${a.join(", ")}`):s.push(`${i} chart with ${r} data series`)}return s.join(". ")}}const ji="__apexcharts_series_transforms__";function Ui(t){return t&&globalThis[ji][t]||null}function Vi(t,e,i={}){const{module:s=`features/${e}`,entry:a,scripts:r=[`features/${e}.js`],tail:o}=i,n=r.map(t=>`<script src='.../dist/${t}'>`).join(" and ");globalThis.console.warn(`ApexCharts: ${t} requires the ${e} feature, which is not in this bundle. Bundler: import 'apexcharts/${s}'`+(a?` (or from 'apexcharts/${a}')`:"")+`. Script tag: add ${n} after the ApexCharts script, or load apexcharts.full.min.js instead.`+(o?` ${o}`:""))}function qi(t,e){var i;const s=String(t).replace(/\//g,"%2F"),a=(null!=(i=e.get(s))?i:-1)+1;return e.set(s,a),`${a}:${s}`}function Zi(t,e,i,s,a,r=null,o={},n=new Map){var l,c,h;const d=e&&"object"==typeof e,p=d&&null!=(c=null!=(l=e.x)?l:e.name)?c:"",u=d?null!=(h=e.y)?h:e.value:e,g=null==u||""===u?NaN:Number(u),x={name:String(p),value:isNaN(g)?null:g,color:d&&e.color?e.color:void 0,_key:`${a}/${qi(p,n)}`};s&&!x.color&&(x.color=s[i%s.length]),o.keepDatum&&(x._datum=e);const f=new Map;if(d&&Array.isArray(e.children)&&e.children.length)x.children=e.children.map((e,i)=>Zi(t,e,i,null,x._key,r,o,f));else if(d&&null!=e.drilldown&&!1!==o.expandDrilldown){const i=r||new Set;if(!i.has(e.drilldown)){const s=function(t,e){const i=t.config.drilldown;return(i&&Array.isArray(i.series)?i.series:[]).find(t=>t&&t.id===e)}(t,e.drilldown);if(s&&Array.isArray(s.data)&&s.data.length){const a=new Set(i);a.add(e.drilldown);const r=Array.isArray(s.colors)?s.colors:null;x.children=s.data.map((e,i)=>Zi(t,e,i,r,x._key,a,o,f))}}}return x}function Ki(t){t.children&&t.children.length&&(t.children.forEach(t=>Ki(t)),(null==t.value||isNaN(t.value))&&(t.value=t.children.reduce((t,e)=>t+Math.max(0,e.value||0),0))),(null==t.value||isNaN(t.value))&&(t.value=0)}function Ji(t){var e,i,s,a;return!!(null==(a=null==(s=null==(i=null==(e=null==t?void 0:t.config)?void 0:e.plotOptions)?void 0:i.treemap)?void 0:s.nested)?void 0:a.drilldownAsLevels)}function Qi(t,e){var i,s,a;const r=null==(a=null==(s=null==(i=null==t?void 0:t.config)?void 0:i.plotOptions)?void 0:s.treemap)?void 0:a.nested;return(!r||!1!==r.enabled)&&function(t,e={}){if(!Array.isArray(t))return!1;const i=!1!==e.drilldown;for(let e=0;e<t.length;e++){const s=t[e]&&t[e].data;if(Array.isArray(s))for(let t=0;t<s.length;t++){const e=s[t];if(e&&"object"==typeof e){if(Array.isArray(e.children)&&e.children.length)return!0;if(i&&null!=e.drilldown)return!0}}}return!1}(e,{drilldown:Ji(t)})}function ts(t){const e=t._datum;if(e&&"object"==typeof e){const i=c(l({},e),{x:t.name,y:t.value});return delete i.children,i}return{x:t.name,y:t.value}}function es(t,e){const i=function(t,e,i={}){const s=e||t.config.series;if(!Array.isArray(s))return[];const a=new Map;return s.map((e,s)=>{var r,o;const n=e&&Array.isArray(e.data)?e.data:[],l=qi(null!=(r=null==e?void 0:e.name)?r:"",a),c=new Map;return{name:String(null!=(o=null==e?void 0:e.name)?o:""),value:null,color:(null==e?void 0:e.color)||void 0,_key:l,_seriesIndex:s,children:n.map((e,s)=>Zi(t,e,s,null,l,null,i,c))}})}(t,e,{keepDatum:!0,expandDrilldown:Ji(t)});i.forEach(Ki);const{leaves:s,maxDepth:a}=function(t){const e=[];let i=0;return t.forEach((t,s)=>{const a=[],r=(t,e,o)=>{t._parent=o,t._depth=e,t._si=s,t._leaf=!(t.children&&t.children.length),e>i&&(i=e),t._leaf?(t._di=a.length,a.push(t)):(t._di=-1,t.children.forEach(i=>r(i,e+1,t)))};r(t,0,null),e.push(a)}),{leaves:e,maxDepth:i}}(i);return{roots:i,leafSeries:e.map((t,e)=>c(l({},t),{data:(s[e]||[]).map(ts)})),maxDepth:a}}globalThis[ji]||(globalThis[ji]={});const is={boxPlot:!1,violin:!0},ss=t=>Array.isArray(t)?t.join(" "):t,as={y:null},rs=[void 0,null];function os(t){var e;if(!t||"object"!=typeof t)return S.parseNumber(t)||0;const i=null!=(e=t.y)?e:t.value;return null!=i&&""!==i?S.parseNumber(i)||0:Array.isArray(t.children)?t.children.reduce((t,e)=>t+Math.max(0,os(e)),0):0}function ns(t){return"number"==typeof t?t:t instanceof Date?t.getTime():"string"==typeof t&&isNaN(t)?Date.parse(t):+t}class ls{constructor(t,{resetGlobals:e=()=>{},isMultipleY:i=()=>{},highlight:s=()=>null}={}){this.w=t,this.resetGlobals=e,this.isMultipleY=i,this.highlight=s,this._warnedHighlight=!1,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this._warnedFeatures=new Set,this.coreUtils=new mt(this.w),this.activeSeriesIndex=0}getFirstDataPoint(){const t=this.w.config.series;if(this._pinActive||(this.activeSeriesIndex=new mi(this.w).getActiveConfigSeriesIndex()),null!=this._ownPoint)return this._ownPoint;const e=t[this.activeSeriesIndex];return e&&e.data&&e.data.length>0&&null!==e.data[0]&&void 0!==e.data[0]?e.data[0]:null}isMultiFormat(){return this.isFormatXY()||this.isFormat2DArray()}isFormatXY(){var t;const e=this.getFirstDataPoint();if(!e||void 0===e.x)return!1;const i=null==(t=this.w.config.series[this.activeSeriesIndex])?void 0:t.data;if(i){const t=t=>t&&void 0!==t.x;for(let e=1;e<Math.min(3,i.length);e++)if(!0!==t(i[e])){console.warn(`ApexCharts: series data has mixed formats starting at index ${e}`);break}}return!0}isFormat2DArray(){const t=this.getFirstDataPoint();return t&&Array.isArray(t)}_fast2DArrayParse(t,e){var i,s;const a=t.length;if(0===a)return!1;const r=new Array(a),o=new Array(a);let n=-Number.MAX_VALUE,l=Number.MAX_VALUE,c=1/0,h=!1,d=0,p=!0,u=1/0,g=-1/0,x=!0,f=1/0,m=NaN;for(let e=0;e<a;e++){const i=t[e];if(!Array.isArray(i)||i.length>2)return!1;const s=i[0],a=i[1];if(p)if("number"==typeof s){s==s&&(s<u&&(u=s),s>g&&(g=s));const t=s-m;t>0?t<f&&(f=t):t<0&&(x=!1),m=s}else p=!1;if("number"==typeof a)if(a==a&&a!==1/0&&a!==-1/0){if(a>n&&(n=a),a<l&&(l=a),a<0&&a<c&&(c=a),!Number.isInteger(a)){const t=a<0?-a:a;if(t>=1e-6&&t<1e21){const t=""+a,e=t.indexOf("."),i=-1===e?0:t.length-e-1;i>d&&(d=i)}else d=Math.max(d,S.decimalPlaces(a))}}else h=!0;else{if(null!==a)return!1;h=!0}r[e]=a,o[e]=s}this.twoDSeries=r,this.twoDSeriesX=o,this.w.axisFlags.dataFormatXNumeric=!0;return(null!=(s=(i=this.w.seriesData)._parsedExtrema)?s:i._parsedExtrema=[])[e]={ref:r,len:a,maxY:n,lowestY:l,negMinY:c,hasNulls:h,yDec:d,xref:o,xNumeric:p,minX:u,maxX:g,xSorted:x,minXDiff:f},!0}handleFormat2DArray(t,e){var i;const s=this.w.config,a=t[e].data;if(0===a.length&&this._isCollapsedIndex(e)){const e=(null==(i=t[this.activeSeriesIndex])?void 0:i.data)||[];for(let t=0;t<e.length;t++){const i=Array.isArray(e[t])?e[t][0]:void 0;this.twoDSeriesX.push("datetime"===s.xaxis.type?new Date(i).getTime():i)}return}const r=this._isBoxPlotSeries(e);if(r||"datetime"===s.xaxis.type||!this._fast2DArrayParse(a,e))for(let t=0;t<a.length;t++){const e=a[t]||rs,i=e[0],o=e[1],n=e[2];if(void 0!==o&&(Array.isArray(o)&&4===o.length&&!r?this.twoDSeries.push(S.parseNumber(o[3])):e.length>=5?this.twoDSeries.push(S.parseNumber(e[4])):this.twoDSeries.push(S.parseNumber(o)),this.w.axisFlags.dataFormatXNumeric=!0),"datetime"===s.xaxis.type){const t=new Date(i).getTime();this.twoDSeriesX.push(t)}else this.twoDSeriesX.push(i);this.pushZ(n,t)}}pushZ(t,e){if(void 0===t)return void(this.threeDSeries.length&&this.threeDSeries.push(null));const i="string"==typeof t&&""!==t.trim()?Number(t):t,s=S.isNumber(i);for(;this.threeDSeries.length<e;)this.threeDSeries.push(null);this.threeDSeries.push(s?i:t),s&&(this.w.axisFlags.isDataXYZ=!0)}_isCollapsedIndex(t){const e=this.w.globals;return e.collapsedSeriesIndices.indexOf(t)>-1||e.ancillaryCollapsedSeriesIndices.indexOf(t)>-1}handleFormatXY(t,e){const i=this.w.config,s=this.w.globals,a=new C(this.w),r=t[e].data;let o=e;this._isCollapsedIndex(e)&&(o=this.activeSeriesIndex);const n=t[o].data;for(let t=0;t<r.length;t++){const i=r[t]||as;if(void 0!==i.y){const t=Array.isArray(i.y)?S.parseNumber(i.y[i.y.length-1]):S.parseNumber(i.y);this.twoDSeries.push(t)}void 0===this.seriesGoals[e]&&(this.seriesGoals[e]=[]),void 0!==i.goals&&Array.isArray(i.goals)?this.seriesGoals[e].push(i.goals):this.seriesGoals[e].push(null),this.pushZ(i.z,t)}for(let t=0;t<n.length;t++){const e=n[t];if(!e){this.twoDSeriesX.push("");continue}const r=e.x,o="string"==typeof r,l=Array.isArray(r),c=!l&&!!a.isValidDate(r);if(o||c)if(o||i.xaxis.convertedCatToNumeric){const t=s.isBarHorizontal&&this.w.axisFlags.isRangeData;"datetime"!==i.xaxis.type||t?(this.fallbackToCategory=!0,this.twoDSeriesX.push(r),isNaN(r)||"category"===this.w.config.xaxis.type||"string"==typeof r||(this.w.axisFlags.isXNumeric=!0)):this.twoDSeriesX.push(a.parseDate(r))}else"datetime"===i.xaxis.type?this.twoDSeriesX.push(r instanceof Date?r.getTime():a.parseDate(r.toString())):(this.w.axisFlags.dataFormatXNumeric=!0,this.w.axisFlags.isXNumeric=!0,this.twoDSeriesX.push(r instanceof Date?r.getTime():parseFloat(r)));else l?(this.fallbackToCategory=!0,this.twoDSeriesX.push(r)):(this.w.axisFlags.isXNumeric=!0,this.w.axisFlags.dataFormatXNumeric=!0,this.twoDSeriesX.push(r))}}handleRangeData(t,e){let i={start:[],end:[],rangeUniques:[]};return this.isFormat2DArray()?i=this.handleRangeDataFormat("array",t,e):this.isFormatXY()&&(i=this.handleRangeDataFormat("xy",t,e)),this.w.rangeData.seriesRangeStart[e]=void 0===i.start?[]:i.start,this.w.rangeData.seriesRangeEnd[e]=void 0===i.end?[]:i.end,this.w.rangeData.seriesRange[e]=i.rangeUniques,this.w.rangeData.seriesRange.forEach(t=>{t&&t.forEach(t=>{const e=t.y,i=e.length;if(!(i<=1))for(let s=0;s<i;s++){const a=e[s],r=a.y1,o=a.y2;for(let n=s+1;n<i;n++){const i=e[n],s=i.y1;if(r<=i.y2&&s<=o){const e=t;e.overlaps.add(a.rangeName),e.overlaps.add(i.rangeName)}}}})}),i}handleCustomRangeData(t,e,i){const s=t[e].data||[],a=[],r=[];for(let t=0;t<s.length;t++){const e=s[t];let o,n;if("function"==typeof i){let s=i(e,t);Array.isArray(s)||(s=[s]);const a=s.map(t=>S.parseNumber(t)).filter(t=>null!==t&&!isNaN(t));o=a.length?Math.min(...a):null,n=a.length?Math.max(...a):null}else{const t=null==e?null:e.y;Array.isArray(t)?(o=S.parseNumber(t[0]),n=S.parseNumber(t[t.length-1])):o=n=S.parseNumber(t)}a.push(o),r.push(n)}this.w.rangeData.seriesRangeStart[e]=a,this.w.rangeData.seriesRangeEnd[e]=r}handleCandleStickBoxData(t,e){let i={o:[],h:[],m:[],l:[],c:[]};return this.isFormat2DArray()?i=this.handleCandleStickBoxDataFormat("array",t,e):this.isFormatXY()&&(i=this.handleCandleStickBoxDataFormat("xy",t,e)),this.w.candleData.seriesCandleO[e]=i.o,this.w.candleData.seriesCandleH[e]=i.h,this.w.candleData.seriesCandleM[e]=i.m,this.w.candleData.seriesCandleL[e]=i.l,this.w.candleData.seriesCandleC[e]=i.c,this.w.candleData.seriesBoxPoints[e]=i.points||[],i}handleViolinData(t,e){var i,s,a,r,o,n,l,c;const h=this.w,d=t[e].data,p=[],u=[],g=[],x=[],f=[],m=[];for(let t=0;t<d.length;t++){const e=d[t],h=null!=(a=null!=(s=null==(i=null==e?void 0:e.y)?void 0:i.density)?s:null==e?void 0:e[1])?a:[],b=null!=(n=null!=(o=null==(r=null==e?void 0:e.y)?void 0:r.points)?o:null==e?void 0:e[2])?n:[],y=this._parseViolinSummary(null!=(c=null==(l=null==e?void 0:e.y)?void 0:l.summary)?c:null==e?void 0:e[3]),v=[],w=[];let A=0,C=null,k=1/0,M=-1/0;for(let t=0;t<h.length;t++){const e=S.parseNumber(h[t][0]),i=S.parseNumber(h[t][1]);null!==e&&null!==i&&(v.push(e),w.push(i),i>A&&(A=i,C=e),e<k&&(k=e),e>M&&(M=e))}const T=[];for(let t=0;t<b.length;t++){const e=S.parseNumber(b[t]);null!==e&&(T.push(e),e<k&&(k=e),e>M&&(M=e))}y&&(y[0]<k&&(k=y[0]),y[4]>M&&(M=y[4])),p.push({values:v,weights:w,maxWeight:A}),u.push(T),g.push(y),x.push(k===1/0?0:k),f.push(M===-1/0?0:M),m.push(null!==C?C:T.length?T[Math.floor(T.length/2)]:0)}h.violinData.seriesViolinDensity[e]=p,h.violinData.seriesViolinPoints[e]=u,h.violinData.seriesViolinSummary[e]=g,h.violinData.seriesViolinMin[e]=x,h.violinData.seriesViolinMax[e]=f,this.twoDSeries=m}_parseViolinSummary(t){if(!Array.isArray(t)||5!==t.length)return null;const e=[];for(let i=0;i<5;i++){const s=S.parseNumber(t[i]);if(null===s||i>0&&s<e[i-1])return null;e.push(s)}return e}handleRangeDataFormat(t,e,i){const s=[],a=[],r=new Map,o=[];if(e[i].data.forEach(t=>{const e=ss(t.x);if(!r.has(e)){const i={x:e,label:t.x,overlaps:new Set,y:[]};r.set(e,i),o.push(i)}}),"array"===t)for(let t=0;t<e[i].data.length;t++)Array.isArray(e[i].data[t])?(s.push(e[i].data[t][1][0]),a.push(e[i].data[t][1][1])):(s.push(e[i].data[t]),a.push(e[i].data[t]));else if("xy"===t)for(let t=0;t<e[i].data.length;t++){const o=Array.isArray(e[i].data[t].y),n=S.randomId(),l=e[i].data[t].x,c={y1:o?e[i].data[t].y[0]:e[i].data[t].y,y2:o?e[i].data[t].y[1]:e[i].data[t].y,rangeName:n},h=this.w.globals;h.seriesRangeName||(h.seriesRangeName={}),h.seriesRangeName[i]||(h.seriesRangeName[i]={}),h.seriesRangeName[i][t]=n;const d=r.get(ss(l));d&&d.y.push(c),s.push(c.y1),a.push(c.y2)}return{start:s,end:a,rangeUniques:o}}_isBoxPlotSeries(t){var e;const i=null==(e=this.w.config.series[t])?void 0:e.type;return"boxPlot"===i||"candlestick"===i?"boxPlot"===i:"boxPlot"===this.w.config.chart.type}handleCandleStickBoxDataFormat(t,e,i){const s=this._isBoxPlotSeries(i),a=[],r=[],o=[],n=[],l=[],c=[],h=e[i].data;let d;if("array"===t){const t=h[0];d=s&&t&&6===t.length||!s&&t&&5===t.length?t=>t.slice(1):t=>Array.isArray(t[1])?t[1]:[]}else d=t=>Array.isArray(t.y)?t.y:[];for(let t=0;t<h.length;t++){const e=d(h[t]);e&&e.length>=2?(a.push(e[0]),r.push(e[1]),s?(o.push(e[2]),n.push(e[3]),l.push(e[4])):(n.push(e[2]),l.push(e[3]))):(a.push(null),r.push(null),o.push(null),n.push(null),l.push(null));const i=h[t]&&h[t].points;c.push(Array.isArray(i)?i:[])}return{o:a,h:r,m:o,l:n,c:l,points:c}}parseDataAxisCharts(t){var e,i,s,a;const r=this.w.config,o=this.w.globals,n=new C(this.w);this.w.seriesData._parsedExtrema=[],this.seriesGoals=[];const h=r.labels.length>0?r.labels.slice():r.xaxis.categories.slice();this.w.axisFlags.isRangeBar="rangeBar"===r.chart.type&&o.isBarHorizontal,this.w.labelData.hasXaxisGroups="category"===r.xaxis.type&&r.xaxis.group.groups.length>0,this.w.labelData.hasXaxisGroups&&(this.w.labelData.groups=r.xaxis.group.groups),t.forEach((t,e)=>{void 0!==t.name?this.w.seriesData.seriesNames.push(t.name):this.w.seriesData.seriesNames.push("series-"+parseInt(String(e+1),10))}),this.coreUtils.setSeriesYAxisMappings();const d=this.w.globals.seriesYAxisReverseMap,p=r.series.map((t,e)=>{var i;return null!=(i=t.group)?i:"apexcharts-axis-"+d[e]}),u=[],g=[...new Set(p)];this.w.labelData.seriesGroupIndex=p.map((t,e)=>{const i=g.indexOf(t);return u[i]||(u[i]=[]),u[i].push(this.w.seriesData.seriesNames[e]),i}),this.w.labelData.seriesGroups=u;const x=()=>{for(let t=0;t<h.length;t++)if("string"==typeof h[t]){if(!n.isValidDate(h[t]))throw new Error("You have provided invalid Date format. Please provide a valid JavaScript Date");this.twoDSeriesX.push(n.parseDate(h[t]))}else this.twoDSeriesX.push(h[t])};this._pinActive=!1,this.getFirstDataPoint(),this._pinActive=!0;for(let n=0;n<t.length;n++){this.twoDSeries=[],this.twoDSeriesX=[],this.threeDSeries=[],void 0===t[n].data&&(console.error("It is a possibility that you may have not included 'data' property in series."),t[n]=c(l({},t[n]),{data:[]})),this._ownPoint=null;for(let e=0;null==this._ownPoint&&e<t[n].data.length;e++)this._ownPoint=t[n].data[e];const d=r.chart.dataReducer,p=null==(i=null==(e=o.dataReducerRawSeries)?void 0:e[n])?void 0:i.data;if((null==d?void 0:d.enabled)&&!this._isCollapsedIndex(n)&&this.isMultiFormat()&&Array.isArray(p)&&p.length>(null!=(s=d.threshold)?s:500)){const e=null!=(a=d.targetPoints)?a:250,i=r.xaxis.min,s=r.xaxis.max,o=null==i&&null==s?p:ls.sliceByXRange(p,i,s);let h=o;if(o.length>e){let t=null;for(let e=0;null==t&&e<o.length;e++){const i=o[e];t=Array.isArray(i)?i[1]:null==i?void 0:i.y}Array.isArray(t)?4===t.length?h=ls.ohlcAggregate(o,e):2===t.length&&(h=ls.rangeAggregate(o,e)):h=ls.lttbDownsample(o,e)}t[n]=c(l({},t[n]),{data:h})}"rangeBar"!==r.chart.type&&"rangeArea"!==r.chart.type&&"rangeBar"!==t[n].type&&"rangeArea"!==t[n].type||(this.w.axisFlags.isRangeData=!0,this.handleRangeData(t,n));const u=t[n].type||r.chart.type;if(rt(u)){const e=lt(u),i=e&&e.yExtent;(e&&"rangeXY"===e.dataType||"function"==typeof i)&&(this.w.axisFlags.isRangeData=!0,this.handleCustomRangeData(t,n,i))}if(this.isMultiFormat())this.isFormat2DArray()?this.handleFormat2DArray(t,n):this.isFormatXY()&&this.handleFormatXY(t,n),"candlestick"!==r.chart.type&&"candlestick"!==t[n].type&&"boxPlot"!==r.chart.type&&"boxPlot"!==t[n].type||this.handleCandleStickBoxData(t,n),"violin"!==r.chart.type&&"violin"!==t[n].type||this.handleViolinData(t,n),this.w.seriesData.series.push(this.twoDSeries),this.w.labelData.labels.push(this.twoDSeriesX),this.w.seriesData.seriesX.push(this.twoDSeriesX),this.w.seriesData.seriesGoals=this.seriesGoals,n!==this.activeSeriesIndex||this.fallbackToCategory||(this.w.axisFlags.isXNumeric=!0);else{"datetime"===r.xaxis.type?(this.w.axisFlags.isXNumeric=!0,x(),this.w.seriesData.seriesX.push(this.twoDSeriesX)):"numeric"===r.xaxis.type&&(this.w.axisFlags.isXNumeric=!0,h.length>0&&(this.twoDSeriesX=h,this.w.seriesData.seriesX.push(this.twoDSeriesX))),this.w.labelData.labels.push(this.twoDSeriesX);const e=t[n].data.map(t=>S.parseNumber(t));this.w.seriesData.series.push(e)}this.w.seriesData.seriesZ.push(this.threeDSeries),void 0!==t[n].color?this.w.seriesData.seriesColors.push(t[n].color):this.w.seriesData.seriesColors.push(void 0)}return this._pinActive=!1,this._ownPoint=null,this.w}parseDataNonAxisCharts(t){const e=this.w.config;this.w.seriesData.unitData=[];const i=Array.isArray(t)&&t.every(t=>"number"==typeof t)&&e.labels.length>0,s=Array.isArray(t)&&t.some(t=>t&&"object"==typeof t&&t.data||t&&"object"==typeof t&&t.parsing);if("unit"===e.chart.type&&s&&!i)return this.parseUnitSeries(t);if(i&&s&&console.warn("ApexCharts: Both old format (numeric series + labels) and new format (series objects with data/parsing) detected. Using old format for backward compatibility."),i){this.w.seriesData.series=t.slice(),this.w.seriesData.seriesNames=e.labels.slice();for(let t=0;t<this.w.seriesData.series.length;t++)void 0===this.w.seriesData.seriesNames[t]&&this.w.seriesData.seriesNames.push("series-"+(t+1));return this.w}if(Array.isArray(t)&&t.every(t=>"number"==typeof t)){this.w.seriesData.series=t.slice(),this.w.seriesData.seriesNames=[];for(let t=0;t<this.w.seriesData.series.length;t++)this.w.seriesData.seriesNames.push(e.labels[t]||`series-${t+1}`);return this.w}const a=this.extractPieDataFromSeries(t);this.w.seriesData.series=a.values,this.w.seriesData.seriesNames=a.labels,"radialBar"===e.chart.type&&(this.w.seriesData.series=this.w.seriesData.series.map(t=>{const e=S.parseNumber(t);return e>100&&console.warn(`ApexCharts: RadialBar value ${e} > 100, consider using percentage values (0-100)`),e}));for(let t=0;t<this.w.seriesData.series.length;t++)void 0===this.w.seriesData.seriesNames[t]&&this.w.seriesData.seriesNames.push("series-"+(t+1));return this.w}parseUnitSeries(t){const e=this.w.config,i=[],s=[],a=[];return t.forEach((t,r)=>{var o;const n=t&&Array.isArray(t.data)?t.data:[];i.push(n.length);const l=t&&void 0!==t.name&&null!==t.name?t.name:void 0;s.push(null!=(o=null!=l?l:e.labels[r])?o:`series-${r+1}`),a.push(n.slice())}),this.w.seriesData.series=i,this.w.seriesData.seriesNames=s,this.w.seriesData.unitData=a,this.w}resetParsingFlags(){const t=this.w;t.axisFlags.dataWasParsed=!1,t.config.series&&t.config.series.forEach(t=>{t.__apexParsed&&delete t.__apexParsed})}extractPieDataFromSeries(t){const e=[],i=[];if(!Array.isArray(t))return console.warn("ApexCharts: Expected array for series data"),{values:[],labels:[]};if(0===t.length)return console.warn("ApexCharts: Empty series array"),{values:[],labels:[]};const s=t[0];return"object"==typeof s&&null!==s&&s.data?(this.extractPieDataFromSeriesObjects(t,e,i),{values:e,labels:i}):(console.warn("ApexCharts: Unsupported series format for pie/donut/radialBar. Expected series objects with data property."),{values:[],labels:[]})}extractPieDataFromSeriesObjects(t,e,i){const s="sunburst"===this.w.config.chart.type&&this.w.seriesData.seriesColors;t.forEach((t,a)=>{t.data&&Array.isArray(t.data)?t.data.forEach(t=>{if("object"==typeof t&&null!==t){const a=void 0!==t.x?t.x:t.name,r=void 0!==t.y?t.y:t.value;s&&void 0!==a&&(s[i.length]=t.color),void 0!==a&&Array.isArray(t.children)?(i.push(String(a)),e.push(os(t))):void 0!==a&&void 0!==r?(i.push(String(a)),e.push(S.parseNumber(r))):console.warn("ApexCharts: Invalid data point format for pie chart. Expected {x, y} format:",t)}else console.warn("ApexCharts: Expected object data point, got:",typeof t)}):console.warn(`ApexCharts: Series ${a} has no valid data array`)})}handleExternalLabelsData(t){const e=this.w.config;if(e.xaxis.categories.length>0)this.w.labelData.labels=e.xaxis.categories;else if(e.labels.length>0)this.w.labelData.labels=e.labels.slice();else if(this.fallbackToCategory){if(this.w.labelData.labels=this.w.labelData.labels[0],this.w.rangeData.seriesRange.length){const t=this.w.labelData.labels.slice(),e=new Set(t.map(ss));this.w.rangeData.seriesRange.forEach(i=>{i.forEach(i=>{null==i.x||e.has(i.x)||(e.add(i.x),t.push(i.label))})}),this.w.labelData.labels=t;const i=this.w.labelData.labels;if(i.length>0&&("number"==typeof i[0]||"string"==typeof i[0]))this.w.labelData.labels=[...new Set(i)];else{const t=new Map;for(const e of i){const i=JSON.stringify(e);t.has(i)||t.set(i,e)}this.w.labelData.labels=Array.from(t.values())}}if(e.xaxis.convertedCatToNumeric){new Q(e).convertCatToNumericXaxis(e,this.w.seriesData.seriesX[0]),this._generateExternalLabels(t)}}else this._generateExternalLabels(t)}_generateExternalLabels(t){const e=this.w.globals,i=this.w.config;let s=[];if(e.axisCharts){if(this.w.seriesData.series.length>0)if(this.isFormatXY()){const t=i.series.map(t=>{const e=new Map;for(const i of t.data)e.has(null==i?void 0:i.x)||e.set(null==i?void 0:i.x,i);return Array.from(e.values())}),e=t.reduce((t,e,i,s)=>s[t].length>e.length?t:i,0);for(let i=0;i<t[e].length;i++)s.push(i+1)}else for(let t=0;t<this.w.seriesData.series[e.maxValsInArrayIndex].length;t++)s.push(t+1);this.w.seriesData.seriesX=[];for(let e=0;e<t.length;e++)this.w.seriesData.seriesX.push(s);this.w.globals.isBarHorizontal||(this.w.axisFlags.isXNumeric=!0)}if(0===s.length){s=e.axisCharts?[]:this.w.seriesData.series.map((t,e)=>e+1);for(let e=0;e<t.length;e++)this.w.seriesData.seriesX.push(s)}this.w.labelData.labels=s,i.xaxis.convertedCatToNumeric&&(this.w.labelData.categoryLabels=s.map(t=>i.xaxis.labels.formatter(t))),this.w.axisFlags.noLabelsProvided=!0}parseRawDataIfNeeded(t){const e=this.w.config.parsing;if(this.w.axisFlags.dataWasParsed)return t;const i=!(!e||!(e.x||e.y||e.z)),s=t.some(t=>t.parsing&&(t.parsing.x||t.parsing.y||t.parsing.z));if(!i&&!s)return t;const a=t.map((t,i)=>{var s,a,r,o,n;if(!t.data||!Array.isArray(t.data)||0===t.data.length)return t;const h={x:(null==(s=t.parsing)?void 0:s.x)||(null==e?void 0:e.x),y:(null==(a=t.parsing)?void 0:a.y)||(null==e?void 0:e.y),z:(null==(r=t.parsing)?void 0:r.z)||(null==e?void 0:e.z)};if(!h.x&&!h.y)return t;const d=t.data[0];if("object"==typeof d&&null!==d&&(Object.prototype.hasOwnProperty.call(d,"x")||Object.prototype.hasOwnProperty.call(d,"y"))&&![h.x,h.y,h.z].flat().some(t=>t&&"x"!==t&&"y"!==t&&"z"!==t&&void 0!==this.getNestedValue(d,t))||Array.isArray(d))return t;if(!h.x||!h.y||Array.isArray(h.y)&&0===h.y.length){const s=[];h.x||s.push("x"),(!h.y||Array.isArray(h.y)&&0===h.y.length)&&s.push("y");const a=null!=(o=t.name)?o:`series[${i}]`;return console.warn(`ApexCharts [${this.w.globals.chartID}]: "${a}" has a parseData config but is missing the '${s.join("', '")}' field specification.`,{parsing:null!=(n=t.parsing)?n:e}),t}const p=t.data.map((t,e)=>{if("object"!=typeof t||null===t)return console.warn(`ApexCharts: Series ${i}, data point ${e} is not an object, skipping parsing`),t;const s=this.getNestedValue(t,h.x);let a,r;if(Array.isArray(h.y)){const e=h.y.map(e=>this.getNestedValue(t,e));"bubble"===this.w.config.chart.type?(e.length<2&&console.warn(`ApexCharts: series[${i}] bubble chart requires parseData.y to have at least 2 fields (y and z). Got: ${JSON.stringify(h.y)}`),a=e[0]):a=e}else a=this.getNestedValue(t,h.y);h.z&&(r=this.getNestedValue(t,h.z)),void 0===s&&console.warn(`ApexCharts: Series ${i}, data point ${e} missing field '${h.x}'`),void 0===a&&console.warn(`ApexCharts: Series ${i}, data point ${e} missing field '${h.y}'`);const o={x:s,y:a,z:void 0};if("bubble"===this.w.config.chart.type&&Array.isArray(h.y)&&2===h.y.length){const e=this.getNestedValue(t,h.y[1]);void 0!==e&&(o.z=e)}return void 0!==r&&(o.z=r),o});return c(l({},t),{data:p,__apexParsed:!0})});return this.w.axisFlags.dataWasParsed=!0,a}getNestedValue(t,e){if(!t||"object"!=typeof t||!e)return;if(-1===e.indexOf("."))return t[e];const i=e.split(".");let s=t;for(let t=0;t<i.length;t++){if(null==s||"object"!=typeof s)return;s=s[i[t]]}return s}applySeriesTransform(t){const e=this.w.config,i=e.chart.requestedType||e.chart.type;if("waterfall"!==i&&this.w.waterfallData.geometry&&(this.w.waterfallData={values:[],cumulative:[],kinds:[],geometry:null}),"dumbbell"!==i&&this.w.dumbbellData&&(this.w.dumbbellData=null),"streamgraph"!==i&&this.w.streamgraphData&&(this.w.streamgraphData=null),this.w.seriesObservations=null,Array.isArray(t))for(const e in is)if(e!==i&&t.some(t=>(null==t?void 0:t.type)===e)){const i=Ui(e);t=i?i(t,this.w):this._withoutStats(t,e)}const s=Ui(i);if(s)return s(t,this.w);if(Array.isArray(t)&&i in is)return this._withoutStats(t,i);const a=L[i];if(!Array.isArray(t)||!a)return t;if(!this._warnedFeatures.has(a)){this._warnedFeatures.add(a);const t=F[i];Vi(`chart.type '${i}'`,a,ot(t)?{}:{module:i,scripts:[`${E[t]||t}.js`,`features/${a}.js`]})}return t.map(t=>c(l({},t),{data:[]}))}_withoutStats(t,e){if(this._warnedFeatures.has("stats"))return t;const i=is[e],s=t.some(t=>((null==t?void 0:t.type)||e)===e&&Array.isArray(null==t?void 0:t.data)&&t.data.some(t=>function(t,e,i){var s,a,r;if(!t||"object"!=typeof t||Array.isArray(t))return!1;if("boxPlot"===e&&Array.isArray(t.y)&&5===t.y.length)return!1;if("violin"===e&&Array.isArray(null==(s=t.y)?void 0:s.density)&&t.y.density.length)return!1;if("violin"===e&&Array.isArray(null==(a=t.y)?void 0:a.summary)&&5===t.y.summary.length)return!1;const o=Array.isArray(t.points)?t.points:Array.isArray(null==(r=t.y)?void 0:r.points)?t.y.points:i&&Array.isArray(t.y)&&"number"==typeof t.y[0]?t.y:null;return!!o&&o.some(t=>{const e=S.parseNumber(t);return null!==e&&isFinite(e)})}(t,e,i)));return s&&(this._warnedFeatures.add("stats"),Vi(`chart.type '${e}' with raw observations (\`points\`${i?", or a flat number array as `y`":""})`,"stats",{tail:"Precomputed input draws without it; raw series draw nothing until it loads and the chart renders again."})),t}flattenTreemapHierarchy(t){const e=this.w,i=e.globals;if("treemap"!==e.config.chart.type||!Array.isArray(t))return t;if(!i.treemapRawSeries){if(!Qi(e,t))return i.treemapRoots=null,t;i.treemapRawSeries=t.map(t=>c(l({},t),{data:Array.isArray(null==t?void 0:t.data)?t.data.slice():null==t?void 0:t.data}))}const{roots:s,leafSeries:a,maxDepth:r}=es(e,i.treemapRawSeries);return i.treemapRoots=s,i.treemapMaxDepth=r,a}expandScatterJitterData(t){var e,i;const s=this.w.config,a="scatter"===s.chart.type||"bubble"===s.chart.type,r=null==(i=null==(e=s.plotOptions)?void 0:e.scatter)?void 0:i.jitter;if(!(a&&r&&r.enabled&&Array.isArray(t)))return t;if(!t.some(t=>Array.isArray(null==t?void 0:t.data)&&t.data.some(t=>t&&!Array.isArray(t)&&Array.isArray(t.y))))return"datetime"!==s.xaxis.type&&(Array.isArray(s.xaxis.categories)&&s.xaxis.categories.length?this._applyBandAxis(s.xaxis.categories.slice()):Array.isArray(s.xaxis._scatterBandLabels)&&s.xaxis._scatterBandLabels.length&&this._applyBandAxis(s.xaxis._scatterBandLabels)),t;const o=[],n=new Map;t.forEach(t=>{Array.isArray(null==t?void 0:t.data)&&t.data.forEach(t=>{if(t&&Array.isArray(t.y)){const e=String(t.x);n.has(e)||(n.set(e,o.length),o.push(t.x))}})});const h=r.maxPoints||5e3,d=t.map(t=>{if(!Array.isArray(null==t?void 0:t.data))return t;const e=[];return t.data.forEach(t=>{if(t&&Array.isArray(t.y)){const i=n.get(String(t.x)),s=t.y,a=s.length>h?Math.ceil(s.length/h):1;for(let t=0;t<s.length;t+=a){const a=S.parseNumber(s[t]);null!==a&&e.push({x:i,y:a})}}else if(t&&"object"==typeof t&&!Array.isArray(t)){const i=String(t.x);e.push({x:n.has(i)?n.get(i):t.x,y:t.y})}else e.push(t)}),c(l({},t),{data:e})});return this._applyBandAxis(o),d}_applyBandAxis(t){var e;const i=this.w.config.xaxis,s=t.length;if(!s)return;const a=i._scatterBand=i._scatterBand||{};if(i._scatterBandLabels=t.slice(),i.type="numeric",(null==(e=this.w.interact)?void 0:e.zoomed)&&"number"==typeof i.min&&"number"==typeof i.max&&isFinite(i.min)&&isFinite(i.max)){const t=t=>Math.max(0,Math.min(s-1,t));let e=t(Math.round(i.min+.49)),r=t(Math.round(i.max-.49));r<e&&(e=r=t(Math.round((i.min+i.max)/2))),a.min=i.min=e-1,a.max=i.max=r+1,a.tick=i.tickAmount=r-e+2}else null!=i.min&&i.min!==a.min||(a.min=i.min=-1),null!=i.max&&i.max!==a.max||(a.max=i.max=s),null!=i.tickAmount&&"dataPoints"!==i.tickAmount&&i.tickAmount!==a.tick||(a.tick=i.tickAmount=s+1);i.labels=i.labels||{};const r=i.labels.formatter;if("function"!=typeof r||r._scatterBand){const e=e=>{const i=Math.round(e);return Math.abs(e-i)<1e-6&&void 0!==t[i]?t[i]:""};e._scatterBand=!0,i.labels.formatter=e}}assertAxisSeriesShape(t){if(!this.w.globals.axisCharts||!Array.isArray(t))return;const e=t.findIndex(t=>null!=t&&"object"!=typeof t);if(-1===e)return;const i=this.w.config.chart,s=i.requestedType?i.requestedType:"bar"===i.type?"bar or column":i.type,a=t[e],r="string"==typeof a?JSON.stringify(a):String(a);throw new Error(`ApexCharts: a ${s} chart needs each series as an object with its own data, like series: [{ name: 'Sales', data: [44, 55, 13] }], but series[${e}] is the ${typeof a} ${r}. A flat list of numbers is the form pie, donut, polarArea and radialBar take.`)}parseData(t,e=!0){var i,s,a,r,o,n,d,p;const u=this.w,g=u.config,x=u.globals;if(this.assertAxisSeriesShape(t),t=this.parseRawDataIfNeeded(t),t=this.applySeriesTransform(t),t=this.expandScatterJitterData(t),t=this.flattenTreemapHierarchy(t),(null==(i=g.chart.dataReducer)?void 0:i.enabled)&&x.axisCharts&&!x.dataReducerRawSeries){x.dataReducerRawSeries=function(t,e){const i=(e.collapsedSeries||[]).concat(e.ancillaryCollapsedSeries||[]);return t.map((t,e)=>{const s=t||{},{hidden:a}=s,r=h(s,["hidden"]);let o=r.data;if(Array.isArray(o)&&!o.length){const t=i.find(t=>t.index===e);t&&Array.isArray(t.data)&&(o=t.data)}return c(l({},r),{data:Array.isArray(o)?o.slice():o})})}(t,x);let e=1/0,i=-1/0;for(const t of x.dataReducerRawSeries){const n=null==t?void 0:t.data;if(!Array.isArray(n)||0===n.length)continue;const l=!Array.isArray(n[0]),c=ns(l?null==(s=n[0])?void 0:s.x:null==(a=n[0])?void 0:a[0]),h=ns(l?null==(r=n[n.length-1])?void 0:r.x:null==(o=n[n.length-1])?void 0:o[0]);c==c&&(e=Math.min(e,c)),h==h&&(i=Math.max(i,h))}e!==1/0&&(x.dataReducerRawMinX=e,x.dataReducerRawMaxX=i)}if(x.dataReducerRawSeries&&(null==(n=g.chart.dataReducer)?void 0:n.enabled)&&(t=t.map(t=>l({},t))),g.series=t,e)if(x.dataReducerRawSeries&&(null==(d=g.chart.dataReducer)?void 0:d.enabled)){const e=x.dataReducerRawSeries;x.initialSeries=t.map((t,i)=>{var s,a,r;return c(l({},t),{data:null!=(r=null==(a=null==(s=e[i])?void 0:s.data)?void 0:a.slice())?r:t.data})})}else x.histogramRawSeries?x.initialSeries=x.histogramRawSeries:x.dumbbellRawSeries?x.initialSeries=x.dumbbellRawSeries:x.streamgraphRawSeries?x.initialSeries=x.streamgraphRawSeries:x.waterfallRawSeries?x.initialSeries=x.waterfallRawSeries:x.treemapRawSeries?x.initialSeries=x.treemapRawSeries:x.initialSeries=t;else;if(this.excludeCollapsedSeriesInYAxis(),this.fallbackToCategory=!1,this.resetGlobals(),this.isMultipleY(),x.axisCharts?(this.parseDataAxisCharts(t),this.coreUtils.getLargestSeries()):this.parseDataNonAxisCharts(t),g.chart.stacked){const t=new mi(this.w);this.w.seriesData.series=t.setNullSeriesToZeroValues(this.w.seriesData.series)}this.coreUtils.getSeriesTotals(),x.axisCharts?(ls._defineLazyResult(this.w.seriesData,"stackedSeriesTotals",()=>this.coreUtils.getStackedSeriesTotals()),ls._defineLazyResult(this.w.seriesData,"stackedSeriesTotalsByGroups",()=>this.coreUtils.getStackedSeriesTotalsByGroups()),ls._defineLazyResult(x,"seriesPercent",()=>(this.coreUtils.getPercentSeries(),x.seriesPercent))):this.coreUtils.getPercentSeries(),this.w.axisFlags.dataFormatXNumeric||this.w.axisFlags.isXNumeric&&("numeric"!==g.xaxis.type||0!==g.labels.length||0!==g.xaxis.categories.length)||this.handleExternalLabelsData(t);const f=g.xaxis.convertedCatToNumeric&&g.xaxis.labels.formatter.categoryNames||this.coreUtils.getCategoryLabels(this.w.labelData.labels);for(let t=0;t<f.length;t++)if(Array.isArray(f[t])){this.w.axisFlags.isMultiLineX=!0;break}const m=this.highlight();m?m.parse():this._warnedHighlight||!(null==(p=g.highlightFilter)?void 0:p.data)&&!t.some(t=>{var e;return t&&(t.highlightData||(null==(e=t.data)?void 0:e[0])&&"object"==typeof t.data[0]&&"highlight"in t.data[0])})||(this._warnedHighlight=!0,Vi("Highlight parts (`highlightData`, `highlightFilter.data`)","highlight-filter",{tail:"Drawing the chart without them."}))}static _defineLazyResult(t,e,i){let s,a=!1;Object.defineProperty(t,e,{configurable:!0,enumerable:!0,get:()=>(a||(a=!0,s=i()),s),set(t){a=!0,s=t}})}static sliceByXRange(t,e,i){const s=t.length;if(0===s)return t;const a=!Array.isArray(t[0])?t=>ns(t.x):t=>ns(t[0]);let r=0;if(null!=e){let i=0,o=s-1;for(;i<=o;){const s=i+o>>1;a(t[s])<e?i=s+1:o=s-1}r=Math.max(0,i-1)}let o=s;if(null!=i){let e=0,r=s-1;for(;e<=r;){const s=e+r>>1;a(t[s])>i?r=s-1:e=s+1}o=Math.min(s,e+1)}return 0===r&&o===s?t.slice():t.slice(r,o)}static lttbDownsample(t,e){const i=t.length;if(e>=i||e<3)return t;const s=!Array.isArray(t[0]),a=s?t=>ns(t.x):t=>ns(t[0]),r=s?t=>ns(t.y):t=>ns(t[1]),o=[];o.push(t[0]);const n=(i-2)/(e-2);let l=0;for(let s=0;s<e-2;s++){const e=Math.floor((s+1)*n)+1,c=Math.min(Math.floor((s+2)*n)+1,i);let h=0,d=0;const p=c-e;for(let i=e;i<c;i++)h+=a(t[i]),d+=r(t[i]);h/=p,d/=p;const u=Math.floor(s*n)+1,g=Math.min(Math.floor((s+1)*n)+1,i),x=a(t[l]),f=r(t[l]);let m=-1,b=u;for(let e=u;e<g;e++){const i=.5*Math.abs((x-h)*(r(t[e])-f)-(x-a(t[e]))*(d-f));i>m&&(m=i,b=e)}o.push(t[b]),l=b}return o.push(t[i-1]),o}static ohlcAggregate(t,e){const i=t.length;if(e>=i||e<1)return t;const s=!Array.isArray(t[0]),a=s?t=>t.x:t=>t[0],r=s?t=>t.y:t=>t[1],o=s?(t,e)=>({x:t,y:e}):(t,e)=>[t,e],n=[],l=i/e;for(let s=0;s<e;s++){const c=Math.floor(s*l),h=s===e-1?i:Math.floor((s+1)*l);if(h<=c)continue;let d=null,p=null,u=-1/0,g=1/0;for(let e=c;e<h;e++){const i=r(t[e]);Array.isArray(i)&&(d||(d=i),p=i,null!=i[1]&&i[1]>u&&(u=i[1]),null!=i[2]&&i[2]<g&&(g=i[2]))}n.push(o(a(t[c]),d&&[d[0],u===-1/0?null:u,g===1/0?null:g,p[3]]))}return n}static rangeAggregate(t,e){const i=t.length;if(e>=i||e<1)return t;const s=!Array.isArray(t[0]),a=s?t=>t.x:t=>t[0],r=s?t=>t.y:t=>t[1],o=s?(t,e)=>({x:t,y:e}):(t,e)=>[t,e],n=[],l=i/e;for(let s=0;s<e;s++){const c=Math.floor(s*l),h=s===e-1?i:Math.floor((s+1)*l);if(h<=c)continue;let d=1/0,p=-1/0;for(let e=c;e<h;e++){const i=r(t[e]);if(null!=i)for(let t=0;t<2;t++){const e=i[t];null!=e&&isFinite(e)&&(e<d&&(d=e),e>p&&(p=e))}}n.push(o(a(t[c]),d===1/0?[null,null]:[d,p]))}return n}excludeCollapsedSeriesInYAxis(){const t=this.w,e=[];t.globals.seriesYAxisMap.forEach((i,s)=>{let a=0;i.forEach(e=>{-1!==t.globals.collapsedSeriesIndices.indexOf(e)&&a++}),a>0&&a==i.length&&e.push(s)}),t.globals.ignoreYAxisIndexes=e.map(t=>t)}}class cs{static invalidateAll(t){t&&t.globals&&(t.globals.cachedSelectors&&(t.globals.cachedSelectors={}),t.globals.domCache&&t.globals.domCache.clear(),t.globals.dimensionCache={})}static invalidateDimensions(t){t&&t.globals&&(t.globals.dimensionCache={})}static invalidateSelectors(t){t&&t.globals&&t.globals.cachedSelectors&&(t.globals.cachedSelectors={})}static getCachedSelector(t,e,i){return t&&t.globals?(t.globals.cachedSelectors||(t.globals.cachedSelectors={}),t.globals.cachedSelectors[e]||(t.globals.cachedSelectors[e]=i()),t.globals.cachedSelectors[e]):i()}static getCachedDimension(t,e,i,s=1e3){if(!t||!t.globals)return i();t.globals.dimensionCache||(t.globals.dimensionCache={});const a=t.globals.dimensionCache[e],r=Date.now();if(a&&a.lastUpdate&&r-a.lastUpdate<s)return a.value;const o=i();return t.globals.dimensionCache[e]={value:o,lastUpdate:r},o}static cacheDOMElement(t,e,i){t&&t.globals&&(t.globals.domCache||(t.globals.domCache=new Map),t.globals.domCache.set(e,i))}static getCachedDOMElement(t,e){return t&&t.globals&&t.globals.domCache&&t.globals.domCache.get(e)||null}}function hs(t){t.globals.dataReducerRawSeries=null,t.globals.dataReducerRawMinX=t.globals.dataReducerRawMaxX=void 0,t.globals.histogramRawSeries=null,t.globals.waterfallRawSeries=null,t.globals.dumbbellRawSeries=null,t.globals.streamgraphRawSeries=null,t.globals.treemapRawSeries=null}function ds(t){var e,i;return t.config.xaxis.convertedCatToNumeric?JSON.stringify(null!=(e=t.labelData.categoryLabels)?e:[]):t.axisFlags.isXNumeric?null:JSON.stringify(null!=(i=t.labelData.labels)?i:[])}function ps(t){const e=t.config.legend.formatter,i=t.globals.seriesNames;return JSON.stringify([t.labelData.seriesGroups,t.config.series.map((s,a)=>[i[a],null==s?void 0:s.color,!!(null==s?void 0:s.hidden),null==s?void 0:s.type,"function"==typeof e&&e(i[a],{seriesIndex:a,w:t})])])}class us{constructor(t,e){this.w=t,this.ctx=e}_updateOptions(t,e=!1,i=!0,s=!0,a=!1){return new Promise((r,o)=>{let n=[this.ctx];s&&(n=this.ctx.getSyncedCharts()),this.w.globals.isExecCalled&&(n=[this.ctx],this.w.globals.isExecCalled=!1);const c=t,h=n.map(s=>{var r,o,n,h;const d=s.w;(t=c)&&"object"==typeof t&&(t=l({},t)).chart&&(t.chart=l({},t.chart)),d.globals.shouldAnimate=i,e?(d.globals.resized=!i,d.globals.dataChanged=!1,d.globals.previousPaths=[]):(d.globals.resized=!0,d.globals.dataChanged=!0,s.updateHelpers.capture(i,null==t?void 0:t.chart));const p=d.config.chart.requestedType||d.config.chart.type,u=null==(r=d.config.chart.sparkline)?void 0:r.enabled,g=Q.isHorizontalBar(d.config);if(i&&t&&"object"==typeof t){const e=null==(o=null==t?void 0:t.chart)?void 0:o.type;e&&e!==p&&(null==(n=s.morphTypeChange)||n.captureBeforeDestroy({fromType:p,toType:e,newSeries:t.series||d.config.series}))}if(t&&"object"==typeof t){t=ht.dropEmptyOptions(t),s.config=new ht(t);const e=t.chart&&t.chart.type,i="funnel"===e||"pyramid"===e||"gauge"===e,r=!!d.config.chart.requestedType;if(e&&!i&&r){t.chart=t.chart||{},t.chart.requestedType=e;const i=d.config.chart.requestedType;"funnel"!==i&&"pyramid"!==i||(t.plotOptions=t.plotOptions||{},t.plotOptions.bar=t.plotOptions.bar||{},void 0===t.plotOptions.bar.isFunnel&&(t.plotOptions.bar.isFunnel=!1),void 0===t.plotOptions.bar.isPyramid&&(t.plotOptions.bar.isPyramid=!1))}if(s.config.normalizeAliasedChartType(t),ht.normalizeAxisBounds(t,{xaxisType:d.config.xaxis.type,datetimeUTC:d.config.xaxis.labels.datetimeUTC}),t=mt.extendArrayProps(s.config,t,d),s.w.globals.chartID!==this.w.globals.chartID&&(delete t.series,delete t.yaxis),a&&Array.isArray(t.series)&&hs(d),d.config=S.extend(d.config,t),null==(h=s.responsive)||h.absorb(t),Q.handOverTypeDefaults(d.config,p,t),Q.syncCatToNumeric(d.config,t),Q.syncSparkline(d.config,u,t),Q.syncHorizontal(d.config,g,t),a){t.xaxis&&(d.globals.lastXAxis=S.clone(t.xaxis)),t.yaxis&&(d.globals.lastYAxis=S.clone(t.yaxis));const e=d.globals.initialConfig&&d.globals.initialConfig.series,i=S.extend({},s.responsive?s.responsive.withoutBreakpoints(d.config):d.config);i.series=!t.series&&e?e:S.copySeriesShallow(d.config.series),d.globals.initialConfig=i,t.series&&(d.globals.initialSeries=d.config.series)}t.series&&(d.globals.collapsedSeriesIndices.length>0||d.globals.ancillaryCollapsedSeriesIndices.length>0)&&(d.config.series=S.copySeriesShallow(d.config.series),s.series.reconcileCollapsedByName())}return s.update(t)});Promise.all(h).then(()=>r(this.ctx)).catch(o)})}capture(t,e){const i=this.w,s=i.globals,a=i.config.chart.animations;t&&a.enabled&&(a.dynamicAnimation.enabled||e)?this.ctx.series.getPreviousPaths():(s.previousPaths=[],s.prevStreamFrame=null,s.streamScrolled=!1)}_updateSeries(t,e,i=!1){return new Promise((s,a)=>{const r=this.w;r.globals.shouldAnimate=e,r.globals.dataChanged=!0;const o=JSON.stringify({y:(r.globals.yAxisScale||[]).map(t=>t?t.result:null),xMin:r.globals.minX,xMax:r.globals.maxX});cs.invalidateSelectors(r),this.capture(e);const n=ds(r),c=ps(r),h=r.globals.barPadForNumericAxis,d=r.layout.rotateXLabels,p=r.config.series.length,u=r.config.series.map(t=>{var e,i;return null!=(i=null==(e=null==t?void 0:t.data)?void 0:e.length)?i:0});i&&hs(r);const g=t;let x=!1;return r.globals.axisCharts&&(r.globals.collapsedSeriesIndices.length>0||r.globals.ancillaryCollapsedSeriesIndices.length>0)&&(t=t.map(t=>t&&"object"==typeof t?l({},t):t),this.ctx.series.reconcileCollapsedByName(t),x=!0),this.ctx.data.resetParsingFlags(),this.ctx.data.parseData(t,i),i&&(r.globals.initialConfig&&(r.globals.initialConfig.series=S.copySeriesShallow(x?g:r.config.series)),x&&(r.globals.initialSeries=g)),this._canUseFastPath(t,p,u,r)&&ds(r)===n&&ps(r)===c?(r.globals.barPadForNumericAxis=h,r.layout.rotateXLabels=d,this.ctx.fastUpdate(e,o).then(()=>{s(this.ctx)}).catch(a)):(this.ctx._updateStats&&this.ctx._updateStats.full++,this.ctx.update().then(()=>{s(this.ctx)}).catch(a))})}_canUseFastPath(t,e,i,s){var a;if(!s.dom.elGraphical)return!1;if(!s.globals.axisCharts)return!1;if(t.length!==e)return!1;if(t.some((t,e)=>{var s,a;return(null!=(a=null==(s=null==t?void 0:t.data)?void 0:s.length)?a:0)!==i[e]}))return!1;if(s.globals.collapsedSeries.length>0)return!1;if(s.globals.ancillaryCollapsedSeries.length>0)return!1;if(s.globals.risingSeries.length>0)return!1;if(s.globals.comboCharts)return!1;if(s.interact.zoomed)return!1;if("radar"===s.config.chart.type)return!1;const r=null==(a=this.ctx.legend)?void 0:a.heatmapGradientLegend;if(r&&r.constructor.isEnabled(s)){const{min:t,max:e}=r._computeStops();if(t!==r._min||e!==r._max)return!1}const o=this.ctx.rendererController;return!o||o.pendingKind()===o.getActiveKind()}_extendSeries(t,e,i){return c(l({},i),{name:t.name?t.name:null==i?void 0:i.name,color:t.color?t.color:null==i?void 0:i.color,type:t.type?t.type:null==i?void 0:i.type,group:t.group?t.group:null==i?void 0:i.group,hidden:void 0!==t.hidden?t.hidden:null==i?void 0:i.hidden,data:t.data?t.data:null==i?void 0:i.data,highlightData:t.highlightData,zIndex:void 0!==t.zIndex?t.zIndex:e})}toggleDataPointSelection(t,e){const i=this.w;let s=null;const a=`.apexcharts-series[data\\:realIndex='${t}']`;if(i.globals.axisCharts?s=i.dom.Paper.findOne(`${a} path[j='${e}'], ${a} circle[j='${e}'], ${a} rect[j='${e}']`):void 0===e&&(s=i.dom.Paper.findOne(`${a} path[j='${t}']`),"pie"!==i.config.chart.type&&"polarArea"!==i.config.chart.type&&"donut"!==i.config.chart.type||this.ctx.pie.pieClicked(t)),!s)return console.warn("toggleDataPointSelection: Element not found"),null;new xa(this.w).pathMouseDown(s,null);return s.node?s.node:null}forceXAxisUpdate(t){var e,i;const s=this.w;if(["min","max"].forEach(e=>{void 0!==t.xaxis[e]&&(s.config.xaxis[e]=t.xaxis[e],s.globals.lastXAxis[e]=t.xaxis[e])}),t.xaxis.categories&&t.xaxis.categories.length&&(s.config.xaxis.categories=t.xaxis.categories),s.config.xaxis.convertedCatToNumeric){const a=t.xaxis;if("categories"in a||"labels"in t)t=new Q(t).convertCatToNumericXaxis(t);else if(null==(e=a.labels)?void 0:e.formatter){const e=null==(i=s.config.xaxis.labels.formatter)?void 0:i.categoryNames;t=new Q(t).convertCatToNumericXaxis(t,e)}}return t}forceYAxisUpdate(t){return t.chart&&t.chart.stacked&&"100%"===t.chart.stackType&&(Array.isArray(t.yaxis)?t.yaxis.forEach((e,i)=>{t.yaxis[i].min=0,t.yaxis[i].max=100}):(t.yaxis.min=0,t.yaxis.max=100)),t}revertDefaultAxisMinMax(t){const e=this.w;let i=e.globals.lastXAxis,s=e.globals.lastYAxis;t&&t.xaxis&&(i=t.xaxis),t&&t.yaxis&&(s=t.yaxis);const a=i;e.config.xaxis.min=a.min,e.config.xaxis.max=a.max;const r=t=>{if(void 0!==s[t]){const i=s[t];e.config.yaxis[t].min=i.min,e.config.yaxis[t].max=i.max}};e.config.yaxis.map((t,i)=>{e.interact.zoomed||void 0!==s[i]?r(i):void 0!==this.ctx.opts.yaxis[i]&&(t.min=this.ctx.opts.yaxis[i].min,t.max=this.ctx.opts.yaxis[i].max)})}}class gs{static xRatio(t){const e=t.layout.gridWidth||1;return(t.globals.maxX-t.globals.minX)/e}static dataXToPx(t,e){return(e-t.globals.minX)/gs.xRatio(t)}static pxToDataX(t,e){return t.globals.minX+e*gs.xRatio(t)}static plotRect(t){var e,i,s;const a=(null==(e=t.dom.Paper)?void 0:e.node)||(null==(i=t.dom.baseEl)?void 0:i.querySelector(".apexcharts-svg")),r=(null==(s=a||t.dom.elWrap)?void 0:s.getBoundingClientRect())||{left:0,top:0,width:0},o=(a&&t.globals.svgWidth?r.width/t.globals.svgWidth:1)||1;return{left:r.left+t.layout.translateX*o,top:r.top+t.layout.translateY*o,width:t.layout.gridWidth*o,height:t.layout.gridHeight*o,zoom:o}}static screenXToPlotPx(t,e,i=gs.plotRect(t)){return(e-i.left)/i.zoom}}class xs{static isFollowCursor(t){return t.config.tooltip.followCursor&&!t.config.tooltip.interactive}static eventPointer(t,e={}){var i,s,a,r,o,n;const l=(null==(i=null==t?void 0:t.type)?void 0:i.startsWith("touch"))?null==(s=t.touches)?void 0:s[0]:null;return{x:null!=(r=null!=(a=e.clientX)?a:l?l.clientX:null==t?void 0:t.clientX)?r:0,y:null!=(n=null!=(o=e.clientY)?o:l?l.clientY:null==t?void 0:t.clientY)?n:0}}static plotRect(t){return gs.plotRect(t)}static plotInWrap(t){const e=xs.plotRect(t),i=t.dom.elWrap.getBoundingClientRect();return{left:e.left-i.left,top:e.top-i.top}}static hasViolinSeries(t){return"violin"===t.config.chart.type||(t.config.series||[]).some(t=>t&&"violin"===t.type)}static isCanvasViolinChart(t){return xs.isCanvasBarChart(t)&&xs.hasViolinSeries(t)}static isBarLikeType(t){return"bar"===t||"column"===t||"rangeBar"===t||"candlestick"===t||"boxPlot"===t||"violin"===t}static hasBarLikeSeries(t){return xs.isBarLikeType(t.config.chart.type)||(t.config.series||[]).some(t=>t&&xs.isBarLikeType(t.type))}static isCanvasBarChart(t){const e=t.globals.activeRenderer;return"canvas"===(null==e?void 0:e.kind)&&"function"==typeof e.hitTest&&xs.hasBarLikeSeries(t)}static isCanvasMarkerChart(t){const e=t.globals.activeRenderer;return"canvas"===(null==e?void 0:e.kind)&&"function"==typeof e.hitTestMarker&&!!t.globals.xyCharts}constructor(t){this.w=t.w,this.ttCtx=t}static hoverTarget(t){return t?(t.eventPhase&&t.target&&(t.apexHoverTarget=t.target),t.apexHoverTarget||t.target):null}getNearestValues({hoverArea:t,clientX:e,clientY:i}){var s;const a=this.w,r=xs.plotRect(a),o=a.layout.gridWidth,n=a.layout.gridHeight,l=a.globals.dataPoints;let c=o/(l-1);const h=n/l,d=(a.globals.comboCharts||this.hasBars()||"between"===a.config.xaxis.tickPlacement)&&!a.config.xaxis.convertedCatToNumeric;d&&(c=o/l);const p=(e-r.left)/r.zoom,u=(i-r.top)/r.zoom,g=a.globals.barPadForNumericAxis||0;p<-g||u<0||p>o+g||u>n?(t.classList.remove("hovering-zoom"),t.classList.remove("hovering-pan")):a.interact.zoomEnabled?(t.classList.remove("hovering-pan"),t.classList.add("hovering-zoom")):a.interact.panEnabled&&(t.classList.remove("hovering-zoom"),t.classList.add("hovering-pan"));let x=d?Math.ceil(p/c)-1:Math.round(p/c),f=Math.floor(u/h),m=null;if(a.axisFlags.isXNumeric){const t=this.closestInMultiArray(p,u,a.globals.seriesXvalues,a.globals.seriesYvalues);m=t.index,x=null!=(s=t.j)?s:0}return a.interact.capturedSeriesIndex=null===m?-1:m,x>l-1&&(x=l-1),f>l-1&&(f=l-1),(!x||x<1)&&(x=0),a.globals.isBarHorizontal?a.interact.capturedDataPointIndex=f:a.interact.capturedDataPointIndex=x,{capturedSeries:m,j:a.globals.isBarHorizontal?f:x,hoverX:p,hoverY:u}}getFirstActiveXArray(t){const e=this.w.globals,i=t.findIndex((t,i)=>t.length>0&&-1===e.collapsedSeriesIndices.indexOf(i)&&-1===e.ancillaryCollapsedSeriesIndices.indexOf(i));return i<0?0:i}closestInMultiArray(t,e,i,s){const a=this.w,r=t=>-1===a.globals.collapsedSeriesIndices.indexOf(t)&&-1===a.globals.ancillaryCollapsedSeriesIndices.indexOf(t),o=a.config.chart.type,n=!a.globals.comboCharts&&("line"===o||"area"===o);let l=1/0,c=null,h=null;const d=(t,e,i)=>Number.isFinite(t[i])&&Number.isFinite(e[i]);if(a.globals.allSeriesHasEqualX){let a=1/0;for(let e=0;e<i.length;e++){if(!r(e))continue;const o=i[e],n=s[e],l=Math.min(o.length,n.length);for(let e=0;e<l;e++){if(!d(o,n,e))continue;const i=Math.abs(t-o[e]);i<a&&(a=i,h=e)}}if(null!==h)if(n){let a=1/0;for(let o=0;o<i.length;o++){if(!r(o))continue;const n=i[o],l=s[o],p=Math.min(n.length,l.length);let u=-1,g=0;for(let i=0;i<p;i++)if(d(n,l,i)){if(u>=0){g++;const s=this._distanceToSegment(t,e,n[u],l[u],n[i],l[i]);s.dist<a&&(a=s.dist,c=o)}u=i}if(!g){const t=l[h];if("number"!=typeof t)continue;const i=Math.abs(e-t);i<a&&(a=i,c=o)}}}else{let t=1/0;for(let a=0;a<i.length;a++){if(!r(a))continue;const i=s[a][h];if("number"!=typeof i)continue;const o=Math.abs(e-i);o<t&&(t=o,c=a)}}return{index:c,j:h}}for(let a=0;a<i.length;a++){if(!r(a))continue;const o=i[a],p=s[a],u=Math.min(o.length,p.length);if(n){let i=-1,s=0;for(let r=0;r<u;r++)if(d(o,p,r)){if(i>=0){s++;const n=this._distanceToSegment(t,e,o[i],p[i],o[r],p[r]);n.dist<l&&(l=n.dist,c=a,h=n.t<.5?i:r)}i=r}if(s)continue}for(let i=0;i<u;i++){if(!d(o,p,i))continue;const s=t-o[i],r=e-p[i],n=Math.sqrt(s*s+r*r);n<l&&(l=n,c=a,h=i)}}return{index:c,j:h}}_distanceToSegment(t,e,i,s,a,r){const o=a-i,n=r-s,l=o*o+n*n;let c=0===l?0:((t-i)*o+(e-s)*n)/l;c<0?c=0:c>1&&(c=1);const h=t-(i+c*o),d=e-(s+c*n);return{dist:Math.sqrt(h*h+d*d),t:c}}isXoverlap(t){const e=this.w.seriesData.seriesX.filter(t=>void 0!==t[0]);for(let i=0;i<e.length-1;i++){const s=e[i][t],a=e[i+1][t];if(void 0!==s&&void 0!==a&&s!==a)return!1}return!0}isInitialSeriesSameLen(){var t,e,i,s;let a=!0;const r=(null==(e=null!=(t=this.w.globals._initialSeriesPeek)?t:this.w.globals.initialSeries)?void 0:e.filter((t,e)=>{var i;return!(null==(i=this.w.globals.collapsedSeriesIndices)?void 0:i.includes(e))}))||[];for(let t=0;t<r.length-1;t++){if(!(null==(i=r[t])?void 0:i.data)||!(null==(s=r[t+1])?void 0:s.data))return!0;if(r[t].data.length!==r[t+1].data.length){a=!1;break}}return a}facts(){const t=this.ttCtx;return t._facts||(t._facts={})}markerWraps(){var t,e;return null!=(e=(t=this.facts()).wraps)?e:t.wraps=[...this.w.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap")].map(t=>[Number(t.getAttribute("data:realIndex")),...new Set([t.querySelector(".apexcharts-marker"),t.querySelector(".apexcharts-series-markers path")])]).sort((t,e)=>t[0]-e[0])}getAllMarkers(t=!1){const e=this.w.globals.collapsedSeriesIndices;return this.markerWraps().filter(i=>!t||e.indexOf(i[0])<0).map(t=>t[1])}hasMarkers(t){var e,i,s;return null!=(s=(e=this.facts())[i="m"+t])?s:e[i]=!!this.w.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${t}'] .apexcharts-series-markers-wrap > *`)}hasVisibleMarkers(){return this.getAllMarkers(!0).some(Boolean)}getPathFromPoint(t,e){const i=Number(t.getAttribute("cx")),s=Number(t.getAttribute("cy")),a=t.getAttribute("shape");return new xa(this.w).getMarkerPath(i,s,a,e)}getElBars(){var t,e;return null!=(e=(t=this.facts()).bars)?e:t.bars=this.w.dom.baseEl.querySelectorAll(".apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-violin-series, .apexcharts-rangebar-series")}hasBars(){return this.getElBars().length>0}getHoverMarkerSize(t){const e=this.w;let i=e.config.markers.hover.size;return void 0===i&&(i=e.globals.markers.size[t]+e.config.markers.hover.sizeOffset),i}toggleAllTooltipSeriesGroups(t){const e=this.w,i=this.ttCtx;0===i.allTooltipSeriesGroups.length&&(i.allTooltipSeriesGroups=e.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));const s=i.allTooltipSeriesGroups;for(let i=0;i<s.length;i++)"enable"===t?(s[i].classList.add("apexcharts-active"),s[i].style.display=e.config.tooltip.items.display):(s[i].classList.remove("apexcharts-active"),s[i].style.display="none")}}function fs({anchorX:t,markTop:e,markBottom:i,ttWidth:s,ttHeight:a,room:r,gapAbove:o=7,gapBelow:n=o}){if(![t,e,i,s,a].every(Number.isFinite))return null;let l,c;const h=e-o-a,d=Math.max(e,i)+n;if(h>=r.top)l="top",c=h;else{if(!(d+a<=r.bottom))return null;l="bottom",c=d}const p=Ss(t,s,r);return{x:p,y:c,placement:l,arrowX:Math.max(10,Math.min(s-10,t-p))}}function ms(t){if("function"!=typeof t)return()=>null!=t?t:null;let e;return()=>{var i;return void 0===e&&(e=null!=(i=t())?i:null),e}}function bs({cell:t,plot:e,ttWidth:i,ttHeight:s,gap:a}){const r=(t.left+t.right)/2,o=(t.top+t.bottom)/2,n=t.top-a-s,l=t.bottom+a,c=(t,s)=>{const a=ws(r,i,e.left,e.right);return{x:a,y:s,placement:t,arrowX:r-a,arrowY:null}};return{middleSide:r<(e.left+e.right)/2?"right":"left",above:t=>n>=t.top?c("top",n):null,below:t=>l+s<=t.bottom?c("bottom",l):null,beside:(r,n)=>{const l="right"===r,c=l?t.right+a:t.left-a-i;if(l?c+i>n.right:c<n.left)return null;const h=ws(o,s,e.top,e.bottom);return{x:c,y:h,placement:r,arrowX:null,arrowY:o-h}}}}function ys({cell:t,plot:e,room:i=null,ttWidth:s,ttHeight:a,gap:r=7}){var o,n,l,c,h;if(![t.top,t.bottom,t.left,t.right,s,a].every(Number.isFinite))return null;const d=bs({cell:t,plot:e,ttWidth:s,ttHeight:a,gap:r}),p=null!=(n=null!=(o=d.above(e))?o:d.below(e))?n:d.beside(d.middleSide,e);if(p)return p;const u=ms(i)();if(!u)return null;const g="right"===d.middleSide?"left":"right";return null!=(h=null!=(c=null!=(l=d.above(u))?l:d.below(u))?c:d.beside(d.middleSide,u))?h:d.beside(g,u)}function vs({cell:t,plot:e,room:i=null,ttWidth:s,ttHeight:a,gap:r=7,side:o=null,beside:n=!0}){var l,c,h;if(![t.top,t.bottom,t.left,t.right,s,a].every(Number.isFinite))return null;const d=bs({cell:t,plot:e,ttWidth:s,ttHeight:a,gap:r}),p=ms(i),u=null!=o?o:d.middleSide,g=null!=(l=d.above(e))?l:d.below(e);if(g)return g;const x=p(),f=x?null!=(c=d.above(x))?c:d.below(x):null;return f||!n?f:null!=(h=d.beside(u,e))?h:x?d.beside(u,x):null}function ws(t,e,i,s){if(e>s-i)return t-e/2;return t-As(t-Math.max(Math.min(t-e/2,s-e),i),e)}function As(t,e){const i=Math.min(10,e/2);return Math.max(i,Math.min(e-i,t))}function Ss(t,e,i){const s=Math.min(t-e/2,i.right-e);return Math.max(s,i.left)}function Cs(t,e){const i=null==t?void 0:t.ownerDocument,s=null==i?void 0:i.defaultView;if(!s)return null;const a=i.documentElement,r={top:0,left:0,right:Math.min(s.innerWidth,(null==a?void 0:a.clientWidth)||1/0),bottom:Math.min(s.innerHeight,(null==a?void 0:a.clientHeight)||1/0)};e.clippers||(e.clippers=function(t,e){const i=[],s=t.ownerDocument;let a=e.getComputedStyle(t).position,r=Ds(t);for(;r&&r!==s.body&&r!==s.documentElement;){const t=e.getComputedStyle(r);if("fixed"===a?_s(t):"absolute"!==a||("static"!==t.position||_s(t))){if(!ks.test(t.display||"")){const e=Ts(t),s=e||Ms(t.overflowX),a=e||Ms(t.overflowY);(s||a)&&i.push({node:r,x:s,y:a})}a=t.position}r=Ds(r)}return i}(t,s));for(const{node:t,x:i,y:s}of e.clippers){if(!t.isConnected)continue;const e=t.getBoundingClientRect();if(s){const i=e.top+t.clientTop;r.top=Math.max(r.top,i),r.bottom=Math.min(r.bottom,i+t.clientHeight)}if(i){const i=e.left+t.clientLeft;r.left=Math.max(r.left,i),r.right=Math.min(r.right,i+t.clientWidth)}}return r}const ks=/^(inline|contents|table-row|table-row-group|table-header-group|table-footer-group|table-column|table-column-group)$/;function Ms(t){return!!t&&"visible"!==t}function Ts(t){const e=t.contentVisibility;return/paint|strict|content/.test(t.contain||"")||"auto"===e||"hidden"===e}function _s(t){const e=t=>!!t&&"none"!==t,i=t;return e(t.transform)||e(i.translate)||e(i.rotate)||e(i.scale)||e(t.perspective)||e(t.filter)||e(i.backdropFilter)||"preserve-3d"===t.transformStyle||/paint|layout|strict|content/.test(t.contain||"")||"size"===i.containerType||"inline-size"===i.containerType||Ts(t)||/transform|translate|rotate|scale|perspective|filter/.test(t.willChange||"")}function Ds(t){let e=t.assignedSlot||t.parentNode;return e&&11===e.nodeType&&(e=e.host||null),e&&1===e.nodeType?e:null}const Fs=(t,e)=>["bar","candlestick","boxPlot","violin","rangebar"].map(i=>`.apexcharts-${i}-series .apexcharts-series[${t}]`+(null==e?"":` path${"violin"===i?".apexcharts-violin-area":""}[j='${e}']`)).join();class Ls{constructor(t){this.ttCtx=t,this.w=t.w,this.shortPlotPlacement=!1,this.clipCache={clippers:null,at:0},this._memo=null}getVisibleRoom(){var t,e,i;const s=null==(t=this.w.dom)?void 0:t.elWrap,a=null==(i=(e=this.ttCtx).getElTooltip)?void 0:i.call(e);if(!s||!a)return null;const r=Date.now();r-(this.clipCache.at||0)>1e3&&(this.clipCache.clippers=null),this.clipCache.clippers||(this.clipCache.at=r);const o=Cs(a,this.clipCache);if(!o)return null;const n=s.getBoundingClientRect();return{top:o.top-n.top,bottom:o.bottom-n.top,left:o.left-n.left,right:o.right-n.left}}isShortPlot(){var t,e,i;return!this.ttCtx.fixedTooltip&&(e=(null==(t=this.ttCtx.tooltipRect)?void 0:t.ttHeight)||0,i=this.w.layout.gridHeight,e>0&&(!(i>0)||e>=.78*i))}resetPlacementCache(){this.clipCache.clippers=null}placeOnShortPlot(t,e,i,{gapAbove:s,gapBelow:a}={}){var r,o;const n=this.ttCtx;if(this.shortPlotPlacement=!1,!this.isShortPlot())return null;const h=(null==(r=n.tooltipRect)?void 0:r.ttHeight)||0,d=(null==(o=n.tooltipRect)?void 0:o.ttWidth)||0,p=this.getVisibleRoom();if(!p)return null;const u=fs({anchorX:t,markTop:e,markBottom:i,ttWidth:d,ttHeight:h,room:p,gapAbove:s,gapBelow:a});return u?(this.shortPlotPlacement=!0,c(l({},u),{arrowY:null})):null}placeAroundCell(t,e,{el:i=null,ttWidth:s=(t=>null==(t=this.ttCtx.tooltipRect)?void 0:t.ttWidth)()||0,ttHeight:a=(t=>null==(t=this.ttCtx.tooltipRect)?void 0:t.ttHeight)()||0}={}){var r;return(null==(r=null==i?void 0:i.closest)?void 0:r.call(i,'[clip-path*="heatmapHexMask"]'))||(t=this._visiblePart(t,e)),this._placeAround(ys,t,e,{ttWidth:s,ttHeight:a})}placeAroundBar(t,e,i,s=null){const a=this.barValueSide(i,s);return this._placeAround(vs,this._visiblePart(t,e),e,{side:a})}placeOverColumn(t,e){return this._placeAround(vs,this._visiblePart(t,e),e,{beside:!1})}_visiblePart(t,e){const i=Math.max(t.left,e.left),s=Math.min(t.right,e.right);return s>i?c(l({},t),{left:i,right:s}):t}_placeAround(t,e,i,s={}){var a=s,{ttWidth:r=(t=>null==(t=this.ttCtx.tooltipRect)?void 0:t.ttWidth)()||0,ttHeight:o=(t=>null==(t=this.ttCtx.tooltipRect)?void 0:t.ttHeight)()||0}=a,n=h(a,["ttWidth","ttHeight"]);let d;const p=()=>(void 0===d&&(d=this.getVisibleRoom()),d);let u=t(l({cell:e,plot:i,room:p,ttWidth:r,ttHeight:o},n));if(!u){const t=(e.left+e.right)/2,s=Math.min(Math.max(t-r/2,i.left),i.right-r);u={x:s,y:i.top,placement:"top",arrowX:Math.max(10,Math.min(r-10,t-s)),arrowY:null}}const g=("top"===u.placement||"bottom"===u.placement?u.x<i.left||u.x+r>i.right:u.y<i.top||u.y+o>i.bottom)?p():null;return g&&(u=function(t,e,i,s,a){if("top"===t.placement||"bottom"===t.placement){const a=Math.max(Math.min(t.x,i.right-s),i.left),r=(e.left+e.right)/2;return c(l({},t),{x:a,arrowX:As(r-a,s)})}const r=Math.max(Math.min(t.y,i.bottom-a),i.top),o=(e.top+e.bottom)/2;return c(l({},t),{y:r,arrowY:As(o-r,a)})}(u,e,g,r,o)),u}barValueSide(t,e=null){var i,s,a,r,o,n;const l=this.w;if(null==(s=null==(i=l.config.plotOptions)?void 0:i.bar)?void 0:s.isFunnel)return"right";if("bar"!==l.config.chart.type||(null==(r=null==(a=l.rangeData)?void 0:a.seriesRange)?void 0:r.length))return null;const c=l.seriesData.series,h=l.globals.collapsedSeriesIndices||[];let d=!1,p=!1;return c.forEach((i,s)=>{if(null==e?h.includes(s):s!==e)return;const a=null==i?void 0:i[t];a>0?d=!0:a<0&&(p=!0)}),d===p?null:p!==!!(null==(n=null==(o=l.config.yaxis)?void 0:o[0])?void 0:n.reversed)?"left":"right"}placeOverAnchor(t,e,i,s,a,r=a){const o=s>0?this.getVisibleRoom():null,n=o?fs({anchorX:t,markTop:e,markBottom:e,ttWidth:i,ttHeight:s,room:o,gapAbove:a,gapBelow:r}):null;return n?{x:n.x,y:n.y}:{x:o?Ss(t,i,o):t-i/2,y:e-a-s}}moveXCrosshairs(t){const e=this.ttCtx,i=this.w,s=e.getElXCrosshairs();let a=t-e.xcrosshairsWidth/2;if(null===s||i.globals.isBarHorizontal||(s.setAttribute("x",String(a)),s.setAttribute("x1",String(a)),s.setAttribute("x2",String(a)),s.setAttribute("y2",String(i.layout.gridHeight)),s.classList.add("apexcharts-active")),a<0&&(a=0),a>i.layout.gridWidth&&(a=i.layout.gridWidth),e.isXAxisTooltipEnabled){let t=a;"tickWidth"!==i.config.xaxis.crosshairs.width&&"barWidth"!==i.config.xaxis.crosshairs.width||(t=a+e.xcrosshairsWidth/2),this.moveXAxisTooltip(t)}}moveYCrosshairs(t){const e=this.ttCtx;null!==e.ycrosshairs&&xa.setAttrs(e.ycrosshairs,{y1:t,y2:t}),null!==e.ycrosshairsHidden&&xa.setAttrs(e.ycrosshairsHidden,{y1:t,y2:t})}moveXAxisTooltip(t){const e=this.w,i=this.ttCtx;if(null!==i.xaxisTooltip&&0!==i.xcrosshairsWidth){i.xaxisTooltip.classList.add("apexcharts-active");const s=i.xaxisOffY+e.config.xaxis.tooltip.offsetY+e.layout.translateY+5+e.config.xaxis.offsetY;if(i.xaxisTooltipText){const t=new xa(this.w).getTextRects(i.xaxisTooltipText.innerHTML,e.config.xaxis.labels.style.fontSize);i.xaxisTooltipText.style.minWidth=t.width+"px"}t-=i.xaxisTooltip.getBoundingClientRect().width/2,isNaN(t)||(t+=e.layout.translateX,i.xaxisTooltip.style.left=t+"px",i.xaxisTooltip.style.top=s+"px")}}moveYAxisTooltip(t){var e,i;const s=this.w,a=this.ttCtx,r=a.getYaxisTTEls()[t],o=parseInt(null!=(i=null==(e=a.ycrosshairsHidden)?void 0:e.getAttribute("y1"))?i:"0",10);let n=s.layout.translateY+o;if(r){const e=r.getBoundingClientRect(),i=e.height;let a;const o=this._marks(`.apexcharts-yaxis[rel='${t}'] .apexcharts-yaxis-texts-g`)[0],l=s.dom.elWrap.getBoundingClientRect();if(o){const t=o.getBoundingClientRect();if(t.width>0){a=t.left+t.width/2-l.left-e.width/2}}if(null==a){const i=4;a=s.config.yaxis[t].opposite?s.globals.translateYAxisX[t]+i:s.globals.translateYAxisX[t]-e.width-i}n-=i/2,-1===s.globals.ignoreYAxisIndexes.indexOf(t)&&n>0&&n<s.layout.gridHeight?(r.classList.add("apexcharts-active"),r.style.top=n+"px",r.style.left=a+s.config.yaxis[t].tooltip.offsetX+"px"):r.classList.remove("apexcharts-active")}}moveTooltip(t,e,i=null,s=null){const a=this.ttCtx.getElTooltip();if(!a)return;const r=this.computeTooltipPosition(t,e,i,s);null!==r&&this.applyTooltipPosition(a,r)}computeTooltipPosition(t,e,i=null,s=null){var a,r,o,n,l,c,h,d,p;const u=this.w,g=this.ttCtx,x=g.tooltipRect,f=!!u.config.tooltip.arrow,m=null!==i?parseFloat(String(i)):1,b=x.ttHeight||0,y=x.ttWidth||0,v=parseFloat(String(t)),w=parseFloat(String(e));if(isNaN(v)||isNaN(w))return null;const A=m+(f?7:0)+0;let S=v+A;const C=w+u.layout.translateY;let k=C-b/2+m/2,M="right",T=v,_=null;if(S>u.layout.gridWidth/2&&(S=v-y-A,M="left"),S>u.layout.gridWidth-y-10&&(S="left"===M?Math.min(u.layout.gridWidth-y,S):u.layout.gridWidth-y),S<-20&&(S=-20),xs.isFollowCursor(u)){if(!g.getElGrid())return null;const t=xs.plotRect(u);S=(null!=(a=g.clientX)?a:g.e.clientX)-t.left,T=S,S>u.layout.gridWidth/2?(S-=y,M="left"):M="right",_=(null!=(r=g.clientY)?r:g.e.clientY)-t.top,k=_+u.layout.translateY,k>u.layout.gridHeight/2&&(k-=b)}else if(!u.globals.isBarHorizontal){const t=u.layout.translateY,e=u.layout.translateY+u.layout.gridHeight;k+b>e&&(k=e-b),k<t&&(k=t)}if(isNaN(S))return null;const D=u.layout.translateY,F=null!==_,L=F?_+D:s?s.top+D:C-m,E=F?L:s?s.bottom+D:C+m,P=this.placeOnShortPlot(T+u.layout.translateX,L,E,{gapAbove:7,gapBelow:F?24:7});if(P)return P;S+=u.layout.translateX;const B=null==(n=null==(o=u.config)?void 0:o.chart)?void 0:n.accessibility;if((null==B?void 0:B.enabled)&&(null==(c=null==(l=null==B?void 0:B.keyboard)?void 0:l.navigation)?void 0:c.enabled)&&(null==(p=null==(d=null==(h=this.ttCtx.ctx)?void 0:h._keyboardNavigation)?void 0:d._focusedEl)?void 0:p.isConnected)){const t=C,e=(m||1)+12,i=k,s=k+b;!isNaN(t)&&b>0&&i<t+e&&s>t-e&&(k=t-b-e,k<0&&(k=t+e))}let N=null;if(f&&b>0){const t=C-k,e=10,i=b-10;N=Math.max(e,Math.min(i,t))}return{x:S,y:k,placement:M,arrowY:N}}applyTooltipPosition(t,e){if(!t)return;const i="true"!==t.dataset.positioned;if(i&&(t.style.transitionProperty="none"),t.style.left=e.x+"px",t.style.top=e.y+"px",e.placement&&(t.dataset.placement=e.placement),null!=e.arrowY&&t.style.setProperty("--apx-tt-arrow-y",e.arrowY+"px"),null!=e.arrowX&&t.style.setProperty("--apx-tt-arrow-x",e.arrowX+"px"),i){t.offsetWidth,t.dataset.positioned="true";const e=()=>{t.style.transitionProperty=""};"function"==typeof requestAnimationFrame?requestAnimationFrame(e):e()}}moveMarkers(t,e){const i=this.w,s=this.ttCtx;if(i.globals.markers.size[t]>0&&!i.globals.markers.batched){const a=i.dom.baseEl.querySelector(` .apexcharts-series[data\\:realIndex='${t}'] .apexcharts-marker[rel='${e}']`);a&&(s.marker.resetEnlargedPoints(),s.marker.enlargeCurrentPoint(e,a))}else s.marker.resetPointsSize(),this.moveDynamicPointOnHover(e,t)}moveDynamicPointOnHover(t,e){var i,s,a,r,o;const n=this.w,l=this.ttCtx;let c=0,h=0;const d=new xa(this.w),p=n.globals.pointsArray,u=l.tooltipUtil.getHoverMarkerSize(e),g=n.config.series[e].type;if(g&&("column"===g||"candlestick"===g||"boxPlot"===g||"violin"===g))return;c=null==(s=null==(i=p[e])?void 0:i[t])?void 0:s[0];const x=null==(r=null==(a=p[e])?void 0:a[t])?void 0:r[1],f=Number.isFinite(x);h=f?x:0;const m=n.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${e}'] .apexcharts-series-markers path`);if(m&&f&&h<=n.layout.gridHeight&&h>=0){const t=null!=(o=m.getAttribute("shape"))?o:"circle",e=d.getMarkerPath(c,h,t,1.5*u);m.setAttribute("d",e)}if(this.moveXCrosshairs(c),!l.fixedTooltip){const t=1.5*u;this.moveTooltip(c,h,u,{top:h-t,bottom:h+t})}}moveDynamicPointsOnHover(t){var e,i,s,a;const r=this.ttCtx,o=r.w;let n=0,l=0,c=0;const h=o.globals.pointsArray,d=new mi(this.w),p=new xa(this.w);c=d.getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);const u=r.tooltipUtil.getHoverMarkerSize(c);let g=!1;if((null==(e=h[c])?void 0:e[t])&&(n=h[c][t][0],l=h[c][t][1],g=Number.isFinite(l)),isNaN(n))return;const x=r.tooltipUtil.getAllMarkers();if(x.length)for(let e=0;e<o.seriesData.series.length;e++){const r=h[e];if(o.globals.comboCharts&&void 0===r&&x.splice(e,0,null),x[e]&&r&&r.length){let l,c=null==(i=r[t])?void 0:i[1];x[e].setAttribute("cx",n);const h=null!=(s=x[e].getAttribute("shape"))?s:"circle";if("rangeArea"===o.config.chart.type&&!o.globals.comboCharts){const i=o.seriesData.series[e].length;l=t<i?null==(a=r[t+i])?void 0:a[1]:NaN;c-=Math.abs(c-l)/2}if(null!==c&&!isNaN(c)&&c<o.layout.gridHeight+u&&c+u>0){const t=p.getMarkerPath(n,c,h,u);x[e].setAttribute("d",t)}else x[e].setAttribute("d","")}}this.moveXCrosshairs(n),r.fixedTooltip||this.moveTooltip(n,g?l:o.layout.gridHeight,u,this.isShortPlot()?this.columnExtent(t,u):null)}columnExtent(t,e){var i,s,a,r,o,n,l,c;const h=this.w,d=h.globals,p=d.pointsArray||[],u="rangeArea"===h.config.chart.type&&!d.comboCharts;let g=1/0,x=-1/0;for(let f=0;f<p.length;f++){if((null==(i=d.collapsedSeriesIndices)?void 0:i.indexOf(f))>-1||(null==(s=d.ancillaryCollapsedSeriesIndices)?void 0:s.indexOf(f))>-1)continue;const m=[null==(r=null==(a=p[f])?void 0:a[t])?void 0:r[1]];if(u){const e=null!=(n=null==(o=h.seriesData.series[f])?void 0:o.length)?n:0;if(t>=e)continue;m.push(null==(c=null==(l=p[f])?void 0:l[t+e])?void 0:c[1])}for(const t of m)Number.isFinite(t)&&t>=-e&&t<=h.layout.gridHeight+e&&(g=Math.min(g,t),x=Math.max(x,t))}return Number.isFinite(g)?{top:g-e,bottom:x+e}:null}moveStickyTooltipOverBars(t,e){var i,s,a,r,o;const n=this.w,l=this.ttCtx;let c=n.globals.columnSeries?n.globals.columnSeries.length:n.seriesData.series.length;n.config.chart.stacked&&(c=n.globals.barGroups.length);let h=c>=2&&c%2==0?Math.floor(c/2):Math.floor(c/2)+1;if(n.globals.isBarHorizontal){h=new mi(this.w).getActiveConfigSeriesIndex("desc")+1}const d=!!n.globals.barCanvasCoords;let p=d?null:this._marks(Fs(`rel='${h}'`,t))[0];p||d||"number"!=typeof e||(p=this._marks(Fs(`data\\:realIndex='${e}'`,t))[0]);const u=d?this._paintedBarFor(h,t,e):null,g=!!p||!!u;let x=p?parseFloat(null!=(i=p.getAttribute("cx"))?i:"0"):u?null!=(s=u.bodyCx)?s:u.cx:0,f=p?parseFloat(null!=(a=p.getAttribute("cy"))?a:"0"):u?u.cy:0;const m=p?parseFloat(null!=(r=p.getAttribute("barWidth"))?r:"0"):u?u.barWidth:0;if(!l.getElGrid())return;const b=xs.plotRect(n),y=p?p.classList.contains("apexcharts-candlestick-area")||p.classList.contains("apexcharts-boxPlot-area"):"candlestick"===(null==u?void 0:u.type)||"boxPlot"===(null==u?void 0:u.type),v=(p?p.classList.contains("apexcharts-violin-area"):"violin"===(null==u?void 0:u.type))&&n.axisFlags.isXNumeric&&!n.globals.isBarHorizontal?this._violinsMiddleAt(t):null;if(null!=v)x=v;else if(n.axisFlags.isXNumeric){if(g&&!y){const e=this._datapointCenterXFromBars(t);null!=e?x=e:x-=c%2!=0?m/2:0}g&&y&&(x-=m/2)}else if(!n.globals.isBarHorizontal){const e=l.xAxisTicksPositions[t-1]+l.dataPointsDividedWidth/2;x=isNaN(e)?l.xAxisTicksPositions[t]-l.dataPointsDividedWidth/2:e,isNaN(x)&&u&&(x=u.cx)}if(n.globals.isBarHorizontal?f-=l.tooltipRect.ttHeight:xs.isFollowCursor(n)?f=l.e.clientY-b.top-l.tooltipRect.ttHeight/2:f+l.tooltipRect.ttHeight+15>n.layout.gridHeight&&(f=n.layout.gridHeight),n.globals.isBarHorizontal||this.moveXCrosshairs(x),!l.fixedTooltip){if(n.globals.isBarHorizontal&&!xs.isFollowCursor(n)){if(this.placeHorizontalSharedTooltip(t))return}const e=this.isShortPlot()?null!=(o=this._barsExtentInGrid(t))?o:{top:0,bottom:n.layout.gridHeight}:null,i=Number.isFinite(f)&&(0!==f||g||xs.isFollowCursor(n))?f:n.layout.gridHeight;this.moveTooltip(x,i,null,e)}}_marks(t){const e=this.ttCtx.allTooltipSeriesGroups;let i=this._memo;(!i||i.gen!==e||i.size>99)&&(i=this._memo=new Map,i.gen=e);let s=i.get(t);return s&&!s.some(t=>!t.isConnected)||i.set(t,s=Array.from(this.w.dom.baseEl.querySelectorAll(t))),s}_paintedBarFor(t,e,i){var s,a,r;const o=this.w.globals.barCanvasCoords;if(!o)return null;const n=this._marks(Fs(`rel='${t}'`));for(let t=0;t<n.length;t++){const i=n[t].getAttribute("data:realIndex");if(null!==i&&(null==(s=o[i])?void 0:s[e]))return o[i][e]}if("number"==typeof i&&(null==(a=o[i])?void 0:a[e]))return o[i][e];for(const t in o)if(null==(r=o[t])?void 0:r[e])return o[t][e];return null}_paintedAt(t,e){var i;const s=this.w.globals.barCanvasCoords;if(!s)return null;const a=this._hiddenSeries();let r=1/0,o=1/0,n=-1/0,l=-1/0;for(const c in s){const h=null==(i=s[c])?void 0:i[t],d=null==h?void 0:h.bounds;d&&e.includes(h.type)&&!a.includes(Number(c))&&(r=Math.min(r,d.left),o=Math.min(o,d.top),n=Math.max(n,d.right),l=Math.max(l,d.bottom))}return Number.isFinite(r)?{left:r,top:o,right:n,bottom:l}:null}_hiddenSeries(){const t=this.w.globals;return[...t.collapsedSeriesIndices||[],...t.ancillaryCollapsedSeriesIndices||[]]}_violinsMiddleAt(t){var e,i;const s=this.w;let a=1/0,r=-1/0;const o=t=>{Number.isFinite(t)&&(a=Math.min(a,t),r=Math.max(r,t))},n=s.globals.barCanvasCoords;if(n){const i=this._hiddenSeries();for(const s in n){const a=null==(e=n[s])?void 0:e[t];"violin"!==(null==a?void 0:a.type)||i.includes(Number(s))||o(a.cx)}}else{const e=this._marks(`.apexcharts-violin-series .apexcharts-series:not(.apexcharts-series-collapsed) path.apexcharts-violin-area[j='${t}']`);for(let t=0;t<e.length;t++)o(parseFloat(null!=(i=e[t].getAttribute("data:center"))?i:""))}return Number.isFinite(a)?(a+r)/2:null}_barsExtentInGrid(t){var e,i;const s=this.w,a=this._marks(`.apexcharts-bar-series path[j='${t}'],.apexcharts-rangebar-series path[j='${t}'],.apexcharts-candlestick-series path[j='${t}'],.apexcharts-boxPlot-series path[j='${t}'],.apexcharts-violin-series path[j='${t}']`),r=this._paintedAt(t,["bar","rangebar","candlestick","boxPlot","violin"]);if(!a.length&&!r)return null;let o=1/0,n=-1/0;if(r){const t=xs.plotRect(s);o=t.top+r.top*t.zoom,n=t.top+r.bottom*t.zoom}for(let t=0;t<a.length;t++){const s=a[t],r=s.parentNode;if(null==(i=null==(e=null==r?void 0:r.classList)?void 0:e.contains)?void 0:i.call(e,"apexcharts-series-collapsed"))continue;const l=s.getBoundingClientRect();0===l.width&&0===l.height||(o=Math.min(o,l.top),n=Math.max(n,l.bottom))}if(!Number.isFinite(o))return null;const l=s.dom.elWrap.getBoundingClientRect().top+s.layout.translateY;return{top:o-l,bottom:n-l}}_datapointCenterXFromBars(t){var e,i;const s=this.w,a=this._marks(`.apexcharts-bar-series path[j='${t}'],.apexcharts-rangebar-series path[j='${t}']`),r=this._paintedAt(t,["bar","rangebar"]);if(!a.length&&!r)return null;let o=1/0,n=-1/0;const l=xs.plotRect(s);r&&(o=l.left+r.left*l.zoom,n=l.left+r.right*l.zoom);for(const t of a){const s=t.parentNode;if(null==(i=null==(e=null==s?void 0:s.classList)?void 0:e.contains)?void 0:i.call(e,"apexcharts-series-collapsed"))continue;const a=t.getBoundingClientRect();0===a.width&&0===a.height||(a.left<o&&(o=a.left),a.right>n&&(n=a.right))}return isFinite(o)?gs.screenXToPlotPx(s,(o+n)/2,l):null}placeHorizontalSharedTooltip(t){var e,i;const s=this.w,a=this.ttCtx,r=a.getElTooltip();if(!r)return!1;if(!a.getElGrid())return!1;const o=this._marks(`.apexcharts-bar-series path[j='${t}'],.apexcharts-rangebar-series path[j='${t}'],.apexcharts-boxPlot-series path[j='${t}'],.apexcharts-violin-series path.apexcharts-violin-area[j='${t}'],.apexcharts-violin-series path.apexcharts-violin-points[j='${t}']`),n=this._paintedAt(t,["bar","rangebar","boxPlot","violin"]);if(!o.length&&!n)return!1;let l=1/0,c=-1/0,h=1/0,d=-1/0;if(n){const t=xs.plotRect(s);l=t.left+n.left*t.zoom,c=t.left+n.right*t.zoom,h=t.top+n.top*t.zoom,d=t.top+n.bottom*t.zoom}for(const t of o){const s=t.parentNode;if(null==(i=null==(e=null==s?void 0:s.classList)?void 0:e.contains)?void 0:i.call(e,"apexcharts-series-collapsed"))continue;const a=t.getBoundingClientRect();0===a.width&&0===a.height||(a.left<l&&(l=a.left),a.right>c&&(c=a.right),a.top<h&&(h=a.top),a.bottom>d&&(d=a.bottom))}if(!isFinite(l))return!1;const p=s.dom.elWrap.getBoundingClientRect(),u=l-p.left,g=c-p.left,x=(u+g)/2,f=h-p.top,m=d-p.top,{left:b,top:y}=xs.plotInWrap(s),v=y+s.layout.gridHeight,w=b+s.layout.gridWidth,A=this.placeOnShortPlot(x,f,m);return A?(this.applyTooltipPosition(r,A),!0):(this.applyTooltipPosition(r,this.placeAroundBar({top:f,bottom:m,left:u,right:g},{top:y,bottom:v,left:b,right:w},t)),!0)}}const Es=["none","lighten","darken"];function Ps(t,e){const i=t&&t.renderer;return i&&i.kind&&"svg"!==i.kind?i:e}function Bs(t){var e,i,s,a;const r=t.config.fill&&t.config.fill.type,o=t=>"pattern"===t||"image"===t||"gradient"===t;if(Array.isArray(r)?r.some(o):o(r))return!0;const n=null==(i=null==(e=t.config.plotOptions)?void 0:e.line)?void 0:i.colors;if(n&&n.colorAboveThreshold&&n.colorBelowThreshold)return!0;if("heatmap"===t.config.chart.type&&"rect"!==((null==(a=null==(s=t.config.plotOptions)?void 0:s.heatmap)?void 0:a.shape)||"rect"))return!0;const l=t.config.states||{},c=l.hover&&l.hover.filter&&l.hover.filter.type,h=l.active&&l.active.filter&&l.active.filter.type;return!(!c||Es.includes(c))||!(!h||Es.includes(h))}class Ns{constructor(t,e){this.w=t,this.ctx=e,this._filters=new pa(this.w),this._graphics=new xa(this.w,this.ctx),this._seriesWrap=null,this._seriesWrapIndex=-1,this._batch=null}resetSeriesWrapCache(){this._seriesWrap=null,this._seriesWrapIndex=-1,this._batch=null}static markersAreInert(t){const e=t.config.chart.type;return!("line"!==e&&"area"!==e||t.globals.comboCharts||t.config.tooltip.intersect)}_shouldBatch(){var t,e,i,s,a;const r=this.w,o=r.config.markers,n=null!=(t=o.largeDatasetThreshold)?t:0;if(n<=0)return!1;if("canvas"===(null==(i=null==(e=this.ctx)?void 0:e.renderer)?void 0:i.kind))return!1;if(!Ns.markersAreInert(r))return!1;if(o.discrete&&o.discrete.length)return!1;if(o.onClick||o.onDblClick)return!1;if(null==(s=r.config.chart.events)?void 0:s.dataPointSelection)return!1;const l=r.seriesData.series;if(!Array.isArray(l)||!l.length)return!1;let c=!1;for(let t=0;t<l.length;t++){if(!Array.isArray(l[t]))return!1;let e=!1,i=!1;const s=null==(a=r.config.series[t])?void 0:a.data;for(let a=0;a<l[t].length;a++){null===l[t][a]&&(e=!0);const r=Array.isArray(s)?s[a]:null;if(r&&(r.fillColor||r.strokeColor)){i=!0;break}}if(i)return!1;(r.globals.markers.size[t]>0||e&&o.showNullDataPoints)&&(l[t].length>n&&(c=!0))}return c}setGlobalMarkerSize(){const t=this.w;if(t.globals.markers.size=Array.isArray(t.config.markers.size)?t.config.markers.size.slice():[t.config.markers.size],t.globals.markers.size.length>0){if(t.globals.markers.size.length<t.seriesData.series.length+1)for(let e=0;e<=t.seriesData.series.length;e++)void 0===t.globals.markers.size[e]&&t.globals.markers.size.push(t.globals.markers.size[0])}else t.globals.markers.size=t.config.series.map(()=>t.config.markers.size);t.globals.markers.batched=this._shouldBatch()}plotChartMarkers({pointsPos:t,seriesIndex:e,j:i,pSize:s,alwaysDrawMarker:a=!1,isVirtualPoint:r=!1}){const o=this.w,n=e,l=t;let c=null;const h=new xa(this.w),d=Ps(this.ctx,h),p=o.config.markers.discrete&&o.config.markers.discrete.length;if(Array.isArray(l.x))for(let t=0;t<l.x.length;t++){let u,g=i,x=!S.isNumber(l.y[t]);0===o.globals.markers.largestSize&&o.globals.hasNullValues&&null!==o.seriesData.series[n][i+1]&&!r&&(x=!0),1===i&&0===t&&(g=0),1===i&&1===t&&(g=1);let f="apexcharts-marker";Ns.markersAreInert(o)&&(f+=" no-pointer-events");const m=Array.isArray(o.config.markers.size)?o.globals.markers.size[e]>0:o.config.markers.size>0;if(o.globals.markers.batched&&(m||a)&&!p&&!r)this._batchPoint(e,g,l.x[t],l.y[t],{invalid:x,graphics:h,pSize:a?s:void 0,trackPoint:!a});else if(m||a||p){"canvas"===d.kind&&(m||p)&&(void 0===o.globals.pointsArray[e]&&(o.globals.pointsArray[e]=[]),o.globals.pointsArray[e][g]=[l.x[t],l.y[t]]),x||(f+=` w${S.randomId()}`);const i=this.getMarkerConfig({cssClass:f,seriesIndex:e,dataPointIndex:g}),r=o.config.series[n];if(r.data[g]&&(r.data[g].fillColor&&(i.pointFillColor=r.data[g].fillColor),r.data[g].strokeColor&&(i.pointStrokeColor=r.data[g].strokeColor)),void 0!==s&&(i.pSize=s),(l.x[t]<-o.globals.markers.largestSize||l.x[t]>o.layout.gridWidth+o.globals.markers.largestSize||l.y[t]<-o.globals.markers.largestSize||l.y[t]>o.layout.gridHeight+o.globals.markers.largestSize)&&(i.pSize=0),!x){if((o.globals.markers.size[e]>0||a||p)&&!c){const t=!a&&!p;t&&this._seriesWrap&&this._seriesWrapIndex===e?c=this._seriesWrap:(c=d.group({class:t?"apexcharts-series-markers":""}),c.attr("clip-path",`url(#gridRectMarkerMask${o.globals.cuid})`),this.setupMarkerDelegation(c),t&&(this._seriesWrap=c,this._seriesWrapIndex=e))}u=d.drawMarker(l.x[t],l.y[t],i),u.attr("rel",g),u.attr("j",g),u.attr("index",e),u.node.setAttribute("default-marker-size",i.pSize),Jt(u,l.x[t],o),this._filters.setSelectionFilter(u,e,g),c&&c.add(u)}}else void 0===o.globals.pointsArray[e]&&(o.globals.pointsArray[e]=[]),o.globals.pointsArray[e].push([l.x[t],l.y[t]])}return c}_batchPoint(t,e,i,s,{invalid:a,graphics:r,pSize:o,trackPoint:n}){const l=this.w;if(n&&(void 0===l.globals.pointsArray[t]&&(l.globals.pointsArray[t]=[]),l.globals.pointsArray[t][e]=[i,s]),a)return;this._batch&&this._batch.seriesIndex===t||(this._batch={seriesIndex:t,opts:this.getMarkerConfig({cssClass:"",seriesIndex:t}),sizes:new Map});const c=void 0===o?this._batch.opts.pSize:o;if(!(c>0))return;const h=l.globals.markers.largestSize;if(i<-h||i>l.layout.gridWidth+h||s<-h||s>l.layout.gridHeight+h)return;let d=this._batch.sizes.get(c);d||(d=[],this._batch.sizes.set(c,d)),d.push(r.getMarkerPath(i,s,this._batch.opts.shape,c))}flushBatch(t,e){const i=this._batch;if(this._batch=null,!i||i.seriesIndex!==e||!i.sizes.size)return[];const s=this.w,a=new xa(this.w),r=i.opts,o="line"===r.shape||"plus"===r.shape||"cross"===r.shape,n=o?r.pointFillColor:r.pointStrokeColor,l=o?r.pointFillOpacity:r.pointStrokeOpacity,c=[];return i.sizes.forEach((i,o)=>{if(!i.length)return;const h=a.drawPath({d:i.join(" "),fill:r.pointFillColor,fillOpacity:r.pointFillOpacity,stroke:n,strokeOpacity:l,strokeWidth:r.pointStrokeWidth,strokeDashArray:r.pointStrokeDashArray});h.attr({class:"apexcharts-marker-batch"+(Ns.markersAreInert(s)?" no-pointer-events":""),"clip-path":`url(#gridRectMarkerMask${s.globals.cuid})`,shape:r.shape,index:e,"default-marker-size":o}),t.add(h),c.push(h)}),c}getMarkerConfig({cssClass:t,seriesIndex:e,dataPointIndex:i=null,radius:s=null,size:a=null,strokeWidth:r=null}){const o=this.w,n=this.getMarkerStyle(e);let l=null===a?o.globals.markers.size[e]:a;const c=o.config.markers;return null!==i&&c.discrete.length&&c.discrete.map(t=>{t.seriesIndex===e&&t.dataPointIndex===i&&(void 0!==t.strokeColor&&(n.pointStrokeColor=t.strokeColor),void 0!==t.fillColor&&(n.pointFillColor=t.fillColor),void 0!==t.size&&(l=t.size),void 0!==t.shape&&(n.pointShape=t.shape))}),{pSize:null===s?l:s,pRadius:null!==s?s:c.radius,pointStrokeWidth:null!==r?r:Array.isArray(c.strokeWidth)?c.strokeWidth[e]:c.strokeWidth,pointStrokeColor:n.pointStrokeColor,pointFillColor:n.pointFillColor,shape:n.pointShape||(Array.isArray(c.shape)?c.shape[e]:c.shape),class:t,pointStrokeOpacity:Array.isArray(c.strokeOpacity)?c.strokeOpacity[e]:c.strokeOpacity,pointStrokeDashArray:Array.isArray(c.strokeDashArray)?c.strokeDashArray[e]:c.strokeDashArray,pointFillOpacity:Array.isArray(c.fillOpacity)?c.fillOpacity[e]:c.fillOpacity,seriesIndex:e}}setupMarkerDelegation(t){const e=this.w,i=".apexcharts-marker";this._graphics.setupEventDelegation(t,i),t.node.addEventListener("click",s=>{if(e.config.markers.onClick){xa._findDelegateTarget(s.target,t.node,i)&&e.config.markers.onClick(s)}}),t.node.addEventListener("dblclick",s=>{if(e.config.markers.onDblClick){xa._findDelegateTarget(s.target,t.node,i)&&e.config.markers.onDblClick(s)}}),t.node.addEventListener("touchstart",e=>{const s=xa._findDelegateTarget(e.target,t.node,i);s&&s.instance&&this._graphics.pathMouseDown(s.instance,e)},{passive:!0})}getMarkerStyle(t){const e=this.w,i=e.globals.markers.colors,s=e.config.markers.strokeColor||e.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(s)?s[t]:s,pointFillColor:Array.isArray(i)?i[t]:i}}}function zs(t){const e=t=>`<svg viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">${t}</svg>`;switch(t){case"square":case"rect":return e('<rect x="1" y="1" width="10" height="10" rx="1" fill="currentColor"/>');case"line":return e('<rect x="0" y="5" width="12" height="2" rx="1" fill="currentColor"/>');case"diamond":return e('<path d="M6 0.5 L11.5 6 L6 11.5 L0.5 6 Z" fill="currentColor"/>');case"triangle":return e('<path d="M6 1 L11.2 10.5 L0.8 10.5 Z" fill="currentColor"/>');case"cross":return e('<path d="M2 2 L10 10 M10 2 L2 10" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>');case"plus":return e('<path d="M6 1 L6 11 M1 6 L11 6" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>');case"star":return e('<path d="M6 0.5 L7.5 4.4 L11.5 4.7 L8.4 7.2 L9.5 11.1 L6 8.9 L2.5 11.1 L3.6 7.2 L0.5 4.7 L4.5 4.4 Z" fill="currentColor"/>');case"sparkle":return e('<path d="M6 0.5 L7 5 L11.5 6 L7 7 L6 11.5 L5 7 L0.5 6 L5 5 Z" fill="currentColor"/>');default:return e('<circle cx="6" cy="6" r="5" fill="currentColor"/>')}}class Rs{constructor(t){var e;this.w=t.w,this.ttCtx=t,this.ctx=t.ctx,this.tooltipPosition=null!=(e=t.tooltipPosition)?e:new Ls(t),this.enlargedPoints=new Set,this.dirty=!1}drawDynamicPoints(){const t=this.w,e=new xa(this.w),i=new Ns(this.w,this.ctx),s=[...t.dom.baseEl.querySelectorAll(".apexcharts-series")];t.config.chart.stacked&&s.sort((t,e)=>parseFloat(t.getAttribute("data:realIndex"))-parseFloat(e.getAttribute("data:realIndex")));for(let a=0;a<s.length;a++){const r=s[a].querySelector(".apexcharts-series-markers-wrap");if(null!==r){let s=`apexcharts-marker w${(Math.random()+1).toString(36).substring(4)}`;(Ns.markersAreInert(t)||xs.isCanvasMarkerChart(t))&&(s+=" no-pointer-events");const a=i.getMarkerConfig({cssClass:s,seriesIndex:Number(r.getAttribute("data:realIndex"))}),o=e.drawMarker(0,0,a);o.node.setAttribute("default-marker-size",0);const n=v.createElementNS(bt,"g");n.classList.add("apexcharts-series-markers"),n.appendChild(o.node),r.appendChild(n)}}}enlargeCurrentPoint(t,e,i=null,s=null){const a=this.w;let r=a.config.markers.hover.size;"bubble"!==a.config.chart.type&&(r=this.newPointSize(t,e));let o=e.getAttribute("cx"),n=e.getAttribute("cy"),l=this.tooltipPosition.isShortPlot()?this.markExtent(e,n,r):null;if(null!==i&&null!==s&&(o=i,n=s),this.tooltipPosition.moveXCrosshairs(o),!this.ttCtx.fixedTooltip){if("radar"===a.config.chart.type){if(!this.ttCtx.getElGrid())return;const t=xs.plotRect(a);if(o=this.ttCtx.e.clientX-t.left,this.tooltipPosition.isShortPlot()){const e=this.ttCtx.e.clientY-t.top;l={top:e,bottom:e}}}this.tooltipPosition.moveTooltip(o,n,r,l)}}enlargePaintedPoint(t,e,i){var s;const a=this.w;this.resetPointsSize(),this.dirty=!0;const r="bubble"===a.config.chart.type;let o=a.config.markers.hover.size;void 0!==o||r||(o=t.size+a.config.markers.hover.sizeOffset),void 0!==o&&(o=Math.max(0,o));const n=r?t.size:null!=o?o:0,l=r?null:a.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${t.i}'] .apexcharts-series-markers path`);if(l){const e=null!=(s=l.getAttribute("shape"))?s:"circle";l.setAttribute("d",new xa(a).getMarkerPath(t.cx,t.cy,e,o))}this.tooltipPosition.moveXCrosshairs(e),this.ttCtx.fixedTooltip||this.tooltipPosition.moveTooltip(e,i,o,this.tooltipPosition.isShortPlot()?{top:t.cy-n,bottom:t.cy+n}:null)}enlargePoints(t){var e,i;const s=this.w,a=this,r=this.ttCtx,o=t;this.resetEnlargedPoints();const n=s.dom.baseEl.querySelectorAll(`.apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker[rel="${o}"]`);let l=s.config.markers.hover.size,c=null,h=null,d=1/0,p=-1/0;for(let t=0;t<n.length;t++){const r=n[t].getAttribute("index");void 0===l&&(l=s.globals.markers.size[r]+s.config.markers.hover.sizeOffset),a.newPointSize(o,n[t]),c=null!=(e=n[t].getAttribute("cx"))?e:"0",h=null!=(i=n[t].getAttribute("cy"))?i:"0";const u=parseFloat(h);Number.isFinite(u)&&(u<d&&(d=u),u>p&&(p=u))}null!==c&&(a.tooltipPosition.moveXCrosshairs(parseFloat(c)),r.fixedTooltip||a.tooltipPosition.moveTooltip(parseFloat(c),parseFloat(h),l,a.tooltipPosition.isShortPlot()?a.columnMark(o,d,p,l):null))}columnMark(t,e,i,s){const a=Number.isFinite(s)?s:0;let r=Number.isFinite(e)?{top:e-a,bottom:i+a}:null;if(this.w.globals.comboCharts&&this.ttCtx.tooltipUtil.hasBars()){const e=this.tooltipPosition._barsExtentInGrid(t);e&&(r=r?{top:Math.min(r.top,e.top),bottom:Math.max(r.bottom,e.bottom)}:e)}return r}markExtent(t,e,i){var s;const a=this.w;if("radar"===a.config.chart.type)return null;if("bubble"===a.config.chart.type){const e=null==(s=t.getBBox)?void 0:s.call(t);if(e&&e.height>0)return{top:e.y,bottom:e.y+e.height}}const r=parseFloat(String(e)),o=Number.isFinite(i)?i:0;return Number.isFinite(r)?{top:r-o,bottom:r+o}:null}resetEnlargedPoints(){if(0===this.enlargedPoints.size)return;const t=Array.from(this.enlargedPoints);for(let e=0;e<t.length;e++)this.oldPointSize(t[e]);this.enlargedPoints.clear()}newPointSize(t,e){const i=this.w;let s=i.config.markers.hover.size;if("0"!==e.getAttribute("default-marker-size")){const t=parseInt(e.getAttribute("index"),10);void 0===s&&(s=i.globals.markers.size[t]+i.config.markers.hover.sizeOffset),s<0&&(s=0);const a=this.ttCtx.tooltipUtil.getPathFromPoint(e,s);return e.setAttribute("d",a),this.enlargedPoints.add(e),s}}oldPointSize(t){const e=parseFloat(t.getAttribute("default-marker-size")),i=this.ttCtx.tooltipUtil.getPathFromPoint(t,e);t.setAttribute("d",i),this.enlargedPoints.delete(t)}resetPointsSize(){const t=this.w.globals.collapsedSeriesIndices;this.dirty=!1,this.resetEnlargedPoints(),this.ttCtx.tooltipUtil.markerWraps().forEach(([e,...i])=>{t.indexOf(e)<0&&i.forEach(t=>{if(!t)return;const e=parseFloat(t.getAttribute("default-marker-size"));t.setAttribute("d",e>0?this.ttCtx.tooltipUtil.getPathFromPoint(t,e):"M0,0")})})}}class Is{constructor(t){this.w=t.w,this.ttCtx=t,this.tooltipUtil=new xs(t),this.xFormat=new k(this.w),this.dateTime=new C(this.w)}drawSeriesTexts({shared:t=!0,ttItems:e,i:i=0,j:s=null,y1:a,y2:r,e:o}){const n=this.w,l=void 0!==n.config.tooltip.custom,c=this.ttCtx.getElTooltip();l?this.handleCustomTooltip({i:i,j:s,y1:a,y2:r,w:n}):this.toggleActiveInactiveSeries(t,i);const h=this.getValuesToPrint({i:i,j:s});if(this.printLabels({i:i,j:s,values:h,ttItems:e,shared:t,e:o,rows:!l||(null==c?void 0:c.contains(null==e?void 0:e[0]))}),c){const t=c.getBoundingClientRect();this.ttCtx.tooltipRect.ttWidth=t.width,this.ttCtx.tooltipRect.ttHeight=t.height}}printLabels({i:t,j:e,values:i,ttItems:s,shared:a,e:r,rows:o=!0}){const n=this.w,l=this.ttCtx,{xVal:c,zVal:h,xAxisTTVal:d}=i,p=n.seriesData.series.length;if((null==s?void 0:s[0])&&(o&&l.showTooltipTitle&&(null!=l.tooltipTitle||(l.tooltipTitle=n.dom.baseEl.querySelector(".apexcharts-tooltip-title")),l.tooltipTitle&&(l.tooltipTitle.innerHTML=c)),l.isXAxisTooltipEnabled&&l.xaxisTooltipText&&(l.xaxisTooltipText.innerHTML=""!==d?d:c)),!o)return;const u=null!==e&&n.config.plotOptions.bar.distributed?n.globals.colors[e]:n.globals.colors[t],g=1===(null==s?void 0:s.length),x=g?1:p;for(let i=0;i<x;i++){const o=g?0:n.config.tooltip.inverseOrder?p-1-i:i,l=this.computeSeriesRow({i:t,j:e,t:i,tIndex:o,shared:a,e:r,basePColor:u});this.DOMHandling({i:t,t:o,j:e,ttItems:s,values:{val:l.val,goalVals:l.goalVals,zVal:h},seriesName:l.seriesName,shared:a,pColor:l.pColor})}}computeSeriesRow({i:t,j:e,tIndex:i,shared:s,e:a,basePColor:r}){const o=this.w,n=o.globals.axisCharts&&s?i:t,h=this.getFormatters(n);let d,p=r,u=[];const g=this.getSeriesName({fn:h.yLbTitleFormatter,index:n,seriesIndex:t,j:e,leaf:"treemap"===o.config.chart.type?String(o.config.series[t].data[e].x):null});return o.globals.axisCharts&&(s?(p=o.globals.colors[i],d=this.formatYValue(h,i,e),u=this.formatGoalVals(h,i,e)):(p=this.resolvePatternColor(a,p,t),d=this.formatYValue(h,t,e),u=this.formatGoalVals(h,t,e))),null===e&&(d=h.yLbFormatter(o.seriesData.series[t],c(l({},o),{w:o,series:o.seriesData.series,seriesIndex:t,dataPointIndex:t}))),{seriesName:g,val:d,goalVals:u,pColor:p}}formatYValue(t,e,i){var s,a,r,o;const n=this.w,l=n.waterfallData&&n.waterfallData.values;return l&&l[e]&&null!=l[e][i]?t.yLbFormatter(l[e][i],{series:l,seriesIndex:e,dataPointIndex:i,w:n}):this.isRangeSeries(e)?t.yLbFormatter(null==(a=null==(s=n.rangeData.seriesRangeStart)?void 0:s[e])?void 0:a[i],{series:n.rangeData.seriesRangeStart,seriesIndex:e,dataPointIndex:i,w:n})+" - "+t.yLbFormatter(null==(o=null==(r=n.rangeData.seriesRangeEnd)?void 0:r[e])?void 0:o[i],{series:n.rangeData.seriesRangeEnd,seriesIndex:e,dataPointIndex:i,w:n}):t.yLbFormatter(n.seriesData.series[e][i],{series:n.seriesData.series,seriesIndex:e,dataPointIndex:i,w:n})}isRangeSeries(t){var e;const i=this.w,s=(null==(e=i.config.series[t])?void 0:e.type)||i.config.chart.type;return i.axisFlags.isRangeData&&(rt(s)||/^range/.test(F[s]||s))}formatGoalVals(t,e,i){var s;const a=this.w,r=null==(s=a.seriesData.seriesGoals[e])?void 0:s[i];return Array.isArray(r)?r.map(s=>({attrs:s,val:t.yLbFormatter(s.value,{seriesIndex:e,dataPointIndex:i,w:a})})):[]}resolvePatternColor(t,e,i){var s,a,r;const o=this.w,n=xs.hoverTarget(t);if((null==(s=null==n?void 0:n.getAttribute)?void 0:s.call(n,"index"))!==String(i))return e;const l=n.getAttribute("fill");if(!l||"none"===l||"transparent"===l)return e;if(-1===l.indexOf("url"))return l;if(-1===l.indexOf("Pattern"))return e;const c=o.dom.baseEl.querySelector(l.substr(4).slice(0,-1));return null!=(r=null==(a=null==c?void 0:c.childNodes[0])?void 0:a.getAttribute("stroke"))?r:e}getFormatters(t){const e=this.w;let i,s=e.formatters.yLabelFormatters[t];return void 0!==e.formatters.ttVal?Array.isArray(e.formatters.ttVal)?(s=e.formatters.ttVal[t]&&e.formatters.ttVal[t].formatter,i=e.formatters.ttVal[t]&&e.formatters.ttVal[t].title&&e.formatters.ttVal[t].title.formatter):(s=e.formatters.ttVal.formatter,"function"==typeof e.formatters.ttVal.title.formatter&&(i=e.formatters.ttVal.title.formatter)):i=e.config.tooltip.y.title.formatter,"function"!=typeof s&&(s=e.formatters.yLabelFormatters[0]?e.formatters.yLabelFormatters[0]:function(t){return t}),"function"!=typeof i&&(i=function(t){return t?t+": ":""}),{yLbFormatter:s,yLbTitleFormatter:i}}getSeriesName({fn:t,index:e,seriesIndex:i,j:s,leaf:a}){const r=this.w,o=t(null!=a?a:String(r.seriesData.seriesNames[e]),{series:r.seriesData.series,seriesIndex:i,dataPointIndex:s,w:r});return a&&o===a+": "?a.replace(/</g,"<")+": ":o}rowRefs(t){return t.ttRefs||(t.ttRefs={marker:t.querySelector(".apexcharts-tooltip-marker"),text:t.querySelector(".apexcharts-tooltip-text"),yLabel:t.querySelector(".apexcharts-tooltip-text-y-label"),yValue:t.querySelector(".apexcharts-tooltip-text-y-value"),goalsLabel:t.querySelector(".apexcharts-tooltip-text-goals-label"),goalsValue:t.querySelector(".apexcharts-tooltip-text-goals-value"),zLabel:t.querySelector(".apexcharts-tooltip-text-z-label"),zValue:t.querySelector(".apexcharts-tooltip-text-z-value")}),t.ttRefs}DOMHandling({i:t,t:e,j:i,ttItems:s,values:a,seriesName:r,shared:o,pColor:n}){var l,c,h;const d=this.w,p=this.ttCtx,{val:u,goalVals:g,zVal:x}=a;if(!s||!s[e])return;const f=this.rowRefs(s[e]),m=o?e:t;let b=null;b=s[e].children,d.config.tooltip.fillSeriesColor&&(s[e].style.backgroundColor=n,b[0].style.display="none");const y=f.yLabel;y&&(y.innerHTML=r||"");const v=f.yValue;if(v&&(v.innerHTML=void 0!==u?u:""),b[0]&&b[0].classList.contains("apexcharts-tooltip-marker")){d.config.tooltip.marker.fillColors&&Array.isArray(d.config.tooltip.marker.fillColors)&&(n=d.config.tooltip.marker.fillColors[m]),d.config.tooltip.fillSeriesColor?b[0].style.backgroundColor=n:b[0].style.color=n;const t=d.config.markers.shape;Array.isArray(t)&&f.shape!==t[m]&&(f.shape=t[m],b[0].setAttribute("shape",f.shape),b[0].innerHTML=zs(f.shape))}d.config.tooltip.marker.show||(b[0].style.display="none");const w=p.ctx.highlightFilter;w&&w.tooltipRow(f,m,i,this.getFormatters(m));const A=f.goalsLabel,S=f.goalsValue;if(g.length&&d.seriesData.seriesGoals[m]){const t=()=>{let t="<div>",e="<div>";g.forEach(i=>{t+=` <div style="display: flex"><span class="apexcharts-tooltip-marker" style="background-color: ${i.attrs.strokeColor}; height: 3px; border-radius: 0; top: 5px;"></span> ${i.attrs.name}</div>`,e+=`<div>${i.val}</div>`}),A.innerHTML=t+"</div>",S.innerHTML=e+"</div>"};o?d.seriesData.seriesGoals[e][i]&&Array.isArray(d.seriesData.seriesGoals[e][i])?t():(A.innerHTML="",S.innerHTML=""):t()}else A.innerHTML="",S.innerHTML="";if(null!==x){f.zLabel.innerHTML=d.config.tooltip.z.title;f.zValue.innerHTML=void 0!==x?x:""}if(o&&b[0]){if(d.config.tooltip.hideEmptySeries){const t=d.rangeData,s=this.isRangeSeries(e)?!(null==(l=t.seriesRangeStart[e])?void 0:l[i])&&!(null==(c=t.seriesRangeEnd[e])?void 0:c[i]):0===(null==(h=d.seriesData.series[e])?void 0:h[i]);f.text.style.display=s?"none":"",f.marker.style.display=s||!d.config.tooltip.marker.show||d.config.tooltip.fillSeriesColor?"none":""}null==u||d.globals.ancillaryCollapsedSeriesIndices.indexOf(e)>-1||d.globals.collapsedSeriesIndices.indexOf(e)>-1||Array.isArray(p.tConfig.enabledOnSeries)&&-1===p.tConfig.enabledOnSeries.indexOf(e)?b[0].parentNode.style.display="none":b[0].parentNode.style.display=d.config.tooltip.items.display}else Array.isArray(p.tConfig.enabledOnSeries)&&-1===p.tConfig.enabledOnSeries.indexOf(m)&&(b[0].parentNode.style.display="none")}toggleActiveInactiveSeries(t,e){const i=this.w;if(t)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");const t=this.ttCtx.ttItems,s=null==t?void 0:t[1===t.length?0:e];if(s){const t=s;t.classList.add("apexcharts-active"),t.style.display=i.config.tooltip.items.display}}}getValuesToPrint({i:t,j:e}){var i,s,a,r,o,n,l,c,h,d;const p=this.w,u=p.seriesData.seriesX;let g="",x="",f=null,m=null;const b={series:p.seriesData.series,seriesIndex:t,dataPointIndex:e,w:p},y=p.formatters.ttZFormatter;if(null===e)m=p.seriesData.series[t];else if(p.axisFlags.isXNumeric&&"treemap"!==p.config.chart.type){if(g=u[t][e],0===u[t].length){g=u[this.tooltipUtil.getFirstActiveXArray(u)][e]}}else{const i=this.ttCtx.allTooltipSeriesGroups;if(this._xyGen!==i&&(this._xyGen=i,this._isXY=new ls(this.w).isFormatXY()),this._isXY){const i=p.config.series[t].data[e];g=null==i?"":i.x}else g=void 0!==p.labelData.labels[e]?p.labelData.labels[e]:""}const v=g;return g=p.axisFlags.isXNumeric&&"datetime"===p.config.xaxis.type?this.xFormat.xLabelFormat(p.formatters.ttKeyFormatter,v,v,{i:void 0,dateFormatter:this.dateTime.formatDate,w:this.w}):p.globals.isBarHorizontal?p.formatters.yLabelFormatters[0](v,b):null!=(a=null==(s=(i=p.formatters).xLabelFormatter)?void 0:s.call(i,v,b))?a:v,void 0!==p.config.tooltip.x.formatter&&(g=null!=(n=null==(o=(r=p.formatters).ttKeyFormatter)?void 0:o.call(r,v,b))?n:v),p.axisFlags.isDataXYZ&&p.seriesData.seriesZ.length>0&&(null==(l=p.seriesData.seriesZ[t])?void 0:l.length)>0&&(f=null==y?void 0:y(null!=(c=p.seriesData.seriesZ[t][e])?c:null,p)),x="function"==typeof p.config.xaxis.tooltip.formatter?null==(d=(h=p.formatters).xaxisTooltipFormatter)?void 0:d.call(h,v,b):g,{val:Array.isArray(m)?m.join(" "):m,xVal:Array.isArray(g)?g.join(" "):g,xAxisTTVal:Array.isArray(x)?x.join(" "):x,zVal:f}}handleCustomTooltip({i:t,j:e,y1:i,y2:s,w:a}){const r=this.ttCtx.getElTooltip();let o=a.config.tooltip.custom;if(Array.isArray(o)&&(o=o[t]),"function"!=typeof o)return;const n=o({ctx:this.ttCtx.ctx,series:a.seriesData.series,seriesIndex:t,dataPointIndex:e,y1:i,y2:s,w:a});if(r){const t=r.querySelector(".apexcharts-tooltip-arrow");"string"==typeof n||"number"==typeof n?r.innerHTML=String(n):null!=n&&(n instanceof Element||"string"==typeof n.nodeName)&&(r.innerHTML="",r.appendChild(n.cloneNode(!0))),t&&r.appendChild(t)}}}class Os{constructor(t){this.w=t.w,this.ttCtx=t,this.hotCell=null}hoverCell(t,e=-1,i=-1){const s=this.w,a=this.hotCell;if(a&&a[0]===e&&a[1]===i)return;const r=this.ttCtx.ctx,o=(e,i)=>{var a,o;const n={seriesIndex:i[0],dataPointIndex:i[1],w:s};null==(o=null==(a=s.config.chart.events)?void 0:a[e])||o.call(a,t,r,n),xa._fireEvent(s,e,[t,r,n])};a&&o("dataPointMouseLeave",a),this.hotCell=e<0?null:[e,i],this.hotCell&&o("dataPointMouseEnter",this.hotCell)}getAttr(t,e){var i;return parseFloat(null!=(i=xs.hoverTarget(t).getAttribute(e))?i:"")}handleHeatTreeTooltip({e:t,opt:e,x:i,y:s,type:a}){const r=this.ttCtx,o=this.w,n=o.globals.activeRenderer,l="heatmap"===a&&n&&"canvas"===n.kind&&"function"==typeof n.hitTest,c=xs.hoverTarget(t);let h,d,p,u,g,x;if(l){const a=xs.plotRect(o),r=xs.eventPointer(t,e),l=n.hitTest((r.x-a.left)/a.zoom,(r.y-a.top)/a.zoom);if(!l)return{x:i,y:s,noHit:!0};h=l.seriesIndex,d=l.dataPointIndex,this.hoverCell(t,h,d),p=l.x,u=l.y,g=l.width,x=l.height}else{if(!c.classList.contains(`apexcharts-${a}-rect`))return{x:i,y:s};h=this.getAttr(t,"i"),d=this.getAttr(t,"j"),p=this.getAttr(t,"cx"),u=this.getAttr(t,"cy"),g=this.getAttr(t,"width"),x=this.getAttr(t,"height")}r.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:h,j:d,shared:!1,e:t}),o.interact.capturedSeriesIndex=h,o.interact.capturedDataPointIndex=d,r.tooltipPosition.moveXCrosshairs(p+g/2);const f=r.getElTooltip();if("heatmap"===a&&o.config.tooltip.arrow&&!xs.isFollowCursor(o)&&f){const t=xs.plotRect(o),e=o.dom.elWrap.getBoundingClientRect(),i=t.left-e.left,s=t.top-e.top;let a,n,m,b,y=null;if(l)a=p,n=u,m=p+g,b=u+x;else{const e=o.dom.baseEl.contains(c)?c:o.dom.baseEl.querySelector(`.apexcharts-heatmap-rect[i='${h}'][j='${d}']`)||c;y=e;const i=e.getBoundingClientRect();a=i.left-t.left,n=i.top-t.top,m=i.right-t.left,b=i.bottom-t.top}const v=(a+m)/2+i,w=n+s,A=b+s,S=s,C=s+o.layout.gridHeight,k=i,M=i+o.layout.gridWidth,T=r.tooltipPosition.placeOnShortPlot(v,w,A);if(T)return r.tooltipPosition.applyTooltipPosition(f,T),{x:T.x,y:T.y,positioned:!0};const _=r.tooltipPosition.placeAroundCell({top:w,bottom:A,left:a+i,right:m+i},{top:S,bottom:C,left:k,right:M},{el:y});return r.tooltipPosition.applyTooltipPosition(f,_),{x:_.x,y:_.y,positioned:!0}}const m=r.tooltipRect.ttWidth||0,b=r.tooltipRect.ttHeight||0,y=o.dom.elWrap.getBoundingClientRect(),{left:v,top:w}=xs.plotInWrap(o),A=v+o.layout.gridWidth,S=w+o.layout.gridHeight;let C=p+g+m/2;const k=u+x/2-b/2;C>o.layout.gridWidth/2&&(C=p+g-m/2),i=v+C,s=w+k;const M=xs.isFollowCursor(o),T=xs.eventPointer(t,e);M&&(i=T.x-y.left-(C>o.layout.gridWidth/2?m:0),s=T.y-y.top-(k>o.layout.gridHeight/2?b:0));let _=null;if(M){const t=T.y-y.top;_=r.tooltipPosition.placeOnShortPlot(T.x-y.left,t,t,{gapBelow:24})}else _=r.tooltipPosition.placeOnShortPlot(v+p+g/2,w+u,w+u+x);return _?{x:_.x,y:_.y,placement:_.placement,arrowX:_.arrowX}:(i+m>A&&(i=A-m),i<v&&(i=v),s+b>S&&(s=S-b),s<w&&(s=w),{x:i,y:s})}handleMarkerTooltip({e:t,opt:e,x:i,y:s}){const a=this.w,r=this.ttCtx;let o,n;if(xs.hoverTarget(t).classList.contains("apexcharts-marker")){const l=parseInt(e.paths.getAttribute("cx"),10),c=parseInt(e.paths.getAttribute("cy"),10);n=parseInt(e.paths.getAttribute("rel"),10);const h=S.findAncestor(e.paths,"apexcharts-series");o=h?parseInt(h.getAttribute("data:realIndex"),10):parseInt(e.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,r.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:o,j:n,shared:!r.showOnIntersect&&a.config.tooltip.shared,e:t}),"mouseup"===t.type&&r.markerClick(t,o,n),a.interact.capturedSeriesIndex=o,a.interact.capturedDataPointIndex=n,i=l,s=c,r.marker.enlargeCurrentPoint(n,e.paths,i,s)}return{x:i,y:s}}getPaintedMarker(t,e){const i=this.w;if(!xs.isCanvasMarkerChart(i)||(null==t?void 0:t.apexPaintedHit))return null;const s=xs.plotRect(i),a=xs.eventPointer(t,e),r=i.globals.activeRenderer.hitTestMarker((a.x-s.left)/s.zoom,(a.y-s.top)/s.zoom);return r?{i:r.seriesIndex,j:r.dataPointIndex,cx:r.x,cy:r.y,size:r.size}:null}handlePaintedMarkerTooltip({e:t,opt:e,marker:i}){var s;const a=this.w,r=this.ttCtx,{i:o,j:n}=i;Array.isArray(r.tConfig.enabledOnSeries)&&r.tConfig.enabledOnSeries.indexOf(o)<0?this.leavePaintedMark(t,e):(null==(s=r.cancelOffMarkHide)||s.call(r),r.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:o,j:n,shared:!1,e:t}),"mouseup"===t.type&&r.markerClick(t,o,n),a.interact.capturedSeriesIndex=o,a.interact.capturedDataPointIndex=n,r.marker.enlargePaintedPoint(i,Math.trunc(i.cx),Math.trunc(i.cy)))}leavePaintedMark(t,e){const i=this.w,s=this.ttCtx,a=s.getElTooltip();if(s.tConfig.interactive&&(null==a?void 0:a.classList.contains("apexcharts-active"))){if(void 0===s.offMarkHideTimeout){const a=xs.eventPointer(t,e);s.offMarkHideTimeout=setTimeout(()=>{s.offMarkHideTimeout=void 0,i.globals.isDestroyed||s.handleMouseOut(e)},s.interactiveHideDelay(a.x,a.y))}}else s.handleMouseOut(e)}handleBarTooltip({e:t,opt:e}){var i,s,a;const r=this.w,o=this.ttCtx,n=o.getElTooltip();let l=0,c=0,h=0,d=0;const p=this.getBarTooltipXY({e:t,opt:e});if(p.noHit)return void this.leavePaintedMark(t,e);if(null==(i=o.cancelOffMarkHide)||i.call(o),null===p.j&&0===p.barHeight&&0===p.barWidth)return;d=p.i;const u=p.j;if(p.byHitTest&&Array.isArray(o.tConfig.enabledOnSeries)&&!r.config.tooltip.shared&&o.tConfig.enabledOnSeries.indexOf(d)<0)o.handleMouseOut(e);else{if(r.interact.capturedSeriesIndex=d,r.interact.capturedDataPointIndex=null!==u?u:r.interact.capturedDataPointIndex,(r.globals.isBarHorizontal&&o.tooltipUtil.hasBars()||!r.config.tooltip.shared)&&(c=p.x,h=p.y,l=c),isNaN(h)&&(h=r.globals.svgHeight-o.tooltipRect.ttHeight),c+o.tooltipRect.ttWidth>r.layout.gridWidth?c-=o.tooltipRect.ttWidth:c<0&&(c=0),xs.isFollowCursor(r)){if(!o.getElGrid())return}if(!r.config.tooltip.shared){const t=r.globals.isBarHorizontal||null===p.barAnchorXInGrid?l:p.barAnchorXInGrid/xs.plotRect(r).zoom;o.tooltipPosition.moveXCrosshairs(t)}if(!o.fixedTooltip&&(!r.config.tooltip.shared||r.globals.isBarHorizontal&&o.tooltipUtil.hasBars())&&n){const t=o.tooltipRect.ttWidth||0,e=o.tooltipRect.ttHeight||0,i=!!r.config.tooltip.arrow,{barAnchorXInGrid:g,barAnchorYInGrid:x,barRectInGrid:f}=p,{left:m,top:b}=xs.plotInWrap(r),y={top:b,bottom:b+r.layout.gridHeight,left:m,right:m+r.layout.gridWidth};let v,w=null,A=null,S=c+m,C=h+b-e/2;const k=f&&{top:f.top+b,bottom:f.bottom+b,left:f.left+m,right:f.right+m};if(i&&r.globals.isBarHorizontal&&k){const t=o.tooltipPosition.placeAroundBar(k,y,null!=u?u:0,d);v=t.placement,S=t.x,C=t.y,A=t.arrowX,w=t.arrowY}else if(i&&null!=g&&null!=x){const i=g+m,n=m+r.layout.gridWidth/2,l=(null!=(s=null==f?void 0:f.left)?s:g)+m,c=(null!=(a=null==f?void 0:f.right)?a:g)+m+7,h=l-t-7,d=i<n-.5?["right","left"]:["left","right"],p=this._fitsBesideColumn(t),u=d.find(t=>p("right"===t?c:h));if(u||!k){if(v=null!=u?u:d[0],S="right"===v?c:h,k){const t=(k.top+k.bottom)/2;C=t-e/2,C<y.top&&(C=y.top),C+e>y.bottom&&(C=y.bottom-e),e>0&&(w=Math.max(10,Math.min(e-10,t-C)))}}else{const t=o.tooltipPosition.placeOverColumn(k,y);v=t.placement,S=t.x,C=t.y,A=t.arrowX,w=t.arrowY}}const M=f?(f.left+f.right)/2:null!=g?g:l,T=o.tooltipPosition.shortPlotPlacement,_=o.tooltipPosition.placeOnShortPlot(M+m,k?k.top:y.top,k?k.bottom:y.bottom);!_&&void 0===v&&T&&delete n.dataset.placement,o.tooltipPosition.applyTooltipPosition(n,_||{x:S,y:C,placement:v,arrowY:w,arrowX:A})}}}_fitsBesideColumn(t){const e=this.w.dom.elWrap.getBoundingClientRect(),i=e.width>0?e.width:1/0;let s;return e=>{var a,r,o;return!(e<0||e+t>i)&&(void 0===s&&(s=null!=(o=null==(r=(a=this.ttCtx.tooltipPosition).getVisibleRoom)?void 0:r.call(a))?o:null),!s||e>=s.left&&e+t<=s.right)}}getBarTooltipXY({e:t,opt:e}){const i=this.w;let s=null;const a=this.ttCtx;let r=0,o=0,n=0,l=0,c=0,h=null,d=null,p=null,u=null,g=null;const x=xs.hoverTarget(t),f=x.classList,m=xs.isCanvasBarChart(i)?this.getPaintedMark(t,e):this.getViolinMark(t,e),b=!!(null==m?void 0:m.noHit);if(m&&!b||f.contains("apexcharts-bar-area")||f.contains("apexcharts-candlestick-area")||f.contains("apexcharts-boxPlot-area")||f.contains("apexcharts-rangebar-area")){const f=x,b=m?m.rect:f.getBoundingClientRect(),y=xs.plotRect(i),v=b.height;c=b.height;const w=b.width,A=m?m.cx:parseInt(f.getAttribute("cx"),10),S=m?m.cy:parseInt(f.getAttribute("cy"),10);h=A,d=S,l=m?m.barWidth:parseFloat(f.getAttribute("barWidth"));const C=b.left-y.left,k=b.top-y.top,M=k+v/2;p=C+w/2,u=i.globals.isBarHorizontal?M:k,g={left:C,top:k,right:C+w,bottom:k+v};const T="touchmove"===t.type?t.touches[0].clientX:t.clientX;s=m?m.j:parseInt(f.getAttribute("j"),10),r=m?m.i:parseInt(f.parentNode.getAttribute("rel"),10)-1;const _=m?m.y1:f.getAttribute("data-range-y1"),D=m?m.y2:f.getAttribute("data-range-y2");i.globals.comboCharts&&!m&&(r=parseInt(f.parentNode.getAttribute("data:realIndex"),10));const F=t=>i.axisFlags.isXNumeric?A-w/2:!i.globals.isBarHorizontal&&"rangeBar"===i.config.chart.type&&i.config.plotOptions.bar.rangeBarGroupRows?A+w/2:A-a.dataPointsDividedWidth+w/2,L=()=>S-a.dataPointsDividedHeight+v/2-a.tooltipRect.ttHeight/2;a.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:r,j:s,y1:null!=_?parseFloat(_):null,y2:null!=D?parseFloat(D):null,shared:!a.showOnIntersect&&i.config.tooltip.shared,e:t}),xs.isFollowCursor(i)?i.globals.isBarHorizontal?(o=T-y.left+15,n=L()):(o=F(o),n=t.clientY-y.top-a.tooltipRect.ttHeight/2-15):i.globals.isBarHorizontal?(o=A,a.xyRatios&&o<a.xyRatios.baseLineInvertedY&&(o=A-a.tooltipRect.ttWidth),n=L()):(o=F(o),n=S)}return{x:o,y:n,barHeight:c,barWidth:l,i:r,j:s,barCx:h,barCy:d,barAnchorXInGrid:p,barAnchorYInGrid:u,barRectInGrid:g,noHit:b,byHitTest:!!(null==m?void 0:m.byHitTest)&&!(null==t?void 0:t.apexPaintedHit)}}getPaintedMark(t,e){var i,s,a,r;const o=this.w,n=this._paintedHit(t,e),l=null==n?void 0:n.hit,c=l?null==(s=null==(i=o.globals.barCanvasCoords)?void 0:i[l.seriesIndex])?void 0:s[l.dataPointIndex]:null;if(!n||!l||!c)return{noHit:!0};const h=l.seriesIndex,d=l.dataPointIndex;if("violin"===c.type)return this._violinMark(h,d,null,c)||{noHit:!0};const p=c.bounds,u=null!=l.width?l:p&&{x:p.left,y:p.top,width:p.right-p.left,height:p.bottom-p.top};if(!u)return{noHit:!0};const{plot:g}=n,x=g.left+u.x*g.zoom,f=g.top+u.y*g.zoom,m=u.width*g.zoom,b=u.height*g.zoom,y=t=>parseInt(String(t),10);return{i:h,j:d,rect:{left:x,top:f,right:x+m,bottom:f+b,width:m,height:b},cx:y(c.cx),cy:y(c.cy),barWidth:c.barWidth,y1:null!=(a=c.rangeY1)?a:null,y2:null!=(r=c.rangeY2)?r:null,byHitTest:!0}}_paintedHit(t,e){const i=this.w,s=i.globals.activeRenderer;if(!s||"function"!=typeof s.hitTest)return null;const a=xs.plotRect(i);if(null==t?void 0:t.apexPaintedHit)return{hit:t.apexPaintedHit,plot:a};const r=xs.eventPointer(t,e);return{hit:s.hitTest((r.x-a.left)/a.zoom,(r.y-a.top)/a.zoom),plot:a}}getViolinMark(t,e){var i,s,a,r;const o=this.w;if(xs.isCanvasViolinChart(o)){const r=null==(i=this._paintedHit(t,e))?void 0:i.hit,n=r?null==(a=null==(s=o.globals.barCanvasCoords)?void 0:s[r.seriesIndex])?void 0:a[r.dataPointIndex]:null;return n?"violin"!==n.type?null:this._violinMark(r.seriesIndex,r.dataPointIndex,null,n):{noHit:!0}}const n=xs.hoverTarget(t);if(!(null==(r=null==n?void 0:n.classList)?void 0:r.contains("apexcharts-violin-area")))return null;const l=n.parentNode;return this._violinMark(parseInt(l.getAttribute("data:realIndex"),10),parseInt(n.getAttribute("j"),10),l,null)}_violinMark(t,e,i,s){var a;const r=this.violinGlyphRect(t,e,i);if(!r)return null;const o=s?null:null==i?void 0:i.querySelector(`.apexcharts-violin-area[j='${e}']`),n=t=>{var e;return s?s[t]:parseFloat(null!=(e=null==o?void 0:o.getAttribute(t))?e:"")};return{i:t,j:e,rect:c(l({},r),{width:r.right-r.left,height:r.bottom-r.top}),cx:null!=(a=null==s?void 0:s.bodyCx)?a:n("cx"),cy:n("cy"),barWidth:n("barWidth"),y1:null,y2:null,byHitTest:!!s}}violinGlyphRect(t,e,i=null){var s,a,r;const o=this.w;let n=1/0,l=1/0,c=-1/0,h=-1/0;const d=(t,e,i,s)=>{n=Math.min(n,t),l=Math.min(l,e),c=Math.max(c,i),h=Math.max(h,s)},p=xs.isCanvasViolinChart(o)?null==(r=null==(a=null==(s=o.globals.barCanvasCoords)?void 0:s[t])?void 0:a[e])?void 0:r.bounds:null;if(p){const t=xs.plotRect(o);d(t.left+p.left*t.zoom,t.top+p.top*t.zoom,t.left+p.right*t.zoom,t.top+p.bottom*t.zoom)}const u=i||o.dom.baseEl.querySelector(`.apexcharts-violin-series .apexcharts-series[data\\:realIndex='${t}']`),g=u?u.querySelectorAll(`.apexcharts-violin-area[j='${e}'], .apexcharts-violin-points[j='${e}']`):[];for(let t=0;t<g.length;t++){const e=g[t].getBoundingClientRect();0===e.width&&0===e.height||d(e.left,e.top,e.right,e.bottom)}return isFinite(n)?{left:n,top:l,right:c,bottom:h}:null}}class Xs{constructor(t){this.w=t.w,this.ttCtx=t}drawXaxisTooltip(){const t=this.w,e=this.ttCtx,i="bottom"===t.config.xaxis.position;e.xaxisOffY=i?t.layout.gridHeight+1:-t.layout.xAxisHeight-t.config.xaxis.axisTicks.height+3;const s=i?"apexcharts-xaxistooltip apexcharts-xaxistooltip-bottom":"apexcharts-xaxistooltip apexcharts-xaxistooltip-top",a=t.dom.elWrap;if(e.isXAxisTooltipEnabled){null===t.dom.baseEl.querySelector(".apexcharts-xaxistooltip")&&(e.xaxisTooltip=v.createElementNS("http://www.w3.org/1999/xhtml","div"),e.xaxisTooltip.setAttribute("class",s+" apexcharts-theme-"+t.config.tooltip.theme),a.appendChild(e.xaxisTooltip),e.xaxisTooltipText=v.createElementNS("http://www.w3.org/1999/xhtml","div"),e.xaxisTooltipText.classList.add("apexcharts-xaxistooltip-text"),e.xaxisTooltipText.style.fontFamily=t.config.xaxis.tooltip.style.fontFamily||t.config.chart.fontFamily,e.xaxisTooltipText.style.fontSize=t.config.xaxis.tooltip.style.fontSize,e.xaxisTooltip.appendChild(e.xaxisTooltipText))}}drawYaxisTooltip(){const t=this.w,e=this.ttCtx;for(let i=0;i<t.config.yaxis.length;i++){if(!e.yaxisTooltips[i])continue;const s=t.config.yaxis[i].opposite||t.config.yaxis[i].crosshairs.opposite;e.yaxisOffX=s?t.layout.gridWidth+1:1;const a=s?`apexcharts-yaxistooltip apexcharts-yaxistooltip-${i} apexcharts-yaxistooltip-right`:`apexcharts-yaxistooltip apexcharts-yaxistooltip-${i} apexcharts-yaxistooltip-left`,r=t.dom.elWrap;null===t.dom.baseEl.querySelector(`.apexcharts-yaxistooltip.apexcharts-yaxistooltip-${i}`)&&(e.yaxisTooltip=v.createElementNS("http://www.w3.org/1999/xhtml","div"),e.yaxisTooltip.setAttribute("class",a+" apexcharts-theme-"+t.config.tooltip.theme),r.appendChild(e.yaxisTooltip),(e.yaxisTooltipText||(e.yaxisTooltipText=[]))[i]=v.createElementNS("http://www.w3.org/1999/xhtml","div"),e.yaxisTooltipText[i].classList.add("apexcharts-yaxistooltip-text"),e.yaxisTooltip.appendChild(e.yaxisTooltipText[i]))}}setXCrosshairWidth(){var t;const e=this.w,i=this.ttCtx,s=i.getElXCrosshairs(),a=e.config.xaxis.crosshairs.width;let r=parseInt(a,10);if("tickWidth"===a)r=e.layout.gridWidth/e.labelData.labels.length;else if("barWidth"===a){const i=e.dom.baseEl.querySelector(".apexcharts-bar-area");r=i?parseFloat(null!=(t=i.getAttribute("barWidth"))?t:"0"):1}i.xcrosshairsWidth=Number.isFinite(r)?r:1,e.globals.isBarHorizontal&&(i.xcrosshairsWidth=0),null!==s&&i.xcrosshairsWidth>0&&s.setAttribute("width",String(i.xcrosshairsWidth))}handleYCrosshair(){const t=this.w,e=this.ttCtx;e.ycrosshairs=t.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),e.ycrosshairsHidden=t.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}drawYaxisTooltipText(t,e){const i=this.ttCtx,s=this.w,a=s.globals,r=a.seriesYAxisMap[t];if(i.yaxisTooltips[t]&&r.length>0){const o=s.formatters.yLabelFormatters[t];if(!i.getElGrid())return;const n=xs.plotRect(s),l=r[0],c=s.config.yaxis[t],h=a.minYArr[l],d=a.maxYArr[l],p=(e-n.top)/n.zoom,u=c.reversed?p/s.layout.gridHeight:1-p/s.layout.gridHeight;let g=h+u*(d-h);if(c.logarithmic){const t=c.logBase,e=0===h?-1:Math.log(h)/Math.log(t),i=0===d?0:Math.log(d)/Math.log(t);g=Math.pow(t,e+u*(i-e))}i.tooltipPosition.moveYCrosshairs(p),i.yaxisTooltipText[t].innerHTML=o(g),i.tooltipPosition.moveYAxisTooltip(t)}}}class Hs{constructor(t,e){this.w=t,this.ctx=e,this.tooltipUtil=new xs(this),this.tooltipLabels=new Is(this),this.tooltipPosition=new Ls(this),this.marker=new Rs(this),this.intersect=new Os(this),this.axesTooltip=new Xs(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.tooltipHidden=!1,this.xaxisTooltip=null,this.xaxisTooltipText=null,this.yaxisTooltip=null,this.yaxisTooltipText=null,this.yaxisTTEls=null,this.hoverBars=[],this.xaxisOffY=0,this.yaxisOffX=0,this.xcrosshairsWidth=0,this.ycrosshairs=null,this.ycrosshairsHidden=null,this.e=null,this.isBarShared=!t.globals.isBarHorizontal&&this.tConfig.shared,this.lastHoverTime=Date.now(),this.xyRatios=null,this.isXAxisTooltipEnabled=!1,this.yaxisTooltips=[],this.allTooltipSeriesGroups=[],this.xAxisTicksPositions=null,this.dataPointsDividedHeight=0,this.dataPointsDividedWidth=0,this.tooltipTitle=null,this._elTooltipCache=null,this._elXCrosshairsCache=null,this._elGridCache=null,this.legendLabels=null,this.ttItems=null,this.hoverAreaListeners=[],this.seriesHoverTimeout=void 0,this.interactiveHideTimeout=void 0,this.offMarkHideTimeout=void 0,this.clientX=0,this.clientY=0,this.tooltipRect={x:0,y:0,ttWidth:0,ttHeight:0}}get tConfig(){return this.w.config.tooltip}getCachedDimensions(){const t=this.w.globals.dimensionCache,e=this.getElTooltip();let i=t.tooltip;if(e&&!(Date.now()-(null==i?void 0:i.lastUpdate)<1e3)){const s=e.getBoundingClientRect();i=t.tooltip={width:s.width,height:s.height,lastUpdate:Date.now()}}return{ttWidth:(null==i?void 0:i.width)||0,ttHeight:(null==i?void 0:i.height)||0}}_resolveEl(t,e,i){var s,a;const r=null==(a=null==(s=t.w)?void 0:s.dom)?void 0:a.baseEl;if(!r)return null;const o=t[e];if(o&&r.contains(o))return o;const n=r.querySelector(i);return t[e]=n,n}getElTooltip(t){return t||(t=this),this._resolveEl(t,"_elTooltipCache",".apexcharts-tooltip:not(.apexcharts-annotation-tooltip)")}getElXCrosshairs(){return this._resolveEl(this,"_elXCrosshairsCache",".apexcharts-xcrosshairs")}getYaxisTTEls(){const t=this.w;return this.yaxisTTEls||(this.yaxisTTEls=t.config.yaxis.map((e,i)=>t.dom.baseEl.querySelector(`.apexcharts-yaxistooltip-${i}`)))}getElGrid(){return this._resolveEl(this,"_elGridCache",".apexcharts-grid")}drawTooltip(t){var e,i,s;const a=this.w;this.xyRatios=t,this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.isBarShared=!a.globals.isBarHorizontal&&this.tConfig.shared,this.isXAxisTooltipEnabled=a.config.xaxis.tooltip.enabled&&a.globals.axisCharts,this.yaxisTooltips=a.config.yaxis.map(t=>!!(t.show&&t.tooltip.enabled&&a.globals.axisCharts)),this.allTooltipSeriesGroups=[],this.yaxisTTEls=null,this.hoverBars=[],this._facts=null,this.legendKey=null,a.globals.axisCharts||(this.showTooltipTitle=!1);let r=this.getElTooltip();const o=(null==r?void 0:r.parentNode)===a.dom.elWrap&&(null==(i=null==(e=this.ttItems)?void 0:e[0])?void 0:i.parentNode)===r;if(!o){null==r||r.remove(),this.tooltipTitle=null,r=v.createElementNS("http://www.w3.org/1999/xhtml","div"),r.classList.add("apexcharts-tooltip"),this.tConfig.interactive&&(r.classList.add("apexcharts-tooltip-interactive"),r.addEventListener("mouseenter",()=>{clearTimeout(this.interactiveHideTimeout),this.cancelOffMarkHide()},{passive:!0}),r.addEventListener("mouseleave",()=>{clearTimeout(this.interactiveHideTimeout),this.handleMouseOut({tooltipEl:r}),a.config.chart.group&&this.ctx.getGroupedCharts().forEach(t=>{const e=this.getElTooltip(t);e&&t.w.globals.tooltip.handleMouseOut({tooltipEl:e})})},{passive:!0})),a.config.tooltip.cssClass&&r.classList.add(...String(a.config.tooltip.cssClass).split(/\s+/).filter(Boolean)),r.classList.add(`apexcharts-theme-${this.tConfig.theme||"light"}`),this.tConfig.fillSeriesColor&&r.classList.add("apexcharts-tooltip-fill-series"),this.tConfig.compact&&(r.classList.add("apexcharts-tooltip-compact"),1===a.config.series.length&&r.classList.add("apexcharts-tooltip-value-only")),this.tConfig.style&&this.tConfig.style.background&&r.style.setProperty("--apx-tt-bg",this.tConfig.style.background);const t=this.tConfig.shared&&a.config.series.length>1&&!a.globals.isBarHorizontal&&"heatmap"!==a.config.chart.type;if(this.tConfig.arrow&&!xs.isFollowCursor(this.w)&&!this.tConfig.fixed.enabled&&!t&&!this.tConfig.fillSeriesColor&&a.globals.axisCharts){const t=v.createElementNS("http://www.w3.org/1999/xhtml","div");t.classList.add("apexcharts-tooltip-arrow"),r.appendChild(t)}a.config.chart.accessibility.enabled&&a.config.chart.accessibility.announcements.enabled&&(r.setAttribute("role","tooltip"),r.setAttribute("aria-live","polite"),r.setAttribute("aria-atomic","true"),r.setAttribute("aria-hidden","true")),a.dom.elWrap.appendChild(r)}if(a.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();const t=new ne(this.w,this.ctx,void 0);this.xAxisTicksPositions=t.getXAxisTicksPositions()}if(!a.globals.comboCharts&&!this.tConfig.intersect&&"rangeBar"!==a.config.chart.type||this.tConfig.shared||(this.showOnIntersect=!0),(0===a.config.markers.size||0===a.globals.markers.largestSize||a.globals.markers.batched)&&this.marker.drawDynamicPoints(),a.globals.collapsedSeries.length===a.seriesData.series.length)return;this.dataPointsDividedHeight=a.layout.gridHeight/a.globals.dataPoints,this.dataPointsDividedWidth=a.layout.gridWidth/a.globals.dataPoints;let n=a.seriesData.series.length;if((a.globals.xyCharts||a.globals.comboCharts)&&(n=this.tConfig.shared&&!this.showOnIntersect?a.seriesData.series.length:1),o||(this.showTooltipTitle&&(this.tooltipTitle=v.createElementNS("http://www.w3.org/1999/xhtml","div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||a.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,r.appendChild(this.tooltipTitle)),this.ttItems=this.createTTElements(n)),this.legendLabels=a.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.addSVGEvents(),o&&r.classList.contains("apexcharts-active")){const t=this.hoverAreaListeners[0];if(t&&/move/.test(null==(s=this.e)?void 0:s.type)&&!a.config.chart.group){let e=600;const i=()=>{t!==this.hoverAreaListeners[0]||a.globals.isDestroyed||(!a.globals.animationEnded&&e--&&"function"==typeof requestAnimationFrame?requestAnimationFrame(i):r.classList.contains("apexcharts-active")&&(delete r.dataset.positioned,this.seriesHover(t.opt,this.e)))};a.dom.baseEl.classList.remove("apexcharts-tooltip-active"),i()}else this.handleMouseOut({tooltipEl:r})}}createTTElements(t){const e=this.w,i=[],s=this.getElTooltip();if(!s)return i;for(let a=0;a<t;a++){const r=v.createElementNS("http://www.w3.org/1999/xhtml","div");r.classList.add("apexcharts-tooltip-series-group",`apexcharts-tooltip-series-group-${a}`),r.style.order=String(e.config.tooltip.inverseOrder?t-a:a+1);const o=v.createElementNS("http://www.w3.org/1999/xhtml","span");o.classList.add("apexcharts-tooltip-marker"),e.config.tooltip.fillSeriesColor?o.style.backgroundColor=e.globals.colors[a]:o.style.color=e.globals.colors[a];const n=e.config.markers.shape;let l=n;Array.isArray(n)&&(l=n[a]),o.setAttribute("shape",l),o.innerHTML=zs(l),r.appendChild(o);const c=v.createElementNS("http://www.w3.org/1999/xhtml","div");c.classList.add("apexcharts-tooltip-text"),c.style.fontFamily=this.tConfig.style.fontFamily||e.config.chart.fontFamily,c.style.fontSize=this.tConfig.style.fontSize;const h={marker:o,text:c};["y","goals","z"].forEach(t=>{const e=v.createElementNS("http://www.w3.org/1999/xhtml","div");e.classList.add(`apexcharts-tooltip-${t}-group`);const i=v.createElementNS("http://www.w3.org/1999/xhtml","span");i.classList.add(`apexcharts-tooltip-text-${t}-label`),e.appendChild(i);const s=v.createElementNS("http://www.w3.org/1999/xhtml","span");s.classList.add(`apexcharts-tooltip-text-${t}-value`),e.appendChild(s),h[`${t}Label`]=i,h[`${t}Value`]=s,c.appendChild(e)}),r.appendChild(c),r.ttRefs=h,s.appendChild(r),i.push(r)}return i}addSVGEvents(){const t=this.w,e=t.config.chart.type;this.detachHoverAreaListeners();const i=this.getElTooltip();if(!i)return;const s=!("bar"!==e&&"candlestick"!==e&&"boxPlot"!==e&&"violin"!==e&&"rangeBar"!==e),a="area"===e||"line"===e||"scatter"===e||"bubble"===e||"radar"===e,r=a&&!t.globals.xyCharts,o=t.dom.Paper.node,n={hoverArea:o,elGrid:this.getElGrid(),tooltipEl:i,ttItems:this.ttItems};if(t.globals.xyCharts&&!this.showOnIntersect||t.globals.comboCharts&&!this.showOnIntersect||s&&this.tooltipUtil.hasBars()&&this.tConfig.shared)this.addPathsEventListeners([o],n);else if(xs.isCanvasBarChart(t))this.addPathsEventListeners([o],n);else if(a&&this.showOnIntersect&&xs.isCanvasMarkerChart(t))this.addPathsEventListeners([o],n);else if(s&&!t.globals.comboCharts||a&&this.showOnIntersect||r)this.addDatapointEventsListeners(n);else if("heatmap"===e&&t.globals.activeRenderer&&"canvas"===t.globals.activeRenderer.kind)this.addPathsEventListeners([o],n);else if(!t.globals.axisCharts||"heatmap"===e||"treemap"===e){const e=t.dom.baseEl.querySelectorAll(".apexcharts-series");this.addPathsEventListeners(e,n)}if(this.showOnIntersect){const e=t.dom.baseEl.querySelectorAll(".apexcharts-line-series .apexcharts-marker, .apexcharts-area-series .apexcharts-marker");e.length>0&&this.addPathsEventListeners(e,n),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(n)}}isHeadingForOutsideBox(t,e,i){var s;if(!t||!(null==(s=this.tooltipPosition)?void 0:s.shortPlotPlacement))return!1;if(!t.classList.contains("apexcharts-active"))return!1;if(t.dataset.placement!==(i?"top":"bottom"))return!1;const a=t.getBoundingClientRect();return e>=a.left-24&&e<=a.right+24}interactiveHideDelay(t,e){var i;const s=(null==(i=this.tooltipPosition)?void 0:i.shortPlotPlacement)?this.getElTooltip():null;if(!s||null==t||null==e)return 150;const a=s.getBoundingClientRect(),r=Math.max(a.left-t,0,t-a.right),o=Math.max(a.top-e,0,e-a.bottom),n=Math.hypot(r,o)/.2;return 150+Math.min(n,600)}cancelOffMarkHide(){void 0!==this.offMarkHideTimeout&&(clearTimeout(this.offMarkHideTimeout),this.offMarkHideTimeout=void 0)}drawFixedTooltipRect(){const t=this.w,e=this.getElTooltip();if(!e)return{x:0,y:0,ttWidth:0,ttHeight:0};const i=e.getBoundingClientRect(),s=i.width+10,a=i.height+10;let r=this.tConfig.fixed.offsetX,o=this.tConfig.fixed.offsetY;const n=this.tConfig.fixed.position.toLowerCase();return n.indexOf("right")>-1&&(r=r+t.globals.svgWidth-s+10),n.indexOf("bottom")>-1&&(o=o+t.globals.svgHeight-a-10),this.tooltipPosition.applyTooltipPosition(e,{x:r,y:o}),{x:r,y:o,ttWidth:s,ttHeight:a}}addDatapointEventsListeners(t){const e=this.w.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-violin-area, .apexcharts-rangebar-area");this.addPathsEventListeners(e,t)}addPathsEventListeners(t,e){const i=this;for(let s=0;s<t.length;s++){const a={paths:t[s],tooltipEl:e.tooltipEl,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:e.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map(r=>{const o=i.onSeriesHover.bind(i,a);return t[s]===e.hoverArea&&i.hoverAreaListeners.push({el:t[s],ev:r,handler:o,opt:a}),t[s].addEventListener(r,o,{capture:!1,passive:!0})})}}detachHoverAreaListeners(){for(const{el:t,ev:e,handler:i}of this.hoverAreaListeners)t.removeEventListener(e,i);this.hoverAreaListeners=[]}onSeriesHover(t,e){if(this.tConfig.interactive&&(clearTimeout(this.interactiveHideTimeout),"mouseout"===e.type))return clearTimeout(this.seriesHoverTimeout),void(this.interactiveHideTimeout=setTimeout(()=>{this.w.globals.isDestroyed||this.seriesHover(t,e)},this.interactiveHideDelay(e.clientX,e.clientY)));xs.hoverTarget(e);const i=Date.now()-this.lastHoverTime;i>=20?this.seriesHover(t,e):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout(()=>{this.seriesHover(t,e)},20-i))}seriesHover(t,e){var i;if(this.w.globals.isDestroyed)return;this.lastHoverTime=Date.now();let s=[];const a=this.w,r=t=>{var e,i,s;const a=null==(s=null==(i=null==(e=null==t?void 0:t.w)?void 0:e.config)?void 0:i.chart)?void 0:s.link;return!(!a||"function"!=typeof a.dimension)};if(a.config.chart.group&&!r(this.ctx)&&(s=this.ctx.getSyncedCharts().filter(t=>!r(t))),!a.globals.axisCharts||(a.globals.minX!==-1/0||a.globals.maxX!==1/0)&&0!==a.globals.dataPoints)if(s.length){const r=this.groupPaintedMark(t,e);if((null==r?void 0:r.noHit)&&this.showOnIntersect){const s=xs.eventPointer(e,t),a={type:"mouseout",target:e.target,clientX:s.x,clientY:s.y};if(this.tConfig.interactive&&(null==(i=t.tooltipEl)?void 0:i.classList.contains("apexcharts-active")))return void(void 0===this.offMarkHideTimeout&&(this.offMarkHideTimeout=setTimeout(()=>{this.offMarkHideTimeout=void 0,this.w.globals.isDestroyed||this.seriesHover(t,a)},this.interactiveHideDelay(s.x,s.y))));e=a}const o=t.elGrid?xs.plotRect(a):null,n="touchmove"===e.type?e.touches[0]:e;s.forEach(i=>{const s=this.getElTooltip(i),a=i.w.globals.tooltip.getElGrid(),l=a?xs.plotRect(i.w):null,c=o&&l?l.left+(n.clientX-o.left)/o.width*l.width:n.clientX,h=o&&l?l.top+(n.clientY-o.top)/o.height*l.height:n.clientY,d={paths:t.paths,tooltipEl:s,elGrid:a||t.elGrid,hoverArea:t.hoverArea,ttItems:i.w.globals.tooltip.ttItems,clientX:c,clientY:h,paintedSeries:r?r.noHit?null:r.i:void 0};i.w.globals.minX===this.w.globals.minX&&i.w.globals.maxX===this.w.globals.maxX&&i.w.globals.tooltip.seriesHoverByContext({chartCtx:i,ttCtx:i.w.globals.tooltip,opt:d,e:e})})}else this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:t,e:e})}groupPaintedMark(t,e){if("mousemove"!==e.type&&"touchmove"!==e.type&&"mouseup"!==e.type)return null;if(t.paths!==t.hoverArea||!xs.isCanvasBarChart(this.w))return null;const i=this.intersect.getPaintedMark(e,t);return i.noHit||this.cancelOffMarkHide(),i}seriesHoverByContext({chartCtx:t,ttCtx:e,opt:i,e:s}){var a,r,o;const n=t.w;if(!this.getElTooltip(t))return;const l=e.getCachedDimensions();if(e.tooltipRect={x:0,y:0,ttWidth:l.ttWidth,ttHeight:l.ttHeight},e.e=s,e.tooltipUtil.hasBars()&&!n.globals.comboCharts&&!e.isBarShared&&this.tConfig.onDatasetHover.highlightDataSeries){const l=new mi(t.w),c=null==(a=xs.hoverTarget(s))?void 0:a.parentNode;if(i.paths===i.hoverArea&&xs.isCanvasBarChart(n)||void 0!==i.paintedSeries&&!(null==(r=null==c?void 0:c.getAttribute)?void 0:r.call(c,"rel"))){let t=i.paintedSeries;if(void 0===t){const a=e.intersect.getPaintedMark(s,i);t=a.noHit?null:a.i}const a=null==t?null:Array.from(n.dom.baseEl.querySelectorAll(".apexcharts-series")).find(e=>e.getAttribute("data:realIndex")===String(t));l.toggleSeriesOnHover(a?s:{type:"mouseout"},a)}else(null==(o=null==c?void 0:c.getAttribute)?void 0:o.call(c,"rel"))?l.toggleSeriesOnHover(s,c):l.toggleSeriesOnHover({type:"mouseout"},c)}n.globals.axisCharts?e.axisChartsTooltips({e:s,opt:i,tooltipRect:e.tooltipRect}):e.nonAxisChartsTooltips({e:s,opt:i,tooltipRect:e.tooltipRect}),e.fixedTooltip&&e.drawFixedTooltipRect()}axisChartsTooltips({e:t,opt:e}){var i,s,a,r,o,n,l;const c=this.w;let h,d;if(!e.elGrid)return;const p=xs.plotRect(c),u=null!=(i=e.clientX)?i:"touchmove"===t.type?t.touches[0].clientX:t.clientX,g=null!=(s=e.clientY)?s:"touchmove"===t.type?t.touches[0].clientY:t.clientY;this.clientY=g,this.clientX=u;const x=g<p.top||g>p.top+p.height;if(x&&"mouseout"!==(null==t?void 0:t.type)&&(null==(a=this.tConfig)?void 0:a.interactive)&&this.isHeadingForOutsideBox(e.tooltipEl,u,g<p.top))return clearTimeout(this.interactiveHideTimeout),void(this.interactiveHideTimeout=setTimeout(()=>{this.w.globals.isDestroyed||(c.interact.capturedSeriesIndex=-1,c.interact.capturedDataPointIndex=-1,this.handleMouseOut(e))},this.interactiveHideDelay(u,g)));if(c.interact.capturedSeriesIndex=-1,c.interact.capturedDataPointIndex=-1,x)return void this.handleMouseOut(e);if((null==(r=this.tConfig)?void 0:r.interactive)&&clearTimeout(this.interactiveHideTimeout),c.dom.elWrap.querySelector(".apexcharts-annotation-tooltip.apexcharts-active"))return void this.handleMouseOut(e);if(Array.isArray(this.tConfig.enabledOnSeries)&&!c.config.tooltip.shared&&(e.paths!==e.hoverArea||!this.showOnIntersect||!xs.isCanvasBarChart(c)&&!xs.isCanvasMarkerChart(c))){const t=parseInt(e.paths.getAttribute("index"),10);if(!isNaN(t)&&this.tConfig.enabledOnSeries.indexOf(t)<0)return void this.handleMouseOut(e)}const f=this.getElTooltip();if(!f)return;const m=this.getElXCrosshairs(),b=["heatmap","treemap"].includes(c.config.chart.type);let y=[];c.config.chart.group&&!b&&(y=this.ctx.getSyncedCharts());const v=c.globals.xyCharts||"bar"===c.config.chart.type&&!c.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||c.globals.comboCharts&&this.tooltipUtil.hasBars();if("mousemove"===t.type||"touchmove"===t.type||"mouseup"===t.type){if(c.globals.collapsedSeries.length+c.globals.ancillaryCollapsedSeries.length===c.seriesData.series.length)return;null!==m&&m.classList.add("apexcharts-active");const i=null==(o=this.yaxisTooltips)?void 0:o.filter(t=>!0===t),s=this.ycrosshairs;if(null!==s&&(null==i?void 0:i.length)&&s.classList.add("apexcharts-active"),this.tooltipHidden=!1,!b&&(v&&!this.showOnIntersect||y.length>1))this.handleStickyTooltip(t,u,g,e);else if("heatmap"===c.config.chart.type||"treemap"===c.config.chart.type){const i=this.intersect.handleHeatTreeTooltip({e:t,opt:e,x:h,y:d,type:c.config.chart.type});if(i.noHit)return void this.handleMouseOut(e);h=i.x,d=i.y,this.placeCellTooltip(f,i)}else{const i=this.intersect.getPaintedMarker(t,e);i?this.intersect.handlePaintedMarkerTooltip({e:t,opt:e,marker:i}):(null==(l=null==(n=xs.hoverTarget(t))?void 0:n.classList)?void 0:l.contains("apexcharts-marker"))&&xs.hoverTarget(t).hasAttribute("rel")?this.intersect.handleMarkerTooltip({e:t,opt:e,x:h,y:d}):this.tooltipUtil.hasBars()?this.intersect.handleBarTooltip({e:t,opt:e}):e.paths===e.hoverArea&&xs.isCanvasMarkerChart(c)&&this.intersect.leavePaintedMark(t,e)}if(this.tooltipHidden)return;if(this.yaxisTooltips&&this.yaxisTooltips.length)for(let t=0;t<c.config.yaxis.length;t++)this.axesTooltip.drawYaxisTooltipText(t,g);c.dom.baseEl.classList.add("apexcharts-tooltip-active"),e.tooltipEl.classList.add("apexcharts-active"),c.config.chart.accessibility.enabled&&c.config.chart.accessibility.announcements.enabled&&e.tooltipEl.removeAttribute("aria-hidden")}else"mouseout"!==t.type&&"touchend"!==t.type||this.handleMouseOut(e)}getSliceAnchor(t){var e,i;const s=this.w,a=parseFloat(null!=(e=null==t?void 0:t.getAttribute("data:cx"))?e:""),r=parseFloat(null!=(i=null==t?void 0:t.getAttribute("data:cy"))?i:"");if(isNaN(a)||isNaN(r))return null;const o=s.dom.elWrap.getBoundingClientRect(),n="function"==typeof t.getScreenCTM?t.getScreenCTM():null;if(!n){const t=s.dom.Paper.node.getBoundingClientRect();return{x:t.left-o.left+a,y:t.top-o.top+r}}return{x:n.a*a+n.c*r+n.e-o.left,y:n.b*a+n.d*r+n.f-o.top}}nonAxisChartsTooltips({e:t,opt:e,tooltipRect:i}){const s=this.w,a=e.paths.getAttribute("rel"),r=this.getElTooltip();if(!r)return;const o=s.dom.elWrap.getBoundingClientRect();if("mousemove"===t.type||"touchmove"===t.type){if(s.dom.baseEl.classList.add("apexcharts-tooltip-active"),r.classList.add("apexcharts-active"),s.config.chart.accessibility.enabled&&s.config.chart.accessibility.announcements.enabled&&r.removeAttribute("aria-hidden"),"unit"===s.config.chart.type){const e=xs.hoverTarget(t),i=e&&"function"==typeof e.closest?e.closest(".apexcharts-unit-area"):null;if(!i)return;this.renderUnitTooltip(i)}else this.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:parseInt(a,10)-1,shared:!1});const n=e.paths.querySelector("path[data\\:cx]")||e.paths,l=s.config.tooltip.intersect?this.getSliceAnchor(n):null,c=xs.eventPointer(t,e),h=l?this.tooltipPosition.placeOverAnchor(l.x,l.y,i.ttWidth,i.ttHeight,10):this.tooltipPosition.placeOverAnchor(c.x-o.left,c.y-o.top,i.ttWidth,i.ttHeight,10,24);r.style.left=h.x+"px",r.style.top=h.y+"px",s.config.legend.tooltipHoverFormatter&&this.applyLegendHoverText(a-1,a-1,!1)}else"mouseout"!==t.type&&"touchend"!==t.type||(r.classList.remove("apexcharts-active"),s.dom.baseEl.classList.remove("apexcharts-tooltip-active"),s.config.legend.tooltipHoverFormatter&&this.applyLegendHoverText(-1,0,!1))}applyLegendHoverText(t,e,i){var s,a,r;const o=this.w,n=`${i||t},${e}`;if(n===this.legendKey)return;this.legendKey=n;const l=null!=(s=this.legendLabels)?s:[];for(let s=0;s<l.length;s++){const n=l[s],c=parseInt(null!=(a=n.getAttribute("i"))?a:"",10),h=decodeURIComponent(null!=(r=n.getAttribute("data:default-text"))?r:"");n.innerHTML=(i?o.globals.collapsedSeriesIndices.indexOf(c)<0:c===t)?o.config.legend.tooltipHoverFormatter(h,{seriesIndex:i?c:t,dataPointIndex:e,w:o}):h}}renderUnitTooltip(t){var e,i,s,a,r;const o=this.w,n=this.getElTooltip();if(!n)return;const l=parseInt(t.getAttribute("i")||"0",10),c=parseInt(t.getAttribute("j")||"0",10);if("function"==typeof o.config.tooltip.custom)return void this.tooltipLabels.handleCustomTooltip({i:l,j:c,y1:null,y2:null,w:o});const h=o.seriesData.seriesNames[l]||`series-${l+1}`,d=Math.round(Number(o.seriesData.series[l])||0),p=t.parentNode,u=p&&p.querySelectorAll?p.querySelectorAll(".apexcharts-unit-area").length:d,g=o.config.plotOptions.unit||{},x=g.unitValue>0?g.unitValue:1,f=o.seriesData.unitData&&o.seriesData.unitData[l],m=f?f[c]:void 0,b=m&&"object"==typeof m?m:null,y=b&&b.fillColor||o.globals.colors&&o.globals.colors[l]||"#008FFB";let v;const w=g.tooltip&&g.tooltip.formatter;if("function"==typeof w)v=w({seriesName:h,seriesIndex:l,dataPointIndex:c,count:u,value:d,unitValue:x,datum:m,color:y,w:o});else if(null!=m){const t=b&&null!=(s=null!=(i=null!=(e=b.name)?e:b.label)?i:b.x)?s:null,o=b?null!=(r=null!=(a=b.value)?a:b.y)?r:null:m;v=null!=t&&null!=o?`${t}: ${o}`:null!=t?String(t):null!=o?String(o):`#${(c+1).toLocaleString()} of ${u.toLocaleString()}`}else v=`#${(c+1).toLocaleString()} of ${u.toLocaleString()}`,1!==x&&(v+=` · ${x.toLocaleString()} per dot`);const A=o.config.chart.fontFamily||"inherit",S=o.config.tooltip.style&&o.config.tooltip.style.fontSize||"12px",C=n.querySelector(".apexcharts-tooltip-arrow");n.innerHTML=`<div class="apexcharts-tooltip-title" style="font-family: ${A}; font-size: ${S};">${h}</div><div class="apexcharts-tooltip-series-group apexcharts-active" style="display: flex;"><span class="apexcharts-tooltip-marker" style="background-color: ${y};"></span><div class="apexcharts-tooltip-text" style="font-family: ${A}; font-size: ${S};"><div class="apexcharts-tooltip-y-group"><span class="apexcharts-tooltip-text-y-value">${v}</span></div></div></div>`,C&&n.appendChild(C);const k=n.getBoundingClientRect();this.tooltipRect.ttWidth=k.width,this.tooltipRect.ttHeight=k.height}placeCellTooltip(t,e){e.positioned||(t.style.left=e.x+"px",t.style.top=e.y+"px",e.placement?(t.dataset.placement=e.placement,t.style.setProperty("--apx-tt-arrow-x",e.arrowX+"px")):t.dataset.placement&&delete t.dataset.placement)}handleStickyTooltip(t,e,i,s){const a=this.w,r=this.tooltipUtil.getNearestValues({context:this,hoverArea:s.hoverArea,clientX:e,clientY:i}),o=r.j;let n=r.capturedSeries;null!==n&&a.globals.collapsedSeriesIndices.includes(null!=n?n:-1)&&(n=null);const l=a.globals.barPadForNumericAxis||0;if(r.hoverX<=-l-1||r.hoverX>=a.layout.gridWidth+l+1)this.handleMouseOut(s);else if(null!==n)this.handleStickyCapturedSeries(t,null!=n?n:-1,s,null!=o?o:0);else if(this.tooltipUtil.isXoverlap(null!=o?o:0)||a.globals.isBarHorizontal){const e=a.seriesData.series.findIndex((t,e)=>!a.globals.collapsedSeriesIndices.includes(e));this.create(t,this,e,null!=o?o:0,s.ttItems)}}handleStickyCapturedSeries(t,e,i,s){const a=this.w;if(!this.tConfig.shared){if(null===a.seriesData.series[e][s])return void this.handleMouseOut(i)}if(void 0!==a.seriesData.series[e][s])this.tConfig.shared&&this.tooltipUtil.isXoverlap(s)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(t,this,e,s,i.ttItems):this.create(t,this,e,s,i.ttItems,!1);else if(this.tooltipUtil.isXoverlap(s)){const e=a.seriesData.series.findIndex((t,e)=>!a.globals.collapsedSeriesIndices.includes(e));this.create(t,this,e,s,i.ttItems)}}deactivateHoverFilter(){const t=this.hoverBars;if(!t.length)return;this.hoverBars=[];const e=new xa(this.w,this.ctx);for(let i=0;i<t.length;i++)e.pathMouseLeave(t[i],void 0)}handleMouseOut(t){var e;const i=this.w;this.tooltipHidden=!0,this.tooltipPosition.resetPlacementCache();const s=this.getElXCrosshairs();i.dom.baseEl.classList.remove("apexcharts-tooltip-active");const a=t.tooltipEl.classList.contains("apexcharts-active");t.tooltipEl.classList.remove("apexcharts-active"),delete t.tooltipEl.dataset.positioned,i.config.chart.accessibility.enabled&&i.config.chart.accessibility.announcements.enabled&&t.tooltipEl.setAttribute("aria-hidden","true"),this.deactivateHoverFilter(),this.intersect.hoverCell(null),"bubble"!==i.config.chart.type&&(a||this.marker.dirty||this.marker.enlargedPoints.size)&&this.marker.resetPointsSize(),null!==s&&s.classList.remove("apexcharts-active");const r=this.ycrosshairs;null!==r&&r.classList.remove("apexcharts-active"),this.isXAxisTooltipEnabled&&(null==(e=this.xaxisTooltip)||e.classList.remove("apexcharts-active")),this.yaxisTooltips&&this.yaxisTooltips.length&&this.getYaxisTTEls().forEach(t=>null==t?void 0:t.classList.remove("apexcharts-active")),i.config.legend.tooltipHoverFormatter&&this.applyLegendHoverText(-1,0,!1)}markerClick(t,e,i){const s=this.w;"function"==typeof s.config.chart.events.markerClick&&s.config.chart.events.markerClick(t,this.ctx,{seriesIndex:e,dataPointIndex:i,w:s}),this.ctx.events.fireEvent("markerClick",[t,this.ctx,{seriesIndex:e,dataPointIndex:i,w:s}])}_hasCustomSeries(){const t=this.w;if(rt(t.config.chart.type))return!0;return(t.config.series||[]).some(t=>t&&t.type&&rt(t.type))}create(t,e,i,s,a,r=null){var o,n,h,d,p,u,g,x;const f=this.w,m=e;if("mouseup"===t.type&&this.markerClick(t,i,s),null===r&&(r=this.tConfig.shared),!this.tConfig.shared&&Array.isArray(this.tConfig.enabledOnSeries)&&this.tConfig.enabledOnSeries.indexOf(i)<0){const t=this.getElTooltip();return void(t&&this.handleMouseOut({tooltipEl:t}))}const b=this.tooltipUtil.hasMarkers(i),y="canvas"===(null==(n=null==(o=this.ctx)?void 0:o.renderer)?void 0:n.kind),v=y&&!this.tooltipUtil.hasBars(),w=y&&!v&&!xs.isBarLikeType(null!=(d=null==(h=f.config.series[i])?void 0:h.type)?d:f.config.chart.type),A=!y&&!b&&!this.tooltipUtil.hasBars()&&this._hasCustomSeries(),S=v||w||A;f.config.legend.tooltipHoverFormatter&&this.applyLegendHoverText(i,s,r);const C=null==(u=null==(p=f.rangeData.seriesRangeStart)?void 0:p[i])?void 0:u[s],k=null==(x=null==(g=f.rangeData.seriesRangeEnd)?void 0:g[i])?void 0:x[s],M=l(l({ttItems:a,i:i,j:s},void 0!==C&&{y1:C}),void 0!==k&&{y2:k});if(r){m.tooltipLabels.drawSeriesTexts(c(l({},M),{shared:!this.showOnIntersect&&this.tConfig.shared}));const t=b||S;if((t||f.globals.comboCharts&&!y&&this.tooltipUtil.hasVisibleMarkers())&&(f.globals.markers.largestSize>0&&!y&&!f.globals.markers.batched?m.marker.enlargePoints(s):m.tooltipPosition.moveDynamicPointsOnHover(s)),this.tooltipUtil.hasBars())if(y)t||m.tooltipPosition.moveStickyTooltipOverBars(s,i);else if([...this.tooltipUtil.getElBars()].some(t=>t.querySelector("path"))){const e=new xa(this.w,this.ctx),a=f.dom.Paper.find(`.apexcharts-bar-area[j='${s}']`);this.deactivateHoverFilter(),t||m.tooltipPosition.moveStickyTooltipOverBars(s,i);for(let t=0;t<a.length;t++)e.pathMouseEnter(a[t],void 0);this.hoverBars=a}}else m.tooltipLabels.drawSeriesTexts(l({shared:!1},M)),this.tooltipUtil.hasBars()&&m.tooltipPosition.moveStickyTooltipOverBars(s,i),b?m.tooltipPosition.moveMarkers(i,s):S&&m.tooltipPosition.moveDynamicPointOnHover(s,i);m.marker.dirty=!0}}class Ys{constructor(t,e){this.w=t,this.ctx=e,this.kind="svg"}beginSeries(){}present(){return null}clear(){}group(t){return this.ctx.graphics.group(t)}drawPath(t){return this.ctx.graphics.drawPath(t)}drawLine(...t){return this.ctx.graphics.drawLine(...t)}drawRect(...t){return this.ctx.graphics.drawRect(...t)}drawCircle(t,e){return this.ctx.graphics.drawCircle(t,e)}drawText(t){return this.ctx.graphics.drawText(t)}renderPaths(t){return this.ctx.graphics.renderPaths(t)}drawMarker(t,e,i={}){return this.ctx.graphics.drawMarker(t,e,i)}supports(t){return!0}hitTest(){return null}restyle(){}toBitmap(){return null}destroy(){}}const Ws="__apexcharts_renderers__";function $s(){const t=globalThis;return t[Ws]||(t[Ws]=new Map),t[Ws]}class Gs{static get _rendererRegistry(){return $s()}static registerRenderer(t,e){$s().set(t,e)}static unregisterRenderer(t){$s().delete(t)}constructor(t,e){this.w=t,this.ctx=e,this.svg=new Ys(t,e),this.active=this.svg,this._activeKind="svg",this._instances={},this.w.globals.activeRenderer=this.active}_activate(t,e){this.active=e,this._activeKind=t,this.ctx.renderer=e,this.w.globals.activeRenderer=e}_desiredKind(){const t=this.w.config.chart,e=t.renderer||"svg";if(!p.isBrowser())return"svg";if("svg"===e)return"svg";if(Bs(this.w))return"svg";if("canvas"===e)return"canvas";return function(t){const e=t.config.series||[],i=t.config.chart.type,s="scatter"===i||"bubble"===i,a=t.config.markers&&t.config.markers.size,r=Array.isArray(a)?a.some(t=>t>0):(a||0)>0,o=!(!t.config.dataLabels||!t.config.dataLabels.enabled),n="heatmap"===i;let l=0,c=0;return e.forEach(t=>{const e=Array.isArray(t.data)?t.data.length:0;e>c&&(c=e),(s||r||n)&&(l+=e),o&&(l+=e)}),c>=5e4&&(l=Math.max(l,c)),l}(this.w)>=(t.rendererThreshold||8e3)?"canvas":"svg"}resolve(){const t=this.w.config.chart.renderer||"svg",e=this._desiredKind();if("svg"!==e){const i=$s().get(e);if(i)return this._instances[e]||(this._instances[e]=i(this.w,this.ctx)),this._activate(e,this._instances[e]),this._activeKind;t!==e||this._warned||(this._warned=1,Vi(`\`chart.renderer: '${e}'\``,`renderer-${e}`,{tail:"Falling back to SVG."}))}else"canvas"===t&&!this._warned&&Bs(this.w)&&(this._warned=1,console.warn('[apexcharts] renderer:"canvas" requested but this chart uses a feature the canvas renderer does not render yet (gradient/pattern/image fill or a state color-matrix filter); falling back to SVG.'));const i=this._instances[this._activeKind];return i&&(i.destroy(),delete this._instances[this._activeKind]),this._activate("svg",this.svg),this._activeKind}pendingKind(){const t=this._desiredKind();return"svg"===t||$s().has(t)?t:"svg"}getActiveKind(){return this._activeKind}teardown(){for(const t in this._instances){const e=this._instances[t];e&&"function"==typeof e.destroy&&e.destroy()}this._instances={},this.active=this.svg,this._activeKind="svg",this.w.globals.activeRenderer=null}}class js{constructor(t){this.node=t,t&&(t.instance=this),this._listeners=[],this._filter=null}attr(t,e){if("string"==typeof t&&void 0===e)return this.node.getAttribute(t);const i="string"==typeof t?{[t]:e}:t;for(const t in i){let e=i[t];null===e?this.node.removeAttribute(t):void 0!==e&&("number"==typeof e&&isNaN(e)&&(e=0),this.node.setAttribute(t,e))}if("text"===this.node.nodeName&&null!=i.x){const t=this.node.querySelectorAll("tspan[data-newline]");for(let e=0;e<t.length;e++)t[e].setAttribute("x",i.x)}return this}css(t){for(const e in t)this.node.style[e]=t[e];return this}fill(t){return"object"==typeof t?this.attr(t):this.attr("fill",t)}stroke(t){return"object"==typeof t?(void 0!==t.color&&this.attr("stroke",t.color),void 0!==t.width&&this.attr("stroke-width",t.width),void 0!==t.dasharray&&this.attr("stroke-dasharray",t.dasharray),void 0!==t.linecap&&this.attr("stroke-linecap",t.linecap),void 0!==t.opacity&&this.attr("stroke-opacity",t.opacity),this):this.attr("stroke",t)}size(t,e){return this.attr({width:t,height:e})}move(t,e){return this.attr({x:t,y:e})}center(t,e){if("g"===this.node.nodeName){const i=this.bbox(),s=t-(i.x+i.width/2),a=e-(i.y+i.height/2);return this.attr("transform",`translate(${s}, ${a})`)}return this.attr({cx:t,cy:e})}add(t){return t&&t.__isCanvasMark||this.node.appendChild(t.node||t),this}addTo(t){return(t.node||t).appendChild(this.node),this}remove(){return this.node.parentNode&&this.node.parentNode.removeChild(this.node),this}clear(){for(;this.node.firstChild;)this.node.removeChild(this.node.firstChild);return this}find(t){return Array.from(this.node.querySelectorAll(t)).map(t=>t.instance||new js(t))}findOne(t){const e=this.node.querySelector(t);return e?e.instance||new js(e):null}on(t,e){const i=t.split(".")[0];return this._listeners.push({event:t,eventType:i,handler:e}),this.node.addEventListener(i,e),this}off(t,e){if(t||e)if(t&&!e){const e=t.split(".")[0];this._listeners=this._listeners.filter(t=>t.eventType!==e||(this.node.removeEventListener(t.eventType,t.handler),!1))}else{const i=t.split(".")[0];this._listeners=this._listeners.filter(t=>t.eventType!==i||t.handler!==e||(this.node.removeEventListener(t.eventType,t.handler),!1))}else this._listeners.forEach(t=>{this.node.removeEventListener(t.eventType,t.handler)}),this._listeners=[];return this}each(t,e){return Array.from(this.node.children).forEach(i=>{const s=i.instance||new js(i);t.call(s),e&&s.each(t,e)}),this}removeClass(t){return"*"===t?this.node.removeAttribute("class"):this.node.classList.remove(t),this}children(){return Array.from(this.node.childNodes).filter(t=>1===t.nodeType).map(t=>t.instance||new js(t))}hide(){return this.node.style.display="none",this}show(){return this.node.style.display="",this}bbox(){if("function"==typeof this.node.getBBox)try{return this.node.getBBox()}catch(t){}return{x:0,y:0,width:0,height:0}}tspan(t){const e=v.createElementNS("http://www.w3.org/2000/svg","tspan");return e.textContent=t,this.node.appendChild(e),new js(e)}plot(t){return"string"==typeof t&&this.attr("d",t),this}animate(){throw new Error("Animation module not loaded")}filterWith(){throw new Error("Filter module not loaded")}}let Us=0;class Vs extends js{constructor(t,e,i){const s="radial"===e?"radialGradient":"linearGradient";super(v.createElementNS(bt,s)),this._id="SvgjsGradient"+ ++Us,this.attr("id",this._id),"function"==typeof i&&i(new qs(this));let a=t.node.querySelector("defs");a||(a=v.createElementNS(bt,"defs"),t.node.appendChild(a)),a.appendChild(this.node)}stop(t,e,i){const s=v.createElementNS(bt,"stop");return s.setAttribute("offset",t),s.setAttribute("stop-color",e),void 0!==i&&s.setAttribute("stop-opacity",String(i)),this.node.appendChild(s),this}from(t,e){return this.attr({x1:t,y1:e})}to(t,e){return this.attr({x2:t,y2:e})}url(){return"url(#"+this._id+")"}toString(){return this.url()}valueOf(){return this.url()}fill(){return this.url()}}class qs{constructor(t){this.gradient=t}stop(t,e,i){return this.gradient.stop(t,e,i),this}}let Zs=0;class Ks extends js{constructor(t,e,i,s){if(super(v.createElementNS(bt,"pattern")),this._id="SvgjsPattern"+ ++Zs,this.attr({id:this._id,width:e,height:i,patternUnits:"userSpaceOnUse"}),"function"==typeof s){s(new Js(this.node))}let a=t.node.querySelector("defs");a||(a=v.createElementNS(bt,"defs"),t.node.appendChild(a)),a.appendChild(this.node)}url(){return"url(#"+this._id+")"}toString(){return this.url()}valueOf(){return this.url()}fill(){return this.url()}}class Js extends js{line(t,e,i,s){const a=this._make("line");return void 0!==t&&a.attr({x1:t,y1:e,x2:i,y2:s}),a}rect(t,e){const i=this._make("rect");return void 0!==t&&i.attr({width:t,height:e}),i}circle(t){const e=this._make("circle");return void 0!==t&&e.attr({r:t/2,cx:t/2,cy:t/2}),e}path(t){const e=this._make("path");return t&&e.attr("d",t),e}polygon(t){const e=this._make("polygon");return t&&e.attr("points",t),e}group(){return this._makeContainer("g")}defs(){return this._makeContainer("defs")}plain(t){const e=v.createElementNS(bt,"text");e.textContent=t;const i=new js(e);return this.node.appendChild(e),i}text(t){const e=v.createElementNS(bt,"text"),i=new js(e);return this.node.appendChild(e),"function"==typeof t&&t(new Qs(e)),i}image(t,e){const i=v.createElementNS(bt,"image");i.setAttributeNS("http://www.w3.org/1999/xlink","href",t);const s=new js(i);if(this.node.appendChild(i),"function"==typeof e&&p.isBrowser()){const i=new Image;i.onload=function(){s.size(i.width,i.height),e.call(s,{width:i.width,height:i.height})},i.src=t}return s}gradient(t,e){return new Vs(this,t,e)}pattern(t,e,i){return new Ks(this,t,e,i)}_make(t){const e=v.createElementNS(bt,t);return this.node.appendChild(e),new js(e)}_makeContainer(t){const e=v.createElementNS(bt,t);return this.node.appendChild(e),new Js(e)}}class Qs{constructor(t){this.textNode=t}tspan(t){const e=v.createElementNS(bt,"tspan");return e.textContent=t,this.textNode.appendChild(e),new ta(e,this.textNode)}}class ta{constructor(t,e){this.node=t,this.textNode=e}newLine(){return this.node.setAttribute("dy","1.1em"),this.node.dataset.newline="1",this}}let ea=0;class ia extends js{constructor(){super(v.createElementNS(bt,"filter")),this._id="SvgjsFilter"+ ++ea,this.attr("id",this._id)}}class sa{constructor(t){this.filter=t}colorMatrix(t){return this._primitive("feColorMatrix",t)}offset(t){return this._primitive("feOffset",t)}gaussianBlur(t){return this._primitive("feGaussianBlur",t)}flood(t){return this._primitive("feFlood",t)}composite(t){return this._primitive("feComposite",t)}merge(t){const e=v.createElementNS(bt,"feMerge");return t.forEach(t=>{const i=v.createElementNS(bt,"feMergeNode");i.setAttribute("in",t),e.appendChild(i)}),this.filter.node.appendChild(e),new js(e)}_primitive(t,e){const i=v.createElementNS(bt,t);for(const t in e)i.setAttribute(t,e[t]);return this.filter.node.appendChild(i),new js(i)}}function aa(t){t.prototype.filterWith=function(t,e=""){let i=this.node;for(;i&&"svg"!==i.nodeName;)i=i.parentNode;const s=i&&i.sharedFilters||{};let a=s[e];if(!a||!a.node.parentNode){if(a=new ia,i){let t=i.querySelector("defs");t||(t=v.createElementNS(bt,"defs"),i.insertBefore(t,i.firstChild)),t.appendChild(a.node),e&&((i.sharedFilters=s)[e]=a)}a.shared=e,t(new sa(a))}return this._filter=a,this.attr("filter","url(#"+a._id+")"),this},t.prototype.unfilter=function(t){const e=this._filter;return e&&(this.node.removeAttribute("filter"),t&&!e.shared&&e.node.parentNode&&e.node.parentNode.removeChild(e.node),this._filter=null),this},t.prototype.filterer=function(){return this._filter}}function ra(t){t.prototype.draggable=function(t){if(!1===t)return this._dragCleanup&&(this._dragCleanup(),this._dragCleanup=null),this;const e=this,i=t||{},s=t=>{if(t.button&&0!==t.button)return;t.stopPropagation();const s="touchstart"===t.type?t.touches[0]:t,a=e.node,r=parseFloat(a.getAttribute("x"))||0,o=parseFloat(a.getAttribute("y"))||0,n=s.clientX,l=s.clientY,c=a.ownerSVGElement;let h=null;c&&(h=c.getScreenCTM());const d=t=>{const e="touchmove"===t.type?t.touches[0]:t;let s=e.clientX-n,c=e.clientY-l;h&&(s/=h.a,c/=h.d);let d=r+s,p=o+c;const u=parseFloat(a.getAttribute("width"))||0,g=parseFloat(a.getAttribute("height"))||0;void 0!==i.minX&&d<i.minX&&(d=i.minX),void 0!==i.minY&&p<i.minY&&(p=i.minY),void 0!==i.maxX&&d+u>i.maxX&&(d=i.maxX-u),void 0!==i.maxY&&p+g>i.maxY&&(p=i.maxY-g);const x=new CustomEvent("dragmove",{detail:{handler:{move:function(t,e){a.setAttribute("x",t),a.setAttribute("y",e)}},box:{x:d,y:p,w:u,h:g,x2:d+u,y2:p+g}}});a.dispatchEvent(x)},u=()=>{p.isBrowser()&&(document.removeEventListener("mousemove",d),document.removeEventListener("touchmove",d),document.removeEventListener("mouseup",u),document.removeEventListener("touchend",u)),e._activeDrag=null};p.isBrowser()&&(document.addEventListener("mousemove",d),document.addEventListener("touchmove",d),document.addEventListener("mouseup",u),document.addEventListener("touchend",u),e._activeDrag={onMove:d,onUp:u})};return e.node.addEventListener("mousedown",s),e.node.addEventListener("touchstart",s),e._dragCleanup=()=>{e.node.removeEventListener("mousedown",s),e.node.removeEventListener("touchstart",s),e._activeDrag&&p.isBrowser()&&(document.removeEventListener("mousemove",e._activeDrag.onMove),document.removeEventListener("touchmove",e._activeDrag.onMove),document.removeEventListener("mouseup",e._activeDrag.onUp),document.removeEventListener("touchend",e._activeDrag.onUp),e._activeDrag=null)},e}}function oa(t){t.prototype.select=function(t){if(!1===t)return this._selectCleanup&&(this._selectCleanup(),this._selectCleanup=null),this;const e=this,{createHandle:i,updateHandle:s}=t,a=document.createElementNS(bt,"g");a.setAttribute("class","svg_select_points");const r=e.node.parentNode;r&&r.appendChild(a);const o={},n=["t","b","l","r","lt","rt","lb","rb"];n.forEach((t,e)=>{const s=new Js(document.createElementNS(bt,"g"));a.appendChild(s.node);const r=i(s,[0,0],e,[],t);o[t]={group:s,handle:r}});const l=()=>{const t=parseFloat(e.attr("x"))||0,i=parseFloat(e.attr("y"))||0,r=parseFloat(e.attr("width"))||0,l=parseFloat(e.attr("height"))||0,c=e.node.getAttribute("transform");c?a.setAttribute("transform",c):a.removeAttribute("transform");const h={t:[t+r/2,i],b:[t+r/2,i+l],l:[t,i+l/2],r:[t+r,i+l/2],lt:[t,i],rt:[t+r,i],lb:[t,i+l],rb:[t+r,i+l]};n.forEach(t=>{o[t]&&h[t]&&s(o[t].group,h[t])})};return l(),e._selectHandles=a,e._selectHandlesMap=o,e._updateSelectPositions=l,e._selectCleanup=()=>{a.parentNode&&a.parentNode.removeChild(a),e._selectHandles=null,e._selectHandlesMap=null,e._updateSelectPositions=null},e},t.prototype.resize=function(t){if(!1===t)return this._resizeCleanup&&(this._resizeCleanup(),this._resizeCleanup=null),this;const e=this,i=e._selectHandlesMap;if(!i)return e;const s=[],a=t=>{const a=i[t];if(!a||!a.group||!a.group.node)return;const r=a.group.node,o=i=>{if(i.button&&0!==i.button)return;i.stopPropagation();const s=("touchstart"===i.type?i.touches[0]:i).clientX,a=e.node.ownerSVGElement;let r=null;a&&(r=a.getScreenCTM());const o=parseFloat(e.attr("x"))||0,n=parseFloat(e.attr("width"))||0,l=i=>{let a=("touchmove"===i.type?i.touches[0]:i).clientX-s;r&&(a/=r.a);let l=o,c=n;"l"===t?(l=o+a,c=n-a):"r"===t&&(c=n+a),c<0&&(c=0),e.attr({x:l,width:c}),e._updateSelectPositions&&e._updateSelectPositions();const h=new CustomEvent("resize",{detail:{el:e}});e.node.dispatchEvent(h)},c=()=>{p.isBrowser()&&(document.removeEventListener("mousemove",l),document.removeEventListener("touchmove",l),document.removeEventListener("mouseup",c),document.removeEventListener("touchend",c));const t=new CustomEvent("resize",{detail:{el:e}});e.node.dispatchEvent(t)};p.isBrowser()&&(document.addEventListener("mousemove",l),document.addEventListener("touchmove",l),document.addEventListener("mouseup",c),document.addEventListener("touchend",c))};r.addEventListener("mousedown",o),r.addEventListener("touchstart",o),s.push(()=>{r.removeEventListener("mousedown",o),r.removeEventListener("touchstart",o)})};return a("l"),a("r"),e._resizeCleanup=()=>{s.forEach(t=>t())},e}}function na(){const t=v.createElementNS(bt,"svg"),e=new Js(t);return e.attr({xmlns:bt}),e}aa(js),Ot(js),ra(js),oa(js),na.xlink="http://www.w3.org/1999/xlink",p.isBrowser()&&void 0===window.SVG&&(window.SVG=na),p.isBrowser()?(void 0===window.SVG&&(window.SVG=na),void 0===window.Apex&&(window.Apex={})):"undefined"!=typeof global&&(void 0===global.Apex&&(global.Apex={}),void 0===global.SVG&&(global.SVG=na));const la="__apexcharts_features_v1__";globalThis[la]||(globalThis[la]=new Map);class ca{static get _featureRegistry(){return globalThis[la]}static registerFeatures(t){for(const[e,i]of Object.entries(t))ca._featureRegistry.set(e,i)}constructor(t){this.ctx=t,this.w=t.w}initModules(){this.ctx.publicMethods=["updateOptions","updateSeries","appendData","appendSeries","isSeriesHidden","highlightSeries","toggleSeries","showSeries","hideSeries","setLocale","resetSeries","zoomX","toggleDataPointSelection","dataURI","exportToCSV","addXaxisAnnotation","addYaxisAnnotation","addPointAnnotation","clearAnnotations","removeAnnotation","drillDown","drillUp","drillToRoot","clearDrilldownCache","paper","getActiveRenderer","destroy"],this.ctx.eventList=["click","mousedown","mousemove","mouseleave","touchstart","touchmove","touchleave","mouseup","touchend","keydown","keyup"],this.ctx.animations=new se(this.w,this.ctx),this.ctx.axes=new ce(this.w,this.ctx),this.ctx.core=new Gi(this.ctx.el,this.w,this.ctx),this.ctx.config=new ht({}),this.ctx.data=new ls(this.w,{resetGlobals:()=>this.ctx.core.resetGlobals(),isMultipleY:()=>this.ctx.core.isMultipleY(),highlight:()=>this.ctx.highlightFilter}),this.ctx.grid=new pe(this.w,this.ctx),this.ctx.graphics=new xa(this.w,this.ctx),this.ctx.coreUtils=new mt(this.w),this.ctx.crosshairs=new de(this.w),this.ctx.events=new ae(this.w,this.ctx),this.ctx.localization=new re(this.w),this.ctx.options=new _,this.ctx.responsive=new me(this.w),this.ctx.series=new mi(this.w,{toggleDataSeries:(...t)=>{var e;return null==(e=this.ctx.legend)?void 0:e.legendHelpers.toggleDataSeries(...t)},revertDefaultAxisMinMax:()=>this.ctx.updateHelpers.revertDefaultAxisMinMax(),updateSeries:(...t)=>this.ctx.updateHelpers._updateSeries(...t)}),this.ctx.theme=new ki(this.w),this.ctx.formatters=new k(this.w),this.ctx.titleSubtitle=new Mi(this.w),this.ctx.dimensions=new Ei(this.w,this.ctx),this.ctx.updateHelpers=new us(this.w,this.ctx),this.ctx.rendererController=new Gs(this.w,this.ctx),this.ctx.renderer=this.ctx.rendererController.active;const t=new Hs(this.w,this.ctx);this.w.globals.tooltip=t,Object.defineProperty(this.ctx,"tooltip",{get(){return this.w.globals.tooltip},configurable:!0}),this._initOptionalModules()}_initOptionalModules(){const t=ca._featureRegistry,e=this.w,i=this.ctx;Object.defineProperty(i,"highlightFilter",{get(){var i;if(!this._highlightFilter){const i=t.get("highlightFilter");i&&(this._highlightFilter=new i(e,this))}return null!=(i=this._highlightFilter)?i:null},configurable:!0});const s=t.get("exports");i.exports=s?new s(e,i):null;const a=t.get("legend");i.legend=a?new a(e,i):null;const r=t.get("morphTypeChange");i.morphTypeChange=r?new r(e,i):null;const o=t.get("drilldown");i.drilldown=o?new o(e,i):null;const n=t.get("perspectives");i.perspectives=n?new n(e,i):null;const l=t.get("storyboard");i.storyboard=l?new l(e,i):null;const c=t.get("history");i.history=c?new c(e,i):null;const h=t.get("linkedViews");i.linkedViews=h?new h(e,i):null;const d=t.get("ink");i.ink=d?new d(e,i):null;const p=t.get("measure");i.measure=p?new p(e,i):null;const u=t.get("contextMenu");i.contextMenu=u?new u(e,i):null;const g=t.get("weave");i.weave=g?new g(e,i):null;const x=t.get("waterfall");i.waterfall=x?new x(e,i):null;const f=t.get("streamgraph");i.streamgraph=f?new f(e,i):null;const m=t.get("trellis");i.trellis=m?new m(e,i):null;const b=t.get("osThemeWatcher");i.osThemeWatcher=b?new b(e,i):null;const y=t.get("toolbar");Object.defineProperty(i,"toolbar",{get(){var t;return!this._toolbar&&y&&(this._toolbar=new y(e,this)),null!=(t=this._toolbar)?t:null},configurable:!0});const v=t.get("zoomPanSelection");Object.defineProperty(i,"zoomPanSelection",{get(){var t;return!this._zoomPanSelection&&v&&(this._zoomPanSelection=new v(e,this)),null!=(t=this._zoomPanSelection)?t:null},configurable:!0});const w=t.get("keyboardNavigation");Object.defineProperty(i,"keyboardNavigation",{get(){var t;return!this._keyboardNavigation&&w&&(this._keyboardNavigation=new w(e,this)),null!=(t=this._keyboardNavigation)?t:null},configurable:!0})}}const ha=.15,da=.35;class pa{constructor(t){this.w=t}static isSliceChart(t){const e=t.config.chart.type;return"pie"===e||"donut"===e||"polarArea"===e}static hoverOutlineOwnsHoverState(t){var e;return pa.isSliceChart(t)&&"none"!==t.config.states.hover.filter.type&&!0===(null==(e=t.config.plotOptions.pie.hoverOutline)?void 0:e.show)}static sliceExpandOffset(t){const e=t.config.plotOptions.pie,i=Number(e.expandOffset);return e.expandOnClick&&"polarArea"!==t.config.chart.type&&pa.isSliceChart(t)&&!pa.drilldownBlocksSliceOffset(t)&&Number.isFinite(i)&&i>0?i:0}static sliceOffsetOwnsActiveState(t){return pa.sliceExpandOffset(t)>0}static drilldownBlocksSliceOffset(t){var e;return pa.isSliceChart(t)&&!0===(null==(e=t.config.drilldown)?void 0:e.enabled)&&ca._featureRegistry.has("drilldown")}getDefaultFilter(t,e){const i=this.w;t.unfilter&&t.unfilter(!0),i.config.chart.dropShadow.enabled&&this.dropShadow(t,i.config.chart.dropShadow,e)}applyFilter(t,e,i,s){const a=this.w;if(t.unfilter&&t.unfilter(!0),"none"===i)return void this.getDefaultFilter(t,e);const r=a.config.chart.dropShadow,o="lighten"===i?ha:da,n=Math.max(0,Math.min(1,"number"==typeof s?s:o)),l=1-n,c="lighten"===i?n:0;t.filterWith&&t.filterWith(t=>{t.colorMatrix({type:"matrix",values:`\n ${l} 0 0 0 ${c}\n 0 ${l} 0 0 ${c}\n 0 0 ${l} 0 ${c}\n 0 0 0 1 0\n `,in:"SourceGraphic",result:"brightness"}),r.enabled&&this.addShadow(t,e,r,"brightness"),this._sizeFilter(t.filter.node,r)})}addShadow(t,e,i,s){var a;const r=this.w;let{blur:o,top:n,left:l,color:c,opacity:h}=i;if(c=Array.isArray(c)?c[e]:c,(null==(a=r.config.chart.dropShadow.enabledOnSeries)?void 0:a.length)>0&&-1===r.config.chart.dropShadow.enabledOnSeries.indexOf(e))return t;t.offset({in:s,dx:l,dy:n,result:"offset"}),t.gaussianBlur({in:"offset",stdDeviation:o,result:"blur"}),t.flood({"flood-color":c,"flood-opacity":h,result:"flood"}),t.composite({in:"flood",in2:"blur",operator:"in",result:"shadow"}),t.merge(["shadow",s])}dropShadow(t,e,i=0){var s,a;const r=this.w;return t.unfilter&&t.unfilter(!0),(null==(s=r.config.chart.dropShadow.enabledOnSeries)?void 0:s.length)>0&&-1===(null==(a=r.config.chart.dropShadow.enabledOnSeries)?void 0:a.indexOf(i))||t.filterWith&&t.filterWith(t=>{this.addShadow(t,i,e,"SourceGraphic"),this._sizeFilter(t.filter.node,e)},JSON.stringify(e)+i),t}setSelectionFilter(t,e,i){const s=this.w;if(void 0!==s.interact.selectedDataPoints[e]&&s.interact.selectedDataPoints[e].indexOf(i)>-1){if(t.node.setAttribute("selected",!0),pa.sliceOffsetOwnsActiveState(s))return;const i=s.config.states.active.filter;"none"!==i.type&&this.applyFilter(t,e,i.type,i.value)}}_sizeFilter(t,e){e.noUserSpaceOnUse||t.setAttribute("filterUnits","userSpaceOnUse");for(const[e,i]of Object.entries({width:"200%",height:"200%",x:"-50%",y:"-50%"}))t.setAttribute(e,i)}}function ua(t,e){if("number"==typeof e)return e;const i=t.config&&t.config.series||[];for(let t=0;t<i.length;t++)if(i[t]&&i[t].name===e)return t;return-1}function ga(t,e,i,s){if(!t||!t.weaveClaims)return s;const a=t.weaveClaims.byOption.get(e);if(!a||!a.length)return s;let r=s;for(const e of a)for(const s of e.entries)ua(t,s.series)===i&&(r=s.value);return r}class xa{constructor(t,e=null){this.w=t,this.ctx=e}roundPathCorners(t,e){function i(t,e,i){var a=e.x-t.x,r=e.y-t.y,o=Math.sqrt(a*a+r*r);return o?s(t,e,Math.min(1,i/o)):{x:t.x,y:t.y}}function s(t,e,i){return{x:t.x+(e.x-t.x)*i,y:t.y+(e.y-t.y)*i}}function a(t,e){t.length>2&&(t[t.length-2]=e.x,t[t.length-1]=e.y)}function r(t){return{x:parseFloat(t[t.length-2]),y:parseFloat(t[t.length-1])}}t.indexOf("NaN")>-1&&(t="");var o=t.split(/[,\s]/).reduce(function(t,e){var i=e.match(/^([a-zA-Z])(.+)/);return i?(t.push(i[1]),t.push(i[2])):t.push(e),t},[]).reduce(function(t,e){return parseFloat(e)==e&&t.length?t[t.length-1].push(e):t.push([e]),t},[]),n=[];if(o.length>1){var l=r(o[0]),c=null;"Z"==o[o.length-1][0]&&o[0].length>2&&(c=["L",l.x,l.y],o[o.length-1]=c),n.push(o[0]);for(var h=1;h<o.length;h++){var d=n[n.length-1],p=o[h],u=p==c?o[1]:o[h+1];if(u&&d&&d.length>2&&"L"==p[0]&&u.length>2&&"L"==u[0]){var g,x,f=r(d),m=r(p),b=r(u);g=i(m,f,e),x=i(m,b,e),a(p,g),p.origPoint=m,n.push(p);var y=s(g,m,.5),v=s(m,x,.5),w=["C",y.x,y.y,v.x,v.y,x.x,x.y];w.origPoint=m,n.push(w)}else n.push(p)}if(c){var A=r(n[n.length-1]);n.push(["Z"]),a(n[0],A)}}else n=o;return n.reduce(function(t,e){return t+e.join(" ")+" "},"")}drawLine(t,e,i,s,a="#a8a8a8",r=0,o=null,n="butt"){return this.w.dom.Paper.line().attr({x1:t,y1:e,x2:i,y2:s,stroke:a,"stroke-dasharray":r,"stroke-width":o,"stroke-linecap":n})}drawRect(t=0,e=0,i=0,s=0,a=0,r="#fefefe",o=1,n=null,l=null,c=0){const h=this.w.dom.Paper.rect();return h.attr({x:t,y:e,width:i>0?i:0,height:s>0?s:0,rx:a,ry:a,opacity:o,"stroke-width":null!==n?n:0,stroke:null!==l?l:"none","stroke-dasharray":c}),h.node.setAttribute("fill",r),h}drawPolygon(t,e="#e1e1e1",i=1,s="none"){return this.w.dom.Paper.polygon(t).attr({fill:s,stroke:e,"stroke-width":i})}drawCircle(t,e=null){t<0&&(t=0);const i=this.w.dom.Paper.circle(2*t);return null!==e&&i.attr(e),i}drawPath({d:t="",stroke:e="#a8a8a8",strokeWidth:i=1,fill:s,fillOpacity:a=1,strokeOpacity:r=1,classes:o,strokeLinecap:n=null,strokeDashArray:l=0}){const c=this.w;null===n&&(n=c.config.stroke.lineCap),(t.indexOf("undefined")>-1||t.indexOf("NaN")>-1)&&(t=`M 0 ${c.layout.gridHeight}`);return c.dom.Paper.path(t).attr({fill:s,"fill-opacity":a,stroke:e,"stroke-opacity":r,"stroke-linecap":n,"stroke-width":i,"stroke-dasharray":l,class:o})}group(t=null){const e=this.w.dom.Paper.group();return null!==t&&e.attr(t),e}move(t,e){return["M",t,e].join(" ")}line(t,e,i=null){return"H"===i?[" H",t].join(" "):"V"===i?[" V",e].join(" "):[" L",t,e].join(" ")}curve(t,e,i,s,a,r){return["C",t,e,i,s,a,r].join(" ")}arc(t,e,i,s,a,r,o,n=!1){let l="A";n&&(l="a");return[l,t,e,i,s,a,r,o].join(" ")}seriesDash(t){const e=this.w.config.stroke.dashArray;return ga(this.w,"stroke.dashArray",t,Array.isArray(e)?e[t]:e)}renderPaths({j:t,realIndex:e,pathFrom:i,pathTo:s,pathToInterp:a,stroke:r,strokeWidth:o,strokeLinecap:n,fill:h,animationDelay:d,initialSpeed:p,dataChangeSpeed:u,className:g,chartType:x,shouldClipToGrid:f=!0,bindEventsOnPaths:m="number"==typeof t,drawShadow:b=!0,drawMask:y=null,scrollMorph:v=!1,fadeReveal:w=!1}){var A,S,C,k;const M=this.w,T=new pa(this.w),_=new se(this.w,null!=(A=this.ctx)?A:void 0),D=this.w.config.chart.animations.enabled,F=D&&this.w.config.chart.animations.dynamicAnimation.enabled;if(i&&i.startsWith("M 0 0 ")&&s){const t=s.match(/^M\s+[\d.-]+\s+[\d.-]+/);t&&(i=i.replace(/^M\s+0\s+0/,t[0]))}let L;const E=!0===(null==(C=null==(S=this.ctx)?void 0:S.morphTypeChange)?void 0:C.isActive()),P=!!(D&&!M.globals.resized&&!M.globals.dataChanged||F&&M.globals.dataChanged&&M.globals.shouldAnimate||E&&D&&M.globals.shouldAnimate),B="string"==typeof g&&g.split(" ").some(t=>"apexcharts-line"===t||"apexcharts-area"===t||"apexcharts-rangeArea"===t||"apexcharts-radar"===t),N=!(!D||M.globals.resized||M.globals.dataChanged||!B),z=null!=(k=M.config.chart.animations.largeDatasetThreshold)?k:0,R=!!(P&&!N&&z>0&&M.globals.dataPoints>z),I=!(!w||!P||N||!M.globals.dataChanged||E),O=R||I;!P||N||O?(L=s,P||(M.globals.animationEnded=!0)):L=i;const X=this.drawPath({d:L,stroke:r,strokeWidth:o,fill:h,fillOpacity:1,classes:g,strokeLinecap:n,strokeDashArray:this.seriesDash(e)});X.attr("index",e),f&&("bar"===x&&!M.globals.isBarHorizontal||M.globals.comboCharts?X.attr({"clip-path":`url(#gridRectBarMask${M.globals.cuid})`}):X.attr({"clip-path":`url(#gridRectMask${M.globals.cuid})`})),M.config.chart.dropShadow.enabled&&b&&T.dropShadow(X,M.config.chart.dropShadow,e),m&&(X.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,X)),X.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,X)),X.node.addEventListener("mousedown",this.pathMouseDown.bind(this,X))),X.attr({pathTo:s,pathFrom:i});const H={el:X,j:t,realIndex:e,pathFrom:i,pathTo:s,pathToInterp:a,fill:h,strokeWidth:o,delay:d,scrollMorph:v};if(!D||M.globals.resized||M.globals.dataChanged){const t=M.globals.delayedElements;!M.globals.resized&&M.globals.dataChanged&&P||O||t.shown===t.length||(t.shown=t.length,_.showDelayedElements())}else if(N){const i=2*p,s="none"===r||0===o,a=M.seriesData.series.length,n=!!M.globals.comboCharts||e===a-1;_.animateDraw(X,{realIndex:e,j:t,isFill:s,isLast:n,speed:i,delay:0,mask:y})}else O||_.animatePathsGradually(c(l({},H),{speed:p}));return P&&!O&&(M.globals.dataChanged&&F||E)&&_.animatePathsGradually(c(l({},H),{speed:u})),O&&_.revealBulk(X),X}drawPattern(t,e,i,s="#a8a8a8",a=0){return this.w.dom.Paper.pattern(e,i,r=>{"horizontalLines"===t?r.line(0,0,i,0).stroke({color:s,width:a+1}):"verticalLines"===t?r.line(0,0,0,e).stroke({color:s,width:a+1}):"slantedLines"===t?r.line(0,0,e,i).stroke({color:s,width:a}):"squares"===t?r.rect(e,i).fill("none").stroke({color:s,width:a}):"circles"===t&&r.circle(e).fill("none").stroke({color:s,width:a})})}drawGradient(t,e,i,s,a,r=null,o=null,n=[],l=0,c=!1){const h=this.w;let d;e.length<9&&0===e.indexOf("#")&&(e=S.hexToRgba(e,s)),i.length<9&&0===i.indexOf("#")&&(i=S.hexToRgba(i,a));let p=0,u=1,g=1,x=null;null!==o&&(p=void 0!==o[0]?o[0]/100:0,u=void 0!==o[1]?o[1]/100:1,g=void 0!==o[2]?o[2]/100:1,x=void 0!==o[3]?o[3]/100:null);const f=!("donut"!==h.config.chart.type&&"pie"!==h.config.chart.type&&"polarArea"!==h.config.chart.type&&"bubble"!==h.config.chart.type);if(d=n&&0!==n.length?h.dom.Paper.gradient(f?"radial":"linear",t=>{(Array.isArray(n[l])?n[l]:Array.isArray(n[0])?n[0]||[]:n).forEach(e=>{t.stop(e.offset/100,e.color,e.opacity)})}):h.dom.Paper.gradient(f?"radial":"linear",t=>{t.stop(p,e,s),t.stop(u,i,a),t.stop(g,i,a),null!==x&&t.stop(x,e,s)}),f){const t=h.layout.gridWidth/2,e=h.layout.gridHeight/2;"bubble"!==h.config.chart.type?d.attr({gradientUnits:"userSpaceOnUse",cx:t,cy:e,r:r}):d.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else"vertical"===t?c?(d.attr({gradientUnits:"userSpaceOnUse"}),d.from(0,0).to(0,h.layout.gridHeight)):d.from(0,0).to(0,1):"diagonal"===t?d.from(0,0).to(1,1):"horizontal"===t?d.from(0,1).to(1,1):"diagonal2"===t&&d.from(1,0).to(0,1);return d}getTextBasedOnMaxWidth({text:t,maxWidth:e,fontSize:i,fontFamily:s,fontWeight:a}){const r=this.getTextRects(t,i,s,"",!0,a),o=Math.floor(e/(r.width/t.length))-3;return e<r.width?o<0?"":t.slice(0,o)+"...":t}drawText({x:t,y:e,text:i,textAnchor:s,fontSize:a,fontFamily:r,fontWeight:o,foreColor:n,opacity:c,maxWidth:h,cssClass:d="",isPlainText:p=!0,dominantBaseline:u="auto"}){const g=this.w;void 0===i&&(i="");let x=i;s||(s="start"),n&&n.length||(n=g.config.chart.foreColor),r=r||g.config.chart.fontFamily;const f={maxWidth:h,fontSize:a=a||"11px",fontFamily:r,fontWeight:o=o||"regular"};let m;return Array.isArray(i)?m=g.dom.Paper.text(t=>{for(let e=0;e<i.length;e++)x=i[e],h&&(x=this.getTextBasedOnMaxWidth(l({text:i[e]},f))),0===e?t.tspan(x):t.tspan(x).newLine()}):(h&&!p&&(x=this.getTextBasedOnMaxWidth(l({text:i},f))),m=p?g.dom.Paper.plain(i):g.dom.Paper.text(t=>t.tspan(x))),m.attr({x:t,y:e,"text-anchor":s,"dominant-baseline":u,"font-size":a,"font-family":r,"font-weight":o,fill:n,class:"apexcharts-text "+d}),m.node.style.fontFamily=r,m.node.style.opacity=c,m}getMarkerPath(t,e,i,s){let a="";switch(i){case"cross":a=`M ${t-(s/=1.4)} ${e-s} L ${t+s} ${e+s} M ${t-s} ${e+s} L ${t+s} ${e-s}`;break;case"plus":a=`M ${t-(s/=1.12)} ${e} L ${t+s} ${e} M ${t} ${e-s} L ${t} ${e+s}`;break;case"star":case"sparkle":{let r=5;s*=1.15,"sparkle"===i&&(s/=1.1,r=4);const o=Math.PI/r;for(let i=0;i<=2*r;i++){const r=i*o,n=i%2==0?s:s/2;a+=(0===i?"M":"L")+(t+n*Math.sin(r))+","+(e-n*Math.cos(r))}a+="Z";break}case"triangle":a=`M ${t} ${e-s} \n L ${t+s} ${e+s} \n L ${t-s} ${e+s} \n Z`;break;case"square":case"rect":a=`M ${t-(s/=1.125)} ${e-s} \n L ${t+s} ${e-s} \n L ${t+s} ${e+s} \n L ${t-s} ${e+s} \n Z`;break;case"diamond":a=`M ${t} ${e-(s*=1.05)} \n L ${t+s} ${e} \n L ${t} ${e+s} \n L ${t-s} ${e} \n Z`;break;case"line":a=`M ${t-(s/=1.1)} ${e} \n L ${t+s} ${e}`;break;default:a=`M ${t}, ${e} \n m -${(s*=2)/2}, 0 \n a ${s/2},${s/2} 0 1,0 ${s},0 \n a ${s/2},${s/2} 0 1,0 -${s},0`}return a}drawMarkerShape(t,e,i,s,a){const r=this.drawPath({d:this.getMarkerPath(t,e,i,s),stroke:a.pointStrokeColor,strokeDashArray:a.pointStrokeDashArray,strokeWidth:a.pointStrokeWidth,fill:a.pointFillColor,fillOpacity:a.pointFillOpacity,strokeOpacity:a.pointStrokeOpacity});return r.attr({cx:t,cy:e,shape:a.shape,class:a.class?a.class:""}),r}drawMarker(t,e,i){t=t||0;let s=i.pSize||0;return S.isNumber(e)||(s=0,e=0),this.drawMarkerShape(t,e,null==i?void 0:i.shape,s,l(l({},i),"line"===i.shape||"plus"===i.shape||"cross"===i.shape?{pointStrokeColor:i.pointFillColor,pointStrokeOpacity:i.pointFillOpacity}:{}))}pathMouseEnter(t,e){var i,s;const a=this.w,r=new pa(this.w),o=parseInt(null!=(i=t.node.getAttribute("index"))?i:"",10),n=parseInt(null!=(s=t.node.getAttribute("j"))?s:"",10);if(!(isNaN(o)||isNaN(n)||("function"==typeof a.config.chart.events.dataPointMouseEnter&&a.config.chart.events.dataPointMouseEnter(e,this.ctx,{seriesIndex:o,dataPointIndex:n,w:a}),xa._fireEvent(a,"dataPointMouseEnter",[e,this.ctx,{seriesIndex:o,dataPointIndex:n,w:a}]),"none"!==a.config.states.active.filter.type&&"true"===t.node.getAttribute("selected")||pa.hoverOutlineOwnsHoverState(a)||"none"===a.config.states.hover.filter.type||a.interact.isTouchDevice))){const e=a.config.states.hover.filter;r.applyFilter(t,pa.isSliceChart(a)?n:o,e.type,e.value)}}pathMouseLeave(t,e){var i,s;const a=this.w,r=new pa(this.w),o=parseInt(null!=(i=t.node.getAttribute("index"))?i:"",10),n=parseInt(null!=(s=t.node.getAttribute("j"))?s:"",10);isNaN(o)||isNaN(n)||("function"==typeof a.config.chart.events.dataPointMouseLeave&&a.config.chart.events.dataPointMouseLeave(e,this.ctx,{seriesIndex:o,dataPointIndex:n,w:a}),xa._fireEvent(a,"dataPointMouseLeave",[e,this.ctx,{seriesIndex:o,dataPointIndex:n,w:a}]),"none"!==a.config.states.active.filter.type&&"true"===t.node.getAttribute("selected")||pa.hoverOutlineOwnsHoverState(a)||"none"!==a.config.states.hover.filter.type&&r.getDefaultFilter(t,pa.isSliceChart(a)?n:o))}_clearAllDataPointSelections(t){const e=this.w;e.interact.selectedDataPoints=[],e.dom.Paper.find('.apexcharts-series [selected="true"]').forEach(i=>{i.node.setAttribute("selected","false"),t.getDefaultFilter(i,+i.node.getAttribute(pa.isSliceChart(e)?"j":"index"))})}_togglePointSelection(t,e,i,s){const a=this.w;if("true"===t.node.getAttribute("selected")){t.node.setAttribute("selected","false");const e=a.interact.selectedDataPoints[i].indexOf(s);return e>-1&&a.interact.selectedDataPoints[i].splice(e,1),"false"}return!a.config.states.active.allowMultipleDataPointsSelection&&a.interact.selectedDataPoints.length>0&&this._clearAllDataPointSelections(e),t.node.setAttribute("selected","true"),void 0===a.interact.selectedDataPoints[i]&&(a.interact.selectedDataPoints[i]=[]),a.interact.selectedDataPoints[i].push(s),"true"}_applyPointSelectionFilter(t,e,i,s){const a=this.w;if(!pa.sliceOffsetOwnsActiveState(a))if("true"===s){const s=a.config.states.active.filter;if("none"!==s.type)e.applyFilter(t,i,s.type,s.value);else if("none"!==a.config.states.hover.filter.type&&!a.interact.isTouchDevice){const s=a.config.states.hover.filter;e.applyFilter(t,i,s.type,s.value)}}else if("none"!==a.config.states.active.filter.type)if("none"===a.config.states.hover.filter.type||a.interact.isTouchDevice)e.getDefaultFilter(t,i);else{const s=a.config.states.hover.filter;e.applyFilter(t,i,s.type,s.value)}}pathMouseDown(t,e){var i,s;const a=this.w,r=new pa(this.w),o=parseInt(null!=(i=t.node.getAttribute("index"))?i:"",10),n=parseInt(null!=(s=t.node.getAttribute("j"))?s:"",10);if(isNaN(o)||isNaN(n))return;const l=a.config.chart.link;if(!!(!l||"function"!=typeof l.dimension&&!l.enabled)){const e=this._togglePointSelection(t,r,o,n);this._applyPointSelectionFilter(t,r,pa.isSliceChart(a)?n:o,e)}"function"==typeof a.config.chart.events.dataPointSelection&&a.config.chart.events.dataPointSelection(e,this.ctx,{selectedDataPoints:a.interact.selectedDataPoints,seriesIndex:o,dataPointIndex:n,w:a}),e&&xa._fireEvent(a,"dataPointSelection",[e,this.ctx,{selectedDataPoints:a.interact.selectedDataPoints,seriesIndex:o,dataPointIndex:n,w:a}])}rotateAroundCenter(t){let e={};t&&"function"==typeof t.getBBox&&(e=t.getBBox());return{x:e.x+e.width/2,y:e.y+e.height/2}}setupEventDelegation(t,e){let i=null;t.node.addEventListener("mouseover",s=>{const a=xa._findDelegateTarget(s.target,t.node,e);a&&a!==i&&(i&&i.instance&&this.pathMouseLeave(i.instance,s),i=a,a.instance&&this.pathMouseEnter(a.instance,s))}),t.node.addEventListener("mouseout",s=>{if(!i)return;(s.relatedTarget?xa._findDelegateTarget(s.relatedTarget,t.node,e):null)!==i&&(i&&i.instance&&this.pathMouseLeave(i.instance,s),i=null)}),t.node.addEventListener("mousedown",i=>{const s=xa._findDelegateTarget(i.target,t.node,e);s&&s.instance&&this.pathMouseDown(s.instance,i)})}static _fireEvent(t,e,i){const s=t.globals.events;if(!s||!Object.prototype.hasOwnProperty.call(s,e))return;const a=s[e];for(let t=0;t<a.length;t++)a[t].apply(null,i)}static _findDelegateTarget(t,e,i){for(;t&&t!==e;){if(t.matches&&t.matches(i))return t;t=t.parentNode}return null}static setAttrs(t,e){for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.setAttribute(i,e[i])}getTextRects(t,e,i,s,a=!0,r){const o=this.w,n=[t,e,i,s,a,r].join("\0"),l=o.globals.textRectsCache;if(l&&l.has(n))return l.get(n);const c=this.drawText({x:-200,y:-200,text:t,textAnchor:"start",fontSize:e,fontFamily:i,fontWeight:r,foreColor:"#fff",opacity:0});s&&c.attr("transform",s),o.dom.Paper.add(c);let h=c.bbox();const d=h.y;a||(h=c.node.getBoundingClientRect()),c.remove();const p={width:h.width,height:h.height,centerOffset:a?d+h.height/2- -200:0};return l&&l.set(n,p),p}placeTextWithEllipsis(t,e,i){if("function"==typeof t.getComputedTextLength&&(t.textContent=e,e.length>0&&t.getComputedTextLength()>=i/1.1)){for(let s=e.length-3;s>0;s-=3)if(t.getSubStringLength(0,s)<=i/1.1)return void(t.textContent=e.substring(0,s)+"...");t.textContent="."}}}class fa{constructor(t){this.w=t,this.opts=null,this.seriesIndex=0}clippedImgArea(t){const e=this.w,i=e.config,s=parseInt(String(e.layout.gridWidth),10),a=parseInt(String(e.layout.gridHeight),10),r=s>a?s:a,o=t.image;let n=0,l=0;void 0===t.width&&void 0===t.height?void 0!==i.fill.image.width&&void 0!==i.fill.image.height?(n=i.fill.image.width+1,l=i.fill.image.height):(n=r+1,l=r):(n=t.width,l=t.height);const c=v.createElementNS(bt,"pattern");xa.setAttrs(c,{id:t.patternID,patternUnits:t.patternUnits?t.patternUnits:"userSpaceOnUse",width:n+"px",height:l+"px"});const h=v.createElementNS(bt,"image");c.appendChild(h);const d=p.isBrowser()?window.SVG:global.SVG;h.setAttributeNS(d.xlink,"href",o),xa.setAttrs(h,{x:0,y:0,preserveAspectRatio:"none",width:n+"px",height:l+"px"}),h.style.opacity=t.opacity,e.dom.elDefs.node.appendChild(c)}getSeriesIndex(t){const e=this.w,i=e.config.chart.type;return("bar"===i||"rangeBar"===i)&&e.config.plotOptions.bar.distributed||"heatmap"===i||"treemap"===i?this.seriesIndex=t.seriesNumber:this.seriesIndex=t.seriesNumber%e.seriesData.series.length,this.seriesIndex}getSeriesAxisRange(t){var e,i;const s=this.w,a=null!=(i=null==(e=s.globals.seriesYAxisReverseMap)?void 0:e[t])?i:0,r=s.config.yaxis[a];return{minY:S.isNumber(s.globals.minYArr[t])?s.globals.minYArr[t]:s.globals.minY,maxY:S.isNumber(s.globals.maxYArr[t])?s.globals.maxYArr[t]:s.globals.maxY,reversed:!!(null==r?void 0:r.reversed),log:!!(null==r?void 0:r.logarithmic)}}computeColorStops(t,e){const i=this.w,{threshold:s,colorAboveThreshold:a,colorBelowThreshold:r}=e,{minY:o,maxY:n}=t,l=n-o;let c=0===l?s>n?0:100:t.log&&o>0&&s>0?100-Math.log(s/o)/Math.log(n/o)*100:(n-s)/l*100;t.reversed&&(c=100-c),c=Math.max(0,Math.min(c,100));const h=Array.isArray(i.config.fill.opacity)?i.config.fill.opacity[this.seriesIndex]:i.config.fill.opacity,d={offset:c,color:a,opacity:h},p={offset:c,color:r,opacity:h};return t.reversed?[p,d]:[d,p]}fillPath(t){var e,i,s,a,r,o,n;const l=this.w;this.opts=t;const c=this.w.config;let h,d,p;this.seriesIndex=this.getSeriesIndex(t);const u=l.config.series[this.seriesIndex],g=c.plotOptions.line.colors.colorAboveThreshold&&c.plotOptions.line.colors.colorBelowThreshold&&/^(line|area|rangeArea)$/.test((null==u?void 0:u.type)||c.chart.type);let x=this.getFillColors()[this.seriesIndex];void 0!==l.seriesData.seriesColors[this.seriesIndex]&&(x=l.seriesData.seriesColors[this.seriesIndex]),"function"==typeof x&&(x=x({seriesIndex:this.seriesIndex,dataPointIndex:t.dataPointIndex,value:t.value,w:l}));const f=t.fillType?t.fillType:this.getFillType(this.seriesIndex);let m=Array.isArray(c.fill.opacity)?c.fill.opacity[this.seriesIndex]:c.fill.opacity;const b="gradient"===f||g;t.color&&(x=t.color),(null==(i=null==(e=null==u?void 0:u.data)?void 0:e[t.dataPointIndex])?void 0:i.fillColor)&&(x=null==(a=null==(s=null==u?void 0:u.data)?void 0:s[t.dataPointIndex])?void 0:a.fillColor),x||(x="#fff",console.warn("undefined color - ApexCharts")),void 0!==t.opacity&&null!==t.opacity&&(m=t.opacity);let y=x;S.isCSSVariable(x)?y=S.applyOpacityToColor(x,m):-1===x.indexOf("rgb")?-1===x.indexOf("#")?y=x:x.length<9&&(y=S.hexToRgba(x,m)):x.indexOf("rgba")>-1?m=S.getOpacityFromRGBA(x):y=S.hexToRgba(S.rgb2hex(x),m);const v=()=>{const t=l.globals.themeColors;return t[x]||(t[x]=S.getThemeColor(x,l.dom.elWrap))};if("pattern"===f&&(d=this.handlePatternFill({fillConfig:t.fillConfig,patternFill:d,fillColor:v(),defaultColor:y})),b){const e=c.fill.gradient.colorStops?[...c.fill.gradient.colorStops]:[];let i=null!=(n=null==(o=null==(r=t.fillConfig)?void 0:r.gradient)?void 0:o.type)?n:c.fill.gradient.type;g&&(e[this.seriesIndex]=this.computeColorStops(this.getSeriesAxisRange(this.seriesIndex),c.plotOptions.line.colors),i="vertical"),p=this.handleGradientFill({type:i,fillConfig:t.fillConfig,fillColor:v(),fillOpacity:m,colorStops:e,i:this.seriesIndex,verticalUserSpace:g})}if("image"===f){const e=c.fill.image.src,i=t.patternID?t.patternID:"",s=`pattern${l.globals.cuid}${t.seriesNumber+1}${i}`,a=l.dom.elDefs.node,r=a.imagePatterns||(a.imagePatterns={});r[s]||(this.clippedImgArea({opacity:m,image:Array.isArray(e)?t.seriesNumber<e.length?e[t.seriesNumber]:e[0]:e,width:t.width?t.width:void 0,height:t.height?t.height:void 0,patternUnits:t.patternUnits,patternID:s}),r[s]=1),h=`url(#${s})`}else h=b?p:"pattern"===f?d:y;return t.solid&&(h=y),h}getFillType(t){const e=this.w;return Array.isArray(e.config.fill.type)?e.config.fill.type[t]:e.config.fill.type}getFillColors(){const t=this.w,e=t.config,i=this.opts;let s=[];return t.globals.comboCharts?"line"===t.config.series[this.seriesIndex].type?Array.isArray(t.globals.stroke.colors)?s=t.globals.stroke.colors:s.push(t.globals.stroke.colors):Array.isArray(t.globals.fill.colors)?s=t.globals.fill.colors:s.push(t.globals.fill.colors):"line"===e.chart.type?Array.isArray(t.globals.stroke.colors)?s=t.globals.stroke.colors:s.push(t.globals.stroke.colors):Array.isArray(t.globals.fill.colors)?s=t.globals.fill.colors:s.push(t.globals.fill.colors),void 0!==i.fillColors&&(s=[],Array.isArray(i.fillColors)?s=i.fillColors.slice():s.push(i.fillColors)),s}handlePatternFill({fillConfig:t,patternFill:e,fillColor:i,defaultColor:s}){let a=this.w.config.fill;t&&(a=t);const r=this.opts,o=new xa(this.w),n=Array.isArray(a.pattern.strokeWidth)?a.pattern.strokeWidth[this.seriesIndex]:a.pattern.strokeWidth,l=i;if(Array.isArray(a.pattern.style))if(void 0!==a.pattern.style[r.seriesNumber]){e=o.drawPattern(a.pattern.style[r.seriesNumber],a.pattern.width,a.pattern.height,l,n)}else e=s;else e=o.drawPattern(a.pattern.style,a.pattern.width,a.pattern.height,l,n);return e}handleGradientFill({type:t,fillColor:e,fillOpacity:i,fillConfig:s,colorStops:a,i:r,verticalUserSpace:o=!1}){let n=this.w.config.fill;s&&(n=l(l({},n),s));const c=this.opts,h=new xa(this.w),d=new S;t=t||n.gradient.type;let p,u=e,g=void 0===n.gradient.opacityFrom?i:Array.isArray(n.gradient.opacityFrom)?n.gradient.opacityFrom[r]:n.gradient.opacityFrom;u.indexOf("rgba")>-1&&(g=S.getOpacityFromRGBA(u));let x=void 0===n.gradient.opacityTo?i:Array.isArray(n.gradient.opacityTo)?n.gradient.opacityTo[r]:n.gradient.opacityTo;if(void 0===n.gradient.gradientToColors||0===n.gradient.gradientToColors.length)p="dark"===n.gradient.shade?d.shadeColor(-1*parseFloat(n.gradient.shadeIntensity),e.indexOf("rgb")>-1?S.rgb2hex(e):e):d.shadeColor(parseFloat(n.gradient.shadeIntensity),e.indexOf("rgb")>-1?S.rgb2hex(e):e);else if(n.gradient.gradientToColors[c.seriesNumber]){const t=n.gradient.gradientToColors[c.seriesNumber];p=t,t.indexOf("rgba")>-1&&(x=S.getOpacityFromRGBA(t))}else p=e;if(n.gradient.gradientFrom&&(u=n.gradient.gradientFrom),n.gradient.gradientTo&&(p=n.gradient.gradientTo),n.gradient.inverseColors){const t=u;u=p,p=t}return u.indexOf("rgb")>-1&&(u=S.rgb2hex(u)),p.indexOf("rgb")>-1&&(p=S.rgb2hex(p)),h.drawGradient(t,u,p,g,x,c.size,n.gradient.stops,a,r,o)}}class ma{constructor(t,e){this.ctx=e,this.w=t,this.initialAnim=this.w.config.chart.animations.enabled,this.anim=new se(this.w),this.filters=new pa(this.w),this.fill=new fa(this.w),this.markers=new Ns(this.w,this.ctx),this.graphics=new xa(this.w),this._elPointsWrap=null,this._elPointsWrapParent=null,this._perSeries=null}draw(t,e,i){const s=this.w,a=this.graphics,r=Ps(this.ctx,a),o=i.realIndex,n=i.pointsPos,l=i.zRatio,c=i.elParent;let h=this._elPointsWrap;if(h&&this._elPointsWrapParent===c||(h=r.group({class:`apexcharts-series-markers apexcharts-series-${s.config.chart.type}`}),h.attr("clip-path",`url(#gridRectMarkerMask${s.globals.cuid})`),this.markers.setupMarkerDelegation(h),c.add(h),this._elPointsWrap=h,this._elPointsWrapParent=c,this._perSeries=this._buildPerSeriesCache(o,r)),Array.isArray(n.x))for(let t=0;t<n.x.length;t++){let i=e+1,a=!0;0===e&&0===t&&(i=0),0===e&&1===t&&(i=1);let c=s.globals.markers.size[o];if(l!==1/0){const t=s.config.plotOptions.bubble;c=s.seriesData.seriesZ[o][i],t.zScaling&&(c/=l),t.minBubbleRadius&&c<t.minBubbleRadius&&(c=t.minBubbleRadius),t.maxBubbleRadius&&c>t.maxBubbleRadius&&(c=t.maxBubbleRadius)}const d=n.x[t],p=n.y[t];if(c=c||0,null!==p&&void 0!==s.seriesData.series[o][i]||(a=!1),a){const t=this.drawPoint(d,p,c,o,i,e);h.add(t),"canvas"===r.kind&&(void 0===s.globals.pointsArray[o]&&(s.globals.pointsArray[o]=[]),s.globals.pointsArray[o][i]=[d,p])}}}_buildPerSeriesCache(t,e){var i;const s=this.w;return{realIndex:t,emit:e,isBubble:"bubble"===s.config.chart.type||s.globals.comboCharts&&s.config.series[t]&&"bubble"===s.config.series[t].type,canCacheConfig:!s.config.markers.discrete.length,markerConfig:null,fillCacheable:void 0,fillCircle:void 0,dropShadowEnabled:s.config.chart.dropShadow.enabled,doInitialAnim:this.initialAnim&&!s.globals.dataChanged&&!s.globals.resized,jitter:null==(i=s.config.plotOptions.scatter)?void 0:i.jitter,anim:null}}drawPoint(t,e,i,s,a,r){var o;const n=this.w,l=s,c=this.anim,h=this.filters,d=this.fill,p=this.markers;let u=this._perSeries;u&&u.realIndex===s||(u=this._perSeries=this._buildPerSeriesCache(s,Ps(this.ctx,this.graphics)));const g=u.emit;let x;u.canCacheConfig?(u.markerConfig||(u.markerConfig=p.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:l,dataPointIndex:a,radius:u.isBubble?i:null})),x=u.markerConfig,u.isBubble&&(x.pSize=i,x.pRadius=i)):x=p.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:l,dataPointIndex:a,radius:u.isBubble?i:null});const f=n.config.series[l].data[a];let m;void 0!==u.fillCircle?m=u.fillCircle:(m=d.fillPath({seriesNumber:s,dataPointIndex:a,color:x.pointFillColor,patternUnits:"objectBoundingBox",value:n.seriesData.series[s][r]}),void 0===u.fillCacheable&&(u.fillCacheable=u.canCacheConfig&&"solid"===d.getFillType(s)&&"string"==typeof x.pointFillColor&&!!x.pointFillColor),u.fillCacheable&&!(null==f?void 0:f.fillColor)&&(u.fillCircle=m));const b=g.drawMarker(t,e,x);(null==f?void 0:f.fillColor)&&(m=f.fillColor);const y=u.jitter;if((null==y?void 0:y.enabled)&&y.distributed&&n.globals.colors.length){const t=Math.round(null==(o=n.seriesData.seriesX[s])?void 0:o[a]);isNaN(t)||(m=n.globals.colors[t%n.globals.colors.length])}if(b.attr({fill:m}),u.dropShadowEnabled){const t=n.config.chart.dropShadow;h.dropShadow(b,t,s)}if(u.doInitialAnim){if(!u.anim){const t=n.config.chart.animations,e=n.globals.dataPoints||1,i=t.animateGradually,s=i&&!1!==i.enabled;u.anim={popSpeed:t.speed,baseDelay:s?Math.min(20,.5*t.speed/Math.max(1,e)):0}}const t=te({style:u.anim.baseDelay>0?"sequential":"none",index:a,baseDelay:u.anim.baseDelay});c.animatePop(b,{speed:u.anim.popSpeed,delay:t,onComplete:()=>c.animationCompleted(b)})}else n.globals.animationEnded=!0;return b.attr({rel:a,j:a,index:s,"default-marker-size":x.pSize}),h.setSelectionFilter(b,s,a),b}centerTextInBubble(t){const e=this.w;return{y:t+=parseInt(e.config.dataLabels.style.fontSize,10)/4}}}const ba=(t,e,i,s)=>{if("function"!=typeof t)return t;const a=t({series:e.seriesData.series,seriesIndex:i,dataPointIndex:s,w:e});return Number.isFinite(a)?a:0};function ya(t,e,i,s){const a=t.y+e,r=i.y+s;return Math.min(a+t.height,r+i.height)-Math.max(a,r)}function va(t,e){return Math.min(t.x+t.width,e.x+e.width)-Math.max(t.x,e.x)}const wa=["radar","pie","donut","polarArea","radialBar"];function Aa(t,e){var i;const s=null==(i=t.config.series[e])?void 0:i.type;return!s||"line"===s||"area"===s||"rangeArea"===s}class Sa{constructor(t,e=null){this.w=t,this.ctx=e}dataLabelsCorrection(t,e,i,s,a,r,o){var n;const l=this.w;let c=!1;const h=new xa(this.w).getTextRects(i,o),d=h.width,p=h.height;e<0&&(e=0),e>l.layout.gridHeight+p&&(e=l.layout.gridHeight+p/2),void 0===l.globals.dataLabelsRects[s]&&(l.globals.dataLabelsRects[s]=[]),l.globals.dataLabelsRects[s].push({x:t,y:e,width:d,height:p});const u=l.globals.dataLabelsRects[s].length-2,g=void 0!==l.globals.lastDrawnDataLabelsIndexes[s]?l.globals.lastDrawnDataLabelsIndexes[s][l.globals.lastDrawnDataLabelsIndexes[s].length-1]:0;if(void 0!==l.globals.dataLabelsRects[s][u]){const i=l.globals.dataLabelsRects[s][g];(t>i.x+i.width||e>i.y+i.height||e+p<i.y||t+d<i.x)&&(c=!0)}return(0===a||r)&&(c=!0),c&&((n=l.globals.lastDrawnDataLabelsIndexes)[s]||(n[s]=[])).push(u+1),{x:t,y:e,textRects:h,drawnextLabel:c}}drawDataLabel({type:t,pos:e,i:i,j:s,isRangeStart:a,strokeWidth:r=2,row:o}){const n=this.w,l=new xa(this.w),c=n.config.dataLabels;let h=0,d=0,p=s,u=null;if(-1!==n.globals.collapsedSeriesIndices.indexOf(i)||!c.enabled||!Array.isArray(e.x))return u;u=l.group({class:"apexcharts-data-labels"});for(let l=0;l<e.x.length;l++)if(1===s&&0===l&&(p=0),1===s&&1===l&&(p=1),h=e.x[l]+ba(c.offsetX,n,i,p),d=e.y[l]+ba(c.offsetY,n,i,p)+r,!isNaN(h)){let s=(o||n.seriesData.series[i])[p];"rangeArea"===t&&(s=a?n.rangeData.seriesRangeStart[i][p]:n.rangeData.seriesRangeEnd[i][p]);let r="";const c=t=>n.config.dataLabels.formatter(t,{ctx:this.ctx,seriesIndex:i,dataPointIndex:p,w:n});if("bubble"===n.config.chart.type){s=n.seriesData.seriesZ[i][p],r=c(s),d=e.y[l];d=new ma(this.w,this.ctx).centerTextInBubble(d).y}else void 0!==s&&(r=c(s));let g=n.config.dataLabels.textAnchor;n.globals.isSlopeChart&&(g=0===p?"end":p===n.config.series[i].data.length-1?"start":"middle"),this.plotDataLabelsText({x:h,y:d,text:r,i:i,j:p,parent:u,offsetCorrection:!0,dataLabelsConfig:n.config.dataLabels,textAnchor:g})}return u}plotDataLabelsText(t){const e=this.w,i=new xa(this.w);let{x:s,y:a,i:r,j:o,text:n,textAnchor:l,fontSize:c,parent:h,dataLabelsConfig:d,color:p,alwaysDrawDataLabel:u,offsetCorrection:g,className:x,seriesIndex:f=r,dataPointIndex:m=o}=t,b=null;if(!ga(e,"dataLabels.enabledOnSeries",r,!Array.isArray(e.config.dataLabels.enabledOnSeries)||e.config.dataLabels.enabledOnSeries.indexOf(r)>=0))return b;let y={x:s,y:a,drawnextLabel:!0,textRects:null};if(g&&(y=this.dataLabelsCorrection(s,a,n,r,o,u,parseInt(d.style.fontSize,10).toString())),e.interact.zoomed||(s=y.x,a=y.y),y.textRects){const t=e.globals.barPadForNumericAxis||0;(s<-(t+20)-y.textRects.width||s>e.layout.gridWidth+y.textRects.width+t+30)&&(n="")}let v=e.globals.dataLabels.style.colors[r];(("bar"===e.config.chart.type||"rangeBar"===e.config.chart.type)&&e.config.plotOptions.bar.distributed||e.config.dataLabels.distributed)&&(v=e.globals.dataLabels.style.colors[o]),"function"==typeof v&&(v=v({series:e.seriesData.series,seriesIndex:r,dataPointIndex:o,w:e})),p&&(v=p);const w="bar"===e.config.chart.type||"rangeBar"===e.config.chart.type,A=w?0:ba(d.offsetX,e,f,m);let S=A;const C=w?0:ba(d.offsetY,e,f,m);if(e.globals.isSlopeChart&&(0!==o&&(S=-2*A+5),0!==o&&o!==e.config.series[r].data.length-1&&(S=0)),y.drawnextLabel){const t=l||d.textAnchor,o=e.globals.svgWidth-e.layout.translateX,p=parseFloat(c||d.style.fontSize);if(!(s+S+String(n).length*p*1.2<=o)&&("middle"===t||"start"===t)){const e=y.textRects||i.getTextRects(n,c||d.style.fontSize,d.style.fontFamily,"",!0,d.style.fontWeight);s+S+("middle"===t?e.width/2:e.width)>o&&(l="end")}if(b=i.drawText({x:s+S,y:a+C,foreColor:v,textAnchor:l||d.textAnchor,text:n,fontSize:c||d.style.fontSize,fontFamily:d.style.fontFamily,fontWeight:d.style.fontWeight||"normal"}),b.attr({class:x||"apexcharts-datalabel",cx:s,cy:a}),d.dropShadow.enabled){const t=d.dropShadow;new pa(this.w).dropShadow(b,t)}h.add(b),Aa(e,r)&&Jt(b,s,e)}return b}addBackgroundToDataLabel(t,e){const i=this.w,s=i.config.dataLabels.background,a=s.padding,r=s.padding/2,o=e.width,n=e.height,l=new xa(this.w).drawRect(e.x-a,e.y-r/2,o+2*a,n+r,s.borderRadius,"transparent"!==i.config.chart.background&&i.config.chart.background?i.config.chart.background:"#fff",s.opacity,s.borderWidth,s.borderColor);if(s.dropShadow.enabled){new pa(this.w).dropShadow(l,s.dropShadow)}return l}avoidOverlaps(){var t,e,i,s,a,r,o;const n=this.w,l=n.config.dataLabels.avoidOverlap;if(!l)return;if(-1!==wa.indexOf(n.config.chart.type))return;const c="object"==typeof l?l:{},h=n.config.dataLabels.background,d=n.dom.baseEl.querySelectorAll(".apexcharts-datalabels text.apexcharts-datalabel");if(d.length<2)return;const p=[];let u=!1;for(let e=0;e<d.length;e++){const i=d[e],s=i.getBoundingClientRect(),a=null==(t=i.getScreenCTM)?void 0:t.call(i),r=s.width>0&&s.height>0,o=r?s:i.getBBox();if(!o.width||!o.height)continue;r&&(u=!0);const n=!!a&&(Math.abs(a.b)>1e-6||Math.abs(a.c)>1e-6),l=r&&a&&a.d?Math.abs(a.d):1,c=r&&a&&a.a?Math.abs(a.a):1,g=(h.enabled?h.padding:0)*c,x=(h.enabled?h.padding/2:0)*l;p.push({el:i,scaleY:l,box:{x:(r?s.left:o.x)-g,y:(r?s.top:o.y)-x/2,width:o.width+2*g,height:o.height+x,order:p.length,fixed:n}})}if(p.length<2)return;const g=!!(null==(i=null==(e=n.config.plotOptions)?void 0:e.bar)?void 0:i.horizontal),x=p.map(({box:t})=>g?{x:t.y,y:t.x,width:t.height,height:t.width,order:t.order,fixed:t.fixed}:t),f=u?null==(r=null==(a=null==(s=n.dom.elGraphical)?void 0:s.node)?void 0:a.getScreenCTM)?void 0:r.call(a):null,m=!!f&&f.a>0&&f.d>0,b=x[0].height,y=p[0].scaleY,v=m?g?f.e:f.f:0,w=m?g?f.e+n.layout.gridWidth*f.a:f.f+n.layout.gridHeight*f.d:g?n.layout.gridWidth:n.layout.gridHeight,A=function(t,e){var i;const s=t.length,a=new Array(s);for(let t=0;t<s;t++)a[t]={dy:0,hidden:!1};if(s<2)return a;const{gap:r,maxShift:o,minY:n,maxY:l}=e,c=null!=(i=e.iterations)?i:6,h=t.map((t,e)=>e).sort((e,i)=>t[e].x-t[i].x),d=(e,i)=>{const s=t[e];if(s.fixed)return a[e].dy;const r=Math.max(-o,Math.min(o,i)),c=Math.min(0,n-s.y),h=Math.max(0,l-(s.y+s.height));return Math.max(c,Math.min(h,r))};for(let e=0;e<c;e++){let e=!1;for(let i=0;i<h.length;i++){const s=h[i],o=t[s];if(!a[s].hidden)for(let n=i+1;n<h.length;n++){const i=h[n],l=t[i];if(a[i].hidden)continue;if(l.x>=o.x+o.width)break;if(va(o,l)<=0)continue;const c=ya(o,a[s].dy,l,a[i].dy);if(c<=-r)continue;const p=c+r,u=o.y+a[s].dy+o.height/2,g=l.y+a[i].dy+l.height/2,x=u===g?o.order<=l.order:u<g,f=x?s:i,m=x?i:s,b=d(f,a[f].dy-p/2),y=d(m,a[m].dy+p/2),v=a[f].dy-b,w=p-(v+(y-a[m].dy));let A=b,S=y;if(w>.01){S=d(m,y+w);const t=p-(v+(S-a[m].dy));t>.01&&(A=d(f,b-t))}A===a[f].dy&&S===a[m].dy||(a[f].dy=A,a[m].dy=S,e=!0)}}if(!e)break}if(!e.hide)return a;for(let e=0;e<h.length;e++){const i=h[e];if(a[i].hidden)continue;const s=t[i];for(let r=e+1;r<h.length;r++){const e=h[r];if(a[e].hidden)continue;const o=t[e];if(o.x>=s.x+s.width)break;if(!(va(s,o)<=0)&&ya(s,a[i].dy,o,a[e].dy)>0){const r=s.order<=o.order?e:i,n=r===i?e:i,l=t[r].fixed?t[n].fixed?-1:n:r;if(-1===l)continue;if(a[l].hidden=!0,l===i)break}}}return a}(x,{gap:(null!=(o=c.gap)?o:2)*y,maxShift:c.maxShift?c.maxShift*y:Math.max(b,14),minY:v,maxY:w,hide:!0===c.hide}),S=g?"x":"y",C=g?"cx":"cy";for(let t=0;t<p.length;t++){const{el:e,scaleY:i}=p[t],{dy:s,hidden:a}=A[t];if(a){e.style.display="none",e.classList.add("apexcharts-datalabel-hidden");continue}if(!s)continue;const r=s/i,o=parseFloat(e.getAttribute(S)||"0");e.setAttribute(S,(o+r).toString());const n=e.getAttribute(C);null!==n&&e.setAttribute(C,(parseFloat(n)+r).toString())}}dataLabelsBackground(){var t,e;const i=this.w;if("bubble"===i.config.chart.type)return;const s=i.dom.baseEl.querySelectorAll(".apexcharts-datalabels text"),a=[];for(let t=0;t<s.length;t++){const e=s[t],i=e.getBBox();i.width&&i.height&&a.push({el:e,coords:{x:i.x,y:i.y,width:i.width,height:i.height},fill:e.getAttribute("fill")})}const r=i.config.dataLabels.background,o=null!=(t=i.config.chart.animations.largeDatasetThreshold)?t:0,n=o>0&&a.length>o,l=i.config.chart.animations.enabled&&!i.globals.resized&&!i.globals.dataChanged&&!n;for(let t=0;t<a.length;t++){const{el:s,coords:o,fill:c}=a[t],h=this.addBackgroundToDataLabel(s,o);if(!h)continue;null==(e=s.parentNode)||e.insertBefore(h.node,s);const d=r.backgroundColor||c;if(l?h.animate().attr({fill:d}):h.attr({fill:d}),s.setAttribute("fill",r.foreColor),!n){const t=s.getAttribute("cx"),e=s.closest&&s.closest(".apexcharts-datalabels");null!==t&&Aa(i,e&&e.getAttribute("data:realIndex"))&&Jt(h,parseFloat(t),i)}}}bringForward(){const t=this.w,e=t.dom.baseEl.querySelectorAll(".apexcharts-datalabels"),i=t.dom.baseEl.querySelector(".apexcharts-plot-series:last-child");for(let t=0;t<e.length;t++)i&&i.insertBefore(e[t],i.nextSibling)}}class Ca{constructor(t){this.ctx=t,this.w=t.w}clear({isUpdating:t}){var e,i,s,a,r,o,n,l,c,h,d,p,u,g,x,f,m,b;null==(e=this.ctx.weave)||e.teardown(t);const y=this.w.globals;t||(y.isDestroyed=!0,clearTimeout(null!=(i=y.resizeTimer)?i:void 0),clearTimeout(null!=(s=y.radialTickTimer)?s:void 0)),clearTimeout(null!=(a=y.selectionResizeTimer)?a:void 0),this.ctx._zoomPanSelection&&this.ctx._zoomPanSelection.destroy(),this.ctx._toolbar&&this.ctx._toolbar.destroy(),this.w.globals.resizeObserver&&"function"==typeof this.w.globals.resizeObserver.disconnect&&(this.w.globals.resizeObserver.disconnect(),this.w.globals.resizeObserver=null),cs.invalidateAll(this.w),t?(this.ctx._zoomPanSelection=null,this.ctx._toolbar=null,null==(r=this.ctx._keyboardNavigation)||r.destroy(!0),this.ctx._keyboardNavigation=null):(null==(o=this.ctx.perspectives)||o.teardown(),this.ctx.perspectives=null,null==(n=this.ctx.storyboard)||n.teardown(),this.ctx.storyboard=null,null==(l=this.ctx.history)||l.teardown(),this.ctx.history=null,null==(c=this.ctx.linkedViews)||c.teardown(),this.ctx.linkedViews=null,null==(h=this.ctx.trellis)||h.teardown(),this.ctx.trellis=null,null==(d=this.ctx.ink)||d.teardown(),this.ctx.ink=null,null==(p=this.ctx.measure)||p.teardown(),this.ctx.measure=null,null==(u=this.ctx._highlightFilter)||u.teardown(),this.ctx._highlightFilter=null,null==(g=this.ctx.contextMenu)||g.teardown(),this.ctx.contextMenu=null,null==(x=this.ctx.osThemeWatcher)||x.teardown(),this.ctx.osThemeWatcher=null,this.ctx.weave=null,null==(m=null==(f=this.ctx.rendererController)?void 0:f.teardown)||m.call(f),this.ctx.rendererController=null,this.ctx.renderer=null,this.ctx.drilldown=null,this.ctx.morphTypeChange=null,this.ctx.exports=null,this.ctx.animations=null,this.ctx.axes=null,this.ctx.annotations=null,null==(b=this.ctx.core)||b.unhookBrush(),this.ctx.core=null,this.ctx.data=null,this.ctx.grid=null,this.ctx.series=null,this.ctx.responsive=null,this.ctx.theme=null,this.ctx.formatters=null,this.ctx.titleSubtitle=null,this.ctx.legend=null,this.ctx.dimensions=null,this.ctx.options=null,this.ctx.crosshairs=null,this.ctx._zoomPanSelection=null,this.ctx.updateHelpers=null,this.ctx._toolbar=null,this.ctx.localization=null,this.ctx._keyboardNavigation=null,this.ctx.w.globals.tooltip=null),this.clearDomElements({isUpdating:t})}killSVG(t){t.each(function(){this.removeClass("*"),this.off()},!0),t.clear()}clearDomElements({isUpdating:t}){const e=this.w.dom;if(p.isBrowser()&&e.Paper){const i=e.Paper.node;i.parentNode&&i.parentNode.parentNode&&!t&&(i.parentNode.parentNode.style.minHeight="unset");const s=e.baseEl;if(s&&this.ctx.eventList.forEach(t=>{s.removeEventListener(t,this.ctx.events.documentEvent)}),null!==this.ctx.el)for(;this.ctx.el.firstChild;)this.ctx.el.removeChild(this.ctx.el.firstChild);this.killSVG(e.Paper),e.Paper.remove()}e.Paper=null,e.elWrap=null,e.elGraphical=null,e.elLegendWrap=null,e.elLegendForeign=null,e.baseEl=null,e.elGridRect=null,e.elGridRectMask=null,e.elGridRectBarMask=null,e.elGridRectMarkerMask=null,e.elForecastMask=null,e.elNonForecastMask=null,e.elDefs=null}}const ka="__apexcharts_unit_layouts__";function Ma(){return globalThis[ka]}globalThis[ka]||(globalThis[ka]={});const Ta="__apexcharts_unit_marks__";function _a(){return globalThis[Ta]}function Da(t,e){if(!t||"string"!=typeof t)return void console.warn("ApexCharts: registerUnitMark requires a non-empty name.");const i=function(t,e){if("string"==typeof t){const i=t.trim();return i?Object.freeze({name:e||"anonymous",path:i,viewBox:[0,0,100,100]}):null}if(!t||"object"!=typeof t)return null;if("string"!=typeof t.path||!t.path.trim())return null;const i=Array.isArray(t.viewBox)&&4===t.viewBox.length?t.viewBox.map(Number):[0,0,100,100];return!i.every(t=>isFinite(t))||i[2]<=0||i[3]<=0?null:Object.freeze(c(l({},t),{name:e||t.name||"anonymous",path:t.path.trim(),viewBox:i,fillRule:"evenodd"===t.fillRule?"evenodd":void 0}))}(e,t);i?_a()[t]=i:console.warn(`ApexCharts: registerUnitMark("${t}") expects path data, or {path, viewBox?, fillRule?}.`)}globalThis[Ta]||(globalThis[Ta]={});const Fa="__apexcharts_row_sources__";function La(){return globalThis[Fa]}function Ea(t){return t&&La()[t]||null}globalThis[Fa]||(globalThis[Fa]={});const Pa="__apexcharts_plugins__";function Ba(){const t=globalThis;return t[Pa]||(t[Pa]={}),t[Pa]}const Na=new WeakMap;function za(t,e){if(p.isSSR())return;let i=!1;if(t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE){const e=t.getBoundingClientRect();"none"!==t.style.display&&0!==e.width||(i=!0)}const s=new ResizeObserver(s=>{i&&e.call(t,s),i=!0});t.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Array.from(t.children).forEach(t=>s.observe(t)):s.observe(t);const a=Na.get(e);a&&a.disconnect(),Na.set(e,s)}function Ra(t,e){if(p.isSSR())return;const i=Na.get(e);i&&(i.disconnect(),Na.delete(e))}const Ia=globalThis.console;function Oa(t,...e){Ia.error(t,...e)}function Xa(t){Ia.warn(t)}const Ha="APEX-",Ya=new Date("2027-07-31T00:00:00Z"),Wa="__apex_license_v1__";function $a(){const t=globalThis;let e=t[Wa];return e||(e={key:null,listeners:new Set,result:null},t[Wa]=e),e}const Ga=class{static get licenseKey(){return $a().key}static set licenseKey(t){$a().key=t}static get listeners(){return $a().listeners}static get validationResult(){return $a().result}static set validationResult(t){$a().result=t}static getKey(){return this.licenseKey}static getLicenseStatus(){return this.licenseKey?(this.validationResult=this.validateKey(this.licenseKey),this.validationResult):{expired:!1,signatureVerified:!1,valid:!1}}static isKeyValid(t){return!!t&&this.validateKey(t).valid}static isLicenseValid(){return this.getLicenseStatus().valid}static onChange(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}static setLicense(t){var e,i;if(!t)return this.licenseKey=null,void this.publish({expired:!1,signatureVerified:!1,valid:!1});const s=this.validateKey(t);s.valid||t===this.licenseKey||!(null==(i=this.validationResult)?void 0:i.valid)?(this.licenseKey=t,this.publish(s),s.valid||Oa(`[Apex] ${s.message}`)):Xa(`[Apex] Ignoring license key: ${null!=(e=s.message)?e:"it is not valid"} A valid license is already active on this page.`)}static validateKey(t){const e=this.parseKey(t),i=this.validateStructure(t,e);if(!i.valid||!(null==e?void 0:e.signature))return i;const s=this.verdicts.get(t);return!1===s?{data:e.data,expired:!1,message:"Invalid license key. The license signature does not verify.",signatureVerified:!0,valid:!1}:(void 0===s&&this.verifySignature(t,e,i),c(l({},i),{signatureVerified:!0===s}))}static _resetSignatureState(){this.verdicts.clear(),this.verifying.clear(),this.warnedUnverifiable=!1,this.epoch++}static base64ToBytes(t){const e=t.replace(/-/g,"+").replace(/_/g,"/"),i=e.padEnd(4*Math.ceil(e.length/4),"="),s=globalThis.atob;if("function"!=typeof s)throw new Error("no base64 decoder available");const a=s(i),r=new Uint8Array(a.length);for(let t=0;t<a.length;t++)r[t]=a.charCodeAt(t);return r}static canonicalPayload(t){const e=t.domains&&t.domains.length>0?t.domains.join(","):"";return`v1|${t.issueDate}|${t.expiryDate}|${t.plan}|${e}`}static notify(t){for(const e of this.listeners)try{e(t)}catch(t){}}static parseKey(t){if("string"!=typeof t||!t.startsWith(Ha))return null;const e=t.slice(5);if(!e)return null;try{const t=(new TextDecoder).decode(this.base64ToBytes(e)),i=JSON.parse(t);return i.issueDate&&i.expiryDate&&i.plan?{data:{domains:Array.isArray(i.domains)?i.domains:void 0,expiryDate:i.expiryDate,issueDate:i.issueDate,plan:i.plan,valid:!0},signature:"string"==typeof i.sig&&i.sig?i.sig:null}:null}catch(t){return null}}static publish(t){this.validationResult=t,this.notify(t)}static validateStructure(t,e){const i=t=>({expired:!1,message:t,signatureVerified:!1,valid:!1});if("string"!=typeof t||!t.startsWith(Ha))return i('Invalid license key format. License key must start with "APEX-".');if(!e)return i("Invalid license key. Unable to decode license data.");const{data:s,signature:a}=e;if(!a&&new Date>=Ya)return i("This license key is in the old unsigned format, which is no longer accepted. Please request a replacement key.");if(new Date(s.expiryDate)<new Date)return{data:s,expired:!0,message:`License expired on ${s.expiryDate}. Please renew your license.`,signatureVerified:!1,valid:!1};if(s.domains&&s.domains.length>0){const t="undefined"==typeof location?"":location.hostname;if(!s.domains.some(e=>t===e||t.endsWith(`.${e}`)))return{data:s,expired:!1,message:`License is not valid for this domain (${t}). Allowed domains: ${s.domains.join(", ")}.`,signatureVerified:!1,valid:!1}}return{data:s,expired:!1,signatureVerified:!1,valid:!0}}static verifySignature(t,e,i){return s=this,a=null,r=function*(){var s;if(this.verifying.has(t)||this.verdicts.has(t))return;this.verifying.add(t);const a=this.epoch,r=null==(s=globalThis.crypto)?void 0:s.subtle;if(!r||0===this.publicKeysSpki.length)return this.verifying.delete(t),void(this.warnedUnverifiable||(this.warnedUnverifiable=!0,Xa(r?"[Apex] No license signing key is configured in this build, so license signatures cannot be verified.":"[Apex] Web Crypto is unavailable (a secure context is required), so the license signature cannot be verified.")));const o=(new TextEncoder).encode(this.canonicalPayload(e.data));let n=!1;for(const t of this.publicKeysSpki){try{const i=yield r.importKey("spki",this.base64ToBytes(t),{name:"ECDSA",namedCurve:"P-256"},!1,["verify"]);n=yield r.verify({hash:"SHA-256",name:"ECDSA"},i,this.base64ToBytes(e.signature),o)}catch(t){n=!1}if(n)break}if(this.verifying.delete(t),this.epoch!==a)return;if(this.verdicts.set(t,n),n){const e=c(l({},i),{signatureVerified:!0});return void(this.licenseKey===t?this.publish(e):this.notify(e))}const h="Invalid license key. The license signature does not verify.",d={data:e.data,expired:!1,message:h,signatureVerified:!0,valid:!1};this.licenseKey===t?this.publish(d):this.notify(d),Oa(`[Apex] ${h}`)},new Promise((t,e)=>{var i=t=>{try{n(r.next(t))}catch(t){e(t)}},o=t=>{try{n(r.throw(t))}catch(t){e(t)}},n=e=>e.done?t(e.value):Promise.resolve(e.value).then(i,o);n((r=r.apply(s,a)).next())});var s,a,r}};Ga.publicKeysSpki=["MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEQIaK9UMD6n0oR/FIy8QdL0uSzKMQlf1BB+tOrji4/WuHsyRNxeDhVykoSsNURozMi1xhmqWvBH1L//xIfugTPA=="],Ga.verdicts=new Map,Ga.verifying=new Set,Ga.warnedUnverifiable=!1,Ga.epoch=0;let ja=Ga;const Ua=class{static applyStyles(t){Object.assign(t.style,this.CRITICAL_STYLES,{backgroundImage:this.createWatermarkPattern(),backgroundRepeat:"repeat"})}static node(t){return t?t.querySelector(`[${this.WATERMARK_ATTR}]`):null}static add(t,e){return t&&"undefined"!=typeof document?(this.setManaged(t,e),this.paint(t)):null}static exists(t){return!!this.node(t)}static remove(t,e){t&&(this.setManaged(t,e),this.erase(t))}static untrack(t){this.managed.delete(t)}static createWatermarkPattern(){const t=this.WATERMARK_TEXT;return`url("data:image/svg+xml,${encodeURIComponent(`\n <svg xmlns="http://www.w3.org/2000/svg" width="300" height="200">\n <text\n x="50%"\n y="50%"\n dominant-baseline="middle"\n text-anchor="middle"\n font-family="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Arial, sans-serif"\n font-size="18"\n font-weight="600"\n fill="rgba(134, 134, 134, 0.1)"\n transform="rotate(-35, 100, 60)"\n >${t}</text>\n </svg>\n `.trim())}")`}static erase(t){var e;null==(e=this.node(t))||e.remove()}static paint(t){let e=this.node(t);return e||(e=document.createElement("div"),e.setAttribute(this.WATERMARK_ATTR,""),t.appendChild(e)),this.applyStyles(e),"function"==typeof getComputedStyle&&"static"===getComputedStyle(t).position&&(t.style.position="relative"),e}static reconcile(){const t=ja.isLicenseValid();for(const e of this.managed)e.isConnected?t?this.erase(e):this.paint(e):this.managed.delete(e)}static setManaged(t,e){!1!==(null==e?void 0:e.manage)?this.track(t):this.managed.delete(t)}static track(t){this.managed.add(t),this.subscribed||(this.subscribed=!0,ja.onChange(()=>{this.reconcile()}))}};Ua.WATERMARK_ATTR="data-apexcharts-watermark",Ua.WATERMARK_TEXT="APEXCHARTS",Ua.ATTR="data-apexcharts-watermark",Ua.CRITICAL_STYLES={bottom:"0",display:"block",left:"0",msUserSelect:"none",opacity:"1",pointerEvents:"none",position:"absolute",right:"0",top:"0",userSelect:"none",visibility:"visible",webkitUserSelect:"none",zIndex:"10000"},Ua.managed=new Set,Ua.subscribed=!1;let Va=Ua;const qa="https://apexcharts.com/pricing",Za="__apexcharts_license_enforcer_v1__";globalThis[Za]||(globalThis[Za]={perspectivesTokenDecoded:!1,enforced:new Set});const Ka=globalThis[Za],Ja=Ka.enforced;const Qa=new Set(["premium","enterprise"]);function tr(t,e){const i=Va.add(e,{manage:!1});if(t._wmPainted=!0,!i||"undefined"==typeof MutationObserver)return;if(t._wmNodeObserver&&t._wmObservedNode===i)return;t._wmNodeObserver&&t._wmNodeObserver.disconnect();const s=new MutationObserver(()=>{const t=Va.node(e);t&&(s.disconnect(),Va.applyStyles(t),s.takeRecords(),s.observe(t,{attributes:!0,attributeFilter:["style"]}))});s.observe(i,{attributes:!0,attributeFilter:["style"]}),t._wmNodeObserver=s,t._wmObservedNode=i}function er(t,e){if(!t._wmPainted)return;t._wmPainted=!1,t._wmWrapObserver&&(t._wmWrapObserver.disconnect(),t._wmWrapObserver=null),t._wmNodeObserver&&(t._wmNodeObserver.disconnect(),t._wmNodeObserver=null),t._wmObservedNode=null,t._wmObservedWrap=null;const i=e||t.w&&t.w.dom&&t.w.dom.elWrap;i&&Va.remove(i,{manage:!1})}function ir(t,e){try{if(!p.isBrowser())return;if(t&&t.globals&&t.globals.isDestroyed)return void Ja.delete(e);const i=t&&t.dom&&t.dom.elWrap;if(!i)return;const s=function(t,e){var i;const s=t&&t.config&&t.config.chart||{},a=[];"unit"===s.type&&a.push("unit"),"raincloud"===s.requestedType&&a.push("raincloud"),e.trellis&&"function"==typeof e.trellis.isActive&&e.trellis.isActive()&&a.push("trellis"),e.storyboard&&e.storyboard._used&&a.push("storyboard");const r=s.link;return e.linkedViews&&r&&(!0===r.enabled||"function"==typeof r.dimension)&&a.push("link"),e.ink&&s.ink&&!0===s.ink.enabled&&a.push("ink"),e.measure&&s.measure&&!0===s.measure.enabled&&a.push("measure"),e.contextMenu&&s.contextMenu&&!0===s.contextMenu.enabled&&a.push("context-menu"),e.perspectives&&(e.perspectives._used||Ka.perspectivesTokenDecoded)&&a.push("perspectives"),e.history&&s.history&&!0===s.history.enabled&&a.push("history"),(null==(i=e._highlightFilter)?void 0:i.isActive())&&a.push("highlight-filter"),a}(t,e);if(0===s.length)return Ja.delete(e),void er(e,i);Ja.add(e);const a=function(t){const e=t&&t.config&&t.config.chart&&t.config.chart.license;if(e)return e;const i=ja.getKey();if(i)return i;const s=p.getApex();return s&&s.license?s.license:null}(t);if(function(t){if(!t)return!1;const e=ja.validateKey(t);if(!e.valid)return!1;const i=e.data&&e.data.plan;return"string"==typeof i&&Qa.has(i.toLowerCase())}(a))return void er(e,i);!function(t,e){if(tr(t,e),"undefined"==typeof MutationObserver)return;if(t._wmWrapObserver&&t._wmObservedWrap===e)return;t._wmWrapObserver&&t._wmWrapObserver.disconnect();const i=new MutationObserver(()=>{Va.node(e)||tr(t,e)});i.observe(e,{childList:!0}),t._wmWrapObserver=i,t._wmObservedWrap=e}(e,i),function(t,e,i){if(t._premiumLicenseNotified)return;t._premiumLicenseNotified=!0;const s=i.length>1;if(!e)return void console.warn(`[ApexCharts] Premium feature${s?"s":""} in use (${i.join(", ")}) without a license. Running in trial mode with a watermark. Get a license: ${qa}`);const a=ja.validateKey(e);if(a.valid){const t=a.data&&a.data.plan||"current";return void console.warn(`[ApexCharts] Premium feature${s?"s":""} in use (${i.join(", ")}) require a Premium or Enterprise license; the ${t} plan does not include ${s?"them":"it"}. Running in trial mode with a watermark. Upgrade: ${qa}`)}e!==ja.getKey()&&console.error(`[Apex] ${a.message}`)}(e,a,s)}catch(t){}}function sr(){if(!p.isBrowser())return;const t=new Set,e=p.getApex(),i=e&&e._chartInstances;Array.isArray(i)&&i.forEach(e=>{const i=e&&e.chart;i&&i.w&&!i.w.globals.isDestroyed&&(t.add(i),ir(i.w,i))}),Array.from(Ja).forEach(e=>{const i=e&&e.w,s=i&&i.dom&&i.dom.elWrap;i&&!i.globals.isDestroyed&&s&&!1!==s.isConnected?t.has(e)||ir(i,e):Ja.delete(e)})}function ar(t,e){const i=[t];if(Array.isArray(e))for(const t of e)i.push(t&&"object"==typeof t?t.type:void 0);for(const t of i){if("string"!=typeof t)continue;const e=F[t]||t;if(R.includes(e)&&!ot(e))try{lt(e,t)}catch(t){return Promise.reject(t)}}return null}function rr(t,e){const i=new WeakMap;return(e||[]).forEach(t=>t&&Array.isArray(t.data)&&i.set(t.data,t.data)),S.clone(t,i)}ja.onChange(sr);class or{constructor(t,e){d(this,"core"),d(this,"responsive"),d(this,"axes"),d(this,"grid"),d(this,"graphics"),d(this,"coreUtils"),d(this,"crosshairs"),d(this,"events"),d(this,"fill"),d(this,"localization"),d(this,"options"),d(this,"series"),d(this,"theme"),d(this,"formatters"),d(this,"titleSubtitle"),d(this,"dimensions"),d(this,"updateHelpers"),d(this,"tooltip"),d(this,"data"),d(this,"animations"),d(this,"exports"),d(this,"legend"),d(this,"toolbar"),d(this,"zoomPanSelection"),d(this,"keyboardNavigation"),d(this,"annotations"),d(this,"morphTypeChange"),d(this,"timeScale"),d(this,"_keyboardNavigation"),d(this,"_zoomPanSelection"),d(this,"windowResizeHandler"),d(this,"parentResizeHandler"),d(this,"publicMethods",[]),d(this,"eventList",[]),d(this,"_renderPromise",null),d(this,"_parentResizeWaiter",null),d(this,"_printRestore",null),d(this,"beforePrintHandler"),d(this,"afterPrintHandler"),d(this,"config"),d(this,"perspectives"),d(this,"storyboard"),d(this,"history"),d(this,"linkedViews"),d(this,"trellis"),d(this,"ink"),d(this,"measure"),d(this,"contextMenu"),d(this,"weave"),d(this,"waterfall"),d(this,"streamgraph"),d(this,"renderer"),d(this,"rendererController"),this.opts=e,this.ctx=this,this.w=new ft(e).init(),this.el=t,this.w.globals.cuid=S.randomId(),this.w.globals.chartID=this.w.config.chart.id?S.escapeString(this.w.config.chart.id):this.w.globals.cuid,Qt(this.w);new ca(this).initModules(),this.lastUpdateOptions=null,this._updateStats={fast:0,fastWithAxes:0,full:0},this.create=this.create.bind(this),p.isBrowser()&&(this.windowResizeHandler=this._windowResizeHandler.bind(this),this.parentResizeHandler=this._parentResizeCallback.bind(this),this.beforePrintHandler=this._beforePrint.bind(this),this.afterPrintHandler=this._afterPrint.bind(this))}static get perspectives(){return ca._featureRegistry.get("perspectivesStatics")||null}render(){var t,e;if(!(null==(e=null==(t=this.w)?void 0:t.config)?void 0:e.chart))return Promise.reject(new Error("ApexCharts: chart configuration is missing or invalid. Ensure the options object includes a `chart` property."));if(this._renderPromise)return this._renderPromise;const i=new Promise((t,e)=>{var i,s,a,r,o,n,l,c,h,d,u,g,x,f;if(S.elementExists(this.el)){void 0===Apex._chartInstances&&(Apex._chartInstances=[]),this._unregister(),this.w.config.chart.id&&Apex._chartInstances.push({id:this.w.globals.chartID,group:this.w.config.chart.group,chart:this}),this.core||new ca(this).initModules(),this.setLocale(this.w.config.chart.defaultLocale);const m=this.w.config.chart.events.beforeMount;"function"==typeof m&&m(this,this.w),this.events.fireEvent("beforeMount",[this,this.w]);const b=this.w.config.trellis,y=!(!b||!(b.by||b.row||b.column)),w=!!(y&&this.trellis&&this.trellis.isActive());if(y&&!this.trellis&&Vi("`trellis`","trellis",{tail:"Rendering as a single chart."}),(null==(s=null==(i=this.w.config.chart)?void 0:i.measure)?void 0:s.enabled)&&!this.measure&&Vi("`chart.measure`","measure"),(null==(r=null==(a=this.w.config.chart)?void 0:a.link)?void 0:r.enabled)&&!this.linkedViews&&Vi("`chart.link`","link"),!this.ink){const t=null==(n=null==(o=this.w.config.chart)?void 0:o.ink)?void 0:n.enabled,e=(null!=(c=null==(l=this.w.config.annotations)?void 0:l.points)?c:[]).some(t=>t&&t.draggable);(t||e)&&Vi("`chart.ink` / `annotations.points[].draggable`","ink")}if((null==(d=null==(h=this.w.config.chart)?void 0:h.contextMenu)?void 0:d.enabled)&&!this.contextMenu&&Vi("`chart.contextMenu`","context-menu"),(null==(g=null==(u=this.w.config.chart)?void 0:u.history)?void 0:g.enabled)&&!this.history&&Vi("`chart.history`","history"),(null==(x=this.w.config.drilldown)?void 0:x.enabled)&&!this.ctx.drilldown&&Vi("`drilldown`","drilldown"),p.isBrowser()){w||(window.addEventListener("resize",this.windowResizeHandler),za(this.el.parentNode,this.parentResizeHandler),this._printEnabled()&&(window.addEventListener("beforeprint",this.beforePrintHandler),window.addEventListener("afterprint",this.afterPrintHandler)));const t=this.el.getRootNode&&this.el.getRootNode(),e=S.is("ShadowRoot",t),i=this.el.ownerDocument;let s=e?t.getElementById("apexcharts-css"):i.getElementById("apexcharts-css");if(!s){s=v.createElementNS("http://www.w3.org/1999/xhtml","style"),s.id="apexcharts-css",s.textContent='@keyframes opaque{0%{opacity:0}to{opacity:1}}.apexcharts-canvas{position:relative;direction:ltr!important;user-select:none;--apexcharts-focus-color: #008FFB}.apexcharts-canvas .apexcharts-theme-dark,.apexcharts-theme-dark.apexcharts-canvas{--apexcharts-focus-color: #FFD500}.apexcharts-canvas.apexcharts-high-contrast,.apexcharts-high-contrast.apexcharts-canvas{--apexcharts-focus-color: #FFFF00}.apexcharts-sr-status{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(prefers-reduced-motion:reduce){.apexcharts-canvas:not(.apexcharts-ignore-reduced-motion) *,.apexcharts-canvas:not(.apexcharts-ignore-reduced-motion) *:before,.apexcharts-canvas:not(.apexcharts-ignore-reduced-motion) *:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}.apexcharts-canvas ::-webkit-scrollbar{-webkit-appearance:none;width:6px}.apexcharts-canvas ::-webkit-scrollbar-thumb{border-radius:4px;background-color:#00000080;box-shadow:0 0 1px #ffffff80;-webkit-box-shadow:0 0 1px rgba(255,255,255,.5)}.apexcharts-inner{position:relative}.apexcharts-text tspan{font-family:inherit}rect.legend-mouseover-inactive,.legend-mouseover-inactive rect,.legend-mouseover-inactive path,.legend-mouseover-inactive circle,.legend-mouseover-inactive line,.legend-mouseover-inactive text.apexcharts-yaxis-title-text,.legend-mouseover-inactive text.apexcharts-yaxis-label{transition:.15s ease all;opacity:.2}.apexcharts-crossfilter-dimmed{transition:opacity .25s ease;opacity:var(--apx-cf-dim, .2)}.apexcharts-cf-table{border-collapse:collapse;width:100%;font-size:13px}.apexcharts-cf-table caption{caption-side:bottom;text-align:right;padding:6px 2px;font-size:12px;opacity:.7}.apexcharts-cf-table th,.apexcharts-cf-table td{padding:6px 10px;text-align:left;border-bottom:1px solid rgba(0,0,0,.08)}.apexcharts-cf-table th{font-weight:600;border-bottom-width:2px}.apexcharts-cf-table tbody tr:hover{background:#6366f10f}.apexcharts-canvas{--apx-measure-up: #16a34a;--apx-measure-down: #dc2626;--apx-measure-neutral: #64748b;--apx-measure-guide: #94a3b8}.apexcharts-measure-capture{cursor:crosshair}.apexcharts-canvas{--apx-menu-bg: #ffffff;--apx-menu-fg: #1e293b;--apx-menu-border: #e2e8f0;--apx-menu-hover: #f1f5f9;--apx-menu-shadow: rgba(15, 23, 42, .18)}.apexcharts-context-menu{min-width:168px;padding:4px;border-radius:8px;background:var(--apx-menu-bg);border:1px solid var(--apx-menu-border);box-shadow:0 6px 22px var(--apx-menu-shadow);font-family:Helvetica,Arial,sans-serif;font-size:13px;z-index:20;user-select:none}.apexcharts-context-menu-item{display:block;width:100%;box-sizing:border-box;text-align:left;padding:7px 12px;border:0;border-radius:5px;background:transparent;color:var(--apx-menu-fg);font:inherit;cursor:pointer}.apexcharts-context-menu-item:hover,.apexcharts-context-menu-item--active{background:var(--apx-menu-hover)}.apexcharts-context-menu-item:focus{outline:none}.apexcharts-canvas{--apx-ink-card-bg: #ffffff;--apx-ink-card-fg: #1e293b;--apx-ink-card-border: #e2e8f0;--apx-ink-card-hover: #f1f5f9;--apx-ink-card-accent: #6366f1;--apx-ink-card-shadow: rgba(15, 23, 42, .18)}.apexcharts-ink-card{position:absolute;z-index:25;display:flex;flex-direction:column;gap:6px;padding:8px;border-radius:8px;background:var(--apx-ink-card-bg);border:1px solid var(--apx-ink-card-border);box-shadow:0 6px 22px var(--apx-ink-card-shadow);font-family:Helvetica,Arial,sans-serif;font-size:12px;color:var(--apx-ink-card-fg);user-select:none}.apexcharts-ink-card-row{display:flex;align-items:center;gap:4px}.apexcharts-ink-card input.apexcharts-ink-editor{flex:1 1 auto;width:150px;min-width:0;box-sizing:border-box;padding:4px 6px;font:inherit;color:inherit;background:transparent;border:1px solid var(--apx-ink-card-border);border-radius:5px}.apexcharts-ink-card input.apexcharts-ink-editor:focus{outline:none;border-color:var(--apx-ink-card-accent)}.apexcharts-ink-btn{flex:0 0 auto;width:24px;height:24px;display:inline-flex;align-items:center;justify-content:center;padding:0;border:0;border-radius:5px;background:transparent;color:inherit;font:inherit;font-size:12px;line-height:1;cursor:pointer}.apexcharts-ink-btn:hover,.apexcharts-ink-btn--active{background:var(--apx-ink-card-hover)}.apexcharts-ink-btn:focus-visible,.apexcharts-ink-swatch:focus-visible{outline:2px solid var(--apx-ink-card-accent);outline-offset:1px}.apexcharts-ink-btn--bold{font-weight:700}.apexcharts-ink-btn--delete:hover{color:#dc2626}.apexcharts-ink-swatch{flex:0 0 auto;width:16px;height:16px;padding:0;border:1px solid rgba(100,116,139,.45);border-radius:50%;cursor:pointer}.apexcharts-ink-swatch--active{box-shadow:0 0 0 2px var(--apx-ink-card-bg),0 0 0 4px var(--apx-ink-card-accent)}.apexcharts-ink-sep{flex:0 0 auto;width:1px;height:16px;margin:0 2px;background:var(--apx-ink-card-border)}.apexcharts-ink-cardlabel{flex:0 0 auto;font-size:10px;letter-spacing:.4px;text-transform:uppercase;opacity:.65;margin-right:2px}.apexcharts-ink-marker-size{flex:0 0 auto;min-width:16px;text-align:center;font-variant-numeric:tabular-nums}.apexcharts-legend-text{padding-left:15px;margin-left:-15px}.apexcharts-legend-series[role=button]:focus{outline:2px solid var(--apexcharts-focus-color, #008FFB);outline-offset:2px}.apexcharts-legend-series[role=button]:focus:not(:focus-visible){outline:none}.apexcharts-legend-series[role=button]:focus-visible{outline:2px solid var(--apexcharts-focus-color, #008FFB);outline-offset:2px}.apexcharts-series-collapsed{opacity:0}.apexcharts-series-collapsed.apexcharts-series-collapsing{opacity:1}.apexcharts-datalabels.apexcharts-series-collapsing{animation:apexcharts-datalabels-exit var(--apexcharts-dl-exit, .4s) ease-in forwards}@keyframes apexcharts-datalabels-exit{0%{opacity:1}to{opacity:0}}.apexcharts-canvas svg:focus:not(:focus-visible){outline:none}.apexcharts-bar-area.apexcharts-keyboard-focused,.apexcharts-candlestick-area.apexcharts-keyboard-focused,.apexcharts-boxPlot-area.apexcharts-keyboard-focused,.apexcharts-violin-area.apexcharts-keyboard-focused,.apexcharts-rangebar-area.apexcharts-keyboard-focused,.apexcharts-pie-area.apexcharts-keyboard-focused,.apexcharts-heatmap-rect.apexcharts-keyboard-focused,.apexcharts-treemap-rect.apexcharts-keyboard-focused,.apexcharts-keyboard-focus-ring{stroke:var(--apexcharts-focus-color, #008FFB);stroke-width:2;stroke-opacity:1}.apexcharts-keyboard-focus-ring{fill:none;pointer-events:none}.apexcharts-tooltip{--apx-tt-bg: #ffffff;--apx-tt-border: rgba(15, 23, 42, .12);--apx-tt-shadow-dir: 1;--apx-tt-shadow: 0 calc(var(--apx-tt-shadow-dir) * 1px) 2px rgba(15, 23, 42, .06), 0 calc(var(--apx-tt-shadow-dir) * 4px) 8px -2px rgba(15, 23, 42, .1), 0 calc(var(--apx-tt-shadow-dir) * 12px) 20px -8px rgba(15, 23, 42, .14);--apx-tt-arrow-bg: var(--apx-tt-bg);--apx-tt-color: #0f172a;--apx-tt-color-muted: rgba(15, 23, 42, .55);border-radius:8px;background:var(--apx-tt-bg);border:1px solid var(--apx-tt-border);box-shadow:var(--apx-tt-shadow);color:var(--apx-tt-color);cursor:default;font-size:13px;left:0;top:0;opacity:0;pointer-events:none;position:absolute;display:flex;flex-direction:column;padding:2px 0;white-space:nowrap;z-index:12;transition:opacity .12s ease}.apexcharts-tooltip.apexcharts-active{opacity:1;transition:opacity .12s ease}.apexcharts-tooltip.apexcharts-tooltip-interactive.apexcharts-active{pointer-events:auto}.apexcharts-tooltip.apexcharts-active[data-positioned=true]{transition:opacity .12s ease,left .16s ease-out,top .16s ease-out}.apexcharts-tooltip.apexcharts-theme-dark{--apx-tt-bg: #1c1c1f;--apx-tt-border: rgba(255, 255, 255, .16);--apx-tt-shadow: 0 calc(var(--apx-tt-shadow-dir) * 1px) 2px rgba(0, 0, 0, .24), 0 calc(var(--apx-tt-shadow-dir) * 4px) 8px -2px rgba(0, 0, 0, .3), 0 calc(var(--apx-tt-shadow-dir) * 12px) 20px -8px rgba(0, 0, 0, .38);--apx-tt-color: #f3f4f6;--apx-tt-color-muted: rgba(243, 244, 246, .55)}.apexcharts-tooltip *{font-family:inherit}.apexcharts-tooltip.apexcharts-annotation-tooltip{padding:6px 10px;max-width:240px;white-space:normal;line-height:1.4;pointer-events:none;z-index:13}.apexcharts-tooltip-title{padding:8px 12px 4px;font-size:12px;font-weight:600;letter-spacing:.01em;color:var(--apx-tt-color-muted);background:transparent;border-bottom:none;margin-bottom:0}.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title,.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title{background:transparent;border-bottom:none}.apexcharts-tooltip.apexcharts-tooltip-fill-series{background:transparent;-webkit-backdrop-filter:none;backdrop-filter:none;border:none;padding:0;overflow:hidden;color:#fff}.apexcharts-tooltip.apexcharts-tooltip-fill-series .apexcharts-tooltip-title{background:#00000038;color:#fff;opacity:1;padding:6px 12px}.apexcharts-tooltip.apexcharts-tooltip-fill-series .apexcharts-tooltip-series-group{color:#fff}.apexcharts-tooltip-arrow{position:absolute;box-sizing:border-box;width:10px;height:10px;background:var(--apx-tt-arrow-bg);transform:rotate(45deg);pointer-events:none;top:calc(var(--apx-tt-arrow-y, calc(50% + 1px) ) - 6px)}.apexcharts-tooltip[data-placement=right] .apexcharts-tooltip-arrow{left:-6px;border-left:1px solid var(--apx-tt-border);border-bottom:1px solid var(--apx-tt-border)}.apexcharts-tooltip[data-placement=left] .apexcharts-tooltip-arrow{right:-6px;border-top:1px solid var(--apx-tt-border);border-right:1px solid var(--apx-tt-border)}.apexcharts-tooltip[data-placement=top] .apexcharts-tooltip-arrow,.apexcharts-tooltip[data-placement=bottom] .apexcharts-tooltip-arrow{top:auto;left:calc(var(--apx-tt-arrow-x, calc(50% + 1px) ) - 6px)}.apexcharts-tooltip[data-placement=top] .apexcharts-tooltip-arrow{bottom:-6px;border-right:1px solid var(--apx-tt-border);border-bottom:1px solid var(--apx-tt-border)}.apexcharts-tooltip[data-placement=bottom] .apexcharts-tooltip-arrow{top:-6px;border-top:1px solid var(--apx-tt-border);border-left:1px solid var(--apx-tt-border)}.apexcharts-tooltip[data-placement=bottom]{--apx-tt-shadow-dir: -1 }.apexcharts-tooltip-text-goals-value,.apexcharts-tooltip-text-y-value,.apexcharts-tooltip-text-z-value{display:inline-block;margin-left:5px;font-weight:600}.apexcharts-tooltip-text-goals-label:empty,.apexcharts-tooltip-text-goals-value:empty,.apexcharts-tooltip-text-y-label:empty,.apexcharts-tooltip-text-y-value:empty,.apexcharts-tooltip-text-z-value:empty,.apexcharts-tooltip-title:empty{display:none}.apexcharts-tooltip-text-goals-label,.apexcharts-tooltip-text-goals-value{padding:6px 0 5px}.apexcharts-tooltip-goals-group,.apexcharts-tooltip-text-goals-label,.apexcharts-tooltip-text-goals-value{display:flex}.apexcharts-tooltip-text-goals-label:not(:empty),.apexcharts-tooltip-text-goals-value:not(:empty){margin-top:-6px}.apexcharts-tooltip-marker{display:inline-flex;align-items:center;justify-content:center;position:relative;width:12px;height:12px;margin-right:6px;vertical-align:middle;color:inherit}.apexcharts-tooltip-marker svg{width:100%;height:100%;display:block}.apexcharts-tooltip-series-group{padding:4px 12px;display:none;gap:8px;text-align:left;justify-content:left;align-items:center}.apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker{opacity:1}.apexcharts-tooltip-series-group.apexcharts-active:last-child,.apexcharts-tooltip-series-group:last-child{padding-bottom:8px}.apexcharts-tooltip-y-group{padding:6px 0 5px}.apexcharts-tooltip.apexcharts-tooltip-compact{padding:3px 8px;font-size:11px;line-height:1.35}.apexcharts-tooltip-compact .apexcharts-tooltip-title{padding:0;font-size:11px;white-space:nowrap}.apexcharts-tooltip-compact .apexcharts-tooltip-series-group,.apexcharts-tooltip-compact .apexcharts-tooltip-series-group.apexcharts-active:last-child,.apexcharts-tooltip-compact .apexcharts-tooltip-series-group:last-child{padding:0;gap:5px}.apexcharts-tooltip-compact .apexcharts-tooltip-y-group{padding:0}.apexcharts-tooltip-compact .apexcharts-tooltip-marker{width:8px;height:8px}.apexcharts-tooltip.apexcharts-tooltip-compact.apexcharts-tooltip-value-only{flex-direction:row;align-items:baseline;gap:6px}.apexcharts-tooltip-value-only .apexcharts-tooltip-marker,.apexcharts-tooltip-value-only .apexcharts-tooltip-text-y-label{display:none}.apexcharts-custom-tooltip,.apexcharts-tooltip-box{padding:4px 8px}.apexcharts-tooltip-boxPlot{display:flex;flex-direction:column-reverse}.apexcharts-tooltip-box>div{margin:4px 0}.apexcharts-tooltip-box span.value{font-weight:700}.apexcharts-tooltip-rangebar{padding:5px 8px}.apexcharts-tooltip-rangebar .category{font-weight:600;color:#777}.apexcharts-tooltip-rangebar .series-name{font-weight:700;display:block;margin-bottom:5px}.apexcharts-tooltip-stream{padding:5px 8px}.apexcharts-tooltip-stream .apexcharts-tooltip-title{background:transparent;border:0;padding:0 0 4px;margin:0;font-weight:700}.apexcharts-tooltip-stream-band{display:flex;align-items:center;gap:5px;line-height:1.6;opacity:.72}.apexcharts-tooltip-stream-band.apexcharts-active{opacity:1;font-weight:700}.apexcharts-tooltip-stream-band .series-name{flex:1 1 auto;margin-right:8px}.apexcharts-tooltip-stream-band .value{font-weight:700;margin-left:auto}.apexcharts-tooltip-stream-total{display:flex;align-items:center;margin-top:4px;padding-top:4px;border-top:1px solid var(--apx-tt-border, rgba(15, 23, 42, .12))}.apexcharts-tooltip-stream-total .series-name{flex:1 1 auto;font-weight:600}.apexcharts-tooltip-stream-total .value{font-weight:700;margin-left:auto}.apexcharts-streamgraph-label{pointer-events:none}.apexcharts-xaxistooltip,.apexcharts-yaxistooltip{--apx-axt-bg: #ffffff;--apx-axt-border: rgba(15, 23, 42, .08);--apx-axt-color: #0f172a;--apx-axt-shadow: 0 4px 12px -4px rgba(15, 23, 42, .18), 0 1px 3px -1px rgba(15, 23, 42, .12);opacity:0;pointer-events:none;color:var(--apx-axt-color);font-size:12px;font-weight:500;text-align:center;border-radius:6px;position:absolute;z-index:10;background:var(--apx-axt-bg);border:1px solid var(--apx-axt-border);box-shadow:var(--apx-axt-shadow)}.apexcharts-xaxistooltip.apexcharts-theme-dark,.apexcharts-yaxistooltip.apexcharts-theme-dark{--apx-axt-bg: #1c1c1f;--apx-axt-border: rgba(255, 255, 255, .1);--apx-axt-color: #f3f4f6;--apx-axt-shadow: 0 4px 12px -4px rgba(0, 0, 0, .55), 0 1px 3px -1px rgba(0, 0, 0, .45) }.apexcharts-xaxistooltip{padding:4px 8px;transition:.15s ease all}.apexcharts-xaxistooltip:after,.apexcharts-xaxistooltip:before{left:50%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}.apexcharts-xaxistooltip:after{border-color:transparent;border-width:5px;margin-left:-5px}.apexcharts-xaxistooltip:before{border-color:transparent;border-width:6px;margin-left:-6px}.apexcharts-xaxistooltip-bottom:after,.apexcharts-xaxistooltip-bottom:before{bottom:100%}.apexcharts-xaxistooltip-top:after,.apexcharts-xaxistooltip-top:before{top:100%}.apexcharts-xaxistooltip-bottom:after{border-bottom-color:var(--apx-axt-bg)}.apexcharts-xaxistooltip-bottom:before{border-bottom-color:var(--apx-axt-border)}.apexcharts-xaxistooltip-top:after{border-top-color:var(--apx-axt-bg)}.apexcharts-xaxistooltip-top:before{border-top-color:var(--apx-axt-border)}.apexcharts-xaxistooltip.apexcharts-active{opacity:1;transition:.15s ease all}.apexcharts-yaxistooltip{padding:3px 8px}.apexcharts-yaxistooltip:after,.apexcharts-yaxistooltip:before{top:50%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}.apexcharts-yaxistooltip:after{border-color:transparent;border-width:5px;margin-top:-5px}.apexcharts-yaxistooltip:before{border-color:transparent;border-width:6px;margin-top:-6px}.apexcharts-yaxistooltip-left:after,.apexcharts-yaxistooltip-left:before{left:100%}.apexcharts-yaxistooltip-right:after,.apexcharts-yaxistooltip-right:before{right:100%}.apexcharts-yaxistooltip-left:after{border-left-color:var(--apx-axt-bg)}.apexcharts-yaxistooltip-left:before{border-left-color:var(--apx-axt-border)}.apexcharts-yaxistooltip-right:after{border-right-color:var(--apx-axt-bg)}.apexcharts-yaxistooltip-right:before{border-right-color:var(--apx-axt-border)}.apexcharts-yaxistooltip.apexcharts-active{opacity:1}.apexcharts-yaxistooltip-hidden{display:none}.apexcharts-xcrosshairs,.apexcharts-ycrosshairs{pointer-events:none;opacity:0;transition:.15s ease all}.apexcharts-xcrosshairs.apexcharts-active,.apexcharts-ycrosshairs.apexcharts-active{opacity:1;transition:.15s ease all}.apexcharts-ycrosshairs-hidden{opacity:0}.apexcharts-selection-rect{cursor:move}.svg_select_shape{stroke-width:1;stroke-dasharray:10 10;stroke:#000;stroke-opacity:.1;pointer-events:none;fill:none}.svg_select_handle{stroke-width:3;stroke:#000;fill:none}.svg_select_handle_r{cursor:e-resize}.svg_select_handle_l{cursor:w-resize}.apexcharts-svg.apexcharts-zoomable.hovering-zoom{cursor:crosshair}.apexcharts-svg.apexcharts-zoomable.hovering-pan{cursor:move}.apexcharts-wheel-hint{position:absolute;inset:0;z-index:12;display:flex;align-items:center;justify-content:center;pointer-events:none;opacity:0;transition:opacity .2s ease}.apexcharts-wheel-hint-visible{opacity:1}.apexcharts-wheel-hint span{padding:6px 12px;border-radius:8px;font-size:13px;color:#fff;background:#1c1c1fd1}.apexcharts-theme-dark .apexcharts-wheel-hint span{color:#1c1c1f;background:#ffffffe6}@media(prefers-reduced-motion:reduce){.apexcharts-wheel-hint{transition:none}}.apexcharts-menu-icon,.apexcharts-measure-icon,.apexcharts-pan-icon,.apexcharts-reset-icon,.apexcharts-selection-icon,.apexcharts-toolbar-custom-icon,.apexcharts-zoom-icon,.apexcharts-zoomin-icon,.apexcharts-zoomout-icon{cursor:pointer;width:26px;height:24px;line-height:24px;color:#6e8192;text-align:center;padding:0;margin:0;background:transparent;border:0;border-radius:5px;display:inline-flex;align-items:center;justify-content:center;transition:background-color .12s ease,color .12s ease}.apexcharts-menu-icon svg,.apexcharts-measure-icon svg,.apexcharts-pan-icon svg,.apexcharts-reset-icon svg,.apexcharts-selection-icon svg,.apexcharts-zoom-icon svg,.apexcharts-zoomin-icon svg,.apexcharts-zoomout-icon svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.apexcharts-theme-dark .apexcharts-menu-icon,.apexcharts-theme-dark .apexcharts-measure-icon,.apexcharts-theme-dark .apexcharts-pan-icon,.apexcharts-theme-dark .apexcharts-reset-icon,.apexcharts-theme-dark .apexcharts-selection-icon,.apexcharts-theme-dark .apexcharts-toolbar-custom-icon,.apexcharts-theme-dark .apexcharts-zoom-icon,.apexcharts-theme-dark .apexcharts-zoomin-icon,.apexcharts-theme-dark .apexcharts-zoomout-icon{color:#d4d6dc}.apexcharts-canvas .apexcharts-measure-icon.apexcharts-selected,.apexcharts-canvas .apexcharts-pan-icon.apexcharts-selected,.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected,.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected,.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected{background:#008ffb1f;color:#008ffb}.apexcharts-theme-light .apexcharts-menu-icon:hover,.apexcharts-theme-light .apexcharts-measure-icon:not(.apexcharts-selected):hover,.apexcharts-theme-light .apexcharts-pan-icon:not(.apexcharts-selected):hover,.apexcharts-theme-light .apexcharts-reset-icon:hover,.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover,.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover,.apexcharts-theme-light .apexcharts-zoomin-icon:hover,.apexcharts-theme-light .apexcharts-zoomout-icon:hover{background:#0f172a0f;color:#1f2937}.apexcharts-theme-dark .apexcharts-menu-icon:hover,.apexcharts-theme-dark .apexcharts-measure-icon:not(.apexcharts-selected):hover,.apexcharts-theme-dark .apexcharts-pan-icon:not(.apexcharts-selected):hover,.apexcharts-theme-dark .apexcharts-reset-icon:hover,.apexcharts-theme-dark .apexcharts-selection-icon:not(.apexcharts-selected):hover,.apexcharts-theme-dark .apexcharts-zoom-icon:not(.apexcharts-selected):hover,.apexcharts-theme-dark .apexcharts-zoomin-icon:hover,.apexcharts-theme-dark .apexcharts-zoomout-icon:hover{background:#ffffff14;color:#fff}.apexcharts-menu-icon,.apexcharts-selection-icon{position:relative}.apexcharts-toolbar{position:absolute;z-index:11;display:inline-flex;align-items:center;gap:1px;padding:3px;border-radius:8px;background:#ffffffd9;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}.apexcharts-theme-dark .apexcharts-toolbar{background:#1c1c1fd1}.apexcharts-menu{background:#fffffff2;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);position:absolute;top:calc(100% + 4px);border:1px solid rgba(15,23,42,.08);border-radius:8px;padding:4px;right:0;opacity:0;min-width:120px;transition:opacity .15s ease,transform .15s ease;transform:translateY(-2px);pointer-events:none;box-shadow:0 4px 16px -4px #0f172a1f,0 2px 4px -1px #0f172a0f}.apexcharts-menu.apexcharts-menu-open{opacity:1;transform:translateY(0);pointer-events:all}.apexcharts-menu-item{padding:6px 9px;font-size:12px;border-radius:5px;cursor:pointer}.apexcharts-theme-light .apexcharts-menu-item:hover{background:#0f172a0f}.apexcharts-theme-dark .apexcharts-menu{background:#1c1c1feb;border-color:#ffffff14;color:#f3f4f6;box-shadow:0 4px 16px -4px #00000080,0 2px 4px -1px #0006}.apexcharts-theme-dark .apexcharts-menu-item:hover{background:#ffffff14}@media screen and (min-width:768px){.apexcharts-canvas:hover .apexcharts-toolbar{opacity:1}}.apexcharts-toolbar:focus-within{opacity:1}.apexcharts-menu-icon:focus-visible,.apexcharts-measure-icon:focus-visible,.apexcharts-pan-icon:focus-visible,.apexcharts-reset-icon:focus-visible,.apexcharts-selection-icon:focus-visible,.apexcharts-toolbar-custom-icon:focus-visible,.apexcharts-zoom-icon:focus-visible,.apexcharts-zoomin-icon:focus-visible,.apexcharts-zoomout-icon:focus-visible{outline:2px solid var(--apexcharts-focus-color, #008FFB);outline-offset:1px;border-radius:5px}.apexcharts-menu-item:focus-visible{outline:2px solid var(--apexcharts-focus-color, #008FFB);outline-offset:-2px;background:#eee}.apexcharts-canvas .apexcharts-element-hidden,.apexcharts-datalabel.apexcharts-element-hidden,.apexcharts-hide .apexcharts-series-points{opacity:0}.apexcharts-hidden-element-shown{opacity:1;transition:.25s ease all}.apexcharts-datalabel,.apexcharts-datalabel-label,.apexcharts-datalabel-value,.apexcharts-datalabels,.apexcharts-pie-label,.apexcharts-pie-name-label,.apexcharts-pie-name-label-group,.apexcharts-pie-label-connector,.apexcharts-unit-outer-label,.apexcharts-unit-outer-label-group,.apexcharts-unit-label-connector{cursor:default;pointer-events:none}.apexcharts-pie-label-connector,.apexcharts-unit-label-connector{fill:none}.apexcharts-unit-label-delay{opacity:0;animation-name:opaque;animation-duration:.5s;animation-fill-mode:forwards;animation-timing-function:ease}.apexcharts-radialbar-label{cursor:pointer}.apexcharts-annotation-rect,.apexcharts-area-series .apexcharts-area,.apexcharts-gridline,.apexcharts-line,.apexcharts-point-annotation-label,.apexcharts-radar-series path:not(.apexcharts-marker),.apexcharts-radar-series polygon,.apexcharts-toolbar svg,.apexcharts-tooltip .apexcharts-marker,.apexcharts-xaxis-annotation-label,.apexcharts-yaxis-annotation-label,.apexcharts-zoom-rect,.no-pointer-events{pointer-events:none}.apexcharts-tooltip-active .apexcharts-marker{transition:.15s ease all}.apexcharts-radar-series .apexcharts-yaxis,.apexcharts-bar-goals-markers,.apexcharts-bar-shadows,.apexcharts-rangebar-goals-markers{pointer-events:none}.apexcharts-drilldown-target{cursor:pointer}.apexcharts-breadcrumb{position:absolute;z-index:11;display:inline-flex;align-items:center;gap:2px;font-size:12px;font-family:inherit;padding:2px 4px}.apexcharts-breadcrumb-item{background:transparent;border:none;padding:2px 6px;border-radius:3px;font:inherit;color:inherit;cursor:pointer;line-height:1.2}.apexcharts-breadcrumb-item:hover:not(.apexcharts-breadcrumb-current){background:#00000014}.apexcharts-breadcrumb-arrow{margin-right:4px;font-weight:600;user-select:none}.apexcharts-breadcrumb-current{cursor:default;font-weight:600;opacity:.85}.apexcharts-breadcrumb-separator{opacity:.5;user-select:none}.apexcharts-theme-dark .apexcharts-breadcrumb-item:hover:not(.apexcharts-breadcrumb-current){background:#ffffff1f}.apexcharts-drilldown-loading{position:absolute;inset:0;z-index:12;display:flex;align-items:center;justify-content:center;gap:10px;font-size:13px;font-family:inherit;color:inherit;background:#ffffff9e;cursor:progress}.apexcharts-drilldown-loading-spinner{width:26px;height:26px;border-radius:50%;border:2.5px solid rgba(0,0,0,.16);border-top-color:#0000008c;animation:apexcharts-drilldown-spin .7s linear infinite}.apexcharts-drilldown-loading-text{opacity:.8}.apexcharts-theme-dark .apexcharts-drilldown-loading{background:#1e1e1e9e}.apexcharts-theme-dark .apexcharts-drilldown-loading-spinner{border-color:#ffffff38;border-top-color:#ffffffb3}@keyframes apexcharts-drilldown-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.apexcharts-canvas:not(.apexcharts-ignore-reduced-motion) .apexcharts-drilldown-loading-spinner{animation:apexcharts-drilldown-pulse 1.4s ease-in-out infinite!important}@keyframes apexcharts-drilldown-pulse{0%,to{opacity:.35}50%{opacity:1}}}.apexcharts-disable-transitions *{transition:none!important}.apexcharts-trellis{position:relative}.apexcharts-trellis-grid{display:grid}.apexcharts-trellis-cell{min-width:0;position:relative}.apexcharts-trellis-header{font-size:12px;font-weight:600;line-height:22px;height:22px;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--apx-fore, var(--apx-trellis-fore, #373d3f))}.apexcharts-trellis-title{font-size:14px;font-weight:700;padding:2px 0 6px;color:var(--apx-fore, var(--apx-trellis-fore, #373d3f))}.apexcharts-trellis-mute-y .apexcharts-yaxis,.apexcharts-trellis-mute-x .apexcharts-xaxis{opacity:0}.apexcharts-trellis-has-toolbar{padding-top:24px}.apexcharts-trellis-strip{font-size:12px;font-weight:600;color:var(--apx-fore, var(--apx-trellis-fore, #373d3f));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.apexcharts-trellis-strip-column{text-align:center;line-height:22px;height:22px;align-self:end}.apexcharts-trellis-strip-row{align-self:center;max-width:140px;padding-right:6px}.apexcharts-trellis-cell-empty{position:relative}.apexcharts-trellis-empty-label{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:12px;color:var(--apx-fore, var(--apx-trellis-fore, #373d3f));opacity:.45;pointer-events:none}.apexcharts-trellis-cell-hidden>*{visibility:hidden}.apexcharts-trellis-gradient-legend{margin:10px auto 0}.apexcharts-trellis-panel.apexcharts-trellis-skeleton{background:var(--apx-fore, var(--apx-trellis-fore, #373d3f));opacity:.05;border-radius:4px}.apexcharts-trellis[data-tooltip-mode=panel] .apexcharts-trellis-cell:not(:hover) .apexcharts-tooltip,.apexcharts-trellis[data-tooltip-mode=panel] .apexcharts-trellis-cell:not(:hover) .apexcharts-xaxistooltip,.apexcharts-trellis[data-tooltip-mode=panel] .apexcharts-trellis-cell:not(:hover) .apexcharts-yaxistooltip{opacity:0!important}.apexcharts-trellis[data-tooltip-mode=grid] .apexcharts-trellis-cell .apexcharts-tooltip,.apexcharts-trellis[data-tooltip-mode=grid] .apexcharts-trellis-cell .apexcharts-xaxistooltip,.apexcharts-trellis[data-tooltip-mode=grid] .apexcharts-trellis-cell .apexcharts-yaxistooltip{opacity:0!important}.apexcharts-trellis-tooltip{position:absolute;top:0;left:0;z-index:14;pointer-events:none;opacity:0;transition:opacity .1s ease;background:var(--apx-bg, #fff);color:var(--apx-fore, var(--apx-trellis-fore, #373d3f));border:1px solid rgba(120,120,120,.25);border-radius:5px;box-shadow:2px 2px 6px -4px #0006;font-size:12px;min-width:140px;max-width:320px}.apexcharts-trellis-tooltip-active{opacity:1}.apexcharts-trellis-tooltip .apexcharts-tooltip-title{padding:5px 10px;font-weight:600;background:#78787814;border-bottom:1px solid rgba(120,120,120,.18);margin-bottom:2px}.apexcharts-trellis-tooltip-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:2px 10px;line-height:1.6}.apexcharts-trellis-tooltip-row-active{background:#7878781a;font-weight:600}.apexcharts-trellis-tooltip-key{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.apexcharts-trellis-tooltip-vals{display:flex;gap:10px;white-space:nowrap}.apexcharts-trellis-tooltip-val{display:inline-flex;align-items:center;gap:5px}.apexcharts-trellis-tooltip-marker{width:8px;height:8px;border-radius:50%;display:inline-block;flex:none}.apexcharts-trellis-cell-promoted{grid-column:1 / -1}.apexcharts-trellis-cell-parked{display:none}.apexcharts-trellis-cell-promoted.apexcharts-trellis-mute-y .apexcharts-yaxis,.apexcharts-trellis-cell-promoted.apexcharts-trellis-mute-x .apexcharts-xaxis{opacity:1}.apexcharts-trellis-header-clickable{cursor:pointer}.apexcharts-trellis-header-clickable:hover{text-decoration:underline;text-underline-offset:3px}.apexcharts-trellis-breadcrumb{display:flex;align-items:center;gap:6px;font-size:12px;padding:2px 0 6px;color:var(--apx-fore, var(--apx-trellis-fore, #373d3f))}.apexcharts-trellis-breadcrumb-back{border:none;background:none;padding:0;font-size:12px;cursor:pointer;color:var(--apx-accent, #008ffb)}.apexcharts-trellis-breadcrumb-back:hover{text-decoration:underline}.apexcharts-trellis-breadcrumb-sep{opacity:.5}.apexcharts-trellis-breadcrumb-current{font-weight:600}.apexcharts-trellis-menu{position:absolute;top:26px;right:0;display:none;flex-direction:column;min-width:132px;background:var(--apx-bg, #fff);border:1px solid rgba(120,120,120,.25);border-radius:5px;box-shadow:2px 2px 6px -4px #0006;padding:4px;z-index:15}.apexcharts-trellis-menu-open{display:flex}.apexcharts-trellis-menu-item{border:none;background:none;text-align:left;font-size:12px;padding:5px 8px;border-radius:3px;cursor:pointer;color:var(--apx-fore, var(--apx-trellis-fore, #373d3f))}.apexcharts-trellis-menu-item:hover{background:#7878781f}.apexcharts-trellis-toolbar{position:absolute;top:0;right:0;display:flex;gap:2px;z-index:12}.apexcharts-trellis-tool{border:0;background:transparent;padding:2px;cursor:pointer;border-radius:3px;color:#6e8192;line-height:0}.apexcharts-trellis-tool:hover{color:var(--apx-fore, var(--apx-trellis-fore, #373d3f))}.apexcharts-trellis-tool.apexcharts-selected{color:var(--apx-accent, #008ffb)}.apexcharts-trellis-legend{display:flex;flex-wrap:wrap;justify-content:center;gap:4px 14px;padding:8px 10px 2px}.apexcharts-trellis-legend-item{display:flex;align-items:center;gap:6px;cursor:pointer;line-height:1}.apexcharts-trellis-legend-item .apexcharts-legend-marker{width:12px;height:12px;border-radius:50%;display:inline-block}.apexcharts-trellis-legend-item .apexcharts-legend-text{font-size:12px;color:var(--apx-fore, var(--apx-trellis-fore, #373d3f))}.apexcharts-trellis-legend-item.apexcharts-inactive-legend{opacity:.45}@media print{.apexcharts-canvas.apexcharts-printing,.apexcharts-canvas.apexcharts-printing svg{max-width:100%!important}.apexcharts-canvas.apexcharts-printing svg{height:auto!important}.apexcharts-canvas.apexcharts-printing{height:auto!important}.apexcharts-toolbar{display:none!important}}';const a=(null==(f=this.opts.chart)?void 0:f.nonce)||this.w.config.chart.nonce;a&&s.setAttribute("nonce",a),e?t.prepend(s):!1!==this.w.config.chart.injectStyleSheet&&i.head.prepend(s)}}if(w)return void this.trellis.render().then(()=>{ir(this.w,this),"function"==typeof this.w.config.chart.events.mounted&&this.w.config.chart.events.mounted(this,this.w),this.events.fireEvent("mounted",[this,this.w]),t(this)}).catch(t=>{var i,s;const a=t instanceof Error?t:new Error(String(t)),r=a;r.chartId=null==(s=null==(i=this.w)?void 0:i.globals)?void 0:s.chartID,r.el=this.el,e(a)});const A=this.create(this.w.config.series,{});if(!A)return t(this);this.mount(A).then(()=>{"function"==typeof this.w.config.chart.events.mounted&&this.w.config.chart.events.mounted(this,this.w),this.events.fireEvent("mounted",[this,this.w]),t(A)}).catch(t=>{var i,s;const a=t instanceof Error?t:new Error(String(t)),r=a;r.chartId=null==(s=null==(i=this.w)?void 0:i.globals)?void 0:s.chartID,r.el=this.el,e(a)})}else e(new Error("Element not found"))});return this._renderPromise=i,i.catch(()=>{this._renderPromise===i&&(this._renderPromise=null,this._detachHost())}),i}_unregister(){const t=Apex._chartInstances;for(let e=t?t.length:0;e--;)t[e].chart===this&&t.splice(e,1)}_detachHost(){p.isBrowser()&&(window.removeEventListener("resize",this.windowResizeHandler),Ra(this.el&&this.el.parentNode,this.parentResizeHandler),window.removeEventListener("beforeprint",this.beforePrintHandler),window.removeEventListener("afterprint",this.afterPrintHandler)),this._unregister()}create(t,e,i=!0){var s,a,r,o,n,h;const d=this.w;if(!this.core){new ca(this).initModules()}const u=this.w.globals;if(u.noData=!1,u.animationEnded=!1,!S.elementExists(this.el))return u.animationEnded=!0,null;if(this.responsive.checkResponsiveConfig(e),Qt(d),d.config.xaxis.convertedCatToNumeric){new Q(d.config).convertCatToNumericXaxis(d.config)}if(this.core.setupElements(),0===u.svgWidth)return u.animationEnded=!0,null;let g=t;const x=[];t.forEach((t,e)=>{t.hidden&&(g=this.legend.legendHelpers.getSeriesAfterCollapsing({realIndex:e}),x.push(e))});const f=mt.checkComboSeries(g,d.config.chart.type);u.comboCharts=f.comboCharts,u.comboBarCount=f.comboBarCount;const m=g.every(t=>t.data&&0===t.data.length);if((0===g.length||m&&u.collapsedSeries.length<1)&&this.series.handleNoData(),p.isBrowser()&&this.events.setupEventHandlers(),this.data.parseData(g,i),i&&x.length){const t=u._initialSeriesPeek||[],e=u.collapsedSeries.concat(u.ancillaryCollapsedSeries);u.initialSeries=t.map((t,i)=>{if(-1===x.indexOf(i)||!S.isObject(t))return t;const s=e.find(t=>t.index===i);return s&&Array.isArray(s.data)&&s.data.length?c(l({},t),{data:s.data.slice()}):t})}null==(s=this.rendererController)||s.resolve(),null==(a=this.weave)||a.dispatch("afterParse"),this.theme.init();new Ns(this.w,this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),u.noData&&u.collapsedSeries.length!==d.seriesData.series.length&&!d.config.legend.showForSingleSeries||null==(r=this.legend)||r.init(),this.series.hasAllSeriesEqualX(),u.axisCharts&&(this.core.coreCalculations(),"category"!==d.config.xaxis.type&&this.formatters.setLabelFormatters()),this.formatters.heatmapLabelFormatters();new mt(this.w).getLargestMarkerSize();const b=this.dimensions.plotCoords();this._writeLayoutCoords(b.layout);const y=this.core.xySettings();null==(o=this.weave)||o.dispatch("afterScales",{xyRatios:y}),this.grid.createGridMask();const v=this.core.plotChartType(g,y),w=new Sa(this.w,this);w.bringForward(),w.avoidOverlaps(),d.config.dataLabels.background.enabled&&w.dataLabelsBackground(),this.core.shiftGraphPosition(),null==(h=null==(n=this.legend)?void 0:n.heatmapGradientLegend)||h.repositionToPlot(),d.globals.dataPoints>50&&d.dom.elWrap.classList.add("apexcharts-disable-transitions");return{elGraph:v,xyRatios:y,dimensions:{plot:{left:d.layout.translateX,top:d.layout.translateY,width:d.layout.gridWidth,height:d.layout.gridHeight}}}}mount(t=null){const e=this,i=e.w;return new Promise((s,a)=>{var r,o,n,h,d,u,g,x,f,m,b,y,v;if(null===e.el)return a(new Error("Not enough data to display or target element not found"));i.globals.allSeriesCollapsed&&e.series.handleNoData(),e.grid=new pe(e.w,e);const w=e.grid.drawGrid(),A=ca._featureRegistry.get("annotations");if(e.annotations=A?new A(e.w,{theme:e.theme,timeScale:e.timeScale}):null,null==(r=e.annotations)||r.drawImageAnnos(),null==(o=e.annotations)||o.drawTextAnnos(),"back"===i.config.grid.position&&(w&&i.dom.elGraphical.add(w.el),(null==(n=null==w?void 0:w.elGridBorders)?void 0:n.node)&&i.dom.elGraphical.add(w.elGridBorders)),Array.isArray(t.elGraph))for(let e=0;e<t.elGraph.length;e++)i.dom.elGraphical.add(t.elGraph[e]);else i.dom.elGraphical.add(t.elGraph);this.series.settleCollapsedShapes(t.elGraph),"front"===i.config.grid.position&&(w&&i.dom.elGraphical.add(w.el),(null==(h=null==w?void 0:w.elGridBorders)?void 0:h.node)&&i.dom.elGraphical.add(w.elGridBorders)),null==(d=e.waterfall)||d.drawConnectors(),null==(u=e.streamgraph)||u.draw(),"front"===i.config.xaxis.crosshairs.position&&e.crosshairs.drawXCrosshairs(),"front"===i.config.yaxis[0].crosshairs.position&&e.crosshairs.drawYCrosshairs(),"treemap"!==i.config.chart.type&&e.axes.drawAxis(i.config.chart.type,w);const S=new ne(this.w,this.ctx,w),C=new le(this.w,{theme:this.theme,timeScale:this.timeScale},w);let k;null!==w&&(S.xAxisLabelCorrections(),C.setYAxisTextAlignments(),i.config.yaxis.map((t,e)=>{-1===i.globals.ignoreYAxisIndexes.indexOf(e)&&C.yAxisTitleRotate(e,t.opposite)})),oe.pruneRedundantLabelTitles(i.dom.baseEl),null==(g=e.annotations)||g.drawAxesAnnotations(),i.globals.noData||(p.isBrowser()&&i.config.tooltip.enabled&&!i.globals.noData&&(null==(x=e.w.globals.tooltip)||x.drawTooltip(t.xyRatios)),i.config.chart.accessibility.enabled&&i.config.chart.accessibility.keyboard.enabled&&i.config.chart.accessibility.keyboard.navigation.enabled&&(null==(f=e.keyboardNavigation)||f.init()),i.interact.keyNav=null,p.isBrowser()&&i.globals.axisCharts&&(i.axisFlags.isXNumeric||i.config.xaxis.convertedCatToNumeric||i.axisFlags.isRangeBar)?(i.config.chart.zoom.enabled||i.config.chart.selection&&i.config.chart.selection.enabled||i.config.chart.pan&&i.config.chart.pan.enabled)&&(null==(m=e.zoomPanSelection)||m.init({xyRatios:t.xyRatios})):(k=i.config.chart.toolbar.tools,i.config.chart.toolbar.tools=c(l({},k),{zoom:!1,zoomin:!1,zoomout:!1,selection:!1,pan:!1,reset:!1})),i.config.chart.toolbar.show&&!i.globals.allSeriesCollapsed?null==(b=e.toolbar)||b.createToolbar():!i.globals.allSeriesCollapsed&&(null==(y=e.toolbar)?void 0:y.resetControlDue())&&e.toolbar.createToolbar({resetOnly:!0}),k&&(i.config.chart.toolbar.tools=k)),null==(v=e.weave)||v.dispatch("draw",{pass:"full",xyRatios:null==t?void 0:t.xyRatios}),i.globals.memory.methodsToExec.length>0&&i.globals.memory.methodsToExec.forEach(t=>{t.method(t.params,!1,t.context)}),i.globals.axisCharts||i.globals.noData||e.core.resizeNonAxisCharts(),ir(i,e),s(e)})}destroy(){var t,e,i;this.trellis&&this.trellis.teardown(),this._renderPromise=null,this._detachHost(),clearTimeout(null!=(t=this.w.globals.resizeTimer)?t:void 0),clearTimeout(null!=(e=this._parentResizeWaiter)?e:void 0),this._parentResizeWaiter=null,this._keyboardNavigation&&this._keyboardNavigation.destroy(),er(this),i=this,Ja.delete(i),new Ca(this.ctx).clear({isUpdating:!1})}updateOptions(t,e=!1,i=!0,s=!0,a=!0){var r;const o=this.w;if(!this.core||!S.isObject(t))return console.warn("ApexCharts: updateOptions() ignored the call: no options object, or a destroyed chart."),Promise.resolve(this);t&&"series"in t&&!Array.isArray(t.series)&&(console.warn("ApexCharts: updateOptions() ignored `series` because it is not an array."),delete(t=l({},t)).series),t=rr(t,t.series);const n=ar(null==(r=null==(t=ht.dropEmptyOptions(t))?void 0:t.chart)?void 0:r.type,null==t?void 0:t.series);if(n)return n;if(this.trellis&&(this.trellis._mounted||this.trellis._rendering)){const e=this.trellis.canApplyInPlace(t);this.opts=S.extend(this.opts||{},t||{}),this.w.config=S.extend(o.config,t||{});return(this.trellis._rendering?this.trellis.whenSettled():Promise.resolve()).then(()=>e&&this.trellis.canApplyInPlace(t)?this.trellis.applyPanelOptions(i).then(()=>this):(this.trellis.teardown(),this.render()))}if(o.interact.selection=void 0,t.series){if(this.data.resetParsingFlags(),this.series.clearSeriesCache(),t.series.length&&t.series[0].data){const e=o.globals._initialSeriesPeek,i=this.series.emptyCollapsedSeries(S.copySeriesShallow(Array.isArray(e)?e:o.config.series));t.series=t.series.map((t,e)=>this.updateHelpers._extendSeries(t,e,i[e]))}this.updateHelpers.revertDefaultAxisMinMax()}return t.xaxis&&(t=this.updateHelpers.forceXAxisUpdate(t)),t.yaxis&&(t=this.updateHelpers.forceYAxisUpdate(t)),o.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),t.theme&&(t=this.theme.updateThemeOptions(t)),this.updateHelpers._updateOptions(t,e,i,s,a)}updateSeries(t=[],e=!0,i=!0){if(!this.core||!Array.isArray(t))return console.warn("ApexCharts: updateSeries() ignored the call: no series array, or a destroyed chart."),Promise.resolve(this);const s=ar(void 0,t=rr(t,t));return s||(this.trellis&&this.trellis._rendering?this.trellis.whenSettled().then(()=>this.trellis.updateSeries(t,e)):this.trellis&&this.trellis._mounted?this.trellis.updateSeries(t,e):(this.data.resetParsingFlags(),this.series.prepareDataUpdate(),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(t,e,i)))}appendSeries(t,e=!0,i=!0){return this.updateSeries([...this.w.config.series,t],e,i)}appendData(t,e=!0){var i;const s=this,a=s.w.globals;if(!s.core)return Promise.resolve(s);const r=s.trellis;if(r&&(r._mounted||r._rendering))return s.updateSeries(s.w.config.series.map((e,i)=>t[i]?c(l({},e),{data:e.data.concat(t[i].data)}):e));s.data.resetParsingFlags(),s.w.globals.dataChanged=!0,s.w.globals.shouldAnimate=!0,s.updateHelpers.capture(!0);const o=s.w.globals.histogramRawSeries||s.w.globals.waterfallRawSeries||s.w.globals.dumbbellRawSeries||s.w.globals.streamgraphRawSeries;if(o){for(let e=0;e<o.length;e++){const i=t[e];i&&Array.isArray(i.data)&&Array.isArray(o[e].data)&&(o[e].data=o[e].data.concat(i.data))}return this.update(void 0,e)}const n=s.w.config.series.slice(),h=a.dataReducerRawSeries,d=[...a.collapsedSeries,...a.ancillaryCollapsedSeries];for(let e=0;e<n.length;e++)if(null!==t[e]&&void 0!==t[e]){const s=t[e],a=d.find(t=>t.index===e),r=a&&Array.isArray(a.data)?a:n[e];r.data=r.data.concat(s.data),h&&Array.isArray(null==(i=h[e])?void 0:i.data)&&(h[e].data=h[e].data.concat(s.data))}return be(n,s.w),h&&be(h,s.w),s.w.config.series=n,this.update(void 0,e)}static _optionsTooBigToCompare(t){const e=t&&t.series;if(!Array.isArray(e))return!1;let i=0;for(let t=0;t<e.length;t++){const s=e[t]&&e[t].data;if(i+=Array.isArray(s)?s.length:1,i>1e3)return!0}return!1}update(t,e=!1){const i=this.trellis;return i&&(i._mounted||i._rendering)?i.whenSettled().then(()=>(i.teardown(),this.render())):new Promise((i,s)=>{var a;const r=t&&!or._optionsTooBigToCompare(t)?S.stringifyForCompare(t):null;if(this.lastUpdateOptions&&r===this._lastUpdateKey)return i(this);this._lastUpdateKey=r,this.lastUpdateOptions=r&&t,null==(a=this.morphTypeChange)||a.retire(),new Ca(this.ctx).clear({isUpdating:!0});const o=this.create(this.w.config.series,null!=t?t:{},e);if(!o)return i(this);this.mount(o).then(()=>{var t,e,s;null==(t=this.morphTypeChange)||t.applyChromeFade(),Ke(this.w,{layout:!(null==(e=this.morphTypeChange)?void 0:e.isActive())}),si(this.w,{layout:!(null==(s=this.morphTypeChange)?void 0:s.isActive())}),xi(this.w),pi(this.w),"function"==typeof this.w.config.chart.events.updated&&this.w.config.chart.events.updated(this,this.w),this.events.fireEvent("updated",[this,this.w]),this.w.globals.isDirty=!0,i(this)}).catch(t=>{s(t)})})}_fastAxisChromeRefresh(t){const e=this.w,i=e.globals;this._fastAxisBailReason="";try{if(i.isBarHorizontal)return this._fastAxisBailReason="barHorizontal",!1;if(e.config.chart.sparkline.enabled)return!0;const t=e.config.annotations;if(i.memory.methodsToExec.length||t&&(t.yaxis&&t.yaxis.length||t.xaxis&&t.xaxis.length||t.points&&t.points.length||t.texts&&t.texts.length||t.images&&t.images.length))return this._fastAxisBailReason="annotations",!1;if(e.config.chart.ink&&e.config.chart.ink.enabled)return this._fastAxisBailReason="ink",!1;const s=this.dimensions;if(!s||!s.dimYAxis)return this._fastAxisBailReason="noDimensions",!1;const a=e.layout.yLabelsCoords,r=e.layout.yTitleCoords,o=s.dimYAxis.getyAxisLabelsCoords(),n=s.dimYAxis.getyAxisTitleCoords();e.layout.yLabelsCoords=[],e.layout.yTitleCoords=[],e.config.yaxis.map((t,i)=>{e.layout.yLabelsCoords.push({width:o[i].width,index:i}),e.layout.yTitleCoords.push({width:n[i].width,index:i})});const l=s.dimYAxis.getTotalYAxisWidth();if(l>s.yAxisWidth+2)return e.layout.yLabelsCoords=a,e.layout.yTitleCoords=r,this._fastAxisBailReason=`labelWidth ${l} > ${s.yAxisWidth}`,!1;const c=e.dom.elGraphical.node,h=c.querySelector(".apexcharts-grid"),d=c.querySelector(".apexcharts-grid-borders");if(!h)return this._fastAxisBailReason="missingGridNode",!1;const p=h.parentNode,u=d?d.nextSibling:h.nextSibling;h.remove(),d&&d.remove(),c.querySelectorAll(".apexcharts-xaxis-tick").forEach(t=>t.remove()),this.grid=new pe(e,this);const g=this.grid.drawGrid();g&&g.el&&(p.insertBefore(g.el.node,u),g.elGridBorders&&g.elGridBorders.node&&p.insertBefore(g.elGridBorders.node,u));const x=new ne(this.w,this.ctx,g),f=c.querySelector(".apexcharts-xaxis");if(f){const t=f.parentNode,e=f.nextSibling;f.remove();const i=x.drawXaxis();t.insertBefore(i.node,e)}const m=new le(this.w,{theme:this.theme,timeScale:this.timeScale},g);for(let t=0;t<e.config.yaxis.length;t++){if(-1!==i.ignoreYAxisIndexes.indexOf(t))continue;const s=e.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${t}']`);if(!s)return this._fastAxisBailReason="missingYAxisNode",!1;const a=s.parentNode;if(!a)return this._fastAxisBailReason="missingYAxisParent",!1;const r=s.nextSibling;s.remove();const o=m.drawYaxis(t);a.insertBefore(o.node,r)}return null!==g&&(x.xAxisLabelCorrections(),m.setYAxisTextAlignments(),e.config.yaxis.map((t,e)=>{-1===i.ignoreYAxisIndexes.indexOf(e)&&m.yAxisTitleRotate(e,t.opposite)})),oe.pruneRedundantLabelTitles(e.dom.baseEl),!0}catch(t){return this._fastAxisBailReason="error: "+(t&&t.message),!1}}fastUpdate(t,e){return new Promise((i,s)=>{var a,r,o,n,l,c;try{const h=this.w,d=h.globals;null==(a=this.morphTypeChange)||a.retire(),this.lastUpdateOptions=null;const u=h.dom.elDefs&&h.dom.elDefs.node,g=u&&u.childElementCount;d.shouldAnimate=t,d.dataChanged=!0,d.animationEnded=!1,cs.invalidateSelectors(h),this.series.hasAllSeriesEqualX(),d.axisCharts&&(this.core.coreCalculations(),"category"!==h.config.xaxis.type&&this.formatters.setLabelFormatters()),this.formatters.heatmapLabelFormatters();const x=this.core.xySettings();this._zoomPanSelection&&(this._zoomPanSelection.xyRatios=x);const f=JSON.stringify({y:(d.yAxisScale||[]).map(t=>t?t.result:null),xMin:d.minX,xMax:d.maxX}),m=d.axisCharts&&null!=e&&f!==e;if(m&&!this._fastAxisChromeRefresh(x))return this._updateStats.full++,this.update().then(()=>i(this)).catch(s);m?this._updateStats.fastWithAxes++:this._updateStats.fast++,null==(r=this.weave)||r.dispatch("afterScales",{pass:"fast",xyRatios:x});const b=this.ctx.renderer,y=!!(b&&"canvas"===b.kind&&b.canRepaintInPlace&&b.canRepaintInPlace());y&&(b._repaintHostInPlace=!0);const v=h.dom.elGraphical.node;v.querySelectorAll((y?"":".apexcharts-canvas-series-wrap, ")+".apexcharts-plot-series, .apexcharts-series, .apexcharts-datalabels, .apexcharts-datalabels-background").forEach(t=>{var e;return null==(e=t.parentNode)?void 0:e.removeChild(t)}),u&&u.querySelectorAll("[id*=orecastMask]>*").forEach(t=>t.remove());const w=this.core.plotChartType(h.config.series,x),A=v.querySelector(".apexcharts-grid"),S=v.querySelector(".apexcharts-xaxis"),C=Array.isArray(w)?w:[w],k=A&&"front"===h.config.grid.position?A:S;k?C.forEach(t=>{const e=t&&t.node?t.node:t;e&&v.insertBefore(e,k)}):C.forEach(t=>{h.dom.elGraphical.add(t)}),this.series.settleCollapsedShapes(C);const M=new Sa(h,this);if(M.bringForward(),M.avoidOverlaps(),h.config.dataLabels.background.enabled&&M.dataLabelsBackground(),null==(o=this.waterfall)||o.drawConnectors(),null==(n=this.streamgraph)||n.draw(),d.streamScrolled?je(h):Ke(h),xi(h),pi(h),p.isBrowser()&&h.config.tooltip.enabled&&!d.noData&&(null==(l=h.globals.tooltip)||l.drawTooltip(x)),null==(c=this.weave)||c.dispatch("draw",{pass:"fast",xyRatios:x}),u&&u.childElementCount>g){const t=new Set;this.el.querySelectorAll("[fill^=url],[stroke^=url],[filter^=url]").forEach(e=>{for(const i of e.attributes)t.add(i.value.slice(5,-1))}),u.querySelectorAll("[id^=Svgjs]").forEach(e=>t.has(e.id)||e.remove())}"function"==typeof h.config.chart.events.updated&&h.config.chart.events.updated(this,h),this.events.fireEvent("updated",[this,h]),ir(h,this),d.isDirty=!0,i(this)}catch(t){s(t)}})}getSyncedCharts(){const t=this.getGroupedCharts();return t.splice(0,0,this),t}getPanels(){return this.trellis?this.trellis.getPanels():[]}getPanel(t){return this.trellis?this.trellis.getPanel(t):null}getGroupedCharts(){return Apex._chartInstances.filter(t=>this!==t.chart&&!!this.w.config.chart.group&&this.w.config.chart.group===t.group).map(t=>t.chart)}static getChartByID(t){const e=S.escapeString(t);if(!Apex._chartInstances)return;const i=Apex._chartInstances.filter(t=>t.id===e)[0];return i&&i.chart}static trellis(t,e){if(!ca._featureRegistry.get("trellis"))return Vi("ApexCharts.trellis()","trellis"),null;const i=new or(t,e);return i.render(),i}static initOnLoad(){v.querySelectorAll("[data-apexcharts]").forEach(t=>{try{new or(t,JSON.parse(t.getAttribute("data-options"))).render()}catch(t){console.warn("ApexCharts.initOnLoad():",t)}})}static exec(t,e,...i){const s=this.getChartByID(t);if(!s)return;if(-1===s.publicMethods.indexOf(e))return null;const a=s.w.globals;a.isExecCalled=!0;const r=s[e](...i);return a.isExecCalled=!1,r}static merge(t,e){return S.extend(t,e)}static getThemePalettes(){return{palette1:["#008FFB","#00A86F","#CA8501","#FF4560","#846DD5"],palette2:["#6978CB","#039DE2","#49A84D","#B39105","#D68000"],palette3:["#209FCC","#648291","#D4526E","#0FA783","#A19285"],palette4:["#2FA59D","#73A20B","#099DE1","#FD5D5D","#648291"],palette5:["#2B908F","#F56566","#2EAB16","#FA4443","#1EA2BD"],palette6:["#449DD1","#F86624","#EA3A4A","#9C63D1","#899E2A"],palette7:["#DF475B","#1B998B","#7E75B7","#F46036","#B1911B"],palette8:["#9C63D1","#F86624","#B38F04","#EA3A4A","#2FA2B3"],palette9:["#98776F","#A19285","#A8705E","#BA6560","#A0927F"],palette10:["#C91EFF","#A94BFD","#6C6AFE","#2983FF","#009ED8"],cvdDeuteranopia:["#0072B2","#E69F00","#56B4E9","#009E73","#F0E442","#D55E00","#CC79A7"],cvdProtanopia:["#0077BB","#EE7733","#009988","#EE3377","#BBBBBB","#33BBEE","#CC3311"],cvdTritanopia:["#CC3311","#009988","#EE7733","#0077BB","#EE3377","#BBBBBB","#33BBEE"],highContrast:["#005A9C","#C00000","#007A33","#6C3483","#7B3F00","#0097A7","#4A235A"]}}static use(t){nt(t)}static registerFeatures(t){ca.registerFeatures(t)}static setLicense(t){return ja.setLicense(t),sr(),or}static registerPlugin(t){return function(t){t&&"string"==typeof t.name&&"function"==typeof t.setup?Ba()[t.name]=t:console.error("[apexcharts] registerPlugin: a plugin needs a { name, setup } shape.")}(t),or}static unregisterPlugin(t){return function(t){delete Ba()[t]}(t),or}static registerRenderer(t,e){Gs.registerRenderer(t,e)}static registerSeriesType(t,e){const i=or._customSeriesFactory;return i?e&&"function"==typeof e.renderItem?ot(t)&&!rt(t)||F[t]||R.includes(t)?(console.warn(`[apexcharts] registerSeriesType("${t}") would override the built-in "${t}" chart type; pick another name.`),or):(nt({[t]:i(t,e)}),function(t){at().add(t)}(t),or):(console.warn(`[apexcharts] registerSeriesType("${t}") needs a def with a renderItem() function.`),or):(console.warn(`[apexcharts] registerSeriesType("${t}") requires the Marks feature: import 'apexcharts/features/marks'.`),or)}static unregisterSeriesType(t){return rt(t)&&function(t){delete st()[t],at().delete(t)}(t),or}static registerTheme(t,e){return function(t,e){t&&"string"==typeof t?null==e||"object"==typeof e&&!Array.isArray(e)?wi()[t]=e||{}:console.warn(`ApexCharts: registerTheme("${t}") expects an object like { mode, palette, tokens, monochrome, accessibility }.`):console.warn("ApexCharts: registerTheme requires a non-empty name.")}(t,e),or}static unregisterTheme(t){return function(t){t&&delete wi()[t]}(t),or}static registerEasing(t,e){return Wt(t,e),or}static registerUnitLayout(t,e){return function(t,e){t&&"string"==typeof t?"function"==typeof e?Ma()[t]=e:console.warn(`ApexCharts: registerUnitLayout("${t}") expects a function (objects, rect) => [{id, x, y}].`):console.warn("ApexCharts: registerUnitLayout requires a non-empty name.")}(t,e),or}static unregisterUnitLayout(t){return function(t){delete Ma()[t]}(t),or}static registerUnitMark(t,e){return Da(t,e),or}static unregisterUnitMark(t){return function(t){delete _a()[t]}(t),or}static registerRowSource(t,e){return function(t,e){t&&"string"==typeof t?"function"==typeof e?La()[t]=e:console.warn(`ApexCharts: registerRowSource("${t}") expects a function (w, opts) => series.`):console.warn("ApexCharts: registerRowSource requires a non-empty name.")}(t,e),or}static unregisterRowSource(t){return function(t){delete La()[t]}(t),or}rowSeries(t){const e=function(t){const e=t&&t.config&&t.config.chart;return e?Ea(e.requestedType)||Ea(e.type):null}(this.w);return e&&e(this.w,t)||null}static crossfilter(t){if(!t||"string"!=typeof t.id)throw new Error("ApexCharts.crossfilter requires an { id } string.");const e=ca._featureRegistry.get("crossfilter");if(!e)return Vi("ApexCharts.crossfilter()","link"),null;const i=e.getOrCreate(t);return sr(),i}static getCrossfilter(t){const e=ca._featureRegistry.get("crossfilter");return e?e.get(t):null}clearCrossfilter(){var t;null==(t=this.linkedViews)||t.clearGroup()}startMeasure(){var t;null==(t=this.measure)||t.startMeasure()}stopMeasure(){var t;null==(t=this.measure)||t.stopMeasure()}clearMeasures(){var t;null==(t=this.measure)||t.clearMeasures()}toggleSeries(t){return this.series.toggleSeries(t)}highlightSeriesOnLegendHover(t,e){return this.series.toggleSeriesOnHover(t,e)}showSeries(t){this.series.showSeries(t)}hideSeries(t){this.series.hideSeries(t)}highlightSeries(t){this.series.highlightSeries(t)}isSeriesHidden(t){return this.series.isSeriesHidden(t)}resetSeries(t=!0,e=!0){this.series&&this.series.resetSeries(t,e)}addEventListener(t,e){this.events.addEventListener(t,e)}removeEventListener(t,e){this.events.removeEventListener(t,e)}addXaxisAnnotation(t,e=!0,i=void 0){var s;let a=this;i&&(a=i),null==(s=a.annotations)||s.addXaxisAnnotationExternal(t,e,a)}addYaxisAnnotation(t,e=!0,i=void 0){var s;let a=this;i&&(a=i),null==(s=a.annotations)||s.addYaxisAnnotationExternal(t,e,a)}addPointAnnotation(t,e=!0,i=void 0){var s;let a=this;i&&(a=i),null==(s=a.annotations)||s.addPointAnnotationExternal(t,e,a)}clearAnnotations(t=void 0){var e;let i=this;t&&(i=t),i.lastUpdateOptions=null,null==(e=i.annotations)||e.clearAnnotations(i)}removeAnnotation(t,e=void 0){var i;let s=this;e&&(s=e),s.lastUpdateOptions=null,null==(i=s.annotations)||i.removeAnnotation(s,t)}getChartArea(){return this.w.dom.baseEl.querySelector(".apexcharts-inner")}getSeriesTotalXRange(t,e){return this.coreUtils.getSeriesTotalsXRange(t,e)}getHighestValueInSeries(t=0){return this.w.seriesData.series[t]&&new Bi(this.w).getMinYMaxY(t).highestY}getLowestValueInSeries(t=0){return this.w.seriesData.series[t]&&new Bi(this.w).getMinYMaxY(t).lowestY}getSeriesTotal(){return this.w.globals.seriesTotals}getState(){const t=this.w,e=t.globals;return{config:t.config,series:t.seriesData.series,seriesNames:t.seriesData.seriesNames,colors:e.colors,labels:t.labelData.labels,seriesTotals:e.seriesTotals,seriesPercent:e.seriesPercent,seriesXvalues:e.seriesXvalues,seriesYvalues:e.seriesYvalues,minX:e.minX,maxX:e.maxX,minY:e.minY,maxY:e.maxY,minYArr:e.minYArr,maxYArr:e.maxYArr,minXDiff:e.minXDiff,dataPoints:e.dataPoints,xAxisScale:e.xAxisScale,yAxisScale:e.yAxisScale,xTickAmount:e.xTickAmount,isXNumeric:t.axisFlags.isXNumeric,seriesYAxisMap:e.seriesYAxisMap,seriesYAxisReverseMap:e.seriesYAxisReverseMap,svgWidth:e.svgWidth,svgHeight:e.svgHeight,gridWidth:t.layout.gridWidth,gridHeight:t.layout.gridHeight,selectedDataPoints:t.interact.selectedDataPoints,collapsedSeriesIndices:e.collapsedSeriesIndices,zoomed:t.interact.zoomed,seriesX:t.seriesData.seriesX,seriesZ:t.seriesData.seriesZ,seriesCandleO:t.candleData.seriesCandleO,seriesCandleH:t.candleData.seriesCandleH,seriesCandleM:t.candleData.seriesCandleM,seriesCandleL:t.candleData.seriesCandleL,seriesCandleC:t.candleData.seriesCandleC,seriesRangeStart:t.rangeData.seriesRangeStart,seriesRangeEnd:t.rangeData.seriesRangeEnd,seriesGoals:t.seriesData.seriesGoals}}toggleDataPointSelection(t,e){return this.updateHelpers.toggleDataPointSelection(t,e)}zoomX(t,e){var i;null==(i=this.ctx.toolbar)||i.zoomUpdateOptions(t,e)}setLocale(t){this.localization.setCurrentLocaleValues(t)}dataURI(t){if(!this.ctx.exports)throw new Error("apexcharts: Exports feature is not registered. Import apexcharts/features/exports.");return this.trellis&&this.trellis._mounted?this.trellis.exports.dataURI(t):this.ctx.exports.dataURI(t)}getSvgString(t){if(!this.ctx.exports)throw new Error("apexcharts: Exports feature is not registered. Import apexcharts/features/exports.");return this.trellis&&this.trellis._mounted?this.trellis.exports.svgString(t):this.ctx.exports.getSvgString(t)}exportToCSV(t={}){if(!this.ctx.exports)throw new Error("apexcharts: Exports feature is not registered. Import apexcharts/features/exports.");return this.trellis&&this.trellis._mounted?this.trellis.exports.download("csv",t):this.ctx.exports.exportToCSV(t)}promotePanel(t){return this.trellis&&this.trellis._mounted?this.trellis.promote(t):Promise.resolve()}restorePanels(){return this.trellis&&this.trellis._mounted?this.trellis.restorePromotion():Promise.resolve()}paper(){return this.w.dom.Paper}getActiveRenderer(){return this.rendererController?this.rendererController.getActiveKind():"svg"}refreshTokens(){return this.lastUpdateOptions=null,this.update()}drillDown(t){if(!this.ctx.drilldown)throw new Error("apexcharts: Drilldown feature is not registered. Import apexcharts/features/drilldown.");return this.ctx.drilldown.drillDown(t)}drillUp(){if(!this.ctx.drilldown)throw new Error("apexcharts: Drilldown feature is not registered. Import apexcharts/features/drilldown.");return this.ctx.drilldown.drillUp()}drillToRoot(){if(!this.ctx.drilldown)throw new Error("apexcharts: Drilldown feature is not registered. Import apexcharts/features/drilldown.");return this.ctx.drilldown.drillToRoot()}clearDrilldownCache(t){if(!this.ctx.drilldown)throw new Error("apexcharts: Drilldown feature is not registered. Import apexcharts/features/drilldown.");return this.ctx.drilldown.clearCache(t)}_writeLayoutCoords(t){for(const e of Object.keys(t)){const i=Object.getOwnPropertyDescriptor(t,e);i&&"value"in i&&(this.w.layout[e]=i.value)}}_parentResizeCallback(){this.w.config.chart.redrawOnParentResize&&(this.w.globals.animationEnded?this._windowResize():this._deferParentResize())}_deferParentResize(){var t;if(this._parentResizeWaiter)return;const e=Date.now(),i=(null==(t=this.w.config.chart.animations)?void 0:t.speed)||800,s=Math.min(Math.max(1e3+2*i,1500),15e3),a=()=>{this._parentResizeWaiter=null,!this.w.globals.isDestroyed&&S.elementExists(this.el)&&(this.w.globals.animationEnded||Date.now()-e>=s?this._windowResize():this._parentResizeWaiter=window.setTimeout(a,100))};this._parentResizeWaiter=window.setTimeout(a,100)}_printEnabled(){const t=this.w.config.chart.print;return!1!==t&&!1!==(null==t?void 0:t.enabled)}_beforePrint(){var t,e,i,s,a,r;if(this._printRestore||!this._printEnabled())return;const o=this.w,n=null!=(e=null==(t=o.config.chart.print)?void 0:t.width)?e:700;this._printRestore={width:this.responsive.withoutBreakpoints(o.config).chart.width},"number"==typeof n&&n>0&&o.globals.svgWidth>n&&this.updateHelpers._updateOptions({chart:{width:n}},!1,!1,!1,!1);const l=null==(s=null==(i=o.dom)?void 0:i.Paper)?void 0:s.node;if(l&&!l.getAttribute("viewBox")){l.setAttribute("viewBox",`0 0 ${o.globals.svgWidth} ${o.globals.svgHeight}`),this._printRestore.viewBoxAdded=!0,null==(r=null==(a=o.dom)?void 0:a.elWrap)||r.classList.add("apexcharts-printing");const t=this.el;t&&t.style&&(this._printRestore.minHeight=t.style.minHeight,t.style.minHeight="0")}}_afterPrint(){var t,e,i,s,a,r,o;if(!this._printRestore)return;const n=this.w,l=this._printRestore;if(this._printRestore=null,l.viewBoxAdded){null==(i=null==(e=null==(t=n.dom)?void 0:t.Paper)?void 0:e.node)||i.removeAttribute("viewBox"),null==(a=null==(s=n.dom)?void 0:s.elWrap)||a.classList.remove("apexcharts-printing");const o=this.el;o&&o.style&&(o.style.minHeight=null!=(r=l.minHeight)?r:"")}n.config.chart.width!==l.width&&(this.updateHelpers._updateOptions({chart:{width:l.width}},!1,!1,!1,!1),clearTimeout(null!=(o=n.globals.resizeTimer)?o:void 0))}_windowResize(){var t;clearTimeout(null!=(t=this.w.globals.resizeTimer)?t:void 0),this.w.globals.resizeTimer=window.setTimeout(()=>{const t=this.w.globals;if(this.core&&t.lastResizeSignature){const e=this.core.getResizeSignature();if(e.w===t.lastResizeSignature.w&&e.h===t.lastResizeSignature.h&&e.iw===t.lastResizeSignature.iw)return}t.resized=!0,t.dataChanged=!1,this.ctx.update()},150)}_windowResizeHandler(){var t;clearTimeout(null!=(t=this.w.globals.resizeTimer)?t:void 0);let{redrawOnWindowResize:e}=this.w.config.chart;"function"==typeof e&&(e=e()),e&&this._windowResize()}}const nr=Object.freeze(Object.defineProperty({__proto__:null,__apex_Animations:se,__apex_Animations_applyAnimationPolicy:Qt,__apex_Animations_applyProgressiveReveal:Jt,__apex_Animations_computeStagger:te,__apex_Animations_prefersReducedMotion:Kt,__apex_Base:ft,__apex_BrowserAPIs_BrowserAPIs:v,__apex_ChartFactory_getChartClass:lt,__apex_ChartFactory_isCustom:rt,__apex_ChartFactory_register:nt,__apex_Config:ht,__apex_Constants_LINE_HEIGHT_RATIO:dt,__apex_Constants_NICE_SCALE_ALLOWED_MAG_MSD:ut,__apex_Constants_NICE_SCALE_DEFAULT_TICKS:gt,__apex_Core:Gi,__apex_CoreUtils:mt,__apex_Crosshairs:de,__apex_DOMShim_SSRClassList:x,__apex_DOMShim_SSRDOMShim:f,__apex_DOMShim_SSRElement:g,__apex_Data:ls,__apex_DataLabels:Sa,__apex_DateTime:C,__apex_Defaults:Q,__apex_Easing_DEFAULT_EASING_NAME:"easeInOutSine",__apex_Easing_cubicBezier:Ht,__apex_Easing_easeInOutSine:Xt,__apex_Easing_registerEasing:Wt,__apex_Easing_resolveEasing:$t,__apex_Environment_Environment:p,__apex_Events:ae,__apex_Fill:fa,__apex_Filters:pa,__apex_Formatters:k,__apex_Globals:xt,__apex_Graphics:xa,__apex_Markers:Ns,__apex_Options:_,__apex_PathMorphing_arrayToPath:Ct,__apex_PathMorphing_morphPaths:Ft,__apex_PathMorphing_parsePath:At,__apex_PathMorphing_pathBbox:St,__apex_PerformanceCache:cs,__apex_Range:Bi,__apex_Resize_addResizeListener:za,__apex_Resize_removeResizeListener:Ra,__apex_Responsive:me,__apex_SVGAnimation_SVGAnimationRunner:It,__apex_SVGAnimation_installAnimationMethods:Ot,__apex_SVGContainer:Js,__apex_SVGDraggable_installDraggable:ra,__apex_SVGElement:js,__apex_SVGFilter_FilterBuilder:sa,__apex_SVGFilter_SVGFilter:ia,__apex_SVGFilter_installFilterMethods:aa,__apex_SVGGradient_SVGGradient:Vs,__apex_SVGPattern_SVGPattern:Ks,__apex_SVGSelectable_installSelectable:oa,__apex_Scales:Pi,__apex_Series:mi,__apex_Theme:ki,__apex_ThemePalettes_getThemePalettes:bi,__apex_TimeScale:$i,__apex_TitleSubtitle:Mi,__apex_Utils:S,__apex_axes_Axes:ce,__apex_axes_AxesUtils:oe,__apex_axes_Grid:pe,__apex_axes_XAxis:ne,__apex_axes_YAxis:le,__apex_charts_Scatter:ma,__apex_dimensions_Dimensions:Ei,__apex_dimensions_Grid:Fi,__apex_dimensions_Helpers:Ti,__apex_dimensions_XAxis:_i,__apex_dimensions_YAxis:Di,__apex_helpers_Destroy:Ca,__apex_helpers_InitCtxVariables:ca,__apex_helpers_Localization:re,__apex_helpers_UpdateHelpers:us,__apex_index_Box:wt,__apex_index_SVG:na,__apex_math_Box:wt,__apex_math_Matrix:vt,__apex_math_Point:yt,__apex_math_SVGNS:bt,__apex_tooltip_AxesTooltip:Xs,__apex_tooltip_Intersect:Os,__apex_tooltip_Labels:Is,__apex_tooltip_Marker:Rs,__apex_tooltip_Position:Ls,__apex_tooltip_Tooltip:Hs,__apex_tooltip_Utils:xs,default:or},Symbol.toStringTag,{value:"Module"}));return Object.defineProperty(or,"__internals",{value:nr,enumerable:!1,writable:!1,configurable:!1}),function(t){Object.prototype.hasOwnProperty.call(t,"__drainsAddons")||Object.defineProperty(t,"__drainsAddons",{value:!0});const e=globalThis,i=()=>{var t;const i=e.__apexcharts_pending_addons__;if(!Array.isArray(i)||!i.length)return;if(!e.ApexCharts||!e.ApexCharts.__internals)return;const s=i.splice(0);for(const t of s)t.done=!0;for(const i of s)try{i.run.call(e)}catch(s){e.console.error(`ApexCharts: ${i.file}, loaded before the ApexCharts script, failed to register: ${null!=(t=null==s?void 0:s.message)?t:s}`)}};"function"==typeof queueMicrotask?queueMicrotask(i):Promise.resolve().then(i)}(or),or});
|