apexcharts 6.2.0 → 6.3.0
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/dist/apexcharts.common.js +2 -2
- package/dist/apexcharts.esm.js +611 -96
- package/dist/apexcharts.js +611 -96
- package/dist/apexcharts.min.js +2 -2
- package/dist/apexcharts.ssr.common.js +2 -2
- package/dist/apexcharts.ssr.esm.js +611 -96
- package/dist/area.common.js +2 -2
- package/dist/area.esm.js +2 -2
- package/dist/bar.common.js +1 -1
- package/dist/bar.esm.js +1 -1
- package/dist/boxPlot.common.js +1 -1
- package/dist/boxPlot.esm.js +1 -1
- package/dist/bubble.common.js +2 -2
- package/dist/bubble.esm.js +2 -2
- package/dist/candlestick.common.js +1 -1
- package/dist/candlestick.esm.js +1 -1
- package/dist/column.common.js +1 -1
- package/dist/column.esm.js +1 -1
- package/dist/core.common.js +2 -2
- package/dist/core.esm.js +578 -76
- package/dist/donut.common.js +1 -1
- package/dist/donut.esm.js +1 -1
- package/dist/features/all.common.js +2 -2
- package/dist/features/all.esm.js +33 -20
- package/dist/features/annotations.common.js +1 -1
- package/dist/features/annotations.esm.js +1 -1
- package/dist/features/context-menu.common.js +1 -1
- package/dist/features/context-menu.esm.js +1 -1
- package/dist/features/drilldown.common.js +1 -1
- package/dist/features/drilldown.esm.js +1 -1
- package/dist/features/exports.common.js +1 -1
- package/dist/features/exports.esm.js +1 -1
- package/dist/features/facet.common.js +1 -1
- package/dist/features/facet.esm.js +1 -1
- package/dist/features/history.common.js +1 -1
- package/dist/features/history.esm.js +1 -1
- package/dist/features/ink.common.js +1 -1
- package/dist/features/ink.esm.js +1 -1
- package/dist/features/keyboard.common.js +1 -1
- package/dist/features/keyboard.esm.js +1 -1
- package/dist/features/legend.common.js +1 -1
- package/dist/features/legend.esm.js +1 -1
- package/dist/features/link.common.js +1 -1
- package/dist/features/link.esm.js +1 -1
- package/dist/features/marks.common.js +1 -1
- package/dist/features/marks.esm.js +1 -1
- package/dist/features/measure.common.js +1 -1
- package/dist/features/measure.esm.js +1 -1
- package/dist/features/morph.common.js +1 -1
- package/dist/features/morph.esm.js +1 -1
- package/dist/features/perspectives.common.js +1 -1
- package/dist/features/perspectives.esm.js +1 -1
- package/dist/features/renderer-canvas.common.js +2 -2
- package/dist/features/renderer-canvas.esm.js +15 -1
- package/dist/features/storyboard.common.js +1 -1
- package/dist/features/storyboard.esm.js +1 -1
- package/dist/features/toolbar.common.js +2 -2
- package/dist/features/toolbar.esm.js +19 -20
- package/dist/features/weave.common.js +1 -1
- package/dist/features/weave.esm.js +1 -1
- package/dist/heatmap.common.js +1 -1
- package/dist/heatmap.esm.js +1 -1
- package/dist/line.common.js +2 -2
- package/dist/line.esm.js +2 -2
- package/dist/pie.common.js +1 -1
- package/dist/pie.esm.js +1 -1
- package/dist/polarArea.common.js +1 -1
- package/dist/polarArea.esm.js +1 -1
- package/dist/radar.common.js +1 -1
- package/dist/radar.esm.js +1 -1
- package/dist/radialBar.common.js +1 -1
- package/dist/radialBar.esm.js +1 -1
- package/dist/rangeArea.common.js +2 -2
- package/dist/rangeArea.esm.js +2 -2
- package/dist/rangeBar.common.js +1 -1
- package/dist/rangeBar.esm.js +1 -1
- package/dist/scatter.common.js +2 -2
- package/dist/scatter.esm.js +2 -2
- package/dist/treemap.common.js +1 -1
- package/dist/treemap.esm.js +1 -1
- package/dist/violin.common.js +1 -1
- package/dist/violin.esm.js +1 -1
- package/package.json +1 -1
- package/src/apexcharts.js +300 -33
- package/src/charts/Line.js +7 -5
- package/src/modules/Core.js +19 -0
- package/src/modules/Crosshairs.js +24 -5
- package/src/modules/Data.js +198 -14
- package/src/modules/Range.js +160 -32
- package/src/modules/Series.js +19 -0
- package/src/modules/ZoomPanSelection.js +16 -11
- package/src/modules/helpers/UpdateHelpers.js +16 -5
- package/src/modules/settings/Globals.js +50 -1
- package/src/modules/tooltip/AxesTooltip.js +7 -1
- package/src/modules/tooltip/Utils.js +5 -1
- package/src/renderers/canvas/CanvasRenderer.js +16 -0
- package/src/types/internal.d.ts +23 -0
package/dist/core.common.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ApexCharts v6.
|
|
2
|
+
* ApexCharts v6.3.0
|
|
3
3
|
* (c) 2018-2026 ApexCharts
|
|
4
4
|
*/
|
|
5
|
-
"use strict";var t=Object.defineProperty,e=Object.defineProperties,s=Object.getOwnPropertyDescriptors,i=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,o=(e,s,i)=>s in e?t(e,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[s]=i,n=(t,e)=>{for(var s in e||(e={}))a.call(e,s)&&o(t,s,e[s]);if(i)for(var s of i(e))r.call(e,s)&&o(t,s,e[s]);return t},l=(t,i)=>e(t,s(i)),c=(t,e,s)=>o(t,"symbol"!=typeof e?e+"":e,s);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});class h{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:{}}}class d{constructor(t,e=null){this.nodeName=t,this.namespaceURI=e,this.attributes=new Map,this.children=[],this.textContent="",this.style={},this.classList=new p,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 s=this.children.indexOf(e);return-1!==s&&(t.parentNode=this,this.children.splice(s,0,t)),t}cloneNode(t=!1){const e=new d(this.nodeName,this.namespaceURI);return e.textContent=this.textContent,this.attributes.forEach((t,s)=>{e.attributes.set(s,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}}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,s)=>{t+=` ${s}="${e}"`}),0===this.children.length&&!this.textContent)return`<${this.nodeName}${t}/>`;const e=this.children.map(t=>t.toString()).join("");return`<${this.nodeName}${t}>${this.textContent}${e}</${this.nodeName}>`}get innerHTML(){return this.children.map(t=>t.toString()).join("")}set innerHTML(t){this.children=[],this.textContent=t}get outerHTML(){return this.toString()}get isConnected(){return!0}}class p{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 g{constructor(){this.SVGNS="http://www.w3.org/2000/svg",this.XLINKNS="http://www.w3.org/1999/xlink"}createElementNS(t,e){return new d(e,t)}createTextNode(t){const e={nodeName:"#text",nodeType:3,textContent:t,toString:()=>e.textContent};return e}querySelector(){return null}querySelectorAll(){return[]}getComputedStyle(){return{}}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 s=new d("root");return s.innerHTML=t,{documentElement:s}}}}}let u=null,x=null,f=null;class m{static init(){h.isSSR()&&!u&&(u=new g)}static createElement(t){return h.isSSR()?(u||this.init(),u.createElementNS(null,t)):document.createElement(t)}static createElementNS(t,e){return h.isSSR()?(u||this.init(),u.createElementNS(t,e)):document.createElementNS(t,e)}static createTextNode(t){return h.isSSR()?(u||this.init(),u.createTextNode(t)):document.createTextNode(t)}static querySelector(t){return h.isSSR()?null:document.querySelector(t)}static querySelectorAll(t){return h.isSSR()?[]:document.querySelectorAll(t)}static getComputedStyle(t){return h.isSSR()?{}:window.getComputedStyle(t)}static matchMedia(t){if(h.isSSR()||"function"!=typeof window.matchMedia)return null;try{return window.matchMedia(t)}catch(t){return null}}static getBoundingClientRect(t){return h.isSSR()?(u||this.init(),u.getBoundingClientRect(t)):t?t.getBoundingClientRect():{width:0,height:0,top:0,left:0,right:0,bottom:0,x:0,y:0}}static getXMLSerializer(){return h.isSSR()?(u||this.init(),x||(x=u.createXMLSerializer()),x):(x||(x=new XMLSerializer),x)}static getDOMParser(){return h.isSSR()?(u||this.init(),f||(f=u.createDOMParser()),f):(f||(f=new DOMParser),f)}static addWindowEventListener(t,e,s){h.isBrowser()&&window.addEventListener(t,e,s)}static removeWindowEventListener(t,e,s){h.isBrowser()&&window.removeEventListener(t,e,s)}static requestAnimationFrame(t){return h.isBrowser()?window.requestAnimationFrame(t):(t(0),null)}static cancelAnimationFrame(t){h.isBrowser()&&t&&window.cancelAnimationFrame(t)}static elementExists(t){return!!t&&(h.isSSR()?!0===t._ssrMode||void 0!==t.nodeName:!!t.getRootNode&&(t.getRootNode({composed:!0})===document||t.isConnected))}static getWindow(){return h.isBrowser()?window:null}static getDocument(){return h.isBrowser()?document:null}static _getShim(){return u}static _resetShim(){u=null,x=null,f=null}}let b=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 h.isBrowser()&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}static extend(t,e){const s=Object.assign({},t);return this.isObject(t)&&this.isObject(e)&&Object.keys(e).forEach(i=>{this.isObject(e[i])?i in t?s[i]=this.extend(t[i],e[i]):Object.assign(s,{[i]:e[i]}):Object.assign(s,{[i]:e[i]})}),s}static extendArray(e,s){const i=[];return e.map(e=>{i.push(t.extend(s,e))}),e=i}static monthMod(t){return t%12}static clone(t,e=new WeakMap,s=!1){if(null===t||"object"!=typeof t)return t;if(e.has(t))return e.get(t);let i;if(Array.isArray(t))if(s)i=t.slice();else{i=[],e.set(t,i);for(let s=0;s<t.length;s++)i[s]=this.clone(t[s],e,!1)}else if(t instanceof Date)i=new Date(t.getTime());else if(s)i=Object.assign({},t);else{i={},e.set(t,i);for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(i[s]=this.clone(t[s],e,!1))}return i}static shallowClone(t){return null===t||"object"!=typeof t?t:Array.isArray(t)?t.slice():Object.assign({},t)}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 s=Object.keys(t),i=Object.keys(e);if(s.length!==i.length)return!1;for(const i of s)if(t[i]!==e[i])return!1;return!0}static log10(t){return Math.log(t)/Math.LN10}static roundToBase10(t){return Math.pow(10,Math.floor(Math.log10(t)))}static roundToBase(t,e){return Math.pow(e,Math.floor(Math.log(t)/Math.log(e)))}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 elementExists(t){return!(!t||!t.isConnected)}static isInShadowDOM(e){if(!e||!e.getRootNode)return!1;const s=e.getRootNode();return s&&s!==document&&t.is("ShadowRoot",s)}static getShadowRootHost(e){if(!t.isInShadowDOM(e))return null;return e.getRootNode().host||null}static getDimensions(t){if(!t)return[0,0];if(h.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 s=t.clientWidth,i=t.clientHeight;if(!s||!i){const e=t.getBoundingClientRect();s=s||e.width,i=i||e.height}return i-=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),s-=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight),[s,i]}static getBoundingClientRect(t){if(!t)return{top:0,right:0,bottom:0,left:0,width:0,height:0,x:0,y:0};if(h.isSSR())return m.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){return t.reduce((t,e)=>(Array.isArray(e)&&(e=e.reduce((t,e)=>t.length>e.length?t:e)),t.length>e.length?t:e),0)}static hexToRgba(t="#999999",e=.6){"#"!==t.substring(0,1)&&(t="#999999");const s=t.replace("#",""),i=s.match(new RegExp("(.{"+s.length/3+"})","g"))||[];for(let t=0;t<i.length;t++)i[t]=parseInt(1===i[t].length?i[t]+i[t]:i[t],16);return void 0!==e&&i.push(e),"rgba("+i.join(",")+")"}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,s]){const i=t=>{const e=t/255;return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)};return.2126*i(t)+.7152*i(e)+.0722*i(s)}static getContrastRatio(e,s){const i=t.parseHex(e),a=t.parseHex(s);if(!i||!a)return 0;const r=t.relativeLuminance(i),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):""}shadeRGBColor(t,e){const s=e.split(","),i=t<0?0:255,a=t<0?-1*t:t,r=parseInt(s[0].slice(4),10),o=parseInt(s[1],10),n=parseInt(s[2],10);return"rgb("+(Math.round((i-r)*a)+r)+","+(Math.round((i-o)*a)+o)+","+(Math.round((i-n)*a)+n)+")"}shadeHexColor(t,e){const s=parseInt(e.slice(1),16),i=t<0?0:255,a=t<0?-1*t:t,r=s>>16,o=s>>8&255,n=255&s;return"#"+(16777216+65536*(Math.round((i-r)*a)+r)+256*(Math.round((i-o)*a)+o)+(Math.round((i-n)*a)+n)).toString(16).slice(1)}shadeColor(e,s){return t.isColorHex(s)?this.shadeHexColor(e,s):this.shadeRGBColor(e,s)}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){if(!t.isCSSVariable(e))return e;if(h.isSSR())return e;const s=document.createElement("div");let i;s.style.cssText="position:fixed; left: -9999px; visibility:hidden;",s.style.color=e,document.body.appendChild(s);try{i=window.getComputedStyle(s).color}finally{s.parentNode&&s.parentNode.removeChild(s)}return i}static applyOpacityToColor(t,e){const s=Number(e);if(!Number.isFinite(s))return t;if(s<=0)return"transparent";if(s>=1)return t;return`color-mix(in srgb, ${t} ${Math.round(100*s)}%, transparent)`}static getPolygonPos(t,e){const s=[],i=2*Math.PI/e;for(let a=0;a<e;a++){const e={};e.x=t*Math.sin(a*i),e.y=-t*Math.cos(a*i),s.push(e)}return s}static polarToCartesian(t,e,s,i){const a=(i-90)*Math.PI/180;return{x:t+s*Math.cos(a),y:e+s*Math.sin(a)}}static escapeString(t,e="x"){let s=t.toString().slice();return s=s.replace(/[` ~!@#$%^&*()|+=?;:'",.<>{}[\]\\/]/gi,e),s}static negToZero(t){return t<0?0:t}static moveIndexInArray(t,e,s){if(s>=t.length){let e=s-t.length+1;for(;e--;)t.push(void 0)}return t.splice(s,0,t.splice(e,1)[0]),t}static extractNumber(t){return parseFloat(t.replace(/[^\d.]*/g,""))}static findAncestor(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}static setELstyles(t,e){for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t.style.key=e[s])}static preciseAddition(t,e){const s=(String(t).split(".")[1]||"").length,i=(String(e).split(".")[1]||"").length,a=Math.pow(10,Math.max(s,i));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 isMsEdge(){if(h.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,s=7){let i=Math.pow(10,s-Math.floor(Math.log10(Math.max(t,e))));for(i>1?(t=Math.round(Math.abs(t)*i),e=Math.round(Math.abs(e)*i)):i=1;e;){const s=e;e=t%e,t=s}return t/i}static getPrimeFactors(t){const e=[];let s=2;for(;t>=2;)t%s==0?(e.push(s),t/=s):s++;return e}static mod(t,e,s=7){const i=Math.pow(10,s-Math.floor(Math.log10(Math.max(t,e))));return(t=Math.round(Math.abs(t)*i))%(e=Math.round(Math.abs(e)*i))/i}};class y{constructor(t){this.w=t,this.months31=[1,3,5,7,8,10,12],this.months30=[2,4,6,9,11],this.daysCntOfYear=[0,31,59,90,120,151,181,212,243,273,304,334]}isValidDate(t){return"number"!=typeof t&&!isNaN(this.parseDate(t))}getTimeStamp(t){if(!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 this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(t).toUTCString()):new Date(t)}parseDate(t){const e=Date.parse(t);if(!isNaN(e))return this.getTimeStamp(t);let s=Date.parse(t.replace(/-/g,"/").replace(/[a-z]+/gi," "));return s=this.getTimeStamp(s),s}parseDateWithTimezone(t){return Date.parse(t.replace(/-/g,"/").replace(/[a-z]+/gi," "))}formatDate(t,e){const s=this.w.globals.locale,i=this.w.config.xaxis.labels.datetimeUTC,a=["\0",...s.months],r=["\x01",...s.shortMonths],o=["\x02",...s.days],n=["\x03",...s.shortDays];function l(t,e=2){let s=t+"";for(;s.length<e;)s="0"+s;return s}const c=i?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=(i?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=i?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=i?t.getUTCHours():t.getHours(),g=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(g))).replace(/(^|[^\\])h/g,"$1"+g);const u=i?t.getUTCMinutes():t.getMinutes();e=(e=e.replace(/(^|[^\\])mm+/g,"$1"+l(u))).replace(/(^|[^\\])m/g,"$1"+u);const x=i?t.getUTCSeconds():t.getSeconds();e=(e=e.replace(/(^|[^\\])ss+/g,"$1"+l(x))).replace(/(^|[^\\])s/g,"$1"+x);let f=i?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(),w=i||!y?"Z":y>0?"+":"-";if(!i){y=Math.abs(y);const t=y%60;w+=l(Math.floor(y/60))+":"+l(t)}e=e.replace(/(^|[^\\])K/g,"$1"+w);const v=(i?t.getUTCDay():t.getDay())+1;return e=(e=(e=(e=(e=e.replace(new RegExp(o[0],"g"),o[v])).replace(new RegExp(n[0],"g"),n[v])).replace(new RegExp(a[0],"g"),a[h])).replace(new RegExp(r[0],"g"),r[h])).replace(/\\(.)/g,"$1")}getTimeUnitsfromTimestamp(t,e){const s=this.w;void 0!==s.config.xaxis.min&&(t=s.config.xaxis.min),void 0!==s.config.xaxis.max&&(e=s.config.xaxis.max);const i=this.getDate(t),a=this.getDate(e),r=this.formatDate(i,"yyyy MM dd HH mm ss fff").split(" "),o=this.formatDate(a,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(r[6],10),maxMillisecond:parseInt(o[6],10),minSecond:parseInt(r[5],10),maxSecond:parseInt(o[5],10),minMinute:parseInt(r[4],10),maxMinute:parseInt(o[4],10),minHour:parseInt(r[3],10),maxHour:parseInt(o[3],10),minDate:parseInt(r[2],10),maxDate:parseInt(o[2],10),minMonth:parseInt(r[1],10)-1,maxMonth:parseInt(o[1],10)-1,minYear:parseInt(r[0],10),maxYear:parseInt(o[0],10)}}isLeapYear(t){return t%4==0&&t%100!=0||t%400==0}calculcateLastDaysOfMonth(t,e,s){return this.determineDaysOfMonths(t,e)-s}determineDaysOfYear(t){let e=365;return this.isLeapYear(t)&&(e=366),e}determineRemainingDaysOfYear(t,e,s){let i=this.daysCntOfYear[e]+s;return e>1&&this.isLeapYear(t)&&i++,i}determineDaysOfMonths(t,e){let s=30;switch(t=b.monthMod(t),!0){case this.months30.indexOf(t)>-1:2===t&&(s=this.isLeapYear(e)?29:28);break;case this.months31.indexOf(t)>-1:default:s=31}return s}getDateFields(t,e){const s=new Date(t);return e?{year:s.getUTCFullYear(),month:s.getUTCMonth(),date:s.getUTCDate(),hour:s.getUTCHours(),minute:s.getUTCMinutes(),second:s.getUTCSeconds(),ms:s.getUTCMilliseconds(),weekday:s.getUTCDay()}:{year:s.getFullYear(),month:s.getMonth(),date:s.getDate(),hour:s.getHours(),minute:s.getMinutes(),second:s.getSeconds(),ms:s.getMilliseconds(),weekday:s.getDay()}}addInterval(t,e,s,i){const a=new Date(t);if(i)switch(e){case"year":a.setUTCFullYear(a.getUTCFullYear()+s);break;case"month":a.setUTCMonth(a.getUTCMonth()+s);break;case"week":a.setUTCDate(a.getUTCDate()+7*s);break;case"day":a.setUTCDate(a.getUTCDate()+s);break;case"hour":a.setUTCHours(a.getUTCHours()+s);break;case"minute":a.setUTCMinutes(a.getUTCMinutes()+s);break;case"second":a.setUTCSeconds(a.getUTCSeconds()+s)}else switch(e){case"year":a.setFullYear(a.getFullYear()+s);break;case"month":a.setMonth(a.getMonth()+s);break;case"week":a.setDate(a.getDate()+7*s);break;case"day":a.setDate(a.getDate()+s);break;case"hour":a.setHours(a.getHours()+s);break;case"minute":a.setMinutes(a.getMinutes()+s);break;case"second":a.setSeconds(a.getSeconds()+s)}return a.getTime()}ceilToBoundary(t,e,s,i){const a=new Date(t);if(i)switch(e){case"second":{const e=a.getUTCSeconds(),i=Math.ceil(e/s)*s;return i===e&&0===a.getUTCMilliseconds()?t:(a.setUTCMilliseconds(0),a.setUTCSeconds(i),a.getTime())}case"minute":{const e=a.getUTCMinutes(),i=Math.ceil(e/s)*s;return i===e&&0===a.getUTCSeconds()&&0===a.getUTCMilliseconds()?t:(a.setUTCMilliseconds(0),a.setUTCSeconds(0),a.setUTCMinutes(i),a.getTime())}case"hour":{const e=a.getUTCHours(),i=Math.ceil(e/s)*s;return i===e&&0===a.getUTCMinutes()&&0===a.getUTCSeconds()&&0===a.getUTCMilliseconds()?t:(a.setUTCMilliseconds(0),a.setUTCSeconds(0),a.setUTCMinutes(0),a.setUTCHours(i),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,i=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-i)/e),n=i+Math.ceil(o/s)*s*e;return n>=t?n:n+s*e}case"month":{const e=a.getUTCMonth(),i=Math.ceil(e/s)*s;return i===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(i),a.getTime())}case"year":{const e=a.getUTCFullYear(),i=Math.ceil(e/s)*s;return i===e&&0===a.getUTCMonth()&&1===a.getUTCDate()&&0===a.getUTCHours()&&0===a.getUTCMinutes()&&0===a.getUTCSeconds()&&0===a.getUTCMilliseconds()?t:Date.UTC(i,0,1)}}else switch(e){case"second":{const e=a.getSeconds(),i=Math.ceil(e/s)*s;return i===e&&0===a.getMilliseconds()?t:(a.setMilliseconds(0),a.setSeconds(i),a.getTime())}case"minute":{const e=a.getMinutes(),i=Math.ceil(e/s)*s;return i===e&&0===a.getSeconds()&&0===a.getMilliseconds()?t:(a.setMilliseconds(0),a.setSeconds(0),a.setMinutes(i),a.getTime())}case"hour":{const e=a.getHours(),i=Math.ceil(e/s)*s;return i===e&&0===a.getMinutes()&&0===a.getSeconds()&&0===a.getMilliseconds()?t:(a.setMilliseconds(0),a.setSeconds(0),a.setMinutes(0),a.setHours(i),a.getTime())}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=6048e5,i=new Date(1970,0,5).getTime();a.setMilliseconds(0),a.setSeconds(0),a.setMinutes(0),a.setHours(0);const r=a.getTime(),o=Math.ceil((r-i)/e),n=i+Math.ceil(o/s)*s*e;return n>=t?n:n+s*e}case"month":{const e=a.getMonth(),i=Math.ceil(e/s)*s;return i===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(i),a.getTime())}case"year":{const e=a.getFullYear(),i=Math.ceil(e/s)*s;return i===e&&0===a.getMonth()&&1===a.getDate()&&0===a.getHours()&&0===a.getMinutes()&&0===a.getSeconds()&&0===a.getMilliseconds()?t:new Date(i,0,1).getTime()}}return t}isAtBoundary(t,e,s){const i=this.getDateFields(t,s);switch(e){case"year":return 0===i.month&&1===i.date&&0===i.hour&&0===i.minute&&0===i.second&&0===i.ms;case"month":return 1===i.date&&0===i.hour&&0===i.minute&&0===i.second&&0===i.ms;case"day":return 0===i.hour&&0===i.minute&&0===i.second&&0===i.ms;case"hour":return 0===i.minute&&0===i.second&&0===i.ms;case"minute":return 0===i.second&&0===i.ms;case"second":return 0===i.ms}return!1}}class w{constructor(t){this.w=t,this.tooltipKeyFormat="dd MMM"}xLabelFormat(t,e,s,i){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 y(this.w);return t.formatDate(t.getDate(e),a.config.tooltip.x.format)}return t(e,s,i)}defaultGeneralFormatter(t){return Array.isArray(t)?t.map(t=>t):t}defaultYFormatter(t,e){const s=this.w;if(b.isNumber(t))if(0!==s.globals.yValueDecimal)t=t.toFixed(void 0!==e.decimalsInFloat?e.decimalsInFloat:s.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;return e.xaxisTooltipFormatter=t=>this.defaultGeneralFormatter(t),e.ttKeyFormatter=t=>this.defaultGeneralFormatter(t),e.ttZFormatter=t=>t,e.legendFormatter=t=>this.defaultGeneralFormatter(t),void 0!==t.config.xaxis.labels.formatter?e.xLabelFormatter=t.config.xaxis.labels.formatter:e.xLabelFormatter=e=>{if(b.isNumber(e)){if(!t.config.xaxis.convertedCatToNumeric&&"numeric"===t.config.xaxis.type){if(b.isNumber(t.config.xaxis.decimalsInFloat))return e.toFixed(t.config.xaxis.decimalsInFloat);{const s=t.globals.maxX-t.globals.minX;if(s>0){const t=s/10,i=Math.max(0,-Math.floor(Math.log10(t)));return e.toFixed(i)}return e.toFixed(0)}}if(t.globals.isBarHorizontal){if(t.globals.maxY-t.globals.minYArr<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:e.ttKeyFormatter=e.xLabelFormatter,"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((s,i)=>{if(void 0!==s.labels.formatter)e.yLabelFormatters[i]=s.labels.formatter;else if("violin"===t.config.chart.type){const s=t=>"number"==typeof t&&isFinite(t)?""+Math.round(100*t)/100:t;e.yLabelFormatters[i]=e=>t.globals.xyCharts?Array.isArray(e)?e.map(s):s(e):e}else e.yLabelFormatters[i]=e=>t.globals.xyCharts?Array.isArray(e)?e.map(t=>this.defaultYFormatter(t,s)):this.defaultYFormatter(e,s):e}),t.globals}heatmapLabelFormatters(){const t=this.w;if("heatmap"===t.config.chart.type){t.globals.yAxisScale[0].result=t.seriesData.seriesNames.slice();const e=t.seriesData.seriesNames.reduce((t,e)=>t.length>e.length?t:e,0);t.globals.yAxisScale[0].niceMax=e,t.globals.yAxisScale[0].niceMin=e}}}const v=({isTimeline:t,seriesIndex:e,dataPointIndex:s,y1:i,y2:a,w:r})=>{var o;let n=r.rangeData.seriesRangeStart[e][s],l=r.rangeData.seriesRangeEnd[e][s],c=r.labelData.labels[s],h=r.config.series[e].name?r.config.series[e].name:"";const d=r.formatters.ttKeyFormatter,p=r.config.tooltip.y.title.formatter,g={w:r,seriesIndex:e,dataPointIndex:s,start:n,end:l};if("function"==typeof p&&(h=p(h,g)),(null==(o=r.config.series[e].data[s])?void 0:o.x)&&(c=r.config.series[e].data[s].x),!t&&"datetime"===r.config.xaxis.type){c=new w(r).xLabelFormat(r.formatters.ttKeyFormatter,c,c,{i:void 0,dateFormatter:new y(r).formatDate,w:r})}"function"==typeof d&&(c=d(c,g)),Number.isFinite(i)&&Number.isFinite(a)&&(n=i,l=a);let u="",x="";const f=r.globals.colors[e];if(void 0===r.config.tooltip.x.formatter)if("datetime"===r.config.xaxis.type){const t=new y(r);u=t.formatDate(t.getDate(n),r.config.tooltip.x.format),x=t.formatDate(t.getDate(l),r.config.tooltip.x.format)}else u=n,x=l;else u=r.config.tooltip.x.formatter(n),x=r.config.tooltip.x.formatter(l);return{start:n,end:l,startVal:u,endVal:x,ylabel:c,color:f,seriesName:h}},A=t=>{let{color:e,seriesName:s,ylabel:i,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+'">'+(s||"")+'</span></div><div> <span class="category">'+i+": </span> "+h+" </div></div>"};class C{constructor(t){this.opts=t}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 b.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 s=e.w.config.series[e.seriesIndex].name;return null!==t?s+": "+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:8}}}}})}candlestick(){return{stroke:{width:1},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:({seriesIndex:t,dataPointIndex:e,w:s})=>this._getBoxTooltip(s,t,e,["Open","High","","Low","Close"],"candlestick")},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}boxPlot(){return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:({seriesIndex:t,dataPointIndex:e,w:s})=>this._getBoxTooltip(s,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:({seriesIndex:t,dataPointIndex:e,w:s})=>this._getViolinTooltip(s,t,e)},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}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:s,w:i}){const a=()=>{const t=i.rangeData.seriesRangeStart[e][s];return i.rangeData.seriesRangeEnd[e][s]-t};return i.globals.comboCharts?"rangeBar"===i.config.series[e].type||"rangeArea"===i.config.series[e].type?a():t:a()},background:{enabled:!1},style:{colors:["#fff"]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom:t=>t.w.config.plotOptions&&t.w.config.plotOptions.bar&&t.w.config.plotOptions.bar.horizontal?(t=>{const{color:e,seriesName:s,ylabel:i,startVal:a,endVal:r}=v(l(n({},t),{isTimeline:!0}));return A(l(n({},t),{color:e,seriesName:s,ylabel:i,start:a,end:r}))})(t):(t=>{const{color:e,seriesName:s,ylabel:i,start:a,end:r}=v(t);return A(l(n({},t),{color:e,seriesName:s,ylabel:i,start:a,end:r}))})(t)},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}dumbbell(t){var e,s;return(null==(e=t.plotOptions.bar)?void 0:e.barHeight)||(t.plotOptions.bar.barHeight=2),(null==(s=t.plotOptions.bar)?void 0:s.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:t=>(t=>{const{color:e,seriesName:s,ylabel:i,start:a,end:r}=v(t);return A(l(n({},t),{color:e,seriesName:s,ylabel:i,start:a,end:r}))})(t)}}}brush(t){return b.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){t.dataLabels=t.dataLabels||{},t.dataLabels.formatter=t.dataLabels.formatter||void 0;const e=t.dataLabels.formatter;t.yaxis.forEach((e,s)=>{t.yaxis[s].min=0,t.yaxis[s].max=100});return"bar"===t.chart.type&&(t.dataLabels.formatter=e||function(t){return"number"==typeof t&&t?t.toFixed(0)+"%":t}),t}stackedBars(){const t=this.bar();return l(n({},t),{plotOptions:l(n({},t.plotOptions),{bar:l(n({},t.plotOptions.bar),{borderRadiusApplication:"end",borderRadiusWhenStacked:"last"})})})}convertCatToNumeric(t){return t.xaxis.convertedCatToNumeric=!0,t}convertCatToNumericXaxis(t,e){t.xaxis.type="numeric",t.xaxis.labels=t.xaxis.labels||{},t.xaxis.labels.formatter=t.xaxis.labels.formatter||function(t){return b.isNumber(t)?Math.floor(t):t};const s=t.xaxis.labels.formatter;let i=t.xaxis.categories&&t.xaxis.categories.length?t.xaxis.categories:t.labels;return e&&e.length&&(i=e.map(t=>Array.isArray(t)?t:String(t))),i&&i.length&&(t.xaxis.labels.formatter=function(t){return b.isNumber(t)?s(i[Math.floor(t)-1]):s(t)}),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},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!0,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:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1}}}}pie(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:t=>t.toFixed(1)+"%",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=>t.toFixed(1)+"%",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=>t.toFixed(1)+"%",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,s,i,a){const r=t.candleData.seriesCandleO[e][s],o=t.candleData.seriesCandleH[e][s],n=t.candleData.seriesCandleM[e][s],l=t.candleData.seriesCandleL[e][s],c=t.candleData.seriesCandleC[e][s],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][s]}</strong>\n </div>`:`<div class="apexcharts-tooltip-box apexcharts-tooltip-${t.config.chart.type}"><div>${i[0]}: <span class="value">`+r+`</span></div><div>${i[1]}: <span class="value">`+o+"</span></div>"+(n?`<div>${i[2]}: <span class="value">`+n+"</span></div>":"")+`<div>${i[3]}: <span class="value">`+l+`</span></div><div>${i[4]}: <span class="value">`+c+"</span></div></div>"}_getViolinTooltip(t,e,s){var i,a,r;const o=null==(i=t.violinData.seriesViolinMin[e])?void 0:i[s],n=null==(a=t.violinData.seriesViolinMax[e])?void 0:a[s],l=(null==(r=t.violinData.seriesViolinPoints[e])?void 0:r[s])||[],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>`}}const S={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"}}};class k{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}},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:[],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:[S],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,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,id:void 0,group:void 0,nonce: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},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,allowMouseWheelZoom:!0,pinch:!0,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:"last",rangeBarOverlap:!0,rangeBarGroupRows:!1,hideZeroBarsWhenGrouped:!1,isDumbbell:!1,dumbbellColors:void 0,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},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"},points:{show:!1,shape:"circle",size:2.5,jitter:.5,maxPoints:3e3,opacity:.9,fillColor:"series-dark",strokeColor:"#fff",strokeWidth:1}},violin:{bandwidthScale:1,normalize:"individual",points:{show:!0,shape:"circle",size:2.5,jitter:.5,constrainToViolin:!0,maxPoints:3e3,opacity:.9,fillColor:"series-dark",strokeColor:"#fff",strokeWidth:1}},heatmap:{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}}},funnel:{shape:"rectangle",lastShape:"flat"},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,borderRadius:4,dataLabels:{format:"scale"},colorScale:{inverse:!1,ranges:[],min:void 0,max: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}}}},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:800,easing:"ease-out"}},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=>t+"%"},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+"%"}},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,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"}},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,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}},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},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}},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}},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"}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken"}}},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,arrow:!0,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:""}}}}}class M{constructor(t){this.opts=t}init({responsiveOverride:t}){var e,s,i,a,r,o,n,l,c,d;let p=this.opts;const g=new k,u=new C(p);p=this.normalizeAliasedChartType(p),this.chartType=p.chart.type,p=this.extendYAxis(p),p=this.extendAnnotations(p);let x=g.init(),f={};if(p&&"object"==typeof p){let g={};const m=["line","area","bar","candlestick","boxPlot","violin","rangeBar","rangeArea","bubble","scatter","heatmap","treemap","pie","polarArea","donut","radar","radialBar"],y=p.chart.requestedType;g="funnel"===y||"pyramid"===y?u[y]():"gauge"===y?u.gauge():-1!==m.indexOf(p.chart.type)?u[p.chart.type]():u.line(),(null==(s=null==(e=p.plotOptions)?void 0:e.bar)?void 0:s.isFunnel)&&(g=u.funnel()),p.chart.stacked&&"bar"===p.chart.type&&(g=u.stackedBars()),(null==(i=p.chart.brush)?void 0:i.enabled)&&(g=u.brush(g)),(null==(r=null==(a=p.plotOptions)?void 0:a.line)?void 0:r.isSlopeChart)&&(g=u.slope()),p.chart.stacked&&"100%"===p.chart.stackType&&(p=u.stacked100(p)),(null==(n=null==(o=p.plotOptions)?void 0:o.bar)?void 0:n.isDumbbell)&&(p=u.dumbbell(p)),this.checkForDarkTheme(h.getApex()),this.checkForDarkTheme(p),p.xaxis=p.xaxis||h.getApex().xaxis||{},t||(p.xaxis.convertedCatToNumeric=!1),p=this.checkForCatToNumericXAxis(this.chartType,g,p),((null==(l=p.chart.sparkline)?void 0:l.enabled)||(null==(d=null==(c=h.getApex().chart)?void 0:c.sparkline)?void 0:d.enabled))&&(g=u.sparkline(g)),f=b.extend(x,g)}const m=b.extend(f,h.getApex());return x=b.extend(m,p),x=this.handleUserInputErrors(x),x}normalizeAliasedChartType(t){if(!t||!t.chart)return t;const e=t.chart.type;return"funnel"!==e&&"pyramid"!==e&&"gauge"!==e||(t.chart.requestedType=e,"funnel"===e||"pyramid"===e?(t.plotOptions=t.plotOptions||{},t.plotOptions.bar=t.plotOptions.bar||{},t.plotOptions.bar.isFunnel=!0,t.plotOptions.bar.horizontal=!0,t.chart.type="bar",t.plotOptions.bar.isPyramid="pyramid"===e):"gauge"===e&&(t.chart.type="radialBar")),t}checkForCatToNumericXAxis(t,e,s){var i,a,r,o,n;const l=new C(s),c=("bar"===t||"boxPlot"===t||"violin"===t)&&(null==(a=null==(i=s.plotOptions)?void 0:i.bar)?void 0:a.horizontal),h="pie"===t||"polarArea"===t||"donut"===t||"radar"===t||"radialBar"===t||"heatmap"===t,d="datetime"!==s.xaxis.type&&"numeric"!==s.xaxis.type,p=("scatter"===t||"bubble"===t)&&(null==(n=null==(o=null==(r=s.plotOptions)?void 0:r.scatter)?void 0:o.jitter)?void 0:n.enabled),g=s.xaxis.tickPlacement?s.xaxis.tickPlacement:e.xaxis&&e.xaxis.tickPlacement;return c||h||p||!d||"between"===g||(s=l.convertCatToNumeric(s)),s}extendYAxis(t,e){const s=new k;(void 0===t.yaxis||!t.yaxis||Array.isArray(t.yaxis)&&0===t.yaxis.length)&&(t.yaxis={});const i=h.getApex();t.yaxis.constructor!==Array&&i.yaxis&&i.yaxis.constructor!==Array&&(t.yaxis=b.extend(t.yaxis,i.yaxis)),t.yaxis.constructor!==Array?t.yaxis=[b.extend(s.yAxis,t.yaxis)]:t.yaxis=b.extendArray(t.yaxis,s.yAxis);let a=!1;t.yaxis.forEach(t=>{t.logarithmic&&(a=!0)});let r=t.series;return e&&!r&&(r=e.config.series),a&&r.length!==t.yaxis.length&&r.length&&(t.yaxis=r.map((e,i)=>{if(e.name||(r[i].name=`series-${i+1}`),t.yaxis[i])return t.yaxis[i].seriesName=r[i].name,t.yaxis[i];{const e=b.extend(s.yAxis,t.yaxis[0]);return e.show=!1,e}})),a&&r.length>1&&(r.length,t.yaxis.length),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 k;return t.annotations.yaxis=b.extendArray(void 0!==t.annotations.yaxis?t.annotations.yaxis:[],e.yAxisAnnotation),t}extendXAxisAnnotations(t){const e=new k;return t.annotations.xaxis=b.extendArray(void 0!==t.annotations.xaxis?t.annotations.xaxis:[],e.xAxisAnnotation),t}extendPointAnnotations(t){const e=new k;return t.annotations.points=b.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"))}handleUserInputErrors(t){const e=t;if(e.tooltip.shared&&e.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if("bar"===e.chart.type&&e.plotOptions.bar.horizontal){if(e.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");e.yaxis[0].reversed&&(e.yaxis[0].opposite=!0),e.xaxis.tooltip.enabled=!1,e.yaxis[0].tooltip.enabled=!1,e.chart.zoom.enabled=!1}return"bar"!==e.chart.type&&"rangeBar"!==e.chart.type||e.tooltip.shared&&"barWidth"===e.xaxis.crosshairs.width&&e.series.length>1&&(e.xaxis.crosshairs.width="tickWidth"),"candlestick"!==e.chart.type&&"boxPlot"!==e.chart.type||e.yaxis[0].reversed&&(e.yaxis[0].reversed=!1),e}}const D=1.618,T=[[1,1,2,5,5,5,10,10,10,10,10],[1,1,2,5,5,5,10,10,10,10,10]],L=[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 F{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.originalSeries=null,t.maxValsInArrayIndex=0,t.yValueDecimal=0,t.allSeriesHasEqualX=!0,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.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.barHeight=0,t.barWidth=0,t.animationEnded=!1,t.isDestroyed=!1,t.bulkRevealScheduled=!1,t.resizeTimer=null,t.selectionResizeTimer=null,t.lastWheelExecution=0,t.delayedElements=[],t.pointsArray=[],t.barCanvasCoords=null,t.activeRenderer=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,s,i=s)=>{Object.defineProperty(e,i,{get:()=>t[s],set(e){t[s]=e},enumerable:!0,configurable:!0})},s={};e(s,"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","originalSeries","collapsedSeries","collapsedSeriesIndices","ancillaryCollapsedSeries","ancillaryCollapsedSeriesIndices","allSeriesCollapsed","risingSeries","previousPaths","ignoreYAxisIndexes","labels","categoryLabels","timescaleLabels","groups"])e(s,t);Object.defineProperty(t,"seriesNS",{value:s,writable:!1,enumerable:!1,configurable:!0});const i={};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(i,t);Object.defineProperty(t,"axes",{value:i,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:[]},stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:t.markers.size,largestSize:0},LINE_HEIGHT_RATIO:D,axisCharts:!0,isSlopeChart:t.plotOptions.line.isSlopeChart,comboCharts:!1,initialConfig:null,initialSeries:[],lastXAxis:[],lastYAxis:[],allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],risingSeries:[],ignoreYAxisIndexes:[],isDirty:!1,isExecCalled:!1,dataChanged:!1,resized:!1,invalidLogScale:!1,hasNullValues:!1,columnSeries:null,yaxis:null,total:0,shouldAnimate:!0,previousPaths:[],prevStreamFrame:null,prevChromeFrame:null,svgWidth:0,svgHeight:0,defaultLabels:!1,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateYAxisX:[],yAxisWidths:[],tooltip:null,resizeObserver:null,locale:{},memory:{methodsToExec:[]},niceScaleAllowedMagMsd:T,niceScaleDefaultTicks:L,seriesYAxisMap:[],seriesYAxisReverseMap:[],noData:!1}}init(t){const e=this.globalVars(t);return this.initGlobalVars(e),e.initialConfig=b.extend({},t),e.initialSeries=b.clone(t.series),e.lastXAxis=b.clone(e.initialConfig.xaxis),e.lastYAxis=b.clone(e.initialConfig.yaxis),e}}class E{constructor(t){this.opts=t}init(){const t=new M(this.opts).init({responsiveOverride:!1}),e=(new F).init(t),s={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:{},lastWheelExecution:0,capturedSeriesIndex:-1,capturedDataPointIndex:-1,disableZoomIn:!1,disableZoomOut:!1,isTouchDevice:!!h.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:[],seriesViolinMin:[],seriesViolinMax:[]},labelData:{labels:[],categoryLabels:[],timescaleLabels:[],hasXaxisGroups:!1,groups:[],seriesGroups:[]},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:[]},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:[]}};Object.defineProperty(e,"dom",{get:()=>s.dom,set(t){s.dom=t},enumerable:!1,configurable:!0});for(const t of["xLabelFormatter","yLabelFormatters","xaxisTooltipFormatter","ttKeyFormatter","ttVal","ttZFormatter","legendFormatter"])Object.defineProperty(e,t,{get:()=>s.formatters[t],set(e){s.formatters[t]=e},enumerable:!1,configurable:!0});for(const t of["zoomEnabled","panEnabled","selectionEnabled","zoomed","selection","visibleXRange","selectedDataPoints","mousedown","clientX","clientY","lastClientPosition","lastWheelExecution","capturedSeriesIndex","capturedDataPointIndex","disableZoomIn","disableZoomOut","isTouchDevice"])Object.defineProperty(e,t,{get:()=>s.interact[t],set(e){s.interact[t]=e},enumerable:!1,configurable:!0});for(const t of["gridHeight","gridWidth","translateX","translateY","translateXAxisX","translateXAxisY","rotateXLabels","xAxisHeight","xAxisLabelsHeight","xAxisGroupLabelsHeight","xAxisLabelsWidth","yLabelsCoords","yTitleCoords"])Object.defineProperty(e,t,{get:()=>s.layout[t],set(e){s.layout[t]=e},enumerable:!1,configurable:!0});for(const t of["series","seriesNames","seriesX","seriesZ","seriesColors","seriesGoals","stackedSeriesTotals","stackedSeriesTotalsByGroups"])Object.defineProperty(e,t,{get:()=>s.seriesData[t],set(e){s.seriesData[t]=e},enumerable:!1,configurable:!0});for(const t of["isXNumeric","dataFormatXNumeric","isDataXYZ","isRangeData","isRangeBar","isMultiLineX","noLabelsProvided","dataWasParsed"])Object.defineProperty(e,t,{get:()=>s.axisFlags[t],set(e){s.axisFlags[t]=e},enumerable:!1,configurable:!0});for(const t of["labels","categoryLabels","timescaleLabels","hasXaxisGroups","groups","seriesGroups"])Object.defineProperty(e,t,{get:()=>s.labelData[t],set(e){s.labelData[t]=e},enumerable:!1,configurable:!0});for(const t of["seriesRangeStart","seriesRangeEnd","seriesRange"])Object.defineProperty(e,t,{get:()=>s.rangeData[t],set(e){s.rangeData[t]=e},enumerable:!1,configurable:!0});for(const t of["seriesCandleO","seriesCandleH","seriesCandleM","seriesCandleL","seriesCandleC"])Object.defineProperty(e,t,{get:()=>s.candleData[t],set(e){s.candleData[t]=e},enumerable:!1,configurable:!0});for(const t of["seriesViolinDensity","seriesViolinPoints","seriesViolinMin","seriesViolinMax"])Object.defineProperty(e,t,{get:()=>s.violinData[t],set(e){s.violinData[t]=e},enumerable:!1,configurable:!0});return s}}class _{constructor(t){this.w=t}static checkComboSeries(t,e){let s=!1,i=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||i++,void 0!==t.type&&t.type!==e&&a++}),a>0&&(s=!0),{comboBarCount:i,comboCharts:s}}getStackedSeriesTotals(t=[]){const e=this.w,s=[];if(0===e.seriesData.series.length)return s;for(let i=0;i<e.seriesData.series[e.globals.maxValsInArrayIndex].length;i++){let a=0;for(let s=0;s<e.seriesData.series.length;s++)void 0!==e.seriesData.series[s][i]&&-1===t.indexOf(s)&&(a+=e.seriesData.series[s][i]);s.push(a)}return s}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(s=>{const i=[];t.config.series.forEach((e,a)=>{s.indexOf(t.seriesData.seriesNames[a])>-1&&i.push(a)});const a=t.seriesData.series.map((t,e)=>-1===i.indexOf(e)?e:-1).filter(t=>-1!==t);e.push(this.getStackedSeriesTotals(a))}),e}setSeriesYAxisMappings(){const t=this.w.globals,e=this.w.config;let s=[];const i=[],a=[],r=this.w.seriesData.series.length>e.yaxis.length||e.yaxis.some(t=>Array.isArray(t.seriesName));e.series.forEach((t,e)=>{a.push(e),i.push(null)}),e.yaxis.forEach((t,e)=>{s[e]=[]});const o=[];e.yaxis.forEach((t,i)=>{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;i===o||r?(!r||a.indexOf(o)>-1)&&s[i].push([i,o]):(s[o].push([o,i]),t=i),n=!0,t=a.indexOf(t),-1!==t&&a.splice(t,1)}})})}n||o.push(i)}),s=s.map(t=>{const e=[];return t.forEach(t=>{i[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],s[n]=[],a);t++){const t=a[0];a.shift(),s[n].push(t),i[t]=n}a.forEach(t=>{s[n].push(t),i[t]=n}),t.seriesYAxisMap=s.map(t=>t),t.seriesYAxisReverseMap=i.map(t=>t),t.seriesYAxisMap.forEach((t,s)=>{t.forEach(t=>{if(e.series[t]&&void 0===e.series[t].group){e.series[t].group="apexcharts-axis-".concat(s.toString())}})})}isSeriesNull(t=null){let e=[];const s=this.w.config.series;return e=null===t?s.filter(t=>null!==t):s[t]&&Array.isArray(s[t].data)?s[t].data.filter(t=>null!==t):null!==s[t]&&void 0!==s[t]?[s[t]]:[],0===e.length}seriesHaveSameValues(t){const e=this.w.seriesData.series[t];return!Array.isArray(e)||e.every((t,e,s)=>t===s[0])}getCategoryLabels(t){const e=this.w;let s=t.slice();return e.config.xaxis.convertedCatToNumeric&&(s=t.map(t=>e.config.xaxis.labels.formatter(t-e.globals.minX+1))),s}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)}),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 s=0;s<t.length;s++)e+=t[s];else e+=t;return e})}getSeriesTotalsXRange(t,e){const s=this.w;return s.seriesData.series.map((i,a)=>{let r=0;for(let o=0;o<i.length;o++)s.seriesData.seriesX[a][o]>t&&s.seriesData.seriesX[a][o]<e&&(r+=i[o]);return r})}getPercentSeries(){const t=this.w;t.globals.seriesPercent=t.seriesData.series.map(e=>{const s=[];if(Array.isArray(e))for(let i=0;i<e.length;i++){const a=t.seriesData.stackedSeriesTotals[i];let r=0;a&&(r=100*e[i]/a),s.push(r)}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,s=[];let i=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++)s.push(e.yRange[t]/this.w.layout.gridHeight);if(a=e.xRange/this.w.layout.gridWidth,i=e.yRange/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,i)=>{const a=t.config.yaxis[t.globals.seriesYAxisReverseMap[i]],r=e<0?-1:1;return e=Math.abs(e),a.logarithmic&&(e=this.getBaseLog(a.logBase,e)),-r*e/s[i]};if(e.isMultipleYAxis){n=[];for(let t=0;t<s.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/i,c=e.minX/a)}else n=[],n.push(0),l=0,c=0;return{yRatio:s,invertedYRatio:i,zRatio:o,xRatio:a,invertedXRatio:r,baseLineInvertedY:l,baseLineY:n,baseLineX:c}}getLogSeries(t){const e=this.w;return e.globals.seriesLog=t.map((t,s)=>{const i=e.globals.seriesYAxisReverseMap[s];return e.config.yaxis[i]&&e.config.yaxis[i].logarithmic?t.map(t=>null===t?null:this.getLogVal(e.config.yaxis[i].logBase,t,s)):t}),e.globals.invalidLogScale?t:e.globals.seriesLog}getLogValAtSeriesIndex(t,e){if(null===t)return null;const s=this.w,i=s.globals.seriesYAxisReverseMap[e];return s.config.yaxis[i]&&s.config.yaxis[i].logarithmic?this.getLogVal(s.config.yaxis[i].logBase,t,e):t}getBaseLog(t,e){return Math.log(e)/Math.log(t)}getLogVal(t,e,s){if(e<=0)return 0;const i=this.w,a=0===i.globals.minYArr[s]?-1:this.getBaseLog(t,i.globals.minYArr[s]),r=(0===i.globals.maxYArr[s]?0:this.getBaseLog(t,i.globals.maxYArr[s]))-a;if(e<1)return e/r;return(this.getBaseLog(t,e)-a)/r}getLogYRatios(t){const e=this.w,s=this.w.globals,i=s;return i.yLogRatio=t.slice(),i.logYRange=s.yRange.map((t,a)=>{const r=e.globals.seriesYAxisReverseMap[a];if(e.config.yaxis[r]&&this.w.config.yaxis[r].logarithmic){let t=-Number.MAX_VALUE,r=Number.MIN_VALUE,o=1;return s.seriesLog.forEach((s,i)=>{s.forEach(s=>{e.config.yaxis[i]&&e.config.yaxis[i].logarithmic&&(t=Math.max(s,t),r=Math.min(s,r))})}),o=Math.pow(s.yRange[a],Math.abs(r-t)/s.yRange[a]),i.yLogRatio[a]=o/this.w.layout.gridHeight,o}}),i.invalidLogScale?t.slice():i.yLogRatio}static extendArrayProps(t,e,s){var i,a;return(null==e?void 0:e.yaxis)&&(e=t.extendYAxis(e,s)),(null==e?void 0:e.annotations)&&(e.annotations.yaxis&&(e=t.extendYAxisAnnotations(e)),(null==(i=null==e?void 0:e.annotations)?void 0:i.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,s,i){const a=this.w,r=[];return t.series.length>0&&e.forEach(e=>{const o=[],n=[];t.i.forEach((s,i)=>{a.config.series[s].group===e&&(o.push(t.series[i]),n.push(s))}),o.length>0&&r.push(i.draw(o,s,n))}),r}}const P="http://www.w3.org/2000/svg";class B{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 B(this.x,this.y)}}class N{constructor(t,e,s,i,a,r){this.a=null!=t?t:1,this.b=null!=e?e:0,this.c=null!=s?s:0,this.d=null!=i?i:1,this.e=null!=a?a:0,this.f=null!=r?r:0}rotate(t){const e=t*Math.PI/180,s=Math.cos(e),i=Math.sin(e);return this.multiply(new N(s,i,-i,s,0,0))}scale(t,e){return this.multiply(new N(t,0,0,null!=e?e:t,0,0))}multiply(t){return new N(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 B(this.a*t.x+this.c*t.y+this.e,this.b*t.x+this.d*t.y+this.f)}}class X{constructor(t,e,s,i){this.x=t,this.y=e,this.w=s,this.h=i,this.width=s,this.height=i,this.x2=t+s,this.y2=e+i}}function I(t){if(!t||"string"!=typeof t)return[["M",0,0]];const e=[],s=/([MmLlHhVvCcSsQqTtAaZz])\s*/g,i=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi;let a;const r=[],o=[];for(;null!==(a=s.exec(t));)r.push(a[1]),o.push(a.index);for(let s=0;s<r.length;s++){const a=o[s]+r[s].length,n=s+1<o.length?o[s+1]:t.length,l=t.substring(a,n),c=[];let h;for(i.lastIndex=0;null!==(h=i.exec(l));)c.push(parseFloat(h[0]));const d=r[s].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 R(t){let e=1/0,s=1/0,i=-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>i&&(i=o),n<s&&(s=n),n>a&&(a=n))}}),e===1/0?{x:0,y:0,width:0,height:0}:{x:e,y:s,width:i-e,height:a-s}}function z(t){return t.map(t=>t.join(" ")).join(" ")}function Y(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 H(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 O(t){var e,s=[t];switch(t[0]){case"M":return this.pos=this.start=[t[1],t[2]],s;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":s=function(t,e){var s,i,a,r,o,n,l,c,h,d,p,g,u,x,f,m,b,y,w,v,A,C,S,k,M,D,T=Math.abs(e[1]),L=Math.abs(e[2]),F=e[3]%360,E=e[4],_=e[5],P=e[6],X=e[7],I=new B(t[0],t[1]),R=new B(P,X),z=[];if(0===T||0===L||I.x===R.x&&I.y===R.y)return[["C",I.x,I.y,R.x,R.y,R.x,R.y]];s=new B((I.x-R.x)/2,(I.y-R.y)/2).transform((new N).rotate(F)),(i=s.x*s.x/(T*T)+s.y*s.y/(L*L))>1&&(T*=i=Math.sqrt(i),L*=i);a=(new N).rotate(F).scale(1/T,1/L).rotate(-F),I=I.transform(a),R=R.transform(a),r=[R.x-I.x,R.y-I.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,E===_&&(l*=-1);c=new B((R.x+I.x)/2+l*-r[1],(R.y+I.y)/2+l*r[0]),h=new B(I.x-c.x,I.y-c.y),d=new B(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);g=Math.acos(d.x/Math.sqrt(d.x*d.x+d.y*d.y)),d.y<0&&(g*=-1);_&&p>g&&(g+=2*Math.PI);!_&&p<g&&(g-=2*Math.PI);for(x=Math.ceil(2*Math.abs(p-g)/Math.PI),m=[],b=p,u=(g-p)/x,f=4*Math.tan(u/4)/3,A=0;A<=x;A++)w=Math.cos(b),y=Math.sin(b),v=new B(c.x+w,c.y+y),m[A]=[new B(v.x+f*y,v.y-f*w),v,new B(v.x-f*y,v.y+f*w)],b+=u;for(m[0][0]=m[0][1].clone(),m[m.length-1][2]=m[m.length-1][1].clone(),a=(new N).rotate(F).scale(T,L).rotate(-F),A=0,C=m.length;A<C;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,C=m.length;A<C;A++)S=(v=m[A-1][2]).x,k=v.y,M=(v=m[A][0]).x,D=v.y,P=(v=m[A][1]).x,X=v.y,z.push(["C",S,k,M,D,P,X]);return z}(null!=(e=this.pos)?e:[],t),t=s[0]}return t[0]="C",this.pos=[t[5],t[6]],this.reflection=[2*t[5]-t[3],2*t[6]-t[4]],s}function W(t,e){if(!1===e)return!1;for(var s=e,i=t.length;s<i;++s)if("M"==t[s][0])return s;return!1}function G(t,e,s,i,a,r){for(var o=t.slice(e,s||void 0),n=i.slice(a,r||void 0),l=0,c={pos:[0,0],start:[0,0]},h={pos:[0,0],start:[0,0]};o[l]=Y.call(c,o[l]),n[l]=Y.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(O.call(c,o[l]))),Array.prototype.splice.apply(n,[l,1].concat(O.call(h,n[l])))):(o[l]=H.call(c,o[l]),n[l]=H.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 U(t,e){var s=function(t,e){for(var s,i=I(t),a=I(e),r=0,o=0,n=!1,l=!1;!1!==r||!1!==o;){if(n=W(i,!1!==r&&r+1),l=W(a,!1!==o&&o+1),!1===r){const t=R(s.start);r=0==t.height||0==t.width?i.push(i[0])-1:i.push(["M",t.x+t.width/2,t.y+t.height/2])-1}if(!1===o){const t=R(s.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}s=G(i,r,n,a,o,l),i=i.slice(0,r).concat(s.start,!1===n?[]:i.slice(n)),a=a.slice(0,o).concat(s.dest,!1===l?[]:a.slice(l)),r=!1!==n&&r+s.start.length,o=!1!==l&&o+s.dest.length}return{start:i,dest:a}}(t,e),i=s.start,a=s.dest;return function(t){return z(i.map(function(e,s){return a[s].map(function(i,r){return 0===r?i:e[r]+(a[s][r]-e[r])*t})}))}}let $=null,V=null;function j(t,e){const s=new Array(e);if(!h.isBrowser()){const i=R(I(t)),a=i.x+i.width/2,r=i.y+i.height/2;for(let t=0;t<e;t++)s[t]={x:a,y:r};return s}$||($=document.createElementNS("http://www.w3.org/2000/svg","svg"),$.setAttribute("width","0"),$.setAttribute("height","0"),$.setAttribute("style","position:absolute;width:0;height:0;visibility:hidden;pointer-events:none;"),V=document.createElementNS("http://www.w3.org/2000/svg","path"),$.appendChild(V),document.body.appendChild($)),V.setAttribute("d",t||"M0 0");let i=0;try{i=V.getTotalLength()}catch(t){i=0}if(!i||!isFinite(i)){const i=R(I(t)),a=i.x+i.width/2,r=i.y+i.height/2;for(let t=0;t<e;t++)s[t]={x:a,y:r};return s}for(let t=0;t<e;t++)try{const a=V.getPointAtLength(t/e*i);s[t]={x:a.x,y:a.y}}catch(e){s[t]={x:0,y:0}}return s}function q(t){return-Math.cos(t*Math.PI)/2+.5}let Z=q;function K(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 s=parseInt(e,16);return[s>>16&255,s>>8&255,255&s,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 J(t,e,s){return`rgba(${Math.round(t[0]+(e[0]-t[0])*s)},${Math.round(t[1]+(e[1]-t[1])*s)},${Math.round(t[2]+(e[2]-t[2])*s)},${t[3]+(e[3]-t[3])*s})`}class Q{constructor(t,e,s){this.el=t,this.duration=null!=e?e:300,this.delay=s||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,s){return this._plotTarget=t,e&&(this._plotAlgorithm=e),this._plotSnap=s||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 s=new Q(this.el,t,e);return this._next=s,s._root=this._root||this,s}_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 s=0;t.forEach(t=>{s+=t.delay,t._execute(s),s+=t.duration})}_execute(t){const e=this.el,s=this.duration;if(s<=1){const s=()=>{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(s,t):s())}const i=()=>{const t={},i={},a={};if(this._attrTarget)for(const s of Object.keys(this._attrTarget)){const r=e.attr(s);t[s]=r;const o=K(r),n=K(String(this._attrTarget[s]));o&&n&&(i[s]=o,a[s]=n)}let r=null;if(this._plotTarget){const t=e.attr("d")||"";try{r="polygons"===this._plotAlgorithm?function(t,e,s=96){const i=j(t,s),a=j(e,s);let r=0,o=1/0;for(let t=0;t<s;t++){let e=0;for(let r=0;r<s;r++){const n=i[(r+t)%s],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(s);for(let t=0;t<s;t++)n[t]=i[(t+r)%s];return function(t){let e="";for(let i=0;i<s;i++){const s=n[i],r=a[i],o=s.x+(r.x-s.x)*t,l=s.y+(r.y-s.y)*t;e+=(0===i?"M":"L")+o.toFixed(3)+" "+l.toFixed(3)+" "}return e+"Z"}}(t,this._plotTarget):U(t,this._plotTarget)}catch(t){r=null}}const o=performance.now(),n=this._easing||Z,l=c=>{const h=c-o,d=Math.min(h/s,1),p=n(d);if(this._attrTarget)if(d>=1)e.attr(this._attrTarget);else{const s={};for(const e of Object.keys(this._attrTarget))if(i[e]&&a[e])s[e]=J(i[e],a[e],p);else{const i=parseFloat(t[e]),a=parseFloat(this._attrTarget[e]);isNaN(i)||isNaN(a)||(s[e]=i+(a-i)*p)}e.attr(s)}r&&d<1&&e.attr("d",r(p)),this._duringCb&&this._duringCb(p),d<1?m.requestAnimationFrame(l):(this._plotTarget&&e.attr("d",this._plotSnap||this._plotTarget),this._afterCb&&this._afterCb.call(e))};m.requestAnimationFrame(l)};t>0?setTimeout(i,t):i()}}function tt(t){t.prototype.animate=function(t,e){return new Q(this,t,e)}}function et(t){return-Math.cos(t*Math.PI)/2+.5}function st(t,e,s,i){t=Math.min(Math.max(t,0),1),s=Math.min(Math.max(s,0),1);const a=3*t,r=3*(s-t)-a,o=1-a-r,n=3*e,l=3*(i-e)-n,c=1-n-l,h=t=>((o*t+r)*t+a)*t,d=t=>(3*o*t+2*r)*t+a;return t=>t<=0?0:t>=1?1:(t=>((c*t+l)*t+n)*t)((t=>{let e=t;for(let s=0;s<5;s++){const s=d(e);if(0===s)break;e-=(h(e)-t)/s}let s=0,i=1;if(e=t,e<s)return s;if(e>i)return i;for(;s<i;){const a=h(e);if(Math.abs(a-t)<1e-4)return e;t>a?s=e:i=e,e=(s+i)/2}return e})(t))}const it=new Map;function at(t){return"function"==typeof t?t:(e=t,Array.isArray(e)&&4===e.length&&e.every(t=>"number"==typeof t)?st(t[0],t[1],t[2],t[3]):"string"==typeof t&&it.has(t)?it.get(t):et);var e}it.set("linear",t=>t),it.set("easeInOutSine",et),it.set("easeInSine",t=>1-Math.cos(t*Math.PI/2)),it.set("easeOutSine",t=>Math.sin(t*Math.PI/2)),it.set("easeInQuad",t=>t*t),it.set("easeOutQuad",t=>1-(1-t)*(1-t)),it.set("easeInOutQuad",t=>t<.5?2*t*t:1-Math.pow(-2*t+2,2)/2),it.set("easeInCubic",t=>t*t*t),it.set("easeOutCubic",t=>1-Math.pow(1-t,3)),it.set("easeInOutCubic",t=>t<.5?4*t*t*t:1-Math.pow(-2*t+2,3)/2),it.set("easeOutBack",t=>{const e=1.70158;return 1+2.70158*Math.pow(t-1,3)+e*Math.pow(t-1,2)}),it.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 rt="http://www.w3.org/2000/svg";function ot(t){return 1-Math.pow(1-t,3)}let nt=null;function lt(){if(!h.isBrowser())return!1;try{return nt||(nt=window.matchMedia("(prefers-reduced-motion: reduce)")),!!nt.matches}catch(t){return!1}}function ct(t,e,s){if(!h.isBrowser())return!1;if(s.globals.dataChanged||s.globals.resized)return!1;const i=s.config.chart.animations;if(!i||!1===i.enabled)return!1;const a=s.config.chart.type;if("line"!==a&&"area"!==a&&"rangeArea"!==a)return!1;if(!(s.layout.gridWidth>0))return!1;const r=2*(i.speed||800),o=Math.max(0,Math.min(1,e/s.layout.gridWidth)),n=(1-Math.cbrt(1-o))*r,l=t.node.style;l.opacity="0";let c=null;const d=t=>{null===c&&(c=t),t-c>=n?l.opacity="":m.requestAnimationFrame(d)};return m.requestAnimationFrame(d),!0}function ht(t){const e=t.config.chart.animations;var s;e&&(!1!==e.respectReducedMotion&<()&&(e.enabled=!1,e.dynamicAnimation&&(e.dynamicAnimation.enabled=!1)),s=at(e.easing),Z="function"==typeof s?s:q)}function dt(t){const e=t.style,s=t.index||0,i="number"==typeof t.baseDelay?t.baseDelay:40,a=t.row||0,r=t.col||0,o=t.groupIndex||0,n=t.perGroup||1,l=t.centerDistance||0;switch(e){case"none":return 0;case"diagonal":return(a+r)*i;case"group":return o*i+s%n*(i/4);case"centroid":return l*i*(s+1);default:return s*i}}class pt{constructor(t,e){this.w=t,this.ctx=e}animateLine(t,e,s,i){t.attr(e).animate(i).attr(s)}animateMarker(t,e,s,i){t.attr({opacity:0}).animate(e).attr({opacity:1}).after(()=>{i()})}animatePop(t,{speed:e,delay:s=0,onComplete:i}){const a=this.w;if(!h.isBrowser()||!a.globals.shouldAnimate||e<1)return void(i&&i());const r=t.node.style;r.transformBox="fill-box",r.transformOrigin="center",r.transform="scale(0)",r.opacity="0";const o=performance.now()+s,n=t=>{const s=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)}(s)})`,r.opacity=String(Math.min(1,2*s)),s<1?m.requestAnimationFrame(n):(r.transform="",r.transformOrigin="",r.transformBox="",r.opacity="",i&&i())};m.requestAnimationFrame(n)}animateRect(t,e,s,i,a,r=0){t.attr(e).animate(i,r).attr(s).after(()=>a())}animatePathsGradually(t){const{el:e,realIndex:s,j:i,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,s,i,"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}),h.isBrowser()&&e.globals.shouldAnimate?e.globals.bulkRevealScheduled||(e.globals.bulkRevealScheduled=!0,m.requestAnimationFrame(()=>{e.globals.isDestroyed||(e.globals.bulkRevealScheduled=!1,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.animationEnded=!0,this.showDelayedElements(),"function"==typeof e.config.chart.events.animationEnd&&e.config.chart.events.animationEnd(this.ctx,{el:t,w:e}))}animateDraw(t,{realIndex:e,j:s,isFill:i,isLast:a,speed:r,delay:o,mask:n}){const l=this.w,c=this,d=()=>{a&&l.globals.shouldAnimate&&c.animationCompleted(t),c.showDelayedElements()};if(!h.isBrowser()||!l.globals.shouldAnimate||r<1)return void d();const p=t.node,g=()=>{const t=n&&"radial"===n.type,a=l.layout.gridWidth+8,c=n&&n.cx||0,h=n&&n.cy||0,g=(n&&n.r||l.layout.gridWidth/2)+4,u=`apexDrawMask${l.globals.cuid}-${e}-${null!=s?s:0}-${i?"f":"s"}`,x=m.createElementNS(rt,"mask");let f;if(x.setAttribute("id",u),x.setAttribute("maskUnits","userSpaceOnUse"),t){const t=g;x.setAttribute("x",String(c-t)),x.setAttribute("y",String(h-t)),x.setAttribute("width",String(2*t)),x.setAttribute("height",String(2*t)),f=m.createElementNS(rt,"circle"),f.setAttribute("cx",String(c)),f.setAttribute("cy",String(h)),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=m.createElementNS(rt,"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(#${u})`);const b=performance.now()+(o||0),y=e=>{if(l.globals.isDestroyed)return;const s=Math.max(0,Math.min(1,(e-b)/r)),i=ot(s);t?f.setAttribute("r",String(i*g)):f.setAttribute("width",String(i*a)),s<1?m.requestAnimationFrame(y):(p.removeAttribute("mask"),x.parentNode&&x.parentNode.removeChild(x),d())};m.requestAnimationFrame(y)};m.requestAnimationFrame(()=>{if(l.globals.isDestroyed)return;if(i)return void g();const t=p.getAttribute("stroke-dasharray");if(!!t&&"0"!==t&&""!==t)return void g();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),s=i=>{if(l.globals.isDestroyed)return;const a=Math.max(0,Math.min(1,(i-e)/r));p.setAttribute("stroke-dashoffset",String(t*(1-ot(a)))),a<1?m.requestAnimationFrame(s):(p.removeAttribute("stroke-dasharray"),p.removeAttribute("stroke-dashoffset"),d())};m.requestAnimationFrame(s)})(e):d()})}morphSVG(t,e,s,i,a,r,o,n,l,c){var h,d;const p=this.w;a||(a=t.attr("pathFrom")),r||(r=t.attr("pathTo"));const g=()=>("radar"===p.config.chart.type&&(o=1),`M 0 ${p.layout.gridHeight}`);(!a||a.indexOf("undefined")>-1||a.indexOf("NaN")>-1)&&(a=g()),(!r.trim()||r.indexOf("undefined")>-1||r.indexOf("NaN")>-1)&&(r=g(),c=void 0),c&&(!c.trim()||c.indexOf("undefined")>-1||c.indexOf("NaN")>-1)&&(c=void 0),p.globals.shouldAnimate||(o=1);const u=!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=at(t):l&&(x=at("linear"))}const f=t.plot(a).animate(1,n).plot(a).animate(o,n);x&&f.ease(x),f.plot(c||r,u,c?r:void 0).after(()=>{b.isNumber(s)?s===p.seriesData.series[p.globals.maxValsInArrayIndex].length-2&&p.globals.shouldAnimate&&this.animationCompleted(t):"none"!==i&&p.globals.shouldAnimate&&(!p.globals.comboCharts&&e===p.seriesData.series.length-1||p.globals.comboCharts)&&this.animationCompleted(t),this.showDelayedElements()})}}class gt{constructor(t){this.w=t}getDefaultFilter(t,e){const s=this.w;t.unfilter&&t.unfilter(!0),s.config.chart.dropShadow.enabled&&this.dropShadow(t,s.config.chart.dropShadow,e)}applyFilter(t,e,s){var i,a,r;const o=this.w;if(t.unfilter&&t.unfilter(!0),"none"===s)return void this.getDefaultFilter(t,e);const n=o.config.chart.dropShadow,l="lighten"===s?2:.3;t.filterWith&&(t.filterWith(t=>{t.colorMatrix({type:"matrix",values:`\n ${l} 0 0 0 0\n 0 ${l} 0 0 0\n 0 0 ${l} 0 0\n 0 0 0 1 0\n `,in:"SourceGraphic",result:"brightness"}),n.enabled&&this.addShadow(t,e,n,"brightness")}),n.noUserSpaceOnUse||null==(a=null==(i=t.filterer())?void 0:i.node)||a.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(null==(r=t.filterer())?void 0:r.node))}addShadow(t,e,s,i){var a;const r=this.w;let{blur:o,top:n,left:l,color:c,opacity:h}=s;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:i,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",i])}dropShadow(t,e,s=0){var i,a,r,o,n;const l=this.w;return t.unfilter&&t.unfilter(!0),b.isMsEdge()&&"radialBar"===l.config.chart.type||(null==(i=l.config.chart.dropShadow.enabledOnSeries)?void 0:i.length)>0&&-1===(null==(a=l.config.chart.dropShadow.enabledOnSeries)?void 0:a.indexOf(s))||t.filterWith&&(t.filterWith(t=>{this.addShadow(t,s,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,s){const i=this.w;if(void 0!==i.interact.selectedDataPoints[e]&&i.interact.selectedDataPoints[e].indexOf(s)>-1){t.node.setAttribute("selected",!0);const s=i.config.states.active.filter;"none"!==s&&this.applyFilter(t,e,s.type)}}_scaleFilterSize(t){if(!t)return;(e=>{for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.setAttribute(s,e[s])})({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}class ut{constructor(t,e=null){this.w=t,this.ctx=e}roundPathCorners(t,e){function s(t,e,s){var a=e.x-t.x,r=e.y-t.y,o=Math.sqrt(a*a+r*r);return i(t,e,Math.min(1,s/o))}function i(t,e,s){return{x:t.x+(e.x-t.x)*s,y:t.y+(e.y-t.y)*s}}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 s=e.match(/^([a-zA-Z])(.+)/);return s?(t.push(s[1]),t.push(s[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],g=p==c?o[1]:o[h+1];if(g&&d&&d.length>2&&"L"==p[0]&&g.length>2&&"L"==g[0]){var u,x,f=r(d),m=r(p),b=r(g);u=s(m,f,e),x=s(m,b,e),a(p,u),p.origPoint=m,n.push(p);var y=i(u,m,.5),w=i(m,x,.5),v=["C",y.x,y.y,w.x,w.y,x.x,x.y];v.origPoint=m,n.push(v)}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,s,i,a="#a8a8a8",r=0,o=null,n="butt"){return this.w.dom.Paper.line().attr({x1:t,y1:e,x2:s,y2:i,stroke:a,"stroke-dasharray":r,"stroke-width":o,"stroke-linecap":n})}drawRect(t=0,e=0,s=0,i=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:s>0?s:0,height:i>0?i: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",s=1,i="none"){return this.w.dom.Paper.polygon(t).attr({fill:i,stroke:e,"stroke-width":s})}drawCircle(t,e=null){t<0&&(t=0);const s=this.w.dom.Paper.circle(2*t);return null!==e&&s.attr(e),s}drawPath({d:t="",stroke:e="#a8a8a8",strokeWidth:s=1,fill:i,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:i,"fill-opacity":a,stroke:e,"stroke-opacity":r,"stroke-linecap":n,"stroke-width":s,"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,s=null){return"H"===s?[" H",t].join(" "):"V"===s?[" V",e].join(" "):[" L",t,e].join(" ")}curve(t,e,s,i,a,r){return["C",t,e,s,i,a,r].join(" ")}quadraticCurve(t,e,s,i){return["Q",t,e,s,i].join(" ")}arc(t,e,s,i,a,r,o,n=!1){let l="A";n&&(l="a");return[l,t,e,s,i,a,r,o].join(" ")}renderPaths({j:t,realIndex:e,pathFrom:s,pathTo:i,pathToInterp:a,stroke:r,strokeWidth:o,strokeLinecap:c,fill:h,animationDelay:d,initialSpeed:p,dataChangeSpeed:g,className:u,chartType:x,shouldClipToGrid:f=!0,bindEventsOnPaths:m=!0,drawShadow:b=!0,drawMask:y=null,scrollMorph:w=!1}){var v,A;const C=this.w,S=new gt(this.w),k=new pt(this.w,null!=(v=this.ctx)?v:void 0),M=this.w.config.chart.animations.enabled,D=M&&this.w.config.chart.animations.dynamicAnimation.enabled;if(s&&s.startsWith("M 0 0 ")&&i){const t=i.match(/^M\s+[\d.-]+\s+[\d.-]+/);t&&(s=s.replace(/^M\s+0\s+0/,t[0]))}let T;const L=!!(M&&!C.globals.resized||D&&C.globals.dataChanged&&C.globals.shouldAnimate),F="string"==typeof u&&(u.indexOf("apexcharts-line")>-1||u.indexOf("apexcharts-area")>-1||u.indexOf("apexcharts-rangeArea")>-1||u.indexOf("apexcharts-radar")>-1),E=!(!M||C.globals.resized||C.globals.dataChanged||!F),_=null!=(A=C.config.chart.animations.largeDatasetThreshold)?A:0,P=!!(L&&!E&&_>0&&C.globals.dataPoints>_),B=!(!("candlestick"===x||"boxPlot"===x)||!L||E||!C.globals.dataChanged),N=P||B;!L||E||N?(T=i,L||(C.globals.animationEnded=!0)):T=s;const X=C.config.stroke.dashArray;let I=0;I=Array.isArray(X)?X[e]:C.config.stroke.dashArray;const R=this.drawPath({d:T,stroke:r,strokeWidth:o,fill:h,fillOpacity:1,classes:u,strokeLinecap:c,strokeDashArray:I});R.attr("index",e),f&&("bar"===x&&!C.globals.isBarHorizontal||C.globals.comboCharts?R.attr({"clip-path":`url(#gridRectBarMask${C.globals.cuid})`}):R.attr({"clip-path":`url(#gridRectMask${C.globals.cuid})`})),C.config.chart.dropShadow.enabled&&b&&S.dropShadow(R,C.config.chart.dropShadow,e),m&&(R.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,R)),R.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,R)),R.node.addEventListener("mousedown",this.pathMouseDown.bind(this,R))),R.attr({pathTo:i,pathFrom:s});const z={el:R,j:t,realIndex:e,pathFrom:s,pathTo:i,pathToInterp:a,fill:h,strokeWidth:o,delay:d,scrollMorph:w};if(!M||C.globals.resized||C.globals.dataChanged)!C.globals.resized&&C.globals.dataChanged||N||k.showDelayedElements();else if(E){const s=2*p,i="none"===r||0===o,a=C.seriesData.series.length,n=!!C.globals.comboCharts||e===a-1;k.animateDraw(R,{realIndex:e,j:t,isFill:i,isLast:n,speed:s,delay:0,mask:y})}else N||k.animatePathsGradually(l(n({},z),{speed:p}));return C.globals.dataChanged&&D&&L&&!N&&k.animatePathsGradually(l(n({},z),{speed:g})),N&&k.revealBulk(R),R}drawPattern(t,e,s,i="#a8a8a8",a=0){return this.w.dom.Paper.pattern(e,s,r=>{"horizontalLines"===t?r.line(0,0,s,0).stroke({color:i,width:a+1}):"verticalLines"===t?r.line(0,0,0,e).stroke({color:i,width:a+1}):"slantedLines"===t?r.line(0,0,e,s).stroke({color:i,width:a}):"squares"===t?r.rect(e,s).fill("none").stroke({color:i,width:a}):"circles"===t&&r.circle(e).fill("none").stroke({color:i,width:a})})}drawGradient(t,e,s,i,a,r=null,o=null,n=[],l=0){const c=this.w;let h;e.length<9&&0===e.indexOf("#")&&(e=b.hexToRgba(e,i)),s.length<9&&0===s.indexOf("#")&&(s=b.hexToRgba(s,a));let d=0,p=1,g=1,u=null;null!==o&&(d=void 0!==o[0]?o[0]/100:0,p=void 0!==o[1]?o[1]/100:1,g=void 0!==o[2]?o[2]/100:1,u=void 0!==o[3]?o[3]/100:null);const x=!("donut"!==c.config.chart.type&&"pie"!==c.config.chart.type&&"polarArea"!==c.config.chart.type&&"bubble"!==c.config.chart.type);if(h=n&&0!==n.length?c.dom.Paper.gradient(x?"radial":"linear",t=>{(Array.isArray(n[l])?n[l]:n).forEach(e=>{t.stop(e.offset/100,e.color,e.opacity)})}):c.dom.Paper.gradient(x?"radial":"linear",t=>{t.stop(d,e,i),t.stop(p,s,a),t.stop(g,s,a),null!==u&&t.stop(u,e,i)}),x){const t=c.layout.gridWidth/2,e=c.layout.gridHeight/2;"bubble"!==c.config.chart.type?h.attr({gradientUnits:"userSpaceOnUse",cx:t,cy:e,r:r}):h.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else"vertical"===t?h.from(0,0).to(0,1):"diagonal"===t?h.from(0,0).to(1,1):"horizontal"===t?h.from(0,1).to(1,1):"diagonal2"===t&&h.from(1,0).to(0,1);return h}getTextBasedOnMaxWidth({text:t,maxWidth:e,fontSize:s,fontFamily:i}){const a=this.getTextRects(t,s,i,""),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:s,textAnchor:i,fontSize:a,fontFamily:r,fontWeight:o,foreColor:l,opacity:c,maxWidth:h,cssClass:d="",isPlainText:p=!0,dominantBaseline:g="auto"}){const u=this.w;void 0===s&&(s="");let x=s;i||(i="start"),l&&l.length||(l=u.config.chart.foreColor),r=r||u.config.chart.fontFamily,o=o||"regular";const f={maxWidth:h,fontSize:a=a||"11px",fontFamily:r};let m;return Array.isArray(s)?m=u.dom.Paper.text(t=>{for(let e=0;e<s.length;e++)x=s[e],h&&(x=this.getTextBasedOnMaxWidth(n({text:s[e]},f))),0===e?t.tspan(x):t.tspan(x).newLine()}):(h&&(x=this.getTextBasedOnMaxWidth(n({text:s},f))),m=p?u.dom.Paper.plain(s):u.dom.Paper.text(t=>t.tspan(x))),m.attr({x:t,y:e,"text-anchor":i,"dominant-baseline":g,"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,s,i){let a="";switch(s){case"cross":a=`M ${t-(i/=1.4)} ${e-i} L ${t+i} ${e+i} M ${t-i} ${e+i} L ${t+i} ${e-i}`;break;case"plus":a=`M ${t-(i/=1.12)} ${e} L ${t+i} ${e} M ${t} ${e-i} L ${t} ${e+i}`;break;case"star":case"sparkle":{let r=5;i*=1.15,"sparkle"===s&&(i/=1.1,r=4);const o=Math.PI/r;for(let s=0;s<=2*r;s++){const r=s*o,n=s%2==0?i:i/2;a+=(0===s?"M":"L")+(t+n*Math.sin(r))+","+(e-n*Math.cos(r))}a+="Z";break}case"triangle":a=`M ${t} ${e-i} \n L ${t+i} ${e+i} \n L ${t-i} ${e+i} \n Z`;break;case"square":case"rect":a=`M ${t-(i/=1.125)} ${e-i} \n L ${t+i} ${e-i} \n L ${t+i} ${e+i} \n L ${t-i} ${e+i} \n Z`;break;case"diamond":a=`M ${t} ${e-(i*=1.05)} \n L ${t+i} ${e} \n L ${t} ${e+i} \n L ${t-i} ${e} \n Z`;break;case"line":a=`M ${t-(i/=1.1)} ${e} \n L ${t+i} ${e}`;break;default:a=`M ${t}, ${e} \n m -${(i*=2)/2}, 0 \n a ${i/2},${i/2} 0 1,0 ${i},0 \n a ${i/2},${i/2} 0 1,0 -${i},0`}return a}drawMarkerShape(t,e,s,i,a){const r=this.drawPath({d:this.getMarkerPath(t,e,s,i),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,s){t=t||0;let i=s.pSize||0;return b.isNumber(e)||(i=0,e=0),this.drawMarkerShape(t,e,null==s?void 0:s.shape,i,n(n({},s),"line"===s.shape||"plus"===s.shape||"cross"===s.shape?{pointStrokeColor:s.pointFillColor,pointStrokeOpacity:s.pointFillOpacity}:{}))}pathMouseEnter(t,e){var s,i;const a=this.w,r=new gt(this.w),o=parseInt(null!=(s=t.node.getAttribute("index"))?s:"",10),n=parseInt(null!=(i=t.node.getAttribute("j"))?i:"",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}),ut._fireEvent(a,"dataPointMouseEnter",[e,this.ctx,{seriesIndex:o,dataPointIndex:n,w:a}]),"none"!==a.config.states.active.filter.type&&"true"===t.node.getAttribute("selected")||"none"===a.config.states.hover.filter.type||a.interact.isTouchDevice))){const e=a.config.states.hover.filter;r.applyFilter(t,o,e.type)}}pathMouseLeave(t,e){var s,i;const a=this.w,r=new gt(this.w),o=parseInt(null!=(s=t.node.getAttribute("index"))?s:"",10),n=parseInt(null!=(i=t.node.getAttribute("j"))?i:"",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}),ut._fireEvent(a,"dataPointMouseLeave",[e,this.ctx,{seriesIndex:o,dataPointIndex:n,w:a}]),"none"!==a.config.states.active.filter.type&&"true"===t.node.getAttribute("selected")||"none"!==a.config.states.hover.filter.type&&r.getDefaultFilter(t,o))}pathMouseDown(t,e){var s,i;const a=this.w,r=new gt(this.w),o=parseInt(null!=(s=t.node.getAttribute("index"))?s:"",10),n=parseInt(null!=(i=t.node.getAttribute("j"))?i:"",10);if(isNaN(o)||isNaN(n))return;const l=a.config.chart.link;if(!!(!l||"function"!=typeof l.dimension&&!l.enabled)){let e="false";if("true"===t.node.getAttribute("selected")){t.node.setAttribute("selected","false");const e=a.interact.selectedDataPoints[o].indexOf(n);e>-1&&a.interact.selectedDataPoints[o].splice(e,1)}else{if(!a.config.states.active.allowMultipleDataPointsSelection&&a.interact.selectedDataPoints.length>0){a.interact.selectedDataPoints=[];const t=a.dom.Paper.find(".apexcharts-series path:not(.apexcharts-decoration-element)"),e=a.dom.Paper.find(".apexcharts-series circle:not(.apexcharts-decoration-element), .apexcharts-series rect:not(.apexcharts-decoration-element)"),s=t=>{Array.prototype.forEach.call(t,t=>{t.node.setAttribute("selected","false"),r.getDefaultFilter(t,o)})};s(t),s(e)}t.node.setAttribute("selected","true"),e="true",void 0===a.interact.selectedDataPoints[o]&&(a.interact.selectedDataPoints[o]=[]),a.interact.selectedDataPoints[o].push(n)}if("true"===e){const e=a.config.states.active.filter;if("none"!==e)r.applyFilter(t,o,e.type);else if("none"!==a.config.states.hover.filter&&!a.interact.isTouchDevice){const e=a.config.states.hover.filter;r.applyFilter(t,o,e.type)}}else if("none"!==a.config.states.active.filter.type)if("none"===a.config.states.hover.filter.type||a.interact.isTouchDevice)r.getDefaultFilter(t,o);else{const e=a.config.states.hover.filter;r.applyFilter(t,o,e.type)}}"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&&ut._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 s=null;t.node.addEventListener("mouseover",i=>{const a=ut._findDelegateTarget(i.target,t.node,e);a&&a!==s&&(s&&s.instance&&this.pathMouseLeave(s.instance,i),s=a,a.instance&&this.pathMouseEnter(a.instance,i))}),t.node.addEventListener("mouseout",i=>{if(!s)return;(i.relatedTarget?ut._findDelegateTarget(i.relatedTarget,t.node,e):null)!==s&&(s&&s.instance&&this.pathMouseLeave(s.instance,i),s=null)}),t.node.addEventListener("mousedown",s=>{const i=ut._findDelegateTarget(s.target,t.node,e);i&&i.instance&&this.pathMouseDown(i.instance,s)})}static _fireEvent(t,e,s){const i=t.globals.events;if(!i||!Object.prototype.hasOwnProperty.call(i,e))return;const a=i[e];for(let t=0;t<a.length;t++)a[t].apply(null,s)}static _findDelegateTarget(t,e,s){for(;t&&t!==e&&t!==document;){if(t.matches&&t.matches(s))return t;t=t.parentNode}return null}static setAttrs(t,e){for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.setAttribute(s,e[s])}getTextRects(t,e,s,i,a=!0){const r=this.w,o=[t,e,s,i,a].join("\0"),n=r.globals.textRectsCache;if(n&&n.has(o))return n.get(o);const l=this.drawText({x:-200,y:-200,text:t,textAnchor:"start",fontSize:e,fontFamily:s,foreColor:"#fff",opacity:0});i&&l.attr("transform",i),r.dom.Paper.add(l);let c=l.bbox();const h=c.y;a||(c=l.node.getBoundingClientRect()),l.remove();const d={width:c.width,height:c.height,centerOffset:a?h+c.height/2- -200:0};return n&&n.set(o,d),d}placeTextWithEllipsis(t,e,s){if("function"==typeof t.getComputedTextLength&&(t.textContent=e,e.length>0&&t.getComputedTextLength()>=s/1.1)){for(let i=e.length-3;i>0;i-=3)if(t.getSubStringLength(0,i)<=s/1.1)return void(t.textContent=e.substring(0,i)+"...");t.textContent="."}}}class xt{constructor(t){this.w=t,this.opts=null,this.seriesIndex=0,this.patternIDs=[]}clippedImgArea(t){const e=this.w,s=e.config,i=parseInt(String(e.layout.gridWidth),10),a=parseInt(String(e.layout.gridHeight),10),r=i>a?i:a,o=t.image;let n=0,l=0;void 0===t.width&&void 0===t.height?void 0!==s.fill.image.width&&void 0!==s.fill.image.height?(n=s.fill.image.width+1,l=s.fill.image.height):(n=r+1,l=r):(n=t.width,l=t.height);const c=m.createElementNS(P,"pattern");ut.setAttrs(c,{id:t.patternID,patternUnits:t.patternUnits?t.patternUnits:"userSpaceOnUse",width:n+"px",height:l+"px"});const d=m.createElementNS(P,"image");c.appendChild(d);const p=h.isBrowser()?window.SVG:global.SVG;d.setAttributeNS(p.xlink,"href",o),ut.setAttrs(d,{x:0,y:0,preserveAspectRatio:"none",width:n+"px",height:l+"px"}),d.style.opacity=t.opacity,e.dom.elDefs.node.appendChild(c)}getSeriesIndex(t){const e=this.w,s=e.config.chart.type;return("bar"===s||"rangeBar"===s)&&e.config.plotOptions.bar.distributed||"heatmap"===s||"treemap"===s?this.seriesIndex=t.seriesNumber:this.seriesIndex=t.seriesNumber%e.seriesData.series.length,this.seriesIndex}computeColorStops(t,e){const s=this.w;let i=null,a=null;for(const s of t)s>=e.threshold?(null===i||s>i)&&(i=s):(null===a||s<a)&&(a=s);null===i&&(i=e.threshold),null===a&&(a=e.threshold);let r=i-e.threshold+(e.threshold-a);0===r&&(r=1);let o=100-(e.threshold-a)/r*100;return o=Math.max(0,Math.min(o,100)),[{offset:o,color:e.colorAboveThreshold,opacity:s.config.fill.opacity},{offset:0,color:e.colorBelowThreshold,opacity:s.config.fill.opacity}]}fillPath(t){var e,s,i,a;const r=this.w;this.opts=t;const o=this.w.config;let n,l,c;this.seriesIndex=this.getSeriesIndex(t);const h=o.plotOptions.line.colors.colorAboveThreshold&&o.plotOptions.line.colors.colorBelowThreshold;let d=this.getFillColors()[this.seriesIndex];void 0!==r.seriesData.seriesColors[this.seriesIndex]&&(d=r.seriesData.seriesColors[this.seriesIndex]),"function"==typeof d&&(d=d({seriesIndex:this.seriesIndex,dataPointIndex:t.dataPointIndex,value:t.value,w:r}));const p=t.fillType?t.fillType:this.getFillType(this.seriesIndex);let g=Array.isArray(o.fill.opacity)?o.fill.opacity[this.seriesIndex]:o.fill.opacity;const u="gradient"===p||h;t.color&&(d=t.color);const x=r.config.series[this.seriesIndex];(null==(s=null==(e=null==x?void 0:x.data)?void 0:e[t.dataPointIndex])?void 0:s.fillColor)&&(d=null==(a=null==(i=null==x?void 0:x.data)?void 0:i[t.dataPointIndex])?void 0:a.fillColor),d||(d="#fff"),void 0!==t.opacity&&null!==t.opacity&&(g=t.opacity);let f=d;b.isCSSVariable(d)?f=b.applyOpacityToColor(d,g):-1===d.indexOf("rgb")?-1===d.indexOf("#")?f=d:d.length<9&&(f=b.hexToRgba(d,g)):d.indexOf("rgba")>-1?g=b.getOpacityFromRGBA(d):f=b.hexToRgba(b.rgb2hex(d),g);const m=b.isCSSVariable(d)?b.getThemeColor(d):d;if("pattern"===p&&(l=this.handlePatternFill({fillConfig:t.fillConfig,patternFill:l,fillColor:m,defaultColor:f})),u){const e=o.fill.gradient.colorStops?[...o.fill.gradient.colorStops]:[];let s=o.fill.gradient.type;h&&(e[this.seriesIndex]=this.computeColorStops(r.seriesData.series[this.seriesIndex],o.plotOptions.line.colors),s="vertical"),c=this.handleGradientFill({type:s,fillConfig:t.fillConfig,fillColor:m,fillOpacity:g,colorStops:e,i:this.seriesIndex})}if("image"===p){const e=o.fill.image.src,s=t.patternID?t.patternID:"",i=`pattern${r.globals.cuid}${t.seriesNumber+1}${s}`;-1===this.patternIDs.indexOf(i)&&(this.clippedImgArea({opacity:g,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:i}),this.patternIDs.push(i)),n=`url(#${i})`}else n=u?c:"pattern"===p?l:f;return t.solid&&(n=f),n}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,s=this.opts;let i=[];return t.globals.comboCharts?"line"===t.config.series[this.seriesIndex].type?Array.isArray(t.globals.stroke.colors)?i=t.globals.stroke.colors:i.push(t.globals.stroke.colors):Array.isArray(t.globals.fill.colors)?i=t.globals.fill.colors:i.push(t.globals.fill.colors):"line"===e.chart.type?Array.isArray(t.globals.stroke.colors)?i=t.globals.stroke.colors:i.push(t.globals.stroke.colors):Array.isArray(t.globals.fill.colors)?i=t.globals.fill.colors:i.push(t.globals.fill.colors),void 0!==s.fillColors&&(i=[],Array.isArray(s.fillColors)?i=s.fillColors.slice():i.push(s.fillColors)),i}handlePatternFill({fillConfig:t,patternFill:e,fillColor:s,defaultColor:i}){let a=this.w.config.fill;t&&(a=t);const r=this.opts,o=new ut(this.w),n=Array.isArray(a.pattern.strokeWidth)?a.pattern.strokeWidth[this.seriesIndex]:a.pattern.strokeWidth,l=s;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=i;else e=o.drawPattern(a.pattern.style,a.pattern.width,a.pattern.height,l,n);return e}handleGradientFill({type:t,fillColor:e,fillOpacity:s,fillConfig:i,colorStops:a,i:r}){let o=this.w.config.fill;i&&(o=n(n({},o),i));const l=this.opts,c=new ut(this.w),h=new b;t=t||o.gradient.type;let d,p=e,g=void 0===o.gradient.opacityFrom?s:Array.isArray(o.gradient.opacityFrom)?o.gradient.opacityFrom[r]:o.gradient.opacityFrom;p.indexOf("rgba")>-1&&(g=b.getOpacityFromRGBA(p));let u=void 0===o.gradient.opacityTo?s:Array.isArray(o.gradient.opacityTo)?o.gradient.opacityTo[r]:o.gradient.opacityTo;if(void 0===o.gradient.gradientToColors||0===o.gradient.gradientToColors.length)d="dark"===o.gradient.shade?h.shadeColor(-1*parseFloat(o.gradient.shadeIntensity),e.indexOf("rgb")>-1?b.rgb2hex(e):e):h.shadeColor(parseFloat(o.gradient.shadeIntensity),e.indexOf("rgb")>-1?b.rgb2hex(e):e);else if(o.gradient.gradientToColors[l.seriesNumber]){const t=o.gradient.gradientToColors[l.seriesNumber];d=t,t.indexOf("rgba")>-1&&(u=b.getOpacityFromRGBA(t))}else d=e;if(o.gradient.gradientFrom&&(p=o.gradient.gradientFrom),o.gradient.gradientTo&&(d=o.gradient.gradientTo),o.gradient.inverseColors){const t=p;p=d,d=t}return p.indexOf("rgb")>-1&&(p=b.rgb2hex(p)),d.indexOf("rgb")>-1&&(d=b.rgb2hex(d)),c.drawGradient(t,p,d,g,u,l.size,o.gradient.stops,a,r)}}const ft=["none","lighten","darken"];function mt(t,e){const s=t&&t.renderer;return s&&s.kind&&"svg"!==s.kind?s:e}function bt(t){var e,s;const i=t.config.fill&&t.config.fill.type,a=t=>"pattern"===t||"image"===t||"gradient"===t;if(Array.isArray(i)?i.some(a):a(i))return!0;const r=null==(s=null==(e=t.config.plotOptions)?void 0:e.line)?void 0:s.colors;if(r&&r.colorAboveThreshold&&r.colorBelowThreshold)return!0;const o=t.config.states||{},n=o.hover&&o.hover.filter&&o.hover.filter.type,l=o.active&&o.active.filter&&o.active.filter.type;return!(!n||ft.includes(n))||!(!l||ft.includes(l))}class yt{constructor(t,e){this.w=t,this.ctx=e,this._filters=new gt(this.w),this._graphics=new ut(this.w,this.ctx),this._seriesWrap=null,this._seriesWrapIndex=-1}resetSeriesWrapCache(){this._seriesWrap=null,this._seriesWrapIndex=-1}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)}plotChartMarkers({pointsPos:t,seriesIndex:e,j:s,pSize:i,alwaysDrawMarker:a=!1,isVirtualPoint:r=!1}){const o=this.w,n=e,l=t;let c=null;const h=new ut(this.w),d=mt(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 h,g=s,u=!b.isNumber(l.y[t]);0===o.globals.markers.largestSize&&o.globals.hasNullValues&&null!==o.seriesData.series[n][s+1]&&!r&&(u=!0),1===s&&0===t&&(g=0),1===s&&1===t&&(g=1);let x="apexcharts-marker";"line"!==o.config.chart.type&&"area"!==o.config.chart.type||o.globals.comboCharts||o.config.tooltip.intersect||(x+=" no-pointer-events");if((Array.isArray(o.config.markers.size)?o.globals.markers.size[e]>0:o.config.markers.size>0)||a||p){"canvas"===d.kind&&(void 0===o.globals.pointsArray[e]&&(o.globals.pointsArray[e]=[]),o.globals.pointsArray[e][g]=[l.x[t],l.y[t]]),u||(x+=` w${b.randomId()}`);const s=this.getMarkerConfig({cssClass:x,seriesIndex:e,dataPointIndex:g}),r=o.config.series[n];if(r.data[g]&&(r.data[g].fillColor&&(s.pointFillColor=r.data[g].fillColor),r.data[g].strokeColor&&(s.pointStrokeColor=r.data[g].strokeColor)),void 0!==i&&(s.pSize=i),(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)&&(s.pSize=0),!u){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))}h=d.drawMarker(l.x[t],l.y[t],s),h.attr("rel",g),h.attr("j",g),h.attr("index",e),h.node.setAttribute("default-marker-size",s.pSize),ct(h,l.x[t],o),this._filters.setSelectionFilter(h,e,g),c&&c.add(h)}}else void 0===o.globals.pointsArray[e]&&(o.globals.pointsArray[e]=[]),o.globals.pointsArray[e].push([l.x[t],l.y[t]])}return c}getMarkerConfig({cssClass:t,seriesIndex:e,dataPointIndex:s=null,radius:i=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!==s&&c.discrete.length&&c.discrete.map(t=>{t.seriesIndex===e&&t.dataPointIndex===s&&(n.pointStrokeColor=t.strokeColor,n.pointFillColor=t.fillColor,l=t.size,n.pointShape=t.shape)}),{pSize:null===i?l:i,pRadius:null!==i?i: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,s=".apexcharts-marker";this._graphics.setupEventDelegation(t,s),t.node.addEventListener("click",i=>{if(e.config.markers.onClick){ut._findDelegateTarget(i.target,t.node,s)&&e.config.markers.onClick(i)}}),t.node.addEventListener("dblclick",i=>{if(e.config.markers.onDblClick){ut._findDelegateTarget(i.target,t.node,s)&&e.config.markers.onDblClick(i)}}),t.node.addEventListener("touchstart",e=>{const i=ut._findDelegateTarget(e.target,t.node,s);i&&i.instance&&this._graphics.pathMouseDown(i.instance,e)},{passive:!0})}addEvents(t){const e=this.w;t.node.addEventListener("mouseenter",this._graphics.pathMouseEnter.bind(this.ctx,t)),t.node.addEventListener("mouseleave",this._graphics.pathMouseLeave.bind(this.ctx,t)),t.node.addEventListener("mousedown",this._graphics.pathMouseDown.bind(this.ctx,t)),t.node.addEventListener("click",e.config.markers.onClick),t.node.addEventListener("dblclick",e.config.markers.onDblClick),t.node.addEventListener("touchstart",this._graphics.pathMouseDown.bind(this.ctx,t),{passive:!0})}getMarkerStyle(t){const e=this.w,s=e.globals.markers.colors,i=e.config.markers.strokeColor||e.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(i)?i[t]:i,pointFillColor:Array.isArray(s)?s[t]:s}}}class wt{constructor(t,e){this.ctx=e,this.w=t,this.initialAnim=this.w.config.chart.animations.enabled,this.anim=new pt(this.w),this.filters=new gt(this.w),this.fill=new xt(this.w),this.markers=new yt(this.w,this.ctx),this.graphics=new ut(this.w),this._elPointsWrap=null,this._elPointsWrapParent=null,this._perSeries=null}draw(t,e,s){const i=this.w,a=this.graphics,r=mt(this.ctx,a),o=s.realIndex,n=s.pointsPos,l=s.zRatio,c=s.elParent;let h=this._elPointsWrap;if(h&&this._elPointsWrapParent===c||(h=r.group({class:`apexcharts-series-markers apexcharts-series-${i.config.chart.type}`}),h.attr("clip-path",`url(#gridRectMarkerMask${i.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 s=e+1,a=!0;0===e&&0===t&&(s=0),0===e&&1===t&&(s=1);let c=i.globals.markers.size[o];if(l!==1/0){const t=i.config.plotOptions.bubble;c=i.seriesData.seriesZ[o][s],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!==i.seriesData.series[o][s]||(a=!1),a){const t=this.drawPoint(d,p,c,o,s,e);h.add(t),"canvas"===r.kind&&(void 0===i.globals.pointsArray[o]&&(i.globals.pointsArray[o]=[]),i.globals.pointsArray[o][s]=[d,p])}}}_buildPerSeriesCache(t,e){var s;const i=this.w;return{realIndex:t,emit:e,isBubble:"bubble"===i.config.chart.type||i.globals.comboCharts&&i.config.series[t]&&"bubble"===i.config.series[t].type,canCacheConfig:!i.config.markers.discrete.length,markerConfig:null,fillCacheable:void 0,fillCircle:void 0,dropShadowEnabled:i.config.chart.dropShadow.enabled,doInitialAnim:this.initialAnim&&!i.globals.dataChanged&&!i.globals.resized,jitter:null==(s=i.config.plotOptions.scatter)?void 0:s.jitter,anim:null}}drawPoint(t,e,s,i,a,r){var o;const n=this.w,l=i,c=this.anim,h=this.filters,d=this.fill,p=this.markers;let g=this._perSeries;g&&g.realIndex===i||(g=this._perSeries=this._buildPerSeriesCache(i,mt(this.ctx,this.graphics)));const u=g.emit;let x;g.canCacheConfig?(g.markerConfig||(g.markerConfig=p.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:l,dataPointIndex:a,radius:g.isBubble?s:null})),x=g.markerConfig,g.isBubble&&(x.pSize=s,x.pRadius=s)):x=p.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:l,dataPointIndex:a,radius:g.isBubble?s:null});const f=n.config.series[l].data[a];let m;void 0!==g.fillCircle?m=g.fillCircle:(m=d.fillPath({seriesNumber:i,dataPointIndex:a,color:x.pointFillColor,patternUnits:"objectBoundingBox",value:n.seriesData.series[i][r]}),void 0===g.fillCacheable&&(g.fillCacheable=g.canCacheConfig&&"solid"===d.getFillType(i)&&"string"==typeof x.pointFillColor&&!!x.pointFillColor),g.fillCacheable&&!(null==f?void 0:f.fillColor)&&(g.fillCircle=m));const b=u.drawMarker(t,e,x);(null==f?void 0:f.fillColor)&&(m=f.fillColor);const y=g.jitter;if((null==y?void 0:y.enabled)&&y.distributed&&n.globals.colors.length){const t=Math.round(null==(o=n.seriesData.seriesX[i])?void 0:o[a]);isNaN(t)||(m=n.globals.colors[t%n.globals.colors.length])}if(b.attr({fill:m}),g.dropShadowEnabled){const t=n.config.chart.dropShadow;h.dropShadow(b,t,i)}if(g.doInitialAnim){if(!g.anim){const t=n.config.chart.animations,e=n.globals.dataPoints||1,s=t.animateGradually,i=s&&!1!==s.enabled;g.anim={popSpeed:t.speed,baseDelay:i?Math.min(20,.5*t.speed/Math.max(1,e)):0}}const t=dt({style:g.anim.baseDelay>0?"sequential":"none",index:a,baseDelay:g.anim.baseDelay});c.animatePop(b,{speed:g.anim.popSpeed,delay:t,onComplete:()=>c.animationCompleted(b)})}else n.globals.animationEnded=!0;return b.attr({rel:a,j:a,index:i,"default-marker-size":x.pSize}),h.setSelectionFilter(b,i,a),b}centerTextInBubble(t){const e=this.w;return{y:t+=parseInt(e.config.dataLabels.style.fontSize,10)/4}}}class vt{constructor(t,e=null){this.w=t,this.ctx=e}dataLabelsCorrection(t,e,s,i,a,r,o){const n=this.w;let l=!1;const c=new ut(this.w).getTextRects(s,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[i]&&(n.globals.dataLabelsRects[i]=[]),n.globals.dataLabelsRects[i].push({x:t,y:e,width:h,height:d});const p=n.globals.dataLabelsRects[i].length-2,g=void 0!==n.globals.lastDrawnDataLabelsIndexes[i]?n.globals.lastDrawnDataLabelsIndexes[i][n.globals.lastDrawnDataLabelsIndexes[i].length-1]:0;if(void 0!==n.globals.dataLabelsRects[i][p]){const s=n.globals.dataLabelsRects[i][g];(t>s.x+s.width||e>s.y+s.height||e+d<s.y||t+h<s.x)&&(l=!0)}return(0===a||r)&&(l=!0),{x:t,y:e,textRects:c,drawnextLabel:l}}drawDataLabel({type:t,pos:e,i:s,j:i,isRangeStart:a,strokeWidth:r=2}){const o=this.w,n=new ut(this.w),l=o.config.dataLabels;let c=0,h=0,d=i,p=null;if(-1!==o.globals.collapsedSeriesIndices.indexOf(s)||!l.enabled||!Array.isArray(e.x))return p;p=n.group({class:"apexcharts-data-labels"});for(let n=0;n<e.x.length;n++)if(c=e.x[n]+l.offsetX,h=e.y[n]+l.offsetY+r,!isNaN(c)){1===i&&0===n&&(d=0),1===i&&1===n&&(d=1);let r=o.seriesData.series[s][d];"rangeArea"===t&&(r=a?o.rangeData.seriesRangeStart[s][d]:o.rangeData.seriesRangeEnd[s][d]);let l="";const g=t=>o.config.dataLabels.formatter(t,{seriesIndex:s,dataPointIndex:d,w:o});if("bubble"===o.config.chart.type){r=o.seriesData.seriesZ[s][d],l=g(r),h=e.y[n];h=new wt(this.w,this.ctx).centerTextInBubble(h).y}else void 0!==r&&(l=g(r));let u=o.config.dataLabels.textAnchor;o.globals.isSlopeChart&&(u=0===d?"end":d===o.config.series[s].data.length-1?"start":"middle"),this.plotDataLabelsText({x:c,y:h,text:l,i:s,j:d,parent:p,offsetCorrection:!0,dataLabelsConfig:o.config.dataLabels,textAnchor:u})}return p}plotDataLabelsText(t){const e=this.w,s=new ut(this.w);let{x:i,y:a,i:r,j:o,text:n,textAnchor:l,fontSize:c,parent:h,dataLabelsConfig:d,color:p,alwaysDrawDataLabel:g,offsetCorrection:u,className:x}=t,f=null;if(Array.isArray(e.config.dataLabels.enabledOnSeries)&&e.config.dataLabels.enabledOnSeries.indexOf(r)<0)return f;let m={x:i,y:a,drawnextLabel:!0,textRects:null};if(u&&(m=this.dataLabelsCorrection(i,a,n,r,o,g,parseInt(d.style.fontSize,10).toString())),e.interact.zoomed||(i=m.x,a=m.y),m.textRects){const t=e.globals.barPadForNumericAxis||0;(i<-(t+20)-m.textRects.width||i>e.layout.gridWidth+m.textRects.width+t+30)&&(n="")}let b=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)&&(b=e.globals.dataLabels.style.colors[o]),"function"==typeof b&&(b=b({series:e.seriesData.series,seriesIndex:r,dataPointIndex:o,w:e})),p&&(b=p);let y=d.offsetX,w=d.offsetY;if("bar"!==e.config.chart.type&&"rangeBar"!==e.config.chart.type||(y=0,w=0),e.globals.isSlopeChart&&(0!==o&&(y=-2*d.offsetX+5),0!==o&&o!==e.config.series[r].data.length-1&&(y=0)),m.drawnextLabel){if("middle"===l&&i===e.layout.gridWidth&&(l="end"),f=s.drawText({x:i+y,y:a+w,foreColor:b,textAnchor:l||d.textAnchor,text:n,fontSize:c||d.style.fontSize,fontFamily:d.style.fontFamily,fontWeight:d.style.fontWeight||"normal"}),f.attr({class:x||"apexcharts-datalabel",cx:i,cy:a}),d.dropShadow.enabled){const t=d.dropShadow;new gt(this.w).dropShadow(f,t)}h.add(f),ct(f,i,e),void 0===e.globals.lastDrawnDataLabelsIndexes[r]&&(e.globals.lastDrawnDataLabelsIndexes[r]=[]),e.globals.lastDrawnDataLabelsIndexes[r].push(o)}return f}addBackgroundToDataLabel(t,e){const s=this.w,i=s.config.dataLabels.background,a=i.padding,r=i.padding/2,o=e.width,n=e.height,l=new ut(this.w).drawRect(e.x-a,e.y-r/2,o+2*a,n+r,i.borderRadius,"transparent"!==s.config.chart.background&&s.config.chart.background?s.config.chart.background:"#fff",i.opacity,i.borderWidth,i.borderColor);if(i.dropShadow.enabled){new gt(this.w).dropShadow(l,i.dropShadow)}return l}dataLabelsBackground(){var t;const e=this.w;if("bubble"===e.config.chart.type)return;const s=e.dom.baseEl.querySelectorAll(".apexcharts-datalabels text");for(let i=0;i<s.length;i++){const a=s[i],r=a.getBBox();let o=null;if(r.width&&r.height&&(o=this.addBackgroundToDataLabel(a,r)),o){null==(t=a.parentNode)||t.insertBefore(o.node,a);const s=e.config.dataLabels.background.backgroundColor||a.getAttribute("fill");e.config.chart.animations.enabled&&!e.globals.resized&&!e.globals.dataChanged?o.animate().attr({fill:s}):o.attr({fill:s}),a.setAttribute("fill",e.config.dataLabels.background.foreColor);const i=a.getAttribute("cx");null!==i&&ct(o,parseFloat(i),e)}}}bringForward(){const t=this.w,e=t.dom.baseEl.querySelectorAll(".apexcharts-datalabels"),s=t.dom.baseEl.querySelector(".apexcharts-plot-series:last-child");for(let t=0;t<e.length;t++)s&&s.insertBefore(e[t],s.nextSibling)}}class At{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,s){return t&&t.globals?(t.globals.cachedSelectors||(t.globals.cachedSelectors={}),t.globals.cachedSelectors[e]||(t.globals.cachedSelectors[e]=s()),t.globals.cachedSelectors[e]):s()}static getCachedDimension(t,e,s,i=1e3){if(!t||!t.globals)return s();t.globals.dimensionCache||(t.globals.dimensionCache={});const a=t.globals.dimensionCache[e],r=Date.now();if(a&&a.lastUpdate&&r-a.lastUpdate<i)return a.value;const o=s();return t.globals.dimensionCache[e]={value:o,lastUpdate:r},o}static cacheDOMElement(t,e,s){t&&t.globals&&(t.globals.domCache||(t.globals.domCache=new Map),t.globals.domCache.set(e,s))}static getCachedDOMElement(t,e){return t&&t.globals&&t.globals.domCache&&t.globals.domCache.get(e)||null}}class Ct{constructor(t,{theme:e=null,timeScale:s=null}={}){this.w=t,this.theme=e,this.timeScale=s}getLabel(t,e,s,i,a=[],r="12px",o=!0){const n=this.w,l=void 0===t[i]?"":t[i];let c=l;const h=n.formatters.xLabelFormatter,d=n.config.xaxis.labels.formatter,p=new w(this.w),g=l;o&&(c=p.xLabelFormat(h,l,g,{i:i,dateFormatter:new y(this.w).formatDate,w:n}),void 0!==d&&(c=d(l,t[i],{i:i,dateFormatter:new y(this.w).formatDate,w:n}))),e.length>0?(s=e[i].position,c=e[i].value):"datetime"===n.config.xaxis.type&&void 0===d&&(c=""),void 0===c&&(c=""),c=Array.isArray(c)?c:c.toString();const u=new ut(this.w);let x={};x=n.layout.rotateXLabels&&o?u.getTextRects(c,parseInt(r,10).toString(),null,`rotate(${n.config.xaxis.labels.rotate} 0 0)`,!1):u.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:s,text:c,textRect:x}}checkLabelBasedOnTickamount(t,e,s){const i=this.w;let a=i.config.xaxis.tickAmount;if("dataPoints"===a&&(a=Math.round(i.layout.gridWidth/120)),a>s)return e;return t%Math.round(s/(a+1))===0||(e.text=""),e}checkForOverflowingLabels(t,e,s,i,a){const r=this.w;if(0===t&&r.globals.skipFirstTimelinelabel&&(e.text=""),t===s-1&&r.globals.skipLastTimelinelabel&&(e.text=""),r.config.xaxis.labels.hideOverlappingLabels&&i.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.abs(r.config.xaxis.labels.rotate)/12:1.01)+t.x&&(e.text="")}return e}checkForReversedLabels(t,e){const s=this.w;return s.config.yaxis[t]&&s.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,s=e.globals,i=e.config.yaxis;return e.seriesData.series.length>i.length||i.some(t=>Array.isArray(t.seriesName))?t:s.seriesYAxisReverseMap[t]}isYAxisHidden(t){const e=this.w,s=e.config.yaxis[t];if(!s.show||this.yAxisAllSeriesCollapsed(t))return!0;if(!s.showForNullSeries){const s=e.globals.seriesYAxisMap[t],i=new _(this.w);return s.every(t=>i.isSeriesNull(t))}return!1}getYAxisForeColor(t,e){var s;const i=this.w;return Array.isArray(t)&&i.globals.yAxisScale[e]&&(null==(s=this.theme)||s.pushExtraColors(t,i.globals.yAxisScale[e].result.length,!1)),t}drawYAxisTicks(t,e,s,i,a,r,o){const n=this.w,l=new ut(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),i.show&&e>0){!0===n.config.yaxis[a].opposite&&(t+=i.width);for(let a=e;a>=0;a--){const e=l.drawLine(t+s.offsetX-i.width+i.offsetX,c+i.offsetY,t+s.offsetX+i.offsetX,c+i.offsetY,i.color);o.add(e),c+=r}}}}class St{constructor(t,e,s){this.w=t,this.ctx=e,this.elgrid=s,this.axesUtils=new Ct(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 ut(this.w),s=e.group({class:"apexcharts-xaxis",transform:`translate(${t.config.xaxis.offsetX}, ${t.config.xaxis.offsetY})`}),i=e.group({class:"apexcharts-xaxis-texts-g",transform:`translate(${t.layout.translateXAxisX}, ${t.layout.translateXAxisY})`});s.add(i);let a=[];for(let t=0;t<this.xaxisLabels.length;t++)a.push(this.xaxisLabels[t]);if(this.drawXAxisLabelAndGroup(!0,e,i,a,t.axisFlags.isXNumeric,(t,e)=>e),t.labelData.hasXaxisGroups){const s=t.labelData.groups;a=[];for(let t=0;t<s.length;t++)a.push(s[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,i,a,!1,(t,e)=>s[t].cols*e,r)}if(void 0!==t.config.xaxis.title.text){const i=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});i.add(a),s.add(i)}if(t.config.xaxis.axisBorder.show){const i=t.globals.barPadForNumericAxis,a=e.drawLine(t.globals.padHorizontal+t.config.xaxis.axisBorder.offsetX-i,this.offY,this.xaxisBorderWidth+i,this.offY,t.config.xaxis.axisBorder.color,0,this.xaxisBorderHeight);this.elgrid&&this.elgrid.elGridBorders&&t.config.grid.show?this.elgrid.elGridBorders.add(a):s.add(a)}return s}drawXAxisLabelAndGroup(t,e,s,i,a,r,o={}){var n,l;const c=[],h=[],d=this.w,p=o.xaxisFontSize||this.xaxisFontSize,g=o.xaxisFontFamily||this.xaxisFontFamily,u=o.xaxisForeColors||this.xaxisForeColors,x=o.fontWeight||d.config.xaxis.labels.style.fontWeight,f=o.cssClass||d.config.xaxis.labels.style.cssClass;let b,y=d.globals.padHorizontal;const w=i.length;let v="category"===d.config.xaxis.type?d.globals.dataPoints:w;if(0===v&&w>v&&(v=w),a){const t=Math.max(Number(d.config.xaxis.tickAmount)||1,v>1?v-1:v);b=d.layout.gridWidth/Math.min(t,w-1),y=y+r(0,b)/2+d.config.xaxis.labels.offsetX}else b=d.layout.gridWidth/v,y=y+r(0,b)+d.config.xaxis.labels.offsetX;for(let a=0;a<=w-1;a++){let o=y-r(a,b)/2+d.config.xaxis.labels.offsetX;0===a&&1===w&&b/2===y&&1===v&&(o=d.layout.gridWidth/2);let A=this.axesUtils.getLabel(i,d.labelData.timescaleLabels,o,a,c,p,t),C=28;d.layout.rotateXLabels&&t&&(C=22),d.config.xaxis.title.text&&"top"===d.config.xaxis.position&&(C+=parseFloat(d.config.xaxis.title.style.fontSize)+2),t||(C=C+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,w):this.axesUtils.checkForOverflowingLabels(a,A,w,c,h);const S=()=>t&&d.config.xaxis.convertedCatToNumeric?u[d.globals.minX+a-1]:u[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 i=e.drawText({x:A.x,y:this.offY+d.config.xaxis.labels.offsetY+C-("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:g,foreColor:Array.isArray(u)?S():u,isPlainText:!1,cssClass:(t?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+f});if(s.add(i),i.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=m.createElementNS(P,"title");t.textContent=Array.isArray(A.text)?A.text.join(" "):A.text,i.node.appendChild(t),""!==A.text&&(c.push(A.text),h.push(A))}}a<w-1&&(y+=r(a+1,b))}}drawXaxisInversed(t){const e=this.w,s=new ut(this.w),i=e.config.yaxis[0].opposite?e.globals.translateYAxisX[t]:0,a=s.group({class:"apexcharts-yaxis apexcharts-xaxis-inversed",rel:t}),r=s.group({class:"apexcharts-yaxis-texts-g apexcharts-xaxis-inversed-texts-g",transform:"translate("+i+", 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.formatters.yLabelFormatters[0],h=e.config.yaxis[0].labels;if(h.show)for(let i=0;i<=o.length-1;i++){let a=void 0===o[i]?"":o[i];a=c(a,{seriesIndex:t,dataPointIndex:i,w:e});const d=this.axesUtils.getYAxisForeColor(h.style.colors,t),p=()=>Array.isArray(d)?d[i]:d;let g=0;Array.isArray(a)&&(g=a.length/2*parseInt(h.style.fontSize,10));let u=h.offsetX-15,x="end";this.yaxis.opposite&&(x="start"),"left"===e.config.yaxis[0].labels.align?(u=h.offsetX,x="start"):"center"===e.config.yaxis[0].labels.align?(u=h.offsetX,x="middle"):"right"===e.config.yaxis[0].labels.align&&(x="end");const f=s.drawText({x:u,y:l+n+h.offsetY-g,text:a,textAnchor:x,foreColor:p(),fontSize:h.style.fontSize,fontFamily:h.style.fontFamily,fontWeight:h.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+h.style.cssClass,maxWidth:h.maxWidth});r.add(f),f.on("click",t=>{if("function"==typeof e.config.chart.events.xAxisLabelClick){const s=Object.assign({},e,{labelIndex:i});e.config.chart.events.xAxisLabelClick(t,this.ctx,s)}});const b=m.createElementNS(P,"title");if(b.textContent=Array.isArray(a)?a.join(" "):a,f.node.appendChild(b),0!==e.config.yaxis[t].labels.rotate){const i=s.rotateAroundCenter(f.node);f.node.setAttribute("transform",`rotate(${e.config.yaxis[t].labels.rotate} 0 ${i.y})`)}l+=n}if(void 0!==e.config.yaxis[0].title.text){const t=s.group({class:"apexcharts-yaxis-title apexcharts-xaxis-title-inversed",transform:"translate("+i+", 0)"}),r=s.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=s.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,s){const i=this.w,a=t;if(t<0||t-2>i.layout.gridWidth)return;const r=this.offY+i.config.xaxis.axisTicks.offsetY;if(e=e+r+i.config.xaxis.axisTicks.height,"top"===i.config.xaxis.position&&(e=r-i.config.xaxis.axisTicks.height),i.config.xaxis.axisTicks.show){const o=new ut(this.w).drawLine(t+i.config.xaxis.axisTicks.offsetX,r+i.config.xaxis.offsetY,a+i.config.xaxis.axisTicks.offsetX,e+i.config.xaxis.offsetY,i.config.xaxis.axisTicks.color);s.add(o),o.node.classList.add("apexcharts-xaxis-tick")}}getXAxisTicksPositions(){const t=this.w,e=[],s=this.xaxisLabels.length;let i=t.globals.padHorizontal;if(t.labelData.timescaleLabels.length>0)for(let t=0;t<s;t++)i=this.xaxisLabels[t].position,e.push(i);else{const a=s;for(let s=0;s<a;s++){let s=a;t.axisFlags.isXNumeric&&"bar"!==t.config.chart.type&&(s-=1),i+=t.layout.gridWidth/s,e.push(i)}}return e}xAxisLabelCorrections(){var t,e,s;const i=this.w,a=new ut(this.w),r=i.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g"),o=i.dom.baseEl.querySelectorAll(".apexcharts-xaxis-texts-g text:not(.apexcharts-xaxis-group-label)"),n=i.dom.baseEl.querySelectorAll(".apexcharts-yaxis-inversed text"),l=i.dom.baseEl.querySelectorAll(".apexcharts-xaxis-inversed-texts-g text tspan");if(i.layout.rotateXLabels||i.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(${i.config.xaxis.labels.rotate} ${e.x} ${e.y})`),o[t].setAttribute("text-anchor","end"),null==r||r.setAttribute("transform","translate(0, -10)");const s=o[t].childNodes;i.config.xaxis.labels.trim&&Array.prototype.forEach.call(s,t=>{a.placeTextWithEllipsis(t,t.textContent,i.layout.xAxisLabelsHeight-("bottom"===i.config.legend.position?20:10))})}else{const t=i.layout.gridWidth/(i.labelData.labels.length+1);for(let e=0;e<o.length;e++){const s=o[e].childNodes;i.config.xaxis.labels.trim&&"datetime"!==i.config.xaxis.type&&Array.prototype.forEach.call(s,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>i.layout.gridWidth&&!i.globals.isBarHorizontal&&(null==(e=n[0].parentNode)||e.removeChild(n[0]));for(let t=0;t<l.length;t++)a.placeTextWithEllipsis(l[t],null!=(s=l[t].textContent)?s:"",i.config.yaxis[0].labels.maxWidth-(i.config.yaxis[0].title.text?2*parseFloat(i.config.yaxis[0].title.style.fontSize):0)-15)}}}class kt{constructor(t,e){this.w=t,this.ctx=e,this.xaxisLabels=t.labelData.labels.slice(),this.axesUtils=new Ct(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,s=new ut(this.w);t||(t=s.group({class:"apexcharts-grid"}));const i=s.drawLine(e.globals.padHorizontal,1,e.globals.padHorizontal,e.layout.gridHeight,"transparent"),a=s.drawLine(e.globals.padHorizontal,e.layout.gridHeight,e.layout.gridWidth,e.layout.gridHeight,"transparent");return t.add(a),t.add(i),t}drawGrid(){if(this.w.globals.axisCharts){const t=this.renderGrid();return this.drawGridArea(t.el),t}return null}createGridMask(){const t=this.w,e=t.globals,s=new ut(this.w),i=Array.isArray(t.config.stroke.width)?Math.max(...t.config.stroke.width):t.config.stroke.width,a=t=>{const e=m.createElementNS(P,"clipPath");return e.setAttribute("id",t),e};t.dom.elGridRectMask=a(`gridRectMask${e.cuid}`),t.dom.elGridRectBarMask=a(`gridRectBarMask${e.cuid}`),t.dom.elGridRectMarkerMask=a(`gridRectMarkerMask${e.cuid}`),t.dom.elForecastMask=a(`forecastMask${e.cuid}`),t.dom.elNonForecastMask=a(`nonForecastMask${e.cuid}`);let r=0,o=0;(["bar","rangeBar","candlestick","boxPlot","violin"].includes(t.config.chart.type)||t.globals.comboBarCount>0)&&t.axisFlags.isXNumeric&&!t.globals.isBarHorizontal&&(r=Math.max(t.config.grid.padding.left,e.barPadForNumericAxis),o=Math.max(t.config.grid.padding.right,e.barPadForNumericAxis)),t.dom.elGridRect=s.drawRect(-i/2-2,-i/2-2,t.layout.gridWidth+i+4,t.layout.gridHeight+i+4,0,"#fff"),t.dom.elGridRectBar=s.drawRect(-i/2-r-2,-i/2-2,t.layout.gridWidth+i+o+r+4,t.layout.gridHeight+i+4,0,"#fff");const n=t.globals.markers.largestSize;t.dom.elGridRectMarker=s.drawRect(Math.min(-i/2-r-2,-n),-n,t.layout.gridWidth+Math.max(i+o+r+4,2*n),t.layout.gridHeight+2*n,0,"#fff"),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 l=t.dom.elDefs.node;l.appendChild(t.dom.elGridRectMask),l.appendChild(t.dom.elGridRectBarMask),l.appendChild(t.dom.elGridRectMarkerMask),l.appendChild(t.dom.elForecastMask),l.appendChild(t.dom.elNonForecastMask)}_drawGridLines({i:t,x1:e,y1:s,x2:i,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:s,x2:i,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 s=0;for(let i=0;s<t&&i<e.length;i++)s+=e[i].cols;s===t&&(l=.6*n.layout.xAxisLabelsHeight)}}new St(this.w,this.ctx).drawXaxisTicks(e,l,n.dom.elGraphical)}}_drawGridLine({i:t,x1:e,y1:s,x2:i,y2:a,xCount:r,parent:o}){const n=this.w,l=o.node.classList.contains("apexcharts-gridlines-horizontal"),c=n.globals.barPadForNumericAxis,h=0===s&&0===a||0===e&&0===i||s===n.layout.gridHeight&&a===n.layout.gridHeight||n.globals.isBarHorizontal&&(0===t||t===r-1),d=new ut(this.w).drawLine(e-(l?c:0),s,i+(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:s,x2:i,y2:a,type:r}){const o=this.w,n=new ut(this.w),l=o.globals.barPadForNumericAxis,c=o.config.grid[r].colors[t],h=n.drawRect(e-("row"===r?l:0),s,i+("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 s;const i=this.w,a=({xC:e,x1:s,y1:i,x2:a,y2:r})=>{for(let o=0;o<e;o++)s=this.xaxisLabels[o].position,a=this.xaxisLabels[o].position,this._drawGridLines({i:o,x1:s,y1:i,x2:a,y2:r,xCount:t,parent:this.elgridLinesV})},r=({xC:e,x1:s,y1:a,x2:r,y2:o})=>{for(let n=0;n<e+(i.axisFlags.isXNumeric?0:1);n++)0===n&&1===e&&1===i.globals.dataPoints&&(r=s=i.layout.gridWidth/2),this._drawGridLines({i:n,x1:s,y1:a,x2:r,y2:o,xCount:t,parent:this.elgridLinesV}),r=s+=i.layout.gridWidth/(i.axisFlags.isXNumeric?e-1:e)};if(i.config.grid.xaxis.lines.show||i.config.xaxis.axisTicks.show){const e=i.globals.padHorizontal,o=0;let n;const l=i.layout.gridHeight;i.labelData.timescaleLabels.length?a({xC:t,x1:e,y1:o,x2:n,y2:l}):(i.axisFlags.isXNumeric&&(t=null==(s=i.globals.xAxisScale)?void 0:s.result.length),r({xC:t,x1:e,y1:o,x2:n,y2:l}))}if(i.config.grid.yaxis.lines.show){const t=0;let s=0,a=0;const r=i.layout.gridWidth;let o=e+1;this.isRangeBar&&(o=i.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:s,x2:r,y2:a,parent:this.elgridLinesH}),s+=i.layout.gridHeight/(this.isRangeBar?o:e),a=s}}_drawInvertedXYLines({xCount:t}){const e=this.w;if(e.config.grid.xaxis.lines.show||e.config.xaxis.axisTicks.show){let s=e.globals.padHorizontal;const i=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:s,y1:i,x2:a,y2:r,parent:this.elgridLinesV});new St(this.w,this.ctx).drawXaxisTicks(s,0,e.dom.elGraphical),s+=e.layout.gridWidth/t,a=s}}if(e.config.grid.yaxis.lines.show){const t=0;let s=0,i=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:s,x2:a,y2:i,parent:this.elgridLinesH}),s+=e.layout.gridHeight/e.globals.dataPoints,i=s}}renderGrid(){var t,e,s;const i=this.w,a=i.globals,r=new ut(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),i.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=i.labelData.labels.length,i.config.xaxis.tickAmount&&i.config.xaxis.labels.formatter&&(n=i.config.xaxis.tickAmount),(null==(s=null==(e=null==(t=a.yAxisScale)?void 0:t[o])?void 0:e.result)?void 0:s.length)>0&&"datetime"!==i.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:i.layout.gridWidth/n}}drawGridBands(t,e){var s,i,a,r,o;const n=this.w,l=(t,s,i,a,r,o)=>{for(let l=0,c=0;l<s;l++,c++)c>=n.config.grid[t].colors.length&&(c=0),this._drawGridBandRect({c:c,x1:i,y1:a,x2:r,y2:o,type:t}),a+=n.layout.gridHeight/e};if((null==(s=n.config.grid.row.colors)?void 0:s.length)>0&&l("row",e,0,0,n.layout.gridWidth,n.layout.gridHeight/e),(null==(i=n.config.grid.column.colors)?void 0:i.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 s=n.globals.padHorizontal;const i=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&&(s=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:s,y1:i,x2:l,y2:c,type:"column"}),s+=n.layout.gridWidth/e}}}class Mt{constructor(t){this.w=t,this.coreUtils=new _(this.w)}niceScale(t,e,s=0){const i=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[s],n=Math.max((r.svgHeight-100)/15,2)),b.isNumber(n)||(n=10),l=void 0!==o.min&&null!==o.min,c=void 0!==o.max&&null!==o.min;let h=void 0!==o.stepSize&&null!==o.stepSize,d=void 0!==o.tickAmount&&null!==o.tickAmount,p=d?o.tickAmount:L[Math.min(Math.round(n/2),L.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||!b.isNumber(t)&&!b.isNumber(e)||t===Number.MIN_VALUE&&e===-Number.MAX_VALUE)&&(t=b.isNumber(o.min)?o.min:0,e=b.isNumber(o.max)?o.max:t+p,r.allSeriesCollapsed=!1),t>e){const s=e;e=t,t=s}else t===e&&(t=0===t?0:t-1,e=0===e?2:e+1);const g=[];p<1&&(p=1);let u=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/u,m=f;const y=Math.floor(Math.log10(m)),w=Math.pow(10,y);let v=Math.ceil(m/w);if(v=T[0===r.yValueDecimal?0:1][v],m=v*w,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,y-t)}if(l&&c){let t=x/u;if(d)if(h)if(0!=b.mod(x,f)){const e=b.getGCD(f,t);f=t/e<10?e:t}else 0==b.mod(f,t)?f=t:(t=f,d=!1);else f=t;else if(h)0==b.mod(x,f)?t=f:f=t;else if(0==b.mod(x,f))t=f;else{u=Math.ceil(x/f),t=x/u;const e=b.getGCD(x,f);x/e<n&&(t=e),f=t}u=Math.round(x/f)}else{if(l||c){if(c)if(d)t=e-f*u;else{const s=t;t=f*Math.floor(t/f),Math.abs(e-t)/b.getGCD(x,f)>n&&(t=e-f*p,t+=f*Math.floor((s-t)/f))}else if(l)if(d)e=t+f*u;else{const s=e;e=f*Math.ceil(e/f),Math.abs(e-t)/b.getGCD(x,f)>n&&(e=t+f*p,e+=f*Math.ceil((s-e)/f))}}else if(r.isMultipleYAxis&&d){const s=f*Math.floor(t/f);let i=s+f*u;i<e&&(f*=2),i=e,e=(t=s)+f*u,x=Math.abs(e-t),t>0&&t<Math.abs(i-e)&&(t=0,e=f*u),e<0&&-e<Math.abs(s-t)&&(e=0,t=-f*u)}else t=f*Math.floor(t/f),e=f*Math.ceil(e/f);x=Math.abs(e-t),f=b.getGCD(x,f),u=Math.round(x/f)}if(d||l||c||(u=Math.ceil((x-i)/(f+i)),u>16&&b.getPrimeFactors(u).length<2&&u++),!d&&o.forceNiceScale&&0===r.yValueDecimal&&u>x&&(u=x,f=Math.round(x/u)),u>n&&(!d&&!h||o.forceNiceScale)){const t=b.getPrimeFactors(u),e=t.length-1;let s=u;t:for(var A=0;A<e;A++)for(var C=0;C<=e-A;C++){const i=Math.min(C+A,e);let a=s,r=1;for(var S=C;S<=i;S++)r*=t[S];if(a/=r,a<n){s=a;break t}}f=s===u?x:x/s,u=Math.round(x/f)}r.isMultipleYAxis&&0==r.multiAxisTickAmount&&r.ignoreYAxisIndexes.indexOf(s)<0&&(r.multiAxisTickAmount=u);let k=t-f;const M=f*i;do{k+=f,g.push(b.stripNumber(k,7))}while(e-k>M);return{result:g,niceMin:g[0],niceMax:g[g.length-1]}}linearScale(t,e,s=10,i=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"===(s=this._adjustTicksForSmallRange(s,i,r))&&(s=this.w.globals.dataPoints-1);const n=s;a||(a=r/n);if(0!==a&&isFinite(a)){const t=Math.floor(Math.log10(Math.abs(a))),e=Math.max(2,2-t),s=Math.pow(10,e);a=Math.round((a+Number.EPSILON)*s)/s}let l=s===Number.MAX_VALUE?5:n;s===Number.MAX_VALUE&&(a=1);let c=t;for(;l>=0;)o.push(c),c=b.preciseAddition(c,a),l-=1;return{result:o,niceMin:o[0],niceMax:o[o.length-1]}}logarithmicScaleNice(t,e,s){e<=0&&(e=Math.max(t,s)),t<=0&&(t=Math.min(e,s));const i=[],a=Math.ceil(Math.log(e)/Math.log(s)+1);for(let e=Math.floor(Math.log(t)/Math.log(s));e<a;e++)i.push(Math.pow(s,e));return{result:i,niceMin:i[0],niceMax:i[i.length-1]}}logarithmicScale(t,e,s){e<=0&&(e=Math.max(t,s)),t<=0&&(t=Math.min(e,s));const i=[],a=Math.log(e)/Math.log(s),r=Math.log(t)/Math.log(s),o=a-r,n=Math.round(o),l=o/n;for(let t=0,e=r;t<n;t++,e+=l)i.push(Math.pow(s,e));return i.push(Math.pow(s,a)),{result:i,niceMin:t,niceMax:e}}_adjustTicksForSmallRange(t,e,s){let i=t;if(void 0!==e&&this.w.config.yaxis[e].labels.formatter&&void 0===this.w.config.yaxis[e].tickAmount){const t=Number(this.w.config.yaxis[e].labels.formatter(1));b.isNumber(t)&&0===this.w.globals.yValueDecimal&&(i=Math.ceil(s))}return i<t?i:t}setYScaleForIndex(t,e,s){const i=this.w.globals,a=this.w.config,r=i.isBarHorizontal?a.xaxis:a.yaxis[t];void 0===i.yAxisScale[t]&&(i.yAxisScale[t]=[]);const o=Math.abs(s-e);r.logarithmic&&o<=5&&(i.invalidLogScale=!0),r.logarithmic&&o>5?(i.allSeriesCollapsed=!1,i.yAxisScale[t]=r.forceNiceScale?this.logarithmicScaleNice(e,s,r.logBase):this.logarithmicScale(e,s,r.logBase)):s!==-Number.MAX_VALUE&&b.isNumber(s)&&e!==Number.MAX_VALUE&&b.isNumber(e)?(i.allSeriesCollapsed=!1,i.yAxisScale[t]=this.niceScale(e,s,t)):i.yAxisScale[t]=this.niceScale(Number.MIN_VALUE,0,t)}setXScale(t,e){const s=this.w,i=s.globals;if(e!==-Number.MAX_VALUE&&b.isNumber(e)){const a=i.xTickAmount;i.xAxisScale=this.linearScale(t,e,a,0,void 0===s.config.xaxis.max?s.config.xaxis.stepSize:void 0)}else i.xAxisScale=this.linearScale(0,10,10);return i.xAxisScale}scaleMultipleYAxes(){const t=this.w.config,e=this.w.globals;this.coreUtils.setSeriesYAxisMappings();const s=e.seriesYAxisMap,i=e.minYArr,a=e.maxYArr,r=[],o=!e.isBarHorizontal;if(e.allSeriesCollapsed=!0,e.barGroups=[],s.forEach((s,n)=>{const l=[];if(s.forEach(e=>{var s;const i=null==(s=t.series[e])?void 0:s.group;l.indexOf(i)<0&&l.push(i)}),s.length>0){let c,h,d=Number.MAX_VALUE,p=-Number.MAX_VALUE,g=d,u=p;if(t.chart.stacked){const i=new Array(e.dataPoints).fill(0),a=[],r=[],o=[];l.forEach(()=>{a.push(i.map(()=>Number.MIN_VALUE)),r.push(i.map(()=>Number.MIN_VALUE)),o.push(i.map(()=>Number.MIN_VALUE))});for(let i=0;i<s.length;i++){!c&&t.series[s[i]].type&&(c=t.series[s[i]].type);const d=s[i];h=t.series[d].group?t.series[d].group:"axis-".concat(n.toString());!(e.collapsedSeriesIndices.indexOf(d)<0&&e.ancillaryCollapsedSeriesIndices.indexOf(d)<0)||(e.allSeriesCollapsed=!1,l.forEach((e,s)=>{if(t.series[d].group===e)for(let t=0;t<this.w.seriesData.series[d].length;t++){const e=this.w.seriesData.series[d][t];e>=0?r[s][t]+=e:o[s][t]+=e,a[s][t]+=e,g=Math.min(g,e),u=Math.max(u,e)}})),"bar"!==c&&"column"!==c||e.barGroups.push(h)}c||(c=t.chart.type),"bar"===c||"column"===c?l.forEach((t,e)=>{d=Math.min(d,Math.min.apply(null,o[e])),p=Math.max(p,Math.max.apply(null,r[e]))}):(l.forEach((t,e)=>{g=Math.min(g,Math.min.apply(null,a[e])),u=Math.max(u,Math.max.apply(null,a[e]))}),d=g,p=u),d===Number.MIN_VALUE&&p===Number.MIN_VALUE&&(p=-Number.MAX_VALUE)}else for(let t=0;t<s.length;t++){const r=s[t];d=Math.min(d,i[r]),p=Math.max(p,a[r]);!(e.collapsedSeriesIndices.indexOf(r)<0&&e.ancillaryCollapsedSeriesIndices.indexOf(r)<0)||(e.allSeriesCollapsed=!1)}void 0!==t.yaxis[n].min&&(d="function"==typeof t.yaxis[n].min?t.yaxis[n].min(d):t.yaxis[n].min),void 0!==t.yaxis[n].max&&(p="function"==typeof t.yaxis[n].max?t.yaxis[n].max(p):t.yaxis[n].max),e.barGroups=e.barGroups.filter((t,e,s)=>s.indexOf(t)===e);const x=t.yaxis[n];o&&!0===x.alignZero&&!x.logarithmic&&void 0===x.min&&void 0===x.max&&e.ignoreYAxisIndexes.indexOf(n)<0&&b.isNumber(d)&&b.isNumber(p)?r.push({ai:n,minY:d,maxY:p}):(this.setYScaleForIndex(n,d,p),s.forEach(t=>{i[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),s[t.ai].forEach(s=>{i[s]=e.yAxisScale[t.ai].niceMin,a[s]=e.yAxisScale[t.ai].niceMax})});let t=0;r.forEach(s=>{const i=e.yAxisScale[s.ai],a=i.niceMax-i.niceMin;if(a>0){const e=-i.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)),s=Math.pow(10,e),i=t/s;let a;return a=i<=1+1e-9?1:i<=2+1e-9?2:i<=2.5+1e-9?2.5:i<=5+1e-9?5:10,a*s};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,g=d?-n.niceMin*(1-t)/t:n.niceMax,u=g-p;if(u<=0)return;const x=Math.max(n.result.length,5),f=o(u/Math.max(x-1,1));if(f<=0)return;let m,y;if(h){m=Math.floor(p/f+1e-9)*f;const e=t>1e-9?m*(t-1)/t:n.niceMax,s=Math.max(e,n.niceMax);y=Math.ceil(s/f-1e-9)*f}else{y=Math.ceil(g/f-1e-9)*f;const e=t<1-1e-9?-t*y/(1-t):n.niceMin,s=Math.min(e,n.niceMin);m=Math.floor(s/f+1e-9)*f}n.result=[];for(let t=m;t<=y+1e-9*f;t=b.preciseAddition(t,f))n.result.push(b.stripNumber(t,7));n.niceMin=m,n.niceMax=y,s[r.ai].forEach(t=>{i[t]=n.niceMin,a[t]=n.niceMax})})}else if(1===r.length){const t=r[0];this.setYScaleForIndex(t.ai,t.minY,t.maxY),s[t.ai].forEach(s=>{i[s]=e.yAxisScale[t.ai].niceMin,a[s]=e.yAxisScale[t.ai].niceMax})}}}class Dt{constructor(t){this.w=t,this.scales=new Mt(this.w)}init(){this.setYRange(),this.setXRange(),this.setZRange()}getMinYMaxY(t,e=Number.MAX_VALUE,s=-Number.MAX_VALUE,i=null){var a,r,o,n,l,c,h,d;const p=this.w.config,g=this.w.globals;let u=-Number.MAX_VALUE,x=Number.MIN_VALUE;null===i&&(i=t+1);const f=this.w.seriesData.series;let m=f,y=f;"candlestick"===p.chart.type?(m=this.w.candleData.seriesCandleL,y=this.w.candleData.seriesCandleH):"boxPlot"===p.chart.type?(m=this.w.candleData.seriesCandleO,y=this.w.candleData.seriesCandleC):"violin"===p.chart.type?(m=this.w.violinData.seriesViolinMin,y=this.w.violinData.seriesViolinMax):this.w.axisFlags.isRangeData&&(m=this.w.rangeData.seriesRangeStart,y=this.w.rangeData.seriesRangeEnd);let w=!1;if(this.w.seriesData.seriesX.length>=i){const t=null==(a=g.brushSource)?void 0:a.w.config.chart.brush;(p.chart.zoom.enabled&&p.chart.zoom.autoScaleYaxis||(null==t?void 0:t.enabled)&&(null==t?void 0:t.autoScaleYaxis))&&(w=!0)}for(let a=t;a<i;a++){g.dataPoints=Math.max(g.dataPoints,f[a].length);const t=p.series[a].type;this.w.labelData.categoryLabels.length&&(g.dataPoints=this.w.labelData.categoryLabels.filter(t=>void 0!==t).length),this.w.labelData.labels.length&&"datetime"!==p.xaxis.type&&0!==this.w.seriesData.series.reduce((t,e)=>t+e.length,0)&&(g.dataPoints=Math.max(g.dataPoints,this.w.labelData.labels.length));let i=0,v=f[a].length-1;if(w){if(p.xaxis.min)for(;i<v&&this.w.seriesData.seriesX[a][i]<p.xaxis.min;i++);if(p.xaxis.max)for(;v>i&&this.w.seriesData.seriesX[a][v]>p.xaxis.max;v--);}for(let p=i;p<=v&&p<this.w.seriesData.series[a].length;p++){let i=f[a][p];if(null!==i&&b.isNumber(i)){switch(void 0!==(null==(r=y[a])?void 0:r[p])&&(u=Math.max(u,y[a][p]),e=Math.min(e,y[a][p])),void 0!==(null==(o=m[a])?void 0:o[p])&&(e=Math.min(e,m[a][p]),s=Math.max(s,m[a][p])),t){case"candlestick":void 0!==this.w.candleData.seriesCandleC[a][p]&&(u=Math.max(u,this.w.candleData.seriesCandleH[a][p]),e=Math.min(e,this.w.candleData.seriesCandleL[a][p]));break;case"boxPlot":void 0!==this.w.candleData.seriesCandleC[a][p]&&(u=Math.max(u,this.w.candleData.seriesCandleC[a][p]),e=Math.min(e,this.w.candleData.seriesCandleO[a][p]));break;case"violin":void 0!==(null==(n=this.w.violinData.seriesViolinMax[a])?void 0:n[p])&&(u=Math.max(u,this.w.violinData.seriesViolinMax[a][p]),e=Math.min(e,this.w.violinData.seriesViolinMin[a][p]))}if(t&&"candlestick"!==t&&"boxPlot"!==t&&"violin"!==t&&"rangeArea"!==t&&"rangeBar"!==t&&(u=Math.max(u,this.w.seriesData.series[a][p]),e=Math.min(e,this.w.seriesData.series[a][p])),this.w.seriesData.seriesGoals[a]&&this.w.seriesData.seriesGoals[a][p]&&Array.isArray(this.w.seriesData.seriesGoals[a][p])&&this.w.seriesData.seriesGoals[a][p].forEach(t=>{u=Math.max(u,t.value),e=Math.min(e,t.value)}),"boxPlot"===this.w.config.chart.type||"boxPlot"===t){const t=null==(c=null==(l=this.w.candleData.seriesBoxPoints)?void 0:l[a])?void 0:c[p];if(t)for(let s=0;s<t.length;s++){const i=t[s];"number"==typeof i&&(u=Math.max(u,i),e=Math.min(e,i))}}s=u,i=b.noExponents(i),b.isFloat(i)&&(g.yValueDecimal=Math.max(g.yValueDecimal,i.toString().split(".")[1].length)),x>(null==(h=m[a])?void 0:h[p])&&(null==(d=m[a])?void 0:d[p])<0&&(x=m[a][p])}else g.hasNullValues=!0}"bar"!==t&&"column"!==t||(x<0&&u<0&&(u=0,s=Math.max(s,0)),x===Number.MIN_VALUE&&(x=0,e=Math.min(e,0)))}return"rangeBar"===p.chart.type&&this.w.rangeData.seriesRangeStart.length&&g.isBarHorizontal&&(x=e),"bar"===p.chart.type&&(x<0&&u<0&&(u=0),x===Number.MIN_VALUE&&(x=0)),{minY:x,maxY:u,lowestY:e,highestY:s}}setYRange(){const t=this.w.globals,e=this.w.config;t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE;let s,i=Number.MAX_VALUE;if(t.isMultipleYAxis){i=Number.MAX_VALUE;for(let e=0;e<this.w.seriesData.series.length;e++)s=this.getMinYMaxY(e),t.minYArr[e]=s.lowestY,t.maxYArr[e]=s.highestY,i=Math.min(i,s.lowestY)}if(s=this.getMinYMaxY(0,i,void 0,this.w.seriesData.series.length),"bar"===e.chart.type?(t.minY=s.minY,t.maxY=s.maxY):(t.minY=s.lowestY,t.maxY=s.highestY),i=s.lowestY,e.chart.stacked&&this._setStackedMinMax(),"line"===e.chart.type||"area"===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&&i!==-Number.MAX_VALUE&&i!==t.maxY&&(t.minY=i):t.minY=t.minY!==Number.MIN_VALUE?Math.min(s.minY,t.minY):s.minY,e.yaxis.forEach((e,s)=>{void 0!==e.max&&("number"==typeof e.max?t.maxYArr[s]=e.max:"function"==typeof e.max&&(t.maxYArr[s]=e.max(t.isMultipleYAxis?t.maxYArr[s]:t.maxY)),t.maxY=t.maxYArr[s]),void 0!==e.min&&("number"==typeof e.min?t.minYArr[s]=e.min:"function"==typeof e.min&&(t.minYArr[s]=e.min(t.isMultipleYAxis?t.minYArr[s]===Number.MIN_VALUE?0:t.minYArr[s]:t.minY)),t.minY=t.minYArr[s])}),t.isBarHorizontal){["min","max"].forEach(s=>{void 0!==e.xaxis[s]&&"number"==typeof e.xaxis[s]&&("min"===s?t.minY=e.xaxis[s]:t.maxY=e.xaxis[s])})}return t.isMultipleYAxis?(this.scales.scaleMultipleYAxes(),t.minY=i):(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(s=>{const i=s;switch(i.type||e.chart.type){case"bar":case"column":t.barGroups.push(i.group);break;case"line":t.lineGroups.push(i.group);break;case"area":t.areaGroups.push(i.group)}}),t.barGroups=t.barGroups.filter((t,e,s)=>s.indexOf(t)===e),t.lineGroups=t.lineGroups.filter((t,e,s)=>s.indexOf(t)===e),t.areaGroups=t.areaGroups.filter((t,e,s)=>s.indexOf(t)===e),{minY:t.minY,maxY:t.maxY,minYArr:t.minYArr,maxYArr:t.maxYArr,yAxisScale:t.yAxisScale}}setXRange(){const t=this.w.globals,e=this.w.config,s="numeric"===e.xaxis.type||"datetime"===e.xaxis.type||"category"===e.xaxis.type&&!this.w.axisFlags.noLabelsProvided||this.w.axisFlags.noLabelsProvided||this.w.axisFlags.isXNumeric,i=()=>{for(let e=0;e<this.w.seriesData.series.length;e++)if(this.w.labelData.labels[e])for(let s=0;s<this.w.labelData.labels[e].length;s++)null!==this.w.labelData.labels[e][s]&&b.isNumber(this.w.labelData.labels[e][s])&&(t.maxX=Math.max(t.maxX,this.w.labelData.labels[e][s]),t.initialMaxX=Math.max(t.maxX,this.w.labelData.labels[e][s]),t.minX=Math.min(t.minX,this.w.labelData.labels[e][s]),t.initialMinX=Math.min(t.minX,this.w.labelData.labels[e][s]))};if(this.w.axisFlags.isXNumeric&&i(),this.w.axisFlags.noLabelsProvided&&0===e.xaxis.categories.length&&(t.maxX=this.w.labelData.labels[this.w.labelData.labels.length-1],t.initialMaxX=this.w.labelData.labels[this.w.labelData.labels.length-1],t.minX=1,t.initialMinX=1),this.w.axisFlags.isXNumeric||this.w.axisFlags.noLabelsProvided||this.w.axisFlags.dataFormatXNumeric){let i=10;if(void 0===e.xaxis.tickAmount)i=Math.round(t.svgWidth/150),"numeric"===e.xaxis.type&&t.dataPoints<30&&(i=t.dataPoints-1),i>t.dataPoints&&0!==t.dataPoints&&(i=t.dataPoints-1);else if("dataPoints"===e.xaxis.tickAmount){if(this.w.seriesData.series.length>1&&(i=this.w.seriesData.series[t.maxValsInArrayIndex].length-1),this.w.axisFlags.isXNumeric){const e=Math.round(t.maxX-t.minX);e<30&&(i=e)}}else i=e.xaxis.tickAmount;if(t.xTickAmount=i,void 0!==e.xaxis.max&&"number"==typeof e.xaxis.max&&(t.maxX=e.xaxis.max),void 0!==e.xaxis.min&&"number"==typeof e.xaxis.min&&(t.minX=e.xaxis.min),void 0!==e.xaxis.range&&(t.minX=t.maxX-e.xaxis.range),t.minX!==Number.MAX_VALUE&&t.maxX!==-Number.MAX_VALUE)if(e.xaxis.convertedCatToNumeric&&!this.w.axisFlags.dataFormatXNumeric){const e=[];for(let s=t.minX-1;s<t.maxX;s++)e.push(s+1);t.xAxisScale={result:e,niceMin:e[0],niceMax:e[e.length-1]}}else t.xAxisScale=this.scales.setXScale(t.minX,t.maxX);else t.xAxisScale=this.scales.linearScale(0,i,i,0,e.xaxis.stepSize),this.w.axisFlags.noLabelsProvided&&this.w.labelData.labels.length>0&&(t.xAxisScale=this.scales.linearScale(1,this.w.labelData.labels.length,i-1,0,e.xaxis.stepSize),this.w.seriesData.seriesX=this.w.labelData.labels.slice());s&&(this.w.labelData.labels=t.xAxisScale.result.slice())}return t.isBarHorizontal&&this.w.labelData.labels.length&&(t.xTickAmount=this.w.labelData.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:t.minX,maxX:t.maxX}}setZRange(){const t=this.w.globals;if(this.w.axisFlags.isDataXYZ)for(let e=0;e<this.w.seriesData.series.length;e++)if(void 0!==this.w.seriesData.seriesZ[e])for(let s=0;s<this.w.seriesData.seriesZ[e].length;s++)null!==this.w.seriesData.seriesZ[e][s]&&b.isNumber(this.w.seriesData.seriesZ[e][s])&&(t.maxZ=Math.max(t.maxZ,this.w.seriesData.seriesZ[e][s]),t.minZ=Math.min(t.minZ,this.w.seriesData.seriesZ[e][s]))}_handleSingleDataPoint(){const t=this.w.globals,e=this.w.config;if(t.minX===t.maxX){const s=new y(this.w);if("datetime"===e.xaxis.type){const i=s.getDate(t.minX);e.xaxis.labels.datetimeUTC?i.setUTCDate(i.getUTCDate()-2):i.setDate(i.getDate()-2),t.minX=new Date(i).getTime();const a=s.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=>{if(e.length){1===e.length&&e.push(this.w.seriesData.seriesX[t.maxValsInArrayIndex][this.w.seriesData.seriesX[t.maxValsInArrayIndex].length-1]);const s=e.slice();s.sort((t,e)=>t-e),s.forEach((e,i)=>{if(i>0){const a=e-s[i-1];a>0&&(t.minXDiff=Math.min(a,t.minXDiff))}}),1!==t.dataPoints&&t.minXDiff!==Number.MAX_VALUE||(t.minXDiff=.5)}})}_setStackedMinMax(){const t=this.w.globals;if(!this.w.seriesData.series.length)return;let e=this.w.labelData.seriesGroups;e.length||(e=[this.w.seriesData.seriesNames.map(t=>t)]);const s={},i={};e.forEach(e=>{s[e]=[],i[e]=[];this.w.config.series.map((t,s)=>e.indexOf(this.w.seriesData.seriesNames[s])>-1?s:null).filter(t=>null!==t).forEach(a=>{var r,o,n,l;for(let c=0;c<this.w.seriesData.series[t.maxValsInArrayIndex].length;c++){void 0===s[e][c]&&(s[e][c]=0,i[e][c]=0);(this.w.config.chart.stacked&&!t.comboCharts||this.w.config.chart.stacked&&t.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null==(o=null==(r=this.w.config.series)?void 0:r[a])?void 0:o.type)||"column"===(null==(l=null==(n=this.w.config.series)?void 0:n[a])?void 0:l.type)))&&null!==this.w.seriesData.series[a][c]&&b.isNumber(this.w.seriesData.series[a][c])&&(this.w.seriesData.series[a][c]>0?s[e][c]+=parseFloat(String(this.w.seriesData.series[a][c]))+1e-4:i[e][c]+=parseFloat(String(this.w.seriesData.series[a][c])))}})}),Object.entries(s).forEach(([e])=>{s[e].forEach((a,r)=>{t.maxY=Math.max(t.maxY,s[e][r]),t.minY=Math.min(t.minY,i[e][r])})})}}function Tt(){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 Lt{constructor(t,{theme:e=null,timeScale:s=null}={},i){this.w=t,this.elgrid=i,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.isCategoryBarHorizontal="bar"===t.config.chart.type&&t.config.plotOptions.bar.horizontal,this.xAxisoffX="bottom"===t.config.xaxis.position?t.layout.gridHeight:0,this.drawnLabels=[],this.axesUtils=new Ct(t,{theme:e,timeScale:s})}drawYaxis(t){const e=this.w,s=new ut(this.w),i=e.config.yaxis[t].labels.style,{fontSize:a,fontFamily:r,fontWeight:o}=i,n=s.group({class:"apexcharts-yaxis",rel:t,transform:`translate(${e.globals.translateYAxisX[t]}, 0)`});if(this.axesUtils.isYAxisHidden(t))return n;const l=s.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());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 u=c;u>=0;u--){const c=d(p[u],u,e);let x=e.config.yaxis[t].labels.padding;e.config.yaxis[t].opposite&&0!==e.config.yaxis.length&&(x*=-1);const f=this.getTextAnchor(e.config.yaxis[t].labels.align,e.config.yaxis[t].opposite),m=this.axesUtils.getYAxisForeColor(i.colors,t),b=Array.isArray(m)?m[u]:m,y=Array.from(e.dom.baseEl.querySelectorAll(`.apexcharts-yaxis[rel='${t}'] .apexcharts-yaxis-label tspan`)).map(t=>t.textContent),w=s.drawText({x:x,y:n,text:y.includes(c)&&!e.config.yaxis[t].labels.showDuplicates?"":c,textAnchor:f,fontSize:a,fontFamily:r,fontWeight:o,maxWidth:e.config.yaxis[t].labels.maxWidth,foreColor:b,isPlainText:!1,cssClass:`apexcharts-yaxis-label ${i.cssClass}`});l.add(w),this.addTooltip(w,c),null===g&&(g=w),0!==e.config.yaxis[t].labels.rotate&&this.rotateLabel(s,w,g,e.config.yaxis[t].labels.rotate),n+=h}}return this.addYAxisTitle(s,n,t),this.addAxisBorder(s,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 s=m.createElementNS(P,"title");s.textContent=Array.isArray(e)?e.join(" "):e,t.node.appendChild(s)}rotateLabel(t,e,s,i){const a=t.rotateAroundCenter(s.node),r=t.rotateAroundCenter(e.node);e.node.setAttribute("transform",`rotate(${i} ${a.x} ${r.y})`)}addYAxisTitle(t,e,s){const i=this.w;if(void 0!==i.config.yaxis[s].title.text){const a=t.group({class:"apexcharts-yaxis-title"}),r=i.config.yaxis[s].opposite?i.globals.translateYAxisX[s]:0,o=t.drawText({x:r,y:i.layout.gridHeight/2+i.layout.translateY+i.config.yaxis[s].title.offsetY,text:i.config.yaxis[s].title.text,textAnchor:"end",foreColor:i.config.yaxis[s].title.style.color,fontSize:i.config.yaxis[s].title.style.fontSize,fontWeight:i.config.yaxis[s].title.style.fontWeight,fontFamily:i.config.yaxis[s].title.style.fontFamily,cssClass:`apexcharts-yaxis-title-text ${i.config.yaxis[s].title.style.cssClass}`});a.add(o),e.add(a)}}addAxisBorder(t,e,s,i,a){const r=this.w,o=r.config.yaxis[s].axisBorder;let n=31+o.offsetX;if(r.config.yaxis[s].opposite&&(n=-31-o.offsetX),o.show){const s=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(s)}r.config.yaxis[s].axisTicks.show&&this.axesUtils.drawYAxisTicks(n,i,o,r.config.yaxis[s].axisTicks,s,a,e)}drawYaxisInversed(t){const e=this.w,s=new ut(this.w),i=s.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),a=s.group({class:"apexcharts-xaxis-texts-g",transform:`translate(${e.layout.translateXAxisX}, ${e.layout.translateXAxisY})`});i.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&&(this.xaxisLabels=h.slice(),c=h.slice(),r=c.length),e.config.xaxis.labels.show)for(let i=h.length?0:r;h.length?i<h.length:i>=0;h.length?i++:i--){let r=null==l?void 0:l(c[i],i,e),d=e.layout.gridWidth+e.globals.padHorizontal-(n-o+e.config.xaxis.labels.offsetX);if(h.length){const t=this.axesUtils.getLabel(c,h,d,i,this.drawnLabels,this.xaxisFontSize);d=t.x,r=t.text,this.drawnLabels.push(t.text),0===i&&e.globals.skipFirstTimelinelabel&&(r=""),i===c.length-1&&e.globals.skipLastTimelinelabel&&(r="")}const p=s.drawText({x:d,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:r,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(p),this.addTooltip(p,r),n+=o}return this.inversedYAxisTitleText(i),this.inversedYAxisBorder(i),i}inversedYAxisBorder(t){const e=this.w,s=new ut(this.w),i=e.config.xaxis.axisBorder;if(i.show){let a=0;"bar"===e.config.chart.type&&e.axisFlags.isXNumeric&&(a-=15);const r=s.drawLine(e.globals.padHorizontal+a+i.offsetX,this.xAxisoffX,e.layout.gridWidth,this.xAxisoffX,i.color,0,i.height);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(r):t.add(r)}}inversedYAxisTitleText(t){const e=this.w,s=new ut(this.w);if(void 0!==e.config.xaxis.title.text){const i=s.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),a=s.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}`});i.add(a),t.add(i)}}yAxisTitleRotate(t,e){const s=this.w,i=new ut(this.w),a=s.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${t}'] .apexcharts-yaxis-texts-g`),r=a?a.getBoundingClientRect():{width:0,height:0},o=s.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=i.rotateAroundCenter(o);o.setAttribute("transform",`rotate(${e?-1*s.config.yaxis[t].title.rotate:s.config.yaxis[t].title.rotate} ${l.x} ${l.y})`)}}xPaddingForYAxisTitle(t,e,s,i){const a=this.w;let r=0,o=10;return void 0===a.config.yaxis[t].title.text||t<0?{xPos:r,padd:0}:(i?r=e.width+a.config.yaxis[t].title.offsetX+s.width/2+o/2:(r=-1*e.width+a.config.yaxis[t].title.offsetX+o/2+s.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 s=this.w;let i=0,a=0,r=18,o=1;s.config.yaxis.length>1&&(this.multipleYs=!0),s.config.yaxis.forEach((n,l)=>{const c=s.globals.ignoreYAxisIndexes.includes(l)||!n.show||n.floating||0===t[l].width,h=t[l].width+e[l].width;n.opposite?s.globals.isBarHorizontal?(a=s.layout.gridWidth+s.layout.translateX-1,s.globals.translateYAxisX[l]=a-n.labels.offsetX):(a=s.layout.gridWidth+s.layout.translateX+o,c||(o+=h+20),s.globals.translateYAxisX[l]=a-n.labels.offsetX+20):(i=s.layout.translateX-r,c||(r+=h+20),s.globals.translateYAxisX[l]=i+n.labels.offsetX)})}setYAxisTextAlignments(){const t=this.w;Array.from(t.dom.baseEl.getElementsByClassName("apexcharts-yaxis")).forEach((e,s)=>{const i=t.config.yaxis[s];if(i&&!i.floating&&void 0!==i.labels.align){const e=t.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${s}'] .apexcharts-yaxis-texts-g`),a=Array.from(t.dom.baseEl.querySelectorAll(`.apexcharts-yaxis[rel='${s}'] .apexcharts-yaxis-label`)),r=e.getBoundingClientRect();a.forEach(t=>{t.setAttribute("text-anchor",i.labels.align)}),"left"!==i.labels.align||i.opposite?"center"===i.labels.align?e.setAttribute("transform",`translate(${r.width/2*(i.opposite?1:-1)}, 0)`):"right"===i.labels.align&&i.opposite&&e.setAttribute("transform",`translate(${r.width}, 0)`):e.setAttribute("transform",`translate(-${r.width}, 0)`)}})}}class Ft{constructor(t,e){this.w=t,this.ctx=e,this.documentEvent=this.documentEvent.bind(this)}addEventListener(t,e){const s=this.w;Object.prototype.hasOwnProperty.call(s.globals.events,t)?s.globals.events[t].push(e):s.globals.events[t]=[e]}removeEventListener(t,e){const s=this.w;if(!Object.prototype.hasOwnProperty.call(s.globals.events,t))return;const i=s.globals.events[t].indexOf(e);-1!==i&&s.globals.events[t].splice(i,1)}fireEvent(t,e){const s=this.w;if(!Object.prototype.hasOwnProperty.call(s.globals.events,t))return;e&&e.length||(e=[]);const i=s.globals.events[t],a=i.length;for(let t=0;t<a;t++)i[t].apply(null,e)}setupEventHandlers(){const t=this.w,e=this.ctx,s=t.dom.baseEl.querySelector(t.globals.chartClass);this.ctx.eventList.forEach(i=>{null==s||s.addEventListener(i,s=>{const i=null===s.target.getAttribute("i")&&-1!==t.interact.capturedSeriesIndex?t.interact.capturedSeriesIndex:s.target.getAttribute("i"),a=null===s.target.getAttribute("j")&&-1!==t.interact.capturedDataPointIndex?t.interact.capturedDataPointIndex:s.target.getAttribute("j"),r=Object.assign({},t,{seriesIndex:t.globals.axisCharts?i:0,dataPointIndex:a});"keydown"===s.type?t.config.chart.accessibility.enabled&&t.config.chart.accessibility.keyboard.enabled&&(e.ctx.keyboardNavigation&&e.ctx.keyboardNavigation.handleKey(s),"function"==typeof t.config.chart.events.keyDown&&t.config.chart.events.keyDown(s,e,r),e.ctx.events.fireEvent("keydown",[s,e,r])):"keyup"===s.type?t.config.chart.accessibility.enabled&&t.config.chart.accessibility.keyboard.enabled&&("function"==typeof t.config.chart.events.keyUp&&t.config.chart.events.keyUp(s,e,r),e.ctx.events.fireEvent("keyup",[s,e,r])):"mousemove"===s.type||"touchmove"===s.type?"function"==typeof t.config.chart.events.mouseMove&&t.config.chart.events.mouseMove(s,e,r):"mouseleave"===s.type||"touchleave"===s.type?"function"==typeof t.config.chart.events.mouseLeave&&t.config.chart.events.mouseLeave(s,e,r):("mouseup"===s.type&&1===s.which||"touchend"===s.type)&&("function"==typeof t.config.chart.events.click&&t.config.chart.events.click(s,e,r),e.ctx.events.fireEvent("click",[s,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,s=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"!==s&&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 Et{constructor(t){this.w=t}setCurrentLocaleValues(t){let e=this.w.config.chart.locales;const s=h.getApex();s.chart&&s.chart.locales&&s.chart.locales.length>0&&(e=this.w.config.chart.locales.concat(s.chart.locales));const i=e.filter(e=>e.name===t)[0];if(!i)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");{const t=b.extend(S,i);this.w.globals.locale=t.options}}}class _t{constructor(t,e){this.w=t,this.ctx=e}drawAxis(t,e){const s=this.w.globals,i=this.w.config,a=new St(this.w,this.ctx,e),r=new Lt(this.w,{theme:this.ctx.theme,timeScale:this.ctx.timeScale},e);if(s.axisCharts&&"radar"!==t){let t,e;s.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),i.yaxis.map((t,i)=>{if(-1===s.ignoreYAxisIndexes.indexOf(i)&&(e=r.drawYaxis(i),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))}}))}}}class Pt{constructor(t){this.w=t}drawXCrosshairs(){const t=this.w,e=new ut(this.w),s=new gt(this.w),i=t.config.xaxis.crosshairs.fill.gradient,a=t.config.xaxis.crosshairs.dropShadow,r=t.config.xaxis.crosshairs.fill.type,o=i.colorFrom,n=i.colorTo,l=i.opacityFrom,c=i.opacityTo,h=i.stops,d=a.enabled,p=a.left,g=a.top,u=a.blur,x=a.color,f=a.opacity;let m=t.config.xaxis.crosshairs.fill.color;if(t.config.xaxis.crosshairs.show){"gradient"===r&&(m=e.drawGradient("vertical",o,n,l,c,null,h,[]));let i=e.drawRect();1===t.config.xaxis.crosshairs.width&&(i=e.drawLine(0,0,0,0));let a=t.layout.gridHeight;(!b.isNumber(a)||a<0)&&(a=0);let y=t.config.xaxis.crosshairs.width;(!b.isNumber(y)||Number(y)<0)&&(y=0),i.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:a,width:y,height:a,fill:m,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}),d&&(i=s.dropShadow(i,{left:p,top:g,blur:u,color:x,opacity:f})),t.dom.elGraphical.add(i)}}drawYCrosshairs(){const t=this.w,e=new ut(this.w),s=t.config.yaxis[0].crosshairs,i=t.globals.barPadForNumericAxis;if(t.config.yaxis[0].crosshairs.show){const a=e.drawLine(-i,0,t.layout.gridWidth+i,0,s.stroke.color,s.stroke.dashArray,s.stroke.width);a.attr({class:"apexcharts-ycrosshairs"}),t.dom.elGraphical.add(a)}const a=e.drawLine(-i,0,t.layout.gridWidth+i,0,s.stroke.color,0,0);a.attr({class:"apexcharts-ycrosshairs-hidden"}),t.dom.elGraphical.add(a)}}function Bt(t,e){if(!b.isObject(t)||!b.isObject(e))return void 0!==e?e:t;const s=n({},t);for(const i of Object.keys(e)){const a=e[i];void 0!==a&&(b.isObject(a)&&b.isObject(t[i])?s[i]=Bt(t[i],a):s[i]=a)}return s}class Nt{constructor(t){this.w=t,this._activeBreakpoint=null}checkResponsiveConfig(t){const e=this.w,s=e.config;if(0===s.responsive.length)return;const i=s.responsive.slice();i.sort((t,e)=>t.breakpoint>e.breakpoint?1:e.breakpoint>t.breakpoint?-1:0).reverse();const a=new M({}),r=(t={})=>{var s;const r=i[0].breakpoint,o=h.isBrowser()?window.innerWidth>0?window.innerWidth:screen.width:0;if(o>r){if(null!==this._activeBreakpoint){if(!e.globals.initialConfig)return;const s=b.clone(e.globals.initialConfig);s.series=b.clone(e.config.series);const i=_.extendArrayProps(a,s,e);t=b.extend(i,t),this.overrideResponsiveOptions(t),this._activeBreakpoint=null}}else for(let r=0;r<i.length;r++)if(o<i[r].breakpoint){const o=(null==(s=i[r].options)?void 0:s.yaxis)?b.clone(i[r].options.yaxis):null;if(t=_.extendArrayProps(a,i[r].options,e),t=b.extend(e.config,t),Array.isArray(e.config.yaxis)&&o){const s=Array.isArray(o)?o:[o];t=l(n({},t),{yaxis:e.config.yaxis.map((t,e)=>Bt(t,s[e]))})}this.overrideResponsiveOptions(t),this._activeBreakpoint=i[r].breakpoint}};if(t){let s=_.extendArrayProps(a,t,e);s=b.extend(e.config,s),s=b.extend(s,t),r(s)}else r({})}overrideResponsiveOptions(t){const e=new M(t).init({responsiveOverride:!0});this.w.config=e}}function Xt(t){var e;const s=t.config.chart.animations;if(!s||!1===s.enabled)return!1;if(!s.dynamicAnimation||!1===s.dynamicAnimation.enabled)return!1;const i=null!=(e=s.largeDatasetThreshold)?e:0;return!(i>0&&t.globals.dataPoints>i)&&!!(h.isBrowser()&&t.globals.dataChanged&&t.globals.shouldAnimate)}function It(t){const e=new Map;return t.map(t=>{const s=e.get(t)||0;return e.set(t,s+1),0===s?t:`${t}#${s}`})}function Rt(t,e,s=!1){var i,a;if(!Xt(t))return null;const r=t.globals.prevStreamFrame;if(!r)return null;const o=null==(i=r.seriesY)?void 0:i[e],n=null==(a=t.seriesData.series)?void 0:a[e];if(!Array.isArray(o)||!Array.isArray(n))return null;if(!o.length||!n.length)return null;const l=It(o.map((t,s)=>function(t,e,s){var i,a;if(t.isXNumeric){const a=null==(i=t.seriesX)?void 0:i[e];if(a&&a.length&&null!=a[s])return"x:"+a[s]}const r=null==(a=t.labels)?void 0:a[s];return null!=r&&""!==String(r)?"c:"+(Array.isArray(r)?r.join(" "):String(r)):"j:"+s}(r,e,s))),c=It(n.map((s,i)=>function(t,e,s){var i,a,r,o;if(null==(i=t.axisFlags)?void 0:i.isXNumeric){const i=null==(r=null==(a=t.seriesData)?void 0:a.seriesX)?void 0:r[e];if(i&&i.length&&null!=i[s])return"x:"+i[s]}const n=null==(o=t.globals.labels)?void 0:o[s];return null!=n&&""!==String(n)?"c:"+(Array.isArray(n)?n.join(" "):String(n)):"j:"+s}(t,e,i))),h=function(t,e){const s=new Map;t.forEach((t,e)=>{s.has(t)||s.set(t,e)});const i=new Array(e.length),a=new Set;let r=-1,o=!0,n=t.length===e.length;e.forEach((t,e)=>{const l=s.has(t)&&!a.has(s.get(t))?s.get(t):-1;i[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:i,exits:l,ordered:o,changed:!n}}(l,c);return h.ordered&&(h.changed||s)?{join:h,oldKeys:l,newKeys:c}:null}function zt(t,e,s,i,a){const r=performance.now(),o=n=>{if(t.globals.isDestroyed)return;const l=Math.max(0,Math.min(1,(n-r)/e));i(s(l),l),l<1?m.requestAnimationFrame(o):a&&a()};m.requestAnimationFrame(o)}function Yt(t,e,s){return[...t.querySelectorAll(e)].map(t=>{var e,i,a;return{text:t.textContent||"",display:null!=(a=null!=(i=null==(e=t.querySelector("tspan"))?void 0:e.textContent)?i:t.textContent)?a:"",pos:parseFloat(t.getAttribute(s)||""),transform:t.getAttribute("transform")}})}function Ht(t,e,s){return[...t.querySelectorAll(e)].map(t=>parseFloat(t.getAttribute(s)||""))}const Ot=":not(.apexcharts-tick-ghost)",Wt=`.apexcharts-xaxis-texts-g text:not(.apexcharts-xaxis-group-label)${Ot}`,Gt=`.apexcharts-yaxis-texts-g text${Ot}`,Ut=`.apexcharts-gridlines-vertical line${Ot}`,$t=`.apexcharts-gridlines-horizontal line${Ot}`;function Vt(t){var e,s;const i=t.globals;if(!(null==(e=t.axisFlags)?void 0:e.isXNumeric)||i.isBarHorizontal)return null;if(null==(s=t.config.xaxis)?void 0:s.reversed)return null;const a=i.minX,r=i.maxX,o=t.layout.gridWidth;return isFinite(a)&&isFinite(r)&&r>a&&o>0?{min:a,max:r,width:o}:null}function jt(t,e){var s;const i=t.globals;if(i.isBarHorizontal)return null;if(!Array.isArray(t.config.yaxis)||1!==t.config.yaxis.length)return null;if(null==(s=t.config.yaxis[0])?void 0:s.logarithmic)return null;const a=i.minY,r=i.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 qt(t,e){if(!t||!e)return null;const s=t.pHi-t.pLo,i=e.pHi-e.pLo,a=t.max-t.min,r=e.max-e.min;if(!(s&&i&&a>0&&r>0))return null;return{toNew:o=>e.pLo+((e=>t.min+(e-t.pLo)/s*a)(o)-e.min)/r*i,toOld:o=>t.pLo+((t=>e.min+(t-e.pLo)/i*r)(o)-t.min)/a*s}}function Zt(t,e,s,i){const a=e.style;a.opacity="0",zt(t,s,i,t=>{a.opacity=String(t)},()=>{a.opacity=""})}function Kt(t,e,s,i,a,r,o){s.forEach(t=>e.setAttribute(t,String(i))),zt(t,r,o,t=>{const r=String(i+(a-i)*t);s.forEach(t=>e.setAttribute(t,r))},()=>{s.forEach(t=>e.setAttribute(t,String(a)))})}function Jt(t,{template:e,display:s,attrs:i,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"),void 0!==s){const t=c.querySelector("tspan");t?t.textContent=s:c.textContent=s;const e=c.querySelector("title");e&&(e.textContent=s)}i.forEach(t=>c.setAttribute(t,String(a)));const h=c.style;h.opacity="1",l.appendChild(c),zt(t,o,n,t=>{const e=String(a+(r-a)*t);i.forEach(t=>c.setAttribute(t,e)),h.opacity=String(1-t)},()=>{c.parentNode&&c.parentNode.removeChild(c)})}function Qt(t,{newLabels:e,oldLabels:s,posAttr:i,newLines:a,oldLines:r,lineAttrs:o,duration:c,ease:h,project:d}){const p=new Map;s.forEach((t,e)=>{p.has(t.text)||p.set(t.text,l(n({},t),{i:e}))});const g=new Set,u=a.length===e.length,x=r.length===s.length,f=s.map(t=>t.pos).concat(e.map(t=>parseFloat(t.getAttribute(i)||""))).filter(t=>isFinite(t)),m=Math.min(...f),b=Math.max(...f),y=Math.max(40,.25*(b-m)),w=t=>Math.max(m-y,Math.min(b+y,t));if(e.forEach((e,s)=>{const n=parseFloat(e.getAttribute(i)||""),l=p.get(e.textContent||""),x=u?a[s]:null;if(l&&g.add(l.i),l&&isFinite(l.pos)&&!l.transform&&!e.getAttribute("transform")){if(isFinite(n)&&!(Math.abs(l.pos-n)<.5)&&(Kt(t,e,[i],l.pos,n,c,h),x)){const e=parseFloat(x.getAttribute(o[0])||""),s=r[l.i];isFinite(e)&&isFinite(s)&&Kt(t,x,o,s,e,c,h)}}else if(!l){if(d&&isFinite(n)&&!e.getAttribute("transform")){const s=isFinite(d.toOld(n))?w(d.toOld(n)):NaN;isFinite(s)&&Math.abs(s-n)>.5&&(Kt(t,e,[i],s,n,c,h),x&&Kt(t,x,o,s,n,c,h))}Zt(t,e,c,h),x&&Zt(t,x,c,h)}}),!d||!e.length)return;let v=0;s.forEach((s,n)=>{if(g.has(n))return;if(!isFinite(s.pos)||s.transform)return;if(v>=20)return;const l=d.toNew(s.pos);!isFinite(l)||Math.abs(l-s.pos)<.5||(v++,Jt(t,{template:e[0],display:s.display,attrs:[i],from:s.pos,to:w(l),duration:c,ease:h}),x&&a.length&&isFinite(r[n])&&Jt(t,{template:a[0],attrs:o,from:r[n],to:w(d.toNew(r[n])),duration:c,ease:h}))})}function te(t){const e=t.globals,s=e.prevChromeFrame;if(e.prevChromeFrame=null,!s||!e.axisCharts||!h.isBrowser())return;if(!Xt(t))return;if(!(t.seriesData.series||[]).some((e,s)=>null!==Rt(t,s,!0)))return;const i=t.dom.baseEl;if(!b.elementExists(i))return;const a=Math.max(1,t.config.chart.animations.dynamicAnimation.speed||1),r=function(t){var e,s;const i=t.config.chart.animations;return at(null!=(s=null==(e=i.dynamicAnimation)?void 0:e.easing)?s:i.easing)}(t);try{const e=[...i.querySelectorAll(Gt)],o=function(t,e){if(!t||!e)return null;const s=t.max-t.min,i=e.max-e.min;return s>0&&i>0&&t.width>0&&e.width>0?{toNew:a=>(t.min+a/t.width*s-e.min)/i*e.width,toOld:a=>(e.min+a/e.width*i-t.min)/s*t.width}:null}(s.xScale,Vt(t)),n=qt(s.yAnchors,jt(t,e.map(t=>({pos:parseFloat(t.getAttribute("y")||"")}))));Qt(t,{newLabels:[...i.querySelectorAll(Wt)],oldLabels:s.xLabels,posAttr:"x",newLines:[...i.querySelectorAll(Ut)],oldLines:s.vGrid,lineAttrs:["x1","x2"],duration:a,ease:r,project:o}),Qt(t,{newLabels:e,oldLabels:s.yLabels,posAttr:"y",newLines:[...i.querySelectorAll($t)],oldLines:s.hGrid,lineAttrs:["y1","y2"],duration:a,ease:r,project:n})}catch(t){}}class ee{constructor(t,{toggleDataSeries:e,revertDefaultAxisMinMax:s,updateSeries:i}={}){this.w=t,this._toggleDataSeries=e||null,this._revertDefaultAxisMinMax=s||null,this._updateSeries=i||null,this.legendInactiveClass="legend-mouseover-inactive"}clearSeriesCache(){const t=this.w;t.globals.cachedSelectors&&(delete t.globals.cachedSelectors.allSeriesEls,delete t.globals.cachedSelectors.highlightSeriesEls)}getAllSeriesEls(){const t=this.w,e="allSeriesEls";return t.globals.cachedSelectors[e]||(t.globals.cachedSelectors[e]=t.dom.baseEl.getElementsByClassName("apexcharts-series")),t.globals.cachedSelectors[e]}getSeriesByName(t){return this.w.dom.baseEl.querySelector(`.apexcharts-inner .apexcharts-series[seriesName='${b.escapeString(t)}']`)}isSeriesHidden(t){var e;const s=this.getSeriesByName(t),i=parseInt(null!=(e=s.getAttribute("data:realIndex"))?e:"0",10);return{isHidden:s.classList.contains("apexcharts-series-collapsed"),realIndex:i}}addCollapsedClassToSeries(t,e){ee.addCollapsedClassToSeries(this.w,t,e)}static addCollapsedClassToSeries(t,e,s){function i(t){for(let i=0;i<t.length;i++)t[i].index===s&&e.node.classList.add("apexcharts-series-collapsed")}i(t.globals.collapsedSeries),i(t.globals.ancillaryCollapsedSeries)}toggleSeries(t){var e;const s=this.isSeriesHidden(t);return null==(e=this._toggleDataSeries)||e.call(this,s.realIndex,s.isHidden),s.isHidden}showSeries(t){var e;const s=this.isSeriesHidden(t);s.isHidden&&(null==(e=this._toggleDataSeries)||e.call(this,s.realIndex,!0))}hideSeries(t){var e;const s=this.isSeriesHidden(t);s.isHidden||null==(e=this._toggleDataSeries)||e.call(this,s.realIndex,!1)}resetSeries(t=!0,e=!0,s=!0){var i,a;const r=this.w;this.clearSeriesCache();let o=b.clone(r.globals.initialSeries);r.globals.previousPaths=[],s?(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==(i=this._revertDefaultAxisMinMax)||i.call(this)),null==(a=this._updateSeries)||a.call(this,o,r.config.chart.animations.dynamicAnimation.enabled))}emptyCollapsedSeries(t){const e=this.w;for(let s=0;s<t.length;s++)e.globals.collapsedSeriesIndices.indexOf(s)>-1&&(t[s].data=[]);return t}canvasRestyle(t){const e=this.w.globals.activeRenderer;e&&"canvas"===e.kind&&"function"==typeof e.restyle&&e.restyle(t)}highlightSeries(t){var e;const s=this.w,i=this.getSeriesByName(t),a=parseInt(null!=(e=null==i?void 0:i.getAttribute("data:realIndex"))?e:"",10),r="highlightSeriesEls";let o=s.globals.cachedSelectors[r];o||(o=s.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis"),s.globals.cachedSelectors[r]=o);let n=null,l=null,c=null;if(s.globals.axisCharts||"radialBar"===s.config.chart.type)if(s.globals.axisCharts){n=s.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${a}']`),l=s.dom.baseEl.querySelector(`.apexcharts-datalabels[data\\:realIndex='${a}']`);const t=s.globals.seriesYAxisReverseMap[a];c=s.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${t}']`)}else n=s.dom.baseEl.querySelector(`.apexcharts-series[rel='${a+1}']`);else n=s.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(!s.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 s=this.w;e||(e=t.target);const i=s.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis");if("mousemove"===t.type){const t=parseInt(e.getAttribute("rel"),10)-1;this.highlightSeries(s.seriesData.seriesNames[t])}else if("mouseout"===t.type){for(let t=0;t<i.length;t++)i[t].classList.remove(this.legendInactiveClass);this.canvasRestyle(null)}}highlightRangeInSeries(t,e){const s=this.w,i=s.dom.baseEl.getElementsByClassName("apexcharts-heatmap-rect"),a=t=>{for(let e=0;e<i.length;e++){const s=i[e].classList;"function"==typeof s[t]&&s[t](this.legendInactiveClass)}};if("reset"===e)return void a("remove");const r=s.config.plotOptions.heatmap.colorScale.ranges,o=r&&r[t];if(o){a("add");for(let t=0;t<i.length;t++){const e=Number(i[t].getAttribute("val"));e>=o.from&&e<=o.to&&i[t].classList.remove(this.legendInactiveClass)}}}getActiveConfigSeriesIndex(t="asc",e=[]){const s=this.w;let i=0;if(s.config.series.length>1){const a=s.config.series.map((t,i)=>t.data&&t.data.length>0&&-1===s.globals.collapsedSeriesIndices.indexOf(i)&&(!s.globals.comboCharts||0===e.length||e.length&&e.indexOf(s.config.series[i].type)>-1)?i:-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]){i=a[e];break}}return i}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(){var t,e,s,i;const a=this.w;if(function(t){var e,s,i;const a=t.globals;if(!a.axisCharts||!t.seriesData||!Array.isArray(t.seriesData.series)||0===t.seriesData.series.length)return void(a.prevStreamFrame=null);const r=[];(null==(s=null==(e=t.dom)?void 0:e.baseEl)?void 0:s.querySelectorAll)&&t.dom.baseEl.querySelectorAll(".apexcharts-marker").forEach(t=>{var e,s,i,a,o;const n=parseInt(null!=(e=t.getAttribute("index"))?e:"",10),l=parseInt(null!=(i=null!=(s=t.getAttribute("j"))?s:t.getAttribute("rel"))?i:"",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==(i=t.axisFlags)?void 0:i.isXNumeric)}}(a),function(t){const e=t.globals;if(e.prevChromeFrame=null,!e.axisCharts||!h.isBrowser())return;const s=t.dom.baseEl;if(b.elementExists(s))try{const i=Yt(s,Gt,"y");e.prevChromeFrame={xLabels:Yt(s,Wt,"x"),yLabels:i,vGrid:Ht(s,Ut,"x1"),hGrid:Ht(s,$t,"y1"),xScale:Vt(t),yAnchors:jt(t,i)}}catch(t){e.prevChromeFrame=null}}(a),!a.globals.axisCharts)return void(a.globals.previousPaths=a.seriesData.series);if(!b.elementExists(a.dom.baseEl))return void(a.globals.previousPaths=[]);function r(t,e,s){const i=t[e].childNodes,r={type:s,paths:[],realIndex:t[e].getAttribute("data:realIndex")};for(let t=0;t<i.length;t++)if(i[t].hasAttribute("pathTo")){const e=i[t].getAttribute("pathTo");r.paths.push({d:e,key:i[t].getAttribute("data:pathKey"),fill:i[t].getAttribute("fill")})}a.globals.previousPaths.push(r)}a.globals.previousPaths=[];["line","area","bar","rangebar","rangeArea","candlestick","radar"].forEach(t=>{const e=(s=t,a.dom.baseEl.querySelectorAll(`.apexcharts-${s}-series .apexcharts-series`));var s;for(let s=0;s<e.length;s++)r(e,s,t)});const o=a.dom.baseEl.querySelectorAll(`.apexcharts-${a.config.chart.type} .apexcharts-series`);if(o.length>0)for(let r=0;r<o.length;r++){const o=a.dom.baseEl.querySelectorAll(`.apexcharts-${a.config.chart.type} .apexcharts-series[data\\:realIndex='${r}'] rect`),n=[];for(let a=0;a<o.length;a++){const r=t=>o[a].getAttribute(t),l={x:parseFloat(null!=(t=r("x"))?t:"0"),y:parseFloat(null!=(e=r("y"))?e:"0"),width:parseFloat(null!=(s=r("width"))?s:"0"),height:parseFloat(null!=(i=r("height"))?i:"0")};n.push({rect:l,color:o[a].getAttribute("color")})}a.globals.previousPaths.push(n)}}clearPreviousPaths(){const t=this.w;t.globals.previousPaths=[],t.globals.allSeriesCollapsed=!1}handleNoData(){const t=this.w,e=t.config.noData,s=new ut(this.w);let i=t.globals.svgWidth/2,a=t.globals.svgHeight/2,r="middle";if(t.globals.noData=!0,t.globals.animationEnded=!0,"left"===e.align?(i=10,r="start"):"right"===e.align&&(i=t.globals.svgWidth-10,r="end"),"top"===e.verticalAlign?a=50:"bottom"===e.verticalAlign&&(a=t.globals.svgHeight-50),i+=e.offsetX,a=a+parseInt(e.style.fontSize,10)+2+e.offsetY,void 0!==e.text&&""!==e.text){const o=s.drawText({x:i,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 s=0;s<t.length;s++)if(0===t[s].length)for(let i=0;i<t[e.globals.maxValsInArrayIndex].length;i++)t[s].push(0);return t}hasAllSeriesEqualX(){let t=!0;const e=this.w,s=this.filteredSeriesX();for(let e=0;e<s.length-1;e++)if(s[e][0]!==s[e+1][0]){t=!1;break}return e.globals.allSeriesHasEqualX=t,t}filteredSeriesX(){return this.w.seriesData.seriesX.map(t=>t.length>0?t:[])}}const se={accent:"--apx-accent",fore:"--apx-fore",grid:"--apx-grid",surface:"--apx-surface"};const ie="__apexcharts_themes__";function ae(){return globalThis[ie]}globalThis[ie]||(globalThis[ie]={});const re="#373d3f",oe="#f6f7f8",ne="#e0e0e0";class le{constructor(t){this.w=t,this.colors=[],this.isColorFn=!1,this.isHeatmapDistributed=this.checkHeatmapDistributed(),this.isBarDistributed=this.checkBarDistributed(),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,s=new b;var i;this._namedTheme=(i=e.config.theme.name)&&ae()[i]||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,s));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(){const t=this.w,e=t.config.theme.mode;"dark"===e?(t.config.chart.foreColor===re&&(t.config.chart.foreColor=oe),"palette1"===t.config.theme.palette&&(t.config.theme.palette="palette4"),t.config.tooltip&&"light"!==t.config.tooltip.theme&&(t.config.tooltip.theme="dark")):"light"===e&&(t.config.chart.foreColor===oe&&(t.config.chart.foreColor=re),"palette4"===t.config.theme.palette&&(t.config.theme.palette="palette1"))}_applyNamedThemeMode(){const t=this._namedTheme;if(!t)return;const e=this.w.config.theme;t.mode&&!e.mode&&(e.mode=t.mode),!t.accessibility||!t.accessibility.colorBlindMode||e.accessibility&&e.accessibility.colorBlindMode||(e.accessibility=e.accessibility||{},e.accessibility.colorBlindMode=t.accessibility.colorBlindMode),t.monochrome&&t.monochrome.enabled&&!e.monochrome.enabled&&(e.monochrome=n(n({},e.monochrome),t.monochrome))}_resolveTokens(){const t=this._namedTheme&&this._namedTheme.tokens||{},e=this._shouldUseTokens()?function(t){if(!h.isBrowser())return{};const e=t.dom&&(t.dom.elWrap||t.dom.baseEl)||null;if(!e)return{};const s=m.getComputedStyle(e);if(!s||"function"!=typeof s.getPropertyValue)return{};const i=t=>{const e=s.getPropertyValue(t);return e?String(e).trim():""},a={};for(const t in se){const e=i(se[t]);e&&(a[t]=e)}const r=[];for(let t=1;t<=24;t++){const e=i(`--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;if(!t.fore||e.config.chart.foreColor!==re&&e.config.chart.foreColor!==oe||(e.config.chart.foreColor=t.fore),t.grid){e.config.grid.borderColor===ne&&(e.config.grid.borderColor=t.grid);const s=e=>{e&&(e.axisBorder&&e.axisBorder.color===ne&&(e.axisBorder.color=t.grid),e.axisTicks&&e.axisTicks.color===ne&&(e.axisTicks.color=t.grid))};s(e.config.xaxis),Array.isArray(e.config.yaxis)?e.config.yaxis.forEach(s):s(e.config.yaxis)}if(t.surface&&!e.config.chart.background){e.config.chart.background=t.surface;const s=e.dom.Paper&&e.dom.Paper.node;s&&s.style&&(s.style.background=t.surface)}}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((s,i)=>{const a=t[i]||t[0];return"function"==typeof a?a({value:e.globals.axisCharts?e.seriesData.series[i][0]||0:e.seriesData.series[i],seriesIndex:i,dataPointIndex:i,w:this.w}):a})):t:this.predefined()}applySeriesColors(t,e){t.forEach((t,s)=>{t&&(e[s]=t)})}getMonochromeColors(t,e,s){const{color:i,shadeIntensity:a,shadeTo:r}=t,o=this.isBarDistributed||this.isHeatmapDistributed?e[0].length*e.length:e.length,n=1/(o/a);let l=0;return Array.from({length:o},()=>{const t="dark"===r?s.shadeColor(-1*l,i):s.shadeColor(l,i);return l+=n,t})}applyColorTypes(t,e){const s=this.w;t.forEach(t=>{s.globals[t].colors=void 0===s.config[t].colors?this.isColorFn?s.config.colors:e:s.config[t].colors.slice(),this.pushExtraColors(s.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,s=null){const i=this.w;let a=e||i.seriesData.series.length;if(null===s&&(s=this.isBarDistributed||this.isHeatmapDistributed||"heatmap"===i.config.chart.type&&i.config.plotOptions.heatmap&&i.config.plotOptions.heatmap.colorScale.inverse),s&&i.seriesData.series.length&&(a=i.seriesData.series[i.globals.maxValsInArrayIndex].length*i.seriesData.series.length),t.length<a){const e=a-t.length;for(let s=0;s<e;s++)t.push(t[s])}}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){t.chart=t.chart||{},t.tooltip=t.tooltip||{};const e=t.theme.mode,s="dark"===e?"palette4":"light"===e?"palette1":t.theme.palette||"palette1",i="dark"===e?"#f6f7f8":"light"===e?"#373d3f":t.chart.foreColor||"#373d3f";return t.tooltip.theme=e||"light",t.chart.foreColor=i,t.theme.palette=s,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,s=this._tokens||{};if(Array.isArray(s.series)&&s.series.length)return s.series.slice();if(s.accent)return[s.accent,...e];const i=this._namedTheme;return i&&Array.isArray(i.palette)&&i.palette.length?i.palette.slice():e}}class ce{constructor(t){this.w=t}draw(){this.drawTitleSubtitle("title"),this.drawTitleSubtitle("subtitle")}drawTitleSubtitle(t){const e=this.w,s="title"===t?e.config.title:e.config.subtitle;let i=e.globals.svgWidth/2,a=s.offsetY,r="middle";if("left"===s.align?(i=10,r="start"):"right"===s.align&&(i=e.globals.svgWidth-10,r="end"),i+=s.offsetX,a=a+parseInt(s.style.fontSize,10)+s.margin/2,void 0!==s.text){const o=new ut(this.w).drawText({x:i,y:a,text:s.text,textAnchor:r,fontSize:s.style.fontSize,fontFamily:s.style.fontFamily,fontWeight:s.style.fontWeight,foreColor:s.style.color,opacity:1});o.node.setAttribute("class",`apexcharts-${t}-text`),e.dom.Paper.add(o)}}}class he{constructor(t){this.w=t.w,this.dCtx=t}getTitleSubtitleCoords(t){const e=this.w;let s=0,i=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();s=t.width,i=e.globals.axisCharts?t.height+5:t.height}return{width:s,height:i}}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 s=Object.assign({},b.getBoundingClientRect(e));return null!==e&&!t.config.legend.floating&&t.config.legend.show?this.dCtx.lgRect={x:s.x,y:s.y,height:s.height,width:0===s.height?0:s.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((s,i)=>{s.data.forEach((s,a)=>{const r=(o=t.seriesData.series[i][a],t.config.dataLabels.formatter(o,{seriesIndex:i,dataPointIndex:a,w:t}));var o;e.push(r)})});const s=b.getLargestStringFromArr(e),i=new ut(this.w),a=t.config.dataLabels.style,r=i.getTextRects(s,parseInt(a.fontSize).toString(),a.fontFamily);return{width:1.05*r.width,height:r.height}}getLargestStringFromMultiArr(t,e){let s=t;if(this.w.axisFlags.isMultiLineX){const t=e.map(t=>Array.isArray(t)?t.length:1),i=Math.max(...t);s=e[t.indexOf(i)]}return s}}class de{constructor(t){this.w=t.w,this.dCtx=t}getxAxisLabelsCoords(){const t=this.w;let e,s=t.labelData.labels.slice();if(t.config.xaxis.convertedCatToNumeric&&0===s.length&&(s=t.labelData.categoryLabels),t.labelData.timescaleLabels.length>0){const s=this.getxAxisTimeScaleLabelsCoords();e={width:s.width,height:s.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 i=t.formatters.xLabelFormatter;let a=b.getLargestStringFromArr(s),r=this.dCtx.dimHelpers.getLargestStringFromMultiArr(a,s);t.globals.isBarHorizontal&&(a=t.globals.yAxisScale[0].result.reduce((t,e)=>t.length>e.length?t:e,0),r=a);const o=new w(this.w),n=a;a=o.xLabelFormat(i,a,n,{i:void 0,dateFormatter:new y(this.w).formatDate,w:t}),r=o.xLabelFormat(i,r,n,{i:void 0,dateFormatter:new y(this.w).formatDate,w:t}),(t.config.xaxis.convertedCatToNumeric&&void 0===a||""===String(a).trim())&&(a="1",r=a);const l=new ut(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*s.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 s=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=s(a),a!==r&&(h=s(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 s=(null==(t=e.config.xaxis.group.style)?void 0:t.fontSize)||e.config.xaxis.labels.style.fontSize,i=e.labelData.groups.map(t=>t.title);let a;const r=b.getLargestStringFromArr(i),o=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,i),n=new ut(this.w),l=n.getTextRects(r,s);let c=l;return r!==o&&(c=n.getTextRects(o,s)),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,s=0;if(void 0!==t.config.xaxis.title.text){const i=new ut(this.w).getTextRects(t.config.xaxis.title.text,t.config.xaxis.title.style.fontSize);e=i.width,s=i.height}return{width:e,height:s}}getxAxisTimeScaleLabelsCoords(){const t=this.w;this.dCtx.timescaleLabels=t.labelData.timescaleLabels.slice();const e=this.dCtx.timescaleLabels.map(t=>t.value),s=e.reduce((t,e)=>void 0===t?0:t.length>e.length?t:e,0),i=new ut(this.w).getTextRects(s,t.config.xaxis.labels.style.fontSize);return 1.05*i.width*e.length>t.layout.gridWidth&&0!==t.config.xaxis.labels.rotate&&(t.globals.overlappingXLabels=!0),i}additionalPaddingXLabels(t){const e=this.w,s=e.globals,i=e.config,a=i.xaxis.type,r=t.width;s.skipLastTimelinelabel=!1,s.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>s.svgWidth-e.layout.translateX-l&&(s.skipLastTimelinelabel=!0),n<-(t.show&&!t.floating||"bar"!==i.chart.type&&"candlestick"!==i.chart.type&&"rangeBar"!==i.chart.type&&"boxPlot"!==i.chart.type&&"violin"!==i.chart.type?10:r/1.75)&&(s.skipFirstTimelinelabel=!0)}else"datetime"===a?this.dCtx.gridPad.right<r&&!e.layout.rotateXLabels&&(s.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)=>{i.yaxis.length>1&&(t=>-1!==s.collapsedSeriesIndices.indexOf(t))(e)||n(t)};i.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 pe{constructor(t){this.w=t.w,this.dCtx=t}getyAxisLabelsCoords(){const t=this.w,e=[];let s=10;const i=new Ct(this.w,{theme:this.dCtx.theme,timeScale:this.dCtx.timeScale});return t.config.yaxis.map((a,r)=>{const o={seriesIndex:r,dataPointIndex:-1,w:t},n=t.globals.yAxisScale[r];let l=0;if(!i.isYAxisHidden(r)&&a.labels.show&&void 0!==a.labels.minWidth&&(l=a.labels.minWidth),!i.isYAxisHidden(r)&&a.labels.show&&n.result.length){const i=t.formatters.yLabelFormatters[r],c=n.niceMin===Number.MIN_VALUE?0:n.niceMin;let h=n.result.reduce((t,e)=>{var s,a;return(null==(s=String(i(t,o)))?void 0:s.length)>(null==(a=String(i(e,o)))?void 0:a.length)?t:e},c);h=i(h,o);let d=h;if(void 0!==h&&0!==h.length||(h=n.niceMax),1===String(h).length&&(h+=".0",d=h),t.globals.isBarHorizontal){s=0;const e=t.labelData.labels.slice();h=b.getLargestStringFromArr(e),h=i(h,{seriesIndex:r,dataPointIndex:-1,w:t}),d=this.dCtx.dimHelpers.getLargestStringFromMultiArr(h,e)}const p=new ut(this.w),g="rotate(".concat(a.labels.rotate," 0 0)"),u=p.getTextRects(h,a.labels.style.fontSize,a.labels.style.fontFamily,g,!1);let x=u;h!==d&&(x=p.getTextRects(d,a.labels.style.fontSize,a.labels.style.fontFamily,g,!1)),e.push({width:(l>x.width||l>u.width?l:x.width>u.width?x.width:u.width)+s,height:x.height>u.height?x.height:u.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 s=new ut(this.w),i="rotate(".concat(t.title.rotate," 0 0)"),a=s.getTextRects(t.title.text,t.title.style.fontSize,t.title.style.fontFamily,i,!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,s=0,i=0;const a=t.globals.yAxisScale.length>1?10:0,r=new Ct(this.w,{theme:this.dCtx.theme,timeScale:this.dCtx.timeScale}),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?i+=c:s+=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=s,this.dCtx.yAxisWidthRight=i,e}}class ge{constructor(t){this.w=t.w,this.dCtx=t}gridPadForColumnsInNumericAxis(t){const{w:e}=this,{config:s,globals:i}=e;if(i.noData||i.collapsedSeries.length+i.ancillaryCollapsedSeries.length===s.series.length)return 0;const a=t=>["bar","rangeBar","candlestick","boxPlot","violin"].includes(t),r=s.chart.type;let o=0,n=a(r)?s.series.length:1;i.comboBarCount>0&&(n=i.comboBarCount),i.collapsedSeries.forEach(t=>{a(t.type)&&(n-=1)}),s.chart.stacked&&(n=1);const l=a(r)||i.comboBarCount>0;let c=Math.abs(i.initialMaxX-i.initialMinX);if(l&&e.axisFlags.isXNumeric&&!i.isBarHorizontal&&n>0&&0!==c){c<=3&&(c=i.dataPoints);const e=c/t;let a=i.minXDiff&&i.minXDiff/e>0?i.minXDiff/e:0;a>t/2&&(a/=2),o=a*parseInt(s.plotOptions.bar.columnWidth,10)/100,o<1&&(o=1),i.barPadForNumericAxis=o}return o}gridPadFortitleSubtitle(){const{w:t}=this,{globals:e}=t;let s=this.dCtx.isSparkline||!e.axisCharts?0:10;["title","subtitle"].forEach(i=>{void 0!==t.config[i].text?s+=t.config[i].margin:s+=this.dCtx.isSparkline||!e.axisCharts?0:5}),!t.config.legend.show||"bottom"!==t.config.legend.position||t.config.legend.floating||e.axisCharts||(s+=10);const i=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),a=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");t.layout.gridHeight-=i.height+a.height+s,t.layout.translateY+=i.height+a.height+s}setGridXPosForDualYAxis(t,e){const{w:s}=this,i=new Ct(this.w,{theme:this.dCtx.theme,timeScale:this.dCtx.timeScale});s.config.yaxis.forEach((a,r)=>{-1!==s.globals.ignoreYAxisIndexes.indexOf(r)||a.floating||i.isYAxisHidden(r)||(a.opposite&&(s.layout.translateX-=e[r].width+t[r].width+parseInt(a.labels.style.fontSize,10)/1.2+12),s.layout.translateX<2&&(s.layout.translateX=2))})}}class ue{constructor(t,e){this.w=t,this.ctx=e,this.theme=e.theme,this.timeScale=e.timeScale,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 he(this),this.dimYAxis=new pe(this),this.dimXAxis=new de(this),this.dimGrid=new ge(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0,this.datalabelsCoords={width:0,height:0},this.xAxisWidth=0,this.timescaleLabels=[]}plotCoords(){const t=this.w,e=t.globals;this.lgRect=this.dimHelpers.getLegendsRect(),this.datalabelsCoords={width:0,height:0};const s=Array.isArray(t.config.stroke.width)?Math.max(...t.config.stroke.width):t.config.stroke.width;this.isSparkline&&((t.config.markers.discrete.length>0||t.config.markers.size>0)&&Object.entries(this.gridPad).forEach(([t,e])=>{this.gridPad[t]=Math.max(e,this.w.globals.markers.largestSize/1.5)}),this.gridPad.top=Math.max(s/2,this.gridPad.top),this.gridPad.bottom=Math.max(s/2,this.gridPad.bottom)),e.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),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}}}setDimensionsForAxisCharts(){const t=this.w,e=t.globals,s=this.dimYAxis.getyAxisLabelsCoords(),i=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:s[a].width,index:a}),t.layout.yTitleCoords.push({width:i[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)/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(i,s);new Lt(this.w,{theme:this.theme,timeScale:this.timeScale}).setYAxisXPosition(s,i)}setDimensionsForNonAxisCharts(){const t=this.w,e=t.globals,s=t.config;let i=0;t.config.legend.show&&!t.config.legend.floating&&(i=20);const a="pie"===s.chart.type||"polarArea"===s.chart.type||"donut"===s.chart.type?"pie":"radialBar",r=s.plotOptions[a].offsetY,o=s.plotOptions[a].offsetX;if(!s.legend.show||s.legend.floating){t.layout.gridHeight=e.svgHeight;const s=t.dom.elWrap.getBoundingClientRect().width;return t.layout.gridWidth=Math.min(s,t.layout.gridHeight),t.layout.translateY=r,void(t.layout.translateX=o+(e.svgWidth-t.layout.gridWidth)/2)}switch(s.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-i,t.layout.gridHeight="auto"!==s.chart.height?e.svgHeight:t.layout.gridWidth,t.layout.translateY=r,t.layout.translateX=o+this.lgRect.width+i;break;case"right":t.layout.gridWidth=e.svgWidth-this.lgRect.width-i-5,t.layout.gridHeight="auto"!==s.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,s){const i=this.w,a=i.labelData.hasXaxisGroups?2:1,r=s.height+t.height+e.height,o=i.axisFlags.isMultiLineX?1.2:D,n=i.layout.rotateXLabels?22:10,l=i.layout.rotateXLabels&&"bottom"===i.config.legend.position?10:0;this.xAxisHeight=r*o+a*n+l,this.xAxisWidth=t.width,this.xAxisHeight-e.height>i.config.xaxis.labels.maxHeight&&(this.xAxisHeight=i.config.xaxis.labels.maxHeight),i.config.xaxis.labels.minHeight&&this.xAxisHeight<i.config.xaxis.labels.minHeight&&(this.xAxisHeight=i.config.xaxis.labels.minHeight),i.config.xaxis.floating&&(this.xAxisHeight=0);let c=0,h=0;i.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 xe=1e3,fe=6e4,me=36e5,be=24*me,ye=7*be,we=30*be,ve=365*be,Ae=10/86400,Ce=[{unit:"second",step:1,approxMs:xe},{unit:"second",step:5,approxMs:5e3},{unit:"second",step:15,approxMs:15e3},{unit:"second",step:30,approxMs:3e4},{unit:"minute",step:1,approxMs:fe},{unit:"minute",step:5,approxMs:3e5},{unit:"minute",step:15,approxMs:9e5},{unit:"minute",step:30,approxMs:18e5},{unit:"hour",step:1,approxMs:me},{unit:"hour",step:3,approxMs:3*me},{unit:"hour",step:6,approxMs:6*me},{unit:"hour",step:12,approxMs:12*me},{unit:"day",step:1,approxMs:be},{unit:"day",step:2,approxMs:2*be},{unit:"week",step:1,approxMs:ye},{unit:"week",step:2,approxMs:2*ye},{unit:"month",step:1,approxMs:we},{unit:"month",step:3,approxMs:7776e6},{unit:"month",step:6,approxMs:15552e6},{unit:"year",step:1,approxMs:ve},{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 Se{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 s=this.w;if(s.globals.allSeriesCollapsed)return s.labelData.labels=[],s.labelData.timescaleLabels=[],this.timeScaleArray=[],[];const i=e-t,a=i/be;s.interact.disableZoomIn=!1,s.interact.disableZoomOut=!1,a<Ae?s.interact.disableZoomIn=!0:a>5e4&&(s.interact.disableZoomOut=!0);const r=Number.isFinite(s.config.xaxis.tickAmount)?s.config.xaxis.tickAmount:10;this.tickInterval=function(t,e){(!Number.isFinite(e)||e<=0)&&(e=10);if(t<=0)return Ce[0];const s=t/e;let i=Ce[0],a=1/0;for(const t of Ce){const e=Math.abs(Math.log(t.approxMs/s));e<a&&(a=e,i=t)}return i}(i,r);const o=this.generateBaseTicks(t,e,this.tickInterval);return this.timeScaleArray=o,o}generateBaseTicks(t,e,s){const i=this.w,a=new y(i),r=this.utc,o=i.layout.gridWidth,n=e-t,l=[];let c=a.ceilToBoundary(t,s.unit,s.step,r),h=0;for(;c<=e&&h<5e3;){const e=a.getDateFields(c,r),i=n>0?(c-t)/n*o:0;l.push({timestamp:c,position:i,unit:s.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,s.unit,s.step,r),h++}return l}recalcDimensionsBasedOnFormat(t){const e=this.w,s=this.formatDates(t),i=this.removeOverlappingTS(s);e.labelData.timescaleLabels=i.slice();const a=new ue(this.w,this.ctx).plotCoords();this.ctx._writeLayoutCoords(a.layout)}formatDates(t){const e=this.w,s=new y(e),i=e.config.xaxis.labels.format,a=e.config.xaxis.labels.datetimeFormatter,r=this.utc,o=(t,e=2)=>String(t).padStart(e,"0"),n=i||this._effectiveFormat(t,a);return t.map(t=>{const e=s.getDate(t.timestamp),i=s.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:i,unit:t.unit,year:t.year,month:t.month}})}_effectiveFormat(t,e){if(0===t.length)return e.day||"dd MMM";const s=this.tickInterval&&this.tickInterval.unit||t[0].unit,i=e["week"===s?"day":s]||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(i),c=/M/.test(i),h=/d/i.test(i);if("month"===s||"week"===s)return o&&!l?i+" yyyy":i;if("day"===s)return o&&!l?i+" yyyy":i;if("hour"===s||"minute"===s||"second"===s){if(n&&!h&&!c){return(o?"dd MMM yyyy":"dd MMM")+" "+i}return i}return i}removeOverlappingTS(t){if(0===t.length)return[];const e=this.w,s=new ut(e);let i,a=!1;t[0].value&&t.every(e=>e.value.length===t[0].value.length)&&(a=!0,i=s.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?i:s.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)}}const ke="__apexcharts_registry__",Me="__apexcharts_custom_types__";function De(){return globalThis[ke]}function Te(){return globalThis[Me]}function Le(t){return Te().has(t)}function Fe(t){Object.assign(De(),t)}function Ee(t){const e=De()[t];if(!e)throw new Error(`ApexCharts: chart type "${t}" is not registered. Import it via ApexCharts.use() or use the full apexcharts bundle.`);return e}globalThis[ke]||(globalThis[ke]={}),globalThis[Me]||(globalThis[Me]=new Set);class _e{constructor(t,e,s){this.w=e,this.ctx=s,this.el=t}setupElements(){const{globals:t,config:e}=this.w,s=e.chart.type,i=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","violin","scatter","bubble"],a=[...i,"radar","heatmap","treemap"],r=!a.includes(s)&&!["pie","donut","polarArea","radialBar"].includes(s)&&Le(s);t.axisCharts=a.includes(s)||r,t.xyCharts=i.includes(s)||r,t.isBarHorizontal=["bar","rangeBar","boxPlot","violin"].includes(s)&&e.plotOptions.bar.horizontal,t.chartClass=`.apexcharts${t.chartID}`,this.w.dom.baseEl=this.el,this.w.dom.elWrap=m.createElementNS("http://www.w3.org/1999/xhtml","div"),ut.setAttrs(this.w.dom.elWrap,{id:t.chartClass.substring(1),class:`apexcharts-canvas ${t.chartClass.substring(1)}`}),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(${e.chart.offsetX}, ${e.chart.offsetY})`}),this.w.dom.Paper.node.style.background="dark"!==e.theme.mode||e.chart.background?"light"!==e.theme.mode||e.chart.background?e.chart.background:"#fff":"#343A3F",this.setSVGDimensions(),this.w.dom.elLegendForeign=m.createElementNS(P,"foreignObject"),ut.setAttrs(this.w.dom.elLegendForeign,{x:0,y:0,width:t.svgWidth,height:t.svgHeight}),this.w.dom.elLegendWrap=m.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),e.chart.accessibility.enabled&&e.chart.accessibility.announcements.enabled){const t=m.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(e.chart.accessibility.enabled){const t=this.getAccessibleChartLabel(),s=e.chart.accessibility.keyboard.enabled&&e.chart.accessibility.keyboard.navigation.enabled?"application":"img";if(this.w.dom.Paper.attr({role:s,"aria-label":t}),e.chart.accessibility.description){const t=m.createElementNS(P,"desc");t.textContent=e.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)}plotChartType(t,e){const{w:s,ctx:i}=this,{config:a,globals:r}=s,o=i.renderer&&"canvas"===i.renderer.kind;o&&i.renderer.beginSeries();const n={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:[]}},l={},c=a.chart.type||"line";let h=null,d=0;this.w.seriesData.series.forEach((e,i)=>{var a,r;const o="column"===(null==(a=t[i])?void 0:a.type)?"bar":(null==(r=t[i])?void 0:r.type)||("column"===c?"bar":c),p=n;p[o]?("rangeArea"===o?(p[o].series.push(this.w.rangeData.seriesRangeStart[i]),p[o].seriesRangeEnd.push(this.w.rangeData.seriesRangeEnd[i])):p[o].series.push(e),p[o].i.push(i),"bar"===o&&(s.globals.columnSeries=n.bar)):["heatmap","treemap","pie","donut","polarArea","radialBar","radar"].includes(o)?h=o:Le(o)&&(l[o]||(l[o]={series:[],i:[]}),l[o].series.push(e),l[o].i.push(i)),c!==o&&"scatter"!==o&&d++}),d>0&&n.bar.series.length>0&&a.plotOptions.bar.horizontal&&(d-=n.bar.series.length,n.bar={series:[],i:[]},s.globals.columnSeries={series:[],i:[]}),r.comboCharts||(r.comboCharts=d>0);const p=n.line.series.length>0||n.area.series.length>0||n.scatter.series.length>0||n.bubble.series.length>0||n.rangeArea.series.length>0||!r.comboCharts&&["line","area","scatter","bubble","rangeArea"].includes(a.chart.type)?new(Ee("line"))(i.w,i,e):null,g=n.candlestick.series.length>0||n.boxPlot.series.length>0||!r.comboCharts&&["candlestick","boxPlot"].includes(a.chart.type)?new(Ee("candlestick"))(i.w,i,e):null,u=n.violin.series.length>0||!r.comboCharts&&"violin"===a.chart.type?new(Ee("violin"))(i.w,i,e):null,x=!r.comboCharts&&["pie","donut","polarArea"].includes(a.chart.type);i.pie=x?new(Ee("pie"))(i.w,i):null;const f=n.rangeBar.series.length>0||!r.comboCharts&&"rangeBar"===a.chart.type;i.rangeBar=f?new(Ee("rangeBar"))(i.w,i,e):null;let m=[];if(r.comboCharts){const t=new _(this.w);if(n.area.series.length>0&&m.push(...t.drawSeriesByGroup(n.area,r.areaGroups,"area",p)),n.bar.series.length>0)if(a.chart.stacked){const t=new(Ee("barStacked"))(i.w,i,e);m.push(t.draw(n.bar.series,n.bar.i))}else i.bar=new(Ee("bar"))(i.w,i,e),m.push(i.bar.draw(n.bar.series,n.bar.i));if(n.rangeArea.series.length>0&&m.push(p.draw(n.rangeArea.series,"rangeArea",n.rangeArea.i,n.rangeArea.seriesRangeEnd)),n.line.series.length>0&&m.push(...t.drawSeriesByGroup(n.line,r.lineGroups,"line",p)),n.candlestick.series.length>0&&m.push(g.draw(n.candlestick.series,"candlestick",n.candlestick.i)),n.boxPlot.series.length>0&&m.push(g.draw(n.boxPlot.series,"boxPlot",n.boxPlot.i)),n.violin.series.length>0&&m.push(u.draw(n.violin.series,"violin",n.violin.i)),n.rangeBar.series.length>0&&m.push(i.rangeBar.draw(n.rangeBar.series,n.rangeBar.i)),n.scatter.series.length>0){const t=new(Ee("line"))(i.w,i,e,!0);m.push(t.draw(n.scatter.series,"scatter",n.scatter.i))}if(n.bubble.series.length>0){const t=new(Ee("line"))(i.w,i,e,!0);m.push(t.draw(n.bubble.series,"bubble",n.bubble.i))}Object.keys(l).forEach(t=>{const s=l[t];if(s.series.length>0){const a=new(Ee(t))(i.w,i,e);m.push(a.draw(s.series,t,s.i))}})}else{const t=a.chart.type;switch(t){case"line":m=p.draw(this.w.seriesData.series,"line");break;case"area":m=p.draw(this.w.seriesData.series,"area");break;case"bar":if(a.chart.stacked){const t=new(Ee("barStacked"))(i.w,i,e);m=t.draw(this.w.seriesData.series)}else i.bar=new(Ee("bar"))(i.w,i,e),m=i.bar.draw(this.w.seriesData.series);break;case"candlestick":m=g.draw(this.w.seriesData.series,"candlestick");break;case"boxPlot":m=g.draw(this.w.seriesData.series,t);break;case"violin":m=u.draw(this.w.seriesData.series,"violin");break;case"rangeBar":m=i.rangeBar.draw(this.w.seriesData.series);break;case"rangeArea":m=p.draw(this.w.rangeData.seriesRangeStart,"rangeArea",void 0,this.w.rangeData.seriesRangeEnd);break;case"heatmap":{const t=new(Ee("heatmap"))(i.w,i,e);m=t.draw(this.w.seriesData.series);break}case"treemap":{const t=new(Ee("treemap"))(i.w,i);m=t.draw(this.w.seriesData.series);break}case"pie":case"donut":case"polarArea":m=i.pie.draw(this.w.seriesData.series);break;case"radialBar":{const t=new(Ee("radialBar"))(i.w,i);m=t.draw(this.w.seriesData.series);break}case"radar":{const t=new(Ee("radar"))(i.w,i);m=t.draw(this.w.seriesData.series);break}default:if(Le(t)){const s=new(Ee(t))(i.w,i,e);m=s.draw(this.w.seriesData.series,t)}else m=p.draw(this.w.seriesData.series)}}if(o){const t=i.renderer.present();if(t){const e=new ut(s).group({class:"apexcharts-canvas-series-wrap"});e.add(t);return(Array.isArray(m)?m:[m]).forEach(t=>{t&&e.add(t)}),e}}return m}setSVGDimensions(){var t;const{globals:e,config:s}=this.w;s.chart.width=s.chart.width||"100%",s.chart.height=s.chart.height||"auto";const i=s.chart.width,a=s.chart.height;e.svgWidth=NaN,e.svgHeight=NaN;let r=b.getDimensions(this.el);const o=i.toString().split(/[0-9]+/g).pop();"%"===o?b.isNumber(r[0])&&(0===r[0].width&&(r=b.getDimensions(this.el.parentNode)),e.svgWidth=r[0]*parseInt(i,10)/100):"px"!==o&&""!==o||(e.svgWidth=parseInt(i,10));const n=String(a).toString().split(/[0-9]+/g).pop();if("auto"!==a&&""!==a)if("%"===n){const t=b.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(e.svgWidth=Math.max(e.svgWidth,0),e.svgHeight=Math.max(e.svgHeight,0),ut.setAttrs(this.w.dom.Paper.node,{width:e.svgWidth,height:e.svgHeight}),"%"!==n&&h.isBrowser()){const i=e.axisCharts&&(s.grid.show||s.dataLabels.enabled||s.xaxis.labels.show||s.xaxis.axisBorder.show||s.xaxis.axisTicks.show||s.yaxis.some(t=>t.show&&(t.labels.show||t.axisBorder.show||t.axisTicks.show))),a=s.chart.sparkline.enabled||!i?0:s.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`}shiftGraphPosition(){const{globals:t}=this.w,{translateY:e,translateX:s}=t;ut.setAttrs(this.w.dom.elGraphical.node,{transform:`translate(${s}, ${e})`})}resizeNonAxisCharts(){var t,e,s,i,a,r;const{w:o}=this,n=o.config.chart.height?String(o.config.chart.height):"",l=""!==n&&"auto"!==n,c=n.includes("%");let d=0,p=o.config.chart.sparkline.enabled?1:15;p+=o.config.grid.padding.bottom,["top","bottom"].includes(o.config.legend.position)&&o.config.legend.show&&!o.config.legend.floating&&(d=(null!=(e=null==(t=this.ctx.legend)?void 0:t.legendHelpers.getLegendDimensions().clwh)?e:0)+7);const g=o.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),u=o.globals.pieExternalLabelMarginY||0;let x=u>0?2*o.globals.radialSize+2*u:2.05*o.globals.radialSize;const f=Math.abs(o.config.plotOptions.radialBar.endAngle-o.config.plotOptions.radialBar.startAngle);if(g&&!o.config.chart.sparkline.enabled&&f<360){const t=b.getBoundingClientRect(this.w.dom.Paper.node);let e=1/0,n=-1/0;const l=s=>{var i,a,r,o;if(null==(i=s.classList)?void 0:i.contains("apexcharts-radialbar-hollow"))return;const c=null==(r=null==(a=s.tagName)?void 0:a.toLowerCase)?void 0:r.call(a);if("text"===c||"tspan"===c)return;const h=Array.from(null!=(o=s.children)?o:[]);if(h.length>0)return void h.forEach(t=>l(t));const d=b.getBoundingClientRect(s);if(d.bottom-d.top>0){const s=d.top-t.top,i=d.bottom-t.top;s<e&&(e=s),i>n&&(n=i)}};if(Array.from(null!=(s=g.children)?s:[]).forEach(t=>l(t)),Number.isFinite(e)||(e=0),!Number.isFinite(n)){const e=b.getBoundingClientRect(g);n=e.bottom-t.top}const u=Math.max(p,.2*o.globals.radialSize),f=Math.max(u-e,0);0!==f&&(o.layout.translateY=(null!=(i=o.layout.translateY)?i:0)+f,ut.setAttrs(this.w.dom.elGraphical.node,{transform:`translate(${null!=(a=o.layout.translateX)?a:0}, ${o.layout.translateY})`}),n+=f),x=n>0?n:2.05*o.globals.radialSize;const m=Math.max(u,e),y=Math.ceil(x+d+m),w=null!=(r=o.config.chart.offsetY)?r:0,v=y+Math.max(w,0);return void(c||(this.w.dom.elLegendForeign&&this.w.dom.elLegendForeign.setAttribute("height",String(v)),this.w.dom.elWrap.style.height=`${v}px`,ut.setAttrs(this.w.dom.Paper.node,{height:y}),h.isBrowser()&&(this.w.dom.Paper.node.parentNode.parentNode.style.minHeight=`${v}px`)))}const m=Math.ceil(x+this.w.layout.translateY+d+p);l||(this.w.dom.elLegendForeign&&this.w.dom.elLegendForeign.setAttribute("height",String(m)),this.w.dom.elWrap.style.height=`${m}px`,ut.setAttrs(this.w.dom.Paper.node,{height:m}),h.isBrowser()&&(this.w.dom.Paper.node.parentNode.parentNode.style.minHeight=`${m}px`))}coreCalculations(){new Dt(this.w).init()}resetGlobals(){const t=()=>this.w.config.series.map(()=>[]),e=new F,{globals:s}=this.w,i={dataWasParsed:this.w.axisFlags.dataWasParsed,originalSeries:s.originalSeries};e.initGlobalVars(s),s.seriesXvalues=t(),s.seriesYvalues=t(),i.dataWasParsed&&(this.w.axisFlags.dataWasParsed=i.dataWasParsed,s.originalSeries=i.originalSeries)}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 Pt(this.w).drawXCrosshairs(),"back"===t.config.yaxis[0].crosshairs.position&&new Pt(this.w).drawYCrosshairs(),"datetime"===t.config.xaxis.type&&void 0===t.config.xaxis.labels.formatter){this.ctx.timeScale=new Se(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.globals.isBarHorizontal&&(e=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minY,t.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(e)}e=new _(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 s=Array.isArray(e.config.chart.brush.targets)?e.config.chart.brush.targets:[e.config.chart.brush.target];s.forEach(e=>{const s=t.constructor.getChartByID(e);s.w.globals.brushSource=this.ctx,"function"!=typeof s.w.config.chart.events.zoomed&&(s.w.config.chart.events.zoomed=()=>this.updateSourceChart(s)),"function"!=typeof s.w.config.chart.events.scrolled&&(s.w.config.chart.events.scrolled=()=>this.updateSourceChart(s))}),e.config.chart.events.selection=(e,i)=>{s.forEach(e=>{t.constructor.getChartByID(e).ctx.updateHelpers._updateOptions({xaxis:{min:i.xaxis.min,max:i.xaxis.max}},!1,!1,!1,!1)})}}}getAccessibleChartLabel(){const t=this.w,e=t.config;if(e.chart.accessibility&&e.chart.accessibility.description)return e.chart.accessibility.description;const s=e.chart.type,i=[];if(e.title.text)i.push(`${e.title.text}. ${s} chart`),e.subtitle.text&&i.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?i.push(`${s} chart with ${r} data series: ${a.join(", ")}`):i.push(`${s} chart with ${r} data series`)}return i.join(". ")}}class Pe{constructor(t,{resetGlobals:e=()=>{},isMultipleY:s=()=>{}}={}){this.w=t,this.resetGlobals=e,this.isMultipleY=s,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new _(this.w),this.activeSeriesIndex=0}getFirstDataPoint(){const t=this.w.config.series,e=new ee(this.w);this.activeSeriesIndex=e.getActiveConfigSeriesIndex();const s=t[this.activeSeriesIndex];return s&&s.data&&s.data.length>0&&null!==s.data[0]&&void 0!==s.data[0]?s.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 s=null==(t=this.w.config.series[this.activeSeriesIndex])?void 0:t.data;if(s){const t=t=>t&&void 0!==t.x;for(let e=1;e<Math.min(3,s.length)&&!0===t(s[e]);e++);}return!0}isFormat2DArray(){const t=this.getFirstDataPoint();return t&&Array.isArray(t)}handleFormat2DArray(t,e){const s=this.w.config,i=t[e].data,a="boxPlot"===s.chart.type||"boxPlot"===s.series[e].type;for(let t=0;t<i.length;t++){const e=i[t],r=e[0],o=e[1],n=e[2];if(void 0!==o&&(Array.isArray(o)&&4===o.length&&!a?this.twoDSeries.push(b.parseNumber(o[3])):e.length>=5?this.twoDSeries.push(b.parseNumber(e[4])):this.twoDSeries.push(b.parseNumber(o)),this.w.axisFlags.dataFormatXNumeric=!0),"datetime"===s.xaxis.type){const t=new Date(r).getTime();this.twoDSeriesX.push(t)}else this.twoDSeriesX.push(r);void 0!==n&&(this.threeDSeries.push(n),this.w.axisFlags.isDataXYZ=!0)}}handleFormatXY(t,e){const s=this.w.config,i=this.w.globals,a=new y(this.w),r=t[e].data;let o=e;i.collapsedSeriesIndices.indexOf(e)>-1&&(o=this.activeSeriesIndex);const n=t[o].data;for(let t=0;t<r.length;t++){const s=r[t];if(void 0!==s.y){const t=Array.isArray(s.y)?b.parseNumber(s.y[s.y.length-1]):b.parseNumber(s.y);this.twoDSeries.push(t)}void 0===this.seriesGoals[e]&&(this.seriesGoals[e]=[]),void 0!==s.goals&&Array.isArray(s.goals)?this.seriesGoals[e].push(s.goals):this.seriesGoals[e].push(null),void 0!==s.z&&(this.threeDSeries.push(s.z),this.w.axisFlags.isDataXYZ=!0)}for(let t=0;t<n.length;t++){const e=n[t].x,r="string"==typeof e,o=Array.isArray(e),l=!o&&!!a.isValidDate(e);if(r||l)if(r||s.xaxis.convertedCatToNumeric){const t=i.isBarHorizontal&&this.w.axisFlags.isRangeData;"datetime"!==s.xaxis.type||t?(this.fallbackToCategory=!0,this.twoDSeriesX.push(e),isNaN(e)||"category"===this.w.config.xaxis.type||"string"==typeof e||(this.w.axisFlags.isXNumeric=!0)):this.twoDSeriesX.push(a.parseDate(e))}else"datetime"===s.xaxis.type?this.twoDSeriesX.push(a.parseDate(e.toString())):(this.w.axisFlags.dataFormatXNumeric=!0,this.w.axisFlags.isXNumeric=!0,this.twoDSeriesX.push(parseFloat(e)));else o?(this.fallbackToCategory=!0,this.twoDSeriesX.push(e)):(this.w.axisFlags.isXNumeric=!0,this.w.axisFlags.dataFormatXNumeric=!0,this.twoDSeriesX.push(e))}}handleRangeData(t,e){let s={start:[],end:[],rangeUniques:[]};return this.isFormat2DArray()?s=this.handleRangeDataFormat("array",t,e):this.isFormatXY()&&(s=this.handleRangeDataFormat("xy",t,e)),this.w.rangeData.seriesRangeStart[e]=void 0===s.start?[]:s.start,this.w.rangeData.seriesRangeEnd[e]=void 0===s.end?[]:s.end,this.w.rangeData.seriesRange[e]=s.rangeUniques,this.w.rangeData.seriesRange.forEach(t=>{t&&t.forEach(t=>{const e=t.y,s=e.length;if(!(s<=1))for(let i=0;i<s;i++){const a=e[i],r=a.y1,o=a.y2;for(let n=i+1;n<s;n++){const s=e[n],i=s.y1;if(r<=s.y2&&i<=o){const e=t;e.overlaps.add(a.rangeName),e.overlaps.add(s.rangeName)}}}})}),s}handleCustomRangeData(t,e,s){const i=t[e].data||[],a=[],r=[];for(let t=0;t<i.length;t++){const e=i[t];let o,n;if("function"==typeof s){let i=s(e,t);Array.isArray(i)||(i=[i]);const a=i.map(t=>b.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=b.parseNumber(t[0]),n=b.parseNumber(t[t.length-1])):o=n=b.parseNumber(t)}a.push(o),r.push(n)}this.w.rangeData.seriesRangeStart[e]=a,this.w.rangeData.seriesRangeEnd[e]=r}handleCandleStickBoxData(t,e){let s={o:[],h:[],m:[],l:[],c:[]};return this.isFormat2DArray()?s=this.handleCandleStickBoxDataFormat("array",t,e):this.isFormatXY()&&(s=this.handleCandleStickBoxDataFormat("xy",t,e)),this.w.candleData.seriesCandleO[e]=s.o,this.w.candleData.seriesCandleH[e]=s.h,this.w.candleData.seriesCandleM[e]=s.m,this.w.candleData.seriesCandleL[e]=s.l,this.w.candleData.seriesCandleC[e]=s.c,this.w.candleData.seriesBoxPoints[e]=s.points||[],s}handleViolinData(t,e){var s,i,a,r,o,n;const l=this.w,c=t[e].data,h=[],d=[],p=[],g=[],u=[];for(let t=0;t<c.length;t++){const e=c[t],l=null!=(a=null!=(i=null==(s=null==e?void 0:e.y)?void 0:s.density)?i:null==e?void 0:e[1])?a:[],x=null!=(n=null!=(o=null==(r=null==e?void 0:e.y)?void 0:r.points)?o:null==e?void 0:e[2])?n:[],f=[],m=[];let y=0,w=null,v=1/0,A=-1/0;for(let t=0;t<l.length;t++){const e=b.parseNumber(l[t][0]),s=b.parseNumber(l[t][1]);null!==e&&null!==s&&(f.push(e),m.push(s),s>y&&(y=s,w=e),e<v&&(v=e),e>A&&(A=e))}const C=[];for(let t=0;t<x.length;t++){const e=b.parseNumber(x[t]);null!==e&&(C.push(e),e<v&&(v=e),e>A&&(A=e))}h.push({values:f,weights:m,maxWeight:y}),d.push(C),p.push(v===1/0?0:v),g.push(A===-1/0?0:A),u.push(null!==w?w:C.length?C[Math.floor(C.length/2)]:0)}l.violinData.seriesViolinDensity[e]=h,l.violinData.seriesViolinPoints[e]=d,l.violinData.seriesViolinMin[e]=p,l.violinData.seriesViolinMax[e]=g,this.twoDSeries=u}handleRangeDataFormat(t,e,s){const i=[],a=[],r=new Map,o=[];if(e[s].data.forEach(t=>{if(!r.has(t.x)){const e={x:t.x,overlaps:new Set,y:[]};r.set(t.x,e),o.push(e)}}),"array"===t)for(let t=0;t<e[s].data.length;t++)Array.isArray(e[s].data[t])?(i.push(e[s].data[t][1][0]),a.push(e[s].data[t][1][1])):(i.push(e[s].data[t]),a.push(e[s].data[t]));else if("xy"===t)for(let t=0;t<e[s].data.length;t++){const o=Array.isArray(e[s].data[t].y),n=b.randomId(),l=e[s].data[t].x,c={y1:o?e[s].data[t].y[0]:e[s].data[t].y,y2:o?e[s].data[t].y[1]:e[s].data[t].y,rangeName:n};e[s].data[t].rangeName=n;const h=r.get(l);h&&h.y.push(c),i.push(c.y1),a.push(c.y2)}return{start:i,end:a,rangeUniques:o}}handleCandleStickBoxDataFormat(t,e,s){const i=this.w,a="boxPlot"===i.config.chart.type||"boxPlot"===i.config.series[s].type,r=[],o=[],n=[],l=[],c=[],h=[],d=e[s].data;let p;if("array"===t){p=a&&6===d[0].length||!a&&5===d[0].length?t=>t.slice(1):t=>Array.isArray(t[1])?t[1]:[]}else p=t=>Array.isArray(t.y)?t.y:[];for(let t=0;t<d.length;t++){const e=p(d[t]);e&&e.length>=2&&(r.push(e[0]),o.push(e[1]),a?(n.push(e[2]),l.push(e[3]),c.push(e[4])):(l.push(e[2]),c.push(e[3])));const s=d[t]&&d[t].points;h.push(Array.isArray(s)?s:[])}return{o:r,h:o,m:n,l:l,c:c,points:h}}parseDataAxisCharts(t){var e,s,i,a,r,o;const c=this.w.config,h=this.w.globals,d=new y(this.w),p=c.labels.length>0?c.labels.slice():c.xaxis.categories.slice();this.w.axisFlags.isRangeBar="rangeBar"===c.chart.type&&h.isBarHorizontal,this.w.labelData.hasXaxisGroups="category"===c.xaxis.type&&c.xaxis.group.groups.length>0,this.w.labelData.hasXaxisGroups&&(this.w.labelData.groups=c.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 g=[],u=[...new Set(c.series.map(t=>t.group))];c.series.forEach((t,e)=>{const s=u.indexOf(t.group);g[s]||(g[s]=[]),g[s].push(this.w.seriesData.seriesNames[e])}),this.w.labelData.seriesGroups=g;const x=()=>{for(let t=0;t<p.length;t++)if("string"==typeof p[t]){if(!d.isValidDate(p[t]))throw new Error("You have provided invalid Date format. Please provide a valid JavaScript Date");this.twoDSeriesX.push(d.parseDate(p[t]))}else this.twoDSeriesX.push(p[t])};for(let d=0;d<t.length;d++){if(this.twoDSeries=[],this.twoDSeriesX=[],this.threeDSeries=[],void 0===t[d].data)return;const g=c.chart.dataReducer,u=null==(s=null==(e=h.dataReducerRawSeries)?void 0:e[d])?void 0:s.data;if((null==g?void 0:g.enabled)&&this.isMultiFormat()&&Array.isArray(u)&&u.length>(null!=(i=g.threshold)?i:500)){const e=null!=(a=g.targetPoints)?a:250,s=c.xaxis.min,i=c.xaxis.max,h=null==s&&null==i?u:Pe.sliceByXRange(u,s,i);let p=h;if(h.length>e){const t=Array.isArray(h[0])?null==(o=h[0])?void 0:o[1]:null==(r=h[0])?void 0:r.y;Array.isArray(t)?4===t.length?p=Pe.ohlcAggregate(h,e):2===t.length&&(p=Pe.rangeAggregate(h,e)):p=Pe.lttbDownsample(h,e)}t[d]=l(n({},t[d]),{data:p})}"rangeBar"!==c.chart.type&&"rangeArea"!==c.chart.type&&"rangeBar"!==t[d].type&&"rangeArea"!==t[d].type||(this.w.axisFlags.isRangeData=!0,this.handleRangeData(t,d));const f=t[d].type||c.chart.type;if(Le(f)){const e=Ee(f),s=e&&e.yExtent;(e&&"rangeXY"===e.dataType||"function"==typeof s)&&(this.w.axisFlags.isRangeData=!0,this.handleCustomRangeData(t,d,s))}if(this.isMultiFormat())this.isFormat2DArray()?this.handleFormat2DArray(t,d):this.isFormatXY()&&this.handleFormatXY(t,d),"candlestick"!==c.chart.type&&"candlestick"!==t[d].type&&"boxPlot"!==c.chart.type&&"boxPlot"!==t[d].type||this.handleCandleStickBoxData(t,d),"violin"!==c.chart.type&&"violin"!==t[d].type||this.handleViolinData(t,d),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,d!==this.activeSeriesIndex||this.fallbackToCategory||(this.w.axisFlags.isXNumeric=!0);else{"datetime"===c.xaxis.type?(this.w.axisFlags.isXNumeric=!0,x(),this.w.seriesData.seriesX.push(this.twoDSeriesX)):"numeric"===c.xaxis.type&&(this.w.axisFlags.isXNumeric=!0,p.length>0&&(this.twoDSeriesX=p,this.w.seriesData.seriesX.push(this.twoDSeriesX))),this.w.labelData.labels.push(this.twoDSeriesX);const e=t[d].data.map(t=>b.parseNumber(t));this.w.seriesData.series.push(e)}this.w.seriesData.seriesZ.push(this.threeDSeries),void 0!==t[d].color?this.w.seriesData.seriesColors.push(t[d].color):this.w.seriesData.seriesColors.push(void 0)}return this.w}parseDataNonAxisCharts(t){const e=this.w.config,s=Array.isArray(t)&&t.every(t=>"number"==typeof t)&&e.labels.length>0;Array.isArray(t)&&t.some(t=>t&&"object"==typeof t&&t.data||t&&"object"==typeof t&&t.parsing);if(s){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 i=this.extractPieDataFromSeries(t);this.w.seriesData.series=i.values,this.w.seriesData.seriesNames=i.labels,"radialBar"===e.chart.type&&(this.w.seriesData.series=this.w.seriesData.series.map(t=>{const e=b.parseNumber(t);return 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}resetParsingFlags(){const t=this.w;t.axisFlags.dataWasParsed=!1,t.globals.originalSeries=null,t.config.series&&t.config.series.forEach(t=>{t.__apexParsed&&delete t.__apexParsed})}extractPieDataFromSeries(t){const e=[],s=[];if(!Array.isArray(t))return{values:[],labels:[]};if(0===t.length)return{values:[],labels:[]};const i=t[0];return"object"==typeof i&&null!==i&&i.data?(this.extractPieDataFromSeriesObjects(t,e,s),{values:e,labels:s}):{values:[],labels:[]}}extractPieDataFromSeriesObjects(t,e,s){t.forEach((t,i)=>{t.data&&Array.isArray(t.data)&&t.data.forEach(t=>{"object"==typeof t&&null!==t&&void 0!==t.x&&void 0!==t.y&&(s.push(String(t.x)),e.push(b.parseNumber(t.y)))})})}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){this.w.rangeData.seriesRange.map(t=>{t.forEach(t=>{this.w.labelData.labels.indexOf(t.x)<0&&t.x&&this.w.labelData.labels.push(t.x)})});const t=this.w.labelData.labels;if(t.length>0&&("number"==typeof t[0]||"string"==typeof t[0]))this.w.labelData.labels=[...new Set(t)];else{const e=new Map;for(const s of t){const t=JSON.stringify(s);e.has(t)||e.set(t,s)}this.w.labelData.labels=Array.from(e.values())}}if(e.xaxis.convertedCatToNumeric){new C(e).convertCatToNumericXaxis(e,this.w.seriesData.seriesX[0]),this._generateExternalLabels(t)}}else this._generateExternalLabels(t)}_generateExternalLabels(t){const e=this.w.globals,s=this.w.config;let i=[];if(e.axisCharts){if(this.w.seriesData.series.length>0)if(this.isFormatXY()){const t=s.series.map(t=>{const e=new Map;for(const s of t.data)e.has(s.x)||e.set(s.x,s);return Array.from(e.values())}),e=t.reduce((t,e,s,i)=>i[t].length>e.length?t:s,0);for(let s=0;s<t[e].length;s++)i.push(s+1)}else for(let t=0;t<this.w.seriesData.series[e.maxValsInArrayIndex].length;t++)i.push(t+1);this.w.seriesData.seriesX=[];for(let e=0;e<t.length;e++)this.w.seriesData.seriesX.push(i);this.w.globals.isBarHorizontal||(this.w.axisFlags.isXNumeric=!0)}if(0===i.length){i=e.axisCharts?[]:this.w.seriesData.series.map((t,e)=>e+1);for(let e=0;e<t.length;e++)this.w.seriesData.seriesX.push(i)}this.w.labelData.labels=i,s.xaxis.convertedCatToNumeric&&(this.w.labelData.categoryLabels=i.map(t=>s.xaxis.labels.formatter(t))),this.w.axisFlags.noLabelsProvided=!0}parseRawDataIfNeeded(t){const e=this.w.config,s=this.w.globals,i=e.parsing;if(this.w.axisFlags.dataWasParsed)return t;if(!i&&!t.some(t=>t.parsing))return t;const a=t.map((t,e)=>{var s,a,r;if(!t.data||!Array.isArray(t.data)||0===t.data.length)return t;const o={x:(null==(s=t.parsing)?void 0:s.x)||(null==i?void 0:i.x),y:(null==(a=t.parsing)?void 0:a.y)||(null==i?void 0:i.y),z:(null==(r=t.parsing)?void 0:r.z)||(null==i?void 0:i.z)};if(!o.x&&!o.y)return t;const c=t.data[0];if("object"==typeof c&&null!==c&&(Object.prototype.hasOwnProperty.call(c,"x")||Object.prototype.hasOwnProperty.call(c,"y"))||Array.isArray(c))return t;if(!o.x||!o.y||Array.isArray(o.y)&&0===o.y.length)return t;const h=t.data.map((t,e)=>{if("object"!=typeof t||null===t)return t;const s=this.getNestedValue(t,o.x);let i,a;if(Array.isArray(o.y)){const e=o.y.map(e=>this.getNestedValue(t,e));"bubble"===this.w.config.chart.type?(e.length,i=e[0]):i=e}else i=this.getNestedValue(t,o.y);o.z&&(a=this.getNestedValue(t,o.z));const r={x:s,y:i,z:void 0};if("bubble"===this.w.config.chart.type&&Array.isArray(o.y)&&2===o.y.length){const e=this.getNestedValue(t,o.y[1]);void 0!==e&&(r.z=e)}return void 0!==a&&(r.z=a),r});return l(n({},t),{data:h,__apexParsed:!0})});return this.w.axisFlags.dataWasParsed=!0,s.originalSeries||(s.originalSeries=b.clone(t)),a}getNestedValue(t,e){if(!t||"object"!=typeof t||!e)return;if(-1===e.indexOf("."))return t[e];const s=e.split(".");let i=t;for(let t=0;t<s.length;t++){if(null==i||"object"!=typeof i)return;i=i[s[t]]}return i}expandScatterJitterData(t){var e,s;const i=this.w.config,a="scatter"===i.chart.type||"bubble"===i.chart.type,r=null==(s=null==(e=i.plotOptions)?void 0:e.scatter)?void 0:s.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"!==i.xaxis.type&&(Array.isArray(i.xaxis.categories)&&i.xaxis.categories.length?this._applyBandAxis(i.xaxis.categories.slice()):Array.isArray(i.xaxis._scatterBandLabels)&&i.xaxis._scatterBandLabels.length&&this._applyBandAxis(i.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 s=c.get(String(t.x)),i=t.y,a=i.length>h?Math.ceil(i.length/h):1;for(let t=0;t<i.length;t+=a){const a=b.parseNumber(i[t]);null!==a&&e.push({x:s,y:a})}}else if(t&&"object"==typeof t&&!Array.isArray(t)){const s=String(t.x);e.push({x:c.has(s)?c.get(s):t.x,y:t.y})}else e.push(t)}),l(n({},t),{data:e})});return this._applyBandAxis(o),d}_applyBandAxis(t){var e;const s=this.w.config.xaxis,i=t.length;if(!i)return;const a=s._scatterBand=s._scatterBand||{};if(s._scatterBandLabels=t.slice(),s.type="numeric",(null==(e=this.w.interact)?void 0:e.zoomed)&&"number"==typeof s.min&&"number"==typeof s.max&&isFinite(s.min)&&isFinite(s.max)){const t=t=>Math.max(0,Math.min(i-1,t));let e=t(Math.round(s.min+.49)),r=t(Math.round(s.max-.49));r<e&&(e=r=t(Math.round((s.min+s.max)/2))),s.min=e-1,s.max=r+1,s.tickAmount=r-e+2,a.min=!0,a.max=!0,a.tick=!0}else(null==s.min||a.min)&&(s.min=-1,a.min=!0),(null==s.max||a.max)&&(s.max=i,a.max=!0),(null==s.tickAmount||"dataPoints"===s.tickAmount||a.tick)&&(s.tickAmount=i+1,a.tick=!0);s.labels=s.labels||{};const r=s.labels.formatter;if("function"!=typeof r||r._scatterBand){const e=e=>{const s=Math.round(e);return Math.abs(e-s)<1e-6&&void 0!==t[s]?t[s]:""};e._scatterBand=!0,s.labels.formatter=e}}parseData(t){var e,s,i,a,r,o;const c=this.w,h=c.config,d=c.globals;if(t=this.parseRawDataIfNeeded(t),t=this.expandScatterJitterData(t),(null==(e=h.chart.dataReducer)?void 0:e.enabled)&&d.axisCharts&&!d.dataReducerRawSeries){d.dataReducerRawSeries=t.map(t=>({data:Array.isArray(null==t?void 0:t.data)?t.data.slice():null==t?void 0:t.data}));let e=1/0,o=-1/0;for(const n of t){const t=null==n?void 0:n.data;if(!Array.isArray(t)||0===t.length)continue;const l=!Array.isArray(t[0]),c=l?null==(s=t[0])?void 0:s.x:null==(i=t[0])?void 0:i[0],h=l?null==(a=t[t.length-1])?void 0:a.x:null==(r=t[t.length-1])?void 0:r[0];"number"==typeof c&&(e=Math.min(e,c)),"number"==typeof h&&(o=Math.max(o,h))}e!==1/0&&(d.dataReducerRawMinX=e,d.dataReducerRawMaxX=o)}if(h.series=t,d.dataReducerRawSeries&&(null==(o=h.chart.dataReducer)?void 0:o.enabled)){const e=d.dataReducerRawSeries;d.initialSeries=t.map((t,s)=>{var i,a,r;return l(n({},t),{data:null!=(r=null==(a=null==(i=e[s])?void 0:i.data)?void 0:a.slice())?r:t.data})})}else d.initialSeries=b.clone(t);if(this.excludeCollapsedSeriesInYAxis(),this.fallbackToCategory=!1,this.resetGlobals(),this.isMultipleY(),d.axisCharts?(this.parseDataAxisCharts(t),this.coreUtils.getLargestSeries()):this.parseDataNonAxisCharts(t),h.chart.stacked){const t=new ee(this.w);this.w.seriesData.series=t.setNullSeriesToZeroValues(this.w.seriesData.series)}this.coreUtils.getSeriesTotals(),d.axisCharts&&(this.w.seriesData.stackedSeriesTotals=this.coreUtils.getStackedSeriesTotals(),this.w.seriesData.stackedSeriesTotalsByGroups=this.coreUtils.getStackedSeriesTotalsByGroups()),this.coreUtils.getPercentSeries(),this.w.axisFlags.dataFormatXNumeric||this.w.axisFlags.isXNumeric&&("numeric"!==h.xaxis.type||0!==h.labels.length||0!==h.xaxis.categories.length)||this.handleExternalLabelsData(t);const p=this.coreUtils.getCategoryLabels(this.w.labelData.labels);for(let t=0;t<p.length;t++)if(Array.isArray(p[t])){this.w.axisFlags.isMultiLineX=!0;break}return{seriesData:{series:this.w.seriesData.series,seriesNames:this.w.seriesData.seriesNames,seriesX:this.w.seriesData.seriesX,seriesZ:this.w.seriesData.seriesZ,seriesColors:this.w.seriesData.seriesColors,seriesGoals:this.w.seriesData.seriesGoals,initialSeries:d.initialSeries,originalSeries:d.originalSeries,stackedSeriesTotals:this.w.seriesData.stackedSeriesTotals,stackedSeriesTotalsByGroups:this.w.seriesData.stackedSeriesTotalsByGroups,noLabelsProvided:this.w.axisFlags.noLabelsProvided},rangeData:{seriesRangeStart:this.w.rangeData.seriesRangeStart,seriesRangeEnd:this.w.rangeData.seriesRangeEnd,seriesRange:this.w.rangeData.seriesRange},candleData:{seriesCandleO:this.w.candleData.seriesCandleO,seriesCandleH:this.w.candleData.seriesCandleH,seriesCandleM:this.w.candleData.seriesCandleM,seriesCandleL:this.w.candleData.seriesCandleL,seriesCandleC:this.w.candleData.seriesCandleC,seriesBoxPoints:this.w.candleData.seriesBoxPoints},labelData:{labels:this.w.labelData.labels,categoryLabels:this.w.labelData.categoryLabels},axisFlags:{isXNumeric:this.w.axisFlags.isXNumeric,dataFormatXNumeric:this.w.axisFlags.dataFormatXNumeric,isDataXYZ:this.w.axisFlags.isDataXYZ,isRangeData:this.w.axisFlags.isRangeData,isRangeBar:this.w.axisFlags.isRangeBar,isMultiLineX:this.w.axisFlags.isMultiLineX,dataWasParsed:this.w.axisFlags.dataWasParsed,hasXaxisGroups:this.w.labelData.hasXaxisGroups,groups:this.w.labelData.groups,seriesGroups:this.w.labelData.seriesGroups}}}static sliceByXRange(t,e,s){const i=t.length;if(0===i)return t;const a=!Array.isArray(t[0])?t=>t.x:t=>t[0];let r=0;if(null!=e){let s=0,o=i-1;for(;s<=o;){const i=s+o>>1;a(t[i])<e?s=i+1:o=i-1}r=Math.max(0,s-1)}let o=i;if(null!=s){let e=0,r=i-1;for(;e<=r;){const i=e+r>>1;a(t[i])>s?r=i-1:e=i+1}o=Math.min(i,e+1)}return 0===r&&o===i?t.slice():t.slice(r,o)}static lttbDownsample(t,e){const s=t.length;if(e>=s||e<3)return t;const i=!Array.isArray(t[0]),a=i?t=>t.x:t=>t[0],r=i?t=>t.y:t=>t[1],o=[];o.push(t[0]);const n=(s-2)/(e-2);let l=0;for(let i=0;i<e-2;i++){const e=Math.floor((i+1)*n)+1,c=Math.min(Math.floor((i+2)*n)+1,s);let h=0,d=0;const p=c-e;for(let s=e;s<c;s++)h+=a(t[s]),d+=r(t[s]);h/=p,d/=p;const g=Math.floor(i*n)+1,u=Math.min(Math.floor((i+1)*n)+1,s),x=a(t[l]),f=r(t[l]);let m=-1,b=g;for(let e=g;e<u;e++){const s=.5*Math.abs((x-h)*(r(t[e])-f)-(x-a(t[e]))*(d-f));s>m&&(m=s,b=e)}o.push(t[b]),l=b}return o.push(t[s-1]),o}static ohlcAggregate(t,e){const s=t.length;if(e>=s||e<1)return t;const i=!Array.isArray(t[0]),a=i?t=>t.x:t=>t[0],r=i?t=>t.y:t=>t[1],o=i?(t,e)=>({x:t,y:e}):(t,e)=>[t,e],n=[],l=s/e;for(let i=0;i<e;i++){const c=Math.floor(i*l),h=i===e-1?s:Math.floor((i+1)*l);if(h<=c)continue;const d=r(t[c]),p=d[0];let g=d[1],u=d[2],x=d[3];for(let e=c+1;e<h;e++){const s=r(t[e]);s[1]>g&&(g=s[1]),s[2]<u&&(u=s[2]),x=s[3]}n.push(o(a(t[c]),[p,g,u,x]))}return n}static rangeAggregate(t,e){const s=t.length;if(e>=s||e<1)return t;const i=!Array.isArray(t[0]),a=i?t=>t.x:t=>t[0],r=i?t=>t.y:t=>t[1],o=i?(t,e)=>({x:t,y:e}):(t,e)=>[t,e],n=[],l=s/e;for(let i=0;i<e;i++){const c=Math.floor(i*l),h=i===e-1?s:Math.floor((i+1)*l);if(h<=c)continue;let d=1/0,p=-1/0;for(let e=c;e<h;e++){const s=r(t[e]);if(null!=s)for(let t=0;t<2;t++){const e=s[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((s,i)=>{let a=0;s.forEach(e=>{-1!==t.globals.collapsedSeriesIndices.indexOf(e)&&a++}),a>0&&a==s.length&&e.push(i)}),t.globals.ignoreYAxisIndexes=e.map(t=>t)}}class Be{constructor(t,e){this.w=t,this.ctx=e}_updateOptions(t,e=!1,s=!0,i=!0,a=!1){return new Promise(r=>{let o=[this.ctx];i&&(o=this.ctx.getSyncedCharts()),this.w.globals.isExecCalled&&(o=[this.ctx],this.w.globals.isExecCalled=!1),o.forEach((i,n)=>{var l,c;const h=i.w;if(h.globals.shouldAnimate=s,e||(h.globals.resized=!0,h.globals.dataChanged=!0,s&&i.series.getPreviousPaths()),s&&t&&"object"==typeof t){const e=null==(l=null==t?void 0:t.chart)?void 0:l.type,s=h.config.chart.requestedType||h.config.chart.type;e&&e!==s&&(null==(c=i.morphTypeChange)||c.captureBeforeDestroy({fromType:s,toType:e,newSeries:t.series||h.config.series}))}if(t&&"object"==typeof t){i.config=new M(t);const e=t.chart&&t.chart.type,s="funnel"===e||"pyramid"===e||"gauge"===e,r=!!h.config.chart.requestedType;if(e&&!s&&r){t.chart=t.chart||{},t.chart.requestedType=e;const s=h.config.chart.requestedType;"funnel"!==s&&"pyramid"!==s||(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(i.config.normalizeAliasedChartType(t),t=_.extendArrayProps(i.config,t,h),i.w.globals.chartID!==this.w.globals.chartID&&(delete t.series,delete t.yaxis),h.config=b.extend(h.config,t),a&&(h.globals.lastXAxis=t.xaxis?b.clone(t.xaxis):[],h.globals.lastYAxis=t.yaxis?b.clone(t.yaxis):[],h.globals.initialConfig=b.extend({},h.config),h.globals.initialSeries=b.clone(h.config.series),t.series)){for(let t=0;t<h.globals.collapsedSeriesIndices.length;t++){const e=h.config.series[h.globals.collapsedSeriesIndices[t]];h.globals.collapsedSeries[t].data=h.globals.axisCharts?e.data.slice():e}for(let t=0;t<h.globals.ancillaryCollapsedSeriesIndices.length;t++){const e=h.config.series[h.globals.ancillaryCollapsedSeriesIndices[t]];h.globals.ancillaryCollapsedSeries[t].data=h.globals.axisCharts?e.data.slice():e}i.series.emptyCollapsedSeries(h.config.series)}}return i.update(t).then(()=>{n===o.length-1&&r(i)})})})}_updateSeries(t,e,s=!1){return new Promise(i=>{const a=this.w;a.globals.shouldAnimate=e,a.globals.dataChanged=!0;const r=JSON.stringify({y:(a.globals.yAxisScale||[]).map(t=>t?t.result:null),xMin:a.globals.minX,xMax:a.globals.maxX});At.invalidateSelectors(a),e&&this.ctx.series.getPreviousPaths();const o=a.config.series.length,n=a.config.series.map(t=>{var e,s;return null!=(s=null==(e=null==t?void 0:t.data)?void 0:e.length)?s:0});a.globals.dataReducerRawSeries=null,this.ctx.data.resetParsingFlags();const l=this.ctx.data.parseData(t);return this.ctx._writeParsedSeriesData(l.seriesData),this.ctx._writeParsedRangeData(l.rangeData),this.ctx._writeParsedCandleData(l.candleData),this.ctx._writeParsedLabelData(l.labelData),this.ctx._writeParsedAxisFlags(l.axisFlags),s&&(a.globals.initialConfig&&(a.globals.initialConfig.series=b.clone(a.config.series)),a.globals.initialSeries=b.clone(a.config.series)),this._canUseFastPath(t,o,n,a)?this.ctx.fastUpdate(e,r).then(()=>{i(this.ctx)}):this.ctx.update().then(()=>{i(this.ctx)})})}_canUseFastPath(t,e,s,i){return!!i.dom.elGraphical&&(!!i.globals.axisCharts&&(t.length===e&&(!t.some((t,e)=>{var i,a;return(null!=(a=null==(i=null==t?void 0:t.data)?void 0:i.length)?a:0)!==s[e]})&&(!(i.globals.collapsedSeries.length>0)&&(!(i.globals.ancillaryCollapsedSeries.length>0)&&(!(i.globals.risingSeries.length>0)&&(!i.globals.comboCharts&&!i.interact.zoomed)))))))}_extendSeries(t,e){const s=this.w,i=s.config.series[e];return l(n({},s.config.series[e]),{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,zIndex:void 0!==t.zIndex?t.zIndex:e})}toggleDataPointSelection(t,e){const s=this.w;let i=null;const a=`.apexcharts-series[data\\:realIndex='${t}']`;if(s.globals.axisCharts?i=s.dom.Paper.findOne(`${a} path[j='${e}'], ${a} circle[j='${e}'], ${a} rect[j='${e}']`):void 0===e&&(i=s.dom.Paper.findOne(`${a} path[j='${t}']`),"pie"!==s.config.chart.type&&"polarArea"!==s.config.chart.type&&"donut"!==s.config.chart.type||this.ctx.pie.pieClicked(t)),!i)return null;new ut(this.w).pathMouseDown(i,null);return i.node?i.node:null}forceXAxisUpdate(t){const e=this.w;if(["min","max"].forEach(s=>{void 0!==t.xaxis[s]&&(e.config.xaxis[s]=t.xaxis[s],e.globals.lastXAxis[s]=t.xaxis[s])}),t.xaxis.categories&&t.xaxis.categories.length&&(e.config.xaxis.categories=t.xaxis.categories),e.config.xaxis.convertedCatToNumeric){const e=new C(t);t=e.convertCatToNumericXaxis(t,this.ctx)}return t}forceYAxisUpdate(t){return t.chart&&t.chart.stacked&&"100%"===t.chart.stackType&&(Array.isArray(t.yaxis)?t.yaxis.forEach((e,s)=>{t.yaxis[s].min=0,t.yaxis[s].max=100}):(t.yaxis.min=0,t.yaxis.max=100)),t}revertDefaultAxisMinMax(t){const e=this.w;let s=e.globals.lastXAxis,i=e.globals.lastYAxis;t&&t.xaxis&&(s=t.xaxis),t&&t.yaxis&&(i=t.yaxis);const a=s;e.config.xaxis.min=a.min,e.config.xaxis.max=a.max;const r=t=>{if(void 0!==i[t]){const s=i[t];e.config.yaxis[t].min=s.min,e.config.yaxis[t].max=s.max}};e.config.yaxis.map((t,s)=>{e.interact.zoomed||void 0!==i[s]?r(s):void 0!==this.ctx.opts.yaxis[s]&&(t.min=this.ctx.opts.yaxis[s].min,t.max=this.ctx.opts.yaxis[s].max)})}}class Ne{constructor(t){this.w=t.w,this.ttCtx=t}getNearestValues({hoverArea:t,elGrid:e,clientX:s,clientY:i}){var a,r;const o=this.w,n=e.getBoundingClientRect(),l=n.width,c=n.height;let h=l/(o.globals.dataPoints-1);const d=c/o.globals.dataPoints,p=this.hasBars();!o.globals.comboCharts&&!p||o.config.xaxis.convertedCatToNumeric||(h=l/o.globals.dataPoints);const g=s-n.left-o.globals.barPadForNumericAxis,u=i-n.top;g<0||u<0||g>l||u>c?(t.classList.remove("hovering-zoom"),t.classList.remove("hovering-pan")):o.interact.zoomEnabled?(t.classList.remove("hovering-pan"),t.classList.add("hovering-zoom")):o.interact.panEnabled&&(t.classList.remove("hovering-zoom"),t.classList.add("hovering-pan"));let x=Math.round(g/h);const f=Math.floor(u/d);p&&!o.config.xaxis.convertedCatToNumeric&&(x=Math.ceil(g/h),x-=1);let m=null,y=null,w=o.globals.seriesXvalues.map(t=>t.filter(t=>b.isNumber(t)));const v=o.globals.seriesYvalues.map(t=>t.filter(t=>b.isNumber(t)));if(o.axisFlags.isXNumeric){const t=this.ttCtx.getElGrid();if(!t)return{hoverX:g,hoverY:u};const e=t.getBoundingClientRect(),s=g*(e.width/l),i=u*(e.height/c);y=this.closestInMultiArray(s,i,w,v),m=y.index,x=null!=(a=y.j)?a:0,null!==m&&o.globals.hasNullValues&&(w=o.globals.seriesXvalues[m],y=this.closestInArray(s,w),x=null!=(r=y.j)?r:0)}return o.interact.capturedSeriesIndex=null===m?-1:m,(!x||x<1)&&(x=0),o.globals.isBarHorizontal?o.interact.capturedDataPointIndex=f:o.interact.capturedDataPointIndex=x,{capturedSeries:m,j:o.globals.isBarHorizontal?f:x,hoverX:g,hoverY:u}}getFirstActiveXArray(t){const e=this.w;let s=0;const i=t.map((t,e)=>t.length>0?e:-1);for(let t=0;t<i.length;t++)if(-1!==i[t]&&-1===e.globals.collapsedSeriesIndices.indexOf(t)&&-1===e.globals.ancillaryCollapsedSeriesIndices.indexOf(t)){s=i[t];break}return s}closestInMultiArray(t,e,s,i){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;if(a.globals.allSeriesHasEqualX){let a=1/0;for(let e=0;e<s.length;e++){if(!r(e))continue;const o=s[e],n=i[e],l=Math.min(o.length,n.length);for(let e=0;e<l;e++){const s=Math.abs(t-o[e]);s<a&&(a=s,h=e)}}if(null!==h)if(n){let a=1/0;for(let o=0;o<s.length;o++){if(!r(o))continue;const n=s[o],l=i[o],d=Math.min(n.length,l.length);if(d<2){const t=l[h];if("number"!=typeof t)continue;const s=Math.abs(e-t);s<a&&(a=s,c=o);continue}for(let s=0;s<d-1;s++){const i=this._distanceToSegment(t,e,n[s],l[s],n[s+1],l[s+1]);i.dist<a&&(a=i.dist,c=o)}}}else{let t=1/0;for(let a=0;a<s.length;a++){if(!r(a))continue;const s=i[a][h];if("number"!=typeof s)continue;const o=Math.abs(e-s);o<t&&(t=o,c=a)}}return{index:c,j:h}}for(let a=0;a<s.length;a++){if(!r(a))continue;const o=s[a],d=i[a],p=Math.min(o.length,d.length);if(n&&p>=2)for(let s=0;s<p-1;s++){const i=this._distanceToSegment(t,e,o[s],d[s],o[s+1],d[s+1]);i.dist<l&&(l=i.dist,c=a,h=i.t<.5?s:s+1)}else for(let s=0;s<p;s++){const i=t-o[s],r=e-d[s],n=Math.sqrt(i*i+r*r);n<l&&(l=n,c=a,h=s)}}return{index:c,j:h}}_distanceToSegment(t,e,s,i,a,r){const o=a-s,n=r-i,l=o*o+n*n;let c=0===l?0:((t-s)*o+(e-i)*n)/l;c<0?c=0:c>1&&(c=1);const h=t-(s+c*o),d=e-(i+c*n);return{dist:Math.sqrt(h*h+d*d),t:c}}closestInArray(t,e){const s=e[0];let i=null,a=Math.abs(t-s);for(let s=0;s<e.length;s++){const r=Math.abs(t-e[s]);r<a&&(a=r,i=s)}return{j:i}}isXoverlap(t){const e=[],s=this.w.seriesData.seriesX.filter(t=>void 0!==t[0]);if(s.length>0)for(let i=0;i<s.length-1;i++)void 0!==s[i][t]&&void 0!==s[i+1][t]&&s[i][t]!==s[i+1][t]&&e.push("unEqual");return 0===e.length}isInitialSeriesSameLen(){var t,e,s;let i=!0;const a=(null==(t=this.w.globals.initialSeries)?void 0:t.filter((t,e)=>{var s;return!(null==(s=this.w.globals.collapsedSeriesIndices)?void 0:s.includes(e))}))||[];for(let t=0;t<a.length-1;t++){if(!(null==(e=a[t])?void 0:e.data)||!(null==(s=a[t+1])?void 0:s.data))return!0;if(a[t].data.length!==a[t+1].data.length){i=!1;break}}return i}getBarsHeight(t){return[...t].reduce((t,e)=>t+e.getBBox().height,0)}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 s=Number(t.getAttribute("data:realIndex")),i=Number(e.getAttribute("data:realIndex"));return i<s?1:i>s?-1:0});const s=[];return e.forEach(t=>{s.push(t.querySelector(".apexcharts-marker"))}),s}hasMarkers(t){return this.getElMarkers(t).length>0}getPathFromPoint(t,e){const s=Number(t.getAttribute("cx")),i=Number(t.getAttribute("cy")),a=t.getAttribute("shape");return new ut(this.w).getMarkerPath(s,i,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 s=e.config.markers.hover.size;return void 0===s&&(s=e.globals.markers.size[t]+e.config.markers.hover.sizeOffset),s}toggleAllTooltipSeriesGroups(t){const e=this.w,s=this.ttCtx;0===s.allTooltipSeriesGroups.length&&(s.allTooltipSeriesGroups=e.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));const i=s.allTooltipSeriesGroups;for(let s=0;s<i.length;s++)"enable"===t?(i[s].classList.add("apexcharts-active"),i[s].style.display=e.config.tooltip.items.display):(i[s].classList.remove("apexcharts-active"),i[s].style.display="none")}}class Xe{constructor(t){this.w=t.w,this.ttCtx=t,this.tooltipUtil=new Ne(t)}drawSeriesTexts({shared:t=!0,ttItems:e,i:s=0,j:i=null,y1:a,y2:r,e:o}){const n=this.w;void 0!==n.config.tooltip.custom?this.handleCustomTooltip({i:s,j:i,y1:a,y2:r,w:n}):this.toggleActiveInactiveSeries(t,s);const l=this.getValuesToPrint({i:s,j:i});this.printLabels({i:s,j:i,values:l,ttItems:e,shared:t,e:o});const c=this.ttCtx.getElTooltip();c&&(this.ttCtx.tooltipRect.ttWidth=c.getBoundingClientRect().width,this.ttCtx.tooltipRect.ttHeight=c.getBoundingClientRect().height)}printLabels({i:t,j:e,values:s,ttItems:i,shared:a,e:r}){const o=this.w,{xVal:n,zVal:l,xAxisTTVal:c}=s,h=o.seriesData.series.length,d=null!==e&&o.config.plotOptions.bar.distributed?o.globals.colors[e]:o.globals.colors[t];for(let s=0;s<h;s++){const p=o.config.tooltip.inverseOrder?h-1-s:s,g=this.computeSeriesRow({i:t,j:e,t:s,tIndex:p,shared:a,e:r,basePColor:d});this.DOMHandling({i:t,t:p,j:e,ttItems:i,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:s,shared:i,e:a,basePColor:r}){const o=this.w;let c,h=this.getFormatters(t),d=r,p=[],g="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&&(i?(h=this.getFormatters(s),g=this.getSeriesName({fn:h.yLbTitleFormatter,index:s,seriesIndex:t,j:e}),d=o.globals.colors[s],c=this.formatYValue(h,s,e),p=this.formatGoalVals(h,s,e)):(d=this.resolvePatternColor(a,d),c=this.formatYValue(h,t,e),p=this.formatGoalVals(h,t,e))),null===e&&(c=h.yLbFormatter(o.seriesData.series[t],l(n({},o),{seriesIndex:t,dataPointIndex:t}))),{seriesName:g,val:c,goalVals:p,pColor:d}}formatYValue(t,e,s){var i,a,r,o;const n=this.w;return n.axisFlags.isRangeData?t.yLbFormatter(null==(a=null==(i=n.rangeData.seriesRangeStart)?void 0:i[e])?void 0:a[s],{series:n.rangeData.seriesRangeStart,seriesIndex:e,dataPointIndex:s,w:n})+" - "+t.yLbFormatter(null==(o=null==(r=n.rangeData.seriesRangeEnd)?void 0:r[e])?void 0:o[s],{series:n.rangeData.seriesRangeEnd,seriesIndex:e,dataPointIndex:s,w:n}):t.yLbFormatter(n.seriesData.series[e][s],{series:n.seriesData.series,seriesIndex:e,dataPointIndex:s,w:n})}formatGoalVals(t,e,s){var i;const a=this.w,r=null==(i=a.seriesData.seriesGoals[e])?void 0:i[s];return Array.isArray(r)?r.map(i=>({attrs:i,val:t.yLbFormatter(i.value,{seriesIndex:e,dataPointIndex:s,w:a})})):[]}resolvePatternColor(t,e){var s,i,a;const r=this.w,o=null==(s=null==t?void 0:t.target)?void 0:s.getAttribute("fill");if(!o)return e;if(-1===o.indexOf("url"))return o;if(-1===o.indexOf("Pattern"))return e;const n=r.dom.baseEl.querySelector(o.substr(4).slice(0,-1));return null!=(a=null==(i=null==n?void 0:n.childNodes[0])?void 0:i.getAttribute("stroke"))?a:e}getFormatters(t){const e=this.w;let s,i=e.formatters.yLabelFormatters[t];return void 0!==e.formatters.ttVal?Array.isArray(e.formatters.ttVal)?(i=e.formatters.ttVal[t]&&e.formatters.ttVal[t].formatter,s=e.formatters.ttVal[t]&&e.formatters.ttVal[t].title&&e.formatters.ttVal[t].title.formatter):(i=e.formatters.ttVal.formatter,"function"==typeof e.formatters.ttVal.title.formatter&&(s=e.formatters.ttVal.title.formatter)):s=e.config.tooltip.y.title.formatter,"function"!=typeof i&&(i=e.formatters.yLabelFormatters[0]?e.formatters.yLabelFormatters[0]:function(t){return t}),"function"!=typeof s&&(s=function(t){return t?t+": ":""}),{yLbFormatter:i,yLbTitleFormatter:s}}getSeriesName({fn:t,index:e,seriesIndex:s,j:i}){const a=this.w;return t(String(a.seriesData.seriesNames[e]),{series:a.seriesData.series,seriesIndex:s,dataPointIndex:i,w:a})}DOMHandling({t:t,j:e,ttItems:s,values:i,seriesName:a,shared:r,pColor:o}){const n=this.w,l=this.ttCtx,{val:c,goalVals:h,xVal:d,xAxisTTVal:p,zVal:g}=i;if(!s||!s[t])return;let u=null;u=s[t].children,n.config.tooltip.fillSeriesColor&&(s[t].style.backgroundColor=o,u[0].style.display="none"),l.showTooltipTitle&&(null===l.tooltipTitle&&(l.tooltipTitle=n.dom.baseEl.querySelector(".apexcharts-tooltip-title")),l.tooltipTitle&&(l.tooltipTitle.innerHTML=d)),l.isXAxisTooltipEnabled&&l.xaxisTooltipText&&(l.xaxisTooltipText.innerHTML=""!==p?p:d);const x=s[t].querySelector(".apexcharts-tooltip-text-y-label");x&&(x.innerHTML=a||"");const f=s[t].querySelector(".apexcharts-tooltip-text-y-value");f&&(f.innerHTML=void 0!==c?c:""),u[0]&&u[0].classList.contains("apexcharts-tooltip-marker")&&(n.config.tooltip.marker.fillColors&&Array.isArray(n.config.tooltip.marker.fillColors)&&(o=n.config.tooltip.marker.fillColors[t]),n.config.tooltip.fillSeriesColor?u[0].style.backgroundColor=o:u[0].style.color=o),n.config.tooltip.marker.show||(u[0].style.display="none");const m=s[t].querySelector(".apexcharts-tooltip-text-goals-label"),b=s[t].querySelector(".apexcharts-tooltip-text-goals-value");if(h.length&&n.seriesData.seriesGoals[t]){const s=()=>{let t="<div>",e="<div>";h.forEach(s=>{t+=` <div style="display: flex"><span class="apexcharts-tooltip-marker" style="background-color: ${s.attrs.strokeColor}; height: 3px; border-radius: 0; top: 5px;"></span> ${s.attrs.name}</div>`,e+=`<div>${s.val}</div>`}),m.innerHTML=t+"</div>",b.innerHTML=e+"</div>"};r?n.seriesData.seriesGoals[t][e]&&Array.isArray(n.seriesData.seriesGoals[t][e])?s():(m.innerHTML="",b.innerHTML=""):s()}else m.innerHTML="",b.innerHTML="";if(null!==g){s[t].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=n.config.tooltip.z.title;s[t].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=void 0!==g?g:""}if(r&&u[0]){if(n.config.tooltip.hideEmptySeries){const e=s[t].querySelector(".apexcharts-tooltip-marker"),i=s[t].querySelector(".apexcharts-tooltip-text");0==parseFloat(c)?(e.style.display="none",i.style.display="none"):(e.style.display="block",i.style.display="block")}null==c||n.globals.ancillaryCollapsedSeriesIndices.indexOf(t)>-1||n.globals.collapsedSeriesIndices.indexOf(t)>-1||Array.isArray(l.tConfig.enabledOnSeries)&&-1===l.tConfig.enabledOnSeries.indexOf(t)?u[0].parentNode.style.display="none":u[0].parentNode.style.display=n.config.tooltip.items.display}else Array.isArray(l.tConfig.enabledOnSeries)&&-1===l.tConfig.enabledOnSeries.indexOf(t)&&(u[0].parentNode.style.display="none")}toggleActiveInactiveSeries(t,e){const s=this.w;if(t)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");const t=s.dom.baseEl.querySelector(`.apexcharts-tooltip-series-group-${e}`);if(t){const e=t;e.classList.add("apexcharts-active"),e.style.display=s.config.tooltip.items.display}}}getValuesToPrint({i:t,j:e}){var s,i,a,r,o,n,l,c;const h=this.w,d=h.seriesData.seriesX.map(t=>t.length>0?t:[]);let p="",g="",u=null,x=null;const f={series:h.seriesData.series,seriesIndex:t,dataPointIndex:e,w:h},m=h.formatters.ttZFormatter;if(null===e)x=h.seriesData.series[t];else if(h.axisFlags.isXNumeric&&"treemap"!==h.config.chart.type){if(p=d[t][e],0===d[t].length){p=d[this.tooltipUtil.getFirstActiveXArray(d)][e]}}else{p=new Pe(this.w).isFormatXY()?void 0!==h.config.series[t].data[e]?h.config.series[t].data[e].x:"":void 0!==h.labelData.labels[e]?h.labelData.labels[e]:""}const b=p;if(h.axisFlags.isXNumeric&&"datetime"===h.config.xaxis.type){p=new w(this.w).xLabelFormat(h.formatters.ttKeyFormatter,b,b,{i:void 0,dateFormatter:new y(this.w).formatDate,w:this.w})}else p=h.globals.isBarHorizontal?h.formatters.yLabelFormatters[0](b,f):null!=(a=null==(i=(s=h.formatters).xLabelFormatter)?void 0:i.call(s,b,f))?a:b;return void 0!==h.config.tooltip.x.formatter&&(p=null!=(n=null==(o=(r=h.formatters).ttKeyFormatter)?void 0:o.call(r,b,f))?n:b),h.seriesData.seriesZ.length>0&&h.seriesData.seriesZ[t].length>0&&(u=null==m?void 0:m(h.seriesData.seriesZ[t][e],h)),g="function"==typeof h.config.xaxis.tooltip.formatter?null==(c=(l=h.formatters).xaxisTooltipFormatter)?void 0:c.call(l,b,f):p,{val:Array.isArray(x)?x.join(" "):x,xVal:Array.isArray(p)?p.join(" "):p,xAxisTTVal:Array.isArray(g)?g.join(" "):g,zVal:u}}handleCustomTooltip({i:t,j:e,y1:s,y2:i,w:a}){const r=this.ttCtx.getElTooltip();let o=a.config.tooltip.custom;Array.isArray(o)&&o[t]&&(o=o[t]);const n=o({series:a.seriesData.series,seriesIndex:t,dataPointIndex:e,y1:s,y2:i,w:a});r&&("string"==typeof n||"number"==typeof n?r.innerHTML=String(n):(n instanceof Element||"string"==typeof n.nodeName)&&(r.innerHTML="",r.appendChild(n.cloneNode(!0))))}}class Ie{constructor(t){this.ttCtx=t,this.w=t.w}moveXCrosshairs(t,e=null){const s=this.ttCtx,i=this.w,a=s.getElXCrosshairs();let r=t-s.xcrosshairsWidth/2;const o=i.labelData.labels.slice().length;if(null!==e&&(r=i.layout.gridWidth/o*e),null===a||i.globals.isBarHorizontal||(a.setAttribute("x",String(r)),a.setAttribute("x1",String(r)),a.setAttribute("x2",String(r)),a.setAttribute("y2",String(i.layout.gridHeight)),a.classList.add("apexcharts-active")),r<0&&(r=0),r>i.layout.gridWidth&&(r=i.layout.gridWidth),s.isXAxisTooltipEnabled){let t=r;"tickWidth"!==i.config.xaxis.crosshairs.width&&"barWidth"!==i.config.xaxis.crosshairs.width||(t=r+s.xcrosshairsWidth/2),this.moveXAxisTooltip(t)}}moveYCrosshairs(t){const e=this.ttCtx;null!==e.ycrosshairs&&ut.setAttrs(e.ycrosshairs,{y1:t,y2:t}),null!==e.ycrosshairsHidden&&ut.setAttrs(e.ycrosshairsHidden,{y1:t,y2:t})}moveXAxisTooltip(t){var e,s;const i=this.w,a=this.ttCtx;if(null!==a.xaxisTooltip&&0!==a.xcrosshairsWidth){a.xaxisTooltip.classList.add("apexcharts-active");const r=a.xaxisOffY+i.config.xaxis.tooltip.offsetY+i.layout.translateY+5+i.config.xaxis.offsetY;if(t-=a.xaxisTooltip.getBoundingClientRect().width/2,!isNaN(t)){t+=i.layout.translateX;const o=new ut(this.w).getTextRects(null!=(s=null==(e=a.xaxisTooltipText)?void 0:e.innerHTML)?s:"",i.config.xaxis.labels.style.fontSize);a.xaxisTooltipText&&(a.xaxisTooltipText.style.minWidth=o.width+"px"),a.xaxisTooltip.style.left=t+"px",a.xaxisTooltip.style.top=r+"px"}}}moveYAxisTooltip(t){var e,s;const i=this.w,a=this.ttCtx;null===a.yaxisTTEls&&(a.yaxisTTEls=[...i.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip")]);const r=parseInt(null!=(s=null==(e=a.ycrosshairsHidden)?void 0:e.getAttribute("y1"))?s:"0",10);let o=i.layout.translateY+r;if(a.yaxisTTEls){const e=a.yaxisTTEls[t].getBoundingClientRect(),s=e.height;let r;const n=i.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${t}'] .apexcharts-yaxis-texts-g`),l=i.dom.elWrap.getBoundingClientRect();if(n){const t=n.getBoundingClientRect();if(t.width>0){r=t.left+t.width/2-l.left-e.width/2}}if(null==r){const s=4;r=i.config.yaxis[t].opposite?i.globals.translateYAxisX[t]+s:i.globals.translateYAxisX[t]-e.width-s}o-=s/2,-1===i.globals.ignoreYAxisIndexes.indexOf(t)&&o>0&&o<i.layout.gridHeight?(a.yaxisTTEls[t].classList.add("apexcharts-active"),a.yaxisTTEls[t].style.top=o+"px",a.yaxisTTEls[t].style.left=r+i.config.yaxis[t].tooltip.offsetX+"px"):a.yaxisTTEls[t].classList.remove("apexcharts-active")}}moveTooltip(t,e,s=null){const i=this.ttCtx.getElTooltip();if(!i)return;const a=this.computeTooltipPosition(t,e,s);null!==a&&this.applyTooltipPosition(i,a)}computeTooltipPosition(t,e,s=null){var i,a,r,o,n,l,c;const h=this.w,d=this.ttCtx,p=d.tooltipRect,g=!!h.config.tooltip.arrow,u=null!==s?parseFloat(String(s)):1,x=p.ttHeight||0,f=p.ttWidth||0,m=parseFloat(String(t)),b=parseFloat(String(e));if(isNaN(m))return null;let y=m+u+5;const w=b+h.layout.translateY;let v=g?w-x/2+u/2:b+u/2,A="right";if(y>h.layout.gridWidth/2&&(y=y-f-u-10,A="left"),y>h.layout.gridWidth-f-10&&(y=h.layout.gridWidth-f),y<-20&&(y=-20),h.config.tooltip.followCursor){const t=d.getElGrid();if(!t)return null;const e=t.getBoundingClientRect();y=d.e.clientX-e.left,y>h.layout.gridWidth/2?(y-=f,A="left"):A="right",v=d.e.clientY+h.layout.translateY-e.top,v>h.layout.gridHeight/2&&(v-=x)}else if(!h.globals.isBarHorizontal)if(g){const t=h.layout.translateY,e=h.layout.translateY+h.layout.gridHeight;v+x>e&&(v=e-x),v<t&&(v=t)}else x/2+v>h.layout.gridHeight&&(v=h.layout.gridHeight-x+h.layout.translateY);if(isNaN(y))return null;y+=h.layout.translateX;const C=null==(a=null==(i=h.config)?void 0:i.chart)?void 0:a.accessibility;if((null==C?void 0:C.enabled)&&(null==(o=null==(r=null==C?void 0:C.keyboard)?void 0:r.navigation)?void 0:o.enabled)&&(null==(c=null==(l=null==(n=h.dom)?void 0:n.baseEl)?void 0:l.querySelector)?void 0:c.call(l,".apexcharts-keyboard-focused"))){const t=g?w:b,e=(u||1)+12,s=v,i=v+x;!isNaN(t)&&x>0&&s<t+e&&i>t-e&&(v=t-x-e,v<0&&(v=t+e))}let S=null;if(g&&x>0){const t=w-v,e=10,s=x-10;S=Math.max(e,Math.min(s,t))}return{x:y,y:v,placement:A,arrowY:S}}applyTooltipPosition(t,e){if(!t)return;const s="true"!==t.dataset.positioned;s&&(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"),s&&(t.offsetWidth,t.dataset.positioned="true",requestAnimationFrame(()=>{t.style.transitionProperty=""}))}moveMarkers(t,e){var s;const i=this.w,a=this.ttCtx;if(i.globals.markers.size[t]>0){const r=i.dom.baseEl.querySelectorAll(` .apexcharts-series[data\\:realIndex='${t}'] .apexcharts-marker`);for(let t=0;t<r.length;t++)parseInt(null!=(s=r[t].getAttribute("rel"))?s:"0",10)===e&&(a.marker.resetPointsSize(),a.marker.enlargeCurrentPoint(e,r[t]))}else a.marker.resetPointsSize(),this.moveDynamicPointOnHover(e,t)}moveDynamicPointOnHover(t,e){var s,i,a,r,o;const n=this.w,l=this.ttCtx;let c=0,h=0;const d=new ut(this.w),p=n.globals.pointsArray,g=l.tooltipUtil.getHoverMarkerSize(e),u=n.config.series[e].type;if(u&&("column"===u||"candlestick"===u||"boxPlot"===u||"violin"===u))return;c=null==(i=null==(s=p[e])?void 0:s[t])?void 0:i[0],h=(null==(r=null==(a=p[e])?void 0:a[t])?void 0:r[1])||0;const x=n.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${e}'] .apexcharts-series-markers path`);if(x&&h<n.layout.gridHeight&&h>0){const t=null!=(o=x.getAttribute("shape"))?o:"circle",e=d.getMarkerPath(c,h,t,1.5*g);x.setAttribute("d",e)}this.moveXCrosshairs(c),l.fixedTooltip||this.moveTooltip(c,h,g)}moveDynamicPointsOnHover(t){var e,s;const i=this.ttCtx,a=i.w;let r=0,o=0,n=0;const l=a.globals.pointsArray,c=new ee(this.w),h=new ut(this.w);n=c.getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);const d=i.tooltipUtil.getHoverMarkerSize(n);if((null==(e=l[n])?void 0:e[t])&&(r=l[n][t][0],o=l[n][t][1]),isNaN(r))return;const p=i.tooltipUtil.getAllMarkers();if(p.length)for(let e=0;e<a.seriesData.series.length;e++){const i=l[e];if(a.globals.comboCharts&&void 0===i&&p.splice(e,0,null),p[e]&&i&&i.length){let i,o=l[e][t][1];p[e].setAttribute("cx",r);const n=null!=(s=p[e].getAttribute("shape"))?s:"circle";if("rangeArea"===a.config.chart.type&&!a.globals.comboCharts){const s=t+a.seriesData.series[e].length;i=l[e][s][1];o-=Math.abs(o-i)/2}if(null!==o&&!isNaN(o)&&o<a.layout.gridHeight+d&&o+d>0){const t=h.getMarkerPath(r,o,n,d);p[e].setAttribute("d",t)}else p[e].setAttribute("d","")}}this.moveXCrosshairs(r),i.fixedTooltip||this.moveTooltip(r,o||a.layout.gridHeight,d)}moveStickyTooltipOverBars(t,e){var s,i,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 ee(this.w).getActiveConfigSeriesIndex("desc")+1}let d=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[j='${t}'], .apexcharts-rangebar-series .apexcharts-series[rel='${h}'] path[j='${t}']`);d||"number"!=typeof e||(d=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[j='${t}'],\n .apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='${e}'] path[j='${t}']`));let p=null;const g=n.globals.barCanvasCoords;if(!d&&g&&(p="number"==typeof e&&(null==(s=g[e])?void 0:s[t])||null,!p))for(const e in g)if(null==(i=g[e])?void 0:i[t]){p=g[e][t];break}let u=d?parseFloat(null!=(a=d.getAttribute("cx"))?a:"0"):p?p.cx:0,x=d?parseFloat(null!=(r=d.getAttribute("cy"))?r:"0"):p?p.cy:0;const f=d?parseFloat(null!=(o=d.getAttribute("barWidth"))?o:"0"):p?p.barWidth:0,m=l.getElGrid();if(!m)return;const b=m.getBoundingClientRect(),y=d&&(d.classList.contains("apexcharts-candlestick-area")||d.classList.contains("apexcharts-boxPlot-area"));if(n.axisFlags.isXNumeric){if(d&&!y){const e=this._datapointCenterXFromBars(t,b);null!=e?u=e:u-=c%2!=0?f/2:0}d&&y&&(u-=f/2)}else n.globals.isBarHorizontal||p||(u=l.xAxisTicksPositions[t-1]+l.dataPointsDividedWidth/2,isNaN(u)&&(u=l.xAxisTicksPositions[t]-l.dataPointsDividedWidth/2));if(n.globals.isBarHorizontal?x-=l.tooltipRect.ttHeight:n.config.tooltip.followCursor?x=l.e.clientY-b.top-l.tooltipRect.ttHeight/2:x+l.tooltipRect.ttHeight+15>n.layout.gridHeight&&(x=n.layout.gridHeight),n.globals.isBarHorizontal||this.moveXCrosshairs(u),!l.fixedTooltip){if(n.globals.isBarHorizontal&&!n.config.tooltip.followCursor){if(this.placeHorizontalSharedTooltip(t))return}this.moveTooltip(u,x||n.layout.gridHeight)}}_datapointCenterXFromBars(t,e){var s,i;const a=this.w,r=a.dom.baseEl.querySelectorAll(`.apexcharts-bar-series path[j='${t}'],.apexcharts-rangebar-series path[j='${t}']`);if(!r.length)return null;let o=1/0,n=-1/0;for(const t of r){const e=t.parentNode;if(null==(i=null==(s=null==e?void 0:e.classList)?void 0:s.contains)?void 0:i.call(s,"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)?(o+n)/2-e.left-(a.globals.barPadForNumericAxis||0):null}placeHorizontalSharedTooltip(t){var e,s;const i=this.w,a=this.ttCtx,r=a.getElTooltip();if(!r)return!1;const o=a.getElGrid();if(!o)return!1;const n=o.getBoundingClientRect(),l=i.dom.baseEl.querySelectorAll(`.apexcharts-bar-series path[j='${t}'],.apexcharts-rangebar-series path[j='${t}'],.apexcharts-boxPlot-series path[j='${t}']`);if(!l.length)return!1;let c=1/0,h=-1/0,d=1/0,p=-1/0;for(const t of l){const i=t.parentNode;if(null==(s=null==(e=null==i?void 0:i.classList)?void 0:e.contains)?void 0:s.call(e,"apexcharts-series-collapsed"))continue;const a=t.getBoundingClientRect();0===a.width&&0===a.height||(a.left<c&&(c=a.left),a.right>h&&(h=a.right),a.top<d&&(d=a.top),a.bottom>p&&(p=a.bottom))}if(!isFinite(c))return!1;const g=a.tooltipRect.ttWidth||0,u=a.tooltipRect.ttHeight||0,x=(c+h)/2-n.left+i.layout.translateX,f=d-n.top+i.layout.translateY,m=p-n.top+i.layout.translateY,b=i.layout.translateY,y=i.layout.translateY+i.layout.gridHeight,w=i.layout.translateX,v=i.layout.translateX+i.layout.gridWidth;let A="top",C=f-u-7;if(C<b){const t=m+7;t+u<=y&&(A="bottom",C=t)}let S=x-g/2;S<w&&(S=w),S+g>v&&(S=v-g);const k=Math.max(10,Math.min(g-10,x-S));return this.applyTooltipPosition(r,{x:S,y:C,placement:A,arrowY:null,arrowX:k}),!0}}function Re(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 ze{constructor(t){this.w=t.w,this.ttCtx=t,this.ctx=t.ctx,this.tooltipPosition=new Ie(t)}drawDynamicPoints(){const t=this.w,e=new ut(this.w),s=new yt(this.w,this.ctx),i=[...t.dom.baseEl.querySelectorAll(".apexcharts-series")];t.config.chart.stacked&&i.sort((t,e)=>parseFloat(t.getAttribute("data:realIndex"))-parseFloat(e.getAttribute("data:realIndex")));for(let a=0;a<i.length;a++){const r=i[a].querySelector(".apexcharts-series-markers-wrap");if(null!==r){let i=`apexcharts-marker w${(Math.random()+1).toString(36).substring(4)}`;"line"!==t.config.chart.type&&"area"!==t.config.chart.type||t.globals.comboCharts||t.config.tooltip.intersect||(i+=" no-pointer-events");const a=s.getMarkerConfig({cssClass:i,seriesIndex:Number(r.getAttribute("data:realIndex"))}),o=e.drawMarker(0,0,a);o.node.setAttribute("default-marker-size",0);const n=m.createElementNS(P,"g");n.classList.add("apexcharts-series-markers"),n.appendChild(o.node),r.appendChild(n)}}}enlargeCurrentPoint(t,e,s=null,i=null){const a=this.w;"bubble"!==a.config.chart.type&&this.newPointSize(t,e);let r=e.getAttribute("cx"),o=e.getAttribute("cy");if(null!==s&&null!==i&&(r=s,o=i),this.tooltipPosition.moveXCrosshairs(r),!this.fixedTooltip){if("radar"===a.config.chart.type){const t=this.ttCtx.getElGrid();if(!t)return;const e=t.getBoundingClientRect();r=this.ttCtx.e.clientX-e.left}this.tooltipPosition.moveTooltip(r,o,a.config.markers.hover.size)}}enlargePoints(t){var e,s;const i=this.w,a=this,r=this.ttCtx,o=t,n=i.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker");let l=i.config.markers.hover.size;for(let t=0;t<n.length;t++){const c=n[t].getAttribute("rel"),h=n[t].getAttribute("index");if(void 0===l&&(l=i.globals.markers.size[h]+i.config.markers.hover.sizeOffset),o===parseInt(null!=c?c:"0",10)){a.newPointSize(o,n[t]);const i=null!=(e=n[t].getAttribute("cx"))?e:"0",c=null!=(s=n[t].getAttribute("cy"))?s:"0";a.tooltipPosition.moveXCrosshairs(parseFloat(i)),r.fixedTooltip||a.tooltipPosition.moveTooltip(parseFloat(i),parseFloat(c),l)}else a.oldPointSize(n[t])}}newPointSize(t,e){const s=this.w;let i=s.config.markers.hover.size;const a=0===t?e.parentNode.firstChild:e.parentNode.lastChild;if("0"!==a.getAttribute("default-marker-size")){const t=parseInt(a.getAttribute("index"),10);void 0===i&&(i=s.globals.markers.size[t]+s.config.markers.hover.sizeOffset),i<0&&(i=0);const r=this.ttCtx.tooltipUtil.getPathFromPoint(e,i);e.setAttribute("d",r)}}oldPointSize(t){const e=parseFloat(t.getAttribute("default-marker-size")),s=this.ttCtx.tooltipUtil.getPathFromPoint(t,e);t.setAttribute("d",s)}resetPointsSize(){var t;const e=this.w.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker");for(let s=0;s<e.length;s++){const i=parseFloat(null!=(t=e[s].getAttribute("default-marker-size"))?t:"0");if(b.isNumber(i)&&i>0){const t=this.ttCtx.tooltipUtil.getPathFromPoint(e[s],i);e[s].setAttribute("d",t)}else e[s].setAttribute("d","M0,0")}}}class Ye{constructor(t){this.w=t.w;const e=this.w;this.ttCtx=t,this.isVerticalGroupedRangeBar=!e.globals.isBarHorizontal&&"rangeBar"===e.config.chart.type&&e.config.plotOptions.bar.rangeBarGroupRows}getAttr(t,e){var s;return parseFloat(null!=(s=t.target.getAttribute(e))?s:"")}handleHeatTreeTooltip({e:t,opt:e,x:s,y:i,type:a}){var r,o;const n=this.ttCtx,l=this.w;if(t.target.classList.contains(`apexcharts-${a}-rect`)){const a=this.getAttr(t,"i"),c=this.getAttr(t,"j"),h=this.getAttr(t,"cx"),d=this.getAttr(t,"cy"),p=this.getAttr(t,"width"),g=this.getAttr(t,"height");if(n.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:a,j:c,shared:!1,e:t}),l.interact.capturedSeriesIndex=a,l.interact.capturedDataPointIndex=c,s=h+n.tooltipRect.ttWidth/2+p,i=d+n.tooltipRect.ttHeight/2-g/2,n.tooltipPosition.moveXCrosshairs(h+p/2),s>l.layout.gridWidth/2&&(s=h-n.tooltipRect.ttWidth/2+p),n.w.config.tooltip.followCursor){const t=l.dom.elWrap.getBoundingClientRect();s=(null!=(r=l.interact.clientX)?r:0)-t.left-(s>l.layout.gridWidth/2?n.tooltipRect.ttWidth:0),i=(null!=(o=l.interact.clientY)?o:0)-t.top-(i>l.layout.gridHeight/2?n.tooltipRect.ttHeight:0)}}return{x:s,y:i}}handleMarkerTooltip({e:t,opt:e,x:s,y:i}){const a=this.w,r=this.ttCtx;let o,n;if(t.target.classList.contains("apexcharts-marker")){const l=parseInt(e.paths.getAttribute("cx"),10),c=parseInt(e.paths.getAttribute("cy"),10),h=parseFloat(e.paths.getAttribute("val"));if(n=parseInt(e.paths.getAttribute("rel"),10),o=parseInt(e.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,r.intersect){const t=b.findAncestor(e.paths,"apexcharts-series");t&&(o=parseInt(t.getAttribute("data:realIndex"),10))}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;if(s=l,!!a.config.tooltip.arrow?i=c:(i=c+a.layout.translateY-1.4*r.tooltipRect.ttHeight,h<0&&(i=c)),r.w.config.tooltip.followCursor){const t=r.getElGrid();if(!t)return{x:s,y:i};const e=t.getBoundingClientRect();i=r.e.clientY+a.layout.translateY-e.top}r.marker.enlargeCurrentPoint(n,e.paths,s,i)}return{x:s,y:i}}handleBarTooltip({e:t,opt:e}){var s,i,a;const r=this.w,o=this.ttCtx,n=o.getElTooltip();let l,c=0,h=0,d=0,p=0;const g=this.getBarTooltipXY({e:t,opt:e});if(null===g.j&&0===g.barHeight&&0===g.barWidth)return;p=g.i;const u=g.j;if(r.interact.capturedSeriesIndex=p,r.interact.capturedDataPointIndex=null!==u?u:r.interact.capturedDataPointIndex,r.globals.isBarHorizontal&&o.tooltipUtil.hasBars()||!r.config.tooltip.shared?(h=g.x,d=g.y,l=Array.isArray(r.config.stroke.width)?r.config.stroke.width[p]:r.config.stroke.width,c=h):r.globals.comboCharts||r.config.tooltip.shared||(c/=2),isNaN(d)&&(d=r.globals.svgHeight-o.tooltipRect.ttHeight),h+o.tooltipRect.ttWidth>r.layout.gridWidth?h-=o.tooltipRect.ttWidth:h<0&&(h=0),o.w.config.tooltip.followCursor){if(!o.getElGrid())return}if(null===o.tooltip&&(o.tooltip=r.dom.baseEl.querySelector(".apexcharts-tooltip")),r.config.tooltip.shared||(r.globals.comboBarCount>0?o.tooltipPosition.moveXCrosshairs(c+l/2):o.tooltipPosition.moveXCrosshairs(c)),!o.fixedTooltip&&(!r.config.tooltip.shared||r.globals.isBarHorizontal&&o.tooltipUtil.hasBars())&&(d=d+r.layout.translateY-o.tooltipRect.ttHeight/2,n)){const t=o.tooltipRect.ttWidth||0,e=o.tooltipRect.ttHeight||0,l=!!r.config.tooltip.arrow,{barAnchorXInGrid:c,barAnchorYInGrid:p,barRectInGrid:u}=g,x=7,f=null==(s=o.getElGrid())?void 0:s.getBoundingClientRect(),m=r.dom.elWrap.getBoundingClientRect(),b=f?f.left-m.left:r.layout.translateX;let y,w=null,v=null,A=h+b,C=d;if(l&&r.globals.isBarHorizontal&&null!=u){const s=r.layout.translateY,i=r.layout.translateY+r.layout.gridHeight,a=b,o=b+r.layout.gridWidth,n=(u.left+u.right)/2+b,l=u.top+r.layout.translateY,c=u.bottom+r.layout.translateY;let h=l-e-x;if(y="top",h<s){const t=c+x;t+e<=i&&(y="bottom",h=t)}C=h,A=n-t/2,A<a&&(A=a),A+t>o&&(A=o-t),v=Math.max(10,Math.min(t-10,n-A))}else if(l&&null!=c&&null!=p){const s=c+b,o=b+r.layout.gridWidth/2,n=(null!=(i=null==u?void 0:u.left)?i:c)+b,l=(null!=(a=null==u?void 0:u.right)?a:c)+b;if(s<o?(y="right",A=l+x):(y="left",A=n-t-x),u){C=(u.top+u.bottom)/2+r.layout.translateY-e/2;const t=r.layout.translateY,s=r.layout.translateY+r.layout.gridHeight;C<t&&(C=t),C+e>s&&(C=s-e)}if(e>0&&u){const t=(u.top+u.bottom)/2+r.layout.translateY;w=Math.max(10,Math.min(e-10,t-C))}}o.tooltipPosition.applyTooltipPosition(n,{x:A,y:C,placement:y,arrowY:w,arrowX:v})}}getBarTooltipXY({e:t,opt:e}){const s=this.w;let i=null;const a=this.ttCtx;let r=0,o=0,n=0,l=0,c=0,h=null,d=null,p=null,g=null,u=null;const x=t.target.classList;if(x.contains("apexcharts-bar-area")||x.contains("apexcharts-candlestick-area")||x.contains("apexcharts-boxPlot-area")||x.contains("apexcharts-rangebar-area")){const x=t.target,f=x.getBoundingClientRect(),m=e.elGrid.getBoundingClientRect(),b=f.height;c=f.height;const y=f.width,w=parseInt(x.getAttribute("cx"),10),v=parseInt(x.getAttribute("cy"),10);h=w,d=v,l=parseFloat(x.getAttribute("barWidth"));const A=f.left-m.left,C=f.top-m.top,S=C+b/2;p=A+y/2,g=s.globals.isBarHorizontal?S:C,u={left:A,top:C,right:A+y,bottom:C+b};const k="touchmove"===t.type?t.touches[0].clientX:t.clientX;i=parseInt(x.getAttribute("j"),10),r=parseInt(x.parentNode.getAttribute("rel"),10)-1;const M=x.getAttribute("data-range-y1"),D=x.getAttribute("data-range-y2");s.globals.comboCharts&&(r=parseInt(x.parentNode.getAttribute("data:realIndex"),10));const T=t=>s.axisFlags.isXNumeric?w-y/2:this.isVerticalGroupedRangeBar?w+y/2:w-a.dataPointsDividedWidth+y/2,L=()=>v-a.dataPointsDividedHeight+b/2-a.tooltipRect.ttHeight/2;a.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:r,j:i,y1:M?parseInt(M,10):null,y2:D?parseInt(D,10):null,shared:!a.showOnIntersect&&s.config.tooltip.shared,e:t}),s.config.tooltip.followCursor?s.globals.isBarHorizontal?(o=k-m.left+15,n=L()):(o=T(o),n=t.clientY-m.top-a.tooltipRect.ttHeight/2-15):s.globals.isBarHorizontal?(o=w,a.xyRatios&&o<a.xyRatios.baseLineInvertedY&&(o=w-a.tooltipRect.ttWidth),n=L()):(o=T(o),n=v)}return{x:o,y:n,barHeight:c,barWidth:l,i:r,j:i,barCx:h,barCy:d,barAnchorXInGrid:p,barAnchorYInGrid:g,barRectInGrid:u}}}class He{constructor(t){this.w=t.w,this.ttCtx=t}drawXaxisTooltip(){const t=this.w,e=this.ttCtx,s="bottom"===t.config.xaxis.position;e.xaxisOffY=s?t.layout.gridHeight+1:-t.layout.xAxisHeight-t.config.xaxis.axisTicks.height+3;const i=s?"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=m.createElementNS("http://www.w3.org/1999/xhtml","div"),e.xaxisTooltip.setAttribute("class",i+" apexcharts-theme-"+t.config.tooltip.theme),a.appendChild(e.xaxisTooltip),e.xaxisTooltipText=m.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 s=0;s<t.config.yaxis.length;s++){const i=t.config.yaxis[s].opposite||t.config.yaxis[s].crosshairs.opposite;e.yaxisOffX=i?t.layout.gridWidth+1:1;const a=i?`apexcharts-yaxistooltip apexcharts-yaxistooltip-${s} apexcharts-yaxistooltip-right`:`apexcharts-yaxistooltip apexcharts-yaxistooltip-${s} apexcharts-yaxistooltip-left`,r=t.dom.elWrap;null===t.dom.baseEl.querySelector(`.apexcharts-yaxistooltip apexcharts-yaxistooltip-${s}`)&&(e.yaxisTooltip=m.createElementNS("http://www.w3.org/1999/xhtml","div"),e.yaxisTooltip.setAttribute("class",a+" apexcharts-theme-"+t.config.tooltip.theme),r.appendChild(e.yaxisTooltip),0===s&&(e.yaxisTooltipText=[]),e.yaxisTooltipText[s]=m.createElementNS("http://www.w3.org/1999/xhtml","div"),e.yaxisTooltipText[s].classList.add("apexcharts-yaxistooltip-text"),e.yaxisTooltip.appendChild(e.yaxisTooltipText[s]))}}setXCrosshairWidth(){var t,e;const s=this.w,i=this.ttCtx,a=i.getElXCrosshairs();if(i.xcrosshairsWidth=parseInt(s.config.xaxis.crosshairs.width,10),s.globals.comboCharts){const t=s.dom.baseEl.querySelector(".apexcharts-bar-area");if(null!==t&&"barWidth"===s.config.xaxis.crosshairs.width){const s=parseFloat(null!=(e=t.getAttribute("barWidth"))?e:"0");i.xcrosshairsWidth=s}else if("tickWidth"===s.config.xaxis.crosshairs.width){const t=s.labelData.labels.length;i.xcrosshairsWidth=s.layout.gridWidth/t}}else if("tickWidth"===s.config.xaxis.crosshairs.width){const t=s.labelData.labels.length;i.xcrosshairsWidth=s.layout.gridWidth/t}else if("barWidth"===s.config.xaxis.crosshairs.width){const e=s.dom.baseEl.querySelector(".apexcharts-bar-area");if(null!==e){const s=parseFloat(null!=(t=e.getAttribute("barWidth"))?t:"0");i.xcrosshairsWidth=s}else i.xcrosshairsWidth=1}s.globals.isBarHorizontal&&(i.xcrosshairsWidth=0),null!==a&&i.xcrosshairsWidth>0&&a.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,s){const i=this.ttCtx,a=this.w,r=a.globals,o=r.seriesYAxisMap[t];if(i.yaxisTooltips[t]&&o.length>0){const n=a.formatters.yLabelFormatters[t],l=i.getElGrid();if(!l)return;const c=l.getBoundingClientRect(),h=o[0];let d=0;s.yRatio.length>1&&(d=h);const p=(e-c.top)*s.yRatio[d],g=r.maxYArr[h]-r.minYArr[h];let u=r.minYArr[h]+(g-p);a.config.yaxis[t].reversed&&(u=r.maxYArr[h]-(g-p)),i.tooltipPosition.moveYCrosshairs(e-c.top),i.yaxisTooltipText[t].innerHTML=n(u),i.tooltipPosition.moveYAxisTooltip(t)}}}class Oe{constructor(t,e){this.w=t,this.ctx=e,this.tConfig=t.config.tooltip,this.tooltipUtil=new Ne(this),this.tooltipLabels=new Xe(this),this.tooltipPosition=new Ie(this),this.marker=new ze(this),this.intersect=new Ye(this),this.axesTooltip=new He(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.xaxisTooltip=null,this.xaxisTooltipText=null,this.yaxisTooltip=null,this.yaxisTooltipText=null,this.yaxisTTEls=null,this.xaxisOffY=0,this.yaxisOffX=0,this.xcrosshairsWidth=0,this.ycrosshairs=null,this.ycrosshairsHidden=null,this.tooltip=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.legendLabels=null,this.ttItems=null,this.seriesBound=null,this.seriesHoverTimeout=void 0,this.clientX=0,this.clientY=0,this.barSeriesHeight=0,this.tooltipRect={x:0,y:0,ttWidth:0,ttHeight:0}}setupDimensionCache(){const t=this.w,e=this.getElTooltip();e&&(this.updateDimensionCache(),"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 s=e.getBoundingClientRect();t.globals.dimensionCache.tooltip={width:s.width,height:s.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}}getElTooltip(t){return t||(t=this),t.w.dom.baseEl?t.w.dom.baseEl.querySelector(".apexcharts-tooltip"):null}getElXCrosshairs(){return this.w.dom.baseEl.querySelector(".apexcharts-xcrosshairs")}getElGrid(){return this.w.dom.baseEl.querySelector(".apexcharts-grid")}drawTooltip(t){const e=this.w;this.xyRatios=t,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=[],e.globals.axisCharts||(this.showTooltipTitle=!1);const s=this.getElTooltip();(null==s?void 0:s.parentNode)&&s.parentNode.removeChild(s),this.tooltipTitle=null;const i=m.createElementNS("http://www.w3.org/1999/xhtml","div");i.classList.add("apexcharts-tooltip"),e.config.tooltip.cssClass&&i.classList.add(e.config.tooltip.cssClass),i.classList.add(`apexcharts-theme-${this.tConfig.theme||"light"}`),this.tConfig.fillSeriesColor&&i.classList.add("apexcharts-tooltip-fill-series"),this.tConfig.style&&this.tConfig.style.background&&i.style.setProperty("--apx-tt-bg",this.tConfig.style.background);const a=this.tConfig.shared&&e.config.series.length>1&&!e.globals.isBarHorizontal;if(this.tConfig.arrow&&!this.tConfig.followCursor&&!this.tConfig.fixed.enabled&&!a&&!this.tConfig.fillSeriesColor&&e.globals.axisCharts){const t=m.createElementNS("http://www.w3.org/1999/xhtml","div");t.classList.add("apexcharts-tooltip-arrow"),i.appendChild(t)}if(e.config.chart.accessibility.enabled&&e.config.chart.accessibility.announcements.enabled&&(i.setAttribute("role","tooltip"),i.setAttribute("aria-live","polite"),i.setAttribute("aria-atomic","true"),i.setAttribute("aria-hidden","true")),e.dom.elWrap.appendChild(i),e.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();const t=new St(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||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=m.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,i.appendChild(this.tooltipTitle));let r=e.seriesData.series.length;(e.globals.xyCharts||e.globals.comboCharts)&&this.tConfig.shared&&(r=this.showOnIntersect?1:e.seriesData.series.length),this.legendLabels=e.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(r),this.addSVGEvents(),this.setupDimensionCache()}createTTElements(t){const e=this.w,s=[],i=this.getElTooltip();if(!i)return s;for(let a=0;a<t;a++){const r=m.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=m.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=Re(l),r.appendChild(o);const c=m.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,["y","goals","z"].forEach(t=>{const e=m.createElementNS("http://www.w3.org/1999/xhtml","div");e.classList.add(`apexcharts-tooltip-${t}-group`);const s=m.createElementNS("http://www.w3.org/1999/xhtml","span");s.classList.add(`apexcharts-tooltip-text-${t}-label`),e.appendChild(s);const i=m.createElementNS("http://www.w3.org/1999/xhtml","span");i.classList.add(`apexcharts-tooltip-text-${t}-value`),e.appendChild(i),c.appendChild(e)}),r.appendChild(c),i.appendChild(r),s.push(r)}return s}addSVGEvents(){const t=this.w,e=t.config.chart.type,s=this.getElTooltip();if(!s)return;const i=!("bar"!==e&&"candlestick"!==e&&"boxPlot"!==e&&"violin"!==e&&"rangeBar"!==e),a="area"===e||"line"===e||"scatter"===e||"bubble"===e||"radar"===e,r=t.dom.Paper.node,o=this.getElGrid();o&&(this.seriesBound=o.getBoundingClientRect());const n=[],l=[],c={hoverArea:r,elGrid:o,tooltipEl:s,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"):i?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||i&&this.tooltipUtil.hasBars()&&this.tConfig.shared)this.addPathsEventListeners([r],c);else if(i&&!t.globals.comboCharts||a&&this.showOnIntersect)this.addDatapointEventsListeners(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)}}drawFixedTooltipRect(){const t=this.w,e=this.getElTooltip();if(!e)return{x:0,y:0,ttWidth:0,ttHeight:0};const s=e.getBoundingClientRect(),i=s.width+10,a=s.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-i+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:i,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-rangebar-area");this.addPathsEventListeners(e,t)}addPathsEventListeners(t,e){const s=this;for(let i=0;i<t.length;i++){const a={paths:t[i],tooltipEl:e.tooltipEl,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:e.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map(e=>t[i].addEventListener(e,s.onSeriesHover.bind(s,a),{capture:!1,passive:!0}))}}onSeriesHover(t,e){const s=Date.now()-this.lastHoverTime;s>=20?this.seriesHover(t,e):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout(()=>{this.seriesHover(t,e)},20-s))}seriesHover(t,e){this.lastHoverTime=Date.now();let s=[];const i=this.w,a=t=>{var e,s,i;const a=null==(i=null==(s=null==(e=null==t?void 0:t.w)?void 0:e.config)?void 0:s.chart)?void 0:i.link;return!(!a||"function"!=typeof a.dimension)};i.config.chart.group&&!a(this.ctx)&&(s=this.ctx.getGroupedCharts().filter(t=>!a(t))),i.globals.axisCharts&&(i.globals.minX===-1/0&&i.globals.maxX===1/0||0===i.globals.dataPoints)||(s.length?s.forEach(s=>{const i=this.getElTooltip(s),a={paths:t.paths,tooltipEl:i,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:s.w.globals.tooltip.ttItems};s.w.globals.minX===this.w.globals.minX&&s.w.globals.maxX===this.w.globals.maxX&&s.w.globals.tooltip.seriesHoverByContext({chartCtx:s,ttCtx:s.w.globals.tooltip,opt:a,e:e})}):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:t,e:e}))}seriesHoverByContext({chartCtx:t,ttCtx:e,opt:s,e:i}){const a=t.w;if(!this.getElTooltip(t))return;const r=e.getCachedDimensions();if(e.tooltipRect={x:0,y:0,ttWidth:r.ttWidth,ttHeight:r.ttHeight},e.e=i,e.tooltipUtil.hasBars()&&!a.globals.comboCharts&&!e.isBarShared&&this.tConfig.onDatasetHover.highlightDataSeries){new ee(t.w).toggleSeriesOnHover(i,i.target.parentNode)}a.globals.axisCharts?e.axisChartsTooltips({e:i,opt:s,tooltipRect:e.tooltipRect}):e.nonAxisChartsTooltips({e:i,opt:s,tooltipRect:e.tooltipRect}),e.fixedTooltip&&e.drawFixedTooltipRect()}axisChartsTooltips({e:t,opt:e}){var s;const i=this.w;let a,r;const o=e.elGrid.getBoundingClientRect(),n="touchmove"===t.type?t.touches[0].clientX:t.clientX,l="touchmove"===t.type?t.touches[0].clientY:t.clientY;if(this.clientY=l,this.clientX=n,i.interact.capturedSeriesIndex=-1,i.interact.capturedDataPointIndex=-1,l<o.top||l>o.top+o.height)return void this.handleMouseOut(e);if(Array.isArray(this.tConfig.enabledOnSeries)&&!i.config.tooltip.shared){const t=parseInt(e.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(t)<0)return void this.handleMouseOut(e)}const c=this.getElTooltip();if(!c)return;const h=this.getElXCrosshairs();let d=[];i.config.chart.group&&(d=this.ctx.getSyncedCharts());const p=i.globals.xyCharts||"bar"===i.config.chart.type&&!i.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||i.globals.comboCharts&&this.tooltipUtil.hasBars();if("mousemove"===t.type||"touchmove"===t.type||"mouseup"===t.type){if(i.globals.collapsedSeries.length+i.globals.ancillaryCollapsedSeries.length===i.seriesData.series.length)return;null!==h&&h.classList.add("apexcharts-active");const o=null==(s=this.yaxisTooltips)?void 0:s.filter(t=>!0===t),g=this.ycrosshairs;if(null!==g&&(null==o?void 0:o.length)&&g.classList.add("apexcharts-active"),p&&!this.showOnIntersect||d.length>1)this.handleStickyTooltip(t,n,l,e);else if("heatmap"===i.config.chart.type||"treemap"===i.config.chart.type){const s=this.intersect.handleHeatTreeTooltip({e:t,opt:e,x:a,y:r,type:i.config.chart.type});a=s.x,r=s.y,c.style.left=a+"px",c.style.top=r+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:t,opt:e}),this.tooltipUtil.hasMarkers(0)&&this.intersect.handleMarkerTooltip({e:t,opt:e,x:a,y:r});if(this.yaxisTooltips&&this.yaxisTooltips.length)for(let t=0;t<i.config.yaxis.length;t++)this.axesTooltip.drawYaxisTooltipText(t,l,this.xyRatios);i.dom.baseEl.classList.add("apexcharts-tooltip-active"),e.tooltipEl.classList.add("apexcharts-active"),i.config.chart.accessibility.enabled&&i.config.chart.accessibility.announcements.enabled&&e.tooltipEl.removeAttribute("aria-hidden")}else"mouseout"!==t.type&&"touchend"!==t.type||this.handleMouseOut(e)}nonAxisChartsTooltips({e:t,opt:e,tooltipRect:s}){var i,a,r,o;const n=this.w,l=e.paths.getAttribute("rel"),c=this.getElTooltip();if(!c)return;const h=n.dom.elWrap.getBoundingClientRect();if("mousemove"===t.type||"touchmove"===t.type){let t,o;n.dom.baseEl.classList.add("apexcharts-tooltip-active"),c.classList.add("apexcharts-active"),n.config.chart.accessibility.enabled&&n.config.chart.accessibility.announcements.enabled&&c.removeAttribute("aria-hidden"),this.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:parseInt(l,10)-1,shared:!1});const d=e.paths.querySelector("path[data\\:cx]")||e.paths;if(n.config.tooltip.intersect&&d.hasAttribute("data:cx")&&d.hasAttribute("data:cy")){const e=n.dom.Paper.node.getBoundingClientRect();t=e.left-h.left+parseFloat(d.getAttribute("data:cx"))-s.ttWidth/2,o=e.top-h.top+parseFloat(d.getAttribute("data:cy"))-s.ttHeight-10}else t=(null!=(i=n.interact.clientX)?i:0)-h.left-s.ttWidth/2,o=(null!=(a=n.interact.clientY)?a:0)-h.top-s.ttHeight-10;if(c.style.left=t+"px",c.style.top=o+"px",n.config.legend.tooltipHoverFormatter){const t=n.config.legend.tooltipHoverFormatter,e=l-1,s=null==(r=this.legendLabels)?void 0:r[e];if(!s)return;const i=t(s.getAttribute("data:default-text"),{seriesIndex:e,dataPointIndex:e,w:n});s.innerHTML=i}}else"mouseout"!==t.type&&"touchend"!==t.type||(c.classList.remove("apexcharts-active"),n.dom.baseEl.classList.remove("apexcharts-tooltip-active"),n.config.legend.tooltipHoverFormatter&&(null==(o=this.legendLabels)||o.forEach(t=>{const e=t.getAttribute("data:default-text");t.innerHTML=decodeURIComponent(null!=e?e:"")})))}handleStickyTooltip(t,e,s,i){const a=this.w,r=this.tooltipUtil.getNearestValues({context:this,hoverArea:i.hoverArea,elGrid:i.elGrid,clientX:e,clientY:s}),o=r.j;let n=r.capturedSeries;null!==n&&a.globals.collapsedSeriesIndices.includes(null!=n?n:-1)&&(n=null);const l=i.elGrid.getBoundingClientRect();if(r.hoverX<0||r.hoverX>l.width)this.handleMouseOut(i);else if(null!==n)this.handleStickyCapturedSeries(t,null!=n?n:-1,i,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,i.ttItems)}}handleStickyCapturedSeries(t,e,s,i){const a=this.w;if(!this.tConfig.shared){if(null===a.seriesData.series[e][i])return void this.handleMouseOut(s)}if(void 0!==a.seriesData.series[e][i])this.tConfig.shared&&this.tooltipUtil.isXoverlap(i)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(t,this,e,i,s.ttItems):this.create(t,this,e,i,s.ttItems,!1);else if(this.tooltipUtil.isXoverlap(i)){const e=a.seriesData.series.findIndex((t,e)=>!a.globals.collapsedSeriesIndices.includes(e));this.create(t,this,e,i,s.ttItems)}}deactivateHoverFilter(){const t=this.w,e=new ut(this.w,this.ctx),s=t.dom.Paper.find(".apexcharts-bar-area");for(let t=0;t<s.length;t++)e.pathMouseLeave(s[t],void 0)}handleMouseOut(t){var e,s;const i=this.w,a=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(),"bubble"!==i.config.chart.type&&this.marker.resetPointsSize(),null!==a&&a.classList.remove("apexcharts-active");const r=this.ycrosshairs;if(null!==r&&r.classList.remove("apexcharts-active"),this.isXAxisTooltipEnabled&&(null==(e=this.xaxisTooltip)||e.classList.remove("apexcharts-active")),this.yaxisTooltips&&this.yaxisTooltips.length){null===this.yaxisTTEls&&(this.yaxisTTEls=[...i.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip")]);for(let t=0;t<this.yaxisTTEls.length;t++)this.yaxisTTEls[t].classList.remove("apexcharts-active")}i.config.legend.tooltipHoverFormatter&&(null==(s=this.legendLabels)||s.forEach(t=>{const e=t.getAttribute("data:default-text");t.innerHTML=decodeURIComponent(null!=e?e:"")}))}markerClick(t,e,s){const i=this.w;"function"==typeof i.config.chart.events.markerClick&&i.config.chart.events.markerClick(t,this.ctx,{seriesIndex:e,dataPointIndex:s,w:i}),this.ctx.events.fireEvent("markerClick",[t,this.ctx,{seriesIndex:e,dataPointIndex:s,w:i}])}_hasCustomSeries(){const t=this.w;if(Le(t.config.chart.type))return!0;return(t.config.series||[]).some(t=>t&&t.type&&Le(t.type))}create(t,e,s,i,a,r=null){var o,c,h,d,p,g,u,x,f,m,b,y,w,v,A,C,S,k,M,D,T;const L=this.w,F=e;"mouseup"===t.type&&this.markerClick(t,s,i),null===r&&(r=this.tConfig.shared);const E=this.tooltipUtil.hasMarkers(s),_="canvas"===(null==(c=null==(o=this.ctx)?void 0:o.renderer)?void 0:c.kind),P=_&&!this.tooltipUtil.hasBars(),B=!_&&!E&&!this.tooltipUtil.hasBars()&&this._hasCustomSeries(),N=P||B,X=this.tooltipUtil.getElBars(),I=()=>{L.globals.markers.largestSize>0&&!_?F.marker.enlargePoints(i):F.tooltipPosition.moveDynamicPointsOnHover(i)};if(L.config.legend.tooltipHoverFormatter){const t=L.config.legend.tooltipHoverFormatter,e=Array.from(null!=(h=this.legendLabels)?h:[]);e.forEach(t=>{const e=t.getAttribute("data:default-text");t.innerHTML=decodeURIComponent(null!=e?e:"")});for(let a=0;a<e.length;a++){const o=e[a],n=parseInt(null!=(d=o.getAttribute("i"))?d:"",10),l=decodeURIComponent(null!=(p=o.getAttribute("data:default-text"))?p:""),c=t(l,{seriesIndex:r?n:s,dataPointIndex:i,w:L});if(r)o.innerHTML=L.globals.collapsedSeriesIndices.indexOf(n)<0?c:l;else if(o.innerHTML=n===s?c:l,s===n)break}}const R=L.rangeData,z=n(n({ttItems:a,i:s,j:i},void 0!==(null==(f=null==(x=null==(u=null==(g=R.seriesRange)?void 0:g[s])?void 0:u[i])?void 0:x.y[0])?void 0:f.y1)&&{y1:null==(w=null==(y=null==(b=null==(m=R.seriesRange)?void 0:m[s])?void 0:b[i])?void 0:y.y[0])?void 0:w.y1}),void 0!==(null==(S=null==(C=null==(A=null==(v=R.seriesRange)?void 0:v[s])?void 0:A[i])?void 0:C.y[0])?void 0:S.y2)&&{y2:null==(T=null==(D=null==(M=null==(k=R.seriesRange)?void 0:k[s])?void 0:M[i])?void 0:D.y[0])?void 0:T.y2});if(r){if(F.tooltipLabels.drawSeriesTexts(l(n({},z),{shared:!this.showOnIntersect&&this.tConfig.shared})),E||N)I();else if(this.tooltipUtil.hasBars()&&(_&&F.tooltipPosition.moveStickyTooltipOverBars(i,s),this.barSeriesHeight=this.tooltipUtil.getBarsHeight([...X]),this.barSeriesHeight>0)){const t=new ut(this.w,this.ctx),e=L.dom.Paper.find(`.apexcharts-bar-area[j='${i}']`);this.deactivateHoverFilter();F.tooltipUtil.getAllMarkers(!0).length&&!this.barSeriesHeight&&I(),F.tooltipPosition.moveStickyTooltipOverBars(i,s);for(let s=0;s<e.length;s++)t.pathMouseEnter(e[s],void 0)}}else F.tooltipLabels.drawSeriesTexts(n({shared:!1},z)),this.tooltipUtil.hasBars()&&F.tooltipPosition.moveStickyTooltipOverBars(i,s),E?F.tooltipPosition.moveMarkers(s,i):N&&F.tooltipPosition.moveDynamicPointOnHover(i,s)}}class We{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,s={}){return this.ctx.graphics.drawMarker(t,e,s)}supports(t){return!0}hitTest(){return null}restyle(){}toBitmap(){return null}destroy(){}}const Ge="__apexcharts_renderers__";function Ue(){const t=globalThis;return t[Ge]||(t[Ge]=new Map),t[Ge]}class $e{static get _rendererRegistry(){return Ue()}static registerRenderer(t,e){Ue().set(t,e)}static unregisterRenderer(t){Ue().delete(t)}constructor(t,e){this.w=t,this.ctx=e,this.svg=new We(t,e),this.active=this.svg,this._activeKind="svg",this._instances={}}_desiredKind(){const t=this.w.config.chart,e=t.renderer||"svg";if(!h.isBrowser())return"svg";if("svg"===e)return"svg";if(bt(this.w))return"svg";if("canvas"===e)return"canvas";return function(t){const e=t.config.series||[],s=t.config.chart.type,i="scatter"===s||"bubble"===s,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);let n=0,l=0;return e.forEach(t=>{const e=Array.isArray(t.data)?t.data.length:0;e>l&&(l=e),(i||r)&&(n+=e),o&&(n+=e)}),l>=5e4&&(n=Math.max(n,l)),n}(this.w)>=(t.rendererThreshold||8e3)?"canvas":"svg"}resolve(){const t=this.w.config.chart.renderer||"svg",e=this._desiredKind();if("svg"!==e){const t=Ue().get(e);if(t)return this._instances[e]||(this._instances[e]=t(this.w,this.ctx)),this.active=this._instances[e],this._activeKind=e,this.ctx.renderer=this.active,this.w.globals.activeRenderer=this.active,this._activeKind}else"canvas"===t&&bt(this.w);return this.active=this.svg,this._activeKind="svg",this.ctx.renderer=this.active,this.w.globals.activeRenderer=this.active,this._activeKind}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"}}class Ve{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 s="string"==typeof t?{[t]:e}:t;for(const t in s){let e=s[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!=s.x){const t=this.node.querySelectorAll("tspan[data-newline]");for(let e=0;e<t.length;e++)t[e].setAttribute("x",s.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 s=this.bbox(),i=t-(s.x+s.width/2),a=e-(s.y+s.height/2);return this.attr("transform",`translate(${i}, ${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 Ve(t))}findOne(t){const e=this.node.querySelector(t);return e?e.instance||new Ve(e):null}on(t,e){const s=t.split(".")[0];return this._listeners.push({event:t,eventType:s,handler:e}),this.node.addEventListener(s,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 s=t.split(".")[0];this._listeners=this._listeners.filter(t=>t.eventType!==s||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(s=>{const i=s.instance||new Ve(s);t.call(i),e&&i.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 Ve(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=m.createElementNS("http://www.w3.org/2000/svg","tspan");return e.textContent=t,this.node.appendChild(e),new Ve(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")}unfilter(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}filterer(){return this._filter}}let je=0;class qe extends Ve{constructor(t,e,s){const i="radial"===e?"radialGradient":"linearGradient";super(m.createElementNS(P,i)),this._id="SvgjsGradient"+ ++je,this.attr("id",this._id),"function"==typeof s&&s(new Ze(this));let a=t.node.querySelector("defs");a||(a=m.createElementNS(P,"defs"),t.node.appendChild(a)),a.appendChild(this.node)}stop(t,e,s){const i=m.createElementNS(P,"stop");return i.setAttribute("offset",t),i.setAttribute("stop-color",e),void 0!==s&&i.setAttribute("stop-opacity",String(s)),this.node.appendChild(i),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 Ze{constructor(t){this.gradient=t}stop(t,e,s){return this.gradient.stop(t,e,s),this}}let Ke=0;class Je extends Ve{constructor(t,e,s,i){if(super(m.createElementNS(P,"pattern")),this._id="SvgjsPattern"+ ++Ke,this.attr({id:this._id,width:e,height:s,patternUnits:"userSpaceOnUse"}),"function"==typeof i){i(new Qe(this.node))}let a=t.node.querySelector("defs");a||(a=m.createElementNS(P,"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 Qe extends Ve{line(t,e,s,i){const a=this._make("line");return void 0!==t&&a.attr({x1:t,y1:e,x2:s,y2:i}),a}rect(t,e){const s=this._make("rect");return void 0!==t&&s.attr({width:t,height:e}),s}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=m.createElementNS(P,"text");e.textContent=t;const s=new Ve(e);return this.node.appendChild(e),s}text(t){const e=m.createElementNS(P,"text"),s=new Ve(e);return this.node.appendChild(e),"function"==typeof t&&t(new ts(e)),s}image(t,e){const s=m.createElementNS(P,"image");s.setAttributeNS("http://www.w3.org/1999/xlink","href",t);const i=new Ve(s);if(this.node.appendChild(s),"function"==typeof e){const s=new Image;s.onload=function(){i.size(s.width,s.height),e.call(i,{width:s.width,height:s.height})},s.src=t}return i}gradient(t,e){return new qe(this,t,e)}pattern(t,e,s){return new Je(this,t,e,s)}_make(t){const e=m.createElementNS(P,t);return this.node.appendChild(e),new Ve(e)}_makeContainer(t){const e=m.createElementNS(P,t);return this.node.appendChild(e),new Qe(e)}}class ts{constructor(t){this.textNode=t}tspan(t){const e=m.createElementNS(P,"tspan");return e.textContent=t,this.textNode.appendChild(e),new es(e,this.textNode)}}class es{constructor(t,e){this.node=t,this.textNode=e}newLine(){return this.node.setAttribute("dy","1.1em"),this.node.dataset.newline="1",this}}let ss=0;class is extends Ve{constructor(){super(m.createElementNS(P,"filter")),this._id="SvgjsFilter"+ ++ss,this.attr("id",this._id)}size(t,e,s,i){return this.attr({width:t,height:e,x:s,y:i})}}class as{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=m.createElementNS(P,"feMerge");return t.forEach(t=>{const s=m.createElementNS(P,"feMergeNode");s.setAttribute("in",t),e.appendChild(s)}),this.filter.node.appendChild(e),new Ve(e)}_primitive(t,e){const s=m.createElementNS(P,t);for(const t in e)s.setAttribute(t,e[t]);return this.filter.node.appendChild(s),new Ve(s)}}function rs(t){t.prototype.filterWith=function(t){const e=new is;this._filter=e;let s=this.node;for(;s&&"svg"!==s.nodeName;)s=s.parentNode;if(s){let t=s.querySelector("defs");t||(t=m.createElementNS(P,"defs"),s.insertBefore(t,s.firstChild)),t.appendChild(e.node)}return t(new as(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 os(t){t.prototype.draggable=function(t){if(!1===t)return this._dragCleanup&&(this._dragCleanup(),this._dragCleanup=null),this;const e=this,s=t||{},i=t=>{if(t.button&&0!==t.button)return;t.stopPropagation();const i="touchstart"===t.type?t.touches[0]:t,a=e.node,r=parseFloat(a.getAttribute("x"))||0,o=parseFloat(a.getAttribute("y"))||0,n=i.clientX,l=i.clientY,c=a.ownerSVGElement;let d=null;c&&(d=c.getScreenCTM());const p=t=>{const e="touchmove"===t.type?t.touches[0]:t;let i=e.clientX-n,c=e.clientY-l;d&&(i/=d.a,c/=d.d);let h=r+i,p=o+c;const g=parseFloat(a.getAttribute("width"))||0,u=parseFloat(a.getAttribute("height"))||0;void 0!==s.minX&&h<s.minX&&(h=s.minX),void 0!==s.minY&&p<s.minY&&(p=s.minY),void 0!==s.maxX&&h+g>s.maxX&&(h=s.maxX-g),void 0!==s.maxY&&p+u>s.maxY&&(p=s.maxY-u);const x=new CustomEvent("dragmove",{detail:{handler:{move:function(t,e){a.setAttribute("x",t),a.setAttribute("y",e)}},box:{x:h,y:p,w:g,h:u,x2:h+g,y2:p+u}}});a.dispatchEvent(x)},g=()=>{h.isBrowser()&&(document.removeEventListener("mousemove",p),document.removeEventListener("touchmove",p),document.removeEventListener("mouseup",g),document.removeEventListener("touchend",g))};h.isBrowser()&&(document.addEventListener("mousemove",p),document.addEventListener("touchmove",p),document.addEventListener("mouseup",g),document.addEventListener("touchend",g))};return e.node.addEventListener("mousedown",i),e.node.addEventListener("touchstart",i),e._dragCleanup=()=>{e.node.removeEventListener("mousedown",i),e.node.removeEventListener("touchstart",i)},e}}function ns(t){t.prototype.select=function(t){if(!1===t)return this._selectCleanup&&(this._selectCleanup(),this._selectCleanup=null),this;const e=this,{createHandle:s,updateHandle:i}=t,a=document.createElementNS(P,"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 i=new Qe(document.createElementNS(P,"g"));a.appendChild(i.node);const r=s(i,[0,0],e,[],t);o[t]={group:i,handle:r}});const l=()=>{const t=parseFloat(e.attr("x"))||0,s=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,s],b:[t+r/2,s+l],l:[t,s+l/2],r:[t+r,s+l/2],lt:[t,s],rt:[t+r,s],lb:[t,s+l],rb:[t+r,s+l]};n.forEach(t=>{o[t]&&h[t]&&i(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,s=e._selectHandlesMap;if(!s)return e;const i=[],a=t=>{const a=s[t];if(!a||!a.group||!a.group.node)return;const r=a.group.node,o=s=>{if(s.button&&0!==s.button)return;s.stopPropagation();const i=("touchstart"===s.type?s.touches[0]:s).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=s=>{let a=("touchmove"===s.type?s.touches[0]:s).clientX-i;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=()=>{h.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)};h.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),i.push(()=>{r.removeEventListener("mousedown",o),r.removeEventListener("touchstart",o)})};return a("l"),a("r"),e._resizeCleanup=()=>{i.forEach(t=>t())},e}}function ls(){const t=m.createElementNS(P,"svg"),e=new Qe(t);return e.attr({xmlns:P}),e}rs(Ve),tt(Ve),os(Ve),ns(Ve),ls.xlink="http://www.w3.org/1999/xlink",h.isBrowser()&&void 0===window.SVG&&(window.SVG=ls),h.isBrowser()?(void 0===window.SVG&&(window.SVG=ls),void 0===window.Apex&&(window.Apex={})):"undefined"!=typeof global&&(void 0===global.Apex&&(global.Apex={}),void 0===global.SVG&&(global.SVG=ls));const cs=class t{static registerFeatures(e){for(const[s,i]of Object.entries(e))t._featureRegistry.set(s,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","paper","getActiveRenderer","destroy"],this.ctx.eventList=["click","mousedown","mousemove","mouseleave","touchstart","touchmove","touchleave","mouseup","touchend","keydown","keyup"],this.ctx.animations=new pt(this.w,this.ctx),this.ctx.axes=new _t(this.w,this.ctx),this.ctx.core=new _e(this.ctx.el,this.w,this.ctx),this.ctx.config=new M({}),this.ctx.data=new Pe(this.w,{resetGlobals:()=>this.ctx.core.resetGlobals(),isMultipleY:()=>this.ctx.core.isMultipleY()}),this.ctx.grid=new kt(this.w,this.ctx),this.ctx.graphics=new ut(this.w,this.ctx),this.ctx.coreUtils=new _(this.w),this.ctx.crosshairs=new Pt(this.w),this.ctx.events=new Ft(this.w,this.ctx),this.ctx.fill=new xt(this.w),this.ctx.localization=new Et(this.w),this.ctx.options=new k,this.ctx.responsive=new Nt(this.w),this.ctx.series=new ee(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 le(this.w),this.ctx.formatters=new w(this.w),this.ctx.titleSubtitle=new ce(this.w),this.ctx.dimensions=new ue(this.w,this.ctx),this.ctx.updateHelpers=new Be(this.w,this.ctx),this.ctx.rendererController=new $e(this.w,this.ctx),this.ctx.renderer=this.ctx.rendererController.active;const t=new Oe(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 e=t._featureRegistry,s=this.w,i=this.ctx,a=e.get("exports");i.exports=a?new a(s,i):null;const r=e.get("legend");i.legend=r?new r(s,i):null;const o=e.get("morphTypeChange");i.morphTypeChange=o?new o(s,i):null;const n=e.get("drilldown");i.drilldown=n?new n(s,i):null;const l=e.get("perspectives");i.perspectives=l?new l(s,i):null;const c=e.get("storyboard");i.storyboard=c?new c(s,i):null;const h=e.get("history");i.history=h?new h(s,i):null;const d=e.get("linkedViews");i.linkedViews=d?new d(s,i):null;const p=e.get("ink");i.ink=p?new p(s,i):null;const g=e.get("measure");i.measure=g?new g(s,i):null;const u=e.get("contextMenu");i.contextMenu=u?new u(s,i):null;const x=e.get("weave");i.weave=x?new x(s,i):null;const f=e.get("osThemeWatcher");i.osThemeWatcher=f?new f(s,i):null;const m=e.get("toolbar");Object.defineProperty(i,"toolbar",{get(){var t;return!this._toolbar&&m&&(this._toolbar=new m(s,this)),null!=(t=this._toolbar)?t:null},configurable:!0});const b=e.get("zoomPanSelection");Object.defineProperty(i,"zoomPanSelection",{get(){var t;return!this._zoomPanSelection&&b&&(this._zoomPanSelection=new b(s,this)),null!=(t=this._zoomPanSelection)?t:null},configurable:!0});const y=e.get("keyboardNavigation");Object.defineProperty(i,"keyboardNavigation",{get(){var t;return!this._keyboardNavigation&&y&&(this._keyboardNavigation=new y(s,this)),null!=(t=this._keyboardNavigation)?t:null},configurable:!0})}};c(cs,"_featureRegistry",new Map);let hs=cs;class ds{constructor(t){this.ctx=t,this.w=t.w}clear({isUpdating:t}){var e,s,i,a,r,o,n,l,c,h,d;null==(e=this.ctx.weave)||e.teardown(t),t||(this.w.globals.isDestroyed=!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),At.invalidateAll(this.w),t?(this.ctx._zoomPanSelection=null,this.ctx._toolbar=null,this.ctx._keyboardNavigation=null):(null==(s=this.ctx.perspectives)||s.teardown(),this.ctx.perspectives=null,null==(i=this.ctx.storyboard)||i.teardown(),this.ctx.storyboard=null,null==(a=this.ctx.history)||a.teardown(),this.ctx.history=null,null==(r=this.ctx.linkedViews)||r.teardown(),this.ctx.linkedViews=null,null==(o=this.ctx.ink)||o.teardown(),this.ctx.ink=null,null==(n=this.ctx.measure)||n.teardown(),this.ctx.measure=null,null==(l=this.ctx.contextMenu)||l.teardown(),this.ctx.contextMenu=null,null==(c=this.ctx.osThemeWatcher)||c.teardown(),this.ctx.osThemeWatcher=null,this.ctx.weave=null,null==(d=null==(h=this.ctx.rendererController)?void 0:h.teardown)||d.call(h),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,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(h.isBrowser()&&e.Paper){const s=e.Paper.node;s.parentNode&&s.parentNode.parentNode&&!t&&(s.parentNode.parentNode.style.minHeight="unset");const i=e.baseEl;if(i&&this.ctx.eventList.forEach(t=>{i.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.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 ps="__apexcharts_plugins__";function gs(){const t=globalThis;return t[ps]||(t[ps]={}),t[ps]}const us=new WeakMap;function xs(t,e){if(h.isSSR())return;let s=!1;if(t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE){const e=t.getBoundingClientRect();"none"!==t.style.display&&0!==e.width||(s=!0)}const i=new ResizeObserver(i=>{s&&e.call(t,i),s=!0});t.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Array.from(t.children).forEach(t=>i.observe(t)):i.observe(t),us.set(e,i)}function fs(t,e){if(h.isSSR())return;const s=us.get(e);s&&(s.disconnect(),us.delete(e))}const ms=class t{constructor(t,e){c(this,"core"),c(this,"responsive"),c(this,"axes"),c(this,"grid"),c(this,"graphics"),c(this,"coreUtils"),c(this,"crosshairs"),c(this,"events"),c(this,"fill"),c(this,"localization"),c(this,"options"),c(this,"series"),c(this,"theme"),c(this,"formatters"),c(this,"titleSubtitle"),c(this,"dimensions"),c(this,"updateHelpers"),c(this,"tooltip"),c(this,"data"),c(this,"animations"),c(this,"exports"),c(this,"legend"),c(this,"toolbar"),c(this,"zoomPanSelection"),c(this,"keyboardNavigation"),c(this,"annotations"),c(this,"morphTypeChange"),c(this,"timeScale"),c(this,"_keyboardNavigation"),c(this,"windowResizeHandler"),c(this,"parentResizeHandler"),c(this,"publicMethods",[]),c(this,"eventList",[]),c(this,"_renderPromise",null),c(this,"config"),c(this,"perspectives"),c(this,"storyboard"),c(this,"history"),c(this,"linkedViews"),c(this,"ink"),c(this,"measure"),c(this,"contextMenu"),c(this,"weave"),c(this,"renderer"),c(this,"rendererController"),this.opts=e,this.ctx=this,this.w=new E(e).init(),this.el=t,this.w.globals.cuid=b.randomId(),this.w.globals.chartID=this.w.config.chart.id?b.escapeString(this.w.config.chart.id):this.w.globals.cuid,ht(this.w);new hs(this).initModules(),this.lastUpdateOptions=null,this.create=this.create.bind(this),h.isBrowser()&&(this.windowResizeHandler=this._windowResizeHandler.bind(this),this.parentResizeHandler=this._parentResizeCallback.bind(this))}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 s=new Promise((t,e)=>{var s;if(b.elementExists(this.el)){void 0===Apex._chartInstances&&(Apex._chartInstances=[]),this.w.config.chart.id&&Apex._chartInstances.push({id:this.w.globals.chartID,group:this.w.config.chart.group,chart:this}),this.setLocale(this.w.config.chart.defaultLocale);const i=this.w.config.chart.events.beforeMount;if("function"==typeof i&&i(this,this.w),this.events.fireEvent("beforeMount",[this,this.w]),h.isBrowser()){window.addEventListener("resize",this.windowResizeHandler),xs(this.el.parentNode,this.parentResizeHandler);const t=this.el.getRootNode&&this.el.getRootNode(),e=b.is("ShadowRoot",t),i=this.el.ownerDocument;let a=e?t.getElementById("apexcharts-css"):i.getElementById("apexcharts-css");if(!a){a=m.createElementNS("http://www.w3.org/1999/xhtml","style"),a.id="apexcharts-css",a.textContent='@keyframes opaque {\n 0% {\n opacity: 0\n }\n\n to {\n opacity: 1\n }\n}\n\n@keyframes resizeanim {\n\n 0%,\n to {\n opacity: 0\n }\n}\n\n.apexcharts-canvas {\n position: relative;\n direction: ltr !important;\n user-select: none;\n /* Focus indicator colour. Themes override below. */\n --apexcharts-focus-color: #008FFB;\n}\n\n/* Dark theme & high-contrast: brighter focus colour for sufficient contrast. */\n.apexcharts-canvas .apexcharts-theme-dark,\n.apexcharts-theme-dark.apexcharts-canvas {\n --apexcharts-focus-color: #FFD500;\n}\n.apexcharts-canvas.apexcharts-high-contrast,\n.apexcharts-high-contrast.apexcharts-canvas {\n --apexcharts-focus-color: #FFFF00;\n}\n\n/* Visually-hidden aria-live status region (WCAG 4.1.3 Status Messages). */\n.apexcharts-sr-status {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n}\n\n/* Respect OS-level reduced-motion preference (WCAG 2.3.3). */\n@media (prefers-reduced-motion: reduce) {\n .apexcharts-canvas *,\n .apexcharts-canvas *::before,\n .apexcharts-canvas *::after {\n animation-duration: 0.01ms !important;\n animation-iteration-count: 1 !important;\n transition-duration: 0.01ms !important;\n }\n}\n\n.apexcharts-canvas ::-webkit-scrollbar {\n -webkit-appearance: none;\n width: 6px\n}\n\n.apexcharts-canvas ::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background-color: rgba(0, 0, 0, .5);\n box-shadow: 0 0 1px rgba(255, 255, 255, .5);\n -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5)\n}\n\n.apexcharts-inner {\n position: relative\n}\n\n.apexcharts-text tspan {\n font-family: inherit\n}\n\nrect.legend-mouseover-inactive,\n.legend-mouseover-inactive rect,\n.legend-mouseover-inactive path,\n.legend-mouseover-inactive circle,\n.legend-mouseover-inactive line,\n.legend-mouseover-inactive text.apexcharts-yaxis-title-text,\n.legend-mouseover-inactive text.apexcharts-yaxis-label {\n transition: .15s ease all;\n opacity: .2\n}\n\n/* Linked Views (#4): per-mark crossfilter dim. Applied to individual data\n marks (not whole series) whose x is outside the brushed range. Opacity is\n overridable per chart via the --apx-cf-dim custom property. */\n.apexcharts-crossfilter-dimmed {\n transition: opacity .25s ease;\n opacity: var(--apx-cf-dim, .2)\n}\n\n/* Linked Views (#4): default styling for the built-in crossfilter data table\n (cf.dataTable). Deliberately light so host styles can override. */\n.apexcharts-cf-table {\n border-collapse: collapse;\n width: 100%;\n font-size: 13px;\n}\n.apexcharts-cf-table caption {\n caption-side: bottom;\n text-align: right;\n padding: 6px 2px;\n font-size: 12px;\n opacity: .7\n}\n.apexcharts-cf-table th,\n.apexcharts-cf-table td {\n padding: 6px 10px;\n text-align: left;\n border-bottom: 1px solid rgba(0, 0, 0, .08)\n}\n.apexcharts-cf-table th {\n font-weight: 600;\n border-bottom-width: 2px\n}\n.apexcharts-cf-table tbody tr:hover {\n background: rgba(99, 102, 241, .06)\n}\n\n/* Measure ruler (#18): measure / delta ruler.\n Theme via these classes or the --apx-measure-* custom properties below\n (config `chart.measure.colors` overrides both). The ruler group also carries\n a direction class: apexcharts-measure-up | -down | -flat.\n Element classes:\n .apexcharts-measure-band shaded span band\n .apexcharts-measure-vline vertical guide lines\n .apexcharts-measure-line free-mode diagonal line\n .apexcharts-measure-label-bg readout box .apexcharts-measure-label text\n Colors are applied as SVG presentation attributes, so any rule you write on\n these classes overrides them. */\n.apexcharts-canvas {\n --apx-measure-up: #16a34a;\n --apx-measure-down: #dc2626;\n --apx-measure-neutral: #64748b;\n --apx-measure-guide: #94a3b8;\n}\n.apexcharts-measure-capture {\n cursor: crosshair;\n}\n\n/* Radial Actions (#chrome): right-click context menu. Theme via these classes\n or the --apx-menu-* custom properties. */\n.apexcharts-canvas {\n --apx-menu-bg: #ffffff;\n --apx-menu-fg: #1e293b;\n --apx-menu-border: #e2e8f0;\n --apx-menu-hover: #f1f5f9;\n --apx-menu-shadow: rgba(15, 23, 42, 0.18);\n}\n.apexcharts-context-menu {\n min-width: 168px;\n padding: 4px;\n border-radius: 8px;\n background: var(--apx-menu-bg);\n border: 1px solid var(--apx-menu-border);\n box-shadow: 0 6px 22px var(--apx-menu-shadow);\n font-family: Helvetica, Arial, sans-serif;\n font-size: 13px;\n z-index: 20;\n user-select: none;\n}\n.apexcharts-context-menu-item {\n display: block;\n width: 100%;\n box-sizing: border-box;\n text-align: left;\n padding: 7px 12px;\n border: 0;\n border-radius: 5px;\n background: transparent;\n color: var(--apx-menu-fg);\n font: inherit;\n cursor: pointer;\n}\n.apexcharts-context-menu-item:hover,\n.apexcharts-context-menu-item--active {\n background: var(--apx-menu-hover);\n}\n.apexcharts-context-menu-item:focus {\n outline: none;\n}\n\n/* Ink Layer (#7): the floating note editor card, opened by clicking an\n ink-managed annotation. Theme via these classes or the --apx-ink-* vars. */\n.apexcharts-canvas {\n --apx-ink-card-bg: #ffffff;\n --apx-ink-card-fg: #1e293b;\n --apx-ink-card-border: #e2e8f0;\n --apx-ink-card-hover: #f1f5f9;\n --apx-ink-card-accent: #6366f1;\n --apx-ink-card-shadow: rgba(15, 23, 42, 0.18);\n}\n.apexcharts-ink-card {\n position: absolute;\n z-index: 25;\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 8px;\n border-radius: 8px;\n background: var(--apx-ink-card-bg);\n border: 1px solid var(--apx-ink-card-border);\n box-shadow: 0 6px 22px var(--apx-ink-card-shadow);\n font-family: Helvetica, Arial, sans-serif;\n font-size: 12px;\n color: var(--apx-ink-card-fg);\n user-select: none;\n}\n.apexcharts-ink-card-row {\n display: flex;\n align-items: center;\n gap: 4px;\n}\n.apexcharts-ink-card input.apexcharts-ink-editor {\n flex: 1 1 auto;\n width: 150px;\n min-width: 0;\n box-sizing: border-box;\n padding: 4px 6px;\n font: inherit;\n color: inherit;\n background: transparent;\n border: 1px solid var(--apx-ink-card-border);\n border-radius: 5px;\n}\n.apexcharts-ink-card input.apexcharts-ink-editor:focus {\n outline: none;\n border-color: var(--apx-ink-card-accent);\n}\n.apexcharts-ink-btn {\n flex: 0 0 auto;\n width: 24px;\n height: 24px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n border: 0;\n border-radius: 5px;\n background: transparent;\n color: inherit;\n font: inherit;\n font-size: 12px;\n line-height: 1;\n cursor: pointer;\n}\n.apexcharts-ink-btn:hover,\n.apexcharts-ink-btn--active {\n background: var(--apx-ink-card-hover);\n}\n.apexcharts-ink-btn:focus-visible,\n.apexcharts-ink-swatch:focus-visible {\n outline: 2px solid var(--apx-ink-card-accent);\n outline-offset: 1px;\n}\n.apexcharts-ink-btn--bold {\n font-weight: 700;\n}\n.apexcharts-ink-btn--delete:hover {\n color: #dc2626;\n}\n.apexcharts-ink-swatch {\n flex: 0 0 auto;\n width: 16px;\n height: 16px;\n padding: 0;\n border: 1px solid rgba(100, 116, 139, 0.45);\n border-radius: 50%;\n cursor: pointer;\n}\n.apexcharts-ink-swatch--active {\n box-shadow:\n 0 0 0 2px var(--apx-ink-card-bg),\n 0 0 0 4px var(--apx-ink-card-accent);\n}\n.apexcharts-ink-sep {\n flex: 0 0 auto;\n width: 1px;\n height: 16px;\n margin: 0 2px;\n background: var(--apx-ink-card-border);\n}\n.apexcharts-ink-cardlabel {\n flex: 0 0 auto;\n font-size: 10px;\n letter-spacing: 0.4px;\n text-transform: uppercase;\n opacity: 0.65;\n margin-right: 2px;\n}\n.apexcharts-ink-marker-size {\n flex: 0 0 auto;\n min-width: 16px;\n text-align: center;\n font-variant-numeric: tabular-nums;\n}\n\n.apexcharts-legend-text {\n padding-left: 15px;\n margin-left: -15px;\n}\n\n.apexcharts-legend-series[role="button"]:focus {\n outline: 2px solid var(--apexcharts-focus-color, #008FFB);\n outline-offset: 2px;\n}\n\n.apexcharts-legend-series[role="button"]:focus:not(:focus-visible) {\n outline: none;\n}\n\n.apexcharts-legend-series[role="button"]:focus-visible {\n outline: 2px solid var(--apexcharts-focus-color, #008FFB);\n outline-offset: 2px;\n}\n\n.apexcharts-series-collapsed {\n opacity: 0\n}\n\n.apexcharts-canvas svg:focus:not(:focus-visible) {\n outline: none;\n}\n\n/* Keyboard navigation focus indicator on SVG data elements.\n SVG elements don\'t support CSS outline, so we use stroke. */\n.apexcharts-bar-area.apexcharts-keyboard-focused,\n.apexcharts-candlestick-area.apexcharts-keyboard-focused,\n.apexcharts-boxPlot-area.apexcharts-keyboard-focused,\n.apexcharts-rangebar-area.apexcharts-keyboard-focused,\n.apexcharts-pie-area.apexcharts-keyboard-focused,\n.apexcharts-heatmap-rect.apexcharts-keyboard-focused,\n.apexcharts-treemap-rect.apexcharts-keyboard-focused {\n stroke: var(--apexcharts-focus-color, #008FFB);\n stroke-width: 2;\n stroke-opacity: 1;\n}\n\n.apexcharts-tooltip {\n --apx-tt-bg: #ffffff;\n --apx-tt-border: rgba(15, 23, 42, 0.06);\n /* Layered shadow: tight inner contact + soft outer drop. The two Y\n * offsets are exposed as variables so they flip in sync with the\n * arrow when the tooltip is below the data point \u2014 see the\n * `[data-placement="bottom"]` rule further down. */\n --apx-tt-shadow-y-mid: 8px;\n --apx-tt-shadow-y-far: 16px;\n --apx-tt-shadow: 0 0 0 1px rgba(15, 23, 42, 0.04), 0 var(--apx-tt-shadow-y-mid) 16px -6px rgba(15, 23, 42, 0.12), 0 var(--apx-tt-shadow-y-far) 36px -12px rgba(15, 23, 42, 0.18);\n --apx-tt-arrow-bg: var(--apx-tt-bg);\n /* Two stacked drop-shadows: the first is a tight contact halo for\n * edge definition against light chart backgrounds; the second is a\n * softer directional drop that lifts the arrow off the surface.\n * `--apx-tt-arrow-drop-y` is the Y offset of the directional drop;\n * a per-placement rule below flips it to negative when the tooltip\n * is below the data point (arrow on top) so the shadow always\n * casts outward instead of into the tooltip body. */\n --apx-tt-arrow-drop-y: 2px;\n --apx-tt-arrow-shadow: drop-shadow(0 0 0.5px rgba(15, 23, 42, 0.2)) drop-shadow(0 var(--apx-tt-arrow-drop-y) 4px rgba(15, 23, 42, 0.2));\n --apx-tt-color: #0f172a;\n --apx-tt-color-muted: rgba(15, 23, 42, 0.55);\n border-radius: 8px;\n background: var(--apx-tt-bg);\n border: 1px solid var(--apx-tt-border);\n box-shadow: var(--apx-tt-shadow);\n color: var(--apx-tt-color);\n cursor: default;\n font-size: 13px;\n left: 0;\n top: 0;\n opacity: 0;\n pointer-events: none;\n position: absolute;\n display: flex;\n flex-direction: column;\n padding: 2px 0;\n white-space: nowrap;\n z-index: 12;\n transition: opacity .12s ease\n}\n\n/* While the tooltip is visible, smoothly animate position changes\n * between data points. Kept short (160 ms) and ease-out so it stays\n * responsive \u2014 too long would feel laggy when sweeping across many\n * points fast. The position transition is only attached after the\n * first paint (Position.applyTooltipPosition flips `data-positioned`\n * once the tooltip has been placed) so the *first* show doesn\'t slide\n * the tooltip in from the previously-stale (0,0) coordinates. */\n.apexcharts-tooltip.apexcharts-active {\n opacity: 1;\n transition: opacity .12s ease\n}\n.apexcharts-tooltip.apexcharts-active[data-positioned="true"] {\n transition: opacity .12s ease, left .16s ease-out, top .16s ease-out\n}\n\n.apexcharts-tooltip.apexcharts-theme-light {\n /* defaults already set above; class kept for backward-compat selectors */\n}\n\n.apexcharts-tooltip.apexcharts-theme-dark {\n --apx-tt-bg: #1c1c1f;\n --apx-tt-border: rgba(255, 255, 255, 0.08);\n --apx-tt-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), 0 var(--apx-tt-shadow-y-mid) 16px -6px rgba(0, 0, 0, 0.45), 0 var(--apx-tt-shadow-y-far) 36px -12px rgba(0, 0, 0, 0.55);\n --apx-tt-arrow-shadow: drop-shadow(0 0 0.5px rgba(0, 0, 0, 0.55)) drop-shadow(0 var(--apx-tt-arrow-drop-y) 4px rgba(0, 0, 0, 0.45));\n --apx-tt-color: #f3f4f6;\n --apx-tt-color-muted: rgba(243, 244, 246, 0.55);\n}\n\n.apexcharts-tooltip * {\n font-family: inherit\n}\n\n.apexcharts-tooltip-title {\n padding: 8px 12px 4px;\n font-size: 12px;\n font-weight: 600;\n letter-spacing: 0.01em;\n color: var(--apx-tt-color-muted);\n background: transparent;\n border-bottom: none;\n margin-bottom: 0\n}\n\n.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title,\n.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title {\n background: transparent;\n border-bottom: none\n}\n\n/* `fillSeriesColor`: each series-group already paints itself with the\n * series colour. Drop the glass body entirely (transparent bg, no\n * border, no backdrop-filter, no padding) and clip the coloured\n * series-group(s) to the tooltip\'s rounded corners so they fill the\n * shell edge-to-edge. Text inside the coloured group is forced to\n * white for contrast. */\n.apexcharts-tooltip.apexcharts-tooltip-fill-series {\n background: transparent;\n -webkit-backdrop-filter: none;\n backdrop-filter: none;\n border: none;\n padding: 0;\n overflow: hidden;\n color: #fff\n}\n\n.apexcharts-tooltip.apexcharts-tooltip-fill-series .apexcharts-tooltip-title {\n background: rgba(0, 0, 0, 0.22);\n color: #fff;\n opacity: 1;\n padding: 6px 12px\n}\n\n.apexcharts-tooltip.apexcharts-tooltip-fill-series .apexcharts-tooltip-series-group {\n color: #fff\n}\n\n/* Arrow connector \u2014 sits *entirely outside* the tooltip body. Shares\n * the body\'s solid fill so it reads as a single shape. `filter:\n * drop-shadow` traces the clipped triangle outline (a regular\n * `box-shadow` would be erased by the `clip-path`). */\n.apexcharts-tooltip-arrow {\n position: absolute;\n width: 7px;\n height: 14px;\n background: var(--apx-tt-arrow-bg);\n /* The variable already contains the full `drop-shadow(...) ...` filter\n * chain (stacked shadows) so it\'s applied raw. */\n -webkit-filter: var(--apx-tt-arrow-shadow);\n filter: var(--apx-tt-arrow-shadow);\n pointer-events: none;\n top: calc(var(--apx-tt-arrow-y, 50%) - 7px)\n}\n\n.apexcharts-tooltip[data-placement="right"] .apexcharts-tooltip-arrow {\n left: -7px;\n clip-path: polygon(0 50%, 100% 0, 100% 100%)\n}\n\n.apexcharts-tooltip[data-placement="left"] .apexcharts-tooltip-arrow {\n right: -7px;\n clip-path: polygon(100% 50%, 0 0, 0 100%)\n}\n\n/* Vertical arrow variants: tooltip is above/below the data point and the\n * arrow points down/up. The base rule above uses `--apx-tt-arrow-y` for\n * left/right placement; for top/bottom we re-orient the rectangle and\n * use `--apx-tt-arrow-x` (set by applyTooltipPosition). */\n.apexcharts-tooltip[data-placement="top"] .apexcharts-tooltip-arrow,\n.apexcharts-tooltip[data-placement="bottom"] .apexcharts-tooltip-arrow {\n width: 14px;\n height: 7px;\n top: auto;\n left: calc(var(--apx-tt-arrow-x, 50%) - 7px)\n}\n\n.apexcharts-tooltip[data-placement="top"] .apexcharts-tooltip-arrow {\n bottom: -7px;\n clip-path: polygon(50% 100%, 0 0, 100% 0)\n}\n\n.apexcharts-tooltip[data-placement="bottom"] .apexcharts-tooltip-arrow {\n top: -7px;\n clip-path: polygon(50% 0, 0 100%, 100% 100%)\n}\n\n/* When the tooltip is flipped below the data point (arrow on top\n * pointing up), the default downward-biased shadows leave the top\n * edge of both the body *and* the arrow undefined. Flipping every\n * Y offset to negative casts the entire elevation upward so the\n * shadow falls between the tooltip and the bar above. */\n.apexcharts-tooltip[data-placement="bottom"] {\n --apx-tt-shadow-y-mid: -8px;\n --apx-tt-shadow-y-far: -16px;\n --apx-tt-arrow-drop-y: -2px\n}\n\n.apexcharts-tooltip-text-goals-value,\n.apexcharts-tooltip-text-y-value,\n.apexcharts-tooltip-text-z-value {\n display: inline-block;\n margin-left: 5px;\n font-weight: 600\n}\n\n.apexcharts-tooltip-text-goals-label:empty,\n.apexcharts-tooltip-text-goals-value:empty,\n.apexcharts-tooltip-text-y-label:empty,\n.apexcharts-tooltip-text-y-value:empty,\n.apexcharts-tooltip-text-z-value:empty,\n.apexcharts-tooltip-title:empty {\n display: none\n}\n\n.apexcharts-tooltip-text-goals-label,\n.apexcharts-tooltip-text-goals-value {\n padding: 6px 0 5px\n}\n\n.apexcharts-tooltip-goals-group,\n.apexcharts-tooltip-text-goals-label,\n.apexcharts-tooltip-text-goals-value {\n display: flex\n}\n\n.apexcharts-tooltip-text-goals-label:not(:empty),\n.apexcharts-tooltip-text-goals-value:not(:empty) {\n margin-top: -6px\n}\n\n.apexcharts-tooltip-marker {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n position: relative;\n width: 12px;\n height: 12px;\n margin-right: 6px;\n vertical-align: middle;\n color: inherit;\n}\n\n.apexcharts-tooltip-marker svg {\n width: 100%;\n height: 100%;\n display: block;\n}\n\n.apexcharts-tooltip-series-group {\n padding: 4px 12px;\n display: none;\n gap: 8px;\n text-align: left;\n justify-content: left;\n align-items: center\n}\n\n.apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker {\n opacity: 1\n}\n\n.apexcharts-tooltip-series-group.apexcharts-active:last-child,\n.apexcharts-tooltip-series-group:last-child {\n padding-bottom: 8px\n}\n\n.apexcharts-tooltip-y-group {\n padding: 6px 0 5px\n}\n\n.apexcharts-custom-tooltip,\n.apexcharts-tooltip-box {\n padding: 4px 8px\n}\n\n.apexcharts-tooltip-boxPlot {\n display: flex;\n flex-direction: column-reverse\n}\n\n.apexcharts-tooltip-box>div {\n margin: 4px 0\n}\n\n.apexcharts-tooltip-box span.value {\n font-weight: 700\n}\n\n.apexcharts-tooltip-rangebar {\n padding: 5px 8px\n}\n\n.apexcharts-tooltip-rangebar .category {\n font-weight: 600;\n color: #777\n}\n\n.apexcharts-tooltip-rangebar .series-name {\n font-weight: 700;\n display: block;\n margin-bottom: 5px\n}\n\n/* X/Y axis tooltips \u2014 small popovers that label the crosshair on the\n * axes. Restyled to match the modern data-tooltip palette: solid white\n * body with a subtle border + soft drop-shadow, smaller font, rounded\n * corners. The arrows still use the CSS border-triangle technique\n * (cheap, crisp at small sizes); their colours flow from CSS variables\n * so light/dark themes only need one override per axis. */\n.apexcharts-xaxistooltip,\n.apexcharts-yaxistooltip {\n --apx-axt-bg: #ffffff;\n --apx-axt-border: rgba(15, 23, 42, 0.08);\n --apx-axt-color: #0f172a;\n --apx-axt-shadow: 0 4px 12px -4px rgba(15, 23, 42, 0.18), 0 1px 3px -1px rgba(15, 23, 42, 0.12);\n opacity: 0;\n pointer-events: none;\n color: var(--apx-axt-color);\n font-size: 12px;\n font-weight: 500;\n text-align: center;\n border-radius: 6px;\n position: absolute;\n z-index: 10;\n background: var(--apx-axt-bg);\n border: 1px solid var(--apx-axt-border);\n box-shadow: var(--apx-axt-shadow)\n}\n\n.apexcharts-xaxistooltip.apexcharts-theme-dark,\n.apexcharts-yaxistooltip.apexcharts-theme-dark {\n --apx-axt-bg: #1c1c1f;\n --apx-axt-border: rgba(255, 255, 255, 0.1);\n --apx-axt-color: #f3f4f6;\n --apx-axt-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.55), 0 1px 3px -1px rgba(0, 0, 0, 0.45)\n}\n\n.apexcharts-xaxistooltip {\n padding: 4px 8px;\n transition: .15s ease all\n}\n\n.apexcharts-xaxistooltip:after,\n.apexcharts-xaxistooltip:before {\n left: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n/* :before paints the 1px border outline of the triangle (slightly larger\n * than :after); :after sits inside and paints the fill \u2014 leaves a 1px\n * ring of :before visible at the edges. */\n.apexcharts-xaxistooltip:after {\n border-color: transparent;\n border-width: 5px;\n margin-left: -5px\n}\n\n.apexcharts-xaxistooltip:before {\n border-color: transparent;\n border-width: 6px;\n margin-left: -6px\n}\n\n.apexcharts-xaxistooltip-bottom:after,\n.apexcharts-xaxistooltip-bottom:before {\n bottom: 100%\n}\n\n.apexcharts-xaxistooltip-top:after,\n.apexcharts-xaxistooltip-top:before {\n top: 100%\n}\n\n.apexcharts-xaxistooltip-bottom:after {\n border-bottom-color: var(--apx-axt-bg)\n}\n\n.apexcharts-xaxistooltip-bottom:before {\n border-bottom-color: var(--apx-axt-border)\n}\n\n.apexcharts-xaxistooltip-top:after {\n border-top-color: var(--apx-axt-bg)\n}\n\n.apexcharts-xaxistooltip-top:before {\n border-top-color: var(--apx-axt-border)\n}\n\n.apexcharts-xaxistooltip.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-yaxistooltip {\n padding: 3px 8px\n}\n\n.apexcharts-yaxistooltip:after,\n.apexcharts-yaxistooltip:before {\n top: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-yaxistooltip:after {\n border-color: transparent;\n border-width: 5px;\n margin-top: -5px\n}\n\n.apexcharts-yaxistooltip:before {\n border-color: transparent;\n border-width: 6px;\n margin-top: -6px\n}\n\n.apexcharts-yaxistooltip-left:after,\n.apexcharts-yaxistooltip-left:before {\n left: 100%\n}\n\n.apexcharts-yaxistooltip-right:after,\n.apexcharts-yaxistooltip-right:before {\n right: 100%\n}\n\n.apexcharts-yaxistooltip-left:after {\n border-left-color: var(--apx-axt-bg)\n}\n\n.apexcharts-yaxistooltip-left:before {\n border-left-color: var(--apx-axt-border)\n}\n\n.apexcharts-yaxistooltip-right:after {\n border-right-color: var(--apx-axt-bg)\n}\n\n.apexcharts-yaxistooltip-right:before {\n border-right-color: var(--apx-axt-border)\n}\n\n.apexcharts-yaxistooltip.apexcharts-active {\n opacity: 1\n}\n\n.apexcharts-yaxistooltip-hidden {\n display: none\n}\n\n.apexcharts-xcrosshairs,\n.apexcharts-ycrosshairs {\n pointer-events: none;\n opacity: 0;\n transition: .15s ease all\n}\n\n.apexcharts-xcrosshairs.apexcharts-active,\n.apexcharts-ycrosshairs.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-ycrosshairs-hidden {\n opacity: 0\n}\n\n.apexcharts-selection-rect {\n cursor: move\n}\n\n.svg_select_shape {\n stroke-width: 1;\n stroke-dasharray: 10 10;\n stroke: black;\n stroke-opacity: 0.1;\n pointer-events: none;\n fill: none;\n}\n\n.svg_select_handle {\n stroke-width: 3;\n stroke: black;\n fill: none;\n}\n\n.svg_select_handle_r {\n cursor: e-resize;\n}\n\n.svg_select_handle_l {\n cursor: w-resize;\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-zoom {\n cursor: crosshair\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-pan {\n cursor: move\n}\n\n.apexcharts-menu-icon,\n.apexcharts-measure-icon,\n.apexcharts-pan-icon,\n.apexcharts-reset-icon,\n.apexcharts-selection-icon,\n.apexcharts-toolbar-custom-icon,\n.apexcharts-zoom-icon,\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n cursor: pointer;\n /* WCAG 2.5.8 Target Size (Minimum): 24\xd724 CSS px hit target. */\n width: 26px;\n height: 24px;\n line-height: 24px;\n color: #6e8192;\n text-align: center;\n /* Reset native <button> chrome \u2014 these are styled via SVG icons. */\n padding: 0;\n margin: 0;\n background: transparent;\n border: 0;\n border-radius: 5px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n transition: background-color .12s ease, color .12s ease;\n}\n\n.apexcharts-menu-icon svg,\n.apexcharts-measure-icon svg,\n.apexcharts-pan-icon svg,\n.apexcharts-reset-icon svg,\n.apexcharts-selection-icon svg,\n.apexcharts-zoom-icon svg,\n.apexcharts-zoomin-icon svg,\n.apexcharts-zoomout-icon svg {\n width: 18px;\n height: 18px;\n fill: none;\n stroke: currentColor;\n stroke-width: 2;\n stroke-linecap: round;\n stroke-linejoin: round\n}\n\n.apexcharts-theme-dark .apexcharts-menu-icon,\n.apexcharts-theme-dark .apexcharts-measure-icon,\n.apexcharts-theme-dark .apexcharts-pan-icon,\n.apexcharts-theme-dark .apexcharts-reset-icon,\n.apexcharts-theme-dark .apexcharts-selection-icon,\n.apexcharts-theme-dark .apexcharts-toolbar-custom-icon,\n.apexcharts-theme-dark .apexcharts-zoom-icon,\n.apexcharts-theme-dark .apexcharts-zoomin-icon,\n.apexcharts-theme-dark .apexcharts-zoomout-icon {\n color: #d4d6dc\n}\n\n.apexcharts-canvas .apexcharts-measure-icon.apexcharts-selected,\n.apexcharts-canvas .apexcharts-pan-icon.apexcharts-selected,\n.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected,\n.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected,\n.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected {\n background: rgba(0, 143, 251, 0.12);\n color: #008ffb\n}\n\n.apexcharts-theme-light .apexcharts-menu-icon:hover,\n.apexcharts-theme-light .apexcharts-measure-icon:not(.apexcharts-selected):hover,\n.apexcharts-theme-light .apexcharts-pan-icon:not(.apexcharts-selected):hover,\n.apexcharts-theme-light .apexcharts-reset-icon:hover,\n.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover,\n.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover,\n.apexcharts-theme-light .apexcharts-zoomin-icon:hover,\n.apexcharts-theme-light .apexcharts-zoomout-icon:hover {\n background: rgba(15, 23, 42, 0.06);\n color: #1f2937\n}\n\n.apexcharts-theme-dark .apexcharts-menu-icon:hover,\n.apexcharts-theme-dark .apexcharts-measure-icon:not(.apexcharts-selected):hover,\n.apexcharts-theme-dark .apexcharts-pan-icon:not(.apexcharts-selected):hover,\n.apexcharts-theme-dark .apexcharts-reset-icon:hover,\n.apexcharts-theme-dark .apexcharts-selection-icon:not(.apexcharts-selected):hover,\n.apexcharts-theme-dark .apexcharts-zoom-icon:not(.apexcharts-selected):hover,\n.apexcharts-theme-dark .apexcharts-zoomin-icon:hover,\n.apexcharts-theme-dark .apexcharts-zoomout-icon:hover {\n background: rgba(255, 255, 255, 0.08);\n color: #fff\n}\n\n.apexcharts-menu-icon,\n.apexcharts-selection-icon {\n position: relative\n}\n\n.apexcharts-toolbar {\n position: absolute;\n z-index: 11;\n display: inline-flex;\n align-items: center;\n gap: 1px;\n padding: 3px;\n border-radius: 8px;\n background: rgba(255, 255, 255, 0.85);\n backdrop-filter: blur(8px);\n -webkit-backdrop-filter: blur(8px);\n}\n\n.apexcharts-theme-dark .apexcharts-toolbar {\n background: rgba(28, 28, 31, 0.82);\n}\n\n.apexcharts-menu {\n background: rgba(255, 255, 255, 0.95);\n backdrop-filter: blur(8px);\n -webkit-backdrop-filter: blur(8px);\n position: absolute;\n top: calc(100% + 4px);\n border: 1px solid rgba(15, 23, 42, 0.08);\n border-radius: 8px;\n padding: 4px;\n right: 0;\n opacity: 0;\n min-width: 120px;\n transition: opacity .15s ease, transform .15s ease;\n transform: translateY(-2px);\n pointer-events: none;\n box-shadow: 0 4px 16px -4px rgba(15, 23, 42, 0.12), 0 2px 4px -1px rgba(15, 23, 42, 0.06)\n}\n\n.apexcharts-menu.apexcharts-menu-open {\n opacity: 1;\n transform: translateY(0);\n pointer-events: all\n}\n\n.apexcharts-menu-item {\n padding: 6px 9px;\n font-size: 12px;\n border-radius: 5px;\n cursor: pointer\n}\n\n.apexcharts-theme-light .apexcharts-menu-item:hover {\n background: rgba(15, 23, 42, 0.06)\n}\n\n.apexcharts-theme-dark .apexcharts-menu {\n background: rgba(28, 28, 31, 0.92);\n border-color: rgba(255, 255, 255, 0.08);\n color: #f3f4f6;\n box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.4)\n}\n\n.apexcharts-theme-dark .apexcharts-menu-item:hover {\n background: rgba(255, 255, 255, 0.08)\n}\n\n@media screen and (min-width:768px) {\n .apexcharts-canvas:hover .apexcharts-toolbar {\n opacity: 1\n }\n}\n\n/* Toolbar keyboard accessibility: show toolbar when any button inside it is focused */\n.apexcharts-toolbar:focus-within {\n opacity: 1\n}\n\n/* Focus indicator for toolbar icon buttons */\n.apexcharts-menu-icon:focus-visible,\n.apexcharts-measure-icon:focus-visible,\n.apexcharts-pan-icon:focus-visible,\n.apexcharts-reset-icon:focus-visible,\n.apexcharts-selection-icon:focus-visible,\n.apexcharts-toolbar-custom-icon:focus-visible,\n.apexcharts-zoom-icon:focus-visible,\n.apexcharts-zoomin-icon:focus-visible,\n.apexcharts-zoomout-icon:focus-visible {\n outline: 2px solid var(--apexcharts-focus-color, #008FFB);\n outline-offset: 1px;\n border-radius: 5px\n}\n\n/* Focus indicator for hamburger menu items */\n.apexcharts-menu-item:focus-visible {\n outline: 2px solid var(--apexcharts-focus-color, #008FFB);\n outline-offset: -2px;\n background: #eee\n}\n\n.apexcharts-canvas .apexcharts-element-hidden,\n.apexcharts-datalabel.apexcharts-element-hidden,\n.apexcharts-hide .apexcharts-series-points {\n opacity: 0;\n}\n\n.apexcharts-hidden-element-shown {\n opacity: 1;\n transition: 0.25s ease all;\n}\n\n.apexcharts-datalabel,\n.apexcharts-datalabel-label,\n.apexcharts-datalabel-value,\n.apexcharts-datalabels,\n.apexcharts-pie-label,\n.apexcharts-pie-name-label,\n.apexcharts-pie-name-label-group,\n.apexcharts-pie-label-connector {\n cursor: default;\n pointer-events: none\n}\n\n.apexcharts-pie-label-connector {\n fill: none\n}\n\n.apexcharts-pie-label-delay {\n opacity: 0;\n animation-name: opaque;\n animation-duration: .3s;\n animation-fill-mode: forwards;\n animation-timing-function: ease\n}\n\n.apexcharts-radialbar-label {\n cursor: pointer;\n}\n\n.apexcharts-annotation-rect,\n.apexcharts-area-series .apexcharts-area,\n.apexcharts-gridline,\n.apexcharts-line,\n.apexcharts-point-annotation-label,\n.apexcharts-radar-series path:not(.apexcharts-marker),\n.apexcharts-radar-series polygon,\n.apexcharts-toolbar svg,\n.apexcharts-tooltip .apexcharts-marker,\n.apexcharts-xaxis-annotation-label,\n.apexcharts-yaxis-annotation-label,\n.apexcharts-zoom-rect,\n.no-pointer-events {\n pointer-events: none\n}\n\n.apexcharts-tooltip-active .apexcharts-marker {\n transition: .15s ease all\n}\n\n.apexcharts-radar-series .apexcharts-yaxis {\n pointer-events: none;\n}\n\n.resize-triggers {\n animation: 1ms resizeanim;\n visibility: hidden;\n opacity: 0;\n height: 100%;\n width: 100%;\n overflow: hidden\n}\n\n.contract-trigger:before,\n.resize-triggers,\n.resize-triggers>div {\n content: " ";\n display: block;\n position: absolute;\n top: 0;\n left: 0\n}\n\n.resize-triggers>div {\n height: 100%;\n width: 100%;\n background: #eee;\n overflow: auto\n}\n\n.contract-trigger:before {\n overflow: hidden;\n width: 200%;\n height: 200%\n}\n\n.apexcharts-bar-goals-markers {\n pointer-events: none\n}\n\n.apexcharts-bar-shadows {\n pointer-events: none\n}\n\n.apexcharts-rangebar-goals-markers {\n pointer-events: none\n}\n\n.apexcharts-drilldown-target {\n cursor: pointer\n}\n\n.apexcharts-breadcrumb {\n position: absolute;\n z-index: 11;\n display: inline-flex;\n align-items: center;\n gap: 2px;\n font-size: 12px;\n font-family: inherit;\n padding: 2px 4px\n}\n\n.apexcharts-breadcrumb-item {\n background: transparent;\n border: none;\n padding: 2px 6px;\n border-radius: 3px;\n font: inherit;\n color: inherit;\n cursor: pointer;\n line-height: 1.2\n}\n\n.apexcharts-breadcrumb-item:hover:not(.apexcharts-breadcrumb-current) {\n background: rgba(0, 0, 0, 0.08)\n}\n\n.apexcharts-breadcrumb-arrow {\n margin-right: 4px;\n font-weight: 600;\n user-select: none\n}\n\n.apexcharts-breadcrumb-current {\n cursor: default;\n font-weight: 600;\n opacity: 0.85\n}\n\n.apexcharts-breadcrumb-separator {\n opacity: 0.5;\n user-select: none\n}\n\n.apexcharts-theme-dark .apexcharts-breadcrumb-item:hover:not(.apexcharts-breadcrumb-current) {\n background: rgba(255, 255, 255, 0.12)\n}\n\n.apexcharts-disable-transitions * {\n transition: none !important;\n}';const r=(null==(s=this.opts.chart)?void 0:s.nonce)||this.w.config.chart.nonce;r&&a.setAttribute("nonce",r),e?t.prepend(a):!1!==this.w.config.chart.injectStyleSheet&&i.head.appendChild(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 s,i;const a=t instanceof Error?t:new Error(String(t)),r=a;r.chartId=null==(i=null==(s=this.w)?void 0:s.globals)?void 0:i.chartID,r.el=this.el,e(a)})}else e(new Error("Element not found"))});return this._renderPromise=s,s.catch(()=>{this._renderPromise===s&&(this._renderPromise=null)}),s}create(t,e){var s,i,a,r,o,n;const l=this.w;if(!this.core){new hs(this).initModules()}const c=this.w.globals;if(c.noData=!1,c.animationEnded=!1,!b.elementExists(this.el))return c.animationEnded=!0,null;if(this.responsive.checkResponsiveConfig(e),ht(l),l.config.xaxis.convertedCatToNumeric){new C(l.config).convertCatToNumericXaxis(l.config,this.ctx)}if(this.core.setupElements(),"treemap"===l.config.chart.type&&(l.config.grid.show=!1,l.config.yaxis[0].show=!1),0===c.svgWidth)return c.animationEnded=!0,null;let d=t;t.forEach((t,e)=>{t.hidden&&(d=this.legend.legendHelpers.getSeriesAfterCollapsing({realIndex:e}))});const p=_.checkComboSeries(d,l.config.chart.type);c.comboCharts=p.comboCharts,c.comboBarCount=p.comboBarCount;const g=d.every(t=>t.data&&0===t.data.length);(0===d.length||g&&c.collapsedSeries.length<1)&&this.series.handleNoData(),h.isBrowser()&&this.events.setupEventHandlers();const u=this.data.parseData(d);this._writeParsedSeriesData(u.seriesData),this._writeParsedRangeData(u.rangeData),this._writeParsedCandleData(u.candleData),this._writeParsedLabelData(u.labelData),this._writeParsedAxisFlags(u.axisFlags),null==(s=this.rendererController)||s.resolve(),null==(i=this.weave)||i.dispatch("afterParse"),this.theme.init();new yt(this.w,this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),c.noData&&c.collapsedSeries.length!==l.seriesData.series.length&&!l.config.legend.showForSingleSeries||null==(a=this.legend)||a.init(),this.series.hasAllSeriesEqualX(),c.axisCharts&&(this.core.coreCalculations(),"category"!==l.config.xaxis.type&&this.formatters.setLabelFormatters(),this.ctx.toolbar&&(this.ctx.toolbar.minX=l.globals.minX,this.ctx.toolbar.maxX=l.globals.maxX)),this.formatters.heatmapLabelFormatters();new _(this.w).getLargestMarkerSize();const x=this.dimensions.plotCoords();this._writeLayoutCoords(x.layout);const f=this.core.xySettings();null==(r=this.weave)||r.dispatch("afterScales",{xyRatios:f}),this.grid.createGridMask();const m=this.core.plotChartType(d,f),y=new vt(this.w,this);y.bringForward(),l.config.dataLabels.background.enabled&&y.dataLabelsBackground(),this.core.shiftGraphPosition(),null==(n=null==(o=this.legend)?void 0:o.heatmapGradientLegend)||n.repositionToPlot(),l.globals.dataPoints>50&&l.dom.elWrap.classList.add("apexcharts-disable-transitions");return{elGraph:m,xyRatios:f,dimensions:{plot:{left:l.layout.translateX,top:l.layout.translateY,width:l.layout.gridWidth,height:l.layout.gridHeight}}}}mount(t=null){const e=this,s=e.w;return new Promise((i,a)=>{var r,o,n,l,c,d,p,g,u,x;if(null===e.el)return a(new Error("Not enough data to display or target element not found"));(null===t||s.globals.allSeriesCollapsed)&&e.series.handleNoData(),e.grid=new kt(e.w,e);const f=e.grid.drawGrid(),m=hs._featureRegistry.get("annotations");if(e.annotations=m?new m(e.w,{theme:e.theme,timeScale:e.timeScale}):null,null==(r=e.annotations)||r.drawImageAnnos(),null==(o=e.annotations)||o.drawTextAnnos(),"back"===s.config.grid.position&&(f&&s.dom.elGraphical.add(f.el),(null==(n=null==f?void 0:f.elGridBorders)?void 0:n.node)&&s.dom.elGraphical.add(f.elGridBorders)),Array.isArray(t.elGraph))for(let e=0;e<t.elGraph.length;e++)s.dom.elGraphical.add(t.elGraph[e]);else s.dom.elGraphical.add(t.elGraph);"front"===s.config.grid.position&&(f&&s.dom.elGraphical.add(f.el),(null==(l=null==f?void 0:f.elGridBorders)?void 0:l.node)&&s.dom.elGraphical.add(f.elGridBorders)),"front"===s.config.xaxis.crosshairs.position&&e.crosshairs.drawXCrosshairs(),"front"===s.config.yaxis[0].crosshairs.position&&e.crosshairs.drawYCrosshairs(),"treemap"!==s.config.chart.type&&e.axes.drawAxis(s.config.chart.type,f);const b=new St(this.w,this.ctx,f),y=new Lt(this.w,{theme:this.theme,timeScale:this.timeScale},f);if(null!==f&&(b.xAxisLabelCorrections(),y.setYAxisTextAlignments(),s.config.yaxis.map((t,e)=>{-1===s.globals.ignoreYAxisIndexes.indexOf(e)&&y.yAxisTitleRotate(e,t.opposite)})),null==(c=e.annotations)||c.drawAxesAnnotations(),!s.globals.noData){if(h.isBrowser()&&s.config.tooltip.enabled&&!s.globals.noData&&(null==(d=e.w.globals.tooltip)||d.drawTooltip(t.xyRatios)),s.config.chart.accessibility.enabled&&s.config.chart.accessibility.keyboard.enabled&&s.config.chart.accessibility.keyboard.navigation.enabled&&(null==(p=e.keyboardNavigation)||p.init()),h.isBrowser()&&s.globals.axisCharts&&(s.axisFlags.isXNumeric||s.config.xaxis.convertedCatToNumeric||s.axisFlags.isRangeBar))(s.config.chart.zoom.enabled||s.config.chart.selection&&s.config.chart.selection.enabled||s.config.chart.pan&&s.config.chart.pan.enabled)&&(null==(g=e.zoomPanSelection)||g.init({xyRatios:t.xyRatios}));else{const t=s.config.chart.toolbar.tools;["zoom","zoomin","zoomout","selection","pan","reset"].forEach(e=>{t[e]=!1})}s.config.chart.toolbar.show&&!s.globals.allSeriesCollapsed&&(null==(u=e.toolbar)||u.createToolbar())}null==(x=e.weave)||x.dispatch("draw",{pass:"full",xyRatios:null==t?void 0:t.xyRatios}),s.globals.memory.methodsToExec.length>0&&s.globals.memory.methodsToExec.forEach(t=>{t.method(t.params,!1,t.context)}),s.globals.axisCharts||s.globals.noData||e.core.resizeNonAxisCharts(),i(e)})}destroy(){var t;this._renderPromise=null,h.isBrowser()&&(window.removeEventListener("resize",this.windowResizeHandler),fs(this.el.parentNode,this.parentResizeHandler),clearTimeout(null!=(t=this.w.globals.resizeTimer)?t:void 0));const e=this.w.config.chart.id;e&&Array.isArray(Apex._chartInstances)&&Apex._chartInstances.forEach((t,s)=>{t.id===b.escapeString(e)&&Apex._chartInstances.splice(s,1)}),this._keyboardNavigation&&this._keyboardNavigation.destroy(),new ds(this.ctx).clear({isUpdating:!1})}updateOptions(t,e=!1,s=!0,i=!0,a=!0){const r=this.w;if(r.interact.selection=void 0,this.lastUpdateOptions){if(b.shallowEqual(this.lastUpdateOptions,t))return Promise.resolve(this);if(t.series&&this.lastUpdateOptions.series&&JSON.stringify(this.lastUpdateOptions.series)===JSON.stringify(t.series)){const e=n({},t),s=n({},this.lastUpdateOptions);if(delete e.series,delete s.series,b.shallowEqual(e,s))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)),r.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),t.theme&&(t=this.theme.updateThemeOptions(t)),this.updateHelpers._updateOptions(t,e,s,i,a)}updateSeries(t=[],e=!0,s=!0){return this.data.resetParsingFlags(),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(t,e,s)}appendSeries(t,e=!0,s=!0){this.data.resetParsingFlags();const i=this.w.config.series.slice();return i.push(t),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(i,e,s)}appendData(t,e=!0){const s=this;s.data.resetParsingFlags(),s.w.globals.dataChanged=!0,s.series.getPreviousPaths();const i=s.w.config.series.slice();for(let e=0;e<i.length;e++)if(null!==t[e]&&void 0!==t[e]){const s=t[e],a=i[e];for(let t=0;t<s.data.length;t++)a.data.push(s.data[t])}return function(t,e){const s=e.config.chart.streaming;if(!s||!s.enabled)return;const i=s.maxPoints,a=e.config.xaxis.range,r=t=>null==t?null:Array.isArray(t)?"number"==typeof t[0]?t[0]:null:"object"==typeof t&&"number"==typeof t.x?t.x:null;t.forEach(t=>{var e;const s=null==t?void 0:t.data;if(!Array.isArray(s)||s.length<2)return;if("number"==typeof i&&i>0)return void(s.length>i&&(t.data=s.slice(s.length-i)));if(!a)return;const o=r(s[s.length-1]),n=r(s[0]);if(null==o||null==n||o<=n)return;const l=(o-n)/(s.length-1),c=o-a-2*l;let h=0;for(;h<s.length&&(null!=(e=r(s[h]))?e:c)<c;)h++;h>0&&(t.data=s.slice(h))})}(i,s.w),s.w.config.series=i,e&&(s.w.globals.initialSeries=b.clone(s.w.config.series)),this.update()}update(t){return new Promise((e,s)=>{if(this.lastUpdateOptions&&JSON.stringify(this.lastUpdateOptions)===JSON.stringify(t))return e(this);this.lastUpdateOptions=b.clone(t),new ds(this.ctx).clear({isUpdating:!0});const i=this.create(this.w.config.series,null!=t?t:{});if(!i)return e(this);this.mount(i).then(()=>{var t;null==(t=this.morphTypeChange)||t.applyChromeFade(),te(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,e(this)}).catch(t=>{s(t)})})}fastUpdate(t,e){return new Promise((s,i)=>{var a,r,o;try{const n=this.w,l=n.globals;l.shouldAnimate=t,l.dataChanged=!0,l.animationEnded=!1,At.invalidateSelectors(n);const c=n.globals;c.maxY=-Number.MAX_VALUE,c.minY=Number.MIN_VALUE,c.minYArr=[],c.maxYArr=[],c.maxX=-Number.MAX_VALUE,c.minX=Number.MAX_VALUE,c.initialMaxX=-Number.MAX_VALUE,c.initialMinX=Number.MAX_VALUE,c.yAxisScale=[],c.xAxisScale=null,c.xAxisTicksPositions=[],c.xRange=0,c.yRange=[],c.zRange=0,c.xTickAmount=0,c.multiAxisTickAmount=0,c.pointsArray=[],c.barCanvasCoords=null,c.dataLabelsRects=[],c.lastDrawnDataLabelsIndexes=[],c.textRectsCache=new Map,c.domCache=new Map,c.cachedSelectors={},c.disableZoomIn=!1,c.disableZoomOut=!1,l.axisCharts&&(this.core.coreCalculations(),"category"!==n.config.xaxis.type&&this.formatters.setLabelFormatters());const d=this.core.xySettings(),p=JSON.stringify({y:(l.yAxisScale||[]).map(t=>t?t.result:null),xMin:l.minX,xMax:l.maxX});if(l.axisCharts&&null!=e&&p!==e)return this.update().then(()=>s(this)).catch(i);null==(a=this.weave)||a.dispatch("afterScales",{pass:"fast",xyRatios:d});const g=n.dom.elGraphical.node;g.querySelectorAll(".apexcharts-canvas-series-wrap, .apexcharts-series, .apexcharts-datalabels, .apexcharts-datalabels-background").forEach(t=>{var e;return null==(e=t.parentNode)?void 0:e.removeChild(t)});const u=this.core.plotChartType(n.config.series,d),x=g.querySelector(".apexcharts-grid"),f=Array.isArray(u)?u:[u];x&&"front"===n.config.grid.position?f.forEach(t=>{const e=t&&t.node?t.node:t;e&&g.insertBefore(e,x)}):f.forEach(t=>{n.dom.elGraphical.add(t)});const m=new vt(n,this);m.bringForward(),n.config.dataLabels.background.enabled&&m.dataLabelsBackground(),h.isBrowser()&&n.config.tooltip.enabled&&!l.noData&&(null==(r=n.globals.tooltip)||r.drawTooltip(d)),null==(o=this.weave)||o.dispatch("draw",{pass:"fast",xyRatios:d}),"function"==typeof n.config.chart.events.updated&&n.config.chart.events.updated(this,n),this.events.fireEvent("updated",[this,n]),l.isDirty=!0,s(this)}catch(t){i(t)}})}getSyncedCharts(){const t=this.getGroupedCharts();return t.splice(0,0,this),t}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=b.escapeString(t);if(!Apex._chartInstances)return;const s=Apex._chartInstances.filter(t=>t.id===e)[0];return s&&s.chart}static initOnLoad(){var e;const s=document.querySelectorAll("[data-apexcharts]");for(let i=0;i<s.length;i++){const a=s[i],r=JSON.parse(null!=(e=s[i].getAttribute("data-options"))?e:"");new t(a,r).render()}}static exec(t,e,...s){const i=this.getChartByID(t);if(!i)return;i.w.globals.isExecCalled=!0;let a=null;return-1!==i.publicMethods.indexOf(e)&&(a=i[e](...s)),a}static merge(t,e){return b.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){Fe(t)}static registerFeatures(t){hs.registerFeatures(t)}static registerPlugin(e){return function(t){t&&"string"==typeof t.name&&"function"==typeof t.setup&&(gs()[t.name]=t)}(e),t}static unregisterPlugin(e){return function(t){delete gs()[t]}(e),t}static registerRenderer(t,e){$e.registerRenderer(t,e)}static registerSeriesType(e,s){const i=t._customSeriesFactory;return i&&s&&"function"==typeof s.renderItem?(a=e,De()[a]&&!Le(e)||(Fe({[e]:i(e,s)}),function(t){Te().add(t)}(e)),t):t;var a}static unregisterSeriesType(e){return Le(e)&&function(t){delete De()[t],Te().delete(t)}(e),t}static registerTheme(e,s){return function(t,e){t&&"string"==typeof t&&(null==e||"object"==typeof e&&!Array.isArray(e))&&(ae()[t]=e||{})}(e,s),t}static unregisterTheme(e){return function(t){t&&delete ae()[t]}(e),t}static registerEasing(e,s){return function(t,e){"string"==typeof t&&t&&"function"==typeof e&&it.set(t,e)}(e,s),t}static crossfilter(e){const s=t._crossfilterFactory;return s?s(e):null}static getCrossfilter(e){const s=t._crossfilterGet;return s?s(e):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.resetSeries(t,e)}addEventListener(t,e){this.events.addEventListener(t,e)}removeEventListener(t,e){this.events.removeEventListener(t,e)}addXaxisAnnotation(t,e=!0,s=void 0){var i;let a=this;s&&(a=s),null==(i=a.annotations)||i.addXaxisAnnotationExternal(t,e,a)}addYaxisAnnotation(t,e=!0,s=void 0){var i;let a=this;s&&(a=s),null==(i=a.annotations)||i.addYaxisAnnotationExternal(t,e,a)}addPointAnnotation(t,e=!0,s=void 0){var i;let a=this;s&&(a=s),null==(i=a.annotations)||i.addPointAnnotationExternal(t,e,a)}clearAnnotations(t=void 0){var e;let s=this;t&&(s=t),s.lastUpdateOptions=null,null==(e=s.annotations)||e.clearAnnotations(s)}removeAnnotation(t,e=void 0){var s;let i=this;e&&(i=e),i.lastUpdateOptions=null,null==(s=i.annotations)||s.removeAnnotation(i,t)}getChartArea(){return this.w.dom.baseEl.querySelector(".apexcharts-inner")}getSeriesTotalXRange(t,e){return this.coreUtils.getSeriesTotalsXRange(t,e)}getHighestValueInSeries(t=0){return new Dt(this.w).getMinYMaxY(t).highestY}getLowestValueInSeries(t=0){return new Dt(this.w).getMinYMaxY(t).lowestY}getSeriesTotal(){return this.w.globals.seriesTotals}getState(){const t=this.w,e=t.globals;return{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 s;null==(s=this.ctx.toolbar)||s.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.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.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.ctx.exports.exportToCSV(t)}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()}_writeParsedSeriesData(t){Object.assign(this.w.seriesData,t)}_writeParsedRangeData(t){Object.assign(this.w.rangeData,t)}_writeParsedCandleData(t){Object.assign(this.w.candleData,t)}_writeParsedLabelData(t){Object.assign(this.w.labelData,t)}_writeParsedAxisFlags(t){Object.assign(this.w.axisFlags,t)}_writeLayoutCoords(t){Object.assign(this.w.layout,t)}_parentResizeCallback(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}_windowResize(){this.w.globals.resizeTimer=window.setTimeout(()=>{this.w.globals.resized=!0,this.w.globals.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()}};c(ms,"perspectives",null);let bs=ms;exports.__apex_Animations=pt,exports.__apex_Animations_applyAnimationPolicy=ht,exports.__apex_Animations_applyProgressiveReveal=ct,exports.__apex_Animations_computeStagger=dt,exports.__apex_Animations_prefersReducedMotion=lt,exports.__apex_Base=E,exports.__apex_BrowserAPIs_BrowserAPIs=m,exports.__apex_ChartFactory_getChartClass=Ee,exports.__apex_ChartFactory_isCustom=Le,exports.__apex_ChartFactory_register=Fe,exports.__apex_Config=M,exports.__apex_Constants_LINE_HEIGHT_RATIO=D,exports.__apex_Constants_NICE_SCALE_ALLOWED_MAG_MSD=T,exports.__apex_Constants_NICE_SCALE_DEFAULT_TICKS=L,exports.__apex_Core=_e,exports.__apex_CoreUtils=_,exports.__apex_Crosshairs=Pt,exports.__apex_DOMShim_SSRClassList=p,exports.__apex_DOMShim_SSRDOMShim=g,exports.__apex_DOMShim_SSRElement=d,exports.__apex_Data=Pe,exports.__apex_DataLabels=vt,exports.__apex_DateTime=y,exports.__apex_Defaults=C,exports.__apex_Environment_Environment=h,exports.__apex_Events=Ft,exports.__apex_Fill=xt,exports.__apex_Filters=gt,exports.__apex_Formatters=w,exports.__apex_Globals=F,exports.__apex_Graphics=ut,exports.__apex_Markers=yt,exports.__apex_Options=k,exports.__apex_PathMorphing_arrayToPath=z,exports.__apex_PathMorphing_morphPaths=U,exports.__apex_PathMorphing_parsePath=I,exports.__apex_PathMorphing_pathBbox=R,exports.__apex_PerformanceCache=At,exports.__apex_Range=Dt,exports.__apex_Resize_addResizeListener=xs,exports.__apex_Resize_removeResizeListener=fs,exports.__apex_Responsive=Nt,exports.__apex_SVGAnimation_SVGAnimationRunner=Q,exports.__apex_SVGAnimation_installAnimationMethods=tt,exports.__apex_SVGContainer=Qe,exports.__apex_SVGDraggable_installDraggable=os,exports.__apex_SVGElement=Ve,exports.__apex_SVGFilter_FilterBuilder=as,exports.__apex_SVGFilter_SVGFilter=is,exports.__apex_SVGFilter_installFilterMethods=rs,exports.__apex_SVGGradient_SVGGradient=qe,exports.__apex_SVGPattern_SVGPattern=Je,exports.__apex_SVGSelectable_installSelectable=ns,exports.__apex_Scales=Mt,exports.__apex_Series=ee,exports.__apex_Theme=le,exports.__apex_ThemePalettes_getThemePalettes=Tt,exports.__apex_TimeScale=Se,exports.__apex_TitleSubtitle=ce,exports.__apex_Utils=b,exports.__apex_axes_Axes=_t,exports.__apex_axes_AxesUtils=Ct,exports.__apex_axes_Grid=kt,exports.__apex_axes_XAxis=St,exports.__apex_axes_YAxis=Lt,exports.__apex_charts_Scatter=wt,exports.__apex_dimensions_Dimensions=ue,exports.__apex_dimensions_Grid=ge,exports.__apex_dimensions_Helpers=he,exports.__apex_dimensions_XAxis=de,exports.__apex_dimensions_YAxis=pe,exports.__apex_helpers_Destroy=ds,exports.__apex_helpers_InitCtxVariables=hs,exports.__apex_helpers_Localization=Et,exports.__apex_helpers_UpdateHelpers=Be,exports.__apex_index_Box=X,exports.__apex_index_SVG=ls,exports.__apex_math_Box=X,exports.__apex_math_Matrix=N,exports.__apex_math_Point=B,exports.__apex_math_SVGNS=P,exports.__apex_tooltip_AxesTooltip=He,exports.__apex_tooltip_Intersect=Ye,exports.__apex_tooltip_Labels=Xe,exports.__apex_tooltip_Marker=ze,exports.__apex_tooltip_Position=Ie,exports.__apex_tooltip_Tooltip=Oe,exports.__apex_tooltip_Utils=Ne,exports.default=bs;
|
|
5
|
+
"use strict";var t=Object.defineProperty,e=Object.defineProperties,s=Object.getOwnPropertyDescriptors,i=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,o=(e,s,i)=>s in e?t(e,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[s]=i,n=(t,e)=>{for(var s in e||(e={}))a.call(e,s)&&o(t,s,e[s]);if(i)for(var s of i(e))r.call(e,s)&&o(t,s,e[s]);return t},l=(t,i)=>e(t,s(i)),c=(t,e,s)=>o(t,"symbol"!=typeof e?e+"":e,s);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});class h{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:{}}}class d{constructor(t,e=null){this.nodeName=t,this.namespaceURI=e,this.attributes=new Map,this.children=[],this.textContent="",this.style={},this.classList=new p,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 s=this.children.indexOf(e);return-1!==s&&(t.parentNode=this,this.children.splice(s,0,t)),t}cloneNode(t=!1){const e=new d(this.nodeName,this.namespaceURI);return e.textContent=this.textContent,this.attributes.forEach((t,s)=>{e.attributes.set(s,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}}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,s)=>{t+=` ${s}="${e}"`}),0===this.children.length&&!this.textContent)return`<${this.nodeName}${t}/>`;const e=this.children.map(t=>t.toString()).join("");return`<${this.nodeName}${t}>${this.textContent}${e}</${this.nodeName}>`}get innerHTML(){return this.children.map(t=>t.toString()).join("")}set innerHTML(t){this.children=[],this.textContent=t}get outerHTML(){return this.toString()}get isConnected(){return!0}}class p{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 g{constructor(){this.SVGNS="http://www.w3.org/2000/svg",this.XLINKNS="http://www.w3.org/1999/xlink"}createElementNS(t,e){return new d(e,t)}createTextNode(t){const e={nodeName:"#text",nodeType:3,textContent:t,toString:()=>e.textContent};return e}querySelector(){return null}querySelectorAll(){return[]}getComputedStyle(){return{}}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 s=new d("root");return s.innerHTML=t,{documentElement:s}}}}}let u=null,x=null,f=null;class m{static init(){h.isSSR()&&!u&&(u=new g)}static createElement(t){return h.isSSR()?(u||this.init(),u.createElementNS(null,t)):document.createElement(t)}static createElementNS(t,e){return h.isSSR()?(u||this.init(),u.createElementNS(t,e)):document.createElementNS(t,e)}static createTextNode(t){return h.isSSR()?(u||this.init(),u.createTextNode(t)):document.createTextNode(t)}static querySelector(t){return h.isSSR()?null:document.querySelector(t)}static querySelectorAll(t){return h.isSSR()?[]:document.querySelectorAll(t)}static getComputedStyle(t){return h.isSSR()?{}:window.getComputedStyle(t)}static matchMedia(t){if(h.isSSR()||"function"!=typeof window.matchMedia)return null;try{return window.matchMedia(t)}catch(t){return null}}static getBoundingClientRect(t){return h.isSSR()?(u||this.init(),u.getBoundingClientRect(t)):t?t.getBoundingClientRect():{width:0,height:0,top:0,left:0,right:0,bottom:0,x:0,y:0}}static getXMLSerializer(){return h.isSSR()?(u||this.init(),x||(x=u.createXMLSerializer()),x):(x||(x=new XMLSerializer),x)}static getDOMParser(){return h.isSSR()?(u||this.init(),f||(f=u.createDOMParser()),f):(f||(f=new DOMParser),f)}static addWindowEventListener(t,e,s){h.isBrowser()&&window.addEventListener(t,e,s)}static removeWindowEventListener(t,e,s){h.isBrowser()&&window.removeEventListener(t,e,s)}static requestAnimationFrame(t){return h.isBrowser()?window.requestAnimationFrame(t):(t(0),null)}static cancelAnimationFrame(t){h.isBrowser()&&t&&window.cancelAnimationFrame(t)}static elementExists(t){return!!t&&(h.isSSR()?!0===t._ssrMode||void 0!==t.nodeName:!!t.getRootNode&&(t.getRootNode({composed:!0})===document||t.isConnected))}static getWindow(){return h.isBrowser()?window:null}static getDocument(){return h.isBrowser()?document:null}static _getShim(){return u}static _resetShim(){u=null,x=null,f=null}}let b=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 h.isBrowser()&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}static extend(t,e){const s=Object.assign({},t);return this.isObject(t)&&this.isObject(e)&&Object.keys(e).forEach(i=>{this.isObject(e[i])?i in t?s[i]=this.extend(t[i],e[i]):Object.assign(s,{[i]:e[i]}):Object.assign(s,{[i]:e[i]})}),s}static extendArray(e,s){const i=[];return e.map(e=>{i.push(t.extend(s,e))}),e=i}static monthMod(t){return t%12}static clone(t,e=new WeakMap,s=!1){if(null===t||"object"!=typeof t)return t;if(e.has(t))return e.get(t);let i;if(Array.isArray(t))if(s)i=t.slice();else{i=[],e.set(t,i);for(let s=0;s<t.length;s++)i[s]=this.clone(t[s],e,!1)}else if(t instanceof Date)i=new Date(t.getTime());else if(s)i=Object.assign({},t);else{i={},e.set(t,i);for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(i[s]=this.clone(t[s],e,!1))}return i}static shallowClone(t){return null===t||"object"!=typeof t?t:Array.isArray(t)?t.slice():Object.assign({},t)}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 s=Object.keys(t),i=Object.keys(e);if(s.length!==i.length)return!1;for(const i of s)if(t[i]!==e[i])return!1;return!0}static log10(t){return Math.log(t)/Math.LN10}static roundToBase10(t){return Math.pow(10,Math.floor(Math.log10(t)))}static roundToBase(t,e){return Math.pow(e,Math.floor(Math.log(t)/Math.log(e)))}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 elementExists(t){return!(!t||!t.isConnected)}static isInShadowDOM(e){if(!e||!e.getRootNode)return!1;const s=e.getRootNode();return s&&s!==document&&t.is("ShadowRoot",s)}static getShadowRootHost(e){if(!t.isInShadowDOM(e))return null;return e.getRootNode().host||null}static getDimensions(t){if(!t)return[0,0];if(h.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 s=t.clientWidth,i=t.clientHeight;if(!s||!i){const e=t.getBoundingClientRect();s=s||e.width,i=i||e.height}return i-=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),s-=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight),[s,i]}static getBoundingClientRect(t){if(!t)return{top:0,right:0,bottom:0,left:0,width:0,height:0,x:0,y:0};if(h.isSSR())return m.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){return t.reduce((t,e)=>(Array.isArray(e)&&(e=e.reduce((t,e)=>t.length>e.length?t:e)),t.length>e.length?t:e),0)}static hexToRgba(t="#999999",e=.6){"#"!==t.substring(0,1)&&(t="#999999");const s=t.replace("#",""),i=s.match(new RegExp("(.{"+s.length/3+"})","g"))||[];for(let t=0;t<i.length;t++)i[t]=parseInt(1===i[t].length?i[t]+i[t]:i[t],16);return void 0!==e&&i.push(e),"rgba("+i.join(",")+")"}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,s]){const i=t=>{const e=t/255;return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)};return.2126*i(t)+.7152*i(e)+.0722*i(s)}static getContrastRatio(e,s){const i=t.parseHex(e),a=t.parseHex(s);if(!i||!a)return 0;const r=t.relativeLuminance(i),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):""}shadeRGBColor(t,e){const s=e.split(","),i=t<0?0:255,a=t<0?-1*t:t,r=parseInt(s[0].slice(4),10),o=parseInt(s[1],10),n=parseInt(s[2],10);return"rgb("+(Math.round((i-r)*a)+r)+","+(Math.round((i-o)*a)+o)+","+(Math.round((i-n)*a)+n)+")"}shadeHexColor(t,e){const s=parseInt(e.slice(1),16),i=t<0?0:255,a=t<0?-1*t:t,r=s>>16,o=s>>8&255,n=255&s;return"#"+(16777216+65536*(Math.round((i-r)*a)+r)+256*(Math.round((i-o)*a)+o)+(Math.round((i-n)*a)+n)).toString(16).slice(1)}shadeColor(e,s){return t.isColorHex(s)?this.shadeHexColor(e,s):this.shadeRGBColor(e,s)}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){if(!t.isCSSVariable(e))return e;if(h.isSSR())return e;const s=document.createElement("div");let i;s.style.cssText="position:fixed; left: -9999px; visibility:hidden;",s.style.color=e,document.body.appendChild(s);try{i=window.getComputedStyle(s).color}finally{s.parentNode&&s.parentNode.removeChild(s)}return i}static applyOpacityToColor(t,e){const s=Number(e);if(!Number.isFinite(s))return t;if(s<=0)return"transparent";if(s>=1)return t;return`color-mix(in srgb, ${t} ${Math.round(100*s)}%, transparent)`}static getPolygonPos(t,e){const s=[],i=2*Math.PI/e;for(let a=0;a<e;a++){const e={};e.x=t*Math.sin(a*i),e.y=-t*Math.cos(a*i),s.push(e)}return s}static polarToCartesian(t,e,s,i){const a=(i-90)*Math.PI/180;return{x:t+s*Math.cos(a),y:e+s*Math.sin(a)}}static escapeString(t,e="x"){let s=t.toString().slice();return s=s.replace(/[` ~!@#$%^&*()|+=?;:'",.<>{}[\]\\/]/gi,e),s}static negToZero(t){return t<0?0:t}static moveIndexInArray(t,e,s){if(s>=t.length){let e=s-t.length+1;for(;e--;)t.push(void 0)}return t.splice(s,0,t.splice(e,1)[0]),t}static extractNumber(t){return parseFloat(t.replace(/[^\d.]*/g,""))}static findAncestor(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}static setELstyles(t,e){for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t.style.key=e[s])}static preciseAddition(t,e){const s=(String(t).split(".")[1]||"").length,i=(String(e).split(".")[1]||"").length,a=Math.pow(10,Math.max(s,i));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 isMsEdge(){if(h.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,s=7){let i=Math.pow(10,s-Math.floor(Math.log10(Math.max(t,e))));for(i>1?(t=Math.round(Math.abs(t)*i),e=Math.round(Math.abs(e)*i)):i=1;e;){const s=e;e=t%e,t=s}return t/i}static getPrimeFactors(t){const e=[];let s=2;for(;t>=2;)t%s==0?(e.push(s),t/=s):s++;return e}static mod(t,e,s=7){const i=Math.pow(10,s-Math.floor(Math.log10(Math.max(t,e))));return(t=Math.round(Math.abs(t)*i))%(e=Math.round(Math.abs(e)*i))/i}};class y{constructor(t){this.w=t,this.months31=[1,3,5,7,8,10,12],this.months30=[2,4,6,9,11],this.daysCntOfYear=[0,31,59,90,120,151,181,212,243,273,304,334]}isValidDate(t){return"number"!=typeof t&&!isNaN(this.parseDate(t))}getTimeStamp(t){if(!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 this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(t).toUTCString()):new Date(t)}parseDate(t){const e=Date.parse(t);if(!isNaN(e))return this.getTimeStamp(t);let s=Date.parse(t.replace(/-/g,"/").replace(/[a-z]+/gi," "));return s=this.getTimeStamp(s),s}parseDateWithTimezone(t){return Date.parse(t.replace(/-/g,"/").replace(/[a-z]+/gi," "))}formatDate(t,e){const s=this.w.globals.locale,i=this.w.config.xaxis.labels.datetimeUTC,a=["\0",...s.months],r=["\x01",...s.shortMonths],o=["\x02",...s.days],n=["\x03",...s.shortDays];function l(t,e=2){let s=t+"";for(;s.length<e;)s="0"+s;return s}const c=i?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=(i?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=i?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=i?t.getUTCHours():t.getHours(),g=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(g))).replace(/(^|[^\\])h/g,"$1"+g);const u=i?t.getUTCMinutes():t.getMinutes();e=(e=e.replace(/(^|[^\\])mm+/g,"$1"+l(u))).replace(/(^|[^\\])m/g,"$1"+u);const x=i?t.getUTCSeconds():t.getSeconds();e=(e=e.replace(/(^|[^\\])ss+/g,"$1"+l(x))).replace(/(^|[^\\])s/g,"$1"+x);let f=i?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(),w=i||!y?"Z":y>0?"+":"-";if(!i){y=Math.abs(y);const t=y%60;w+=l(Math.floor(y/60))+":"+l(t)}e=e.replace(/(^|[^\\])K/g,"$1"+w);const v=(i?t.getUTCDay():t.getDay())+1;return e=(e=(e=(e=(e=e.replace(new RegExp(o[0],"g"),o[v])).replace(new RegExp(n[0],"g"),n[v])).replace(new RegExp(a[0],"g"),a[h])).replace(new RegExp(r[0],"g"),r[h])).replace(/\\(.)/g,"$1")}getTimeUnitsfromTimestamp(t,e){const s=this.w;void 0!==s.config.xaxis.min&&(t=s.config.xaxis.min),void 0!==s.config.xaxis.max&&(e=s.config.xaxis.max);const i=this.getDate(t),a=this.getDate(e),r=this.formatDate(i,"yyyy MM dd HH mm ss fff").split(" "),o=this.formatDate(a,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(r[6],10),maxMillisecond:parseInt(o[6],10),minSecond:parseInt(r[5],10),maxSecond:parseInt(o[5],10),minMinute:parseInt(r[4],10),maxMinute:parseInt(o[4],10),minHour:parseInt(r[3],10),maxHour:parseInt(o[3],10),minDate:parseInt(r[2],10),maxDate:parseInt(o[2],10),minMonth:parseInt(r[1],10)-1,maxMonth:parseInt(o[1],10)-1,minYear:parseInt(r[0],10),maxYear:parseInt(o[0],10)}}isLeapYear(t){return t%4==0&&t%100!=0||t%400==0}calculcateLastDaysOfMonth(t,e,s){return this.determineDaysOfMonths(t,e)-s}determineDaysOfYear(t){let e=365;return this.isLeapYear(t)&&(e=366),e}determineRemainingDaysOfYear(t,e,s){let i=this.daysCntOfYear[e]+s;return e>1&&this.isLeapYear(t)&&i++,i}determineDaysOfMonths(t,e){let s=30;switch(t=b.monthMod(t),!0){case this.months30.indexOf(t)>-1:2===t&&(s=this.isLeapYear(e)?29:28);break;case this.months31.indexOf(t)>-1:default:s=31}return s}getDateFields(t,e){const s=new Date(t);return e?{year:s.getUTCFullYear(),month:s.getUTCMonth(),date:s.getUTCDate(),hour:s.getUTCHours(),minute:s.getUTCMinutes(),second:s.getUTCSeconds(),ms:s.getUTCMilliseconds(),weekday:s.getUTCDay()}:{year:s.getFullYear(),month:s.getMonth(),date:s.getDate(),hour:s.getHours(),minute:s.getMinutes(),second:s.getSeconds(),ms:s.getMilliseconds(),weekday:s.getDay()}}addInterval(t,e,s,i){const a=new Date(t);if(i)switch(e){case"year":a.setUTCFullYear(a.getUTCFullYear()+s);break;case"month":a.setUTCMonth(a.getUTCMonth()+s);break;case"week":a.setUTCDate(a.getUTCDate()+7*s);break;case"day":a.setUTCDate(a.getUTCDate()+s);break;case"hour":a.setUTCHours(a.getUTCHours()+s);break;case"minute":a.setUTCMinutes(a.getUTCMinutes()+s);break;case"second":a.setUTCSeconds(a.getUTCSeconds()+s)}else switch(e){case"year":a.setFullYear(a.getFullYear()+s);break;case"month":a.setMonth(a.getMonth()+s);break;case"week":a.setDate(a.getDate()+7*s);break;case"day":a.setDate(a.getDate()+s);break;case"hour":a.setHours(a.getHours()+s);break;case"minute":a.setMinutes(a.getMinutes()+s);break;case"second":a.setSeconds(a.getSeconds()+s)}return a.getTime()}ceilToBoundary(t,e,s,i){const a=new Date(t);if(i)switch(e){case"second":{const e=a.getUTCSeconds(),i=Math.ceil(e/s)*s;return i===e&&0===a.getUTCMilliseconds()?t:(a.setUTCMilliseconds(0),a.setUTCSeconds(i),a.getTime())}case"minute":{const e=a.getUTCMinutes(),i=Math.ceil(e/s)*s;return i===e&&0===a.getUTCSeconds()&&0===a.getUTCMilliseconds()?t:(a.setUTCMilliseconds(0),a.setUTCSeconds(0),a.setUTCMinutes(i),a.getTime())}case"hour":{const e=a.getUTCHours(),i=Math.ceil(e/s)*s;return i===e&&0===a.getUTCMinutes()&&0===a.getUTCSeconds()&&0===a.getUTCMilliseconds()?t:(a.setUTCMilliseconds(0),a.setUTCSeconds(0),a.setUTCMinutes(0),a.setUTCHours(i),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,i=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-i)/e),n=i+Math.ceil(o/s)*s*e;return n>=t?n:n+s*e}case"month":{const e=a.getUTCMonth(),i=Math.ceil(e/s)*s;return i===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(i),a.getTime())}case"year":{const e=a.getUTCFullYear(),i=Math.ceil(e/s)*s;return i===e&&0===a.getUTCMonth()&&1===a.getUTCDate()&&0===a.getUTCHours()&&0===a.getUTCMinutes()&&0===a.getUTCSeconds()&&0===a.getUTCMilliseconds()?t:Date.UTC(i,0,1)}}else switch(e){case"second":{const e=a.getSeconds(),i=Math.ceil(e/s)*s;return i===e&&0===a.getMilliseconds()?t:(a.setMilliseconds(0),a.setSeconds(i),a.getTime())}case"minute":{const e=a.getMinutes(),i=Math.ceil(e/s)*s;return i===e&&0===a.getSeconds()&&0===a.getMilliseconds()?t:(a.setMilliseconds(0),a.setSeconds(0),a.setMinutes(i),a.getTime())}case"hour":{const e=a.getHours(),i=Math.ceil(e/s)*s;return i===e&&0===a.getMinutes()&&0===a.getSeconds()&&0===a.getMilliseconds()?t:(a.setMilliseconds(0),a.setSeconds(0),a.setMinutes(0),a.setHours(i),a.getTime())}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=6048e5,i=new Date(1970,0,5).getTime();a.setMilliseconds(0),a.setSeconds(0),a.setMinutes(0),a.setHours(0);const r=a.getTime(),o=Math.ceil((r-i)/e),n=i+Math.ceil(o/s)*s*e;return n>=t?n:n+s*e}case"month":{const e=a.getMonth(),i=Math.ceil(e/s)*s;return i===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(i),a.getTime())}case"year":{const e=a.getFullYear(),i=Math.ceil(e/s)*s;return i===e&&0===a.getMonth()&&1===a.getDate()&&0===a.getHours()&&0===a.getMinutes()&&0===a.getSeconds()&&0===a.getMilliseconds()?t:new Date(i,0,1).getTime()}}return t}isAtBoundary(t,e,s){const i=this.getDateFields(t,s);switch(e){case"year":return 0===i.month&&1===i.date&&0===i.hour&&0===i.minute&&0===i.second&&0===i.ms;case"month":return 1===i.date&&0===i.hour&&0===i.minute&&0===i.second&&0===i.ms;case"day":return 0===i.hour&&0===i.minute&&0===i.second&&0===i.ms;case"hour":return 0===i.minute&&0===i.second&&0===i.ms;case"minute":return 0===i.second&&0===i.ms;case"second":return 0===i.ms}return!1}}class w{constructor(t){this.w=t,this.tooltipKeyFormat="dd MMM"}xLabelFormat(t,e,s,i){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 y(this.w);return t.formatDate(t.getDate(e),a.config.tooltip.x.format)}return t(e,s,i)}defaultGeneralFormatter(t){return Array.isArray(t)?t.map(t=>t):t}defaultYFormatter(t,e){const s=this.w;if(b.isNumber(t))if(0!==s.globals.yValueDecimal)t=t.toFixed(void 0!==e.decimalsInFloat?e.decimalsInFloat:s.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;return e.xaxisTooltipFormatter=t=>this.defaultGeneralFormatter(t),e.ttKeyFormatter=t=>this.defaultGeneralFormatter(t),e.ttZFormatter=t=>t,e.legendFormatter=t=>this.defaultGeneralFormatter(t),void 0!==t.config.xaxis.labels.formatter?e.xLabelFormatter=t.config.xaxis.labels.formatter:e.xLabelFormatter=e=>{if(b.isNumber(e)){if(!t.config.xaxis.convertedCatToNumeric&&"numeric"===t.config.xaxis.type){if(b.isNumber(t.config.xaxis.decimalsInFloat))return e.toFixed(t.config.xaxis.decimalsInFloat);{const s=t.globals.maxX-t.globals.minX;if(s>0){const t=s/10,i=Math.max(0,-Math.floor(Math.log10(t)));return e.toFixed(i)}return e.toFixed(0)}}if(t.globals.isBarHorizontal){if(t.globals.maxY-t.globals.minYArr<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:e.ttKeyFormatter=e.xLabelFormatter,"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((s,i)=>{if(void 0!==s.labels.formatter)e.yLabelFormatters[i]=s.labels.formatter;else if("violin"===t.config.chart.type){const s=t=>"number"==typeof t&&isFinite(t)?""+Math.round(100*t)/100:t;e.yLabelFormatters[i]=e=>t.globals.xyCharts?Array.isArray(e)?e.map(s):s(e):e}else e.yLabelFormatters[i]=e=>t.globals.xyCharts?Array.isArray(e)?e.map(t=>this.defaultYFormatter(t,s)):this.defaultYFormatter(e,s):e}),t.globals}heatmapLabelFormatters(){const t=this.w;if("heatmap"===t.config.chart.type){t.globals.yAxisScale[0].result=t.seriesData.seriesNames.slice();const e=t.seriesData.seriesNames.reduce((t,e)=>t.length>e.length?t:e,0);t.globals.yAxisScale[0].niceMax=e,t.globals.yAxisScale[0].niceMin=e}}}const v=({isTimeline:t,seriesIndex:e,dataPointIndex:s,y1:i,y2:a,w:r})=>{var o;let n=r.rangeData.seriesRangeStart[e][s],l=r.rangeData.seriesRangeEnd[e][s],c=r.labelData.labels[s],h=r.config.series[e].name?r.config.series[e].name:"";const d=r.formatters.ttKeyFormatter,p=r.config.tooltip.y.title.formatter,g={w:r,seriesIndex:e,dataPointIndex:s,start:n,end:l};if("function"==typeof p&&(h=p(h,g)),(null==(o=r.config.series[e].data[s])?void 0:o.x)&&(c=r.config.series[e].data[s].x),!t&&"datetime"===r.config.xaxis.type){c=new w(r).xLabelFormat(r.formatters.ttKeyFormatter,c,c,{i:void 0,dateFormatter:new y(r).formatDate,w:r})}"function"==typeof d&&(c=d(c,g)),Number.isFinite(i)&&Number.isFinite(a)&&(n=i,l=a);let u="",x="";const f=r.globals.colors[e];if(void 0===r.config.tooltip.x.formatter)if("datetime"===r.config.xaxis.type){const t=new y(r);u=t.formatDate(t.getDate(n),r.config.tooltip.x.format),x=t.formatDate(t.getDate(l),r.config.tooltip.x.format)}else u=n,x=l;else u=r.config.tooltip.x.formatter(n),x=r.config.tooltip.x.formatter(l);return{start:n,end:l,startVal:u,endVal:x,ylabel:c,color:f,seriesName:h}},A=t=>{let{color:e,seriesName:s,ylabel:i,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+'">'+(s||"")+'</span></div><div> <span class="category">'+i+": </span> "+h+" </div></div>"};class C{constructor(t){this.opts=t}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 b.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 s=e.w.config.series[e.seriesIndex].name;return null!==t?s+": "+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:8}}}}})}candlestick(){return{stroke:{width:1},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:({seriesIndex:t,dataPointIndex:e,w:s})=>this._getBoxTooltip(s,t,e,["Open","High","","Low","Close"],"candlestick")},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}boxPlot(){return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:({seriesIndex:t,dataPointIndex:e,w:s})=>this._getBoxTooltip(s,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:({seriesIndex:t,dataPointIndex:e,w:s})=>this._getViolinTooltip(s,t,e)},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}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:s,w:i}){const a=()=>{const t=i.rangeData.seriesRangeStart[e][s];return i.rangeData.seriesRangeEnd[e][s]-t};return i.globals.comboCharts?"rangeBar"===i.config.series[e].type||"rangeArea"===i.config.series[e].type?a():t:a()},background:{enabled:!1},style:{colors:["#fff"]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom:t=>t.w.config.plotOptions&&t.w.config.plotOptions.bar&&t.w.config.plotOptions.bar.horizontal?(t=>{const{color:e,seriesName:s,ylabel:i,startVal:a,endVal:r}=v(l(n({},t),{isTimeline:!0}));return A(l(n({},t),{color:e,seriesName:s,ylabel:i,start:a,end:r}))})(t):(t=>{const{color:e,seriesName:s,ylabel:i,start:a,end:r}=v(t);return A(l(n({},t),{color:e,seriesName:s,ylabel:i,start:a,end:r}))})(t)},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}dumbbell(t){var e,s;return(null==(e=t.plotOptions.bar)?void 0:e.barHeight)||(t.plotOptions.bar.barHeight=2),(null==(s=t.plotOptions.bar)?void 0:s.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:t=>(t=>{const{color:e,seriesName:s,ylabel:i,start:a,end:r}=v(t);return A(l(n({},t),{color:e,seriesName:s,ylabel:i,start:a,end:r}))})(t)}}}brush(t){return b.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){t.dataLabels=t.dataLabels||{},t.dataLabels.formatter=t.dataLabels.formatter||void 0;const e=t.dataLabels.formatter;t.yaxis.forEach((e,s)=>{t.yaxis[s].min=0,t.yaxis[s].max=100});return"bar"===t.chart.type&&(t.dataLabels.formatter=e||function(t){return"number"==typeof t&&t?t.toFixed(0)+"%":t}),t}stackedBars(){const t=this.bar();return l(n({},t),{plotOptions:l(n({},t.plotOptions),{bar:l(n({},t.plotOptions.bar),{borderRadiusApplication:"end",borderRadiusWhenStacked:"last"})})})}convertCatToNumeric(t){return t.xaxis.convertedCatToNumeric=!0,t}convertCatToNumericXaxis(t,e){t.xaxis.type="numeric",t.xaxis.labels=t.xaxis.labels||{},t.xaxis.labels.formatter=t.xaxis.labels.formatter||function(t){return b.isNumber(t)?Math.floor(t):t};const s=t.xaxis.labels.formatter;let i=t.xaxis.categories&&t.xaxis.categories.length?t.xaxis.categories:t.labels;return e&&e.length&&(i=e.map(t=>Array.isArray(t)?t:String(t))),i&&i.length&&(t.xaxis.labels.formatter=function(t){return b.isNumber(t)?s(i[Math.floor(t)-1]):s(t)}),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},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!0,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:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1}}}}pie(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:t=>t.toFixed(1)+"%",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=>t.toFixed(1)+"%",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=>t.toFixed(1)+"%",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,s,i,a){const r=t.candleData.seriesCandleO[e][s],o=t.candleData.seriesCandleH[e][s],n=t.candleData.seriesCandleM[e][s],l=t.candleData.seriesCandleL[e][s],c=t.candleData.seriesCandleC[e][s],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][s]}</strong>\n </div>`:`<div class="apexcharts-tooltip-box apexcharts-tooltip-${t.config.chart.type}"><div>${i[0]}: <span class="value">`+r+`</span></div><div>${i[1]}: <span class="value">`+o+"</span></div>"+(n?`<div>${i[2]}: <span class="value">`+n+"</span></div>":"")+`<div>${i[3]}: <span class="value">`+l+`</span></div><div>${i[4]}: <span class="value">`+c+"</span></div></div>"}_getViolinTooltip(t,e,s){var i,a,r;const o=null==(i=t.violinData.seriesViolinMin[e])?void 0:i[s],n=null==(a=t.violinData.seriesViolinMax[e])?void 0:a[s],l=(null==(r=t.violinData.seriesViolinPoints[e])?void 0:r[s])||[],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>`}}const S={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"}}};class k{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}},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:[],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:[S],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,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,id:void 0,group:void 0,nonce: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},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,allowMouseWheelZoom:!0,pinch:!0,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:"last",rangeBarOverlap:!0,rangeBarGroupRows:!1,hideZeroBarsWhenGrouped:!1,isDumbbell:!1,dumbbellColors:void 0,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},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"},points:{show:!1,shape:"circle",size:2.5,jitter:.5,maxPoints:3e3,opacity:.9,fillColor:"series-dark",strokeColor:"#fff",strokeWidth:1}},violin:{bandwidthScale:1,normalize:"individual",points:{show:!0,shape:"circle",size:2.5,jitter:.5,constrainToViolin:!0,maxPoints:3e3,opacity:.9,fillColor:"series-dark",strokeColor:"#fff",strokeWidth:1}},heatmap:{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}}},funnel:{shape:"rectangle",lastShape:"flat"},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,borderRadius:4,dataLabels:{format:"scale"},colorScale:{inverse:!1,ranges:[],min:void 0,max: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}}}},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:800,easing:"ease-out"}},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=>t+"%"},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+"%"}},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,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"}},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,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}},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},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}},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}},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"}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken"}}},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,arrow:!0,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:""}}}}}class M{constructor(t){this.opts=t}init({responsiveOverride:t}){var e,s,i,a,r,o,n,l,c,d;let p=this.opts;const g=new k,u=new C(p);p=this.normalizeAliasedChartType(p),this.chartType=p.chart.type,p=this.extendYAxis(p),p=this.extendAnnotations(p);let x=g.init(),f={};if(p&&"object"==typeof p){let g={};const m=["line","area","bar","candlestick","boxPlot","violin","rangeBar","rangeArea","bubble","scatter","heatmap","treemap","pie","polarArea","donut","radar","radialBar"],y=p.chart.requestedType;g="funnel"===y||"pyramid"===y?u[y]():"gauge"===y?u.gauge():-1!==m.indexOf(p.chart.type)?u[p.chart.type]():u.line(),(null==(s=null==(e=p.plotOptions)?void 0:e.bar)?void 0:s.isFunnel)&&(g=u.funnel()),p.chart.stacked&&"bar"===p.chart.type&&(g=u.stackedBars()),(null==(i=p.chart.brush)?void 0:i.enabled)&&(g=u.brush(g)),(null==(r=null==(a=p.plotOptions)?void 0:a.line)?void 0:r.isSlopeChart)&&(g=u.slope()),p.chart.stacked&&"100%"===p.chart.stackType&&(p=u.stacked100(p)),(null==(n=null==(o=p.plotOptions)?void 0:o.bar)?void 0:n.isDumbbell)&&(p=u.dumbbell(p)),this.checkForDarkTheme(h.getApex()),this.checkForDarkTheme(p),p.xaxis=p.xaxis||h.getApex().xaxis||{},t||(p.xaxis.convertedCatToNumeric=!1),p=this.checkForCatToNumericXAxis(this.chartType,g,p),((null==(l=p.chart.sparkline)?void 0:l.enabled)||(null==(d=null==(c=h.getApex().chart)?void 0:c.sparkline)?void 0:d.enabled))&&(g=u.sparkline(g)),f=b.extend(x,g)}const m=b.extend(f,h.getApex());return x=b.extend(m,p),x=this.handleUserInputErrors(x),x}normalizeAliasedChartType(t){if(!t||!t.chart)return t;const e=t.chart.type;return"funnel"!==e&&"pyramid"!==e&&"gauge"!==e||(t.chart.requestedType=e,"funnel"===e||"pyramid"===e?(t.plotOptions=t.plotOptions||{},t.plotOptions.bar=t.plotOptions.bar||{},t.plotOptions.bar.isFunnel=!0,t.plotOptions.bar.horizontal=!0,t.chart.type="bar",t.plotOptions.bar.isPyramid="pyramid"===e):"gauge"===e&&(t.chart.type="radialBar")),t}checkForCatToNumericXAxis(t,e,s){var i,a,r,o,n;const l=new C(s),c=("bar"===t||"boxPlot"===t||"violin"===t)&&(null==(a=null==(i=s.plotOptions)?void 0:i.bar)?void 0:a.horizontal),h="pie"===t||"polarArea"===t||"donut"===t||"radar"===t||"radialBar"===t||"heatmap"===t,d="datetime"!==s.xaxis.type&&"numeric"!==s.xaxis.type,p=("scatter"===t||"bubble"===t)&&(null==(n=null==(o=null==(r=s.plotOptions)?void 0:r.scatter)?void 0:o.jitter)?void 0:n.enabled),g=s.xaxis.tickPlacement?s.xaxis.tickPlacement:e.xaxis&&e.xaxis.tickPlacement;return c||h||p||!d||"between"===g||(s=l.convertCatToNumeric(s)),s}extendYAxis(t,e){const s=new k;(void 0===t.yaxis||!t.yaxis||Array.isArray(t.yaxis)&&0===t.yaxis.length)&&(t.yaxis={});const i=h.getApex();t.yaxis.constructor!==Array&&i.yaxis&&i.yaxis.constructor!==Array&&(t.yaxis=b.extend(t.yaxis,i.yaxis)),t.yaxis.constructor!==Array?t.yaxis=[b.extend(s.yAxis,t.yaxis)]:t.yaxis=b.extendArray(t.yaxis,s.yAxis);let a=!1;t.yaxis.forEach(t=>{t.logarithmic&&(a=!0)});let r=t.series;return e&&!r&&(r=e.config.series),a&&r.length!==t.yaxis.length&&r.length&&(t.yaxis=r.map((e,i)=>{if(e.name||(r[i].name=`series-${i+1}`),t.yaxis[i])return t.yaxis[i].seriesName=r[i].name,t.yaxis[i];{const e=b.extend(s.yAxis,t.yaxis[0]);return e.show=!1,e}})),a&&r.length>1&&(r.length,t.yaxis.length),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 k;return t.annotations.yaxis=b.extendArray(void 0!==t.annotations.yaxis?t.annotations.yaxis:[],e.yAxisAnnotation),t}extendXAxisAnnotations(t){const e=new k;return t.annotations.xaxis=b.extendArray(void 0!==t.annotations.xaxis?t.annotations.xaxis:[],e.xAxisAnnotation),t}extendPointAnnotations(t){const e=new k;return t.annotations.points=b.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"))}handleUserInputErrors(t){const e=t;if(e.tooltip.shared&&e.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if("bar"===e.chart.type&&e.plotOptions.bar.horizontal){if(e.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");e.yaxis[0].reversed&&(e.yaxis[0].opposite=!0),e.xaxis.tooltip.enabled=!1,e.yaxis[0].tooltip.enabled=!1,e.chart.zoom.enabled=!1}return"bar"!==e.chart.type&&"rangeBar"!==e.chart.type||e.tooltip.shared&&"barWidth"===e.xaxis.crosshairs.width&&e.series.length>1&&(e.xaxis.crosshairs.width="tickWidth"),"candlestick"!==e.chart.type&&"boxPlot"!==e.chart.type||e.yaxis[0].reversed&&(e.yaxis[0].reversed=!1),e}}const D=1.618,T=[[1,1,2,5,5,5,10,10,10,10,10],[1,1,2,5,5,5,10,10,10,10,10]],L=[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 F{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.originalSeries=null,t.maxValsInArrayIndex=0,t.yValueDecimal=0,t.allSeriesHasEqualX=!0,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.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.barHeight=0,t.barWidth=0,t.animationEnded=!1,t.isDestroyed=!1,t.bulkRevealScheduled=!1,t.resizeTimer=null,t.selectionResizeTimer=null,t.lastWheelExecution=0,t.delayedElements=[],t.pointsArray=[],t.barCanvasCoords=null,t.activeRenderer=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,s,i=s)=>{Object.defineProperty(e,i,{get:()=>t[s],set(e){t[s]=e},enumerable:!0,configurable:!0})},s={};e(s,"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","originalSeries","collapsedSeries","collapsedSeriesIndices","ancillaryCollapsedSeries","ancillaryCollapsedSeriesIndices","allSeriesCollapsed","risingSeries","previousPaths","ignoreYAxisIndexes","labels","categoryLabels","timescaleLabels","groups"])e(s,t);Object.defineProperty(t,"seriesNS",{value:s,writable:!1,enumerable:!1,configurable:!0});const i={};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(i,t);Object.defineProperty(t,"axes",{value:i,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:[]},stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:t.markers.size,largestSize:0},LINE_HEIGHT_RATIO:D,axisCharts:!0,isSlopeChart:t.plotOptions.line.isSlopeChart,comboCharts:!1,initialConfig:null,initialSeries:[],lastXAxis:[],lastYAxis:[],allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],risingSeries:[],ignoreYAxisIndexes:[],isDirty:!1,isExecCalled:!1,dataChanged:!1,resized:!1,invalidLogScale:!1,hasNullValues:!1,columnSeries:null,yaxis:null,total:0,shouldAnimate:!0,previousPaths:[],prevStreamFrame:null,prevChromeFrame:null,svgWidth:0,svgHeight:0,defaultLabels:!1,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateYAxisX:[],yAxisWidths:[],tooltip:null,resizeObserver:null,locale:{},memory:{methodsToExec:[]},niceScaleAllowedMagMsd:T,niceScaleDefaultTicks:L,seriesYAxisMap:[],seriesYAxisReverseMap:[],noData:!1}}defineLazyInitialSeries(t){let e=[],s=null;Object.defineProperty(t,"initialSeries",{configurable:!0,enumerable:!0,get:()=>(null===s&&(s=b.clone(e)),s),set(i){e=Array.isArray(i)?i.map(t=>t&&"object"==typeof t&&!Array.isArray(t)?n({},t):t):i,s=null,t._initialSeriesPeek=e}}),t._initialSeriesPeek=e}init(t){const e=this.globalVars(t);return this.initGlobalVars(e),this.defineLazyInitialSeries(e),e.initialConfig=b.extend({},t),e.initialSeries=t.series,e.lastXAxis=b.clone(e.initialConfig.xaxis),e.lastYAxis=b.clone(e.initialConfig.yaxis),e}}class _{constructor(t){this.opts=t}init(){const t=new M(this.opts).init({responsiveOverride:!1}),e=(new F).init(t),s={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:{},lastWheelExecution:0,capturedSeriesIndex:-1,capturedDataPointIndex:-1,disableZoomIn:!1,disableZoomOut:!1,isTouchDevice:!!h.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:[],seriesViolinMin:[],seriesViolinMax:[]},labelData:{labels:[],categoryLabels:[],timescaleLabels:[],hasXaxisGroups:!1,groups:[],seriesGroups:[]},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:[]},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:[]}};Object.defineProperty(e,"dom",{get:()=>s.dom,set(t){s.dom=t},enumerable:!1,configurable:!0});for(const t of["xLabelFormatter","yLabelFormatters","xaxisTooltipFormatter","ttKeyFormatter","ttVal","ttZFormatter","legendFormatter"])Object.defineProperty(e,t,{get:()=>s.formatters[t],set(e){s.formatters[t]=e},enumerable:!1,configurable:!0});for(const t of["zoomEnabled","panEnabled","selectionEnabled","zoomed","selection","visibleXRange","selectedDataPoints","mousedown","clientX","clientY","lastClientPosition","lastWheelExecution","capturedSeriesIndex","capturedDataPointIndex","disableZoomIn","disableZoomOut","isTouchDevice"])Object.defineProperty(e,t,{get:()=>s.interact[t],set(e){s.interact[t]=e},enumerable:!1,configurable:!0});for(const t of["gridHeight","gridWidth","translateX","translateY","translateXAxisX","translateXAxisY","rotateXLabels","xAxisHeight","xAxisLabelsHeight","xAxisGroupLabelsHeight","xAxisLabelsWidth","yLabelsCoords","yTitleCoords"])Object.defineProperty(e,t,{get:()=>s.layout[t],set(e){s.layout[t]=e},enumerable:!1,configurable:!0});for(const t of["series","seriesNames","seriesX","seriesZ","seriesColors","seriesGoals","stackedSeriesTotals","stackedSeriesTotalsByGroups"])Object.defineProperty(e,t,{get:()=>s.seriesData[t],set(e){s.seriesData[t]=e},enumerable:!1,configurable:!0});for(const t of["isXNumeric","dataFormatXNumeric","isDataXYZ","isRangeData","isRangeBar","isMultiLineX","noLabelsProvided","dataWasParsed"])Object.defineProperty(e,t,{get:()=>s.axisFlags[t],set(e){s.axisFlags[t]=e},enumerable:!1,configurable:!0});for(const t of["labels","categoryLabels","timescaleLabels","hasXaxisGroups","groups","seriesGroups"])Object.defineProperty(e,t,{get:()=>s.labelData[t],set(e){s.labelData[t]=e},enumerable:!1,configurable:!0});for(const t of["seriesRangeStart","seriesRangeEnd","seriesRange"])Object.defineProperty(e,t,{get:()=>s.rangeData[t],set(e){s.rangeData[t]=e},enumerable:!1,configurable:!0});for(const t of["seriesCandleO","seriesCandleH","seriesCandleM","seriesCandleL","seriesCandleC"])Object.defineProperty(e,t,{get:()=>s.candleData[t],set(e){s.candleData[t]=e},enumerable:!1,configurable:!0});for(const t of["seriesViolinDensity","seriesViolinPoints","seriesViolinMin","seriesViolinMax"])Object.defineProperty(e,t,{get:()=>s.violinData[t],set(e){s.violinData[t]=e},enumerable:!1,configurable:!0});return s}}class E{constructor(t){this.w=t}static checkComboSeries(t,e){let s=!1,i=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||i++,void 0!==t.type&&t.type!==e&&a++}),a>0&&(s=!0),{comboBarCount:i,comboCharts:s}}getStackedSeriesTotals(t=[]){const e=this.w,s=[];if(0===e.seriesData.series.length)return s;for(let i=0;i<e.seriesData.series[e.globals.maxValsInArrayIndex].length;i++){let a=0;for(let s=0;s<e.seriesData.series.length;s++)void 0!==e.seriesData.series[s][i]&&-1===t.indexOf(s)&&(a+=e.seriesData.series[s][i]);s.push(a)}return s}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(s=>{const i=[];t.config.series.forEach((e,a)=>{s.indexOf(t.seriesData.seriesNames[a])>-1&&i.push(a)});const a=t.seriesData.series.map((t,e)=>-1===i.indexOf(e)?e:-1).filter(t=>-1!==t);e.push(this.getStackedSeriesTotals(a))}),e}setSeriesYAxisMappings(){const t=this.w.globals,e=this.w.config;let s=[];const i=[],a=[],r=this.w.seriesData.series.length>e.yaxis.length||e.yaxis.some(t=>Array.isArray(t.seriesName));e.series.forEach((t,e)=>{a.push(e),i.push(null)}),e.yaxis.forEach((t,e)=>{s[e]=[]});const o=[];e.yaxis.forEach((t,i)=>{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;i===o||r?(!r||a.indexOf(o)>-1)&&s[i].push([i,o]):(s[o].push([o,i]),t=i),n=!0,t=a.indexOf(t),-1!==t&&a.splice(t,1)}})})}n||o.push(i)}),s=s.map(t=>{const e=[];return t.forEach(t=>{i[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],s[n]=[],a);t++){const t=a[0];a.shift(),s[n].push(t),i[t]=n}a.forEach(t=>{s[n].push(t),i[t]=n}),t.seriesYAxisMap=s.map(t=>t),t.seriesYAxisReverseMap=i.map(t=>t),t.seriesYAxisMap.forEach((t,s)=>{t.forEach(t=>{if(e.series[t]&&void 0===e.series[t].group){e.series[t].group="apexcharts-axis-".concat(s.toString())}})})}isSeriesNull(t=null){let e=[];const s=this.w.config.series;return e=null===t?s.filter(t=>null!==t):s[t]&&Array.isArray(s[t].data)?s[t].data.filter(t=>null!==t):null!==s[t]&&void 0!==s[t]?[s[t]]:[],0===e.length}seriesHaveSameValues(t){const e=this.w.seriesData.series[t];return!Array.isArray(e)||e.every((t,e,s)=>t===s[0])}getCategoryLabels(t){const e=this.w;let s=t.slice();return e.config.xaxis.convertedCatToNumeric&&(s=t.map(t=>e.config.xaxis.labels.formatter(t-e.globals.minX+1))),s}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)}),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 s=0;s<t.length;s++)e+=t[s];else e+=t;return e})}getSeriesTotalsXRange(t,e){const s=this.w;return s.seriesData.series.map((i,a)=>{let r=0;for(let o=0;o<i.length;o++)s.seriesData.seriesX[a][o]>t&&s.seriesData.seriesX[a][o]<e&&(r+=i[o]);return r})}getPercentSeries(){const t=this.w;t.globals.seriesPercent=t.seriesData.series.map(e=>{const s=[];if(Array.isArray(e))for(let i=0;i<e.length;i++){const a=t.seriesData.stackedSeriesTotals[i];let r=0;a&&(r=100*e[i]/a),s.push(r)}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,s=[];let i=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++)s.push(e.yRange[t]/this.w.layout.gridHeight);if(a=e.xRange/this.w.layout.gridWidth,i=e.yRange/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,i)=>{const a=t.config.yaxis[t.globals.seriesYAxisReverseMap[i]],r=e<0?-1:1;return e=Math.abs(e),a.logarithmic&&(e=this.getBaseLog(a.logBase,e)),-r*e/s[i]};if(e.isMultipleYAxis){n=[];for(let t=0;t<s.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/i,c=e.minX/a)}else n=[],n.push(0),l=0,c=0;return{yRatio:s,invertedYRatio:i,zRatio:o,xRatio:a,invertedXRatio:r,baseLineInvertedY:l,baseLineY:n,baseLineX:c}}getLogSeries(t){const e=this.w;return e.globals.seriesLog=t.map((t,s)=>{const i=e.globals.seriesYAxisReverseMap[s];return e.config.yaxis[i]&&e.config.yaxis[i].logarithmic?t.map(t=>null===t?null:this.getLogVal(e.config.yaxis[i].logBase,t,s)):t}),e.globals.invalidLogScale?t:e.globals.seriesLog}getLogValAtSeriesIndex(t,e){if(null===t)return null;const s=this.w,i=s.globals.seriesYAxisReverseMap[e];return s.config.yaxis[i]&&s.config.yaxis[i].logarithmic?this.getLogVal(s.config.yaxis[i].logBase,t,e):t}getBaseLog(t,e){return Math.log(e)/Math.log(t)}getLogVal(t,e,s){if(e<=0)return 0;const i=this.w,a=0===i.globals.minYArr[s]?-1:this.getBaseLog(t,i.globals.minYArr[s]),r=(0===i.globals.maxYArr[s]?0:this.getBaseLog(t,i.globals.maxYArr[s]))-a;if(e<1)return e/r;return(this.getBaseLog(t,e)-a)/r}getLogYRatios(t){const e=this.w,s=this.w.globals,i=s;return i.yLogRatio=t.slice(),i.logYRange=s.yRange.map((t,a)=>{const r=e.globals.seriesYAxisReverseMap[a];if(e.config.yaxis[r]&&this.w.config.yaxis[r].logarithmic){let t=-Number.MAX_VALUE,r=Number.MIN_VALUE,o=1;return s.seriesLog.forEach((s,i)=>{s.forEach(s=>{e.config.yaxis[i]&&e.config.yaxis[i].logarithmic&&(t=Math.max(s,t),r=Math.min(s,r))})}),o=Math.pow(s.yRange[a],Math.abs(r-t)/s.yRange[a]),i.yLogRatio[a]=o/this.w.layout.gridHeight,o}}),i.invalidLogScale?t.slice():i.yLogRatio}static extendArrayProps(t,e,s){var i,a;return(null==e?void 0:e.yaxis)&&(e=t.extendYAxis(e,s)),(null==e?void 0:e.annotations)&&(e.annotations.yaxis&&(e=t.extendYAxisAnnotations(e)),(null==(i=null==e?void 0:e.annotations)?void 0:i.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,s,i){const a=this.w,r=[];return t.series.length>0&&e.forEach(e=>{const o=[],n=[];t.i.forEach((s,i)=>{a.config.series[s].group===e&&(o.push(t.series[i]),n.push(s))}),o.length>0&&r.push(i.draw(o,s,n))}),r}}const P="http://www.w3.org/2000/svg";class B{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 B(this.x,this.y)}}class N{constructor(t,e,s,i,a,r){this.a=null!=t?t:1,this.b=null!=e?e:0,this.c=null!=s?s:0,this.d=null!=i?i:1,this.e=null!=a?a:0,this.f=null!=r?r:0}rotate(t){const e=t*Math.PI/180,s=Math.cos(e),i=Math.sin(e);return this.multiply(new N(s,i,-i,s,0,0))}scale(t,e){return this.multiply(new N(t,0,0,null!=e?e:t,0,0))}multiply(t){return new N(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 B(this.a*t.x+this.c*t.y+this.e,this.b*t.x+this.d*t.y+this.f)}}class X{constructor(t,e,s,i){this.x=t,this.y=e,this.w=s,this.h=i,this.width=s,this.height=i,this.x2=t+s,this.y2=e+i}}function I(t){if(!t||"string"!=typeof t)return[["M",0,0]];const e=[],s=/([MmLlHhVvCcSsQqTtAaZz])\s*/g,i=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi;let a;const r=[],o=[];for(;null!==(a=s.exec(t));)r.push(a[1]),o.push(a.index);for(let s=0;s<r.length;s++){const a=o[s]+r[s].length,n=s+1<o.length?o[s+1]:t.length,l=t.substring(a,n),c=[];let h;for(i.lastIndex=0;null!==(h=i.exec(l));)c.push(parseFloat(h[0]));const d=r[s].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 R(t){let e=1/0,s=1/0,i=-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>i&&(i=o),n<s&&(s=n),n>a&&(a=n))}}),e===1/0?{x:0,y:0,width:0,height:0}:{x:e,y:s,width:i-e,height:a-s}}function z(t){return t.map(t=>t.join(" ")).join(" ")}function Y(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 H(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 O(t){var e,s=[t];switch(t[0]){case"M":return this.pos=this.start=[t[1],t[2]],s;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":s=function(t,e){var s,i,a,r,o,n,l,c,h,d,p,g,u,x,f,m,b,y,w,v,A,C,S,k,M,D,T=Math.abs(e[1]),L=Math.abs(e[2]),F=e[3]%360,_=e[4],E=e[5],P=e[6],X=e[7],I=new B(t[0],t[1]),R=new B(P,X),z=[];if(0===T||0===L||I.x===R.x&&I.y===R.y)return[["C",I.x,I.y,R.x,R.y,R.x,R.y]];s=new B((I.x-R.x)/2,(I.y-R.y)/2).transform((new N).rotate(F)),(i=s.x*s.x/(T*T)+s.y*s.y/(L*L))>1&&(T*=i=Math.sqrt(i),L*=i);a=(new N).rotate(F).scale(1/T,1/L).rotate(-F),I=I.transform(a),R=R.transform(a),r=[R.x-I.x,R.y-I.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,_===E&&(l*=-1);c=new B((R.x+I.x)/2+l*-r[1],(R.y+I.y)/2+l*r[0]),h=new B(I.x-c.x,I.y-c.y),d=new B(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);g=Math.acos(d.x/Math.sqrt(d.x*d.x+d.y*d.y)),d.y<0&&(g*=-1);E&&p>g&&(g+=2*Math.PI);!E&&p<g&&(g-=2*Math.PI);for(x=Math.ceil(2*Math.abs(p-g)/Math.PI),m=[],b=p,u=(g-p)/x,f=4*Math.tan(u/4)/3,A=0;A<=x;A++)w=Math.cos(b),y=Math.sin(b),v=new B(c.x+w,c.y+y),m[A]=[new B(v.x+f*y,v.y-f*w),v,new B(v.x-f*y,v.y+f*w)],b+=u;for(m[0][0]=m[0][1].clone(),m[m.length-1][2]=m[m.length-1][1].clone(),a=(new N).rotate(F).scale(T,L).rotate(-F),A=0,C=m.length;A<C;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,C=m.length;A<C;A++)S=(v=m[A-1][2]).x,k=v.y,M=(v=m[A][0]).x,D=v.y,P=(v=m[A][1]).x,X=v.y,z.push(["C",S,k,M,D,P,X]);return z}(null!=(e=this.pos)?e:[],t),t=s[0]}return t[0]="C",this.pos=[t[5],t[6]],this.reflection=[2*t[5]-t[3],2*t[6]-t[4]],s}function W(t,e){if(!1===e)return!1;for(var s=e,i=t.length;s<i;++s)if("M"==t[s][0])return s;return!1}function G(t,e,s,i,a,r){for(var o=t.slice(e,s||void 0),n=i.slice(a,r||void 0),l=0,c={pos:[0,0],start:[0,0]},h={pos:[0,0],start:[0,0]};o[l]=Y.call(c,o[l]),n[l]=Y.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(O.call(c,o[l]))),Array.prototype.splice.apply(n,[l,1].concat(O.call(h,n[l])))):(o[l]=H.call(c,o[l]),n[l]=H.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 U(t,e){var s=function(t,e){for(var s,i=I(t),a=I(e),r=0,o=0,n=!1,l=!1;!1!==r||!1!==o;){if(n=W(i,!1!==r&&r+1),l=W(a,!1!==o&&o+1),!1===r){const t=R(s.start);r=0==t.height||0==t.width?i.push(i[0])-1:i.push(["M",t.x+t.width/2,t.y+t.height/2])-1}if(!1===o){const t=R(s.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}s=G(i,r,n,a,o,l),i=i.slice(0,r).concat(s.start,!1===n?[]:i.slice(n)),a=a.slice(0,o).concat(s.dest,!1===l?[]:a.slice(l)),r=!1!==n&&r+s.start.length,o=!1!==l&&o+s.dest.length}return{start:i,dest:a}}(t,e),i=s.start,a=s.dest;return function(t){return z(i.map(function(e,s){return a[s].map(function(i,r){return 0===r?i:e[r]+(a[s][r]-e[r])*t})}))}}let $=null,V=null;function j(t,e){const s=new Array(e);if(!h.isBrowser()){const i=R(I(t)),a=i.x+i.width/2,r=i.y+i.height/2;for(let t=0;t<e;t++)s[t]={x:a,y:r};return s}$||($=document.createElementNS("http://www.w3.org/2000/svg","svg"),$.setAttribute("width","0"),$.setAttribute("height","0"),$.setAttribute("style","position:absolute;width:0;height:0;visibility:hidden;pointer-events:none;"),V=document.createElementNS("http://www.w3.org/2000/svg","path"),$.appendChild(V),document.body.appendChild($)),V.setAttribute("d",t||"M0 0");let i=0;try{i=V.getTotalLength()}catch(t){i=0}if(!i||!isFinite(i)){const i=R(I(t)),a=i.x+i.width/2,r=i.y+i.height/2;for(let t=0;t<e;t++)s[t]={x:a,y:r};return s}for(let t=0;t<e;t++)try{const a=V.getPointAtLength(t/e*i);s[t]={x:a.x,y:a.y}}catch(e){s[t]={x:0,y:0}}return s}function q(t){return-Math.cos(t*Math.PI)/2+.5}let Z=q;function K(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 s=parseInt(e,16);return[s>>16&255,s>>8&255,255&s,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 J(t,e,s){return`rgba(${Math.round(t[0]+(e[0]-t[0])*s)},${Math.round(t[1]+(e[1]-t[1])*s)},${Math.round(t[2]+(e[2]-t[2])*s)},${t[3]+(e[3]-t[3])*s})`}class Q{constructor(t,e,s){this.el=t,this.duration=null!=e?e:300,this.delay=s||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,s){return this._plotTarget=t,e&&(this._plotAlgorithm=e),this._plotSnap=s||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 s=new Q(this.el,t,e);return this._next=s,s._root=this._root||this,s}_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 s=0;t.forEach(t=>{s+=t.delay,t._execute(s),s+=t.duration})}_execute(t){const e=this.el,s=this.duration;if(s<=1){const s=()=>{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(s,t):s())}const i=()=>{const t={},i={},a={};if(this._attrTarget)for(const s of Object.keys(this._attrTarget)){const r=e.attr(s);t[s]=r;const o=K(r),n=K(String(this._attrTarget[s]));o&&n&&(i[s]=o,a[s]=n)}let r=null;if(this._plotTarget){const t=e.attr("d")||"";try{r="polygons"===this._plotAlgorithm?function(t,e,s=96){const i=j(t,s),a=j(e,s);let r=0,o=1/0;for(let t=0;t<s;t++){let e=0;for(let r=0;r<s;r++){const n=i[(r+t)%s],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(s);for(let t=0;t<s;t++)n[t]=i[(t+r)%s];return function(t){let e="";for(let i=0;i<s;i++){const s=n[i],r=a[i],o=s.x+(r.x-s.x)*t,l=s.y+(r.y-s.y)*t;e+=(0===i?"M":"L")+o.toFixed(3)+" "+l.toFixed(3)+" "}return e+"Z"}}(t,this._plotTarget):U(t,this._plotTarget)}catch(t){r=null}}const o=performance.now(),n=this._easing||Z,l=c=>{const h=c-o,d=Math.min(h/s,1),p=n(d);if(this._attrTarget)if(d>=1)e.attr(this._attrTarget);else{const s={};for(const e of Object.keys(this._attrTarget))if(i[e]&&a[e])s[e]=J(i[e],a[e],p);else{const i=parseFloat(t[e]),a=parseFloat(this._attrTarget[e]);isNaN(i)||isNaN(a)||(s[e]=i+(a-i)*p)}e.attr(s)}r&&d<1&&e.attr("d",r(p)),this._duringCb&&this._duringCb(p),d<1?m.requestAnimationFrame(l):(this._plotTarget&&e.attr("d",this._plotSnap||this._plotTarget),this._afterCb&&this._afterCb.call(e))};m.requestAnimationFrame(l)};t>0?setTimeout(i,t):i()}}function tt(t){t.prototype.animate=function(t,e){return new Q(this,t,e)}}function et(t){return-Math.cos(t*Math.PI)/2+.5}function st(t,e,s,i){t=Math.min(Math.max(t,0),1),s=Math.min(Math.max(s,0),1);const a=3*t,r=3*(s-t)-a,o=1-a-r,n=3*e,l=3*(i-e)-n,c=1-n-l,h=t=>((o*t+r)*t+a)*t,d=t=>(3*o*t+2*r)*t+a;return t=>t<=0?0:t>=1?1:(t=>((c*t+l)*t+n)*t)((t=>{let e=t;for(let s=0;s<5;s++){const s=d(e);if(0===s)break;e-=(h(e)-t)/s}let s=0,i=1;if(e=t,e<s)return s;if(e>i)return i;for(;s<i;){const a=h(e);if(Math.abs(a-t)<1e-4)return e;t>a?s=e:i=e,e=(s+i)/2}return e})(t))}const it=new Map;function at(t){return"function"==typeof t?t:(e=t,Array.isArray(e)&&4===e.length&&e.every(t=>"number"==typeof t)?st(t[0],t[1],t[2],t[3]):"string"==typeof t&&it.has(t)?it.get(t):et);var e}it.set("linear",t=>t),it.set("easeInOutSine",et),it.set("easeInSine",t=>1-Math.cos(t*Math.PI/2)),it.set("easeOutSine",t=>Math.sin(t*Math.PI/2)),it.set("easeInQuad",t=>t*t),it.set("easeOutQuad",t=>1-(1-t)*(1-t)),it.set("easeInOutQuad",t=>t<.5?2*t*t:1-Math.pow(-2*t+2,2)/2),it.set("easeInCubic",t=>t*t*t),it.set("easeOutCubic",t=>1-Math.pow(1-t,3)),it.set("easeInOutCubic",t=>t<.5?4*t*t*t:1-Math.pow(-2*t+2,3)/2),it.set("easeOutBack",t=>{const e=1.70158;return 1+2.70158*Math.pow(t-1,3)+e*Math.pow(t-1,2)}),it.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 rt="http://www.w3.org/2000/svg";function ot(t){return 1-Math.pow(1-t,3)}let nt=null;function lt(){if(!h.isBrowser())return!1;try{return nt||(nt=window.matchMedia("(prefers-reduced-motion: reduce)")),!!nt.matches}catch(t){return!1}}function ct(t,e,s){if(!h.isBrowser())return!1;if(s.globals.dataChanged||s.globals.resized)return!1;const i=s.config.chart.animations;if(!i||!1===i.enabled)return!1;const a=s.config.chart.type;if("line"!==a&&"area"!==a&&"rangeArea"!==a)return!1;if(!(s.layout.gridWidth>0))return!1;const r=2*(i.speed||800),o=Math.max(0,Math.min(1,e/s.layout.gridWidth)),n=(1-Math.cbrt(1-o))*r,l=t.node.style;l.opacity="0";let c=null;const d=t=>{null===c&&(c=t),t-c>=n?l.opacity="":m.requestAnimationFrame(d)};return m.requestAnimationFrame(d),!0}function ht(t){const e=t.config.chart.animations;var s;e&&(!1!==e.respectReducedMotion&<()&&(e.enabled=!1,e.dynamicAnimation&&(e.dynamicAnimation.enabled=!1)),s=at(e.easing),Z="function"==typeof s?s:q)}function dt(t){const e=t.style,s=t.index||0,i="number"==typeof t.baseDelay?t.baseDelay:40,a=t.row||0,r=t.col||0,o=t.groupIndex||0,n=t.perGroup||1,l=t.centerDistance||0;switch(e){case"none":return 0;case"diagonal":return(a+r)*i;case"group":return o*i+s%n*(i/4);case"centroid":return l*i*(s+1);default:return s*i}}class pt{constructor(t,e){this.w=t,this.ctx=e}animateLine(t,e,s,i){t.attr(e).animate(i).attr(s)}animateMarker(t,e,s,i){t.attr({opacity:0}).animate(e).attr({opacity:1}).after(()=>{i()})}animatePop(t,{speed:e,delay:s=0,onComplete:i}){const a=this.w;if(!h.isBrowser()||!a.globals.shouldAnimate||e<1)return void(i&&i());const r=t.node.style;r.transformBox="fill-box",r.transformOrigin="center",r.transform="scale(0)",r.opacity="0";const o=performance.now()+s,n=t=>{const s=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)}(s)})`,r.opacity=String(Math.min(1,2*s)),s<1?m.requestAnimationFrame(n):(r.transform="",r.transformOrigin="",r.transformBox="",r.opacity="",i&&i())};m.requestAnimationFrame(n)}animateRect(t,e,s,i,a,r=0){t.attr(e).animate(i,r).attr(s).after(()=>a())}animatePathsGradually(t){const{el:e,realIndex:s,j:i,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,s,i,"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}),h.isBrowser()&&e.globals.shouldAnimate?e.globals.bulkRevealScheduled||(e.globals.bulkRevealScheduled=!0,m.requestAnimationFrame(()=>{e.globals.isDestroyed||(e.globals.bulkRevealScheduled=!1,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.animationEnded=!0,this.showDelayedElements(),"function"==typeof e.config.chart.events.animationEnd&&e.config.chart.events.animationEnd(this.ctx,{el:t,w:e}))}animateDraw(t,{realIndex:e,j:s,isFill:i,isLast:a,speed:r,delay:o,mask:n}){const l=this.w,c=this,d=()=>{a&&l.globals.shouldAnimate&&c.animationCompleted(t),c.showDelayedElements()};if(!h.isBrowser()||!l.globals.shouldAnimate||r<1)return void d();const p=t.node,g=()=>{const t=n&&"radial"===n.type,a=l.layout.gridWidth+8,c=n&&n.cx||0,h=n&&n.cy||0,g=(n&&n.r||l.layout.gridWidth/2)+4,u=`apexDrawMask${l.globals.cuid}-${e}-${null!=s?s:0}-${i?"f":"s"}`,x=m.createElementNS(rt,"mask");let f;if(x.setAttribute("id",u),x.setAttribute("maskUnits","userSpaceOnUse"),t){const t=g;x.setAttribute("x",String(c-t)),x.setAttribute("y",String(h-t)),x.setAttribute("width",String(2*t)),x.setAttribute("height",String(2*t)),f=m.createElementNS(rt,"circle"),f.setAttribute("cx",String(c)),f.setAttribute("cy",String(h)),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=m.createElementNS(rt,"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(#${u})`);const b=performance.now()+(o||0),y=e=>{if(l.globals.isDestroyed)return;const s=Math.max(0,Math.min(1,(e-b)/r)),i=ot(s);t?f.setAttribute("r",String(i*g)):f.setAttribute("width",String(i*a)),s<1?m.requestAnimationFrame(y):(p.removeAttribute("mask"),x.parentNode&&x.parentNode.removeChild(x),d())};m.requestAnimationFrame(y)};m.requestAnimationFrame(()=>{if(l.globals.isDestroyed)return;if(i)return void g();const t=p.getAttribute("stroke-dasharray");if(!!t&&"0"!==t&&""!==t)return void g();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),s=i=>{if(l.globals.isDestroyed)return;const a=Math.max(0,Math.min(1,(i-e)/r));p.setAttribute("stroke-dashoffset",String(t*(1-ot(a)))),a<1?m.requestAnimationFrame(s):(p.removeAttribute("stroke-dasharray"),p.removeAttribute("stroke-dashoffset"),d())};m.requestAnimationFrame(s)})(e):d()})}morphSVG(t,e,s,i,a,r,o,n,l,c){var h,d;const p=this.w;a||(a=t.attr("pathFrom")),r||(r=t.attr("pathTo"));const g=()=>("radar"===p.config.chart.type&&(o=1),`M 0 ${p.layout.gridHeight}`);(!a||a.indexOf("undefined")>-1||a.indexOf("NaN")>-1)&&(a=g()),(!r.trim()||r.indexOf("undefined")>-1||r.indexOf("NaN")>-1)&&(r=g(),c=void 0),c&&(!c.trim()||c.indexOf("undefined")>-1||c.indexOf("NaN")>-1)&&(c=void 0),p.globals.shouldAnimate||(o=1);const u=!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=at(t):l&&(x=at("linear"))}const f=t.plot(a).animate(1,n).plot(a).animate(o,n);x&&f.ease(x),f.plot(c||r,u,c?r:void 0).after(()=>{b.isNumber(s)?s===p.seriesData.series[p.globals.maxValsInArrayIndex].length-2&&p.globals.shouldAnimate&&this.animationCompleted(t):"none"!==i&&p.globals.shouldAnimate&&(!p.globals.comboCharts&&e===p.seriesData.series.length-1||p.globals.comboCharts)&&this.animationCompleted(t),this.showDelayedElements()})}}class gt{constructor(t){this.w=t}getDefaultFilter(t,e){const s=this.w;t.unfilter&&t.unfilter(!0),s.config.chart.dropShadow.enabled&&this.dropShadow(t,s.config.chart.dropShadow,e)}applyFilter(t,e,s){var i,a,r;const o=this.w;if(t.unfilter&&t.unfilter(!0),"none"===s)return void this.getDefaultFilter(t,e);const n=o.config.chart.dropShadow,l="lighten"===s?2:.3;t.filterWith&&(t.filterWith(t=>{t.colorMatrix({type:"matrix",values:`\n ${l} 0 0 0 0\n 0 ${l} 0 0 0\n 0 0 ${l} 0 0\n 0 0 0 1 0\n `,in:"SourceGraphic",result:"brightness"}),n.enabled&&this.addShadow(t,e,n,"brightness")}),n.noUserSpaceOnUse||null==(a=null==(i=t.filterer())?void 0:i.node)||a.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(null==(r=t.filterer())?void 0:r.node))}addShadow(t,e,s,i){var a;const r=this.w;let{blur:o,top:n,left:l,color:c,opacity:h}=s;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:i,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",i])}dropShadow(t,e,s=0){var i,a,r,o,n;const l=this.w;return t.unfilter&&t.unfilter(!0),b.isMsEdge()&&"radialBar"===l.config.chart.type||(null==(i=l.config.chart.dropShadow.enabledOnSeries)?void 0:i.length)>0&&-1===(null==(a=l.config.chart.dropShadow.enabledOnSeries)?void 0:a.indexOf(s))||t.filterWith&&(t.filterWith(t=>{this.addShadow(t,s,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,s){const i=this.w;if(void 0!==i.interact.selectedDataPoints[e]&&i.interact.selectedDataPoints[e].indexOf(s)>-1){t.node.setAttribute("selected",!0);const s=i.config.states.active.filter;"none"!==s&&this.applyFilter(t,e,s.type)}}_scaleFilterSize(t){if(!t)return;(e=>{for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.setAttribute(s,e[s])})({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}class ut{constructor(t,e=null){this.w=t,this.ctx=e}roundPathCorners(t,e){function s(t,e,s){var a=e.x-t.x,r=e.y-t.y,o=Math.sqrt(a*a+r*r);return i(t,e,Math.min(1,s/o))}function i(t,e,s){return{x:t.x+(e.x-t.x)*s,y:t.y+(e.y-t.y)*s}}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 s=e.match(/^([a-zA-Z])(.+)/);return s?(t.push(s[1]),t.push(s[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],g=p==c?o[1]:o[h+1];if(g&&d&&d.length>2&&"L"==p[0]&&g.length>2&&"L"==g[0]){var u,x,f=r(d),m=r(p),b=r(g);u=s(m,f,e),x=s(m,b,e),a(p,u),p.origPoint=m,n.push(p);var y=i(u,m,.5),w=i(m,x,.5),v=["C",y.x,y.y,w.x,w.y,x.x,x.y];v.origPoint=m,n.push(v)}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,s,i,a="#a8a8a8",r=0,o=null,n="butt"){return this.w.dom.Paper.line().attr({x1:t,y1:e,x2:s,y2:i,stroke:a,"stroke-dasharray":r,"stroke-width":o,"stroke-linecap":n})}drawRect(t=0,e=0,s=0,i=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:s>0?s:0,height:i>0?i: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",s=1,i="none"){return this.w.dom.Paper.polygon(t).attr({fill:i,stroke:e,"stroke-width":s})}drawCircle(t,e=null){t<0&&(t=0);const s=this.w.dom.Paper.circle(2*t);return null!==e&&s.attr(e),s}drawPath({d:t="",stroke:e="#a8a8a8",strokeWidth:s=1,fill:i,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:i,"fill-opacity":a,stroke:e,"stroke-opacity":r,"stroke-linecap":n,"stroke-width":s,"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,s=null){return"H"===s?[" H",t].join(" "):"V"===s?[" V",e].join(" "):[" L",t,e].join(" ")}curve(t,e,s,i,a,r){return["C",t,e,s,i,a,r].join(" ")}quadraticCurve(t,e,s,i){return["Q",t,e,s,i].join(" ")}arc(t,e,s,i,a,r,o,n=!1){let l="A";n&&(l="a");return[l,t,e,s,i,a,r,o].join(" ")}renderPaths({j:t,realIndex:e,pathFrom:s,pathTo:i,pathToInterp:a,stroke:r,strokeWidth:o,strokeLinecap:c,fill:h,animationDelay:d,initialSpeed:p,dataChangeSpeed:g,className:u,chartType:x,shouldClipToGrid:f=!0,bindEventsOnPaths:m=!0,drawShadow:b=!0,drawMask:y=null,scrollMorph:w=!1}){var v,A;const C=this.w,S=new gt(this.w),k=new pt(this.w,null!=(v=this.ctx)?v:void 0),M=this.w.config.chart.animations.enabled,D=M&&this.w.config.chart.animations.dynamicAnimation.enabled;if(s&&s.startsWith("M 0 0 ")&&i){const t=i.match(/^M\s+[\d.-]+\s+[\d.-]+/);t&&(s=s.replace(/^M\s+0\s+0/,t[0]))}let T;const L=!!(M&&!C.globals.resized||D&&C.globals.dataChanged&&C.globals.shouldAnimate),F="string"==typeof u&&(u.indexOf("apexcharts-line")>-1||u.indexOf("apexcharts-area")>-1||u.indexOf("apexcharts-rangeArea")>-1||u.indexOf("apexcharts-radar")>-1),_=!(!M||C.globals.resized||C.globals.dataChanged||!F),E=null!=(A=C.config.chart.animations.largeDatasetThreshold)?A:0,P=!!(L&&!_&&E>0&&C.globals.dataPoints>E),B=!(!("candlestick"===x||"boxPlot"===x)||!L||_||!C.globals.dataChanged),N=P||B;!L||_||N?(T=i,L||(C.globals.animationEnded=!0)):T=s;const X=C.config.stroke.dashArray;let I=0;I=Array.isArray(X)?X[e]:C.config.stroke.dashArray;const R=this.drawPath({d:T,stroke:r,strokeWidth:o,fill:h,fillOpacity:1,classes:u,strokeLinecap:c,strokeDashArray:I});R.attr("index",e),f&&("bar"===x&&!C.globals.isBarHorizontal||C.globals.comboCharts?R.attr({"clip-path":`url(#gridRectBarMask${C.globals.cuid})`}):R.attr({"clip-path":`url(#gridRectMask${C.globals.cuid})`})),C.config.chart.dropShadow.enabled&&b&&S.dropShadow(R,C.config.chart.dropShadow,e),m&&(R.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,R)),R.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,R)),R.node.addEventListener("mousedown",this.pathMouseDown.bind(this,R))),R.attr({pathTo:i,pathFrom:s});const z={el:R,j:t,realIndex:e,pathFrom:s,pathTo:i,pathToInterp:a,fill:h,strokeWidth:o,delay:d,scrollMorph:w};if(!M||C.globals.resized||C.globals.dataChanged)!C.globals.resized&&C.globals.dataChanged||N||k.showDelayedElements();else if(_){const s=2*p,i="none"===r||0===o,a=C.seriesData.series.length,n=!!C.globals.comboCharts||e===a-1;k.animateDraw(R,{realIndex:e,j:t,isFill:i,isLast:n,speed:s,delay:0,mask:y})}else N||k.animatePathsGradually(l(n({},z),{speed:p}));return C.globals.dataChanged&&D&&L&&!N&&k.animatePathsGradually(l(n({},z),{speed:g})),N&&k.revealBulk(R),R}drawPattern(t,e,s,i="#a8a8a8",a=0){return this.w.dom.Paper.pattern(e,s,r=>{"horizontalLines"===t?r.line(0,0,s,0).stroke({color:i,width:a+1}):"verticalLines"===t?r.line(0,0,0,e).stroke({color:i,width:a+1}):"slantedLines"===t?r.line(0,0,e,s).stroke({color:i,width:a}):"squares"===t?r.rect(e,s).fill("none").stroke({color:i,width:a}):"circles"===t&&r.circle(e).fill("none").stroke({color:i,width:a})})}drawGradient(t,e,s,i,a,r=null,o=null,n=[],l=0){const c=this.w;let h;e.length<9&&0===e.indexOf("#")&&(e=b.hexToRgba(e,i)),s.length<9&&0===s.indexOf("#")&&(s=b.hexToRgba(s,a));let d=0,p=1,g=1,u=null;null!==o&&(d=void 0!==o[0]?o[0]/100:0,p=void 0!==o[1]?o[1]/100:1,g=void 0!==o[2]?o[2]/100:1,u=void 0!==o[3]?o[3]/100:null);const x=!("donut"!==c.config.chart.type&&"pie"!==c.config.chart.type&&"polarArea"!==c.config.chart.type&&"bubble"!==c.config.chart.type);if(h=n&&0!==n.length?c.dom.Paper.gradient(x?"radial":"linear",t=>{(Array.isArray(n[l])?n[l]:n).forEach(e=>{t.stop(e.offset/100,e.color,e.opacity)})}):c.dom.Paper.gradient(x?"radial":"linear",t=>{t.stop(d,e,i),t.stop(p,s,a),t.stop(g,s,a),null!==u&&t.stop(u,e,i)}),x){const t=c.layout.gridWidth/2,e=c.layout.gridHeight/2;"bubble"!==c.config.chart.type?h.attr({gradientUnits:"userSpaceOnUse",cx:t,cy:e,r:r}):h.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else"vertical"===t?h.from(0,0).to(0,1):"diagonal"===t?h.from(0,0).to(1,1):"horizontal"===t?h.from(0,1).to(1,1):"diagonal2"===t&&h.from(1,0).to(0,1);return h}getTextBasedOnMaxWidth({text:t,maxWidth:e,fontSize:s,fontFamily:i}){const a=this.getTextRects(t,s,i,""),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:s,textAnchor:i,fontSize:a,fontFamily:r,fontWeight:o,foreColor:l,opacity:c,maxWidth:h,cssClass:d="",isPlainText:p=!0,dominantBaseline:g="auto"}){const u=this.w;void 0===s&&(s="");let x=s;i||(i="start"),l&&l.length||(l=u.config.chart.foreColor),r=r||u.config.chart.fontFamily,o=o||"regular";const f={maxWidth:h,fontSize:a=a||"11px",fontFamily:r};let m;return Array.isArray(s)?m=u.dom.Paper.text(t=>{for(let e=0;e<s.length;e++)x=s[e],h&&(x=this.getTextBasedOnMaxWidth(n({text:s[e]},f))),0===e?t.tspan(x):t.tspan(x).newLine()}):(h&&(x=this.getTextBasedOnMaxWidth(n({text:s},f))),m=p?u.dom.Paper.plain(s):u.dom.Paper.text(t=>t.tspan(x))),m.attr({x:t,y:e,"text-anchor":i,"dominant-baseline":g,"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,s,i){let a="";switch(s){case"cross":a=`M ${t-(i/=1.4)} ${e-i} L ${t+i} ${e+i} M ${t-i} ${e+i} L ${t+i} ${e-i}`;break;case"plus":a=`M ${t-(i/=1.12)} ${e} L ${t+i} ${e} M ${t} ${e-i} L ${t} ${e+i}`;break;case"star":case"sparkle":{let r=5;i*=1.15,"sparkle"===s&&(i/=1.1,r=4);const o=Math.PI/r;for(let s=0;s<=2*r;s++){const r=s*o,n=s%2==0?i:i/2;a+=(0===s?"M":"L")+(t+n*Math.sin(r))+","+(e-n*Math.cos(r))}a+="Z";break}case"triangle":a=`M ${t} ${e-i} \n L ${t+i} ${e+i} \n L ${t-i} ${e+i} \n Z`;break;case"square":case"rect":a=`M ${t-(i/=1.125)} ${e-i} \n L ${t+i} ${e-i} \n L ${t+i} ${e+i} \n L ${t-i} ${e+i} \n Z`;break;case"diamond":a=`M ${t} ${e-(i*=1.05)} \n L ${t+i} ${e} \n L ${t} ${e+i} \n L ${t-i} ${e} \n Z`;break;case"line":a=`M ${t-(i/=1.1)} ${e} \n L ${t+i} ${e}`;break;default:a=`M ${t}, ${e} \n m -${(i*=2)/2}, 0 \n a ${i/2},${i/2} 0 1,0 ${i},0 \n a ${i/2},${i/2} 0 1,0 -${i},0`}return a}drawMarkerShape(t,e,s,i,a){const r=this.drawPath({d:this.getMarkerPath(t,e,s,i),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,s){t=t||0;let i=s.pSize||0;return b.isNumber(e)||(i=0,e=0),this.drawMarkerShape(t,e,null==s?void 0:s.shape,i,n(n({},s),"line"===s.shape||"plus"===s.shape||"cross"===s.shape?{pointStrokeColor:s.pointFillColor,pointStrokeOpacity:s.pointFillOpacity}:{}))}pathMouseEnter(t,e){var s,i;const a=this.w,r=new gt(this.w),o=parseInt(null!=(s=t.node.getAttribute("index"))?s:"",10),n=parseInt(null!=(i=t.node.getAttribute("j"))?i:"",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}),ut._fireEvent(a,"dataPointMouseEnter",[e,this.ctx,{seriesIndex:o,dataPointIndex:n,w:a}]),"none"!==a.config.states.active.filter.type&&"true"===t.node.getAttribute("selected")||"none"===a.config.states.hover.filter.type||a.interact.isTouchDevice))){const e=a.config.states.hover.filter;r.applyFilter(t,o,e.type)}}pathMouseLeave(t,e){var s,i;const a=this.w,r=new gt(this.w),o=parseInt(null!=(s=t.node.getAttribute("index"))?s:"",10),n=parseInt(null!=(i=t.node.getAttribute("j"))?i:"",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}),ut._fireEvent(a,"dataPointMouseLeave",[e,this.ctx,{seriesIndex:o,dataPointIndex:n,w:a}]),"none"!==a.config.states.active.filter.type&&"true"===t.node.getAttribute("selected")||"none"!==a.config.states.hover.filter.type&&r.getDefaultFilter(t,o))}pathMouseDown(t,e){var s,i;const a=this.w,r=new gt(this.w),o=parseInt(null!=(s=t.node.getAttribute("index"))?s:"",10),n=parseInt(null!=(i=t.node.getAttribute("j"))?i:"",10);if(isNaN(o)||isNaN(n))return;const l=a.config.chart.link;if(!!(!l||"function"!=typeof l.dimension&&!l.enabled)){let e="false";if("true"===t.node.getAttribute("selected")){t.node.setAttribute("selected","false");const e=a.interact.selectedDataPoints[o].indexOf(n);e>-1&&a.interact.selectedDataPoints[o].splice(e,1)}else{if(!a.config.states.active.allowMultipleDataPointsSelection&&a.interact.selectedDataPoints.length>0){a.interact.selectedDataPoints=[];const t=a.dom.Paper.find(".apexcharts-series path:not(.apexcharts-decoration-element)"),e=a.dom.Paper.find(".apexcharts-series circle:not(.apexcharts-decoration-element), .apexcharts-series rect:not(.apexcharts-decoration-element)"),s=t=>{Array.prototype.forEach.call(t,t=>{t.node.setAttribute("selected","false"),r.getDefaultFilter(t,o)})};s(t),s(e)}t.node.setAttribute("selected","true"),e="true",void 0===a.interact.selectedDataPoints[o]&&(a.interact.selectedDataPoints[o]=[]),a.interact.selectedDataPoints[o].push(n)}if("true"===e){const e=a.config.states.active.filter;if("none"!==e)r.applyFilter(t,o,e.type);else if("none"!==a.config.states.hover.filter&&!a.interact.isTouchDevice){const e=a.config.states.hover.filter;r.applyFilter(t,o,e.type)}}else if("none"!==a.config.states.active.filter.type)if("none"===a.config.states.hover.filter.type||a.interact.isTouchDevice)r.getDefaultFilter(t,o);else{const e=a.config.states.hover.filter;r.applyFilter(t,o,e.type)}}"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&&ut._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 s=null;t.node.addEventListener("mouseover",i=>{const a=ut._findDelegateTarget(i.target,t.node,e);a&&a!==s&&(s&&s.instance&&this.pathMouseLeave(s.instance,i),s=a,a.instance&&this.pathMouseEnter(a.instance,i))}),t.node.addEventListener("mouseout",i=>{if(!s)return;(i.relatedTarget?ut._findDelegateTarget(i.relatedTarget,t.node,e):null)!==s&&(s&&s.instance&&this.pathMouseLeave(s.instance,i),s=null)}),t.node.addEventListener("mousedown",s=>{const i=ut._findDelegateTarget(s.target,t.node,e);i&&i.instance&&this.pathMouseDown(i.instance,s)})}static _fireEvent(t,e,s){const i=t.globals.events;if(!i||!Object.prototype.hasOwnProperty.call(i,e))return;const a=i[e];for(let t=0;t<a.length;t++)a[t].apply(null,s)}static _findDelegateTarget(t,e,s){for(;t&&t!==e&&t!==document;){if(t.matches&&t.matches(s))return t;t=t.parentNode}return null}static setAttrs(t,e){for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.setAttribute(s,e[s])}getTextRects(t,e,s,i,a=!0){const r=this.w,o=[t,e,s,i,a].join("\0"),n=r.globals.textRectsCache;if(n&&n.has(o))return n.get(o);const l=this.drawText({x:-200,y:-200,text:t,textAnchor:"start",fontSize:e,fontFamily:s,foreColor:"#fff",opacity:0});i&&l.attr("transform",i),r.dom.Paper.add(l);let c=l.bbox();const h=c.y;a||(c=l.node.getBoundingClientRect()),l.remove();const d={width:c.width,height:c.height,centerOffset:a?h+c.height/2- -200:0};return n&&n.set(o,d),d}placeTextWithEllipsis(t,e,s){if("function"==typeof t.getComputedTextLength&&(t.textContent=e,e.length>0&&t.getComputedTextLength()>=s/1.1)){for(let i=e.length-3;i>0;i-=3)if(t.getSubStringLength(0,i)<=s/1.1)return void(t.textContent=e.substring(0,i)+"...");t.textContent="."}}}class xt{constructor(t){this.w=t,this.opts=null,this.seriesIndex=0,this.patternIDs=[]}clippedImgArea(t){const e=this.w,s=e.config,i=parseInt(String(e.layout.gridWidth),10),a=parseInt(String(e.layout.gridHeight),10),r=i>a?i:a,o=t.image;let n=0,l=0;void 0===t.width&&void 0===t.height?void 0!==s.fill.image.width&&void 0!==s.fill.image.height?(n=s.fill.image.width+1,l=s.fill.image.height):(n=r+1,l=r):(n=t.width,l=t.height);const c=m.createElementNS(P,"pattern");ut.setAttrs(c,{id:t.patternID,patternUnits:t.patternUnits?t.patternUnits:"userSpaceOnUse",width:n+"px",height:l+"px"});const d=m.createElementNS(P,"image");c.appendChild(d);const p=h.isBrowser()?window.SVG:global.SVG;d.setAttributeNS(p.xlink,"href",o),ut.setAttrs(d,{x:0,y:0,preserveAspectRatio:"none",width:n+"px",height:l+"px"}),d.style.opacity=t.opacity,e.dom.elDefs.node.appendChild(c)}getSeriesIndex(t){const e=this.w,s=e.config.chart.type;return("bar"===s||"rangeBar"===s)&&e.config.plotOptions.bar.distributed||"heatmap"===s||"treemap"===s?this.seriesIndex=t.seriesNumber:this.seriesIndex=t.seriesNumber%e.seriesData.series.length,this.seriesIndex}computeColorStops(t,e){const s=this.w;let i=null,a=null;for(const s of t)s>=e.threshold?(null===i||s>i)&&(i=s):(null===a||s<a)&&(a=s);null===i&&(i=e.threshold),null===a&&(a=e.threshold);let r=i-e.threshold+(e.threshold-a);0===r&&(r=1);let o=100-(e.threshold-a)/r*100;return o=Math.max(0,Math.min(o,100)),[{offset:o,color:e.colorAboveThreshold,opacity:s.config.fill.opacity},{offset:0,color:e.colorBelowThreshold,opacity:s.config.fill.opacity}]}fillPath(t){var e,s,i,a;const r=this.w;this.opts=t;const o=this.w.config;let n,l,c;this.seriesIndex=this.getSeriesIndex(t);const h=o.plotOptions.line.colors.colorAboveThreshold&&o.plotOptions.line.colors.colorBelowThreshold;let d=this.getFillColors()[this.seriesIndex];void 0!==r.seriesData.seriesColors[this.seriesIndex]&&(d=r.seriesData.seriesColors[this.seriesIndex]),"function"==typeof d&&(d=d({seriesIndex:this.seriesIndex,dataPointIndex:t.dataPointIndex,value:t.value,w:r}));const p=t.fillType?t.fillType:this.getFillType(this.seriesIndex);let g=Array.isArray(o.fill.opacity)?o.fill.opacity[this.seriesIndex]:o.fill.opacity;const u="gradient"===p||h;t.color&&(d=t.color);const x=r.config.series[this.seriesIndex];(null==(s=null==(e=null==x?void 0:x.data)?void 0:e[t.dataPointIndex])?void 0:s.fillColor)&&(d=null==(a=null==(i=null==x?void 0:x.data)?void 0:i[t.dataPointIndex])?void 0:a.fillColor),d||(d="#fff"),void 0!==t.opacity&&null!==t.opacity&&(g=t.opacity);let f=d;b.isCSSVariable(d)?f=b.applyOpacityToColor(d,g):-1===d.indexOf("rgb")?-1===d.indexOf("#")?f=d:d.length<9&&(f=b.hexToRgba(d,g)):d.indexOf("rgba")>-1?g=b.getOpacityFromRGBA(d):f=b.hexToRgba(b.rgb2hex(d),g);const m=b.isCSSVariable(d)?b.getThemeColor(d):d;if("pattern"===p&&(l=this.handlePatternFill({fillConfig:t.fillConfig,patternFill:l,fillColor:m,defaultColor:f})),u){const e=o.fill.gradient.colorStops?[...o.fill.gradient.colorStops]:[];let s=o.fill.gradient.type;h&&(e[this.seriesIndex]=this.computeColorStops(r.seriesData.series[this.seriesIndex],o.plotOptions.line.colors),s="vertical"),c=this.handleGradientFill({type:s,fillConfig:t.fillConfig,fillColor:m,fillOpacity:g,colorStops:e,i:this.seriesIndex})}if("image"===p){const e=o.fill.image.src,s=t.patternID?t.patternID:"",i=`pattern${r.globals.cuid}${t.seriesNumber+1}${s}`;-1===this.patternIDs.indexOf(i)&&(this.clippedImgArea({opacity:g,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:i}),this.patternIDs.push(i)),n=`url(#${i})`}else n=u?c:"pattern"===p?l:f;return t.solid&&(n=f),n}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,s=this.opts;let i=[];return t.globals.comboCharts?"line"===t.config.series[this.seriesIndex].type?Array.isArray(t.globals.stroke.colors)?i=t.globals.stroke.colors:i.push(t.globals.stroke.colors):Array.isArray(t.globals.fill.colors)?i=t.globals.fill.colors:i.push(t.globals.fill.colors):"line"===e.chart.type?Array.isArray(t.globals.stroke.colors)?i=t.globals.stroke.colors:i.push(t.globals.stroke.colors):Array.isArray(t.globals.fill.colors)?i=t.globals.fill.colors:i.push(t.globals.fill.colors),void 0!==s.fillColors&&(i=[],Array.isArray(s.fillColors)?i=s.fillColors.slice():i.push(s.fillColors)),i}handlePatternFill({fillConfig:t,patternFill:e,fillColor:s,defaultColor:i}){let a=this.w.config.fill;t&&(a=t);const r=this.opts,o=new ut(this.w),n=Array.isArray(a.pattern.strokeWidth)?a.pattern.strokeWidth[this.seriesIndex]:a.pattern.strokeWidth,l=s;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=i;else e=o.drawPattern(a.pattern.style,a.pattern.width,a.pattern.height,l,n);return e}handleGradientFill({type:t,fillColor:e,fillOpacity:s,fillConfig:i,colorStops:a,i:r}){let o=this.w.config.fill;i&&(o=n(n({},o),i));const l=this.opts,c=new ut(this.w),h=new b;t=t||o.gradient.type;let d,p=e,g=void 0===o.gradient.opacityFrom?s:Array.isArray(o.gradient.opacityFrom)?o.gradient.opacityFrom[r]:o.gradient.opacityFrom;p.indexOf("rgba")>-1&&(g=b.getOpacityFromRGBA(p));let u=void 0===o.gradient.opacityTo?s:Array.isArray(o.gradient.opacityTo)?o.gradient.opacityTo[r]:o.gradient.opacityTo;if(void 0===o.gradient.gradientToColors||0===o.gradient.gradientToColors.length)d="dark"===o.gradient.shade?h.shadeColor(-1*parseFloat(o.gradient.shadeIntensity),e.indexOf("rgb")>-1?b.rgb2hex(e):e):h.shadeColor(parseFloat(o.gradient.shadeIntensity),e.indexOf("rgb")>-1?b.rgb2hex(e):e);else if(o.gradient.gradientToColors[l.seriesNumber]){const t=o.gradient.gradientToColors[l.seriesNumber];d=t,t.indexOf("rgba")>-1&&(u=b.getOpacityFromRGBA(t))}else d=e;if(o.gradient.gradientFrom&&(p=o.gradient.gradientFrom),o.gradient.gradientTo&&(d=o.gradient.gradientTo),o.gradient.inverseColors){const t=p;p=d,d=t}return p.indexOf("rgb")>-1&&(p=b.rgb2hex(p)),d.indexOf("rgb")>-1&&(d=b.rgb2hex(d)),c.drawGradient(t,p,d,g,u,l.size,o.gradient.stops,a,r)}}const ft=["none","lighten","darken"];function mt(t,e){const s=t&&t.renderer;return s&&s.kind&&"svg"!==s.kind?s:e}function bt(t){var e,s;const i=t.config.fill&&t.config.fill.type,a=t=>"pattern"===t||"image"===t||"gradient"===t;if(Array.isArray(i)?i.some(a):a(i))return!0;const r=null==(s=null==(e=t.config.plotOptions)?void 0:e.line)?void 0:s.colors;if(r&&r.colorAboveThreshold&&r.colorBelowThreshold)return!0;const o=t.config.states||{},n=o.hover&&o.hover.filter&&o.hover.filter.type,l=o.active&&o.active.filter&&o.active.filter.type;return!(!n||ft.includes(n))||!(!l||ft.includes(l))}class yt{constructor(t,e){this.w=t,this.ctx=e,this._filters=new gt(this.w),this._graphics=new ut(this.w,this.ctx),this._seriesWrap=null,this._seriesWrapIndex=-1}resetSeriesWrapCache(){this._seriesWrap=null,this._seriesWrapIndex=-1}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)}plotChartMarkers({pointsPos:t,seriesIndex:e,j:s,pSize:i,alwaysDrawMarker:a=!1,isVirtualPoint:r=!1}){const o=this.w,n=e,l=t;let c=null;const h=new ut(this.w),d=mt(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 h,g=s,u=!b.isNumber(l.y[t]);0===o.globals.markers.largestSize&&o.globals.hasNullValues&&null!==o.seriesData.series[n][s+1]&&!r&&(u=!0),1===s&&0===t&&(g=0),1===s&&1===t&&(g=1);let x="apexcharts-marker";"line"!==o.config.chart.type&&"area"!==o.config.chart.type||o.globals.comboCharts||o.config.tooltip.intersect||(x+=" no-pointer-events");if((Array.isArray(o.config.markers.size)?o.globals.markers.size[e]>0:o.config.markers.size>0)||a||p){"canvas"===d.kind&&(void 0===o.globals.pointsArray[e]&&(o.globals.pointsArray[e]=[]),o.globals.pointsArray[e][g]=[l.x[t],l.y[t]]),u||(x+=` w${b.randomId()}`);const s=this.getMarkerConfig({cssClass:x,seriesIndex:e,dataPointIndex:g}),r=o.config.series[n];if(r.data[g]&&(r.data[g].fillColor&&(s.pointFillColor=r.data[g].fillColor),r.data[g].strokeColor&&(s.pointStrokeColor=r.data[g].strokeColor)),void 0!==i&&(s.pSize=i),(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)&&(s.pSize=0),!u){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))}h=d.drawMarker(l.x[t],l.y[t],s),h.attr("rel",g),h.attr("j",g),h.attr("index",e),h.node.setAttribute("default-marker-size",s.pSize),ct(h,l.x[t],o),this._filters.setSelectionFilter(h,e,g),c&&c.add(h)}}else void 0===o.globals.pointsArray[e]&&(o.globals.pointsArray[e]=[]),o.globals.pointsArray[e].push([l.x[t],l.y[t]])}return c}getMarkerConfig({cssClass:t,seriesIndex:e,dataPointIndex:s=null,radius:i=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!==s&&c.discrete.length&&c.discrete.map(t=>{t.seriesIndex===e&&t.dataPointIndex===s&&(n.pointStrokeColor=t.strokeColor,n.pointFillColor=t.fillColor,l=t.size,n.pointShape=t.shape)}),{pSize:null===i?l:i,pRadius:null!==i?i: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,s=".apexcharts-marker";this._graphics.setupEventDelegation(t,s),t.node.addEventListener("click",i=>{if(e.config.markers.onClick){ut._findDelegateTarget(i.target,t.node,s)&&e.config.markers.onClick(i)}}),t.node.addEventListener("dblclick",i=>{if(e.config.markers.onDblClick){ut._findDelegateTarget(i.target,t.node,s)&&e.config.markers.onDblClick(i)}}),t.node.addEventListener("touchstart",e=>{const i=ut._findDelegateTarget(e.target,t.node,s);i&&i.instance&&this._graphics.pathMouseDown(i.instance,e)},{passive:!0})}addEvents(t){const e=this.w;t.node.addEventListener("mouseenter",this._graphics.pathMouseEnter.bind(this.ctx,t)),t.node.addEventListener("mouseleave",this._graphics.pathMouseLeave.bind(this.ctx,t)),t.node.addEventListener("mousedown",this._graphics.pathMouseDown.bind(this.ctx,t)),t.node.addEventListener("click",e.config.markers.onClick),t.node.addEventListener("dblclick",e.config.markers.onDblClick),t.node.addEventListener("touchstart",this._graphics.pathMouseDown.bind(this.ctx,t),{passive:!0})}getMarkerStyle(t){const e=this.w,s=e.globals.markers.colors,i=e.config.markers.strokeColor||e.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(i)?i[t]:i,pointFillColor:Array.isArray(s)?s[t]:s}}}class wt{constructor(t,e){this.ctx=e,this.w=t,this.initialAnim=this.w.config.chart.animations.enabled,this.anim=new pt(this.w),this.filters=new gt(this.w),this.fill=new xt(this.w),this.markers=new yt(this.w,this.ctx),this.graphics=new ut(this.w),this._elPointsWrap=null,this._elPointsWrapParent=null,this._perSeries=null}draw(t,e,s){const i=this.w,a=this.graphics,r=mt(this.ctx,a),o=s.realIndex,n=s.pointsPos,l=s.zRatio,c=s.elParent;let h=this._elPointsWrap;if(h&&this._elPointsWrapParent===c||(h=r.group({class:`apexcharts-series-markers apexcharts-series-${i.config.chart.type}`}),h.attr("clip-path",`url(#gridRectMarkerMask${i.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 s=e+1,a=!0;0===e&&0===t&&(s=0),0===e&&1===t&&(s=1);let c=i.globals.markers.size[o];if(l!==1/0){const t=i.config.plotOptions.bubble;c=i.seriesData.seriesZ[o][s],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!==i.seriesData.series[o][s]||(a=!1),a){const t=this.drawPoint(d,p,c,o,s,e);h.add(t),"canvas"===r.kind&&(void 0===i.globals.pointsArray[o]&&(i.globals.pointsArray[o]=[]),i.globals.pointsArray[o][s]=[d,p])}}}_buildPerSeriesCache(t,e){var s;const i=this.w;return{realIndex:t,emit:e,isBubble:"bubble"===i.config.chart.type||i.globals.comboCharts&&i.config.series[t]&&"bubble"===i.config.series[t].type,canCacheConfig:!i.config.markers.discrete.length,markerConfig:null,fillCacheable:void 0,fillCircle:void 0,dropShadowEnabled:i.config.chart.dropShadow.enabled,doInitialAnim:this.initialAnim&&!i.globals.dataChanged&&!i.globals.resized,jitter:null==(s=i.config.plotOptions.scatter)?void 0:s.jitter,anim:null}}drawPoint(t,e,s,i,a,r){var o;const n=this.w,l=i,c=this.anim,h=this.filters,d=this.fill,p=this.markers;let g=this._perSeries;g&&g.realIndex===i||(g=this._perSeries=this._buildPerSeriesCache(i,mt(this.ctx,this.graphics)));const u=g.emit;let x;g.canCacheConfig?(g.markerConfig||(g.markerConfig=p.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:l,dataPointIndex:a,radius:g.isBubble?s:null})),x=g.markerConfig,g.isBubble&&(x.pSize=s,x.pRadius=s)):x=p.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:l,dataPointIndex:a,radius:g.isBubble?s:null});const f=n.config.series[l].data[a];let m;void 0!==g.fillCircle?m=g.fillCircle:(m=d.fillPath({seriesNumber:i,dataPointIndex:a,color:x.pointFillColor,patternUnits:"objectBoundingBox",value:n.seriesData.series[i][r]}),void 0===g.fillCacheable&&(g.fillCacheable=g.canCacheConfig&&"solid"===d.getFillType(i)&&"string"==typeof x.pointFillColor&&!!x.pointFillColor),g.fillCacheable&&!(null==f?void 0:f.fillColor)&&(g.fillCircle=m));const b=u.drawMarker(t,e,x);(null==f?void 0:f.fillColor)&&(m=f.fillColor);const y=g.jitter;if((null==y?void 0:y.enabled)&&y.distributed&&n.globals.colors.length){const t=Math.round(null==(o=n.seriesData.seriesX[i])?void 0:o[a]);isNaN(t)||(m=n.globals.colors[t%n.globals.colors.length])}if(b.attr({fill:m}),g.dropShadowEnabled){const t=n.config.chart.dropShadow;h.dropShadow(b,t,i)}if(g.doInitialAnim){if(!g.anim){const t=n.config.chart.animations,e=n.globals.dataPoints||1,s=t.animateGradually,i=s&&!1!==s.enabled;g.anim={popSpeed:t.speed,baseDelay:i?Math.min(20,.5*t.speed/Math.max(1,e)):0}}const t=dt({style:g.anim.baseDelay>0?"sequential":"none",index:a,baseDelay:g.anim.baseDelay});c.animatePop(b,{speed:g.anim.popSpeed,delay:t,onComplete:()=>c.animationCompleted(b)})}else n.globals.animationEnded=!0;return b.attr({rel:a,j:a,index:i,"default-marker-size":x.pSize}),h.setSelectionFilter(b,i,a),b}centerTextInBubble(t){const e=this.w;return{y:t+=parseInt(e.config.dataLabels.style.fontSize,10)/4}}}class vt{constructor(t,e=null){this.w=t,this.ctx=e}dataLabelsCorrection(t,e,s,i,a,r,o){const n=this.w;let l=!1;const c=new ut(this.w).getTextRects(s,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[i]&&(n.globals.dataLabelsRects[i]=[]),n.globals.dataLabelsRects[i].push({x:t,y:e,width:h,height:d});const p=n.globals.dataLabelsRects[i].length-2,g=void 0!==n.globals.lastDrawnDataLabelsIndexes[i]?n.globals.lastDrawnDataLabelsIndexes[i][n.globals.lastDrawnDataLabelsIndexes[i].length-1]:0;if(void 0!==n.globals.dataLabelsRects[i][p]){const s=n.globals.dataLabelsRects[i][g];(t>s.x+s.width||e>s.y+s.height||e+d<s.y||t+h<s.x)&&(l=!0)}return(0===a||r)&&(l=!0),{x:t,y:e,textRects:c,drawnextLabel:l}}drawDataLabel({type:t,pos:e,i:s,j:i,isRangeStart:a,strokeWidth:r=2}){const o=this.w,n=new ut(this.w),l=o.config.dataLabels;let c=0,h=0,d=i,p=null;if(-1!==o.globals.collapsedSeriesIndices.indexOf(s)||!l.enabled||!Array.isArray(e.x))return p;p=n.group({class:"apexcharts-data-labels"});for(let n=0;n<e.x.length;n++)if(c=e.x[n]+l.offsetX,h=e.y[n]+l.offsetY+r,!isNaN(c)){1===i&&0===n&&(d=0),1===i&&1===n&&(d=1);let r=o.seriesData.series[s][d];"rangeArea"===t&&(r=a?o.rangeData.seriesRangeStart[s][d]:o.rangeData.seriesRangeEnd[s][d]);let l="";const g=t=>o.config.dataLabels.formatter(t,{seriesIndex:s,dataPointIndex:d,w:o});if("bubble"===o.config.chart.type){r=o.seriesData.seriesZ[s][d],l=g(r),h=e.y[n];h=new wt(this.w,this.ctx).centerTextInBubble(h).y}else void 0!==r&&(l=g(r));let u=o.config.dataLabels.textAnchor;o.globals.isSlopeChart&&(u=0===d?"end":d===o.config.series[s].data.length-1?"start":"middle"),this.plotDataLabelsText({x:c,y:h,text:l,i:s,j:d,parent:p,offsetCorrection:!0,dataLabelsConfig:o.config.dataLabels,textAnchor:u})}return p}plotDataLabelsText(t){const e=this.w,s=new ut(this.w);let{x:i,y:a,i:r,j:o,text:n,textAnchor:l,fontSize:c,parent:h,dataLabelsConfig:d,color:p,alwaysDrawDataLabel:g,offsetCorrection:u,className:x}=t,f=null;if(Array.isArray(e.config.dataLabels.enabledOnSeries)&&e.config.dataLabels.enabledOnSeries.indexOf(r)<0)return f;let m={x:i,y:a,drawnextLabel:!0,textRects:null};if(u&&(m=this.dataLabelsCorrection(i,a,n,r,o,g,parseInt(d.style.fontSize,10).toString())),e.interact.zoomed||(i=m.x,a=m.y),m.textRects){const t=e.globals.barPadForNumericAxis||0;(i<-(t+20)-m.textRects.width||i>e.layout.gridWidth+m.textRects.width+t+30)&&(n="")}let b=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)&&(b=e.globals.dataLabels.style.colors[o]),"function"==typeof b&&(b=b({series:e.seriesData.series,seriesIndex:r,dataPointIndex:o,w:e})),p&&(b=p);let y=d.offsetX,w=d.offsetY;if("bar"!==e.config.chart.type&&"rangeBar"!==e.config.chart.type||(y=0,w=0),e.globals.isSlopeChart&&(0!==o&&(y=-2*d.offsetX+5),0!==o&&o!==e.config.series[r].data.length-1&&(y=0)),m.drawnextLabel){if("middle"===l&&i===e.layout.gridWidth&&(l="end"),f=s.drawText({x:i+y,y:a+w,foreColor:b,textAnchor:l||d.textAnchor,text:n,fontSize:c||d.style.fontSize,fontFamily:d.style.fontFamily,fontWeight:d.style.fontWeight||"normal"}),f.attr({class:x||"apexcharts-datalabel",cx:i,cy:a}),d.dropShadow.enabled){const t=d.dropShadow;new gt(this.w).dropShadow(f,t)}h.add(f),ct(f,i,e),void 0===e.globals.lastDrawnDataLabelsIndexes[r]&&(e.globals.lastDrawnDataLabelsIndexes[r]=[]),e.globals.lastDrawnDataLabelsIndexes[r].push(o)}return f}addBackgroundToDataLabel(t,e){const s=this.w,i=s.config.dataLabels.background,a=i.padding,r=i.padding/2,o=e.width,n=e.height,l=new ut(this.w).drawRect(e.x-a,e.y-r/2,o+2*a,n+r,i.borderRadius,"transparent"!==s.config.chart.background&&s.config.chart.background?s.config.chart.background:"#fff",i.opacity,i.borderWidth,i.borderColor);if(i.dropShadow.enabled){new gt(this.w).dropShadow(l,i.dropShadow)}return l}dataLabelsBackground(){var t;const e=this.w;if("bubble"===e.config.chart.type)return;const s=e.dom.baseEl.querySelectorAll(".apexcharts-datalabels text");for(let i=0;i<s.length;i++){const a=s[i],r=a.getBBox();let o=null;if(r.width&&r.height&&(o=this.addBackgroundToDataLabel(a,r)),o){null==(t=a.parentNode)||t.insertBefore(o.node,a);const s=e.config.dataLabels.background.backgroundColor||a.getAttribute("fill");e.config.chart.animations.enabled&&!e.globals.resized&&!e.globals.dataChanged?o.animate().attr({fill:s}):o.attr({fill:s}),a.setAttribute("fill",e.config.dataLabels.background.foreColor);const i=a.getAttribute("cx");null!==i&&ct(o,parseFloat(i),e)}}}bringForward(){const t=this.w,e=t.dom.baseEl.querySelectorAll(".apexcharts-datalabels"),s=t.dom.baseEl.querySelector(".apexcharts-plot-series:last-child");for(let t=0;t<e.length;t++)s&&s.insertBefore(e[t],s.nextSibling)}}class At{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,s){return t&&t.globals?(t.globals.cachedSelectors||(t.globals.cachedSelectors={}),t.globals.cachedSelectors[e]||(t.globals.cachedSelectors[e]=s()),t.globals.cachedSelectors[e]):s()}static getCachedDimension(t,e,s,i=1e3){if(!t||!t.globals)return s();t.globals.dimensionCache||(t.globals.dimensionCache={});const a=t.globals.dimensionCache[e],r=Date.now();if(a&&a.lastUpdate&&r-a.lastUpdate<i)return a.value;const o=s();return t.globals.dimensionCache[e]={value:o,lastUpdate:r},o}static cacheDOMElement(t,e,s){t&&t.globals&&(t.globals.domCache||(t.globals.domCache=new Map),t.globals.domCache.set(e,s))}static getCachedDOMElement(t,e){return t&&t.globals&&t.globals.domCache&&t.globals.domCache.get(e)||null}}class Ct{constructor(t,{theme:e=null,timeScale:s=null}={}){this.w=t,this.theme=e,this.timeScale=s}getLabel(t,e,s,i,a=[],r="12px",o=!0){const n=this.w,l=void 0===t[i]?"":t[i];let c=l;const h=n.formatters.xLabelFormatter,d=n.config.xaxis.labels.formatter,p=new w(this.w),g=l;o&&(c=p.xLabelFormat(h,l,g,{i:i,dateFormatter:new y(this.w).formatDate,w:n}),void 0!==d&&(c=d(l,t[i],{i:i,dateFormatter:new y(this.w).formatDate,w:n}))),e.length>0?(s=e[i].position,c=e[i].value):"datetime"===n.config.xaxis.type&&void 0===d&&(c=""),void 0===c&&(c=""),c=Array.isArray(c)?c:c.toString();const u=new ut(this.w);let x={};x=n.layout.rotateXLabels&&o?u.getTextRects(c,parseInt(r,10).toString(),null,`rotate(${n.config.xaxis.labels.rotate} 0 0)`,!1):u.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:s,text:c,textRect:x}}checkLabelBasedOnTickamount(t,e,s){const i=this.w;let a=i.config.xaxis.tickAmount;if("dataPoints"===a&&(a=Math.round(i.layout.gridWidth/120)),a>s)return e;return t%Math.round(s/(a+1))===0||(e.text=""),e}checkForOverflowingLabels(t,e,s,i,a){const r=this.w;if(0===t&&r.globals.skipFirstTimelinelabel&&(e.text=""),t===s-1&&r.globals.skipLastTimelinelabel&&(e.text=""),r.config.xaxis.labels.hideOverlappingLabels&&i.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.abs(r.config.xaxis.labels.rotate)/12:1.01)+t.x&&(e.text="")}return e}checkForReversedLabels(t,e){const s=this.w;return s.config.yaxis[t]&&s.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,s=e.globals,i=e.config.yaxis;return e.seriesData.series.length>i.length||i.some(t=>Array.isArray(t.seriesName))?t:s.seriesYAxisReverseMap[t]}isYAxisHidden(t){const e=this.w,s=e.config.yaxis[t];if(!s.show||this.yAxisAllSeriesCollapsed(t))return!0;if(!s.showForNullSeries){const s=e.globals.seriesYAxisMap[t],i=new E(this.w);return s.every(t=>i.isSeriesNull(t))}return!1}getYAxisForeColor(t,e){var s;const i=this.w;return Array.isArray(t)&&i.globals.yAxisScale[e]&&(null==(s=this.theme)||s.pushExtraColors(t,i.globals.yAxisScale[e].result.length,!1)),t}drawYAxisTicks(t,e,s,i,a,r,o){const n=this.w,l=new ut(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),i.show&&e>0){!0===n.config.yaxis[a].opposite&&(t+=i.width);for(let a=e;a>=0;a--){const e=l.drawLine(t+s.offsetX-i.width+i.offsetX,c+i.offsetY,t+s.offsetX+i.offsetX,c+i.offsetY,i.color);o.add(e),c+=r}}}}class St{constructor(t,e,s){this.w=t,this.ctx=e,this.elgrid=s,this.axesUtils=new Ct(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 ut(this.w),s=e.group({class:"apexcharts-xaxis",transform:`translate(${t.config.xaxis.offsetX}, ${t.config.xaxis.offsetY})`}),i=e.group({class:"apexcharts-xaxis-texts-g",transform:`translate(${t.layout.translateXAxisX}, ${t.layout.translateXAxisY})`});s.add(i);let a=[];for(let t=0;t<this.xaxisLabels.length;t++)a.push(this.xaxisLabels[t]);if(this.drawXAxisLabelAndGroup(!0,e,i,a,t.axisFlags.isXNumeric,(t,e)=>e),t.labelData.hasXaxisGroups){const s=t.labelData.groups;a=[];for(let t=0;t<s.length;t++)a.push(s[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,i,a,!1,(t,e)=>s[t].cols*e,r)}if(void 0!==t.config.xaxis.title.text){const i=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});i.add(a),s.add(i)}if(t.config.xaxis.axisBorder.show){const i=t.globals.barPadForNumericAxis,a=e.drawLine(t.globals.padHorizontal+t.config.xaxis.axisBorder.offsetX-i,this.offY,this.xaxisBorderWidth+i,this.offY,t.config.xaxis.axisBorder.color,0,this.xaxisBorderHeight);this.elgrid&&this.elgrid.elGridBorders&&t.config.grid.show?this.elgrid.elGridBorders.add(a):s.add(a)}return s}drawXAxisLabelAndGroup(t,e,s,i,a,r,o={}){var n,l;const c=[],h=[],d=this.w,p=o.xaxisFontSize||this.xaxisFontSize,g=o.xaxisFontFamily||this.xaxisFontFamily,u=o.xaxisForeColors||this.xaxisForeColors,x=o.fontWeight||d.config.xaxis.labels.style.fontWeight,f=o.cssClass||d.config.xaxis.labels.style.cssClass;let b,y=d.globals.padHorizontal;const w=i.length;let v="category"===d.config.xaxis.type?d.globals.dataPoints:w;if(0===v&&w>v&&(v=w),a){const t=Math.max(Number(d.config.xaxis.tickAmount)||1,v>1?v-1:v);b=d.layout.gridWidth/Math.min(t,w-1),y=y+r(0,b)/2+d.config.xaxis.labels.offsetX}else b=d.layout.gridWidth/v,y=y+r(0,b)+d.config.xaxis.labels.offsetX;for(let a=0;a<=w-1;a++){let o=y-r(a,b)/2+d.config.xaxis.labels.offsetX;0===a&&1===w&&b/2===y&&1===v&&(o=d.layout.gridWidth/2);let A=this.axesUtils.getLabel(i,d.labelData.timescaleLabels,o,a,c,p,t),C=28;d.layout.rotateXLabels&&t&&(C=22),d.config.xaxis.title.text&&"top"===d.config.xaxis.position&&(C+=parseFloat(d.config.xaxis.title.style.fontSize)+2),t||(C=C+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,w):this.axesUtils.checkForOverflowingLabels(a,A,w,c,h);const S=()=>t&&d.config.xaxis.convertedCatToNumeric?u[d.globals.minX+a-1]:u[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 i=e.drawText({x:A.x,y:this.offY+d.config.xaxis.labels.offsetY+C-("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:g,foreColor:Array.isArray(u)?S():u,isPlainText:!1,cssClass:(t?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+f});if(s.add(i),i.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=m.createElementNS(P,"title");t.textContent=Array.isArray(A.text)?A.text.join(" "):A.text,i.node.appendChild(t),""!==A.text&&(c.push(A.text),h.push(A))}}a<w-1&&(y+=r(a+1,b))}}drawXaxisInversed(t){const e=this.w,s=new ut(this.w),i=e.config.yaxis[0].opposite?e.globals.translateYAxisX[t]:0,a=s.group({class:"apexcharts-yaxis apexcharts-xaxis-inversed",rel:t}),r=s.group({class:"apexcharts-yaxis-texts-g apexcharts-xaxis-inversed-texts-g",transform:"translate("+i+", 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.formatters.yLabelFormatters[0],h=e.config.yaxis[0].labels;if(h.show)for(let i=0;i<=o.length-1;i++){let a=void 0===o[i]?"":o[i];a=c(a,{seriesIndex:t,dataPointIndex:i,w:e});const d=this.axesUtils.getYAxisForeColor(h.style.colors,t),p=()=>Array.isArray(d)?d[i]:d;let g=0;Array.isArray(a)&&(g=a.length/2*parseInt(h.style.fontSize,10));let u=h.offsetX-15,x="end";this.yaxis.opposite&&(x="start"),"left"===e.config.yaxis[0].labels.align?(u=h.offsetX,x="start"):"center"===e.config.yaxis[0].labels.align?(u=h.offsetX,x="middle"):"right"===e.config.yaxis[0].labels.align&&(x="end");const f=s.drawText({x:u,y:l+n+h.offsetY-g,text:a,textAnchor:x,foreColor:p(),fontSize:h.style.fontSize,fontFamily:h.style.fontFamily,fontWeight:h.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+h.style.cssClass,maxWidth:h.maxWidth});r.add(f),f.on("click",t=>{if("function"==typeof e.config.chart.events.xAxisLabelClick){const s=Object.assign({},e,{labelIndex:i});e.config.chart.events.xAxisLabelClick(t,this.ctx,s)}});const b=m.createElementNS(P,"title");if(b.textContent=Array.isArray(a)?a.join(" "):a,f.node.appendChild(b),0!==e.config.yaxis[t].labels.rotate){const i=s.rotateAroundCenter(f.node);f.node.setAttribute("transform",`rotate(${e.config.yaxis[t].labels.rotate} 0 ${i.y})`)}l+=n}if(void 0!==e.config.yaxis[0].title.text){const t=s.group({class:"apexcharts-yaxis-title apexcharts-xaxis-title-inversed",transform:"translate("+i+", 0)"}),r=s.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=s.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,s){const i=this.w,a=t;if(t<0||t-2>i.layout.gridWidth)return;const r=this.offY+i.config.xaxis.axisTicks.offsetY;if(e=e+r+i.config.xaxis.axisTicks.height,"top"===i.config.xaxis.position&&(e=r-i.config.xaxis.axisTicks.height),i.config.xaxis.axisTicks.show){const o=new ut(this.w).drawLine(t+i.config.xaxis.axisTicks.offsetX,r+i.config.xaxis.offsetY,a+i.config.xaxis.axisTicks.offsetX,e+i.config.xaxis.offsetY,i.config.xaxis.axisTicks.color);s.add(o),o.node.classList.add("apexcharts-xaxis-tick")}}getXAxisTicksPositions(){const t=this.w,e=[],s=this.xaxisLabels.length;let i=t.globals.padHorizontal;if(t.labelData.timescaleLabels.length>0)for(let t=0;t<s;t++)i=this.xaxisLabels[t].position,e.push(i);else{const a=s;for(let s=0;s<a;s++){let s=a;t.axisFlags.isXNumeric&&"bar"!==t.config.chart.type&&(s-=1),i+=t.layout.gridWidth/s,e.push(i)}}return e}xAxisLabelCorrections(){var t,e,s;const i=this.w,a=new ut(this.w),r=i.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g"),o=i.dom.baseEl.querySelectorAll(".apexcharts-xaxis-texts-g text:not(.apexcharts-xaxis-group-label)"),n=i.dom.baseEl.querySelectorAll(".apexcharts-yaxis-inversed text"),l=i.dom.baseEl.querySelectorAll(".apexcharts-xaxis-inversed-texts-g text tspan");if(i.layout.rotateXLabels||i.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(${i.config.xaxis.labels.rotate} ${e.x} ${e.y})`),o[t].setAttribute("text-anchor","end"),null==r||r.setAttribute("transform","translate(0, -10)");const s=o[t].childNodes;i.config.xaxis.labels.trim&&Array.prototype.forEach.call(s,t=>{a.placeTextWithEllipsis(t,t.textContent,i.layout.xAxisLabelsHeight-("bottom"===i.config.legend.position?20:10))})}else{const t=i.layout.gridWidth/(i.labelData.labels.length+1);for(let e=0;e<o.length;e++){const s=o[e].childNodes;i.config.xaxis.labels.trim&&"datetime"!==i.config.xaxis.type&&Array.prototype.forEach.call(s,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>i.layout.gridWidth&&!i.globals.isBarHorizontal&&(null==(e=n[0].parentNode)||e.removeChild(n[0]));for(let t=0;t<l.length;t++)a.placeTextWithEllipsis(l[t],null!=(s=l[t].textContent)?s:"",i.config.yaxis[0].labels.maxWidth-(i.config.yaxis[0].title.text?2*parseFloat(i.config.yaxis[0].title.style.fontSize):0)-15)}}}class kt{constructor(t,e){this.w=t,this.ctx=e,this.xaxisLabels=t.labelData.labels.slice(),this.axesUtils=new Ct(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,s=new ut(this.w);t||(t=s.group({class:"apexcharts-grid"}));const i=s.drawLine(e.globals.padHorizontal,1,e.globals.padHorizontal,e.layout.gridHeight,"transparent"),a=s.drawLine(e.globals.padHorizontal,e.layout.gridHeight,e.layout.gridWidth,e.layout.gridHeight,"transparent");return t.add(a),t.add(i),t}drawGrid(){if(this.w.globals.axisCharts){const t=this.renderGrid();return this.drawGridArea(t.el),t}return null}createGridMask(){const t=this.w,e=t.globals,s=new ut(this.w),i=Array.isArray(t.config.stroke.width)?Math.max(...t.config.stroke.width):t.config.stroke.width,a=t=>{const e=m.createElementNS(P,"clipPath");return e.setAttribute("id",t),e};t.dom.elGridRectMask=a(`gridRectMask${e.cuid}`),t.dom.elGridRectBarMask=a(`gridRectBarMask${e.cuid}`),t.dom.elGridRectMarkerMask=a(`gridRectMarkerMask${e.cuid}`),t.dom.elForecastMask=a(`forecastMask${e.cuid}`),t.dom.elNonForecastMask=a(`nonForecastMask${e.cuid}`);let r=0,o=0;(["bar","rangeBar","candlestick","boxPlot","violin"].includes(t.config.chart.type)||t.globals.comboBarCount>0)&&t.axisFlags.isXNumeric&&!t.globals.isBarHorizontal&&(r=Math.max(t.config.grid.padding.left,e.barPadForNumericAxis),o=Math.max(t.config.grid.padding.right,e.barPadForNumericAxis)),t.dom.elGridRect=s.drawRect(-i/2-2,-i/2-2,t.layout.gridWidth+i+4,t.layout.gridHeight+i+4,0,"#fff"),t.dom.elGridRectBar=s.drawRect(-i/2-r-2,-i/2-2,t.layout.gridWidth+i+o+r+4,t.layout.gridHeight+i+4,0,"#fff");const n=t.globals.markers.largestSize;t.dom.elGridRectMarker=s.drawRect(Math.min(-i/2-r-2,-n),-n,t.layout.gridWidth+Math.max(i+o+r+4,2*n),t.layout.gridHeight+2*n,0,"#fff"),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 l=t.dom.elDefs.node;l.appendChild(t.dom.elGridRectMask),l.appendChild(t.dom.elGridRectBarMask),l.appendChild(t.dom.elGridRectMarkerMask),l.appendChild(t.dom.elForecastMask),l.appendChild(t.dom.elNonForecastMask)}_drawGridLines({i:t,x1:e,y1:s,x2:i,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:s,x2:i,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 s=0;for(let i=0;s<t&&i<e.length;i++)s+=e[i].cols;s===t&&(l=.6*n.layout.xAxisLabelsHeight)}}new St(this.w,this.ctx).drawXaxisTicks(e,l,n.dom.elGraphical)}}_drawGridLine({i:t,x1:e,y1:s,x2:i,y2:a,xCount:r,parent:o}){const n=this.w,l=o.node.classList.contains("apexcharts-gridlines-horizontal"),c=n.globals.barPadForNumericAxis,h=0===s&&0===a||0===e&&0===i||s===n.layout.gridHeight&&a===n.layout.gridHeight||n.globals.isBarHorizontal&&(0===t||t===r-1),d=new ut(this.w).drawLine(e-(l?c:0),s,i+(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:s,x2:i,y2:a,type:r}){const o=this.w,n=new ut(this.w),l=o.globals.barPadForNumericAxis,c=o.config.grid[r].colors[t],h=n.drawRect(e-("row"===r?l:0),s,i+("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 s;const i=this.w,a=({xC:e,x1:s,y1:i,x2:a,y2:r})=>{for(let o=0;o<e;o++)s=this.xaxisLabels[o].position,a=this.xaxisLabels[o].position,this._drawGridLines({i:o,x1:s,y1:i,x2:a,y2:r,xCount:t,parent:this.elgridLinesV})},r=({xC:e,x1:s,y1:a,x2:r,y2:o})=>{for(let n=0;n<e+(i.axisFlags.isXNumeric?0:1);n++)0===n&&1===e&&1===i.globals.dataPoints&&(r=s=i.layout.gridWidth/2),this._drawGridLines({i:n,x1:s,y1:a,x2:r,y2:o,xCount:t,parent:this.elgridLinesV}),r=s+=i.layout.gridWidth/(i.axisFlags.isXNumeric?e-1:e)};if(i.config.grid.xaxis.lines.show||i.config.xaxis.axisTicks.show){const e=i.globals.padHorizontal,o=0;let n;const l=i.layout.gridHeight;i.labelData.timescaleLabels.length?a({xC:t,x1:e,y1:o,x2:n,y2:l}):(i.axisFlags.isXNumeric&&(t=null==(s=i.globals.xAxisScale)?void 0:s.result.length),r({xC:t,x1:e,y1:o,x2:n,y2:l}))}if(i.config.grid.yaxis.lines.show){const t=0;let s=0,a=0;const r=i.layout.gridWidth;let o=e+1;this.isRangeBar&&(o=i.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:s,x2:r,y2:a,parent:this.elgridLinesH}),s+=i.layout.gridHeight/(this.isRangeBar?o:e),a=s}}_drawInvertedXYLines({xCount:t}){const e=this.w;if(e.config.grid.xaxis.lines.show||e.config.xaxis.axisTicks.show){let s=e.globals.padHorizontal;const i=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:s,y1:i,x2:a,y2:r,parent:this.elgridLinesV});new St(this.w,this.ctx).drawXaxisTicks(s,0,e.dom.elGraphical),s+=e.layout.gridWidth/t,a=s}}if(e.config.grid.yaxis.lines.show){const t=0;let s=0,i=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:s,x2:a,y2:i,parent:this.elgridLinesH}),s+=e.layout.gridHeight/e.globals.dataPoints,i=s}}renderGrid(){var t,e,s;const i=this.w,a=i.globals,r=new ut(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),i.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=i.labelData.labels.length,i.config.xaxis.tickAmount&&i.config.xaxis.labels.formatter&&(n=i.config.xaxis.tickAmount),(null==(s=null==(e=null==(t=a.yAxisScale)?void 0:t[o])?void 0:e.result)?void 0:s.length)>0&&"datetime"!==i.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:i.layout.gridWidth/n}}drawGridBands(t,e){var s,i,a,r,o;const n=this.w,l=(t,s,i,a,r,o)=>{for(let l=0,c=0;l<s;l++,c++)c>=n.config.grid[t].colors.length&&(c=0),this._drawGridBandRect({c:c,x1:i,y1:a,x2:r,y2:o,type:t}),a+=n.layout.gridHeight/e};if((null==(s=n.config.grid.row.colors)?void 0:s.length)>0&&l("row",e,0,0,n.layout.gridWidth,n.layout.gridHeight/e),(null==(i=n.config.grid.column.colors)?void 0:i.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 s=n.globals.padHorizontal;const i=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&&(s=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:s,y1:i,x2:l,y2:c,type:"column"}),s+=n.layout.gridWidth/e}}}class Mt{constructor(t){this.w=t,this.coreUtils=new E(this.w)}niceScale(t,e,s=0){const i=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[s],n=Math.max((r.svgHeight-100)/15,2)),b.isNumber(n)||(n=10),l=void 0!==o.min&&null!==o.min,c=void 0!==o.max&&null!==o.min;let h=void 0!==o.stepSize&&null!==o.stepSize,d=void 0!==o.tickAmount&&null!==o.tickAmount,p=d?o.tickAmount:L[Math.min(Math.round(n/2),L.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||!b.isNumber(t)&&!b.isNumber(e)||t===Number.MIN_VALUE&&e===-Number.MAX_VALUE)&&(t=b.isNumber(o.min)?o.min:0,e=b.isNumber(o.max)?o.max:t+p,r.allSeriesCollapsed=!1),t>e){const s=e;e=t,t=s}else t===e&&(t=0===t?0:t-1,e=0===e?2:e+1);const g=[];p<1&&(p=1);let u=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/u,m=f;const y=Math.floor(Math.log10(m)),w=Math.pow(10,y);let v=Math.ceil(m/w);if(v=T[0===r.yValueDecimal?0:1][v],m=v*w,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,y-t)}if(l&&c){let t=x/u;if(d)if(h)if(0!=b.mod(x,f)){const e=b.getGCD(f,t);f=t/e<10?e:t}else 0==b.mod(f,t)?f=t:(t=f,d=!1);else f=t;else if(h)0==b.mod(x,f)?t=f:f=t;else if(0==b.mod(x,f))t=f;else{u=Math.ceil(x/f),t=x/u;const e=b.getGCD(x,f);x/e<n&&(t=e),f=t}u=Math.round(x/f)}else{if(l||c){if(c)if(d)t=e-f*u;else{const s=t;t=f*Math.floor(t/f),Math.abs(e-t)/b.getGCD(x,f)>n&&(t=e-f*p,t+=f*Math.floor((s-t)/f))}else if(l)if(d)e=t+f*u;else{const s=e;e=f*Math.ceil(e/f),Math.abs(e-t)/b.getGCD(x,f)>n&&(e=t+f*p,e+=f*Math.ceil((s-e)/f))}}else if(r.isMultipleYAxis&&d){const s=f*Math.floor(t/f);let i=s+f*u;i<e&&(f*=2),i=e,e=(t=s)+f*u,x=Math.abs(e-t),t>0&&t<Math.abs(i-e)&&(t=0,e=f*u),e<0&&-e<Math.abs(s-t)&&(e=0,t=-f*u)}else t=f*Math.floor(t/f),e=f*Math.ceil(e/f);x=Math.abs(e-t),f=b.getGCD(x,f),u=Math.round(x/f)}if(d||l||c||(u=Math.ceil((x-i)/(f+i)),u>16&&b.getPrimeFactors(u).length<2&&u++),!d&&o.forceNiceScale&&0===r.yValueDecimal&&u>x&&(u=x,f=Math.round(x/u)),u>n&&(!d&&!h||o.forceNiceScale)){const t=b.getPrimeFactors(u),e=t.length-1;let s=u;t:for(var A=0;A<e;A++)for(var C=0;C<=e-A;C++){const i=Math.min(C+A,e);let a=s,r=1;for(var S=C;S<=i;S++)r*=t[S];if(a/=r,a<n){s=a;break t}}f=s===u?x:x/s,u=Math.round(x/f)}r.isMultipleYAxis&&0==r.multiAxisTickAmount&&r.ignoreYAxisIndexes.indexOf(s)<0&&(r.multiAxisTickAmount=u);let k=t-f;const M=f*i;do{k+=f,g.push(b.stripNumber(k,7))}while(e-k>M);return{result:g,niceMin:g[0],niceMax:g[g.length-1]}}linearScale(t,e,s=10,i=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"===(s=this._adjustTicksForSmallRange(s,i,r))&&(s=this.w.globals.dataPoints-1);const n=s;a||(a=r/n);if(0!==a&&isFinite(a)){const t=Math.floor(Math.log10(Math.abs(a))),e=Math.max(2,2-t),s=Math.pow(10,e);a=Math.round((a+Number.EPSILON)*s)/s}let l=s===Number.MAX_VALUE?5:n;s===Number.MAX_VALUE&&(a=1);let c=t;for(;l>=0;)o.push(c),c=b.preciseAddition(c,a),l-=1;return{result:o,niceMin:o[0],niceMax:o[o.length-1]}}logarithmicScaleNice(t,e,s){e<=0&&(e=Math.max(t,s)),t<=0&&(t=Math.min(e,s));const i=[],a=Math.ceil(Math.log(e)/Math.log(s)+1);for(let e=Math.floor(Math.log(t)/Math.log(s));e<a;e++)i.push(Math.pow(s,e));return{result:i,niceMin:i[0],niceMax:i[i.length-1]}}logarithmicScale(t,e,s){e<=0&&(e=Math.max(t,s)),t<=0&&(t=Math.min(e,s));const i=[],a=Math.log(e)/Math.log(s),r=Math.log(t)/Math.log(s),o=a-r,n=Math.round(o),l=o/n;for(let t=0,e=r;t<n;t++,e+=l)i.push(Math.pow(s,e));return i.push(Math.pow(s,a)),{result:i,niceMin:t,niceMax:e}}_adjustTicksForSmallRange(t,e,s){let i=t;if(void 0!==e&&this.w.config.yaxis[e].labels.formatter&&void 0===this.w.config.yaxis[e].tickAmount){const t=Number(this.w.config.yaxis[e].labels.formatter(1));b.isNumber(t)&&0===this.w.globals.yValueDecimal&&(i=Math.ceil(s))}return i<t?i:t}setYScaleForIndex(t,e,s){const i=this.w.globals,a=this.w.config,r=i.isBarHorizontal?a.xaxis:a.yaxis[t];void 0===i.yAxisScale[t]&&(i.yAxisScale[t]=[]);const o=Math.abs(s-e);r.logarithmic&&o<=5&&(i.invalidLogScale=!0),r.logarithmic&&o>5?(i.allSeriesCollapsed=!1,i.yAxisScale[t]=r.forceNiceScale?this.logarithmicScaleNice(e,s,r.logBase):this.logarithmicScale(e,s,r.logBase)):s!==-Number.MAX_VALUE&&b.isNumber(s)&&e!==Number.MAX_VALUE&&b.isNumber(e)?(i.allSeriesCollapsed=!1,i.yAxisScale[t]=this.niceScale(e,s,t)):i.yAxisScale[t]=this.niceScale(Number.MIN_VALUE,0,t)}setXScale(t,e){const s=this.w,i=s.globals;if(e!==-Number.MAX_VALUE&&b.isNumber(e)){const a=i.xTickAmount;i.xAxisScale=this.linearScale(t,e,a,0,void 0===s.config.xaxis.max?s.config.xaxis.stepSize:void 0)}else i.xAxisScale=this.linearScale(0,10,10);return i.xAxisScale}scaleMultipleYAxes(){const t=this.w.config,e=this.w.globals;this.coreUtils.setSeriesYAxisMappings();const s=e.seriesYAxisMap,i=e.minYArr,a=e.maxYArr,r=[],o=!e.isBarHorizontal;if(e.allSeriesCollapsed=!0,e.barGroups=[],s.forEach((s,n)=>{const l=[];if(s.forEach(e=>{var s;const i=null==(s=t.series[e])?void 0:s.group;l.indexOf(i)<0&&l.push(i)}),s.length>0){let c,h,d=Number.MAX_VALUE,p=-Number.MAX_VALUE,g=d,u=p;if(t.chart.stacked){const i=new Array(e.dataPoints).fill(0),a=[],r=[],o=[];l.forEach(()=>{a.push(i.map(()=>Number.MIN_VALUE)),r.push(i.map(()=>Number.MIN_VALUE)),o.push(i.map(()=>Number.MIN_VALUE))});for(let i=0;i<s.length;i++){!c&&t.series[s[i]].type&&(c=t.series[s[i]].type);const d=s[i];h=t.series[d].group?t.series[d].group:"axis-".concat(n.toString());!(e.collapsedSeriesIndices.indexOf(d)<0&&e.ancillaryCollapsedSeriesIndices.indexOf(d)<0)||(e.allSeriesCollapsed=!1,l.forEach((e,s)=>{if(t.series[d].group===e)for(let t=0;t<this.w.seriesData.series[d].length;t++){const e=this.w.seriesData.series[d][t];e>=0?r[s][t]+=e:o[s][t]+=e,a[s][t]+=e,g=Math.min(g,e),u=Math.max(u,e)}})),"bar"!==c&&"column"!==c||e.barGroups.push(h)}c||(c=t.chart.type),"bar"===c||"column"===c?l.forEach((t,e)=>{d=Math.min(d,Math.min.apply(null,o[e])),p=Math.max(p,Math.max.apply(null,r[e]))}):(l.forEach((t,e)=>{g=Math.min(g,Math.min.apply(null,a[e])),u=Math.max(u,Math.max.apply(null,a[e]))}),d=g,p=u),d===Number.MIN_VALUE&&p===Number.MIN_VALUE&&(p=-Number.MAX_VALUE)}else for(let t=0;t<s.length;t++){const r=s[t];d=Math.min(d,i[r]),p=Math.max(p,a[r]);!(e.collapsedSeriesIndices.indexOf(r)<0&&e.ancillaryCollapsedSeriesIndices.indexOf(r)<0)||(e.allSeriesCollapsed=!1)}void 0!==t.yaxis[n].min&&(d="function"==typeof t.yaxis[n].min?t.yaxis[n].min(d):t.yaxis[n].min),void 0!==t.yaxis[n].max&&(p="function"==typeof t.yaxis[n].max?t.yaxis[n].max(p):t.yaxis[n].max),e.barGroups=e.barGroups.filter((t,e,s)=>s.indexOf(t)===e);const x=t.yaxis[n];o&&!0===x.alignZero&&!x.logarithmic&&void 0===x.min&&void 0===x.max&&e.ignoreYAxisIndexes.indexOf(n)<0&&b.isNumber(d)&&b.isNumber(p)?r.push({ai:n,minY:d,maxY:p}):(this.setYScaleForIndex(n,d,p),s.forEach(t=>{i[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),s[t.ai].forEach(s=>{i[s]=e.yAxisScale[t.ai].niceMin,a[s]=e.yAxisScale[t.ai].niceMax})});let t=0;r.forEach(s=>{const i=e.yAxisScale[s.ai],a=i.niceMax-i.niceMin;if(a>0){const e=-i.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)),s=Math.pow(10,e),i=t/s;let a;return a=i<=1+1e-9?1:i<=2+1e-9?2:i<=2.5+1e-9?2.5:i<=5+1e-9?5:10,a*s};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,g=d?-n.niceMin*(1-t)/t:n.niceMax,u=g-p;if(u<=0)return;const x=Math.max(n.result.length,5),f=o(u/Math.max(x-1,1));if(f<=0)return;let m,y;if(h){m=Math.floor(p/f+1e-9)*f;const e=t>1e-9?m*(t-1)/t:n.niceMax,s=Math.max(e,n.niceMax);y=Math.ceil(s/f-1e-9)*f}else{y=Math.ceil(g/f-1e-9)*f;const e=t<1-1e-9?-t*y/(1-t):n.niceMin,s=Math.min(e,n.niceMin);m=Math.floor(s/f+1e-9)*f}n.result=[];for(let t=m;t<=y+1e-9*f;t=b.preciseAddition(t,f))n.result.push(b.stripNumber(t,7));n.niceMin=m,n.niceMax=y,s[r.ai].forEach(t=>{i[t]=n.niceMin,a[t]=n.niceMax})})}else if(1===r.length){const t=r[0];this.setYScaleForIndex(t.ai,t.minY,t.maxY),s[t.ai].forEach(s=>{i[s]=e.yAxisScale[t.ai].niceMin,a[s]=e.yAxisScale[t.ai].niceMax})}}}class Dt{constructor(t){this.w=t,this.scales=new Mt(this.w)}init(){this.setYRange(),this.setXRange(),this.setZRange()}getMinYMaxY(t,e=Number.MAX_VALUE,s=-Number.MAX_VALUE,i=null){var a,r,o,n,l,c,h,d,p;const g=this.w.config,u=this.w.globals;let x=-Number.MAX_VALUE,f=Number.MIN_VALUE;null===i&&(i=t+1);const m=this.w.seriesData.series;let y=m,w=m;"candlestick"===g.chart.type?(y=this.w.candleData.seriesCandleL,w=this.w.candleData.seriesCandleH):"boxPlot"===g.chart.type?(y=this.w.candleData.seriesCandleO,w=this.w.candleData.seriesCandleC):"violin"===g.chart.type?(y=this.w.violinData.seriesViolinMin,w=this.w.violinData.seriesViolinMax):this.w.axisFlags.isRangeData&&(y=this.w.rangeData.seriesRangeStart,w=this.w.rangeData.seriesRangeEnd);let v=!1;if(this.w.seriesData.seriesX.length>=i){const t=null==(a=u.brushSource)?void 0:a.w.config.chart.brush;(g.chart.zoom.enabled&&g.chart.zoom.autoScaleYaxis||(null==t?void 0:t.enabled)&&(null==t?void 0:t.autoScaleYaxis))&&(v=!0)}for(let a=t;a<i;a++){u.dataPoints=Math.max(u.dataPoints,m[a].length);const t=g.series[a].type;this.w.labelData.categoryLabels.length&&(u.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)&&(u.dataPoints=Math.max(u.dataPoints,this.w.labelData.labels.length));let i=0,A=m[a].length-1;if(v){if(g.xaxis.min)for(;i<A&&this.w.seriesData.seriesX[a][i]<g.xaxis.min;i++);if(g.xaxis.max)for(;A>i&&this.w.seriesData.seriesX[a][A]>g.xaxis.max;A--);}if(y===m&&w===m&&"boxPlot"!==g.chart.type&&"candlestick"!==t&&"boxPlot"!==t&&"violin"!==t&&"rangeArea"!==t&&"rangeBar"!==t&&!(this.w.seriesData.seriesGoals[a]&&this.w.seriesData.seriesGoals[a].length)){const o=m[a],n=Math.min(A,o.length-1),l=null==(r=this.w.seriesData._parsedExtrema)?void 0:r[a];if(l&&l.ref===o&&l.len===o.length&&0===i&&n===o.length-1)l.maxY>x&&(x=l.maxY),l.lowestY<e&&(e=l.lowestY),l.negMinY<0&&l.negMinY<f&&(f=l.negMinY),l.yDec>u.yValueDecimal&&(u.yValueDecimal=l.yDec),l.hasNulls&&(u.hasNullValues=!0);else{let t=u.yValueDecimal,s=!1;for(let a=i;a<=n;a++){const i=o[a];if(null!==i&&"number"==typeof i&&i==i&&i!==1/0&&i!==-1/0){if(i>x&&(x=i),i<e&&(e=i),f>i&&i<0&&(f=i),!Number.isInteger(i)){const e=i<0?-i:i;if(e>=1e-6&&e<1e21){const e=""+i,s=e.indexOf("."),a=-1===s?0:e.length-s-1;a>t&&(t=a)}else{const e=b.noExponents(i);b.isFloat(e)&&(t=Math.max(t,e.toString().split(".")[1].length))}}}else s=!0}u.yValueDecimal=t,s&&(u.hasNullValues=!0)}s=x,"bar"!==t&&"column"!==t||(f<0&&x<0&&(x=0,s=Math.max(s,0)),f===Number.MIN_VALUE&&(f=0,e=Math.min(e,0)));continue}for(let r=i;r<=A&&r<this.w.seriesData.series[a].length;r++){let i=m[a][r];if(null!==i&&b.isNumber(i)){switch(void 0!==(null==(o=w[a])?void 0:o[r])&&(x=Math.max(x,w[a][r]),e=Math.min(e,w[a][r])),void 0!==(null==(n=y[a])?void 0:n[r])&&(e=Math.min(e,y[a][r]),s=Math.max(s,y[a][r])),t){case"candlestick":void 0!==this.w.candleData.seriesCandleC[a][r]&&(x=Math.max(x,this.w.candleData.seriesCandleH[a][r]),e=Math.min(e,this.w.candleData.seriesCandleL[a][r]));break;case"boxPlot":void 0!==this.w.candleData.seriesCandleC[a][r]&&(x=Math.max(x,this.w.candleData.seriesCandleC[a][r]),e=Math.min(e,this.w.candleData.seriesCandleO[a][r]));break;case"violin":void 0!==(null==(l=this.w.violinData.seriesViolinMax[a])?void 0:l[r])&&(x=Math.max(x,this.w.violinData.seriesViolinMax[a][r]),e=Math.min(e,this.w.violinData.seriesViolinMin[a][r]))}if(t&&"candlestick"!==t&&"boxPlot"!==t&&"violin"!==t&&"rangeArea"!==t&&"rangeBar"!==t&&(x=Math.max(x,this.w.seriesData.series[a][r]),e=Math.min(e,this.w.seriesData.series[a][r])),this.w.seriesData.seriesGoals[a]&&this.w.seriesData.seriesGoals[a][r]&&Array.isArray(this.w.seriesData.seriesGoals[a][r])&&this.w.seriesData.seriesGoals[a][r].forEach(t=>{x=Math.max(x,t.value),e=Math.min(e,t.value)}),"boxPlot"===this.w.config.chart.type||"boxPlot"===t){const t=null==(h=null==(c=this.w.candleData.seriesBoxPoints)?void 0:c[a])?void 0:h[r];if(t)for(let s=0;s<t.length;s++){const i=t[s];"number"==typeof i&&(x=Math.max(x,i),e=Math.min(e,i))}}s=x,i=b.noExponents(i),b.isFloat(i)&&(u.yValueDecimal=Math.max(u.yValueDecimal,i.toString().split(".")[1].length)),f>(null==(d=y[a])?void 0:d[r])&&(null==(p=y[a])?void 0:p[r])<0&&(f=y[a][r])}else u.hasNullValues=!0}"bar"!==t&&"column"!==t||(f<0&&x<0&&(x=0,s=Math.max(s,0)),f===Number.MIN_VALUE&&(f=0,e=Math.min(e,0)))}return"rangeBar"===g.chart.type&&this.w.rangeData.seriesRangeStart.length&&u.isBarHorizontal&&(f=e),"bar"===g.chart.type&&(f<0&&x<0&&(x=0),f===Number.MIN_VALUE&&(f=0)),{minY:f,maxY:x,lowestY:e,highestY:s}}setYRange(){const t=this.w.globals,e=this.w.config;t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE;let s,i=Number.MAX_VALUE;if(t.isMultipleYAxis){i=Number.MAX_VALUE;for(let e=0;e<this.w.seriesData.series.length;e++)s=this.getMinYMaxY(e),t.minYArr[e]=s.lowestY,t.maxYArr[e]=s.highestY,i=Math.min(i,s.lowestY)}if(s=this.getMinYMaxY(0,i,void 0,this.w.seriesData.series.length),"bar"===e.chart.type?(t.minY=s.minY,t.maxY=s.maxY):(t.minY=s.lowestY,t.maxY=s.highestY),i=s.lowestY,e.chart.stacked&&this._setStackedMinMax(),"line"===e.chart.type||"area"===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&&i!==-Number.MAX_VALUE&&i!==t.maxY&&(t.minY=i):t.minY=t.minY!==Number.MIN_VALUE?Math.min(s.minY,t.minY):s.minY,e.yaxis.forEach((e,s)=>{void 0!==e.max&&("number"==typeof e.max?t.maxYArr[s]=e.max:"function"==typeof e.max&&(t.maxYArr[s]=e.max(t.isMultipleYAxis?t.maxYArr[s]:t.maxY)),t.maxY=t.maxYArr[s]),void 0!==e.min&&("number"==typeof e.min?t.minYArr[s]=e.min:"function"==typeof e.min&&(t.minYArr[s]=e.min(t.isMultipleYAxis?t.minYArr[s]===Number.MIN_VALUE?0:t.minYArr[s]:t.minY)),t.minY=t.minYArr[s])}),t.isBarHorizontal){["min","max"].forEach(s=>{void 0!==e.xaxis[s]&&"number"==typeof e.xaxis[s]&&("min"===s?t.minY=e.xaxis[s]:t.maxY=e.xaxis[s])})}return t.isMultipleYAxis?(this.scales.scaleMultipleYAxes(),t.minY=i):(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(s=>{const i=s;switch(i.type||e.chart.type){case"bar":case"column":t.barGroups.push(i.group);break;case"line":t.lineGroups.push(i.group);break;case"area":t.areaGroups.push(i.group)}}),t.barGroups=t.barGroups.filter((t,e,s)=>s.indexOf(t)===e),t.lineGroups=t.lineGroups.filter((t,e,s)=>s.indexOf(t)===e),t.areaGroups=t.areaGroups.filter((t,e,s)=>s.indexOf(t)===e),{minY:t.minY,maxY:t.maxY,minYArr:t.minYArr,maxYArr:t.maxYArr,yAxisScale:t.yAxisScale}}setXRange(){const t=this.w.globals,e=this.w.config,s="numeric"===e.xaxis.type||"datetime"===e.xaxis.type||"category"===e.xaxis.type&&!this.w.axisFlags.noLabelsProvided||this.w.axisFlags.noLabelsProvided||this.w.axisFlags.isXNumeric,i=()=>{var e;let s=t.minX,i=t.maxX;for(let t=0;t<this.w.seriesData.series.length;t++){const a=this.w.labelData.labels[t];if(!a)continue;const r=null==(e=this.w.seriesData._parsedExtrema)?void 0:e[t];if(r&&r.xNumeric&&r.xref===a&&r.len===a.length)r.maxX>i&&(i=r.maxX),r.minX<s&&(s=r.minX);else for(let t=0;t<a.length;t++){const e=a[t];null!==e&&"number"==typeof e&&e==e&&(e>i&&(i=e),e<s&&(s=e))}}t.maxX=i,t.initialMaxX=i,t.minX=s,t.initialMinX=s};if(this.w.axisFlags.isXNumeric&&i(),this.w.axisFlags.noLabelsProvided&&0===e.xaxis.categories.length&&(t.maxX=this.w.labelData.labels[this.w.labelData.labels.length-1],t.initialMaxX=this.w.labelData.labels[this.w.labelData.labels.length-1],t.minX=1,t.initialMinX=1),this.w.axisFlags.isXNumeric||this.w.axisFlags.noLabelsProvided||this.w.axisFlags.dataFormatXNumeric){let i=10;if(void 0===e.xaxis.tickAmount)i=Math.round(t.svgWidth/150),"numeric"===e.xaxis.type&&t.dataPoints<30&&(i=t.dataPoints-1),i>t.dataPoints&&0!==t.dataPoints&&(i=t.dataPoints-1);else if("dataPoints"===e.xaxis.tickAmount){if(this.w.seriesData.series.length>1&&(i=this.w.seriesData.series[t.maxValsInArrayIndex].length-1),this.w.axisFlags.isXNumeric){const e=Math.round(t.maxX-t.minX);e<30&&(i=e)}}else i=e.xaxis.tickAmount;if(t.xTickAmount=i,void 0!==e.xaxis.max&&"number"==typeof e.xaxis.max&&(t.maxX=e.xaxis.max),void 0!==e.xaxis.min&&"number"==typeof e.xaxis.min&&(t.minX=e.xaxis.min),void 0!==e.xaxis.range&&(t.minX=t.maxX-e.xaxis.range),t.minX!==Number.MAX_VALUE&&t.maxX!==-Number.MAX_VALUE)if(e.xaxis.convertedCatToNumeric&&!this.w.axisFlags.dataFormatXNumeric){const e=[];for(let s=t.minX-1;s<t.maxX;s++)e.push(s+1);t.xAxisScale={result:e,niceMin:e[0],niceMax:e[e.length-1]}}else t.xAxisScale=this.scales.setXScale(t.minX,t.maxX);else t.xAxisScale=this.scales.linearScale(0,i,i,0,e.xaxis.stepSize),this.w.axisFlags.noLabelsProvided&&this.w.labelData.labels.length>0&&(t.xAxisScale=this.scales.linearScale(1,this.w.labelData.labels.length,i-1,0,e.xaxis.stepSize),this.w.seriesData.seriesX=this.w.labelData.labels.slice());s&&(this.w.labelData.labels=t.xAxisScale.result.slice())}return t.isBarHorizontal&&this.w.labelData.labels.length&&(t.xTickAmount=this.w.labelData.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:t.minX,maxX:t.maxX}}setZRange(){const t=this.w.globals;if(this.w.axisFlags.isDataXYZ)for(let e=0;e<this.w.seriesData.series.length;e++)if(void 0!==this.w.seriesData.seriesZ[e])for(let s=0;s<this.w.seriesData.seriesZ[e].length;s++)null!==this.w.seriesData.seriesZ[e][s]&&b.isNumber(this.w.seriesData.seriesZ[e][s])&&(t.maxZ=Math.max(t.maxZ,this.w.seriesData.seriesZ[e][s]),t.minZ=Math.min(t.minZ,this.w.seriesData.seriesZ[e][s]))}_handleSingleDataPoint(){const t=this.w.globals,e=this.w.config;if(t.minX===t.maxX){const s=new y(this.w);if("datetime"===e.xaxis.type){const i=s.getDate(t.minX);e.xaxis.labels.datetimeUTC?i.setUTCDate(i.getUTCDate()-2):i.setDate(i.getDate()-2),t.minX=new Date(i).getTime();const a=s.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,s)=>{var i;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==(i=this.w.seriesData._parsedExtrema)?void 0:i[s];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 s=e[t]-e[t-1];if(s>0)s<o&&(o=s);else if(s<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,s)=>{if(s>0){const i=e-n[s-1];i>0&&(t.minXDiff=Math.min(i,t.minXDiff))}}),1!==t.dataPoints&&t.minXDiff!==Number.MAX_VALUE||(t.minXDiff=.5)}})}_setStackedMinMax(){const t=this.w.globals;if(!this.w.seriesData.series.length)return;let e=this.w.labelData.seriesGroups;e.length||(e=[this.w.seriesData.seriesNames.map(t=>t)]);const s={},i={};e.forEach(e=>{s[e]=[],i[e]=[];this.w.config.series.map((t,s)=>e.indexOf(this.w.seriesData.seriesNames[s])>-1?s:null).filter(t=>null!==t).forEach(a=>{var r,o,n,l;for(let c=0;c<this.w.seriesData.series[t.maxValsInArrayIndex].length;c++){void 0===s[e][c]&&(s[e][c]=0,i[e][c]=0);(this.w.config.chart.stacked&&!t.comboCharts||this.w.config.chart.stacked&&t.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null==(o=null==(r=this.w.config.series)?void 0:r[a])?void 0:o.type)||"column"===(null==(l=null==(n=this.w.config.series)?void 0:n[a])?void 0:l.type)))&&null!==this.w.seriesData.series[a][c]&&b.isNumber(this.w.seriesData.series[a][c])&&(this.w.seriesData.series[a][c]>0?s[e][c]+=parseFloat(String(this.w.seriesData.series[a][c]))+1e-4:i[e][c]+=parseFloat(String(this.w.seriesData.series[a][c])))}})}),Object.entries(s).forEach(([e])=>{s[e].forEach((a,r)=>{t.maxY=Math.max(t.maxY,s[e][r]),t.minY=Math.min(t.minY,i[e][r])})})}}function Tt(){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 Lt{constructor(t,{theme:e=null,timeScale:s=null}={},i){this.w=t,this.elgrid=i,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.isCategoryBarHorizontal="bar"===t.config.chart.type&&t.config.plotOptions.bar.horizontal,this.xAxisoffX="bottom"===t.config.xaxis.position?t.layout.gridHeight:0,this.drawnLabels=[],this.axesUtils=new Ct(t,{theme:e,timeScale:s})}drawYaxis(t){const e=this.w,s=new ut(this.w),i=e.config.yaxis[t].labels.style,{fontSize:a,fontFamily:r,fontWeight:o}=i,n=s.group({class:"apexcharts-yaxis",rel:t,transform:`translate(${e.globals.translateYAxisX[t]}, 0)`});if(this.axesUtils.isYAxisHidden(t))return n;const l=s.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());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 u=c;u>=0;u--){const c=d(p[u],u,e);let x=e.config.yaxis[t].labels.padding;e.config.yaxis[t].opposite&&0!==e.config.yaxis.length&&(x*=-1);const f=this.getTextAnchor(e.config.yaxis[t].labels.align,e.config.yaxis[t].opposite),m=this.axesUtils.getYAxisForeColor(i.colors,t),b=Array.isArray(m)?m[u]:m,y=Array.from(e.dom.baseEl.querySelectorAll(`.apexcharts-yaxis[rel='${t}'] .apexcharts-yaxis-label tspan`)).map(t=>t.textContent),w=s.drawText({x:x,y:n,text:y.includes(c)&&!e.config.yaxis[t].labels.showDuplicates?"":c,textAnchor:f,fontSize:a,fontFamily:r,fontWeight:o,maxWidth:e.config.yaxis[t].labels.maxWidth,foreColor:b,isPlainText:!1,cssClass:`apexcharts-yaxis-label ${i.cssClass}`});l.add(w),this.addTooltip(w,c),null===g&&(g=w),0!==e.config.yaxis[t].labels.rotate&&this.rotateLabel(s,w,g,e.config.yaxis[t].labels.rotate),n+=h}}return this.addYAxisTitle(s,n,t),this.addAxisBorder(s,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 s=m.createElementNS(P,"title");s.textContent=Array.isArray(e)?e.join(" "):e,t.node.appendChild(s)}rotateLabel(t,e,s,i){const a=t.rotateAroundCenter(s.node),r=t.rotateAroundCenter(e.node);e.node.setAttribute("transform",`rotate(${i} ${a.x} ${r.y})`)}addYAxisTitle(t,e,s){const i=this.w;if(void 0!==i.config.yaxis[s].title.text){const a=t.group({class:"apexcharts-yaxis-title"}),r=i.config.yaxis[s].opposite?i.globals.translateYAxisX[s]:0,o=t.drawText({x:r,y:i.layout.gridHeight/2+i.layout.translateY+i.config.yaxis[s].title.offsetY,text:i.config.yaxis[s].title.text,textAnchor:"end",foreColor:i.config.yaxis[s].title.style.color,fontSize:i.config.yaxis[s].title.style.fontSize,fontWeight:i.config.yaxis[s].title.style.fontWeight,fontFamily:i.config.yaxis[s].title.style.fontFamily,cssClass:`apexcharts-yaxis-title-text ${i.config.yaxis[s].title.style.cssClass}`});a.add(o),e.add(a)}}addAxisBorder(t,e,s,i,a){const r=this.w,o=r.config.yaxis[s].axisBorder;let n=31+o.offsetX;if(r.config.yaxis[s].opposite&&(n=-31-o.offsetX),o.show){const s=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(s)}r.config.yaxis[s].axisTicks.show&&this.axesUtils.drawYAxisTicks(n,i,o,r.config.yaxis[s].axisTicks,s,a,e)}drawYaxisInversed(t){const e=this.w,s=new ut(this.w),i=s.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),a=s.group({class:"apexcharts-xaxis-texts-g",transform:`translate(${e.layout.translateXAxisX}, ${e.layout.translateXAxisY})`});i.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&&(this.xaxisLabels=h.slice(),c=h.slice(),r=c.length),e.config.xaxis.labels.show)for(let i=h.length?0:r;h.length?i<h.length:i>=0;h.length?i++:i--){let r=null==l?void 0:l(c[i],i,e),d=e.layout.gridWidth+e.globals.padHorizontal-(n-o+e.config.xaxis.labels.offsetX);if(h.length){const t=this.axesUtils.getLabel(c,h,d,i,this.drawnLabels,this.xaxisFontSize);d=t.x,r=t.text,this.drawnLabels.push(t.text),0===i&&e.globals.skipFirstTimelinelabel&&(r=""),i===c.length-1&&e.globals.skipLastTimelinelabel&&(r="")}const p=s.drawText({x:d,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:r,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(p),this.addTooltip(p,r),n+=o}return this.inversedYAxisTitleText(i),this.inversedYAxisBorder(i),i}inversedYAxisBorder(t){const e=this.w,s=new ut(this.w),i=e.config.xaxis.axisBorder;if(i.show){let a=0;"bar"===e.config.chart.type&&e.axisFlags.isXNumeric&&(a-=15);const r=s.drawLine(e.globals.padHorizontal+a+i.offsetX,this.xAxisoffX,e.layout.gridWidth,this.xAxisoffX,i.color,0,i.height);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(r):t.add(r)}}inversedYAxisTitleText(t){const e=this.w,s=new ut(this.w);if(void 0!==e.config.xaxis.title.text){const i=s.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),a=s.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}`});i.add(a),t.add(i)}}yAxisTitleRotate(t,e){const s=this.w,i=new ut(this.w),a=s.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${t}'] .apexcharts-yaxis-texts-g`),r=a?a.getBoundingClientRect():{width:0,height:0},o=s.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=i.rotateAroundCenter(o);o.setAttribute("transform",`rotate(${e?-1*s.config.yaxis[t].title.rotate:s.config.yaxis[t].title.rotate} ${l.x} ${l.y})`)}}xPaddingForYAxisTitle(t,e,s,i){const a=this.w;let r=0,o=10;return void 0===a.config.yaxis[t].title.text||t<0?{xPos:r,padd:0}:(i?r=e.width+a.config.yaxis[t].title.offsetX+s.width/2+o/2:(r=-1*e.width+a.config.yaxis[t].title.offsetX+o/2+s.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 s=this.w;let i=0,a=0,r=18,o=1;s.config.yaxis.length>1&&(this.multipleYs=!0),s.config.yaxis.forEach((n,l)=>{const c=s.globals.ignoreYAxisIndexes.includes(l)||!n.show||n.floating||0===t[l].width,h=t[l].width+e[l].width;n.opposite?s.globals.isBarHorizontal?(a=s.layout.gridWidth+s.layout.translateX-1,s.globals.translateYAxisX[l]=a-n.labels.offsetX):(a=s.layout.gridWidth+s.layout.translateX+o,c||(o+=h+20),s.globals.translateYAxisX[l]=a-n.labels.offsetX+20):(i=s.layout.translateX-r,c||(r+=h+20),s.globals.translateYAxisX[l]=i+n.labels.offsetX)})}setYAxisTextAlignments(){const t=this.w;Array.from(t.dom.baseEl.getElementsByClassName("apexcharts-yaxis")).forEach((e,s)=>{const i=t.config.yaxis[s];if(i&&!i.floating&&void 0!==i.labels.align){const e=t.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${s}'] .apexcharts-yaxis-texts-g`),a=Array.from(t.dom.baseEl.querySelectorAll(`.apexcharts-yaxis[rel='${s}'] .apexcharts-yaxis-label`)),r=e.getBoundingClientRect();a.forEach(t=>{t.setAttribute("text-anchor",i.labels.align)}),"left"!==i.labels.align||i.opposite?"center"===i.labels.align?e.setAttribute("transform",`translate(${r.width/2*(i.opposite?1:-1)}, 0)`):"right"===i.labels.align&&i.opposite&&e.setAttribute("transform",`translate(${r.width}, 0)`):e.setAttribute("transform",`translate(-${r.width}, 0)`)}})}}class Ft{constructor(t,e){this.w=t,this.ctx=e,this.documentEvent=this.documentEvent.bind(this)}addEventListener(t,e){const s=this.w;Object.prototype.hasOwnProperty.call(s.globals.events,t)?s.globals.events[t].push(e):s.globals.events[t]=[e]}removeEventListener(t,e){const s=this.w;if(!Object.prototype.hasOwnProperty.call(s.globals.events,t))return;const i=s.globals.events[t].indexOf(e);-1!==i&&s.globals.events[t].splice(i,1)}fireEvent(t,e){const s=this.w;if(!Object.prototype.hasOwnProperty.call(s.globals.events,t))return;e&&e.length||(e=[]);const i=s.globals.events[t],a=i.length;for(let t=0;t<a;t++)i[t].apply(null,e)}setupEventHandlers(){const t=this.w,e=this.ctx,s=t.dom.baseEl.querySelector(t.globals.chartClass);this.ctx.eventList.forEach(i=>{null==s||s.addEventListener(i,s=>{const i=null===s.target.getAttribute("i")&&-1!==t.interact.capturedSeriesIndex?t.interact.capturedSeriesIndex:s.target.getAttribute("i"),a=null===s.target.getAttribute("j")&&-1!==t.interact.capturedDataPointIndex?t.interact.capturedDataPointIndex:s.target.getAttribute("j"),r=Object.assign({},t,{seriesIndex:t.globals.axisCharts?i:0,dataPointIndex:a});"keydown"===s.type?t.config.chart.accessibility.enabled&&t.config.chart.accessibility.keyboard.enabled&&(e.ctx.keyboardNavigation&&e.ctx.keyboardNavigation.handleKey(s),"function"==typeof t.config.chart.events.keyDown&&t.config.chart.events.keyDown(s,e,r),e.ctx.events.fireEvent("keydown",[s,e,r])):"keyup"===s.type?t.config.chart.accessibility.enabled&&t.config.chart.accessibility.keyboard.enabled&&("function"==typeof t.config.chart.events.keyUp&&t.config.chart.events.keyUp(s,e,r),e.ctx.events.fireEvent("keyup",[s,e,r])):"mousemove"===s.type||"touchmove"===s.type?"function"==typeof t.config.chart.events.mouseMove&&t.config.chart.events.mouseMove(s,e,r):"mouseleave"===s.type||"touchleave"===s.type?"function"==typeof t.config.chart.events.mouseLeave&&t.config.chart.events.mouseLeave(s,e,r):("mouseup"===s.type&&1===s.which||"touchend"===s.type)&&("function"==typeof t.config.chart.events.click&&t.config.chart.events.click(s,e,r),e.ctx.events.fireEvent("click",[s,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,s=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"!==s&&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 _t{constructor(t){this.w=t}setCurrentLocaleValues(t){let e=this.w.config.chart.locales;const s=h.getApex();s.chart&&s.chart.locales&&s.chart.locales.length>0&&(e=this.w.config.chart.locales.concat(s.chart.locales));const i=e.filter(e=>e.name===t)[0];if(!i)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");{const t=b.extend(S,i);this.w.globals.locale=t.options}}}class Et{constructor(t,e){this.w=t,this.ctx=e}drawAxis(t,e){const s=this.w.globals,i=this.w.config,a=new St(this.w,this.ctx,e),r=new Lt(this.w,{theme:this.ctx.theme,timeScale:this.ctx.timeScale},e);if(s.axisCharts&&"radar"!==t){let t,e;s.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),i.yaxis.map((t,i)=>{if(-1===s.ignoreYAxisIndexes.indexOf(i)&&(e=r.drawYaxis(i),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))}}))}}}class Pt{constructor(t){this.w=t}drawXCrosshairs(){const t=this.w;t.dom.elGraphical.node.querySelectorAll(":scope > .apexcharts-xcrosshairs").forEach(t=>t.remove());const e=new ut(this.w),s=new gt(this.w),i=t.config.xaxis.crosshairs.fill.gradient,a=t.config.xaxis.crosshairs.dropShadow,r=t.config.xaxis.crosshairs.fill.type,o=i.colorFrom,n=i.colorTo,l=i.opacityFrom,c=i.opacityTo,h=i.stops,d=a.enabled,p=a.left,g=a.top,u=a.blur,x=a.color,f=a.opacity;let m=t.config.xaxis.crosshairs.fill.color;if(t.config.xaxis.crosshairs.show){"gradient"===r&&(m=e.drawGradient("vertical",o,n,l,c,null,h,[]));let i=1===t.config.xaxis.crosshairs.width?e.drawLine(0,0,0,0):e.drawRect(),a=t.layout.gridHeight;(!b.isNumber(a)||a<0)&&(a=0);let y=t.config.xaxis.crosshairs.width;(!b.isNumber(y)||Number(y)<0)&&(y=0),i.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:a,width:y,height:a,fill:m,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}),d&&(i=s.dropShadow(i,{left:p,top:g,blur:u,color:x,opacity:f})),t.dom.elGraphical.add(i)}}drawYCrosshairs(){const t=this.w;t.dom.elGraphical.node.querySelectorAll(":scope > .apexcharts-ycrosshairs, :scope > .apexcharts-ycrosshairs-hidden").forEach(t=>t.remove());const e=new ut(this.w),s=t.config.yaxis[0].crosshairs,i=t.globals.barPadForNumericAxis;if(t.config.yaxis[0].crosshairs.show){const a=e.drawLine(-i,0,t.layout.gridWidth+i,0,s.stroke.color,s.stroke.dashArray,s.stroke.width);a.attr({class:"apexcharts-ycrosshairs"}),t.dom.elGraphical.add(a)}const a=e.drawLine(-i,0,t.layout.gridWidth+i,0,s.stroke.color,0,0);a.attr({class:"apexcharts-ycrosshairs-hidden"}),t.dom.elGraphical.add(a)}}function Bt(t,e){if(!b.isObject(t)||!b.isObject(e))return void 0!==e?e:t;const s=n({},t);for(const i of Object.keys(e)){const a=e[i];void 0!==a&&(b.isObject(a)&&b.isObject(t[i])?s[i]=Bt(t[i],a):s[i]=a)}return s}class Nt{constructor(t){this.w=t,this._activeBreakpoint=null}checkResponsiveConfig(t){const e=this.w,s=e.config;if(0===s.responsive.length)return;const i=s.responsive.slice();i.sort((t,e)=>t.breakpoint>e.breakpoint?1:e.breakpoint>t.breakpoint?-1:0).reverse();const a=new M({}),r=(t={})=>{var s;const r=i[0].breakpoint,o=h.isBrowser()?window.innerWidth>0?window.innerWidth:screen.width:0;if(o>r){if(null!==this._activeBreakpoint){if(!e.globals.initialConfig)return;const s=b.clone(e.globals.initialConfig);s.series=b.clone(e.config.series);const i=E.extendArrayProps(a,s,e);t=b.extend(i,t),this.overrideResponsiveOptions(t),this._activeBreakpoint=null}}else for(let r=0;r<i.length;r++)if(o<i[r].breakpoint){const o=(null==(s=i[r].options)?void 0:s.yaxis)?b.clone(i[r].options.yaxis):null;if(t=E.extendArrayProps(a,i[r].options,e),t=b.extend(e.config,t),Array.isArray(e.config.yaxis)&&o){const s=Array.isArray(o)?o:[o];t=l(n({},t),{yaxis:e.config.yaxis.map((t,e)=>Bt(t,s[e]))})}this.overrideResponsiveOptions(t),this._activeBreakpoint=i[r].breakpoint}};if(t){let s=E.extendArrayProps(a,t,e);s=b.extend(e.config,s),s=b.extend(s,t),r(s)}else r({})}overrideResponsiveOptions(t){const e=new M(t).init({responsiveOverride:!0});this.w.config=e}}function Xt(t){var e;const s=t.config.chart.animations;if(!s||!1===s.enabled)return!1;if(!s.dynamicAnimation||!1===s.dynamicAnimation.enabled)return!1;const i=null!=(e=s.largeDatasetThreshold)?e:0;return!(i>0&&t.globals.dataPoints>i)&&!!(h.isBrowser()&&t.globals.dataChanged&&t.globals.shouldAnimate)}function It(t){const e=new Map;return t.map(t=>{const s=e.get(t)||0;return e.set(t,s+1),0===s?t:`${t}#${s}`})}function Rt(t,e,s=!1){var i,a;if(!Xt(t))return null;const r=t.globals.prevStreamFrame;if(!r)return null;const o=null==(i=r.seriesY)?void 0:i[e],n=null==(a=t.seriesData.series)?void 0:a[e];if(!Array.isArray(o)||!Array.isArray(n))return null;if(!o.length||!n.length)return null;const l=It(o.map((t,s)=>function(t,e,s){var i,a;if(t.isXNumeric){const a=null==(i=t.seriesX)?void 0:i[e];if(a&&a.length&&null!=a[s])return"x:"+a[s]}const r=null==(a=t.labels)?void 0:a[s];return null!=r&&""!==String(r)?"c:"+(Array.isArray(r)?r.join(" "):String(r)):"j:"+s}(r,e,s))),c=It(n.map((s,i)=>function(t,e,s){var i,a,r,o;if(null==(i=t.axisFlags)?void 0:i.isXNumeric){const i=null==(r=null==(a=t.seriesData)?void 0:a.seriesX)?void 0:r[e];if(i&&i.length&&null!=i[s])return"x:"+i[s]}const n=null==(o=t.globals.labels)?void 0:o[s];return null!=n&&""!==String(n)?"c:"+(Array.isArray(n)?n.join(" "):String(n)):"j:"+s}(t,e,i))),h=function(t,e){const s=new Map;t.forEach((t,e)=>{s.has(t)||s.set(t,e)});const i=new Array(e.length),a=new Set;let r=-1,o=!0,n=t.length===e.length;e.forEach((t,e)=>{const l=s.has(t)&&!a.has(s.get(t))?s.get(t):-1;i[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:i,exits:l,ordered:o,changed:!n}}(l,c);return h.ordered&&(h.changed||s)?{join:h,oldKeys:l,newKeys:c}:null}function zt(t,e,s,i,a){const r=performance.now(),o=n=>{if(t.globals.isDestroyed)return;const l=Math.max(0,Math.min(1,(n-r)/e));i(s(l),l),l<1?m.requestAnimationFrame(o):a&&a()};m.requestAnimationFrame(o)}function Yt(t,e,s){return[...t.querySelectorAll(e)].map(t=>{var e,i,a;return{text:t.textContent||"",display:null!=(a=null!=(i=null==(e=t.querySelector("tspan"))?void 0:e.textContent)?i:t.textContent)?a:"",pos:parseFloat(t.getAttribute(s)||""),transform:t.getAttribute("transform")}})}function Ht(t,e,s){return[...t.querySelectorAll(e)].map(t=>parseFloat(t.getAttribute(s)||""))}const Ot=":not(.apexcharts-tick-ghost)",Wt=`.apexcharts-xaxis-texts-g text:not(.apexcharts-xaxis-group-label)${Ot}`,Gt=`.apexcharts-yaxis-texts-g text${Ot}`,Ut=`.apexcharts-gridlines-vertical line${Ot}`,$t=`.apexcharts-gridlines-horizontal line${Ot}`;function Vt(t){var e,s;const i=t.globals;if(!(null==(e=t.axisFlags)?void 0:e.isXNumeric)||i.isBarHorizontal)return null;if(null==(s=t.config.xaxis)?void 0:s.reversed)return null;const a=i.minX,r=i.maxX,o=t.layout.gridWidth;return isFinite(a)&&isFinite(r)&&r>a&&o>0?{min:a,max:r,width:o}:null}function jt(t,e){var s;const i=t.globals;if(i.isBarHorizontal)return null;if(!Array.isArray(t.config.yaxis)||1!==t.config.yaxis.length)return null;if(null==(s=t.config.yaxis[0])?void 0:s.logarithmic)return null;const a=i.minY,r=i.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 qt(t,e){if(!t||!e)return null;const s=t.pHi-t.pLo,i=e.pHi-e.pLo,a=t.max-t.min,r=e.max-e.min;if(!(s&&i&&a>0&&r>0))return null;return{toNew:o=>e.pLo+((e=>t.min+(e-t.pLo)/s*a)(o)-e.min)/r*i,toOld:o=>t.pLo+((t=>e.min+(t-e.pLo)/i*r)(o)-t.min)/a*s}}function Zt(t,e,s,i){const a=e.style;a.opacity="0",zt(t,s,i,t=>{a.opacity=String(t)},()=>{a.opacity=""})}function Kt(t,e,s,i,a,r,o){s.forEach(t=>e.setAttribute(t,String(i))),zt(t,r,o,t=>{const r=String(i+(a-i)*t);s.forEach(t=>e.setAttribute(t,r))},()=>{s.forEach(t=>e.setAttribute(t,String(a)))})}function Jt(t,{template:e,display:s,attrs:i,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"),void 0!==s){const t=c.querySelector("tspan");t?t.textContent=s:c.textContent=s;const e=c.querySelector("title");e&&(e.textContent=s)}i.forEach(t=>c.setAttribute(t,String(a)));const h=c.style;h.opacity="1",l.appendChild(c),zt(t,o,n,t=>{const e=String(a+(r-a)*t);i.forEach(t=>c.setAttribute(t,e)),h.opacity=String(1-t)},()=>{c.parentNode&&c.parentNode.removeChild(c)})}function Qt(t,{newLabels:e,oldLabels:s,posAttr:i,newLines:a,oldLines:r,lineAttrs:o,duration:c,ease:h,project:d}){const p=new Map;s.forEach((t,e)=>{p.has(t.text)||p.set(t.text,l(n({},t),{i:e}))});const g=new Set,u=a.length===e.length,x=r.length===s.length,f=s.map(t=>t.pos).concat(e.map(t=>parseFloat(t.getAttribute(i)||""))).filter(t=>isFinite(t)),m=Math.min(...f),b=Math.max(...f),y=Math.max(40,.25*(b-m)),w=t=>Math.max(m-y,Math.min(b+y,t));if(e.forEach((e,s)=>{const n=parseFloat(e.getAttribute(i)||""),l=p.get(e.textContent||""),x=u?a[s]:null;if(l&&g.add(l.i),l&&isFinite(l.pos)&&!l.transform&&!e.getAttribute("transform")){if(isFinite(n)&&!(Math.abs(l.pos-n)<.5)&&(Kt(t,e,[i],l.pos,n,c,h),x)){const e=parseFloat(x.getAttribute(o[0])||""),s=r[l.i];isFinite(e)&&isFinite(s)&&Kt(t,x,o,s,e,c,h)}}else if(!l){if(d&&isFinite(n)&&!e.getAttribute("transform")){const s=isFinite(d.toOld(n))?w(d.toOld(n)):NaN;isFinite(s)&&Math.abs(s-n)>.5&&(Kt(t,e,[i],s,n,c,h),x&&Kt(t,x,o,s,n,c,h))}Zt(t,e,c,h),x&&Zt(t,x,c,h)}}),!d||!e.length)return;let v=0;s.forEach((s,n)=>{if(g.has(n))return;if(!isFinite(s.pos)||s.transform)return;if(v>=20)return;const l=d.toNew(s.pos);!isFinite(l)||Math.abs(l-s.pos)<.5||(v++,Jt(t,{template:e[0],display:s.display,attrs:[i],from:s.pos,to:w(l),duration:c,ease:h}),x&&a.length&&isFinite(r[n])&&Jt(t,{template:a[0],attrs:o,from:r[n],to:w(d.toNew(r[n])),duration:c,ease:h}))})}function te(t){const e=t.globals,s=e.prevChromeFrame;if(e.prevChromeFrame=null,!s||!e.axisCharts||!h.isBrowser())return;if(!Xt(t))return;if(!(t.seriesData.series||[]).some((e,s)=>null!==Rt(t,s,!0)))return;const i=t.dom.baseEl;if(!b.elementExists(i))return;const a=Math.max(1,t.config.chart.animations.dynamicAnimation.speed||1),r=function(t){var e,s;const i=t.config.chart.animations;return at(null!=(s=null==(e=i.dynamicAnimation)?void 0:e.easing)?s:i.easing)}(t);try{const e=[...i.querySelectorAll(Gt)],o=function(t,e){if(!t||!e)return null;const s=t.max-t.min,i=e.max-e.min;return s>0&&i>0&&t.width>0&&e.width>0?{toNew:a=>(t.min+a/t.width*s-e.min)/i*e.width,toOld:a=>(e.min+a/e.width*i-t.min)/s*t.width}:null}(s.xScale,Vt(t)),n=qt(s.yAnchors,jt(t,e.map(t=>({pos:parseFloat(t.getAttribute("y")||"")}))));Qt(t,{newLabels:[...i.querySelectorAll(Wt)],oldLabels:s.xLabels,posAttr:"x",newLines:[...i.querySelectorAll(Ut)],oldLines:s.vGrid,lineAttrs:["x1","x2"],duration:a,ease:r,project:o}),Qt(t,{newLabels:e,oldLabels:s.yLabels,posAttr:"y",newLines:[...i.querySelectorAll($t)],oldLines:s.hGrid,lineAttrs:["y1","y2"],duration:a,ease:r,project:n})}catch(t){}}class ee{constructor(t,{toggleDataSeries:e,revertDefaultAxisMinMax:s,updateSeries:i}={}){this.w=t,this._toggleDataSeries=e||null,this._revertDefaultAxisMinMax=s||null,this._updateSeries=i||null,this.legendInactiveClass="legend-mouseover-inactive"}clearSeriesCache(){const t=this.w;t.globals.cachedSelectors&&(delete t.globals.cachedSelectors.allSeriesEls,delete t.globals.cachedSelectors.highlightSeriesEls)}getAllSeriesEls(){const t=this.w,e="allSeriesEls";return t.globals.cachedSelectors[e]||(t.globals.cachedSelectors[e]=t.dom.baseEl.getElementsByClassName("apexcharts-series")),t.globals.cachedSelectors[e]}getSeriesByName(t){return this.w.dom.baseEl.querySelector(`.apexcharts-inner .apexcharts-series[seriesName='${b.escapeString(t)}']`)}isSeriesHidden(t){var e;const s=this.getSeriesByName(t),i=parseInt(null!=(e=s.getAttribute("data:realIndex"))?e:"0",10);return{isHidden:s.classList.contains("apexcharts-series-collapsed"),realIndex:i}}addCollapsedClassToSeries(t,e){ee.addCollapsedClassToSeries(this.w,t,e)}static addCollapsedClassToSeries(t,e,s){function i(t){for(let i=0;i<t.length;i++)t[i].index===s&&e.node.classList.add("apexcharts-series-collapsed")}i(t.globals.collapsedSeries),i(t.globals.ancillaryCollapsedSeries)}toggleSeries(t){var e;const s=this.isSeriesHidden(t);return null==(e=this._toggleDataSeries)||e.call(this,s.realIndex,s.isHidden),s.isHidden}showSeries(t){var e;const s=this.isSeriesHidden(t);s.isHidden&&(null==(e=this._toggleDataSeries)||e.call(this,s.realIndex,!0))}hideSeries(t){var e;const s=this.isSeriesHidden(t);s.isHidden||null==(e=this._toggleDataSeries)||e.call(this,s.realIndex,!1)}prepareDataUpdate(){const t=this.w;this.clearSeriesCache(),t.globals.previousPaths=[],t.globals.collapsedSeries=[],t.globals.ancillaryCollapsedSeries=[],t.globals.collapsedSeriesIndices=[],t.globals.ancillaryCollapsedSeriesIndices=[]}resetSeries(t=!0,e=!0,s=!0){var i,a;const r=this.w;this.clearSeriesCache();let o=b.clone(r.globals.initialSeries);r.globals.previousPaths=[],s?(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==(i=this._revertDefaultAxisMinMax)||i.call(this)),null==(a=this._updateSeries)||a.call(this,o,r.config.chart.animations.dynamicAnimation.enabled))}emptyCollapsedSeries(t){const e=this.w;for(let s=0;s<t.length;s++)e.globals.collapsedSeriesIndices.indexOf(s)>-1&&(t[s].data=[]);return t}canvasRestyle(t){const e=this.w.globals.activeRenderer;e&&"canvas"===e.kind&&"function"==typeof e.restyle&&e.restyle(t)}highlightSeries(t){var e;const s=this.w,i=this.getSeriesByName(t),a=parseInt(null!=(e=null==i?void 0:i.getAttribute("data:realIndex"))?e:"",10),r="highlightSeriesEls";let o=s.globals.cachedSelectors[r];o||(o=s.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis"),s.globals.cachedSelectors[r]=o);let n=null,l=null,c=null;if(s.globals.axisCharts||"radialBar"===s.config.chart.type)if(s.globals.axisCharts){n=s.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${a}']`),l=s.dom.baseEl.querySelector(`.apexcharts-datalabels[data\\:realIndex='${a}']`);const t=s.globals.seriesYAxisReverseMap[a];c=s.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${t}']`)}else n=s.dom.baseEl.querySelector(`.apexcharts-series[rel='${a+1}']`);else n=s.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(!s.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 s=this.w;e||(e=t.target);const i=s.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis");if("mousemove"===t.type){const t=parseInt(e.getAttribute("rel"),10)-1;this.highlightSeries(s.seriesData.seriesNames[t])}else if("mouseout"===t.type){for(let t=0;t<i.length;t++)i[t].classList.remove(this.legendInactiveClass);this.canvasRestyle(null)}}highlightRangeInSeries(t,e){const s=this.w,i=s.dom.baseEl.getElementsByClassName("apexcharts-heatmap-rect"),a=t=>{for(let e=0;e<i.length;e++){const s=i[e].classList;"function"==typeof s[t]&&s[t](this.legendInactiveClass)}};if("reset"===e)return void a("remove");const r=s.config.plotOptions.heatmap.colorScale.ranges,o=r&&r[t];if(o){a("add");for(let t=0;t<i.length;t++){const e=Number(i[t].getAttribute("val"));e>=o.from&&e<=o.to&&i[t].classList.remove(this.legendInactiveClass)}}}getActiveConfigSeriesIndex(t="asc",e=[]){const s=this.w;let i=0;if(s.config.series.length>1){const a=s.config.series.map((t,i)=>t.data&&t.data.length>0&&-1===s.globals.collapsedSeriesIndices.indexOf(i)&&(!s.globals.comboCharts||0===e.length||e.length&&e.indexOf(s.config.series[i].type)>-1)?i:-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]){i=a[e];break}}return i}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(){var t,e,s,i;const a=this.w;if(function(t){var e,s,i;const a=t.globals;if(!a.axisCharts||!t.seriesData||!Array.isArray(t.seriesData.series)||0===t.seriesData.series.length)return void(a.prevStreamFrame=null);const r=[];(null==(s=null==(e=t.dom)?void 0:e.baseEl)?void 0:s.querySelectorAll)&&t.dom.baseEl.querySelectorAll(".apexcharts-marker").forEach(t=>{var e,s,i,a,o;const n=parseInt(null!=(e=t.getAttribute("index"))?e:"",10),l=parseInt(null!=(i=null!=(s=t.getAttribute("j"))?s:t.getAttribute("rel"))?i:"",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==(i=t.axisFlags)?void 0:i.isXNumeric)}}(a),function(t){const e=t.globals;if(e.prevChromeFrame=null,!e.axisCharts||!h.isBrowser())return;const s=t.dom.baseEl;if(b.elementExists(s))try{const i=Yt(s,Gt,"y");e.prevChromeFrame={xLabels:Yt(s,Wt,"x"),yLabels:i,vGrid:Ht(s,Ut,"x1"),hGrid:Ht(s,$t,"y1"),xScale:Vt(t),yAnchors:jt(t,i)}}catch(t){e.prevChromeFrame=null}}(a),!a.globals.axisCharts)return void(a.globals.previousPaths=a.seriesData.series);if(!b.elementExists(a.dom.baseEl))return void(a.globals.previousPaths=[]);function r(t,e,s){const i=t[e].childNodes,r={type:s,paths:[],realIndex:t[e].getAttribute("data:realIndex")};for(let t=0;t<i.length;t++)if(i[t].hasAttribute("pathTo")){const e=i[t].getAttribute("pathTo");r.paths.push({d:e,key:i[t].getAttribute("data:pathKey"),fill:i[t].getAttribute("fill")})}a.globals.previousPaths.push(r)}a.globals.previousPaths=[];["line","area","bar","rangebar","rangeArea","candlestick","radar"].forEach(t=>{const e=(s=t,a.dom.baseEl.querySelectorAll(`.apexcharts-${s}-series .apexcharts-series`));var s;for(let s=0;s<e.length;s++)r(e,s,t)});const o=a.dom.baseEl.querySelectorAll(`.apexcharts-${a.config.chart.type} .apexcharts-series`);if(o.length>0)for(let r=0;r<o.length;r++){const o=a.dom.baseEl.querySelectorAll(`.apexcharts-${a.config.chart.type} .apexcharts-series[data\\:realIndex='${r}'] rect`),n=[];for(let a=0;a<o.length;a++){const r=t=>o[a].getAttribute(t),l={x:parseFloat(null!=(t=r("x"))?t:"0"),y:parseFloat(null!=(e=r("y"))?e:"0"),width:parseFloat(null!=(s=r("width"))?s:"0"),height:parseFloat(null!=(i=r("height"))?i:"0")};n.push({rect:l,color:o[a].getAttribute("color")})}a.globals.previousPaths.push(n)}}clearPreviousPaths(){const t=this.w;t.globals.previousPaths=[],t.globals.allSeriesCollapsed=!1}handleNoData(){const t=this.w,e=t.config.noData,s=new ut(this.w);let i=t.globals.svgWidth/2,a=t.globals.svgHeight/2,r="middle";if(t.globals.noData=!0,t.globals.animationEnded=!0,"left"===e.align?(i=10,r="start"):"right"===e.align&&(i=t.globals.svgWidth-10,r="end"),"top"===e.verticalAlign?a=50:"bottom"===e.verticalAlign&&(a=t.globals.svgHeight-50),i+=e.offsetX,a=a+parseInt(e.style.fontSize,10)+2+e.offsetY,void 0!==e.text&&""!==e.text){const o=s.drawText({x:i,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 s=0;s<t.length;s++)if(0===t[s].length)for(let i=0;i<t[e.globals.maxValsInArrayIndex].length;i++)t[s].push(0);return t}hasAllSeriesEqualX(){let t=!0;const e=this.w,s=this.filteredSeriesX();for(let e=0;e<s.length-1;e++)if(s[e][0]!==s[e+1][0]){t=!1;break}return e.globals.allSeriesHasEqualX=t,t}filteredSeriesX(){return this.w.seriesData.seriesX.map(t=>t.length>0?t:[])}}const se={accent:"--apx-accent",fore:"--apx-fore",grid:"--apx-grid",surface:"--apx-surface"};const ie="__apexcharts_themes__";function ae(){return globalThis[ie]}globalThis[ie]||(globalThis[ie]={});const re="#373d3f",oe="#f6f7f8",ne="#e0e0e0";class le{constructor(t){this.w=t,this.colors=[],this.isColorFn=!1,this.isHeatmapDistributed=this.checkHeatmapDistributed(),this.isBarDistributed=this.checkBarDistributed(),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,s=new b;var i;this._namedTheme=(i=e.config.theme.name)&&ae()[i]||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,s));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(){const t=this.w,e=t.config.theme.mode;"dark"===e?(t.config.chart.foreColor===re&&(t.config.chart.foreColor=oe),"palette1"===t.config.theme.palette&&(t.config.theme.palette="palette4"),t.config.tooltip&&"light"!==t.config.tooltip.theme&&(t.config.tooltip.theme="dark")):"light"===e&&(t.config.chart.foreColor===oe&&(t.config.chart.foreColor=re),"palette4"===t.config.theme.palette&&(t.config.theme.palette="palette1"))}_applyNamedThemeMode(){const t=this._namedTheme;if(!t)return;const e=this.w.config.theme;t.mode&&!e.mode&&(e.mode=t.mode),!t.accessibility||!t.accessibility.colorBlindMode||e.accessibility&&e.accessibility.colorBlindMode||(e.accessibility=e.accessibility||{},e.accessibility.colorBlindMode=t.accessibility.colorBlindMode),t.monochrome&&t.monochrome.enabled&&!e.monochrome.enabled&&(e.monochrome=n(n({},e.monochrome),t.monochrome))}_resolveTokens(){const t=this._namedTheme&&this._namedTheme.tokens||{},e=this._shouldUseTokens()?function(t){if(!h.isBrowser())return{};const e=t.dom&&(t.dom.elWrap||t.dom.baseEl)||null;if(!e)return{};const s=m.getComputedStyle(e);if(!s||"function"!=typeof s.getPropertyValue)return{};const i=t=>{const e=s.getPropertyValue(t);return e?String(e).trim():""},a={};for(const t in se){const e=i(se[t]);e&&(a[t]=e)}const r=[];for(let t=1;t<=24;t++){const e=i(`--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;if(!t.fore||e.config.chart.foreColor!==re&&e.config.chart.foreColor!==oe||(e.config.chart.foreColor=t.fore),t.grid){e.config.grid.borderColor===ne&&(e.config.grid.borderColor=t.grid);const s=e=>{e&&(e.axisBorder&&e.axisBorder.color===ne&&(e.axisBorder.color=t.grid),e.axisTicks&&e.axisTicks.color===ne&&(e.axisTicks.color=t.grid))};s(e.config.xaxis),Array.isArray(e.config.yaxis)?e.config.yaxis.forEach(s):s(e.config.yaxis)}if(t.surface&&!e.config.chart.background){e.config.chart.background=t.surface;const s=e.dom.Paper&&e.dom.Paper.node;s&&s.style&&(s.style.background=t.surface)}}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((s,i)=>{const a=t[i]||t[0];return"function"==typeof a?a({value:e.globals.axisCharts?e.seriesData.series[i][0]||0:e.seriesData.series[i],seriesIndex:i,dataPointIndex:i,w:this.w}):a})):t:this.predefined()}applySeriesColors(t,e){t.forEach((t,s)=>{t&&(e[s]=t)})}getMonochromeColors(t,e,s){const{color:i,shadeIntensity:a,shadeTo:r}=t,o=this.isBarDistributed||this.isHeatmapDistributed?e[0].length*e.length:e.length,n=1/(o/a);let l=0;return Array.from({length:o},()=>{const t="dark"===r?s.shadeColor(-1*l,i):s.shadeColor(l,i);return l+=n,t})}applyColorTypes(t,e){const s=this.w;t.forEach(t=>{s.globals[t].colors=void 0===s.config[t].colors?this.isColorFn?s.config.colors:e:s.config[t].colors.slice(),this.pushExtraColors(s.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,s=null){const i=this.w;let a=e||i.seriesData.series.length;if(null===s&&(s=this.isBarDistributed||this.isHeatmapDistributed||"heatmap"===i.config.chart.type&&i.config.plotOptions.heatmap&&i.config.plotOptions.heatmap.colorScale.inverse),s&&i.seriesData.series.length&&(a=i.seriesData.series[i.globals.maxValsInArrayIndex].length*i.seriesData.series.length),t.length<a){const e=a-t.length;for(let s=0;s<e;s++)t.push(t[s])}}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){t.chart=t.chart||{},t.tooltip=t.tooltip||{};const e=t.theme.mode,s="dark"===e?"palette4":"light"===e?"palette1":t.theme.palette||"palette1",i="dark"===e?"#f6f7f8":"light"===e?"#373d3f":t.chart.foreColor||"#373d3f";return t.tooltip.theme=e||"light",t.chart.foreColor=i,t.theme.palette=s,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,s=this._tokens||{};if(Array.isArray(s.series)&&s.series.length)return s.series.slice();if(s.accent)return[s.accent,...e];const i=this._namedTheme;return i&&Array.isArray(i.palette)&&i.palette.length?i.palette.slice():e}}class ce{constructor(t){this.w=t}draw(){this.drawTitleSubtitle("title"),this.drawTitleSubtitle("subtitle")}drawTitleSubtitle(t){const e=this.w,s="title"===t?e.config.title:e.config.subtitle;let i=e.globals.svgWidth/2,a=s.offsetY,r="middle";if("left"===s.align?(i=10,r="start"):"right"===s.align&&(i=e.globals.svgWidth-10,r="end"),i+=s.offsetX,a=a+parseInt(s.style.fontSize,10)+s.margin/2,void 0!==s.text){const o=new ut(this.w).drawText({x:i,y:a,text:s.text,textAnchor:r,fontSize:s.style.fontSize,fontFamily:s.style.fontFamily,fontWeight:s.style.fontWeight,foreColor:s.style.color,opacity:1});o.node.setAttribute("class",`apexcharts-${t}-text`),e.dom.Paper.add(o)}}}class he{constructor(t){this.w=t.w,this.dCtx=t}getTitleSubtitleCoords(t){const e=this.w;let s=0,i=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();s=t.width,i=e.globals.axisCharts?t.height+5:t.height}return{width:s,height:i}}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 s=Object.assign({},b.getBoundingClientRect(e));return null!==e&&!t.config.legend.floating&&t.config.legend.show?this.dCtx.lgRect={x:s.x,y:s.y,height:s.height,width:0===s.height?0:s.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((s,i)=>{s.data.forEach((s,a)=>{const r=(o=t.seriesData.series[i][a],t.config.dataLabels.formatter(o,{seriesIndex:i,dataPointIndex:a,w:t}));var o;e.push(r)})});const s=b.getLargestStringFromArr(e),i=new ut(this.w),a=t.config.dataLabels.style,r=i.getTextRects(s,parseInt(a.fontSize).toString(),a.fontFamily);return{width:1.05*r.width,height:r.height}}getLargestStringFromMultiArr(t,e){let s=t;if(this.w.axisFlags.isMultiLineX){const t=e.map(t=>Array.isArray(t)?t.length:1),i=Math.max(...t);s=e[t.indexOf(i)]}return s}}class de{constructor(t){this.w=t.w,this.dCtx=t}getxAxisLabelsCoords(){const t=this.w;let e,s=t.labelData.labels.slice();if(t.config.xaxis.convertedCatToNumeric&&0===s.length&&(s=t.labelData.categoryLabels),t.labelData.timescaleLabels.length>0){const s=this.getxAxisTimeScaleLabelsCoords();e={width:s.width,height:s.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 i=t.formatters.xLabelFormatter;let a=b.getLargestStringFromArr(s),r=this.dCtx.dimHelpers.getLargestStringFromMultiArr(a,s);t.globals.isBarHorizontal&&(a=t.globals.yAxisScale[0].result.reduce((t,e)=>t.length>e.length?t:e,0),r=a);const o=new w(this.w),n=a;a=o.xLabelFormat(i,a,n,{i:void 0,dateFormatter:new y(this.w).formatDate,w:t}),r=o.xLabelFormat(i,r,n,{i:void 0,dateFormatter:new y(this.w).formatDate,w:t}),(t.config.xaxis.convertedCatToNumeric&&void 0===a||""===String(a).trim())&&(a="1",r=a);const l=new ut(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*s.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 s=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=s(a),a!==r&&(h=s(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 s=(null==(t=e.config.xaxis.group.style)?void 0:t.fontSize)||e.config.xaxis.labels.style.fontSize,i=e.labelData.groups.map(t=>t.title);let a;const r=b.getLargestStringFromArr(i),o=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,i),n=new ut(this.w),l=n.getTextRects(r,s);let c=l;return r!==o&&(c=n.getTextRects(o,s)),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,s=0;if(void 0!==t.config.xaxis.title.text){const i=new ut(this.w).getTextRects(t.config.xaxis.title.text,t.config.xaxis.title.style.fontSize);e=i.width,s=i.height}return{width:e,height:s}}getxAxisTimeScaleLabelsCoords(){const t=this.w;this.dCtx.timescaleLabels=t.labelData.timescaleLabels.slice();const e=this.dCtx.timescaleLabels.map(t=>t.value),s=e.reduce((t,e)=>void 0===t?0:t.length>e.length?t:e,0),i=new ut(this.w).getTextRects(s,t.config.xaxis.labels.style.fontSize);return 1.05*i.width*e.length>t.layout.gridWidth&&0!==t.config.xaxis.labels.rotate&&(t.globals.overlappingXLabels=!0),i}additionalPaddingXLabels(t){const e=this.w,s=e.globals,i=e.config,a=i.xaxis.type,r=t.width;s.skipLastTimelinelabel=!1,s.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>s.svgWidth-e.layout.translateX-l&&(s.skipLastTimelinelabel=!0),n<-(t.show&&!t.floating||"bar"!==i.chart.type&&"candlestick"!==i.chart.type&&"rangeBar"!==i.chart.type&&"boxPlot"!==i.chart.type&&"violin"!==i.chart.type?10:r/1.75)&&(s.skipFirstTimelinelabel=!0)}else"datetime"===a?this.dCtx.gridPad.right<r&&!e.layout.rotateXLabels&&(s.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)=>{i.yaxis.length>1&&(t=>-1!==s.collapsedSeriesIndices.indexOf(t))(e)||n(t)};i.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 pe{constructor(t){this.w=t.w,this.dCtx=t}getyAxisLabelsCoords(){const t=this.w,e=[];let s=10;const i=new Ct(this.w,{theme:this.dCtx.theme,timeScale:this.dCtx.timeScale});return t.config.yaxis.map((a,r)=>{const o={seriesIndex:r,dataPointIndex:-1,w:t},n=t.globals.yAxisScale[r];let l=0;if(!i.isYAxisHidden(r)&&a.labels.show&&void 0!==a.labels.minWidth&&(l=a.labels.minWidth),!i.isYAxisHidden(r)&&a.labels.show&&n.result.length){const i=t.formatters.yLabelFormatters[r],c=n.niceMin===Number.MIN_VALUE?0:n.niceMin;let h=n.result.reduce((t,e)=>{var s,a;return(null==(s=String(i(t,o)))?void 0:s.length)>(null==(a=String(i(e,o)))?void 0:a.length)?t:e},c);h=i(h,o);let d=h;if(void 0!==h&&0!==h.length||(h=n.niceMax),1===String(h).length&&(h+=".0",d=h),t.globals.isBarHorizontal){s=0;const e=t.labelData.labels.slice();h=b.getLargestStringFromArr(e),h=i(h,{seriesIndex:r,dataPointIndex:-1,w:t}),d=this.dCtx.dimHelpers.getLargestStringFromMultiArr(h,e)}const p=new ut(this.w),g="rotate(".concat(a.labels.rotate," 0 0)"),u=p.getTextRects(h,a.labels.style.fontSize,a.labels.style.fontFamily,g,!1);let x=u;h!==d&&(x=p.getTextRects(d,a.labels.style.fontSize,a.labels.style.fontFamily,g,!1)),e.push({width:(l>x.width||l>u.width?l:x.width>u.width?x.width:u.width)+s,height:x.height>u.height?x.height:u.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 s=new ut(this.w),i="rotate(".concat(t.title.rotate," 0 0)"),a=s.getTextRects(t.title.text,t.title.style.fontSize,t.title.style.fontFamily,i,!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,s=0,i=0;const a=t.globals.yAxisScale.length>1?10:0,r=new Ct(this.w,{theme:this.dCtx.theme,timeScale:this.dCtx.timeScale}),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?i+=c:s+=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=s,this.dCtx.yAxisWidthRight=i,e}}class ge{constructor(t){this.w=t.w,this.dCtx=t}gridPadForColumnsInNumericAxis(t){const{w:e}=this,{config:s,globals:i}=e;if(i.noData||i.collapsedSeries.length+i.ancillaryCollapsedSeries.length===s.series.length)return 0;const a=t=>["bar","rangeBar","candlestick","boxPlot","violin"].includes(t),r=s.chart.type;let o=0,n=a(r)?s.series.length:1;i.comboBarCount>0&&(n=i.comboBarCount),i.collapsedSeries.forEach(t=>{a(t.type)&&(n-=1)}),s.chart.stacked&&(n=1);const l=a(r)||i.comboBarCount>0;let c=Math.abs(i.initialMaxX-i.initialMinX);if(l&&e.axisFlags.isXNumeric&&!i.isBarHorizontal&&n>0&&0!==c){c<=3&&(c=i.dataPoints);const e=c/t;let a=i.minXDiff&&i.minXDiff/e>0?i.minXDiff/e:0;a>t/2&&(a/=2),o=a*parseInt(s.plotOptions.bar.columnWidth,10)/100,o<1&&(o=1),i.barPadForNumericAxis=o}return o}gridPadFortitleSubtitle(){const{w:t}=this,{globals:e}=t;let s=this.dCtx.isSparkline||!e.axisCharts?0:10;["title","subtitle"].forEach(i=>{void 0!==t.config[i].text?s+=t.config[i].margin:s+=this.dCtx.isSparkline||!e.axisCharts?0:5}),!t.config.legend.show||"bottom"!==t.config.legend.position||t.config.legend.floating||e.axisCharts||(s+=10);const i=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),a=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");t.layout.gridHeight-=i.height+a.height+s,t.layout.translateY+=i.height+a.height+s}setGridXPosForDualYAxis(t,e){const{w:s}=this,i=new Ct(this.w,{theme:this.dCtx.theme,timeScale:this.dCtx.timeScale});s.config.yaxis.forEach((a,r)=>{-1!==s.globals.ignoreYAxisIndexes.indexOf(r)||a.floating||i.isYAxisHidden(r)||(a.opposite&&(s.layout.translateX-=e[r].width+t[r].width+parseInt(a.labels.style.fontSize,10)/1.2+12),s.layout.translateX<2&&(s.layout.translateX=2))})}}class ue{constructor(t,e){this.w=t,this.ctx=e,this.theme=e.theme,this.timeScale=e.timeScale,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 he(this),this.dimYAxis=new pe(this),this.dimXAxis=new de(this),this.dimGrid=new ge(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0,this.datalabelsCoords={width:0,height:0},this.xAxisWidth=0,this.timescaleLabels=[]}plotCoords(){const t=this.w,e=t.globals;this.lgRect=this.dimHelpers.getLegendsRect(),this.datalabelsCoords={width:0,height:0};const s=Array.isArray(t.config.stroke.width)?Math.max(...t.config.stroke.width):t.config.stroke.width;this.isSparkline&&((t.config.markers.discrete.length>0||t.config.markers.size>0)&&Object.entries(this.gridPad).forEach(([t,e])=>{this.gridPad[t]=Math.max(e,this.w.globals.markers.largestSize/1.5)}),this.gridPad.top=Math.max(s/2,this.gridPad.top),this.gridPad.bottom=Math.max(s/2,this.gridPad.bottom)),e.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),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}}}setDimensionsForAxisCharts(){const t=this.w,e=t.globals,s=this.dimYAxis.getyAxisLabelsCoords(),i=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:s[a].width,index:a}),t.layout.yTitleCoords.push({width:i[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)/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(i,s);new Lt(this.w,{theme:this.theme,timeScale:this.timeScale}).setYAxisXPosition(s,i)}setDimensionsForNonAxisCharts(){const t=this.w,e=t.globals,s=t.config;let i=0;t.config.legend.show&&!t.config.legend.floating&&(i=20);const a="pie"===s.chart.type||"polarArea"===s.chart.type||"donut"===s.chart.type?"pie":"radialBar",r=s.plotOptions[a].offsetY,o=s.plotOptions[a].offsetX;if(!s.legend.show||s.legend.floating){t.layout.gridHeight=e.svgHeight;const s=t.dom.elWrap.getBoundingClientRect().width;return t.layout.gridWidth=Math.min(s,t.layout.gridHeight),t.layout.translateY=r,void(t.layout.translateX=o+(e.svgWidth-t.layout.gridWidth)/2)}switch(s.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-i,t.layout.gridHeight="auto"!==s.chart.height?e.svgHeight:t.layout.gridWidth,t.layout.translateY=r,t.layout.translateX=o+this.lgRect.width+i;break;case"right":t.layout.gridWidth=e.svgWidth-this.lgRect.width-i-5,t.layout.gridHeight="auto"!==s.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,s){const i=this.w,a=i.labelData.hasXaxisGroups?2:1,r=s.height+t.height+e.height,o=i.axisFlags.isMultiLineX?1.2:D,n=i.layout.rotateXLabels?22:10,l=i.layout.rotateXLabels&&"bottom"===i.config.legend.position?10:0;this.xAxisHeight=r*o+a*n+l,this.xAxisWidth=t.width,this.xAxisHeight-e.height>i.config.xaxis.labels.maxHeight&&(this.xAxisHeight=i.config.xaxis.labels.maxHeight),i.config.xaxis.labels.minHeight&&this.xAxisHeight<i.config.xaxis.labels.minHeight&&(this.xAxisHeight=i.config.xaxis.labels.minHeight),i.config.xaxis.floating&&(this.xAxisHeight=0);let c=0,h=0;i.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 xe=1e3,fe=6e4,me=36e5,be=24*me,ye=7*be,we=30*be,ve=365*be,Ae=10/86400,Ce=[{unit:"second",step:1,approxMs:xe},{unit:"second",step:5,approxMs:5e3},{unit:"second",step:15,approxMs:15e3},{unit:"second",step:30,approxMs:3e4},{unit:"minute",step:1,approxMs:fe},{unit:"minute",step:5,approxMs:3e5},{unit:"minute",step:15,approxMs:9e5},{unit:"minute",step:30,approxMs:18e5},{unit:"hour",step:1,approxMs:me},{unit:"hour",step:3,approxMs:3*me},{unit:"hour",step:6,approxMs:6*me},{unit:"hour",step:12,approxMs:12*me},{unit:"day",step:1,approxMs:be},{unit:"day",step:2,approxMs:2*be},{unit:"week",step:1,approxMs:ye},{unit:"week",step:2,approxMs:2*ye},{unit:"month",step:1,approxMs:we},{unit:"month",step:3,approxMs:7776e6},{unit:"month",step:6,approxMs:15552e6},{unit:"year",step:1,approxMs:ve},{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 Se{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 s=this.w;if(s.globals.allSeriesCollapsed)return s.labelData.labels=[],s.labelData.timescaleLabels=[],this.timeScaleArray=[],[];const i=e-t,a=i/be;s.interact.disableZoomIn=!1,s.interact.disableZoomOut=!1,a<Ae?s.interact.disableZoomIn=!0:a>5e4&&(s.interact.disableZoomOut=!0);const r=Number.isFinite(s.config.xaxis.tickAmount)?s.config.xaxis.tickAmount:10;this.tickInterval=function(t,e){(!Number.isFinite(e)||e<=0)&&(e=10);if(t<=0)return Ce[0];const s=t/e;let i=Ce[0],a=1/0;for(const t of Ce){const e=Math.abs(Math.log(t.approxMs/s));e<a&&(a=e,i=t)}return i}(i,r);const o=this.generateBaseTicks(t,e,this.tickInterval);return this.timeScaleArray=o,o}generateBaseTicks(t,e,s){const i=this.w,a=new y(i),r=this.utc,o=i.layout.gridWidth,n=e-t,l=[];let c=a.ceilToBoundary(t,s.unit,s.step,r),h=0;for(;c<=e&&h<5e3;){const e=a.getDateFields(c,r),i=n>0?(c-t)/n*o:0;l.push({timestamp:c,position:i,unit:s.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,s.unit,s.step,r),h++}return l}recalcDimensionsBasedOnFormat(t){const e=this.w,s=this.formatDates(t),i=this.removeOverlappingTS(s);e.labelData.timescaleLabels=i.slice();const a=new ue(this.w,this.ctx).plotCoords();this.ctx._writeLayoutCoords(a.layout)}formatDates(t){const e=this.w,s=new y(e),i=e.config.xaxis.labels.format,a=e.config.xaxis.labels.datetimeFormatter,r=this.utc,o=(t,e=2)=>String(t).padStart(e,"0"),n=i||this._effectiveFormat(t,a);return t.map(t=>{const e=s.getDate(t.timestamp),i=s.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:i,unit:t.unit,year:t.year,month:t.month}})}_effectiveFormat(t,e){if(0===t.length)return e.day||"dd MMM";const s=this.tickInterval&&this.tickInterval.unit||t[0].unit,i=e["week"===s?"day":s]||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(i),c=/M/.test(i),h=/d/i.test(i);if("month"===s||"week"===s)return o&&!l?i+" yyyy":i;if("day"===s)return o&&!l?i+" yyyy":i;if("hour"===s||"minute"===s||"second"===s){if(n&&!h&&!c){return(o?"dd MMM yyyy":"dd MMM")+" "+i}return i}return i}removeOverlappingTS(t){if(0===t.length)return[];const e=this.w,s=new ut(e);let i,a=!1;t[0].value&&t.every(e=>e.value.length===t[0].value.length)&&(a=!0,i=s.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?i:s.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)}}const ke="__apexcharts_registry__",Me="__apexcharts_custom_types__";function De(){return globalThis[ke]}function Te(){return globalThis[Me]}function Le(t){return Te().has(t)}function Fe(t){Object.assign(De(),t)}function _e(t){const e=De()[t];if(!e)throw new Error(`ApexCharts: chart type "${t}" is not registered. Import it via ApexCharts.use() or use the full apexcharts bundle.`);return e}globalThis[ke]||(globalThis[ke]={}),globalThis[Me]||(globalThis[Me]=new Set);class Ee{constructor(t,e,s){this.w=e,this.ctx=s,this.el=t}setupElements(){const{globals:t,config:e}=this.w,s=e.chart.type,i=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","violin","scatter","bubble"],a=[...i,"radar","heatmap","treemap"],r=!a.includes(s)&&!["pie","donut","polarArea","radialBar"].includes(s)&&Le(s);t.axisCharts=a.includes(s)||r,t.xyCharts=i.includes(s)||r,t.isBarHorizontal=["bar","rangeBar","boxPlot","violin"].includes(s)&&e.plotOptions.bar.horizontal,t.chartClass=`.apexcharts${t.chartID}`,this.w.dom.baseEl=this.el,this.w.dom.elWrap=m.createElementNS("http://www.w3.org/1999/xhtml","div"),ut.setAttrs(this.w.dom.elWrap,{id:t.chartClass.substring(1),class:`apexcharts-canvas ${t.chartClass.substring(1)}`}),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(${e.chart.offsetX}, ${e.chart.offsetY})`}),this.w.dom.Paper.node.style.background="dark"!==e.theme.mode||e.chart.background?"light"!==e.theme.mode||e.chart.background?e.chart.background:"#fff":"#343A3F",this.setSVGDimensions(),this.w.dom.elLegendForeign=m.createElementNS(P,"foreignObject"),ut.setAttrs(this.w.dom.elLegendForeign,{x:0,y:0,width:t.svgWidth,height:t.svgHeight}),this.w.dom.elLegendWrap=m.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),e.chart.accessibility.enabled&&e.chart.accessibility.announcements.enabled){const t=m.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(e.chart.accessibility.enabled){const t=this.getAccessibleChartLabel(),s=e.chart.accessibility.keyboard.enabled&&e.chart.accessibility.keyboard.navigation.enabled?"application":"img";if(this.w.dom.Paper.attr({role:s,"aria-label":t}),e.chart.accessibility.description){const t=m.createElementNS(P,"desc");t.textContent=e.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)}plotChartType(t,e){const{w:s,ctx:i}=this,{config:a,globals:r}=s,o=i.renderer&&"canvas"===i.renderer.kind;o&&i.renderer.beginSeries();const n={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:[]}},l={},c=a.chart.type||"line";let h=null,d=0;this.w.seriesData.series.forEach((e,i)=>{var a,r;const o="column"===(null==(a=t[i])?void 0:a.type)?"bar":(null==(r=t[i])?void 0:r.type)||("column"===c?"bar":c),p=n;p[o]?("rangeArea"===o?(p[o].series.push(this.w.rangeData.seriesRangeStart[i]),p[o].seriesRangeEnd.push(this.w.rangeData.seriesRangeEnd[i])):p[o].series.push(e),p[o].i.push(i),"bar"===o&&(s.globals.columnSeries=n.bar)):["heatmap","treemap","pie","donut","polarArea","radialBar","radar"].includes(o)?h=o:Le(o)&&(l[o]||(l[o]={series:[],i:[]}),l[o].series.push(e),l[o].i.push(i)),c!==o&&"scatter"!==o&&d++}),d>0&&n.bar.series.length>0&&a.plotOptions.bar.horizontal&&(d-=n.bar.series.length,n.bar={series:[],i:[]},s.globals.columnSeries={series:[],i:[]}),r.comboCharts||(r.comboCharts=d>0);const p=n.line.series.length>0||n.area.series.length>0||n.scatter.series.length>0||n.bubble.series.length>0||n.rangeArea.series.length>0||!r.comboCharts&&["line","area","scatter","bubble","rangeArea"].includes(a.chart.type)?new(_e("line"))(i.w,i,e):null,g=n.candlestick.series.length>0||n.boxPlot.series.length>0||!r.comboCharts&&["candlestick","boxPlot"].includes(a.chart.type)?new(_e("candlestick"))(i.w,i,e):null,u=n.violin.series.length>0||!r.comboCharts&&"violin"===a.chart.type?new(_e("violin"))(i.w,i,e):null,x=!r.comboCharts&&["pie","donut","polarArea"].includes(a.chart.type);i.pie=x?new(_e("pie"))(i.w,i):null;const f=n.rangeBar.series.length>0||!r.comboCharts&&"rangeBar"===a.chart.type;i.rangeBar=f?new(_e("rangeBar"))(i.w,i,e):null;let m=[];if(r.comboCharts){const t=new E(this.w);if(n.area.series.length>0&&m.push(...t.drawSeriesByGroup(n.area,r.areaGroups,"area",p)),n.bar.series.length>0)if(a.chart.stacked){const t=new(_e("barStacked"))(i.w,i,e);m.push(t.draw(n.bar.series,n.bar.i))}else i.bar=new(_e("bar"))(i.w,i,e),m.push(i.bar.draw(n.bar.series,n.bar.i));if(n.rangeArea.series.length>0&&m.push(p.draw(n.rangeArea.series,"rangeArea",n.rangeArea.i,n.rangeArea.seriesRangeEnd)),n.line.series.length>0&&m.push(...t.drawSeriesByGroup(n.line,r.lineGroups,"line",p)),n.candlestick.series.length>0&&m.push(g.draw(n.candlestick.series,"candlestick",n.candlestick.i)),n.boxPlot.series.length>0&&m.push(g.draw(n.boxPlot.series,"boxPlot",n.boxPlot.i)),n.violin.series.length>0&&m.push(u.draw(n.violin.series,"violin",n.violin.i)),n.rangeBar.series.length>0&&m.push(i.rangeBar.draw(n.rangeBar.series,n.rangeBar.i)),n.scatter.series.length>0){const t=new(_e("line"))(i.w,i,e,!0);m.push(t.draw(n.scatter.series,"scatter",n.scatter.i))}if(n.bubble.series.length>0){const t=new(_e("line"))(i.w,i,e,!0);m.push(t.draw(n.bubble.series,"bubble",n.bubble.i))}Object.keys(l).forEach(t=>{const s=l[t];if(s.series.length>0){const a=new(_e(t))(i.w,i,e);m.push(a.draw(s.series,t,s.i))}})}else{const t=a.chart.type;switch(t){case"line":m=p.draw(this.w.seriesData.series,"line");break;case"area":m=p.draw(this.w.seriesData.series,"area");break;case"bar":if(a.chart.stacked){const t=new(_e("barStacked"))(i.w,i,e);m=t.draw(this.w.seriesData.series)}else i.bar=new(_e("bar"))(i.w,i,e),m=i.bar.draw(this.w.seriesData.series);break;case"candlestick":m=g.draw(this.w.seriesData.series,"candlestick");break;case"boxPlot":m=g.draw(this.w.seriesData.series,t);break;case"violin":m=u.draw(this.w.seriesData.series,"violin");break;case"rangeBar":m=i.rangeBar.draw(this.w.seriesData.series);break;case"rangeArea":m=p.draw(this.w.rangeData.seriesRangeStart,"rangeArea",void 0,this.w.rangeData.seriesRangeEnd);break;case"heatmap":{const t=new(_e("heatmap"))(i.w,i,e);m=t.draw(this.w.seriesData.series);break}case"treemap":{const t=new(_e("treemap"))(i.w,i);m=t.draw(this.w.seriesData.series);break}case"pie":case"donut":case"polarArea":m=i.pie.draw(this.w.seriesData.series);break;case"radialBar":{const t=new(_e("radialBar"))(i.w,i);m=t.draw(this.w.seriesData.series);break}case"radar":{const t=new(_e("radar"))(i.w,i);m=t.draw(this.w.seriesData.series);break}default:if(Le(t)){const s=new(_e(t))(i.w,i,e);m=s.draw(this.w.seriesData.series,t)}else m=p.draw(this.w.seriesData.series)}}if(o){const t=i.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(m)?m:[m]).forEach(t=>{t&&t.node&&e.appendChild(t.node)}),[]}}const e=i.renderer.present();if(e){const t=new ut(s).group({class:"apexcharts-canvas-series-wrap"});t.add(e);return(Array.isArray(m)?m:[m]).forEach(e=>{e&&t.add(e)}),t}}return m}setSVGDimensions(){var t;const{globals:e,config:s}=this.w;s.chart.width=s.chart.width||"100%",s.chart.height=s.chart.height||"auto";const i=s.chart.width,a=s.chart.height;e.svgWidth=NaN,e.svgHeight=NaN;let r=b.getDimensions(this.el);const o=i.toString().split(/[0-9]+/g).pop();"%"===o?b.isNumber(r[0])&&(0===r[0].width&&(r=b.getDimensions(this.el.parentNode)),e.svgWidth=r[0]*parseInt(i,10)/100):"px"!==o&&""!==o||(e.svgWidth=parseInt(i,10));const n=String(a).toString().split(/[0-9]+/g).pop();if("auto"!==a&&""!==a)if("%"===n){const t=b.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(e.svgWidth=Math.max(e.svgWidth,0),e.svgHeight=Math.max(e.svgHeight,0),ut.setAttrs(this.w.dom.Paper.node,{width:e.svgWidth,height:e.svgHeight}),"%"!==n&&h.isBrowser()){const i=e.axisCharts&&(s.grid.show||s.dataLabels.enabled||s.xaxis.labels.show||s.xaxis.axisBorder.show||s.xaxis.axisTicks.show||s.yaxis.some(t=>t.show&&(t.labels.show||t.axisBorder.show||t.axisTicks.show))),a=s.chart.sparkline.enabled||!i?0:s.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`}shiftGraphPosition(){const{globals:t}=this.w,{translateY:e,translateX:s}=t;ut.setAttrs(this.w.dom.elGraphical.node,{transform:`translate(${s}, ${e})`})}resizeNonAxisCharts(){var t,e,s,i,a,r;const{w:o}=this,n=o.config.chart.height?String(o.config.chart.height):"",l=""!==n&&"auto"!==n,c=n.includes("%");let d=0,p=o.config.chart.sparkline.enabled?1:15;p+=o.config.grid.padding.bottom,["top","bottom"].includes(o.config.legend.position)&&o.config.legend.show&&!o.config.legend.floating&&(d=(null!=(e=null==(t=this.ctx.legend)?void 0:t.legendHelpers.getLegendDimensions().clwh)?e:0)+7);const g=o.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),u=o.globals.pieExternalLabelMarginY||0;let x=u>0?2*o.globals.radialSize+2*u:2.05*o.globals.radialSize;const f=Math.abs(o.config.plotOptions.radialBar.endAngle-o.config.plotOptions.radialBar.startAngle);if(g&&!o.config.chart.sparkline.enabled&&f<360){const t=b.getBoundingClientRect(this.w.dom.Paper.node);let e=1/0,n=-1/0;const l=s=>{var i,a,r,o;if(null==(i=s.classList)?void 0:i.contains("apexcharts-radialbar-hollow"))return;const c=null==(r=null==(a=s.tagName)?void 0:a.toLowerCase)?void 0:r.call(a);if("text"===c||"tspan"===c)return;const h=Array.from(null!=(o=s.children)?o:[]);if(h.length>0)return void h.forEach(t=>l(t));const d=b.getBoundingClientRect(s);if(d.bottom-d.top>0){const s=d.top-t.top,i=d.bottom-t.top;s<e&&(e=s),i>n&&(n=i)}};if(Array.from(null!=(s=g.children)?s:[]).forEach(t=>l(t)),Number.isFinite(e)||(e=0),!Number.isFinite(n)){const e=b.getBoundingClientRect(g);n=e.bottom-t.top}const u=Math.max(p,.2*o.globals.radialSize),f=Math.max(u-e,0);0!==f&&(o.layout.translateY=(null!=(i=o.layout.translateY)?i:0)+f,ut.setAttrs(this.w.dom.elGraphical.node,{transform:`translate(${null!=(a=o.layout.translateX)?a:0}, ${o.layout.translateY})`}),n+=f),x=n>0?n:2.05*o.globals.radialSize;const m=Math.max(u,e),y=Math.ceil(x+d+m),w=null!=(r=o.config.chart.offsetY)?r:0,v=y+Math.max(w,0);return void(c||(this.w.dom.elLegendForeign&&this.w.dom.elLegendForeign.setAttribute("height",String(v)),this.w.dom.elWrap.style.height=`${v}px`,ut.setAttrs(this.w.dom.Paper.node,{height:y}),h.isBrowser()&&(this.w.dom.Paper.node.parentNode.parentNode.style.minHeight=`${v}px`)))}const m=Math.ceil(x+this.w.layout.translateY+d+p);l||(this.w.dom.elLegendForeign&&this.w.dom.elLegendForeign.setAttribute("height",String(m)),this.w.dom.elWrap.style.height=`${m}px`,ut.setAttrs(this.w.dom.Paper.node,{height:m}),h.isBrowser()&&(this.w.dom.Paper.node.parentNode.parentNode.style.minHeight=`${m}px`))}coreCalculations(){new Dt(this.w).init()}resetGlobals(){const t=()=>this.w.config.series.map(()=>[]),e=new F,{globals:s}=this.w,i={dataWasParsed:this.w.axisFlags.dataWasParsed,originalSeries:s.originalSeries};e.initGlobalVars(s),s.seriesXvalues=t(),s.seriesYvalues=t(),i.dataWasParsed&&(this.w.axisFlags.dataWasParsed=i.dataWasParsed,s.originalSeries=i.originalSeries)}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 Pt(this.w).drawXCrosshairs(),"back"===t.config.yaxis[0].crosshairs.position&&new Pt(this.w).drawYCrosshairs(),"datetime"===t.config.xaxis.type&&void 0===t.config.xaxis.labels.formatter){this.ctx.timeScale=new Se(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.globals.isBarHorizontal&&(e=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minY,t.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(e)}e=new E(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 s=Array.isArray(e.config.chart.brush.targets)?e.config.chart.brush.targets:[e.config.chart.brush.target];s.forEach(e=>{const s=t.constructor.getChartByID(e);s.w.globals.brushSource=this.ctx,"function"!=typeof s.w.config.chart.events.zoomed&&(s.w.config.chart.events.zoomed=()=>this.updateSourceChart(s)),"function"!=typeof s.w.config.chart.events.scrolled&&(s.w.config.chart.events.scrolled=()=>this.updateSourceChart(s))}),e.config.chart.events.selection=(e,i)=>{s.forEach(e=>{t.constructor.getChartByID(e).ctx.updateHelpers._updateOptions({xaxis:{min:i.xaxis.min,max:i.xaxis.max}},!1,!1,!1,!1)})}}}getAccessibleChartLabel(){const t=this.w,e=t.config;if(e.chart.accessibility&&e.chart.accessibility.description)return e.chart.accessibility.description;const s=e.chart.type,i=[];if(e.title.text)i.push(`${e.title.text}. ${s} chart`),e.subtitle.text&&i.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?i.push(`${s} chart with ${r} data series: ${a.join(", ")}`):i.push(`${s} chart with ${r} data series`)}return i.join(". ")}}class Pe{constructor(t,{resetGlobals:e=()=>{},isMultipleY:s=()=>{}}={}){this.w=t,this.resetGlobals=e,this.isMultipleY=s,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new E(this.w),this.activeSeriesIndex=0}getFirstDataPoint(){const t=this.w.config.series,e=new ee(this.w);this.activeSeriesIndex=e.getActiveConfigSeriesIndex();const s=t[this.activeSeriesIndex];return s&&s.data&&s.data.length>0&&null!==s.data[0]&&void 0!==s.data[0]?s.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 s=null==(t=this.w.config.series[this.activeSeriesIndex])?void 0:t.data;if(s){const t=t=>t&&void 0!==t.x;for(let e=1;e<Math.min(3,s.length)&&!0===t(s[e]);e++);}return!0}isFormat2DArray(){const t=this.getFirstDataPoint();return t&&Array.isArray(t)}_fast2DArrayParse(t,e){var s,i;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,g=1/0,u=-1/0,x=!0,f=1/0,m=NaN;for(let e=0;e<a;e++){const s=t[e];if(!Array.isArray(s)||s.length>2)return!1;const i=s[0],a=s[1];if(p)if("number"==typeof i){i==i&&(i<g&&(g=i),i>u&&(u=i));const t=i-m;t>0?t<f&&(f=t):t<0&&(x=!1),m=i}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("."),s=-1===e?0:t.length-e-1;s>d&&(d=s)}else{const t=b.noExponents(a);b.isFloat(t)&&(d=Math.max(d,t.toString().split(".")[1].length))}}}else h=!0;else{if(null!==a)return!1;h=!0}r[e]=a,o[e]=i}this.twoDSeries=r,this.twoDSeriesX=o,this.w.axisFlags.dataFormatXNumeric=!0;return(null!=(i=(s=this.w.seriesData)._parsedExtrema)?i:s._parsedExtrema=[])[e]={ref:r,len:a,maxY:n,lowestY:l,negMinY:c,hasNulls:h,yDec:d,xref:o,xNumeric:p,minX:g,maxX:u,xSorted:x,minXDiff:f},!0}handleFormat2DArray(t,e){const s=this.w.config,i=t[e].data,a="boxPlot"===s.chart.type||"boxPlot"===s.series[e].type;if(a||"datetime"===s.xaxis.type||!this._fast2DArrayParse(i,e))for(let t=0;t<i.length;t++){const e=i[t],r=e[0],o=e[1],n=e[2];if(void 0!==o&&(Array.isArray(o)&&4===o.length&&!a?this.twoDSeries.push(b.parseNumber(o[3])):e.length>=5?this.twoDSeries.push(b.parseNumber(e[4])):this.twoDSeries.push(b.parseNumber(o)),this.w.axisFlags.dataFormatXNumeric=!0),"datetime"===s.xaxis.type){const t=new Date(r).getTime();this.twoDSeriesX.push(t)}else this.twoDSeriesX.push(r);void 0!==n&&(this.threeDSeries.push(n),this.w.axisFlags.isDataXYZ=!0)}}handleFormatXY(t,e){const s=this.w.config,i=this.w.globals,a=new y(this.w),r=t[e].data;let o=e;i.collapsedSeriesIndices.indexOf(e)>-1&&(o=this.activeSeriesIndex);const n=t[o].data;for(let t=0;t<r.length;t++){const s=r[t];if(void 0!==s.y){const t=Array.isArray(s.y)?b.parseNumber(s.y[s.y.length-1]):b.parseNumber(s.y);this.twoDSeries.push(t)}void 0===this.seriesGoals[e]&&(this.seriesGoals[e]=[]),void 0!==s.goals&&Array.isArray(s.goals)?this.seriesGoals[e].push(s.goals):this.seriesGoals[e].push(null),void 0!==s.z&&(this.threeDSeries.push(s.z),this.w.axisFlags.isDataXYZ=!0)}for(let t=0;t<n.length;t++){const e=n[t].x,r="string"==typeof e,o=Array.isArray(e),l=!o&&!!a.isValidDate(e);if(r||l)if(r||s.xaxis.convertedCatToNumeric){const t=i.isBarHorizontal&&this.w.axisFlags.isRangeData;"datetime"!==s.xaxis.type||t?(this.fallbackToCategory=!0,this.twoDSeriesX.push(e),isNaN(e)||"category"===this.w.config.xaxis.type||"string"==typeof e||(this.w.axisFlags.isXNumeric=!0)):this.twoDSeriesX.push(a.parseDate(e))}else"datetime"===s.xaxis.type?this.twoDSeriesX.push(a.parseDate(e.toString())):(this.w.axisFlags.dataFormatXNumeric=!0,this.w.axisFlags.isXNumeric=!0,this.twoDSeriesX.push(parseFloat(e)));else o?(this.fallbackToCategory=!0,this.twoDSeriesX.push(e)):(this.w.axisFlags.isXNumeric=!0,this.w.axisFlags.dataFormatXNumeric=!0,this.twoDSeriesX.push(e))}}handleRangeData(t,e){let s={start:[],end:[],rangeUniques:[]};return this.isFormat2DArray()?s=this.handleRangeDataFormat("array",t,e):this.isFormatXY()&&(s=this.handleRangeDataFormat("xy",t,e)),this.w.rangeData.seriesRangeStart[e]=void 0===s.start?[]:s.start,this.w.rangeData.seriesRangeEnd[e]=void 0===s.end?[]:s.end,this.w.rangeData.seriesRange[e]=s.rangeUniques,this.w.rangeData.seriesRange.forEach(t=>{t&&t.forEach(t=>{const e=t.y,s=e.length;if(!(s<=1))for(let i=0;i<s;i++){const a=e[i],r=a.y1,o=a.y2;for(let n=i+1;n<s;n++){const s=e[n],i=s.y1;if(r<=s.y2&&i<=o){const e=t;e.overlaps.add(a.rangeName),e.overlaps.add(s.rangeName)}}}})}),s}handleCustomRangeData(t,e,s){const i=t[e].data||[],a=[],r=[];for(let t=0;t<i.length;t++){const e=i[t];let o,n;if("function"==typeof s){let i=s(e,t);Array.isArray(i)||(i=[i]);const a=i.map(t=>b.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=b.parseNumber(t[0]),n=b.parseNumber(t[t.length-1])):o=n=b.parseNumber(t)}a.push(o),r.push(n)}this.w.rangeData.seriesRangeStart[e]=a,this.w.rangeData.seriesRangeEnd[e]=r}handleCandleStickBoxData(t,e){let s={o:[],h:[],m:[],l:[],c:[]};return this.isFormat2DArray()?s=this.handleCandleStickBoxDataFormat("array",t,e):this.isFormatXY()&&(s=this.handleCandleStickBoxDataFormat("xy",t,e)),this.w.candleData.seriesCandleO[e]=s.o,this.w.candleData.seriesCandleH[e]=s.h,this.w.candleData.seriesCandleM[e]=s.m,this.w.candleData.seriesCandleL[e]=s.l,this.w.candleData.seriesCandleC[e]=s.c,this.w.candleData.seriesBoxPoints[e]=s.points||[],s}handleViolinData(t,e){var s,i,a,r,o,n;const l=this.w,c=t[e].data,h=[],d=[],p=[],g=[],u=[];for(let t=0;t<c.length;t++){const e=c[t],l=null!=(a=null!=(i=null==(s=null==e?void 0:e.y)?void 0:s.density)?i:null==e?void 0:e[1])?a:[],x=null!=(n=null!=(o=null==(r=null==e?void 0:e.y)?void 0:r.points)?o:null==e?void 0:e[2])?n:[],f=[],m=[];let y=0,w=null,v=1/0,A=-1/0;for(let t=0;t<l.length;t++){const e=b.parseNumber(l[t][0]),s=b.parseNumber(l[t][1]);null!==e&&null!==s&&(f.push(e),m.push(s),s>y&&(y=s,w=e),e<v&&(v=e),e>A&&(A=e))}const C=[];for(let t=0;t<x.length;t++){const e=b.parseNumber(x[t]);null!==e&&(C.push(e),e<v&&(v=e),e>A&&(A=e))}h.push({values:f,weights:m,maxWeight:y}),d.push(C),p.push(v===1/0?0:v),g.push(A===-1/0?0:A),u.push(null!==w?w:C.length?C[Math.floor(C.length/2)]:0)}l.violinData.seriesViolinDensity[e]=h,l.violinData.seriesViolinPoints[e]=d,l.violinData.seriesViolinMin[e]=p,l.violinData.seriesViolinMax[e]=g,this.twoDSeries=u}handleRangeDataFormat(t,e,s){const i=[],a=[],r=new Map,o=[];if(e[s].data.forEach(t=>{if(!r.has(t.x)){const e={x:t.x,overlaps:new Set,y:[]};r.set(t.x,e),o.push(e)}}),"array"===t)for(let t=0;t<e[s].data.length;t++)Array.isArray(e[s].data[t])?(i.push(e[s].data[t][1][0]),a.push(e[s].data[t][1][1])):(i.push(e[s].data[t]),a.push(e[s].data[t]));else if("xy"===t)for(let t=0;t<e[s].data.length;t++){const o=Array.isArray(e[s].data[t].y),n=b.randomId(),l=e[s].data[t].x,c={y1:o?e[s].data[t].y[0]:e[s].data[t].y,y2:o?e[s].data[t].y[1]:e[s].data[t].y,rangeName:n};e[s].data[t].rangeName=n;const h=r.get(l);h&&h.y.push(c),i.push(c.y1),a.push(c.y2)}return{start:i,end:a,rangeUniques:o}}handleCandleStickBoxDataFormat(t,e,s){const i=this.w,a="boxPlot"===i.config.chart.type||"boxPlot"===i.config.series[s].type,r=[],o=[],n=[],l=[],c=[],h=[],d=e[s].data;let p;if("array"===t){p=a&&6===d[0].length||!a&&5===d[0].length?t=>t.slice(1):t=>Array.isArray(t[1])?t[1]:[]}else p=t=>Array.isArray(t.y)?t.y:[];for(let t=0;t<d.length;t++){const e=p(d[t]);e&&e.length>=2&&(r.push(e[0]),o.push(e[1]),a?(n.push(e[2]),l.push(e[3]),c.push(e[4])):(l.push(e[2]),c.push(e[3])));const s=d[t]&&d[t].points;h.push(Array.isArray(s)?s:[])}return{o:r,h:o,m:n,l:l,c:c,points:h}}parseDataAxisCharts(t){var e,s,i,a,r,o;const c=this.w.config,h=this.w.globals,d=new y(this.w);this.w.seriesData._parsedExtrema=[];const p=c.labels.length>0?c.labels.slice():c.xaxis.categories.slice();this.w.axisFlags.isRangeBar="rangeBar"===c.chart.type&&h.isBarHorizontal,this.w.labelData.hasXaxisGroups="category"===c.xaxis.type&&c.xaxis.group.groups.length>0,this.w.labelData.hasXaxisGroups&&(this.w.labelData.groups=c.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 g=[],u=[...new Set(c.series.map(t=>t.group))];c.series.forEach((t,e)=>{const s=u.indexOf(t.group);g[s]||(g[s]=[]),g[s].push(this.w.seriesData.seriesNames[e])}),this.w.labelData.seriesGroups=g;const x=()=>{for(let t=0;t<p.length;t++)if("string"==typeof p[t]){if(!d.isValidDate(p[t]))throw new Error("You have provided invalid Date format. Please provide a valid JavaScript Date");this.twoDSeriesX.push(d.parseDate(p[t]))}else this.twoDSeriesX.push(p[t])};for(let d=0;d<t.length;d++){if(this.twoDSeries=[],this.twoDSeriesX=[],this.threeDSeries=[],void 0===t[d].data)return;const g=c.chart.dataReducer,u=null==(s=null==(e=h.dataReducerRawSeries)?void 0:e[d])?void 0:s.data;if((null==g?void 0:g.enabled)&&this.isMultiFormat()&&Array.isArray(u)&&u.length>(null!=(i=g.threshold)?i:500)){const e=null!=(a=g.targetPoints)?a:250,s=c.xaxis.min,i=c.xaxis.max,h=null==s&&null==i?u:Pe.sliceByXRange(u,s,i);let p=h;if(h.length>e){const t=Array.isArray(h[0])?null==(o=h[0])?void 0:o[1]:null==(r=h[0])?void 0:r.y;Array.isArray(t)?4===t.length?p=Pe.ohlcAggregate(h,e):2===t.length&&(p=Pe.rangeAggregate(h,e)):p=Pe.lttbDownsample(h,e)}t[d]=l(n({},t[d]),{data:p})}"rangeBar"!==c.chart.type&&"rangeArea"!==c.chart.type&&"rangeBar"!==t[d].type&&"rangeArea"!==t[d].type||(this.w.axisFlags.isRangeData=!0,this.handleRangeData(t,d));const f=t[d].type||c.chart.type;if(Le(f)){const e=_e(f),s=e&&e.yExtent;(e&&"rangeXY"===e.dataType||"function"==typeof s)&&(this.w.axisFlags.isRangeData=!0,this.handleCustomRangeData(t,d,s))}if(this.isMultiFormat())this.isFormat2DArray()?this.handleFormat2DArray(t,d):this.isFormatXY()&&this.handleFormatXY(t,d),"candlestick"!==c.chart.type&&"candlestick"!==t[d].type&&"boxPlot"!==c.chart.type&&"boxPlot"!==t[d].type||this.handleCandleStickBoxData(t,d),"violin"!==c.chart.type&&"violin"!==t[d].type||this.handleViolinData(t,d),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,d!==this.activeSeriesIndex||this.fallbackToCategory||(this.w.axisFlags.isXNumeric=!0);else{"datetime"===c.xaxis.type?(this.w.axisFlags.isXNumeric=!0,x(),this.w.seriesData.seriesX.push(this.twoDSeriesX)):"numeric"===c.xaxis.type&&(this.w.axisFlags.isXNumeric=!0,p.length>0&&(this.twoDSeriesX=p,this.w.seriesData.seriesX.push(this.twoDSeriesX))),this.w.labelData.labels.push(this.twoDSeriesX);const e=t[d].data.map(t=>b.parseNumber(t));this.w.seriesData.series.push(e)}this.w.seriesData.seriesZ.push(this.threeDSeries),void 0!==t[d].color?this.w.seriesData.seriesColors.push(t[d].color):this.w.seriesData.seriesColors.push(void 0)}return this.w}parseDataNonAxisCharts(t){const e=this.w.config,s=Array.isArray(t)&&t.every(t=>"number"==typeof t)&&e.labels.length>0;Array.isArray(t)&&t.some(t=>t&&"object"==typeof t&&t.data||t&&"object"==typeof t&&t.parsing);if(s){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 i=this.extractPieDataFromSeries(t);this.w.seriesData.series=i.values,this.w.seriesData.seriesNames=i.labels,"radialBar"===e.chart.type&&(this.w.seriesData.series=this.w.seriesData.series.map(t=>{const e=b.parseNumber(t);return 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}resetParsingFlags(){const t=this.w;t.axisFlags.dataWasParsed=!1,t.globals.originalSeries=null,t.config.series&&t.config.series.forEach(t=>{t.__apexParsed&&delete t.__apexParsed})}extractPieDataFromSeries(t){const e=[],s=[];if(!Array.isArray(t))return{values:[],labels:[]};if(0===t.length)return{values:[],labels:[]};const i=t[0];return"object"==typeof i&&null!==i&&i.data?(this.extractPieDataFromSeriesObjects(t,e,s),{values:e,labels:s}):{values:[],labels:[]}}extractPieDataFromSeriesObjects(t,e,s){t.forEach((t,i)=>{t.data&&Array.isArray(t.data)&&t.data.forEach(t=>{"object"==typeof t&&null!==t&&void 0!==t.x&&void 0!==t.y&&(s.push(String(t.x)),e.push(b.parseNumber(t.y)))})})}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){this.w.rangeData.seriesRange.map(t=>{t.forEach(t=>{this.w.labelData.labels.indexOf(t.x)<0&&t.x&&this.w.labelData.labels.push(t.x)})});const t=this.w.labelData.labels;if(t.length>0&&("number"==typeof t[0]||"string"==typeof t[0]))this.w.labelData.labels=[...new Set(t)];else{const e=new Map;for(const s of t){const t=JSON.stringify(s);e.has(t)||e.set(t,s)}this.w.labelData.labels=Array.from(e.values())}}if(e.xaxis.convertedCatToNumeric){new C(e).convertCatToNumericXaxis(e,this.w.seriesData.seriesX[0]),this._generateExternalLabels(t)}}else this._generateExternalLabels(t)}_generateExternalLabels(t){const e=this.w.globals,s=this.w.config;let i=[];if(e.axisCharts){if(this.w.seriesData.series.length>0)if(this.isFormatXY()){const t=s.series.map(t=>{const e=new Map;for(const s of t.data)e.has(s.x)||e.set(s.x,s);return Array.from(e.values())}),e=t.reduce((t,e,s,i)=>i[t].length>e.length?t:s,0);for(let s=0;s<t[e].length;s++)i.push(s+1)}else for(let t=0;t<this.w.seriesData.series[e.maxValsInArrayIndex].length;t++)i.push(t+1);this.w.seriesData.seriesX=[];for(let e=0;e<t.length;e++)this.w.seriesData.seriesX.push(i);this.w.globals.isBarHorizontal||(this.w.axisFlags.isXNumeric=!0)}if(0===i.length){i=e.axisCharts?[]:this.w.seriesData.series.map((t,e)=>e+1);for(let e=0;e<t.length;e++)this.w.seriesData.seriesX.push(i)}this.w.labelData.labels=i,s.xaxis.convertedCatToNumeric&&(this.w.labelData.categoryLabels=i.map(t=>s.xaxis.labels.formatter(t))),this.w.axisFlags.noLabelsProvided=!0}parseRawDataIfNeeded(t){const e=this.w.config,s=this.w.globals,i=e.parsing;if(this.w.axisFlags.dataWasParsed)return t;const a=!(!i||!(i.x||i.y||i.z)),r=t.some(t=>t.parsing&&(t.parsing.x||t.parsing.y||t.parsing.z));if(!a&&!r)return t;const o=t.map((t,e)=>{var s,a,r;if(!t.data||!Array.isArray(t.data)||0===t.data.length)return t;const o={x:(null==(s=t.parsing)?void 0:s.x)||(null==i?void 0:i.x),y:(null==(a=t.parsing)?void 0:a.y)||(null==i?void 0:i.y),z:(null==(r=t.parsing)?void 0:r.z)||(null==i?void 0:i.z)};if(!o.x&&!o.y)return t;const c=t.data[0];if("object"==typeof c&&null!==c&&(Object.prototype.hasOwnProperty.call(c,"x")||Object.prototype.hasOwnProperty.call(c,"y"))||Array.isArray(c))return t;if(!o.x||!o.y||Array.isArray(o.y)&&0===o.y.length)return t;const h=t.data.map((t,e)=>{if("object"!=typeof t||null===t)return t;const s=this.getNestedValue(t,o.x);let i,a;if(Array.isArray(o.y)){const e=o.y.map(e=>this.getNestedValue(t,e));"bubble"===this.w.config.chart.type?(e.length,i=e[0]):i=e}else i=this.getNestedValue(t,o.y);o.z&&(a=this.getNestedValue(t,o.z));const r={x:s,y:i,z:void 0};if("bubble"===this.w.config.chart.type&&Array.isArray(o.y)&&2===o.y.length){const e=this.getNestedValue(t,o.y[1]);void 0!==e&&(r.z=e)}return void 0!==a&&(r.z=a),r});return l(n({},t),{data:h,__apexParsed:!0})});return this.w.axisFlags.dataWasParsed=!0,s.originalSeries||(s.originalSeries=b.clone(t)),o}getNestedValue(t,e){if(!t||"object"!=typeof t||!e)return;if(-1===e.indexOf("."))return t[e];const s=e.split(".");let i=t;for(let t=0;t<s.length;t++){if(null==i||"object"!=typeof i)return;i=i[s[t]]}return i}expandScatterJitterData(t){var e,s;const i=this.w.config,a="scatter"===i.chart.type||"bubble"===i.chart.type,r=null==(s=null==(e=i.plotOptions)?void 0:e.scatter)?void 0:s.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"!==i.xaxis.type&&(Array.isArray(i.xaxis.categories)&&i.xaxis.categories.length?this._applyBandAxis(i.xaxis.categories.slice()):Array.isArray(i.xaxis._scatterBandLabels)&&i.xaxis._scatterBandLabels.length&&this._applyBandAxis(i.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 s=c.get(String(t.x)),i=t.y,a=i.length>h?Math.ceil(i.length/h):1;for(let t=0;t<i.length;t+=a){const a=b.parseNumber(i[t]);null!==a&&e.push({x:s,y:a})}}else if(t&&"object"==typeof t&&!Array.isArray(t)){const s=String(t.x);e.push({x:c.has(s)?c.get(s):t.x,y:t.y})}else e.push(t)}),l(n({},t),{data:e})});return this._applyBandAxis(o),d}_applyBandAxis(t){var e;const s=this.w.config.xaxis,i=t.length;if(!i)return;const a=s._scatterBand=s._scatterBand||{};if(s._scatterBandLabels=t.slice(),s.type="numeric",(null==(e=this.w.interact)?void 0:e.zoomed)&&"number"==typeof s.min&&"number"==typeof s.max&&isFinite(s.min)&&isFinite(s.max)){const t=t=>Math.max(0,Math.min(i-1,t));let e=t(Math.round(s.min+.49)),r=t(Math.round(s.max-.49));r<e&&(e=r=t(Math.round((s.min+s.max)/2))),s.min=e-1,s.max=r+1,s.tickAmount=r-e+2,a.min=!0,a.max=!0,a.tick=!0}else(null==s.min||a.min)&&(s.min=-1,a.min=!0),(null==s.max||a.max)&&(s.max=i,a.max=!0),(null==s.tickAmount||"dataPoints"===s.tickAmount||a.tick)&&(s.tickAmount=i+1,a.tick=!0);s.labels=s.labels||{};const r=s.labels.formatter;if("function"!=typeof r||r._scatterBand){const e=e=>{const s=Math.round(e);return Math.abs(e-s)<1e-6&&void 0!==t[s]?t[s]:""};e._scatterBand=!0,s.labels.formatter=e}}parseData(t){var e,s,i,a,r,o;const c=this.w,h=c.config,d=c.globals;if(t=this.parseRawDataIfNeeded(t),t=this.expandScatterJitterData(t),(null==(e=h.chart.dataReducer)?void 0:e.enabled)&&d.axisCharts&&!d.dataReducerRawSeries){d.dataReducerRawSeries=t.map(t=>({data:Array.isArray(null==t?void 0:t.data)?t.data.slice():null==t?void 0:t.data}));let e=1/0,o=-1/0;for(const n of t){const t=null==n?void 0:n.data;if(!Array.isArray(t)||0===t.length)continue;const l=!Array.isArray(t[0]),c=l?null==(s=t[0])?void 0:s.x:null==(i=t[0])?void 0:i[0],h=l?null==(a=t[t.length-1])?void 0:a.x:null==(r=t[t.length-1])?void 0:r[0];"number"==typeof c&&(e=Math.min(e,c)),"number"==typeof h&&(o=Math.max(o,h))}e!==1/0&&(d.dataReducerRawMinX=e,d.dataReducerRawMaxX=o)}if(h.series=t,d.dataReducerRawSeries&&(null==(o=h.chart.dataReducer)?void 0:o.enabled)){const e=d.dataReducerRawSeries;d.initialSeries=t.map((t,s)=>{var i,a,r;return l(n({},t),{data:null!=(r=null==(a=null==(i=e[s])?void 0:i.data)?void 0:a.slice())?r:t.data})})}else d.initialSeries=t;if(this.excludeCollapsedSeriesInYAxis(),this.fallbackToCategory=!1,this.resetGlobals(),this.isMultipleY(),d.axisCharts?(this.parseDataAxisCharts(t),this.coreUtils.getLargestSeries()):this.parseDataNonAxisCharts(t),h.chart.stacked){const t=new ee(this.w);this.w.seriesData.series=t.setNullSeriesToZeroValues(this.w.seriesData.series)}this.coreUtils.getSeriesTotals(),d.axisCharts?(Pe._defineLazyResult(this.w.seriesData,"stackedSeriesTotals",()=>this.coreUtils.getStackedSeriesTotals()),Pe._defineLazyResult(this.w.seriesData,"stackedSeriesTotalsByGroups",()=>this.coreUtils.getStackedSeriesTotalsByGroups()),Pe._defineLazyResult(d,"seriesPercent",()=>(this.coreUtils.getPercentSeries(),d.seriesPercent))):this.coreUtils.getPercentSeries(),this.w.axisFlags.dataFormatXNumeric||this.w.axisFlags.isXNumeric&&("numeric"!==h.xaxis.type||0!==h.labels.length||0!==h.xaxis.categories.length)||this.handleExternalLabelsData(t);const p=this.coreUtils.getCategoryLabels(this.w.labelData.labels);for(let t=0;t<p.length;t++)if(Array.isArray(p[t])){this.w.axisFlags.isMultiLineX=!0;break}return{seriesData:{series:this.w.seriesData.series,seriesNames:this.w.seriesData.seriesNames,seriesX:this.w.seriesData.seriesX,seriesZ:this.w.seriesData.seriesZ,seriesColors:this.w.seriesData.seriesColors,seriesGoals:this.w.seriesData.seriesGoals,noLabelsProvided:this.w.axisFlags.noLabelsProvided},rangeData:{seriesRangeStart:this.w.rangeData.seriesRangeStart,seriesRangeEnd:this.w.rangeData.seriesRangeEnd,seriesRange:this.w.rangeData.seriesRange},candleData:{seriesCandleO:this.w.candleData.seriesCandleO,seriesCandleH:this.w.candleData.seriesCandleH,seriesCandleM:this.w.candleData.seriesCandleM,seriesCandleL:this.w.candleData.seriesCandleL,seriesCandleC:this.w.candleData.seriesCandleC,seriesBoxPoints:this.w.candleData.seriesBoxPoints},labelData:{labels:this.w.labelData.labels,categoryLabels:this.w.labelData.categoryLabels},axisFlags:{isXNumeric:this.w.axisFlags.isXNumeric,dataFormatXNumeric:this.w.axisFlags.dataFormatXNumeric,isDataXYZ:this.w.axisFlags.isDataXYZ,isRangeData:this.w.axisFlags.isRangeData,isRangeBar:this.w.axisFlags.isRangeBar,isMultiLineX:this.w.axisFlags.isMultiLineX,dataWasParsed:this.w.axisFlags.dataWasParsed,hasXaxisGroups:this.w.labelData.hasXaxisGroups,groups:this.w.labelData.groups,seriesGroups:this.w.labelData.seriesGroups}}}static _defineLazyResult(t,e,s){let i,a=!1;Object.defineProperty(t,e,{configurable:!0,enumerable:!0,get:()=>(a||(a=!0,i=s()),i),set(t){a=!0,i=t}})}static sliceByXRange(t,e,s){const i=t.length;if(0===i)return t;const a=!Array.isArray(t[0])?t=>t.x:t=>t[0];let r=0;if(null!=e){let s=0,o=i-1;for(;s<=o;){const i=s+o>>1;a(t[i])<e?s=i+1:o=i-1}r=Math.max(0,s-1)}let o=i;if(null!=s){let e=0,r=i-1;for(;e<=r;){const i=e+r>>1;a(t[i])>s?r=i-1:e=i+1}o=Math.min(i,e+1)}return 0===r&&o===i?t.slice():t.slice(r,o)}static lttbDownsample(t,e){const s=t.length;if(e>=s||e<3)return t;const i=!Array.isArray(t[0]),a=i?t=>t.x:t=>t[0],r=i?t=>t.y:t=>t[1],o=[];o.push(t[0]);const n=(s-2)/(e-2);let l=0;for(let i=0;i<e-2;i++){const e=Math.floor((i+1)*n)+1,c=Math.min(Math.floor((i+2)*n)+1,s);let h=0,d=0;const p=c-e;for(let s=e;s<c;s++)h+=a(t[s]),d+=r(t[s]);h/=p,d/=p;const g=Math.floor(i*n)+1,u=Math.min(Math.floor((i+1)*n)+1,s),x=a(t[l]),f=r(t[l]);let m=-1,b=g;for(let e=g;e<u;e++){const s=.5*Math.abs((x-h)*(r(t[e])-f)-(x-a(t[e]))*(d-f));s>m&&(m=s,b=e)}o.push(t[b]),l=b}return o.push(t[s-1]),o}static ohlcAggregate(t,e){const s=t.length;if(e>=s||e<1)return t;const i=!Array.isArray(t[0]),a=i?t=>t.x:t=>t[0],r=i?t=>t.y:t=>t[1],o=i?(t,e)=>({x:t,y:e}):(t,e)=>[t,e],n=[],l=s/e;for(let i=0;i<e;i++){const c=Math.floor(i*l),h=i===e-1?s:Math.floor((i+1)*l);if(h<=c)continue;const d=r(t[c]),p=d[0];let g=d[1],u=d[2],x=d[3];for(let e=c+1;e<h;e++){const s=r(t[e]);s[1]>g&&(g=s[1]),s[2]<u&&(u=s[2]),x=s[3]}n.push(o(a(t[c]),[p,g,u,x]))}return n}static rangeAggregate(t,e){const s=t.length;if(e>=s||e<1)return t;const i=!Array.isArray(t[0]),a=i?t=>t.x:t=>t[0],r=i?t=>t.y:t=>t[1],o=i?(t,e)=>({x:t,y:e}):(t,e)=>[t,e],n=[],l=s/e;for(let i=0;i<e;i++){const c=Math.floor(i*l),h=i===e-1?s:Math.floor((i+1)*l);if(h<=c)continue;let d=1/0,p=-1/0;for(let e=c;e<h;e++){const s=r(t[e]);if(null!=s)for(let t=0;t<2;t++){const e=s[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((s,i)=>{let a=0;s.forEach(e=>{-1!==t.globals.collapsedSeriesIndices.indexOf(e)&&a++}),a>0&&a==s.length&&e.push(i)}),t.globals.ignoreYAxisIndexes=e.map(t=>t)}}class Be{constructor(t,e){this.w=t,this.ctx=e}_updateOptions(t,e=!1,s=!0,i=!0,a=!1){return new Promise(r=>{let o=[this.ctx];i&&(o=this.ctx.getSyncedCharts()),this.w.globals.isExecCalled&&(o=[this.ctx],this.w.globals.isExecCalled=!1),o.forEach((i,n)=>{var l,c;const h=i.w;if(h.globals.shouldAnimate=s,e||(h.globals.resized=!0,h.globals.dataChanged=!0,s&&h.config.chart.animations.enabled&&i.series.getPreviousPaths()),s&&t&&"object"==typeof t){const e=null==(l=null==t?void 0:t.chart)?void 0:l.type,s=h.config.chart.requestedType||h.config.chart.type;e&&e!==s&&(null==(c=i.morphTypeChange)||c.captureBeforeDestroy({fromType:s,toType:e,newSeries:t.series||h.config.series}))}if(t&&"object"==typeof t){i.config=new M(t);const e=t.chart&&t.chart.type,s="funnel"===e||"pyramid"===e||"gauge"===e,r=!!h.config.chart.requestedType;if(e&&!s&&r){t.chart=t.chart||{},t.chart.requestedType=e;const s=h.config.chart.requestedType;"funnel"!==s&&"pyramid"!==s||(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(i.config.normalizeAliasedChartType(t),t=E.extendArrayProps(i.config,t,h),i.w.globals.chartID!==this.w.globals.chartID&&(delete t.series,delete t.yaxis),h.config=b.extend(h.config,t),a&&(h.globals.lastXAxis=t.xaxis?b.clone(t.xaxis):[],h.globals.lastYAxis=t.yaxis?b.clone(t.yaxis):[],h.globals.initialConfig=b.extend({},h.config),h.globals.initialSeries=h.config.series,t.series)){for(let t=0;t<h.globals.collapsedSeriesIndices.length;t++){const e=h.config.series[h.globals.collapsedSeriesIndices[t]];h.globals.collapsedSeries[t].data=h.globals.axisCharts?e.data.slice():e}for(let t=0;t<h.globals.ancillaryCollapsedSeriesIndices.length;t++){const e=h.config.series[h.globals.ancillaryCollapsedSeriesIndices[t]];h.globals.ancillaryCollapsedSeries[t].data=h.globals.axisCharts?e.data.slice():e}i.series.emptyCollapsedSeries(h.config.series)}}return i.update(t).then(()=>{n===o.length-1&&r(i)})})})}_updateSeries(t,e,s=!1){return new Promise(i=>{const a=this.w;a.globals.shouldAnimate=e,a.globals.dataChanged=!0;const r=JSON.stringify({y:(a.globals.yAxisScale||[]).map(t=>t?t.result:null),xMin:a.globals.minX,xMax:a.globals.maxX});At.invalidateSelectors(a),e&&a.config.chart.animations.enabled&&this.ctx.series.getPreviousPaths();const o=a.config.series.length,n=a.config.series.map(t=>{var e,s;return null!=(s=null==(e=null==t?void 0:t.data)?void 0:e.length)?s:0});a.globals.dataReducerRawSeries=null,this.ctx.data.resetParsingFlags();const l=this.ctx.data.parseData(t);return this.ctx._writeParsedSeriesData(l.seriesData),this.ctx._writeParsedRangeData(l.rangeData),this.ctx._writeParsedCandleData(l.candleData),this.ctx._writeParsedLabelData(l.labelData),this.ctx._writeParsedAxisFlags(l.axisFlags),s&&(a.globals.initialConfig&&(a.globals.initialConfig.series=a.config.series),a.globals.initialSeries=a.config.series),this._canUseFastPath(t,o,n,a)?this.ctx.fastUpdate(e,r).then(()=>{i(this.ctx)}):(this.ctx._updateStats&&this.ctx._updateStats.full++,this.ctx.update().then(()=>{i(this.ctx)}))})}_canUseFastPath(t,e,s,i){return!!i.dom.elGraphical&&(!!i.globals.axisCharts&&(t.length===e&&(!t.some((t,e)=>{var i,a;return(null!=(a=null==(i=null==t?void 0:t.data)?void 0:i.length)?a:0)!==s[e]})&&(!(i.globals.collapsedSeries.length>0)&&(!(i.globals.ancillaryCollapsedSeries.length>0)&&(!(i.globals.risingSeries.length>0)&&(!i.globals.comboCharts&&!i.interact.zoomed)))))))}_extendSeries(t,e){const s=this.w,i=s.config.series[e];return l(n({},s.config.series[e]),{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,zIndex:void 0!==t.zIndex?t.zIndex:e})}toggleDataPointSelection(t,e){const s=this.w;let i=null;const a=`.apexcharts-series[data\\:realIndex='${t}']`;if(s.globals.axisCharts?i=s.dom.Paper.findOne(`${a} path[j='${e}'], ${a} circle[j='${e}'], ${a} rect[j='${e}']`):void 0===e&&(i=s.dom.Paper.findOne(`${a} path[j='${t}']`),"pie"!==s.config.chart.type&&"polarArea"!==s.config.chart.type&&"donut"!==s.config.chart.type||this.ctx.pie.pieClicked(t)),!i)return null;new ut(this.w).pathMouseDown(i,null);return i.node?i.node:null}forceXAxisUpdate(t){const e=this.w;if(["min","max"].forEach(s=>{void 0!==t.xaxis[s]&&(e.config.xaxis[s]=t.xaxis[s],e.globals.lastXAxis[s]=t.xaxis[s])}),t.xaxis.categories&&t.xaxis.categories.length&&(e.config.xaxis.categories=t.xaxis.categories),e.config.xaxis.convertedCatToNumeric){const e=new C(t);t=e.convertCatToNumericXaxis(t,this.ctx)}return t}forceYAxisUpdate(t){return t.chart&&t.chart.stacked&&"100%"===t.chart.stackType&&(Array.isArray(t.yaxis)?t.yaxis.forEach((e,s)=>{t.yaxis[s].min=0,t.yaxis[s].max=100}):(t.yaxis.min=0,t.yaxis.max=100)),t}revertDefaultAxisMinMax(t){const e=this.w;let s=e.globals.lastXAxis,i=e.globals.lastYAxis;t&&t.xaxis&&(s=t.xaxis),t&&t.yaxis&&(i=t.yaxis);const a=s;e.config.xaxis.min=a.min,e.config.xaxis.max=a.max;const r=t=>{if(void 0!==i[t]){const s=i[t];e.config.yaxis[t].min=s.min,e.config.yaxis[t].max=s.max}};e.config.yaxis.map((t,s)=>{e.interact.zoomed||void 0!==i[s]?r(s):void 0!==this.ctx.opts.yaxis[s]&&(t.min=this.ctx.opts.yaxis[s].min,t.max=this.ctx.opts.yaxis[s].max)})}}class Ne{constructor(t){this.w=t.w,this.ttCtx=t}getNearestValues({hoverArea:t,elGrid:e,clientX:s,clientY:i}){var a,r;const o=this.w,n=e.getBoundingClientRect(),l=n.width,c=n.height;let h=l/(o.globals.dataPoints-1);const d=c/o.globals.dataPoints,p=this.hasBars();!o.globals.comboCharts&&!p||o.config.xaxis.convertedCatToNumeric||(h=l/o.globals.dataPoints);const g=s-n.left-o.globals.barPadForNumericAxis,u=i-n.top;g<0||u<0||g>l||u>c?(t.classList.remove("hovering-zoom"),t.classList.remove("hovering-pan")):o.interact.zoomEnabled?(t.classList.remove("hovering-pan"),t.classList.add("hovering-zoom")):o.interact.panEnabled&&(t.classList.remove("hovering-zoom"),t.classList.add("hovering-pan"));let x=Math.round(g/h);const f=Math.floor(u/d);p&&!o.config.xaxis.convertedCatToNumeric&&(x=Math.ceil(g/h),x-=1);let m=null,y=null,w=o.globals.seriesXvalues.map(t=>t.filter(t=>b.isNumber(t)));const v=o.globals.seriesYvalues.map(t=>t.filter(t=>b.isNumber(t)));if(o.axisFlags.isXNumeric){const t=this.ttCtx.getElGrid();if(!t)return{hoverX:g,hoverY:u};const e=t.getBoundingClientRect(),s=g*(e.width/l),i=u*(e.height/c);y=this.closestInMultiArray(s,i,w,v),m=y.index,x=null!=(a=y.j)?a:0,null!==m&&o.globals.hasNullValues&&(w=o.globals.seriesXvalues[m],y=this.closestInArray(s,w),x=null!=(r=y.j)?r:0)}return o.interact.capturedSeriesIndex=null===m?-1:m,(!x||x<1)&&(x=0),o.globals.isBarHorizontal?o.interact.capturedDataPointIndex=f:o.interact.capturedDataPointIndex=x,{capturedSeries:m,j:o.globals.isBarHorizontal?f:x,hoverX:g,hoverY:u}}getFirstActiveXArray(t){const e=this.w;let s=0;const i=t.map((t,e)=>t.length>0?e:-1);for(let t=0;t<i.length;t++)if(-1!==i[t]&&-1===e.globals.collapsedSeriesIndices.indexOf(t)&&-1===e.globals.ancillaryCollapsedSeriesIndices.indexOf(t)){s=i[t];break}return s}closestInMultiArray(t,e,s,i){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;if(a.globals.allSeriesHasEqualX){let a=1/0;for(let e=0;e<s.length;e++){if(!r(e))continue;const o=s[e],n=i[e],l=Math.min(o.length,n.length);for(let e=0;e<l;e++){const s=Math.abs(t-o[e]);s<a&&(a=s,h=e)}}if(null!==h)if(n){let a=1/0;for(let o=0;o<s.length;o++){if(!r(o))continue;const n=s[o],l=i[o],d=Math.min(n.length,l.length);if(d<2){const t=l[h];if("number"!=typeof t)continue;const s=Math.abs(e-t);s<a&&(a=s,c=o);continue}for(let s=0;s<d-1;s++){const i=this._distanceToSegment(t,e,n[s],l[s],n[s+1],l[s+1]);i.dist<a&&(a=i.dist,c=o)}}}else{let t=1/0;for(let a=0;a<s.length;a++){if(!r(a))continue;const s=i[a][h];if("number"!=typeof s)continue;const o=Math.abs(e-s);o<t&&(t=o,c=a)}}return{index:c,j:h}}for(let a=0;a<s.length;a++){if(!r(a))continue;const o=s[a],d=i[a],p=Math.min(o.length,d.length);if(n&&p>=2)for(let s=0;s<p-1;s++){const i=this._distanceToSegment(t,e,o[s],d[s],o[s+1],d[s+1]);i.dist<l&&(l=i.dist,c=a,h=i.t<.5?s:s+1)}else for(let s=0;s<p;s++){const i=t-o[s],r=e-d[s],n=Math.sqrt(i*i+r*r);n<l&&(l=n,c=a,h=s)}}return{index:c,j:h}}_distanceToSegment(t,e,s,i,a,r){const o=a-s,n=r-i,l=o*o+n*n;let c=0===l?0:((t-s)*o+(e-i)*n)/l;c<0?c=0:c>1&&(c=1);const h=t-(s+c*o),d=e-(i+c*n);return{dist:Math.sqrt(h*h+d*d),t:c}}closestInArray(t,e){const s=e[0];let i=null,a=Math.abs(t-s);for(let s=0;s<e.length;s++){const r=Math.abs(t-e[s]);r<a&&(a=r,i=s)}return{j:i}}isXoverlap(t){const e=[],s=this.w.seriesData.seriesX.filter(t=>void 0!==t[0]);if(s.length>0)for(let i=0;i<s.length-1;i++)void 0!==s[i][t]&&void 0!==s[i+1][t]&&s[i][t]!==s[i+1][t]&&e.push("unEqual");return 0===e.length}isInitialSeriesSameLen(){var t,e,s,i;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 s;return!(null==(s=this.w.globals.collapsedSeriesIndices)?void 0:s.includes(e))}))||[];for(let t=0;t<r.length-1;t++){if(!(null==(s=r[t])?void 0:s.data)||!(null==(i=r[t+1])?void 0:i.data))return!0;if(r[t].data.length!==r[t+1].data.length){a=!1;break}}return a}getBarsHeight(t){return[...t].reduce((t,e)=>t+e.getBBox().height,0)}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 s=Number(t.getAttribute("data:realIndex")),i=Number(e.getAttribute("data:realIndex"));return i<s?1:i>s?-1:0});const s=[];return e.forEach(t=>{s.push(t.querySelector(".apexcharts-marker"))}),s}hasMarkers(t){return this.getElMarkers(t).length>0}getPathFromPoint(t,e){const s=Number(t.getAttribute("cx")),i=Number(t.getAttribute("cy")),a=t.getAttribute("shape");return new ut(this.w).getMarkerPath(s,i,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 s=e.config.markers.hover.size;return void 0===s&&(s=e.globals.markers.size[t]+e.config.markers.hover.sizeOffset),s}toggleAllTooltipSeriesGroups(t){const e=this.w,s=this.ttCtx;0===s.allTooltipSeriesGroups.length&&(s.allTooltipSeriesGroups=e.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));const i=s.allTooltipSeriesGroups;for(let s=0;s<i.length;s++)"enable"===t?(i[s].classList.add("apexcharts-active"),i[s].style.display=e.config.tooltip.items.display):(i[s].classList.remove("apexcharts-active"),i[s].style.display="none")}}class Xe{constructor(t){this.w=t.w,this.ttCtx=t,this.tooltipUtil=new Ne(t)}drawSeriesTexts({shared:t=!0,ttItems:e,i:s=0,j:i=null,y1:a,y2:r,e:o}){const n=this.w;void 0!==n.config.tooltip.custom?this.handleCustomTooltip({i:s,j:i,y1:a,y2:r,w:n}):this.toggleActiveInactiveSeries(t,s);const l=this.getValuesToPrint({i:s,j:i});this.printLabels({i:s,j:i,values:l,ttItems:e,shared:t,e:o});const c=this.ttCtx.getElTooltip();c&&(this.ttCtx.tooltipRect.ttWidth=c.getBoundingClientRect().width,this.ttCtx.tooltipRect.ttHeight=c.getBoundingClientRect().height)}printLabels({i:t,j:e,values:s,ttItems:i,shared:a,e:r}){const o=this.w,{xVal:n,zVal:l,xAxisTTVal:c}=s,h=o.seriesData.series.length,d=null!==e&&o.config.plotOptions.bar.distributed?o.globals.colors[e]:o.globals.colors[t];for(let s=0;s<h;s++){const p=o.config.tooltip.inverseOrder?h-1-s:s,g=this.computeSeriesRow({i:t,j:e,t:s,tIndex:p,shared:a,e:r,basePColor:d});this.DOMHandling({i:t,t:p,j:e,ttItems:i,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:s,shared:i,e:a,basePColor:r}){const o=this.w;let c,h=this.getFormatters(t),d=r,p=[],g="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&&(i?(h=this.getFormatters(s),g=this.getSeriesName({fn:h.yLbTitleFormatter,index:s,seriesIndex:t,j:e}),d=o.globals.colors[s],c=this.formatYValue(h,s,e),p=this.formatGoalVals(h,s,e)):(d=this.resolvePatternColor(a,d),c=this.formatYValue(h,t,e),p=this.formatGoalVals(h,t,e))),null===e&&(c=h.yLbFormatter(o.seriesData.series[t],l(n({},o),{seriesIndex:t,dataPointIndex:t}))),{seriesName:g,val:c,goalVals:p,pColor:d}}formatYValue(t,e,s){var i,a,r,o;const n=this.w;return n.axisFlags.isRangeData?t.yLbFormatter(null==(a=null==(i=n.rangeData.seriesRangeStart)?void 0:i[e])?void 0:a[s],{series:n.rangeData.seriesRangeStart,seriesIndex:e,dataPointIndex:s,w:n})+" - "+t.yLbFormatter(null==(o=null==(r=n.rangeData.seriesRangeEnd)?void 0:r[e])?void 0:o[s],{series:n.rangeData.seriesRangeEnd,seriesIndex:e,dataPointIndex:s,w:n}):t.yLbFormatter(n.seriesData.series[e][s],{series:n.seriesData.series,seriesIndex:e,dataPointIndex:s,w:n})}formatGoalVals(t,e,s){var i;const a=this.w,r=null==(i=a.seriesData.seriesGoals[e])?void 0:i[s];return Array.isArray(r)?r.map(i=>({attrs:i,val:t.yLbFormatter(i.value,{seriesIndex:e,dataPointIndex:s,w:a})})):[]}resolvePatternColor(t,e){var s,i,a;const r=this.w,o=null==(s=null==t?void 0:t.target)?void 0:s.getAttribute("fill");if(!o)return e;if(-1===o.indexOf("url"))return o;if(-1===o.indexOf("Pattern"))return e;const n=r.dom.baseEl.querySelector(o.substr(4).slice(0,-1));return null!=(a=null==(i=null==n?void 0:n.childNodes[0])?void 0:i.getAttribute("stroke"))?a:e}getFormatters(t){const e=this.w;let s,i=e.formatters.yLabelFormatters[t];return void 0!==e.formatters.ttVal?Array.isArray(e.formatters.ttVal)?(i=e.formatters.ttVal[t]&&e.formatters.ttVal[t].formatter,s=e.formatters.ttVal[t]&&e.formatters.ttVal[t].title&&e.formatters.ttVal[t].title.formatter):(i=e.formatters.ttVal.formatter,"function"==typeof e.formatters.ttVal.title.formatter&&(s=e.formatters.ttVal.title.formatter)):s=e.config.tooltip.y.title.formatter,"function"!=typeof i&&(i=e.formatters.yLabelFormatters[0]?e.formatters.yLabelFormatters[0]:function(t){return t}),"function"!=typeof s&&(s=function(t){return t?t+": ":""}),{yLbFormatter:i,yLbTitleFormatter:s}}getSeriesName({fn:t,index:e,seriesIndex:s,j:i}){const a=this.w;return t(String(a.seriesData.seriesNames[e]),{series:a.seriesData.series,seriesIndex:s,dataPointIndex:i,w:a})}DOMHandling({t:t,j:e,ttItems:s,values:i,seriesName:a,shared:r,pColor:o}){const n=this.w,l=this.ttCtx,{val:c,goalVals:h,xVal:d,xAxisTTVal:p,zVal:g}=i;if(!s||!s[t])return;let u=null;u=s[t].children,n.config.tooltip.fillSeriesColor&&(s[t].style.backgroundColor=o,u[0].style.display="none"),l.showTooltipTitle&&(null===l.tooltipTitle&&(l.tooltipTitle=n.dom.baseEl.querySelector(".apexcharts-tooltip-title")),l.tooltipTitle&&(l.tooltipTitle.innerHTML=d)),l.isXAxisTooltipEnabled&&l.xaxisTooltipText&&(l.xaxisTooltipText.innerHTML=""!==p?p:d);const x=s[t].querySelector(".apexcharts-tooltip-text-y-label");x&&(x.innerHTML=a||"");const f=s[t].querySelector(".apexcharts-tooltip-text-y-value");f&&(f.innerHTML=void 0!==c?c:""),u[0]&&u[0].classList.contains("apexcharts-tooltip-marker")&&(n.config.tooltip.marker.fillColors&&Array.isArray(n.config.tooltip.marker.fillColors)&&(o=n.config.tooltip.marker.fillColors[t]),n.config.tooltip.fillSeriesColor?u[0].style.backgroundColor=o:u[0].style.color=o),n.config.tooltip.marker.show||(u[0].style.display="none");const m=s[t].querySelector(".apexcharts-tooltip-text-goals-label"),b=s[t].querySelector(".apexcharts-tooltip-text-goals-value");if(h.length&&n.seriesData.seriesGoals[t]){const s=()=>{let t="<div>",e="<div>";h.forEach(s=>{t+=` <div style="display: flex"><span class="apexcharts-tooltip-marker" style="background-color: ${s.attrs.strokeColor}; height: 3px; border-radius: 0; top: 5px;"></span> ${s.attrs.name}</div>`,e+=`<div>${s.val}</div>`}),m.innerHTML=t+"</div>",b.innerHTML=e+"</div>"};r?n.seriesData.seriesGoals[t][e]&&Array.isArray(n.seriesData.seriesGoals[t][e])?s():(m.innerHTML="",b.innerHTML=""):s()}else m.innerHTML="",b.innerHTML="";if(null!==g){s[t].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=n.config.tooltip.z.title;s[t].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=void 0!==g?g:""}if(r&&u[0]){if(n.config.tooltip.hideEmptySeries){const e=s[t].querySelector(".apexcharts-tooltip-marker"),i=s[t].querySelector(".apexcharts-tooltip-text");0==parseFloat(c)?(e.style.display="none",i.style.display="none"):(e.style.display="block",i.style.display="block")}null==c||n.globals.ancillaryCollapsedSeriesIndices.indexOf(t)>-1||n.globals.collapsedSeriesIndices.indexOf(t)>-1||Array.isArray(l.tConfig.enabledOnSeries)&&-1===l.tConfig.enabledOnSeries.indexOf(t)?u[0].parentNode.style.display="none":u[0].parentNode.style.display=n.config.tooltip.items.display}else Array.isArray(l.tConfig.enabledOnSeries)&&-1===l.tConfig.enabledOnSeries.indexOf(t)&&(u[0].parentNode.style.display="none")}toggleActiveInactiveSeries(t,e){const s=this.w;if(t)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");const t=s.dom.baseEl.querySelector(`.apexcharts-tooltip-series-group-${e}`);if(t){const e=t;e.classList.add("apexcharts-active"),e.style.display=s.config.tooltip.items.display}}}getValuesToPrint({i:t,j:e}){var s,i,a,r,o,n,l,c;const h=this.w,d=h.seriesData.seriesX.map(t=>t.length>0?t:[]);let p="",g="",u=null,x=null;const f={series:h.seriesData.series,seriesIndex:t,dataPointIndex:e,w:h},m=h.formatters.ttZFormatter;if(null===e)x=h.seriesData.series[t];else if(h.axisFlags.isXNumeric&&"treemap"!==h.config.chart.type){if(p=d[t][e],0===d[t].length){p=d[this.tooltipUtil.getFirstActiveXArray(d)][e]}}else{p=new Pe(this.w).isFormatXY()?void 0!==h.config.series[t].data[e]?h.config.series[t].data[e].x:"":void 0!==h.labelData.labels[e]?h.labelData.labels[e]:""}const b=p;if(h.axisFlags.isXNumeric&&"datetime"===h.config.xaxis.type){p=new w(this.w).xLabelFormat(h.formatters.ttKeyFormatter,b,b,{i:void 0,dateFormatter:new y(this.w).formatDate,w:this.w})}else p=h.globals.isBarHorizontal?h.formatters.yLabelFormatters[0](b,f):null!=(a=null==(i=(s=h.formatters).xLabelFormatter)?void 0:i.call(s,b,f))?a:b;return void 0!==h.config.tooltip.x.formatter&&(p=null!=(n=null==(o=(r=h.formatters).ttKeyFormatter)?void 0:o.call(r,b,f))?n:b),h.seriesData.seriesZ.length>0&&h.seriesData.seriesZ[t].length>0&&(u=null==m?void 0:m(h.seriesData.seriesZ[t][e],h)),g="function"==typeof h.config.xaxis.tooltip.formatter?null==(c=(l=h.formatters).xaxisTooltipFormatter)?void 0:c.call(l,b,f):p,{val:Array.isArray(x)?x.join(" "):x,xVal:Array.isArray(p)?p.join(" "):p,xAxisTTVal:Array.isArray(g)?g.join(" "):g,zVal:u}}handleCustomTooltip({i:t,j:e,y1:s,y2:i,w:a}){const r=this.ttCtx.getElTooltip();let o=a.config.tooltip.custom;Array.isArray(o)&&o[t]&&(o=o[t]);const n=o({series:a.seriesData.series,seriesIndex:t,dataPointIndex:e,y1:s,y2:i,w:a});r&&("string"==typeof n||"number"==typeof n?r.innerHTML=String(n):(n instanceof Element||"string"==typeof n.nodeName)&&(r.innerHTML="",r.appendChild(n.cloneNode(!0))))}}class Ie{constructor(t){this.ttCtx=t,this.w=t.w}moveXCrosshairs(t,e=null){const s=this.ttCtx,i=this.w,a=s.getElXCrosshairs();let r=t-s.xcrosshairsWidth/2;const o=i.labelData.labels.slice().length;if(null!==e&&(r=i.layout.gridWidth/o*e),null===a||i.globals.isBarHorizontal||(a.setAttribute("x",String(r)),a.setAttribute("x1",String(r)),a.setAttribute("x2",String(r)),a.setAttribute("y2",String(i.layout.gridHeight)),a.classList.add("apexcharts-active")),r<0&&(r=0),r>i.layout.gridWidth&&(r=i.layout.gridWidth),s.isXAxisTooltipEnabled){let t=r;"tickWidth"!==i.config.xaxis.crosshairs.width&&"barWidth"!==i.config.xaxis.crosshairs.width||(t=r+s.xcrosshairsWidth/2),this.moveXAxisTooltip(t)}}moveYCrosshairs(t){const e=this.ttCtx;null!==e.ycrosshairs&&ut.setAttrs(e.ycrosshairs,{y1:t,y2:t}),null!==e.ycrosshairsHidden&&ut.setAttrs(e.ycrosshairsHidden,{y1:t,y2:t})}moveXAxisTooltip(t){var e,s;const i=this.w,a=this.ttCtx;if(null!==a.xaxisTooltip&&0!==a.xcrosshairsWidth){a.xaxisTooltip.classList.add("apexcharts-active");const r=a.xaxisOffY+i.config.xaxis.tooltip.offsetY+i.layout.translateY+5+i.config.xaxis.offsetY;if(t-=a.xaxisTooltip.getBoundingClientRect().width/2,!isNaN(t)){t+=i.layout.translateX;const o=new ut(this.w).getTextRects(null!=(s=null==(e=a.xaxisTooltipText)?void 0:e.innerHTML)?s:"",i.config.xaxis.labels.style.fontSize);a.xaxisTooltipText&&(a.xaxisTooltipText.style.minWidth=o.width+"px"),a.xaxisTooltip.style.left=t+"px",a.xaxisTooltip.style.top=r+"px"}}}moveYAxisTooltip(t){var e,s;const i=this.w,a=this.ttCtx;null===a.yaxisTTEls&&(a.yaxisTTEls=[...i.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip")]);const r=parseInt(null!=(s=null==(e=a.ycrosshairsHidden)?void 0:e.getAttribute("y1"))?s:"0",10);let o=i.layout.translateY+r;if(a.yaxisTTEls){const e=a.yaxisTTEls[t].getBoundingClientRect(),s=e.height;let r;const n=i.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${t}'] .apexcharts-yaxis-texts-g`),l=i.dom.elWrap.getBoundingClientRect();if(n){const t=n.getBoundingClientRect();if(t.width>0){r=t.left+t.width/2-l.left-e.width/2}}if(null==r){const s=4;r=i.config.yaxis[t].opposite?i.globals.translateYAxisX[t]+s:i.globals.translateYAxisX[t]-e.width-s}o-=s/2,-1===i.globals.ignoreYAxisIndexes.indexOf(t)&&o>0&&o<i.layout.gridHeight?(a.yaxisTTEls[t].classList.add("apexcharts-active"),a.yaxisTTEls[t].style.top=o+"px",a.yaxisTTEls[t].style.left=r+i.config.yaxis[t].tooltip.offsetX+"px"):a.yaxisTTEls[t].classList.remove("apexcharts-active")}}moveTooltip(t,e,s=null){const i=this.ttCtx.getElTooltip();if(!i)return;const a=this.computeTooltipPosition(t,e,s);null!==a&&this.applyTooltipPosition(i,a)}computeTooltipPosition(t,e,s=null){var i,a,r,o,n,l,c;const h=this.w,d=this.ttCtx,p=d.tooltipRect,g=!!h.config.tooltip.arrow,u=null!==s?parseFloat(String(s)):1,x=p.ttHeight||0,f=p.ttWidth||0,m=parseFloat(String(t)),b=parseFloat(String(e));if(isNaN(m))return null;let y=m+u+5;const w=b+h.layout.translateY;let v=g?w-x/2+u/2:b+u/2,A="right";if(y>h.layout.gridWidth/2&&(y=y-f-u-10,A="left"),y>h.layout.gridWidth-f-10&&(y=h.layout.gridWidth-f),y<-20&&(y=-20),h.config.tooltip.followCursor){const t=d.getElGrid();if(!t)return null;const e=t.getBoundingClientRect();y=d.e.clientX-e.left,y>h.layout.gridWidth/2?(y-=f,A="left"):A="right",v=d.e.clientY+h.layout.translateY-e.top,v>h.layout.gridHeight/2&&(v-=x)}else if(!h.globals.isBarHorizontal)if(g){const t=h.layout.translateY,e=h.layout.translateY+h.layout.gridHeight;v+x>e&&(v=e-x),v<t&&(v=t)}else x/2+v>h.layout.gridHeight&&(v=h.layout.gridHeight-x+h.layout.translateY);if(isNaN(y))return null;y+=h.layout.translateX;const C=null==(a=null==(i=h.config)?void 0:i.chart)?void 0:a.accessibility;if((null==C?void 0:C.enabled)&&(null==(o=null==(r=null==C?void 0:C.keyboard)?void 0:r.navigation)?void 0:o.enabled)&&(null==(c=null==(l=null==(n=h.dom)?void 0:n.baseEl)?void 0:l.querySelector)?void 0:c.call(l,".apexcharts-keyboard-focused"))){const t=g?w:b,e=(u||1)+12,s=v,i=v+x;!isNaN(t)&&x>0&&s<t+e&&i>t-e&&(v=t-x-e,v<0&&(v=t+e))}let S=null;if(g&&x>0){const t=w-v,e=10,s=x-10;S=Math.max(e,Math.min(s,t))}return{x:y,y:v,placement:A,arrowY:S}}applyTooltipPosition(t,e){if(!t)return;const s="true"!==t.dataset.positioned;s&&(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"),s&&(t.offsetWidth,t.dataset.positioned="true",requestAnimationFrame(()=>{t.style.transitionProperty=""}))}moveMarkers(t,e){var s;const i=this.w,a=this.ttCtx;if(i.globals.markers.size[t]>0){const r=i.dom.baseEl.querySelectorAll(` .apexcharts-series[data\\:realIndex='${t}'] .apexcharts-marker`);for(let t=0;t<r.length;t++)parseInt(null!=(s=r[t].getAttribute("rel"))?s:"0",10)===e&&(a.marker.resetPointsSize(),a.marker.enlargeCurrentPoint(e,r[t]))}else a.marker.resetPointsSize(),this.moveDynamicPointOnHover(e,t)}moveDynamicPointOnHover(t,e){var s,i,a,r,o;const n=this.w,l=this.ttCtx;let c=0,h=0;const d=new ut(this.w),p=n.globals.pointsArray,g=l.tooltipUtil.getHoverMarkerSize(e),u=n.config.series[e].type;if(u&&("column"===u||"candlestick"===u||"boxPlot"===u||"violin"===u))return;c=null==(i=null==(s=p[e])?void 0:s[t])?void 0:i[0],h=(null==(r=null==(a=p[e])?void 0:a[t])?void 0:r[1])||0;const x=n.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${e}'] .apexcharts-series-markers path`);if(x&&h<n.layout.gridHeight&&h>0){const t=null!=(o=x.getAttribute("shape"))?o:"circle",e=d.getMarkerPath(c,h,t,1.5*g);x.setAttribute("d",e)}this.moveXCrosshairs(c),l.fixedTooltip||this.moveTooltip(c,h,g)}moveDynamicPointsOnHover(t){var e,s;const i=this.ttCtx,a=i.w;let r=0,o=0,n=0;const l=a.globals.pointsArray,c=new ee(this.w),h=new ut(this.w);n=c.getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);const d=i.tooltipUtil.getHoverMarkerSize(n);if((null==(e=l[n])?void 0:e[t])&&(r=l[n][t][0],o=l[n][t][1]),isNaN(r))return;const p=i.tooltipUtil.getAllMarkers();if(p.length)for(let e=0;e<a.seriesData.series.length;e++){const i=l[e];if(a.globals.comboCharts&&void 0===i&&p.splice(e,0,null),p[e]&&i&&i.length){let i,o=l[e][t][1];p[e].setAttribute("cx",r);const n=null!=(s=p[e].getAttribute("shape"))?s:"circle";if("rangeArea"===a.config.chart.type&&!a.globals.comboCharts){const s=t+a.seriesData.series[e].length;i=l[e][s][1];o-=Math.abs(o-i)/2}if(null!==o&&!isNaN(o)&&o<a.layout.gridHeight+d&&o+d>0){const t=h.getMarkerPath(r,o,n,d);p[e].setAttribute("d",t)}else p[e].setAttribute("d","")}}this.moveXCrosshairs(r),i.fixedTooltip||this.moveTooltip(r,o||a.layout.gridHeight,d)}moveStickyTooltipOverBars(t,e){var s,i,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 ee(this.w).getActiveConfigSeriesIndex("desc")+1}let d=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[j='${t}'], .apexcharts-rangebar-series .apexcharts-series[rel='${h}'] path[j='${t}']`);d||"number"!=typeof e||(d=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[j='${t}'],\n .apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='${e}'] path[j='${t}']`));let p=null;const g=n.globals.barCanvasCoords;if(!d&&g&&(p="number"==typeof e&&(null==(s=g[e])?void 0:s[t])||null,!p))for(const e in g)if(null==(i=g[e])?void 0:i[t]){p=g[e][t];break}let u=d?parseFloat(null!=(a=d.getAttribute("cx"))?a:"0"):p?p.cx:0,x=d?parseFloat(null!=(r=d.getAttribute("cy"))?r:"0"):p?p.cy:0;const f=d?parseFloat(null!=(o=d.getAttribute("barWidth"))?o:"0"):p?p.barWidth:0,m=l.getElGrid();if(!m)return;const b=m.getBoundingClientRect(),y=d&&(d.classList.contains("apexcharts-candlestick-area")||d.classList.contains("apexcharts-boxPlot-area"));if(n.axisFlags.isXNumeric){if(d&&!y){const e=this._datapointCenterXFromBars(t,b);null!=e?u=e:u-=c%2!=0?f/2:0}d&&y&&(u-=f/2)}else n.globals.isBarHorizontal||p||(u=l.xAxisTicksPositions[t-1]+l.dataPointsDividedWidth/2,isNaN(u)&&(u=l.xAxisTicksPositions[t]-l.dataPointsDividedWidth/2));if(n.globals.isBarHorizontal?x-=l.tooltipRect.ttHeight:n.config.tooltip.followCursor?x=l.e.clientY-b.top-l.tooltipRect.ttHeight/2:x+l.tooltipRect.ttHeight+15>n.layout.gridHeight&&(x=n.layout.gridHeight),n.globals.isBarHorizontal||this.moveXCrosshairs(u),!l.fixedTooltip){if(n.globals.isBarHorizontal&&!n.config.tooltip.followCursor){if(this.placeHorizontalSharedTooltip(t))return}this.moveTooltip(u,x||n.layout.gridHeight)}}_datapointCenterXFromBars(t,e){var s,i;const a=this.w,r=a.dom.baseEl.querySelectorAll(`.apexcharts-bar-series path[j='${t}'],.apexcharts-rangebar-series path[j='${t}']`);if(!r.length)return null;let o=1/0,n=-1/0;for(const t of r){const e=t.parentNode;if(null==(i=null==(s=null==e?void 0:e.classList)?void 0:s.contains)?void 0:i.call(s,"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)?(o+n)/2-e.left-(a.globals.barPadForNumericAxis||0):null}placeHorizontalSharedTooltip(t){var e,s;const i=this.w,a=this.ttCtx,r=a.getElTooltip();if(!r)return!1;const o=a.getElGrid();if(!o)return!1;const n=o.getBoundingClientRect(),l=i.dom.baseEl.querySelectorAll(`.apexcharts-bar-series path[j='${t}'],.apexcharts-rangebar-series path[j='${t}'],.apexcharts-boxPlot-series path[j='${t}']`);if(!l.length)return!1;let c=1/0,h=-1/0,d=1/0,p=-1/0;for(const t of l){const i=t.parentNode;if(null==(s=null==(e=null==i?void 0:i.classList)?void 0:e.contains)?void 0:s.call(e,"apexcharts-series-collapsed"))continue;const a=t.getBoundingClientRect();0===a.width&&0===a.height||(a.left<c&&(c=a.left),a.right>h&&(h=a.right),a.top<d&&(d=a.top),a.bottom>p&&(p=a.bottom))}if(!isFinite(c))return!1;const g=a.tooltipRect.ttWidth||0,u=a.tooltipRect.ttHeight||0,x=(c+h)/2-n.left+i.layout.translateX,f=d-n.top+i.layout.translateY,m=p-n.top+i.layout.translateY,b=i.layout.translateY,y=i.layout.translateY+i.layout.gridHeight,w=i.layout.translateX,v=i.layout.translateX+i.layout.gridWidth;let A="top",C=f-u-7;if(C<b){const t=m+7;t+u<=y&&(A="bottom",C=t)}let S=x-g/2;S<w&&(S=w),S+g>v&&(S=v-g);const k=Math.max(10,Math.min(g-10,x-S));return this.applyTooltipPosition(r,{x:S,y:C,placement:A,arrowY:null,arrowX:k}),!0}}function Re(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 ze{constructor(t){this.w=t.w,this.ttCtx=t,this.ctx=t.ctx,this.tooltipPosition=new Ie(t)}drawDynamicPoints(){const t=this.w,e=new ut(this.w),s=new yt(this.w,this.ctx),i=[...t.dom.baseEl.querySelectorAll(".apexcharts-series")];t.config.chart.stacked&&i.sort((t,e)=>parseFloat(t.getAttribute("data:realIndex"))-parseFloat(e.getAttribute("data:realIndex")));for(let a=0;a<i.length;a++){const r=i[a].querySelector(".apexcharts-series-markers-wrap");if(null!==r){let i=`apexcharts-marker w${(Math.random()+1).toString(36).substring(4)}`;"line"!==t.config.chart.type&&"area"!==t.config.chart.type||t.globals.comboCharts||t.config.tooltip.intersect||(i+=" no-pointer-events");const a=s.getMarkerConfig({cssClass:i,seriesIndex:Number(r.getAttribute("data:realIndex"))}),o=e.drawMarker(0,0,a);o.node.setAttribute("default-marker-size",0);const n=m.createElementNS(P,"g");n.classList.add("apexcharts-series-markers"),n.appendChild(o.node),r.appendChild(n)}}}enlargeCurrentPoint(t,e,s=null,i=null){const a=this.w;"bubble"!==a.config.chart.type&&this.newPointSize(t,e);let r=e.getAttribute("cx"),o=e.getAttribute("cy");if(null!==s&&null!==i&&(r=s,o=i),this.tooltipPosition.moveXCrosshairs(r),!this.fixedTooltip){if("radar"===a.config.chart.type){const t=this.ttCtx.getElGrid();if(!t)return;const e=t.getBoundingClientRect();r=this.ttCtx.e.clientX-e.left}this.tooltipPosition.moveTooltip(r,o,a.config.markers.hover.size)}}enlargePoints(t){var e,s;const i=this.w,a=this,r=this.ttCtx,o=t,n=i.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker");let l=i.config.markers.hover.size;for(let t=0;t<n.length;t++){const c=n[t].getAttribute("rel"),h=n[t].getAttribute("index");if(void 0===l&&(l=i.globals.markers.size[h]+i.config.markers.hover.sizeOffset),o===parseInt(null!=c?c:"0",10)){a.newPointSize(o,n[t]);const i=null!=(e=n[t].getAttribute("cx"))?e:"0",c=null!=(s=n[t].getAttribute("cy"))?s:"0";a.tooltipPosition.moveXCrosshairs(parseFloat(i)),r.fixedTooltip||a.tooltipPosition.moveTooltip(parseFloat(i),parseFloat(c),l)}else a.oldPointSize(n[t])}}newPointSize(t,e){const s=this.w;let i=s.config.markers.hover.size;const a=0===t?e.parentNode.firstChild:e.parentNode.lastChild;if("0"!==a.getAttribute("default-marker-size")){const t=parseInt(a.getAttribute("index"),10);void 0===i&&(i=s.globals.markers.size[t]+s.config.markers.hover.sizeOffset),i<0&&(i=0);const r=this.ttCtx.tooltipUtil.getPathFromPoint(e,i);e.setAttribute("d",r)}}oldPointSize(t){const e=parseFloat(t.getAttribute("default-marker-size")),s=this.ttCtx.tooltipUtil.getPathFromPoint(t,e);t.setAttribute("d",s)}resetPointsSize(){var t;const e=this.w.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker");for(let s=0;s<e.length;s++){const i=parseFloat(null!=(t=e[s].getAttribute("default-marker-size"))?t:"0");if(b.isNumber(i)&&i>0){const t=this.ttCtx.tooltipUtil.getPathFromPoint(e[s],i);e[s].setAttribute("d",t)}else e[s].setAttribute("d","M0,0")}}}class Ye{constructor(t){this.w=t.w;const e=this.w;this.ttCtx=t,this.isVerticalGroupedRangeBar=!e.globals.isBarHorizontal&&"rangeBar"===e.config.chart.type&&e.config.plotOptions.bar.rangeBarGroupRows}getAttr(t,e){var s;return parseFloat(null!=(s=t.target.getAttribute(e))?s:"")}handleHeatTreeTooltip({e:t,opt:e,x:s,y:i,type:a}){var r,o;const n=this.ttCtx,l=this.w;if(t.target.classList.contains(`apexcharts-${a}-rect`)){const a=this.getAttr(t,"i"),c=this.getAttr(t,"j"),h=this.getAttr(t,"cx"),d=this.getAttr(t,"cy"),p=this.getAttr(t,"width"),g=this.getAttr(t,"height");if(n.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:a,j:c,shared:!1,e:t}),l.interact.capturedSeriesIndex=a,l.interact.capturedDataPointIndex=c,s=h+n.tooltipRect.ttWidth/2+p,i=d+n.tooltipRect.ttHeight/2-g/2,n.tooltipPosition.moveXCrosshairs(h+p/2),s>l.layout.gridWidth/2&&(s=h-n.tooltipRect.ttWidth/2+p),n.w.config.tooltip.followCursor){const t=l.dom.elWrap.getBoundingClientRect();s=(null!=(r=l.interact.clientX)?r:0)-t.left-(s>l.layout.gridWidth/2?n.tooltipRect.ttWidth:0),i=(null!=(o=l.interact.clientY)?o:0)-t.top-(i>l.layout.gridHeight/2?n.tooltipRect.ttHeight:0)}}return{x:s,y:i}}handleMarkerTooltip({e:t,opt:e,x:s,y:i}){const a=this.w,r=this.ttCtx;let o,n;if(t.target.classList.contains("apexcharts-marker")){const l=parseInt(e.paths.getAttribute("cx"),10),c=parseInt(e.paths.getAttribute("cy"),10),h=parseFloat(e.paths.getAttribute("val"));if(n=parseInt(e.paths.getAttribute("rel"),10),o=parseInt(e.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,r.intersect){const t=b.findAncestor(e.paths,"apexcharts-series");t&&(o=parseInt(t.getAttribute("data:realIndex"),10))}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;if(s=l,!!a.config.tooltip.arrow?i=c:(i=c+a.layout.translateY-1.4*r.tooltipRect.ttHeight,h<0&&(i=c)),r.w.config.tooltip.followCursor){const t=r.getElGrid();if(!t)return{x:s,y:i};const e=t.getBoundingClientRect();i=r.e.clientY+a.layout.translateY-e.top}r.marker.enlargeCurrentPoint(n,e.paths,s,i)}return{x:s,y:i}}handleBarTooltip({e:t,opt:e}){var s,i,a;const r=this.w,o=this.ttCtx,n=o.getElTooltip();let l,c=0,h=0,d=0,p=0;const g=this.getBarTooltipXY({e:t,opt:e});if(null===g.j&&0===g.barHeight&&0===g.barWidth)return;p=g.i;const u=g.j;if(r.interact.capturedSeriesIndex=p,r.interact.capturedDataPointIndex=null!==u?u:r.interact.capturedDataPointIndex,r.globals.isBarHorizontal&&o.tooltipUtil.hasBars()||!r.config.tooltip.shared?(h=g.x,d=g.y,l=Array.isArray(r.config.stroke.width)?r.config.stroke.width[p]:r.config.stroke.width,c=h):r.globals.comboCharts||r.config.tooltip.shared||(c/=2),isNaN(d)&&(d=r.globals.svgHeight-o.tooltipRect.ttHeight),h+o.tooltipRect.ttWidth>r.layout.gridWidth?h-=o.tooltipRect.ttWidth:h<0&&(h=0),o.w.config.tooltip.followCursor){if(!o.getElGrid())return}if(null===o.tooltip&&(o.tooltip=r.dom.baseEl.querySelector(".apexcharts-tooltip")),r.config.tooltip.shared||(r.globals.comboBarCount>0?o.tooltipPosition.moveXCrosshairs(c+l/2):o.tooltipPosition.moveXCrosshairs(c)),!o.fixedTooltip&&(!r.config.tooltip.shared||r.globals.isBarHorizontal&&o.tooltipUtil.hasBars())&&(d=d+r.layout.translateY-o.tooltipRect.ttHeight/2,n)){const t=o.tooltipRect.ttWidth||0,e=o.tooltipRect.ttHeight||0,l=!!r.config.tooltip.arrow,{barAnchorXInGrid:c,barAnchorYInGrid:p,barRectInGrid:u}=g,x=7,f=null==(s=o.getElGrid())?void 0:s.getBoundingClientRect(),m=r.dom.elWrap.getBoundingClientRect(),b=f?f.left-m.left:r.layout.translateX;let y,w=null,v=null,A=h+b,C=d;if(l&&r.globals.isBarHorizontal&&null!=u){const s=r.layout.translateY,i=r.layout.translateY+r.layout.gridHeight,a=b,o=b+r.layout.gridWidth,n=(u.left+u.right)/2+b,l=u.top+r.layout.translateY,c=u.bottom+r.layout.translateY;let h=l-e-x;if(y="top",h<s){const t=c+x;t+e<=i&&(y="bottom",h=t)}C=h,A=n-t/2,A<a&&(A=a),A+t>o&&(A=o-t),v=Math.max(10,Math.min(t-10,n-A))}else if(l&&null!=c&&null!=p){const s=c+b,o=b+r.layout.gridWidth/2,n=(null!=(i=null==u?void 0:u.left)?i:c)+b,l=(null!=(a=null==u?void 0:u.right)?a:c)+b;if(s<o?(y="right",A=l+x):(y="left",A=n-t-x),u){C=(u.top+u.bottom)/2+r.layout.translateY-e/2;const t=r.layout.translateY,s=r.layout.translateY+r.layout.gridHeight;C<t&&(C=t),C+e>s&&(C=s-e)}if(e>0&&u){const t=(u.top+u.bottom)/2+r.layout.translateY;w=Math.max(10,Math.min(e-10,t-C))}}o.tooltipPosition.applyTooltipPosition(n,{x:A,y:C,placement:y,arrowY:w,arrowX:v})}}getBarTooltipXY({e:t,opt:e}){const s=this.w;let i=null;const a=this.ttCtx;let r=0,o=0,n=0,l=0,c=0,h=null,d=null,p=null,g=null,u=null;const x=t.target.classList;if(x.contains("apexcharts-bar-area")||x.contains("apexcharts-candlestick-area")||x.contains("apexcharts-boxPlot-area")||x.contains("apexcharts-rangebar-area")){const x=t.target,f=x.getBoundingClientRect(),m=e.elGrid.getBoundingClientRect(),b=f.height;c=f.height;const y=f.width,w=parseInt(x.getAttribute("cx"),10),v=parseInt(x.getAttribute("cy"),10);h=w,d=v,l=parseFloat(x.getAttribute("barWidth"));const A=f.left-m.left,C=f.top-m.top,S=C+b/2;p=A+y/2,g=s.globals.isBarHorizontal?S:C,u={left:A,top:C,right:A+y,bottom:C+b};const k="touchmove"===t.type?t.touches[0].clientX:t.clientX;i=parseInt(x.getAttribute("j"),10),r=parseInt(x.parentNode.getAttribute("rel"),10)-1;const M=x.getAttribute("data-range-y1"),D=x.getAttribute("data-range-y2");s.globals.comboCharts&&(r=parseInt(x.parentNode.getAttribute("data:realIndex"),10));const T=t=>s.axisFlags.isXNumeric?w-y/2:this.isVerticalGroupedRangeBar?w+y/2:w-a.dataPointsDividedWidth+y/2,L=()=>v-a.dataPointsDividedHeight+b/2-a.tooltipRect.ttHeight/2;a.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:r,j:i,y1:M?parseInt(M,10):null,y2:D?parseInt(D,10):null,shared:!a.showOnIntersect&&s.config.tooltip.shared,e:t}),s.config.tooltip.followCursor?s.globals.isBarHorizontal?(o=k-m.left+15,n=L()):(o=T(o),n=t.clientY-m.top-a.tooltipRect.ttHeight/2-15):s.globals.isBarHorizontal?(o=w,a.xyRatios&&o<a.xyRatios.baseLineInvertedY&&(o=w-a.tooltipRect.ttWidth),n=L()):(o=T(o),n=v)}return{x:o,y:n,barHeight:c,barWidth:l,i:r,j:i,barCx:h,barCy:d,barAnchorXInGrid:p,barAnchorYInGrid:g,barRectInGrid:u}}}class He{constructor(t){this.w=t.w,this.ttCtx=t}drawXaxisTooltip(){const t=this.w,e=this.ttCtx,s="bottom"===t.config.xaxis.position;e.xaxisOffY=s?t.layout.gridHeight+1:-t.layout.xAxisHeight-t.config.xaxis.axisTicks.height+3;const i=s?"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=m.createElementNS("http://www.w3.org/1999/xhtml","div"),e.xaxisTooltip.setAttribute("class",i+" apexcharts-theme-"+t.config.tooltip.theme),a.appendChild(e.xaxisTooltip),e.xaxisTooltipText=m.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 s=0;s<t.config.yaxis.length;s++){const i=t.config.yaxis[s].opposite||t.config.yaxis[s].crosshairs.opposite;e.yaxisOffX=i?t.layout.gridWidth+1:1;const a=i?`apexcharts-yaxistooltip apexcharts-yaxistooltip-${s} apexcharts-yaxistooltip-right`:`apexcharts-yaxistooltip apexcharts-yaxistooltip-${s} apexcharts-yaxistooltip-left`,r=t.dom.elWrap;null===t.dom.baseEl.querySelector(`.apexcharts-yaxistooltip.apexcharts-yaxistooltip-${s}`)&&(e.yaxisTooltip=m.createElementNS("http://www.w3.org/1999/xhtml","div"),e.yaxisTooltip.setAttribute("class",a+" apexcharts-theme-"+t.config.tooltip.theme),r.appendChild(e.yaxisTooltip),0===s&&(e.yaxisTooltipText=[]),e.yaxisTooltipText[s]=m.createElementNS("http://www.w3.org/1999/xhtml","div"),e.yaxisTooltipText[s].classList.add("apexcharts-yaxistooltip-text"),e.yaxisTooltip.appendChild(e.yaxisTooltipText[s]))}}setXCrosshairWidth(){var t,e;const s=this.w,i=this.ttCtx,a=i.getElXCrosshairs();if(i.xcrosshairsWidth=parseInt(s.config.xaxis.crosshairs.width,10),s.globals.comboCharts){const t=s.dom.baseEl.querySelector(".apexcharts-bar-area");if(null!==t&&"barWidth"===s.config.xaxis.crosshairs.width){const s=parseFloat(null!=(e=t.getAttribute("barWidth"))?e:"0");i.xcrosshairsWidth=s}else if("tickWidth"===s.config.xaxis.crosshairs.width){const t=s.labelData.labels.length;i.xcrosshairsWidth=s.layout.gridWidth/t}}else if("tickWidth"===s.config.xaxis.crosshairs.width){const t=s.labelData.labels.length;i.xcrosshairsWidth=s.layout.gridWidth/t}else if("barWidth"===s.config.xaxis.crosshairs.width){const e=s.dom.baseEl.querySelector(".apexcharts-bar-area");if(null!==e){const s=parseFloat(null!=(t=e.getAttribute("barWidth"))?t:"0");i.xcrosshairsWidth=s}else i.xcrosshairsWidth=1}s.globals.isBarHorizontal&&(i.xcrosshairsWidth=0),null!==a&&i.xcrosshairsWidth>0&&a.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,s){const i=this.ttCtx,a=this.w,r=a.globals,o=r.seriesYAxisMap[t];if(i.yaxisTooltips[t]&&o.length>0){const n=a.formatters.yLabelFormatters[t],l=i.getElGrid();if(!l)return;const c=l.getBoundingClientRect(),h=o[0];let d=0;s.yRatio.length>1&&(d=h);const p=(e-c.top)*s.yRatio[d],g=r.maxYArr[h]-r.minYArr[h];let u=r.minYArr[h]+(g-p);a.config.yaxis[t].reversed&&(u=r.maxYArr[h]-(g-p)),i.tooltipPosition.moveYCrosshairs(e-c.top),i.yaxisTooltipText[t].innerHTML=n(u),i.tooltipPosition.moveYAxisTooltip(t)}}}class Oe{constructor(t,e){this.w=t,this.ctx=e,this.tConfig=t.config.tooltip,this.tooltipUtil=new Ne(this),this.tooltipLabels=new Xe(this),this.tooltipPosition=new Ie(this),this.marker=new ze(this),this.intersect=new Ye(this),this.axesTooltip=new He(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.xaxisTooltip=null,this.xaxisTooltipText=null,this.yaxisTooltip=null,this.yaxisTooltipText=null,this.yaxisTTEls=null,this.xaxisOffY=0,this.yaxisOffX=0,this.xcrosshairsWidth=0,this.ycrosshairs=null,this.ycrosshairsHidden=null,this.tooltip=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.legendLabels=null,this.ttItems=null,this.seriesBound=null,this.seriesHoverTimeout=void 0,this.clientX=0,this.clientY=0,this.barSeriesHeight=0,this.tooltipRect={x:0,y:0,ttWidth:0,ttHeight:0}}setupDimensionCache(){const t=this.w,e=this.getElTooltip();e&&(this.updateDimensionCache(),"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 s=e.getBoundingClientRect();t.globals.dimensionCache.tooltip={width:s.width,height:s.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}}getElTooltip(t){return t||(t=this),t.w.dom.baseEl?t.w.dom.baseEl.querySelector(".apexcharts-tooltip"):null}getElXCrosshairs(){return this.w.dom.baseEl.querySelector(".apexcharts-xcrosshairs")}getElGrid(){return this.w.dom.baseEl.querySelector(".apexcharts-grid")}drawTooltip(t){const e=this.w;this.xyRatios=t,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=[],e.globals.axisCharts||(this.showTooltipTitle=!1);const s=this.getElTooltip();(null==s?void 0:s.parentNode)&&s.parentNode.removeChild(s),this.tooltipTitle=null;const i=m.createElementNS("http://www.w3.org/1999/xhtml","div");i.classList.add("apexcharts-tooltip"),e.config.tooltip.cssClass&&i.classList.add(e.config.tooltip.cssClass),i.classList.add(`apexcharts-theme-${this.tConfig.theme||"light"}`),this.tConfig.fillSeriesColor&&i.classList.add("apexcharts-tooltip-fill-series"),this.tConfig.style&&this.tConfig.style.background&&i.style.setProperty("--apx-tt-bg",this.tConfig.style.background);const a=this.tConfig.shared&&e.config.series.length>1&&!e.globals.isBarHorizontal;if(this.tConfig.arrow&&!this.tConfig.followCursor&&!this.tConfig.fixed.enabled&&!a&&!this.tConfig.fillSeriesColor&&e.globals.axisCharts){const t=m.createElementNS("http://www.w3.org/1999/xhtml","div");t.classList.add("apexcharts-tooltip-arrow"),i.appendChild(t)}if(e.config.chart.accessibility.enabled&&e.config.chart.accessibility.announcements.enabled&&(i.setAttribute("role","tooltip"),i.setAttribute("aria-live","polite"),i.setAttribute("aria-atomic","true"),i.setAttribute("aria-hidden","true")),e.dom.elWrap.appendChild(i),e.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();const t=new St(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||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=m.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,i.appendChild(this.tooltipTitle));let r=e.seriesData.series.length;(e.globals.xyCharts||e.globals.comboCharts)&&this.tConfig.shared&&(r=this.showOnIntersect?1:e.seriesData.series.length),this.legendLabels=e.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(r),this.addSVGEvents(),this.setupDimensionCache()}createTTElements(t){const e=this.w,s=[],i=this.getElTooltip();if(!i)return s;for(let a=0;a<t;a++){const r=m.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=m.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=Re(l),r.appendChild(o);const c=m.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,["y","goals","z"].forEach(t=>{const e=m.createElementNS("http://www.w3.org/1999/xhtml","div");e.classList.add(`apexcharts-tooltip-${t}-group`);const s=m.createElementNS("http://www.w3.org/1999/xhtml","span");s.classList.add(`apexcharts-tooltip-text-${t}-label`),e.appendChild(s);const i=m.createElementNS("http://www.w3.org/1999/xhtml","span");i.classList.add(`apexcharts-tooltip-text-${t}-value`),e.appendChild(i),c.appendChild(e)}),r.appendChild(c),i.appendChild(r),s.push(r)}return s}addSVGEvents(){const t=this.w,e=t.config.chart.type,s=this.getElTooltip();if(!s)return;const i=!("bar"!==e&&"candlestick"!==e&&"boxPlot"!==e&&"violin"!==e&&"rangeBar"!==e),a="area"===e||"line"===e||"scatter"===e||"bubble"===e||"radar"===e,r=t.dom.Paper.node,o=this.getElGrid();o&&(this.seriesBound=o.getBoundingClientRect());const n=[],l=[],c={hoverArea:r,elGrid:o,tooltipEl:s,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"):i?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||i&&this.tooltipUtil.hasBars()&&this.tConfig.shared)this.addPathsEventListeners([r],c);else if(i&&!t.globals.comboCharts||a&&this.showOnIntersect)this.addDatapointEventsListeners(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)}}drawFixedTooltipRect(){const t=this.w,e=this.getElTooltip();if(!e)return{x:0,y:0,ttWidth:0,ttHeight:0};const s=e.getBoundingClientRect(),i=s.width+10,a=s.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-i+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:i,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-rangebar-area");this.addPathsEventListeners(e,t)}addPathsEventListeners(t,e){const s=this;for(let i=0;i<t.length;i++){const a={paths:t[i],tooltipEl:e.tooltipEl,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:e.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map(e=>t[i].addEventListener(e,s.onSeriesHover.bind(s,a),{capture:!1,passive:!0}))}}onSeriesHover(t,e){const s=Date.now()-this.lastHoverTime;s>=20?this.seriesHover(t,e):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout(()=>{this.seriesHover(t,e)},20-s))}seriesHover(t,e){this.lastHoverTime=Date.now();let s=[];const i=this.w,a=t=>{var e,s,i;const a=null==(i=null==(s=null==(e=null==t?void 0:t.w)?void 0:e.config)?void 0:s.chart)?void 0:i.link;return!(!a||"function"!=typeof a.dimension)};i.config.chart.group&&!a(this.ctx)&&(s=this.ctx.getGroupedCharts().filter(t=>!a(t))),i.globals.axisCharts&&(i.globals.minX===-1/0&&i.globals.maxX===1/0||0===i.globals.dataPoints)||(s.length?s.forEach(s=>{const i=this.getElTooltip(s),a={paths:t.paths,tooltipEl:i,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:s.w.globals.tooltip.ttItems};s.w.globals.minX===this.w.globals.minX&&s.w.globals.maxX===this.w.globals.maxX&&s.w.globals.tooltip.seriesHoverByContext({chartCtx:s,ttCtx:s.w.globals.tooltip,opt:a,e:e})}):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:t,e:e}))}seriesHoverByContext({chartCtx:t,ttCtx:e,opt:s,e:i}){const a=t.w;if(!this.getElTooltip(t))return;const r=e.getCachedDimensions();if(e.tooltipRect={x:0,y:0,ttWidth:r.ttWidth,ttHeight:r.ttHeight},e.e=i,e.tooltipUtil.hasBars()&&!a.globals.comboCharts&&!e.isBarShared&&this.tConfig.onDatasetHover.highlightDataSeries){new ee(t.w).toggleSeriesOnHover(i,i.target.parentNode)}a.globals.axisCharts?e.axisChartsTooltips({e:i,opt:s,tooltipRect:e.tooltipRect}):e.nonAxisChartsTooltips({e:i,opt:s,tooltipRect:e.tooltipRect}),e.fixedTooltip&&e.drawFixedTooltipRect()}axisChartsTooltips({e:t,opt:e}){var s;const i=this.w;let a,r;const o=e.elGrid.getBoundingClientRect(),n="touchmove"===t.type?t.touches[0].clientX:t.clientX,l="touchmove"===t.type?t.touches[0].clientY:t.clientY;if(this.clientY=l,this.clientX=n,i.interact.capturedSeriesIndex=-1,i.interact.capturedDataPointIndex=-1,l<o.top||l>o.top+o.height)return void this.handleMouseOut(e);if(Array.isArray(this.tConfig.enabledOnSeries)&&!i.config.tooltip.shared){const t=parseInt(e.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(t)<0)return void this.handleMouseOut(e)}const c=this.getElTooltip();if(!c)return;const h=this.getElXCrosshairs();let d=[];i.config.chart.group&&(d=this.ctx.getSyncedCharts());const p=i.globals.xyCharts||"bar"===i.config.chart.type&&!i.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||i.globals.comboCharts&&this.tooltipUtil.hasBars();if("mousemove"===t.type||"touchmove"===t.type||"mouseup"===t.type){if(i.globals.collapsedSeries.length+i.globals.ancillaryCollapsedSeries.length===i.seriesData.series.length)return;null!==h&&h.classList.add("apexcharts-active");const o=null==(s=this.yaxisTooltips)?void 0:s.filter(t=>!0===t),g=this.ycrosshairs;if(null!==g&&(null==o?void 0:o.length)&&g.classList.add("apexcharts-active"),p&&!this.showOnIntersect||d.length>1)this.handleStickyTooltip(t,n,l,e);else if("heatmap"===i.config.chart.type||"treemap"===i.config.chart.type){const s=this.intersect.handleHeatTreeTooltip({e:t,opt:e,x:a,y:r,type:i.config.chart.type});a=s.x,r=s.y,c.style.left=a+"px",c.style.top=r+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:t,opt:e}),this.tooltipUtil.hasMarkers(0)&&this.intersect.handleMarkerTooltip({e:t,opt:e,x:a,y:r});if(this.yaxisTooltips&&this.yaxisTooltips.length)for(let t=0;t<i.config.yaxis.length;t++)this.axesTooltip.drawYaxisTooltipText(t,l,this.xyRatios);i.dom.baseEl.classList.add("apexcharts-tooltip-active"),e.tooltipEl.classList.add("apexcharts-active"),i.config.chart.accessibility.enabled&&i.config.chart.accessibility.announcements.enabled&&e.tooltipEl.removeAttribute("aria-hidden")}else"mouseout"!==t.type&&"touchend"!==t.type||this.handleMouseOut(e)}nonAxisChartsTooltips({e:t,opt:e,tooltipRect:s}){var i,a,r,o;const n=this.w,l=e.paths.getAttribute("rel"),c=this.getElTooltip();if(!c)return;const h=n.dom.elWrap.getBoundingClientRect();if("mousemove"===t.type||"touchmove"===t.type){let t,o;n.dom.baseEl.classList.add("apexcharts-tooltip-active"),c.classList.add("apexcharts-active"),n.config.chart.accessibility.enabled&&n.config.chart.accessibility.announcements.enabled&&c.removeAttribute("aria-hidden"),this.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:parseInt(l,10)-1,shared:!1});const d=e.paths.querySelector("path[data\\:cx]")||e.paths;if(n.config.tooltip.intersect&&d.hasAttribute("data:cx")&&d.hasAttribute("data:cy")){const e=n.dom.Paper.node.getBoundingClientRect();t=e.left-h.left+parseFloat(d.getAttribute("data:cx"))-s.ttWidth/2,o=e.top-h.top+parseFloat(d.getAttribute("data:cy"))-s.ttHeight-10}else t=(null!=(i=n.interact.clientX)?i:0)-h.left-s.ttWidth/2,o=(null!=(a=n.interact.clientY)?a:0)-h.top-s.ttHeight-10;if(c.style.left=t+"px",c.style.top=o+"px",n.config.legend.tooltipHoverFormatter){const t=n.config.legend.tooltipHoverFormatter,e=l-1,s=null==(r=this.legendLabels)?void 0:r[e];if(!s)return;const i=t(s.getAttribute("data:default-text"),{seriesIndex:e,dataPointIndex:e,w:n});s.innerHTML=i}}else"mouseout"!==t.type&&"touchend"!==t.type||(c.classList.remove("apexcharts-active"),n.dom.baseEl.classList.remove("apexcharts-tooltip-active"),n.config.legend.tooltipHoverFormatter&&(null==(o=this.legendLabels)||o.forEach(t=>{const e=t.getAttribute("data:default-text");t.innerHTML=decodeURIComponent(null!=e?e:"")})))}handleStickyTooltip(t,e,s,i){const a=this.w,r=this.tooltipUtil.getNearestValues({context:this,hoverArea:i.hoverArea,elGrid:i.elGrid,clientX:e,clientY:s}),o=r.j;let n=r.capturedSeries;null!==n&&a.globals.collapsedSeriesIndices.includes(null!=n?n:-1)&&(n=null);const l=i.elGrid.getBoundingClientRect();if(r.hoverX<0||r.hoverX>l.width)this.handleMouseOut(i);else if(null!==n)this.handleStickyCapturedSeries(t,null!=n?n:-1,i,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,i.ttItems)}}handleStickyCapturedSeries(t,e,s,i){const a=this.w;if(!this.tConfig.shared){if(null===a.seriesData.series[e][i])return void this.handleMouseOut(s)}if(void 0!==a.seriesData.series[e][i])this.tConfig.shared&&this.tooltipUtil.isXoverlap(i)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(t,this,e,i,s.ttItems):this.create(t,this,e,i,s.ttItems,!1);else if(this.tooltipUtil.isXoverlap(i)){const e=a.seriesData.series.findIndex((t,e)=>!a.globals.collapsedSeriesIndices.includes(e));this.create(t,this,e,i,s.ttItems)}}deactivateHoverFilter(){const t=this.w,e=new ut(this.w,this.ctx),s=t.dom.Paper.find(".apexcharts-bar-area");for(let t=0;t<s.length;t++)e.pathMouseLeave(s[t],void 0)}handleMouseOut(t){var e,s;const i=this.w,a=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(),"bubble"!==i.config.chart.type&&this.marker.resetPointsSize(),null!==a&&a.classList.remove("apexcharts-active");const r=this.ycrosshairs;if(null!==r&&r.classList.remove("apexcharts-active"),this.isXAxisTooltipEnabled&&(null==(e=this.xaxisTooltip)||e.classList.remove("apexcharts-active")),this.yaxisTooltips&&this.yaxisTooltips.length){null===this.yaxisTTEls&&(this.yaxisTTEls=[...i.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip")]);for(let t=0;t<this.yaxisTTEls.length;t++)this.yaxisTTEls[t].classList.remove("apexcharts-active")}i.config.legend.tooltipHoverFormatter&&(null==(s=this.legendLabels)||s.forEach(t=>{const e=t.getAttribute("data:default-text");t.innerHTML=decodeURIComponent(null!=e?e:"")}))}markerClick(t,e,s){const i=this.w;"function"==typeof i.config.chart.events.markerClick&&i.config.chart.events.markerClick(t,this.ctx,{seriesIndex:e,dataPointIndex:s,w:i}),this.ctx.events.fireEvent("markerClick",[t,this.ctx,{seriesIndex:e,dataPointIndex:s,w:i}])}_hasCustomSeries(){const t=this.w;if(Le(t.config.chart.type))return!0;return(t.config.series||[]).some(t=>t&&t.type&&Le(t.type))}create(t,e,s,i,a,r=null){var o,c,h,d,p,g,u,x,f,m,b,y,w,v,A,C,S,k,M,D,T;const L=this.w,F=e;"mouseup"===t.type&&this.markerClick(t,s,i),null===r&&(r=this.tConfig.shared);const _=this.tooltipUtil.hasMarkers(s),E="canvas"===(null==(c=null==(o=this.ctx)?void 0:o.renderer)?void 0:c.kind),P=E&&!this.tooltipUtil.hasBars(),B=!E&&!_&&!this.tooltipUtil.hasBars()&&this._hasCustomSeries(),N=P||B,X=this.tooltipUtil.getElBars(),I=()=>{L.globals.markers.largestSize>0&&!E?F.marker.enlargePoints(i):F.tooltipPosition.moveDynamicPointsOnHover(i)};if(L.config.legend.tooltipHoverFormatter){const t=L.config.legend.tooltipHoverFormatter,e=Array.from(null!=(h=this.legendLabels)?h:[]);e.forEach(t=>{const e=t.getAttribute("data:default-text");t.innerHTML=decodeURIComponent(null!=e?e:"")});for(let a=0;a<e.length;a++){const o=e[a],n=parseInt(null!=(d=o.getAttribute("i"))?d:"",10),l=decodeURIComponent(null!=(p=o.getAttribute("data:default-text"))?p:""),c=t(l,{seriesIndex:r?n:s,dataPointIndex:i,w:L});if(r)o.innerHTML=L.globals.collapsedSeriesIndices.indexOf(n)<0?c:l;else if(o.innerHTML=n===s?c:l,s===n)break}}const R=L.rangeData,z=n(n({ttItems:a,i:s,j:i},void 0!==(null==(f=null==(x=null==(u=null==(g=R.seriesRange)?void 0:g[s])?void 0:u[i])?void 0:x.y[0])?void 0:f.y1)&&{y1:null==(w=null==(y=null==(b=null==(m=R.seriesRange)?void 0:m[s])?void 0:b[i])?void 0:y.y[0])?void 0:w.y1}),void 0!==(null==(S=null==(C=null==(A=null==(v=R.seriesRange)?void 0:v[s])?void 0:A[i])?void 0:C.y[0])?void 0:S.y2)&&{y2:null==(T=null==(D=null==(M=null==(k=R.seriesRange)?void 0:k[s])?void 0:M[i])?void 0:D.y[0])?void 0:T.y2});if(r){if(F.tooltipLabels.drawSeriesTexts(l(n({},z),{shared:!this.showOnIntersect&&this.tConfig.shared})),_||N)I();else if(this.tooltipUtil.hasBars()&&(E&&F.tooltipPosition.moveStickyTooltipOverBars(i,s),this.barSeriesHeight=this.tooltipUtil.getBarsHeight([...X]),this.barSeriesHeight>0)){const t=new ut(this.w,this.ctx),e=L.dom.Paper.find(`.apexcharts-bar-area[j='${i}']`);this.deactivateHoverFilter();F.tooltipUtil.getAllMarkers(!0).length&&!this.barSeriesHeight&&I(),F.tooltipPosition.moveStickyTooltipOverBars(i,s);for(let s=0;s<e.length;s++)t.pathMouseEnter(e[s],void 0)}}else F.tooltipLabels.drawSeriesTexts(n({shared:!1},z)),this.tooltipUtil.hasBars()&&F.tooltipPosition.moveStickyTooltipOverBars(i,s),_?F.tooltipPosition.moveMarkers(s,i):N&&F.tooltipPosition.moveDynamicPointOnHover(i,s)}}class We{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,s={}){return this.ctx.graphics.drawMarker(t,e,s)}supports(t){return!0}hitTest(){return null}restyle(){}toBitmap(){return null}destroy(){}}const Ge="__apexcharts_renderers__";function Ue(){const t=globalThis;return t[Ge]||(t[Ge]=new Map),t[Ge]}class $e{static get _rendererRegistry(){return Ue()}static registerRenderer(t,e){Ue().set(t,e)}static unregisterRenderer(t){Ue().delete(t)}constructor(t,e){this.w=t,this.ctx=e,this.svg=new We(t,e),this.active=this.svg,this._activeKind="svg",this._instances={}}_desiredKind(){const t=this.w.config.chart,e=t.renderer||"svg";if(!h.isBrowser())return"svg";if("svg"===e)return"svg";if(bt(this.w))return"svg";if("canvas"===e)return"canvas";return function(t){const e=t.config.series||[],s=t.config.chart.type,i="scatter"===s||"bubble"===s,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);let n=0,l=0;return e.forEach(t=>{const e=Array.isArray(t.data)?t.data.length:0;e>l&&(l=e),(i||r)&&(n+=e),o&&(n+=e)}),l>=5e4&&(n=Math.max(n,l)),n}(this.w)>=(t.rendererThreshold||8e3)?"canvas":"svg"}resolve(){const t=this.w.config.chart.renderer||"svg",e=this._desiredKind();if("svg"!==e){const t=Ue().get(e);if(t)return this._instances[e]||(this._instances[e]=t(this.w,this.ctx)),this.active=this._instances[e],this._activeKind=e,this.ctx.renderer=this.active,this.w.globals.activeRenderer=this.active,this._activeKind}else"canvas"===t&&bt(this.w);return this.active=this.svg,this._activeKind="svg",this.ctx.renderer=this.active,this.w.globals.activeRenderer=this.active,this._activeKind}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"}}class Ve{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 s="string"==typeof t?{[t]:e}:t;for(const t in s){let e=s[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!=s.x){const t=this.node.querySelectorAll("tspan[data-newline]");for(let e=0;e<t.length;e++)t[e].setAttribute("x",s.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 s=this.bbox(),i=t-(s.x+s.width/2),a=e-(s.y+s.height/2);return this.attr("transform",`translate(${i}, ${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 Ve(t))}findOne(t){const e=this.node.querySelector(t);return e?e.instance||new Ve(e):null}on(t,e){const s=t.split(".")[0];return this._listeners.push({event:t,eventType:s,handler:e}),this.node.addEventListener(s,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 s=t.split(".")[0];this._listeners=this._listeners.filter(t=>t.eventType!==s||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(s=>{const i=s.instance||new Ve(s);t.call(i),e&&i.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 Ve(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=m.createElementNS("http://www.w3.org/2000/svg","tspan");return e.textContent=t,this.node.appendChild(e),new Ve(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")}unfilter(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}filterer(){return this._filter}}let je=0;class qe extends Ve{constructor(t,e,s){const i="radial"===e?"radialGradient":"linearGradient";super(m.createElementNS(P,i)),this._id="SvgjsGradient"+ ++je,this.attr("id",this._id),"function"==typeof s&&s(new Ze(this));let a=t.node.querySelector("defs");a||(a=m.createElementNS(P,"defs"),t.node.appendChild(a)),a.appendChild(this.node)}stop(t,e,s){const i=m.createElementNS(P,"stop");return i.setAttribute("offset",t),i.setAttribute("stop-color",e),void 0!==s&&i.setAttribute("stop-opacity",String(s)),this.node.appendChild(i),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 Ze{constructor(t){this.gradient=t}stop(t,e,s){return this.gradient.stop(t,e,s),this}}let Ke=0;class Je extends Ve{constructor(t,e,s,i){if(super(m.createElementNS(P,"pattern")),this._id="SvgjsPattern"+ ++Ke,this.attr({id:this._id,width:e,height:s,patternUnits:"userSpaceOnUse"}),"function"==typeof i){i(new Qe(this.node))}let a=t.node.querySelector("defs");a||(a=m.createElementNS(P,"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 Qe extends Ve{line(t,e,s,i){const a=this._make("line");return void 0!==t&&a.attr({x1:t,y1:e,x2:s,y2:i}),a}rect(t,e){const s=this._make("rect");return void 0!==t&&s.attr({width:t,height:e}),s}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=m.createElementNS(P,"text");e.textContent=t;const s=new Ve(e);return this.node.appendChild(e),s}text(t){const e=m.createElementNS(P,"text"),s=new Ve(e);return this.node.appendChild(e),"function"==typeof t&&t(new ts(e)),s}image(t,e){const s=m.createElementNS(P,"image");s.setAttributeNS("http://www.w3.org/1999/xlink","href",t);const i=new Ve(s);if(this.node.appendChild(s),"function"==typeof e){const s=new Image;s.onload=function(){i.size(s.width,s.height),e.call(i,{width:s.width,height:s.height})},s.src=t}return i}gradient(t,e){return new qe(this,t,e)}pattern(t,e,s){return new Je(this,t,e,s)}_make(t){const e=m.createElementNS(P,t);return this.node.appendChild(e),new Ve(e)}_makeContainer(t){const e=m.createElementNS(P,t);return this.node.appendChild(e),new Qe(e)}}class ts{constructor(t){this.textNode=t}tspan(t){const e=m.createElementNS(P,"tspan");return e.textContent=t,this.textNode.appendChild(e),new es(e,this.textNode)}}class es{constructor(t,e){this.node=t,this.textNode=e}newLine(){return this.node.setAttribute("dy","1.1em"),this.node.dataset.newline="1",this}}let ss=0;class is extends Ve{constructor(){super(m.createElementNS(P,"filter")),this._id="SvgjsFilter"+ ++ss,this.attr("id",this._id)}size(t,e,s,i){return this.attr({width:t,height:e,x:s,y:i})}}class as{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=m.createElementNS(P,"feMerge");return t.forEach(t=>{const s=m.createElementNS(P,"feMergeNode");s.setAttribute("in",t),e.appendChild(s)}),this.filter.node.appendChild(e),new Ve(e)}_primitive(t,e){const s=m.createElementNS(P,t);for(const t in e)s.setAttribute(t,e[t]);return this.filter.node.appendChild(s),new Ve(s)}}function rs(t){t.prototype.filterWith=function(t){const e=new is;this._filter=e;let s=this.node;for(;s&&"svg"!==s.nodeName;)s=s.parentNode;if(s){let t=s.querySelector("defs");t||(t=m.createElementNS(P,"defs"),s.insertBefore(t,s.firstChild)),t.appendChild(e.node)}return t(new as(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 os(t){t.prototype.draggable=function(t){if(!1===t)return this._dragCleanup&&(this._dragCleanup(),this._dragCleanup=null),this;const e=this,s=t||{},i=t=>{if(t.button&&0!==t.button)return;t.stopPropagation();const i="touchstart"===t.type?t.touches[0]:t,a=e.node,r=parseFloat(a.getAttribute("x"))||0,o=parseFloat(a.getAttribute("y"))||0,n=i.clientX,l=i.clientY,c=a.ownerSVGElement;let d=null;c&&(d=c.getScreenCTM());const p=t=>{const e="touchmove"===t.type?t.touches[0]:t;let i=e.clientX-n,c=e.clientY-l;d&&(i/=d.a,c/=d.d);let h=r+i,p=o+c;const g=parseFloat(a.getAttribute("width"))||0,u=parseFloat(a.getAttribute("height"))||0;void 0!==s.minX&&h<s.minX&&(h=s.minX),void 0!==s.minY&&p<s.minY&&(p=s.minY),void 0!==s.maxX&&h+g>s.maxX&&(h=s.maxX-g),void 0!==s.maxY&&p+u>s.maxY&&(p=s.maxY-u);const x=new CustomEvent("dragmove",{detail:{handler:{move:function(t,e){a.setAttribute("x",t),a.setAttribute("y",e)}},box:{x:h,y:p,w:g,h:u,x2:h+g,y2:p+u}}});a.dispatchEvent(x)},g=()=>{h.isBrowser()&&(document.removeEventListener("mousemove",p),document.removeEventListener("touchmove",p),document.removeEventListener("mouseup",g),document.removeEventListener("touchend",g))};h.isBrowser()&&(document.addEventListener("mousemove",p),document.addEventListener("touchmove",p),document.addEventListener("mouseup",g),document.addEventListener("touchend",g))};return e.node.addEventListener("mousedown",i),e.node.addEventListener("touchstart",i),e._dragCleanup=()=>{e.node.removeEventListener("mousedown",i),e.node.removeEventListener("touchstart",i)},e}}function ns(t){t.prototype.select=function(t){if(!1===t)return this._selectCleanup&&(this._selectCleanup(),this._selectCleanup=null),this;const e=this,{createHandle:s,updateHandle:i}=t,a=document.createElementNS(P,"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 i=new Qe(document.createElementNS(P,"g"));a.appendChild(i.node);const r=s(i,[0,0],e,[],t);o[t]={group:i,handle:r}});const l=()=>{const t=parseFloat(e.attr("x"))||0,s=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,s],b:[t+r/2,s+l],l:[t,s+l/2],r:[t+r,s+l/2],lt:[t,s],rt:[t+r,s],lb:[t,s+l],rb:[t+r,s+l]};n.forEach(t=>{o[t]&&h[t]&&i(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,s=e._selectHandlesMap;if(!s)return e;const i=[],a=t=>{const a=s[t];if(!a||!a.group||!a.group.node)return;const r=a.group.node,o=s=>{if(s.button&&0!==s.button)return;s.stopPropagation();const i=("touchstart"===s.type?s.touches[0]:s).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=s=>{let a=("touchmove"===s.type?s.touches[0]:s).clientX-i;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=()=>{h.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)};h.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),i.push(()=>{r.removeEventListener("mousedown",o),r.removeEventListener("touchstart",o)})};return a("l"),a("r"),e._resizeCleanup=()=>{i.forEach(t=>t())},e}}function ls(){const t=m.createElementNS(P,"svg"),e=new Qe(t);return e.attr({xmlns:P}),e}rs(Ve),tt(Ve),os(Ve),ns(Ve),ls.xlink="http://www.w3.org/1999/xlink",h.isBrowser()&&void 0===window.SVG&&(window.SVG=ls),h.isBrowser()?(void 0===window.SVG&&(window.SVG=ls),void 0===window.Apex&&(window.Apex={})):"undefined"!=typeof global&&(void 0===global.Apex&&(global.Apex={}),void 0===global.SVG&&(global.SVG=ls));const cs=class t{static registerFeatures(e){for(const[s,i]of Object.entries(e))t._featureRegistry.set(s,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","paper","getActiveRenderer","destroy"],this.ctx.eventList=["click","mousedown","mousemove","mouseleave","touchstart","touchmove","touchleave","mouseup","touchend","keydown","keyup"],this.ctx.animations=new pt(this.w,this.ctx),this.ctx.axes=new Et(this.w,this.ctx),this.ctx.core=new Ee(this.ctx.el,this.w,this.ctx),this.ctx.config=new M({}),this.ctx.data=new Pe(this.w,{resetGlobals:()=>this.ctx.core.resetGlobals(),isMultipleY:()=>this.ctx.core.isMultipleY()}),this.ctx.grid=new kt(this.w,this.ctx),this.ctx.graphics=new ut(this.w,this.ctx),this.ctx.coreUtils=new E(this.w),this.ctx.crosshairs=new Pt(this.w),this.ctx.events=new Ft(this.w,this.ctx),this.ctx.fill=new xt(this.w),this.ctx.localization=new _t(this.w),this.ctx.options=new k,this.ctx.responsive=new Nt(this.w),this.ctx.series=new ee(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 le(this.w),this.ctx.formatters=new w(this.w),this.ctx.titleSubtitle=new ce(this.w),this.ctx.dimensions=new ue(this.w,this.ctx),this.ctx.updateHelpers=new Be(this.w,this.ctx),this.ctx.rendererController=new $e(this.w,this.ctx),this.ctx.renderer=this.ctx.rendererController.active;const t=new Oe(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 e=t._featureRegistry,s=this.w,i=this.ctx,a=e.get("exports");i.exports=a?new a(s,i):null;const r=e.get("legend");i.legend=r?new r(s,i):null;const o=e.get("morphTypeChange");i.morphTypeChange=o?new o(s,i):null;const n=e.get("drilldown");i.drilldown=n?new n(s,i):null;const l=e.get("perspectives");i.perspectives=l?new l(s,i):null;const c=e.get("storyboard");i.storyboard=c?new c(s,i):null;const h=e.get("history");i.history=h?new h(s,i):null;const d=e.get("linkedViews");i.linkedViews=d?new d(s,i):null;const p=e.get("ink");i.ink=p?new p(s,i):null;const g=e.get("measure");i.measure=g?new g(s,i):null;const u=e.get("contextMenu");i.contextMenu=u?new u(s,i):null;const x=e.get("weave");i.weave=x?new x(s,i):null;const f=e.get("osThemeWatcher");i.osThemeWatcher=f?new f(s,i):null;const m=e.get("toolbar");Object.defineProperty(i,"toolbar",{get(){var t;return!this._toolbar&&m&&(this._toolbar=new m(s,this)),null!=(t=this._toolbar)?t:null},configurable:!0});const b=e.get("zoomPanSelection");Object.defineProperty(i,"zoomPanSelection",{get(){var t;return!this._zoomPanSelection&&b&&(this._zoomPanSelection=new b(s,this)),null!=(t=this._zoomPanSelection)?t:null},configurable:!0});const y=e.get("keyboardNavigation");Object.defineProperty(i,"keyboardNavigation",{get(){var t;return!this._keyboardNavigation&&y&&(this._keyboardNavigation=new y(s,this)),null!=(t=this._keyboardNavigation)?t:null},configurable:!0})}};c(cs,"_featureRegistry",new Map);let hs=cs;class ds{constructor(t){this.ctx=t,this.w=t.w}clear({isUpdating:t}){var e,s,i,a,r,o,n,l,c,h,d;null==(e=this.ctx.weave)||e.teardown(t),t||(this.w.globals.isDestroyed=!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),At.invalidateAll(this.w),t?(this.ctx._zoomPanSelection=null,this.ctx._toolbar=null,this.ctx._keyboardNavigation=null):(null==(s=this.ctx.perspectives)||s.teardown(),this.ctx.perspectives=null,null==(i=this.ctx.storyboard)||i.teardown(),this.ctx.storyboard=null,null==(a=this.ctx.history)||a.teardown(),this.ctx.history=null,null==(r=this.ctx.linkedViews)||r.teardown(),this.ctx.linkedViews=null,null==(o=this.ctx.ink)||o.teardown(),this.ctx.ink=null,null==(n=this.ctx.measure)||n.teardown(),this.ctx.measure=null,null==(l=this.ctx.contextMenu)||l.teardown(),this.ctx.contextMenu=null,null==(c=this.ctx.osThemeWatcher)||c.teardown(),this.ctx.osThemeWatcher=null,this.ctx.weave=null,null==(d=null==(h=this.ctx.rendererController)?void 0:h.teardown)||d.call(h),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,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(h.isBrowser()&&e.Paper){const s=e.Paper.node;s.parentNode&&s.parentNode.parentNode&&!t&&(s.parentNode.parentNode.style.minHeight="unset");const i=e.baseEl;if(i&&this.ctx.eventList.forEach(t=>{i.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.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 ps="__apexcharts_plugins__";function gs(){const t=globalThis;return t[ps]||(t[ps]={}),t[ps]}const us=new WeakMap;function xs(t,e){if(h.isSSR())return;let s=!1;if(t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE){const e=t.getBoundingClientRect();"none"!==t.style.display&&0!==e.width||(s=!0)}const i=new ResizeObserver(i=>{s&&e.call(t,i),s=!0});t.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Array.from(t.children).forEach(t=>i.observe(t)):i.observe(t),us.set(e,i)}function fs(t,e){if(h.isSSR())return;const s=us.get(e);s&&(s.disconnect(),us.delete(e))}const ms=class t{constructor(t,e){c(this,"core"),c(this,"responsive"),c(this,"axes"),c(this,"grid"),c(this,"graphics"),c(this,"coreUtils"),c(this,"crosshairs"),c(this,"events"),c(this,"fill"),c(this,"localization"),c(this,"options"),c(this,"series"),c(this,"theme"),c(this,"formatters"),c(this,"titleSubtitle"),c(this,"dimensions"),c(this,"updateHelpers"),c(this,"tooltip"),c(this,"data"),c(this,"animations"),c(this,"exports"),c(this,"legend"),c(this,"toolbar"),c(this,"zoomPanSelection"),c(this,"keyboardNavigation"),c(this,"annotations"),c(this,"morphTypeChange"),c(this,"timeScale"),c(this,"_keyboardNavigation"),c(this,"_zoomPanSelection"),c(this,"windowResizeHandler"),c(this,"parentResizeHandler"),c(this,"publicMethods",[]),c(this,"eventList",[]),c(this,"_renderPromise",null),c(this,"config"),c(this,"perspectives"),c(this,"storyboard"),c(this,"history"),c(this,"linkedViews"),c(this,"ink"),c(this,"measure"),c(this,"contextMenu"),c(this,"weave"),c(this,"renderer"),c(this,"rendererController"),this.opts=e,this.ctx=this,this.w=new _(e).init(),this.el=t,this.w.globals.cuid=b.randomId(),this.w.globals.chartID=this.w.config.chart.id?b.escapeString(this.w.config.chart.id):this.w.globals.cuid,ht(this.w);new hs(this).initModules(),this.lastUpdateOptions=null,this._updateStats={fast:0,fastWithAxes:0,full:0},this.create=this.create.bind(this),h.isBrowser()&&(this.windowResizeHandler=this._windowResizeHandler.bind(this),this.parentResizeHandler=this._parentResizeCallback.bind(this))}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 s=new Promise((t,e)=>{var s;if(b.elementExists(this.el)){void 0===Apex._chartInstances&&(Apex._chartInstances=[]),this.w.config.chart.id&&Apex._chartInstances.push({id:this.w.globals.chartID,group:this.w.config.chart.group,chart:this}),this.setLocale(this.w.config.chart.defaultLocale);const i=this.w.config.chart.events.beforeMount;if("function"==typeof i&&i(this,this.w),this.events.fireEvent("beforeMount",[this,this.w]),h.isBrowser()){window.addEventListener("resize",this.windowResizeHandler),xs(this.el.parentNode,this.parentResizeHandler);const t=this.el.getRootNode&&this.el.getRootNode(),e=b.is("ShadowRoot",t),i=this.el.ownerDocument;let a=e?t.getElementById("apexcharts-css"):i.getElementById("apexcharts-css");if(!a){a=m.createElementNS("http://www.w3.org/1999/xhtml","style"),a.id="apexcharts-css",a.textContent='@keyframes opaque {\n 0% {\n opacity: 0\n }\n\n to {\n opacity: 1\n }\n}\n\n@keyframes resizeanim {\n\n 0%,\n to {\n opacity: 0\n }\n}\n\n.apexcharts-canvas {\n position: relative;\n direction: ltr !important;\n user-select: none;\n /* Focus indicator colour. Themes override below. */\n --apexcharts-focus-color: #008FFB;\n}\n\n/* Dark theme & high-contrast: brighter focus colour for sufficient contrast. */\n.apexcharts-canvas .apexcharts-theme-dark,\n.apexcharts-theme-dark.apexcharts-canvas {\n --apexcharts-focus-color: #FFD500;\n}\n.apexcharts-canvas.apexcharts-high-contrast,\n.apexcharts-high-contrast.apexcharts-canvas {\n --apexcharts-focus-color: #FFFF00;\n}\n\n/* Visually-hidden aria-live status region (WCAG 4.1.3 Status Messages). */\n.apexcharts-sr-status {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n}\n\n/* Respect OS-level reduced-motion preference (WCAG 2.3.3). */\n@media (prefers-reduced-motion: reduce) {\n .apexcharts-canvas *,\n .apexcharts-canvas *::before,\n .apexcharts-canvas *::after {\n animation-duration: 0.01ms !important;\n animation-iteration-count: 1 !important;\n transition-duration: 0.01ms !important;\n }\n}\n\n.apexcharts-canvas ::-webkit-scrollbar {\n -webkit-appearance: none;\n width: 6px\n}\n\n.apexcharts-canvas ::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background-color: rgba(0, 0, 0, .5);\n box-shadow: 0 0 1px rgba(255, 255, 255, .5);\n -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5)\n}\n\n.apexcharts-inner {\n position: relative\n}\n\n.apexcharts-text tspan {\n font-family: inherit\n}\n\nrect.legend-mouseover-inactive,\n.legend-mouseover-inactive rect,\n.legend-mouseover-inactive path,\n.legend-mouseover-inactive circle,\n.legend-mouseover-inactive line,\n.legend-mouseover-inactive text.apexcharts-yaxis-title-text,\n.legend-mouseover-inactive text.apexcharts-yaxis-label {\n transition: .15s ease all;\n opacity: .2\n}\n\n/* Linked Views (#4): per-mark crossfilter dim. Applied to individual data\n marks (not whole series) whose x is outside the brushed range. Opacity is\n overridable per chart via the --apx-cf-dim custom property. */\n.apexcharts-crossfilter-dimmed {\n transition: opacity .25s ease;\n opacity: var(--apx-cf-dim, .2)\n}\n\n/* Linked Views (#4): default styling for the built-in crossfilter data table\n (cf.dataTable). Deliberately light so host styles can override. */\n.apexcharts-cf-table {\n border-collapse: collapse;\n width: 100%;\n font-size: 13px;\n}\n.apexcharts-cf-table caption {\n caption-side: bottom;\n text-align: right;\n padding: 6px 2px;\n font-size: 12px;\n opacity: .7\n}\n.apexcharts-cf-table th,\n.apexcharts-cf-table td {\n padding: 6px 10px;\n text-align: left;\n border-bottom: 1px solid rgba(0, 0, 0, .08)\n}\n.apexcharts-cf-table th {\n font-weight: 600;\n border-bottom-width: 2px\n}\n.apexcharts-cf-table tbody tr:hover {\n background: rgba(99, 102, 241, .06)\n}\n\n/* Measure ruler (#18): measure / delta ruler.\n Theme via these classes or the --apx-measure-* custom properties below\n (config `chart.measure.colors` overrides both). The ruler group also carries\n a direction class: apexcharts-measure-up | -down | -flat.\n Element classes:\n .apexcharts-measure-band shaded span band\n .apexcharts-measure-vline vertical guide lines\n .apexcharts-measure-line free-mode diagonal line\n .apexcharts-measure-label-bg readout box .apexcharts-measure-label text\n Colors are applied as SVG presentation attributes, so any rule you write on\n these classes overrides them. */\n.apexcharts-canvas {\n --apx-measure-up: #16a34a;\n --apx-measure-down: #dc2626;\n --apx-measure-neutral: #64748b;\n --apx-measure-guide: #94a3b8;\n}\n.apexcharts-measure-capture {\n cursor: crosshair;\n}\n\n/* Radial Actions (#chrome): right-click context menu. Theme via these classes\n or the --apx-menu-* custom properties. */\n.apexcharts-canvas {\n --apx-menu-bg: #ffffff;\n --apx-menu-fg: #1e293b;\n --apx-menu-border: #e2e8f0;\n --apx-menu-hover: #f1f5f9;\n --apx-menu-shadow: rgba(15, 23, 42, 0.18);\n}\n.apexcharts-context-menu {\n min-width: 168px;\n padding: 4px;\n border-radius: 8px;\n background: var(--apx-menu-bg);\n border: 1px solid var(--apx-menu-border);\n box-shadow: 0 6px 22px var(--apx-menu-shadow);\n font-family: Helvetica, Arial, sans-serif;\n font-size: 13px;\n z-index: 20;\n user-select: none;\n}\n.apexcharts-context-menu-item {\n display: block;\n width: 100%;\n box-sizing: border-box;\n text-align: left;\n padding: 7px 12px;\n border: 0;\n border-radius: 5px;\n background: transparent;\n color: var(--apx-menu-fg);\n font: inherit;\n cursor: pointer;\n}\n.apexcharts-context-menu-item:hover,\n.apexcharts-context-menu-item--active {\n background: var(--apx-menu-hover);\n}\n.apexcharts-context-menu-item:focus {\n outline: none;\n}\n\n/* Ink Layer (#7): the floating note editor card, opened by clicking an\n ink-managed annotation. Theme via these classes or the --apx-ink-* vars. */\n.apexcharts-canvas {\n --apx-ink-card-bg: #ffffff;\n --apx-ink-card-fg: #1e293b;\n --apx-ink-card-border: #e2e8f0;\n --apx-ink-card-hover: #f1f5f9;\n --apx-ink-card-accent: #6366f1;\n --apx-ink-card-shadow: rgba(15, 23, 42, 0.18);\n}\n.apexcharts-ink-card {\n position: absolute;\n z-index: 25;\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 8px;\n border-radius: 8px;\n background: var(--apx-ink-card-bg);\n border: 1px solid var(--apx-ink-card-border);\n box-shadow: 0 6px 22px var(--apx-ink-card-shadow);\n font-family: Helvetica, Arial, sans-serif;\n font-size: 12px;\n color: var(--apx-ink-card-fg);\n user-select: none;\n}\n.apexcharts-ink-card-row {\n display: flex;\n align-items: center;\n gap: 4px;\n}\n.apexcharts-ink-card input.apexcharts-ink-editor {\n flex: 1 1 auto;\n width: 150px;\n min-width: 0;\n box-sizing: border-box;\n padding: 4px 6px;\n font: inherit;\n color: inherit;\n background: transparent;\n border: 1px solid var(--apx-ink-card-border);\n border-radius: 5px;\n}\n.apexcharts-ink-card input.apexcharts-ink-editor:focus {\n outline: none;\n border-color: var(--apx-ink-card-accent);\n}\n.apexcharts-ink-btn {\n flex: 0 0 auto;\n width: 24px;\n height: 24px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n border: 0;\n border-radius: 5px;\n background: transparent;\n color: inherit;\n font: inherit;\n font-size: 12px;\n line-height: 1;\n cursor: pointer;\n}\n.apexcharts-ink-btn:hover,\n.apexcharts-ink-btn--active {\n background: var(--apx-ink-card-hover);\n}\n.apexcharts-ink-btn:focus-visible,\n.apexcharts-ink-swatch:focus-visible {\n outline: 2px solid var(--apx-ink-card-accent);\n outline-offset: 1px;\n}\n.apexcharts-ink-btn--bold {\n font-weight: 700;\n}\n.apexcharts-ink-btn--delete:hover {\n color: #dc2626;\n}\n.apexcharts-ink-swatch {\n flex: 0 0 auto;\n width: 16px;\n height: 16px;\n padding: 0;\n border: 1px solid rgba(100, 116, 139, 0.45);\n border-radius: 50%;\n cursor: pointer;\n}\n.apexcharts-ink-swatch--active {\n box-shadow:\n 0 0 0 2px var(--apx-ink-card-bg),\n 0 0 0 4px var(--apx-ink-card-accent);\n}\n.apexcharts-ink-sep {\n flex: 0 0 auto;\n width: 1px;\n height: 16px;\n margin: 0 2px;\n background: var(--apx-ink-card-border);\n}\n.apexcharts-ink-cardlabel {\n flex: 0 0 auto;\n font-size: 10px;\n letter-spacing: 0.4px;\n text-transform: uppercase;\n opacity: 0.65;\n margin-right: 2px;\n}\n.apexcharts-ink-marker-size {\n flex: 0 0 auto;\n min-width: 16px;\n text-align: center;\n font-variant-numeric: tabular-nums;\n}\n\n.apexcharts-legend-text {\n padding-left: 15px;\n margin-left: -15px;\n}\n\n.apexcharts-legend-series[role="button"]:focus {\n outline: 2px solid var(--apexcharts-focus-color, #008FFB);\n outline-offset: 2px;\n}\n\n.apexcharts-legend-series[role="button"]:focus:not(:focus-visible) {\n outline: none;\n}\n\n.apexcharts-legend-series[role="button"]:focus-visible {\n outline: 2px solid var(--apexcharts-focus-color, #008FFB);\n outline-offset: 2px;\n}\n\n.apexcharts-series-collapsed {\n opacity: 0\n}\n\n.apexcharts-canvas svg:focus:not(:focus-visible) {\n outline: none;\n}\n\n/* Keyboard navigation focus indicator on SVG data elements.\n SVG elements don\'t support CSS outline, so we use stroke. */\n.apexcharts-bar-area.apexcharts-keyboard-focused,\n.apexcharts-candlestick-area.apexcharts-keyboard-focused,\n.apexcharts-boxPlot-area.apexcharts-keyboard-focused,\n.apexcharts-rangebar-area.apexcharts-keyboard-focused,\n.apexcharts-pie-area.apexcharts-keyboard-focused,\n.apexcharts-heatmap-rect.apexcharts-keyboard-focused,\n.apexcharts-treemap-rect.apexcharts-keyboard-focused {\n stroke: var(--apexcharts-focus-color, #008FFB);\n stroke-width: 2;\n stroke-opacity: 1;\n}\n\n.apexcharts-tooltip {\n --apx-tt-bg: #ffffff;\n --apx-tt-border: rgba(15, 23, 42, 0.06);\n /* Layered shadow: tight inner contact + soft outer drop. The two Y\n * offsets are exposed as variables so they flip in sync with the\n * arrow when the tooltip is below the data point \u2014 see the\n * `[data-placement="bottom"]` rule further down. */\n --apx-tt-shadow-y-mid: 8px;\n --apx-tt-shadow-y-far: 16px;\n --apx-tt-shadow: 0 0 0 1px rgba(15, 23, 42, 0.04), 0 var(--apx-tt-shadow-y-mid) 16px -6px rgba(15, 23, 42, 0.12), 0 var(--apx-tt-shadow-y-far) 36px -12px rgba(15, 23, 42, 0.18);\n --apx-tt-arrow-bg: var(--apx-tt-bg);\n /* Two stacked drop-shadows: the first is a tight contact halo for\n * edge definition against light chart backgrounds; the second is a\n * softer directional drop that lifts the arrow off the surface.\n * `--apx-tt-arrow-drop-y` is the Y offset of the directional drop;\n * a per-placement rule below flips it to negative when the tooltip\n * is below the data point (arrow on top) so the shadow always\n * casts outward instead of into the tooltip body. */\n --apx-tt-arrow-drop-y: 2px;\n --apx-tt-arrow-shadow: drop-shadow(0 0 0.5px rgba(15, 23, 42, 0.2)) drop-shadow(0 var(--apx-tt-arrow-drop-y) 4px rgba(15, 23, 42, 0.2));\n --apx-tt-color: #0f172a;\n --apx-tt-color-muted: rgba(15, 23, 42, 0.55);\n border-radius: 8px;\n background: var(--apx-tt-bg);\n border: 1px solid var(--apx-tt-border);\n box-shadow: var(--apx-tt-shadow);\n color: var(--apx-tt-color);\n cursor: default;\n font-size: 13px;\n left: 0;\n top: 0;\n opacity: 0;\n pointer-events: none;\n position: absolute;\n display: flex;\n flex-direction: column;\n padding: 2px 0;\n white-space: nowrap;\n z-index: 12;\n transition: opacity .12s ease\n}\n\n/* While the tooltip is visible, smoothly animate position changes\n * between data points. Kept short (160 ms) and ease-out so it stays\n * responsive \u2014 too long would feel laggy when sweeping across many\n * points fast. The position transition is only attached after the\n * first paint (Position.applyTooltipPosition flips `data-positioned`\n * once the tooltip has been placed) so the *first* show doesn\'t slide\n * the tooltip in from the previously-stale (0,0) coordinates. */\n.apexcharts-tooltip.apexcharts-active {\n opacity: 1;\n transition: opacity .12s ease\n}\n.apexcharts-tooltip.apexcharts-active[data-positioned="true"] {\n transition: opacity .12s ease, left .16s ease-out, top .16s ease-out\n}\n\n.apexcharts-tooltip.apexcharts-theme-light {\n /* defaults already set above; class kept for backward-compat selectors */\n}\n\n.apexcharts-tooltip.apexcharts-theme-dark {\n --apx-tt-bg: #1c1c1f;\n --apx-tt-border: rgba(255, 255, 255, 0.08);\n --apx-tt-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), 0 var(--apx-tt-shadow-y-mid) 16px -6px rgba(0, 0, 0, 0.45), 0 var(--apx-tt-shadow-y-far) 36px -12px rgba(0, 0, 0, 0.55);\n --apx-tt-arrow-shadow: drop-shadow(0 0 0.5px rgba(0, 0, 0, 0.55)) drop-shadow(0 var(--apx-tt-arrow-drop-y) 4px rgba(0, 0, 0, 0.45));\n --apx-tt-color: #f3f4f6;\n --apx-tt-color-muted: rgba(243, 244, 246, 0.55);\n}\n\n.apexcharts-tooltip * {\n font-family: inherit\n}\n\n.apexcharts-tooltip-title {\n padding: 8px 12px 4px;\n font-size: 12px;\n font-weight: 600;\n letter-spacing: 0.01em;\n color: var(--apx-tt-color-muted);\n background: transparent;\n border-bottom: none;\n margin-bottom: 0\n}\n\n.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title,\n.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title {\n background: transparent;\n border-bottom: none\n}\n\n/* `fillSeriesColor`: each series-group already paints itself with the\n * series colour. Drop the glass body entirely (transparent bg, no\n * border, no backdrop-filter, no padding) and clip the coloured\n * series-group(s) to the tooltip\'s rounded corners so they fill the\n * shell edge-to-edge. Text inside the coloured group is forced to\n * white for contrast. */\n.apexcharts-tooltip.apexcharts-tooltip-fill-series {\n background: transparent;\n -webkit-backdrop-filter: none;\n backdrop-filter: none;\n border: none;\n padding: 0;\n overflow: hidden;\n color: #fff\n}\n\n.apexcharts-tooltip.apexcharts-tooltip-fill-series .apexcharts-tooltip-title {\n background: rgba(0, 0, 0, 0.22);\n color: #fff;\n opacity: 1;\n padding: 6px 12px\n}\n\n.apexcharts-tooltip.apexcharts-tooltip-fill-series .apexcharts-tooltip-series-group {\n color: #fff\n}\n\n/* Arrow connector \u2014 sits *entirely outside* the tooltip body. Shares\n * the body\'s solid fill so it reads as a single shape. `filter:\n * drop-shadow` traces the clipped triangle outline (a regular\n * `box-shadow` would be erased by the `clip-path`). */\n.apexcharts-tooltip-arrow {\n position: absolute;\n width: 7px;\n height: 14px;\n background: var(--apx-tt-arrow-bg);\n /* The variable already contains the full `drop-shadow(...) ...` filter\n * chain (stacked shadows) so it\'s applied raw. */\n -webkit-filter: var(--apx-tt-arrow-shadow);\n filter: var(--apx-tt-arrow-shadow);\n pointer-events: none;\n top: calc(var(--apx-tt-arrow-y, 50%) - 7px)\n}\n\n.apexcharts-tooltip[data-placement="right"] .apexcharts-tooltip-arrow {\n left: -7px;\n clip-path: polygon(0 50%, 100% 0, 100% 100%)\n}\n\n.apexcharts-tooltip[data-placement="left"] .apexcharts-tooltip-arrow {\n right: -7px;\n clip-path: polygon(100% 50%, 0 0, 0 100%)\n}\n\n/* Vertical arrow variants: tooltip is above/below the data point and the\n * arrow points down/up. The base rule above uses `--apx-tt-arrow-y` for\n * left/right placement; for top/bottom we re-orient the rectangle and\n * use `--apx-tt-arrow-x` (set by applyTooltipPosition). */\n.apexcharts-tooltip[data-placement="top"] .apexcharts-tooltip-arrow,\n.apexcharts-tooltip[data-placement="bottom"] .apexcharts-tooltip-arrow {\n width: 14px;\n height: 7px;\n top: auto;\n left: calc(var(--apx-tt-arrow-x, 50%) - 7px)\n}\n\n.apexcharts-tooltip[data-placement="top"] .apexcharts-tooltip-arrow {\n bottom: -7px;\n clip-path: polygon(50% 100%, 0 0, 100% 0)\n}\n\n.apexcharts-tooltip[data-placement="bottom"] .apexcharts-tooltip-arrow {\n top: -7px;\n clip-path: polygon(50% 0, 0 100%, 100% 100%)\n}\n\n/* When the tooltip is flipped below the data point (arrow on top\n * pointing up), the default downward-biased shadows leave the top\n * edge of both the body *and* the arrow undefined. Flipping every\n * Y offset to negative casts the entire elevation upward so the\n * shadow falls between the tooltip and the bar above. */\n.apexcharts-tooltip[data-placement="bottom"] {\n --apx-tt-shadow-y-mid: -8px;\n --apx-tt-shadow-y-far: -16px;\n --apx-tt-arrow-drop-y: -2px\n}\n\n.apexcharts-tooltip-text-goals-value,\n.apexcharts-tooltip-text-y-value,\n.apexcharts-tooltip-text-z-value {\n display: inline-block;\n margin-left: 5px;\n font-weight: 600\n}\n\n.apexcharts-tooltip-text-goals-label:empty,\n.apexcharts-tooltip-text-goals-value:empty,\n.apexcharts-tooltip-text-y-label:empty,\n.apexcharts-tooltip-text-y-value:empty,\n.apexcharts-tooltip-text-z-value:empty,\n.apexcharts-tooltip-title:empty {\n display: none\n}\n\n.apexcharts-tooltip-text-goals-label,\n.apexcharts-tooltip-text-goals-value {\n padding: 6px 0 5px\n}\n\n.apexcharts-tooltip-goals-group,\n.apexcharts-tooltip-text-goals-label,\n.apexcharts-tooltip-text-goals-value {\n display: flex\n}\n\n.apexcharts-tooltip-text-goals-label:not(:empty),\n.apexcharts-tooltip-text-goals-value:not(:empty) {\n margin-top: -6px\n}\n\n.apexcharts-tooltip-marker {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n position: relative;\n width: 12px;\n height: 12px;\n margin-right: 6px;\n vertical-align: middle;\n color: inherit;\n}\n\n.apexcharts-tooltip-marker svg {\n width: 100%;\n height: 100%;\n display: block;\n}\n\n.apexcharts-tooltip-series-group {\n padding: 4px 12px;\n display: none;\n gap: 8px;\n text-align: left;\n justify-content: left;\n align-items: center\n}\n\n.apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker {\n opacity: 1\n}\n\n.apexcharts-tooltip-series-group.apexcharts-active:last-child,\n.apexcharts-tooltip-series-group:last-child {\n padding-bottom: 8px\n}\n\n.apexcharts-tooltip-y-group {\n padding: 6px 0 5px\n}\n\n.apexcharts-custom-tooltip,\n.apexcharts-tooltip-box {\n padding: 4px 8px\n}\n\n.apexcharts-tooltip-boxPlot {\n display: flex;\n flex-direction: column-reverse\n}\n\n.apexcharts-tooltip-box>div {\n margin: 4px 0\n}\n\n.apexcharts-tooltip-box span.value {\n font-weight: 700\n}\n\n.apexcharts-tooltip-rangebar {\n padding: 5px 8px\n}\n\n.apexcharts-tooltip-rangebar .category {\n font-weight: 600;\n color: #777\n}\n\n.apexcharts-tooltip-rangebar .series-name {\n font-weight: 700;\n display: block;\n margin-bottom: 5px\n}\n\n/* X/Y axis tooltips \u2014 small popovers that label the crosshair on the\n * axes. Restyled to match the modern data-tooltip palette: solid white\n * body with a subtle border + soft drop-shadow, smaller font, rounded\n * corners. The arrows still use the CSS border-triangle technique\n * (cheap, crisp at small sizes); their colours flow from CSS variables\n * so light/dark themes only need one override per axis. */\n.apexcharts-xaxistooltip,\n.apexcharts-yaxistooltip {\n --apx-axt-bg: #ffffff;\n --apx-axt-border: rgba(15, 23, 42, 0.08);\n --apx-axt-color: #0f172a;\n --apx-axt-shadow: 0 4px 12px -4px rgba(15, 23, 42, 0.18), 0 1px 3px -1px rgba(15, 23, 42, 0.12);\n opacity: 0;\n pointer-events: none;\n color: var(--apx-axt-color);\n font-size: 12px;\n font-weight: 500;\n text-align: center;\n border-radius: 6px;\n position: absolute;\n z-index: 10;\n background: var(--apx-axt-bg);\n border: 1px solid var(--apx-axt-border);\n box-shadow: var(--apx-axt-shadow)\n}\n\n.apexcharts-xaxistooltip.apexcharts-theme-dark,\n.apexcharts-yaxistooltip.apexcharts-theme-dark {\n --apx-axt-bg: #1c1c1f;\n --apx-axt-border: rgba(255, 255, 255, 0.1);\n --apx-axt-color: #f3f4f6;\n --apx-axt-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.55), 0 1px 3px -1px rgba(0, 0, 0, 0.45)\n}\n\n.apexcharts-xaxistooltip {\n padding: 4px 8px;\n transition: .15s ease all\n}\n\n.apexcharts-xaxistooltip:after,\n.apexcharts-xaxistooltip:before {\n left: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n/* :before paints the 1px border outline of the triangle (slightly larger\n * than :after); :after sits inside and paints the fill \u2014 leaves a 1px\n * ring of :before visible at the edges. */\n.apexcharts-xaxistooltip:after {\n border-color: transparent;\n border-width: 5px;\n margin-left: -5px\n}\n\n.apexcharts-xaxistooltip:before {\n border-color: transparent;\n border-width: 6px;\n margin-left: -6px\n}\n\n.apexcharts-xaxistooltip-bottom:after,\n.apexcharts-xaxistooltip-bottom:before {\n bottom: 100%\n}\n\n.apexcharts-xaxistooltip-top:after,\n.apexcharts-xaxistooltip-top:before {\n top: 100%\n}\n\n.apexcharts-xaxistooltip-bottom:after {\n border-bottom-color: var(--apx-axt-bg)\n}\n\n.apexcharts-xaxistooltip-bottom:before {\n border-bottom-color: var(--apx-axt-border)\n}\n\n.apexcharts-xaxistooltip-top:after {\n border-top-color: var(--apx-axt-bg)\n}\n\n.apexcharts-xaxistooltip-top:before {\n border-top-color: var(--apx-axt-border)\n}\n\n.apexcharts-xaxistooltip.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-yaxistooltip {\n padding: 3px 8px\n}\n\n.apexcharts-yaxistooltip:after,\n.apexcharts-yaxistooltip:before {\n top: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-yaxistooltip:after {\n border-color: transparent;\n border-width: 5px;\n margin-top: -5px\n}\n\n.apexcharts-yaxistooltip:before {\n border-color: transparent;\n border-width: 6px;\n margin-top: -6px\n}\n\n.apexcharts-yaxistooltip-left:after,\n.apexcharts-yaxistooltip-left:before {\n left: 100%\n}\n\n.apexcharts-yaxistooltip-right:after,\n.apexcharts-yaxistooltip-right:before {\n right: 100%\n}\n\n.apexcharts-yaxistooltip-left:after {\n border-left-color: var(--apx-axt-bg)\n}\n\n.apexcharts-yaxistooltip-left:before {\n border-left-color: var(--apx-axt-border)\n}\n\n.apexcharts-yaxistooltip-right:after {\n border-right-color: var(--apx-axt-bg)\n}\n\n.apexcharts-yaxistooltip-right:before {\n border-right-color: var(--apx-axt-border)\n}\n\n.apexcharts-yaxistooltip.apexcharts-active {\n opacity: 1\n}\n\n.apexcharts-yaxistooltip-hidden {\n display: none\n}\n\n.apexcharts-xcrosshairs,\n.apexcharts-ycrosshairs {\n pointer-events: none;\n opacity: 0;\n transition: .15s ease all\n}\n\n.apexcharts-xcrosshairs.apexcharts-active,\n.apexcharts-ycrosshairs.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-ycrosshairs-hidden {\n opacity: 0\n}\n\n.apexcharts-selection-rect {\n cursor: move\n}\n\n.svg_select_shape {\n stroke-width: 1;\n stroke-dasharray: 10 10;\n stroke: black;\n stroke-opacity: 0.1;\n pointer-events: none;\n fill: none;\n}\n\n.svg_select_handle {\n stroke-width: 3;\n stroke: black;\n fill: none;\n}\n\n.svg_select_handle_r {\n cursor: e-resize;\n}\n\n.svg_select_handle_l {\n cursor: w-resize;\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-zoom {\n cursor: crosshair\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-pan {\n cursor: move\n}\n\n.apexcharts-menu-icon,\n.apexcharts-measure-icon,\n.apexcharts-pan-icon,\n.apexcharts-reset-icon,\n.apexcharts-selection-icon,\n.apexcharts-toolbar-custom-icon,\n.apexcharts-zoom-icon,\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n cursor: pointer;\n /* WCAG 2.5.8 Target Size (Minimum): 24\xd724 CSS px hit target. */\n width: 26px;\n height: 24px;\n line-height: 24px;\n color: #6e8192;\n text-align: center;\n /* Reset native <button> chrome \u2014 these are styled via SVG icons. */\n padding: 0;\n margin: 0;\n background: transparent;\n border: 0;\n border-radius: 5px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n transition: background-color .12s ease, color .12s ease;\n}\n\n.apexcharts-menu-icon svg,\n.apexcharts-measure-icon svg,\n.apexcharts-pan-icon svg,\n.apexcharts-reset-icon svg,\n.apexcharts-selection-icon svg,\n.apexcharts-zoom-icon svg,\n.apexcharts-zoomin-icon svg,\n.apexcharts-zoomout-icon svg {\n width: 18px;\n height: 18px;\n fill: none;\n stroke: currentColor;\n stroke-width: 2;\n stroke-linecap: round;\n stroke-linejoin: round\n}\n\n.apexcharts-theme-dark .apexcharts-menu-icon,\n.apexcharts-theme-dark .apexcharts-measure-icon,\n.apexcharts-theme-dark .apexcharts-pan-icon,\n.apexcharts-theme-dark .apexcharts-reset-icon,\n.apexcharts-theme-dark .apexcharts-selection-icon,\n.apexcharts-theme-dark .apexcharts-toolbar-custom-icon,\n.apexcharts-theme-dark .apexcharts-zoom-icon,\n.apexcharts-theme-dark .apexcharts-zoomin-icon,\n.apexcharts-theme-dark .apexcharts-zoomout-icon {\n color: #d4d6dc\n}\n\n.apexcharts-canvas .apexcharts-measure-icon.apexcharts-selected,\n.apexcharts-canvas .apexcharts-pan-icon.apexcharts-selected,\n.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected,\n.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected,\n.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected {\n background: rgba(0, 143, 251, 0.12);\n color: #008ffb\n}\n\n.apexcharts-theme-light .apexcharts-menu-icon:hover,\n.apexcharts-theme-light .apexcharts-measure-icon:not(.apexcharts-selected):hover,\n.apexcharts-theme-light .apexcharts-pan-icon:not(.apexcharts-selected):hover,\n.apexcharts-theme-light .apexcharts-reset-icon:hover,\n.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover,\n.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover,\n.apexcharts-theme-light .apexcharts-zoomin-icon:hover,\n.apexcharts-theme-light .apexcharts-zoomout-icon:hover {\n background: rgba(15, 23, 42, 0.06);\n color: #1f2937\n}\n\n.apexcharts-theme-dark .apexcharts-menu-icon:hover,\n.apexcharts-theme-dark .apexcharts-measure-icon:not(.apexcharts-selected):hover,\n.apexcharts-theme-dark .apexcharts-pan-icon:not(.apexcharts-selected):hover,\n.apexcharts-theme-dark .apexcharts-reset-icon:hover,\n.apexcharts-theme-dark .apexcharts-selection-icon:not(.apexcharts-selected):hover,\n.apexcharts-theme-dark .apexcharts-zoom-icon:not(.apexcharts-selected):hover,\n.apexcharts-theme-dark .apexcharts-zoomin-icon:hover,\n.apexcharts-theme-dark .apexcharts-zoomout-icon:hover {\n background: rgba(255, 255, 255, 0.08);\n color: #fff\n}\n\n.apexcharts-menu-icon,\n.apexcharts-selection-icon {\n position: relative\n}\n\n.apexcharts-toolbar {\n position: absolute;\n z-index: 11;\n display: inline-flex;\n align-items: center;\n gap: 1px;\n padding: 3px;\n border-radius: 8px;\n background: rgba(255, 255, 255, 0.85);\n backdrop-filter: blur(8px);\n -webkit-backdrop-filter: blur(8px);\n}\n\n.apexcharts-theme-dark .apexcharts-toolbar {\n background: rgba(28, 28, 31, 0.82);\n}\n\n.apexcharts-menu {\n background: rgba(255, 255, 255, 0.95);\n backdrop-filter: blur(8px);\n -webkit-backdrop-filter: blur(8px);\n position: absolute;\n top: calc(100% + 4px);\n border: 1px solid rgba(15, 23, 42, 0.08);\n border-radius: 8px;\n padding: 4px;\n right: 0;\n opacity: 0;\n min-width: 120px;\n transition: opacity .15s ease, transform .15s ease;\n transform: translateY(-2px);\n pointer-events: none;\n box-shadow: 0 4px 16px -4px rgba(15, 23, 42, 0.12), 0 2px 4px -1px rgba(15, 23, 42, 0.06)\n}\n\n.apexcharts-menu.apexcharts-menu-open {\n opacity: 1;\n transform: translateY(0);\n pointer-events: all\n}\n\n.apexcharts-menu-item {\n padding: 6px 9px;\n font-size: 12px;\n border-radius: 5px;\n cursor: pointer\n}\n\n.apexcharts-theme-light .apexcharts-menu-item:hover {\n background: rgba(15, 23, 42, 0.06)\n}\n\n.apexcharts-theme-dark .apexcharts-menu {\n background: rgba(28, 28, 31, 0.92);\n border-color: rgba(255, 255, 255, 0.08);\n color: #f3f4f6;\n box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.4)\n}\n\n.apexcharts-theme-dark .apexcharts-menu-item:hover {\n background: rgba(255, 255, 255, 0.08)\n}\n\n@media screen and (min-width:768px) {\n .apexcharts-canvas:hover .apexcharts-toolbar {\n opacity: 1\n }\n}\n\n/* Toolbar keyboard accessibility: show toolbar when any button inside it is focused */\n.apexcharts-toolbar:focus-within {\n opacity: 1\n}\n\n/* Focus indicator for toolbar icon buttons */\n.apexcharts-menu-icon:focus-visible,\n.apexcharts-measure-icon:focus-visible,\n.apexcharts-pan-icon:focus-visible,\n.apexcharts-reset-icon:focus-visible,\n.apexcharts-selection-icon:focus-visible,\n.apexcharts-toolbar-custom-icon:focus-visible,\n.apexcharts-zoom-icon:focus-visible,\n.apexcharts-zoomin-icon:focus-visible,\n.apexcharts-zoomout-icon:focus-visible {\n outline: 2px solid var(--apexcharts-focus-color, #008FFB);\n outline-offset: 1px;\n border-radius: 5px\n}\n\n/* Focus indicator for hamburger menu items */\n.apexcharts-menu-item:focus-visible {\n outline: 2px solid var(--apexcharts-focus-color, #008FFB);\n outline-offset: -2px;\n background: #eee\n}\n\n.apexcharts-canvas .apexcharts-element-hidden,\n.apexcharts-datalabel.apexcharts-element-hidden,\n.apexcharts-hide .apexcharts-series-points {\n opacity: 0;\n}\n\n.apexcharts-hidden-element-shown {\n opacity: 1;\n transition: 0.25s ease all;\n}\n\n.apexcharts-datalabel,\n.apexcharts-datalabel-label,\n.apexcharts-datalabel-value,\n.apexcharts-datalabels,\n.apexcharts-pie-label,\n.apexcharts-pie-name-label,\n.apexcharts-pie-name-label-group,\n.apexcharts-pie-label-connector {\n cursor: default;\n pointer-events: none\n}\n\n.apexcharts-pie-label-connector {\n fill: none\n}\n\n.apexcharts-pie-label-delay {\n opacity: 0;\n animation-name: opaque;\n animation-duration: .3s;\n animation-fill-mode: forwards;\n animation-timing-function: ease\n}\n\n.apexcharts-radialbar-label {\n cursor: pointer;\n}\n\n.apexcharts-annotation-rect,\n.apexcharts-area-series .apexcharts-area,\n.apexcharts-gridline,\n.apexcharts-line,\n.apexcharts-point-annotation-label,\n.apexcharts-radar-series path:not(.apexcharts-marker),\n.apexcharts-radar-series polygon,\n.apexcharts-toolbar svg,\n.apexcharts-tooltip .apexcharts-marker,\n.apexcharts-xaxis-annotation-label,\n.apexcharts-yaxis-annotation-label,\n.apexcharts-zoom-rect,\n.no-pointer-events {\n pointer-events: none\n}\n\n.apexcharts-tooltip-active .apexcharts-marker {\n transition: .15s ease all\n}\n\n.apexcharts-radar-series .apexcharts-yaxis {\n pointer-events: none;\n}\n\n.resize-triggers {\n animation: 1ms resizeanim;\n visibility: hidden;\n opacity: 0;\n height: 100%;\n width: 100%;\n overflow: hidden\n}\n\n.contract-trigger:before,\n.resize-triggers,\n.resize-triggers>div {\n content: " ";\n display: block;\n position: absolute;\n top: 0;\n left: 0\n}\n\n.resize-triggers>div {\n height: 100%;\n width: 100%;\n background: #eee;\n overflow: auto\n}\n\n.contract-trigger:before {\n overflow: hidden;\n width: 200%;\n height: 200%\n}\n\n.apexcharts-bar-goals-markers {\n pointer-events: none\n}\n\n.apexcharts-bar-shadows {\n pointer-events: none\n}\n\n.apexcharts-rangebar-goals-markers {\n pointer-events: none\n}\n\n.apexcharts-drilldown-target {\n cursor: pointer\n}\n\n.apexcharts-breadcrumb {\n position: absolute;\n z-index: 11;\n display: inline-flex;\n align-items: center;\n gap: 2px;\n font-size: 12px;\n font-family: inherit;\n padding: 2px 4px\n}\n\n.apexcharts-breadcrumb-item {\n background: transparent;\n border: none;\n padding: 2px 6px;\n border-radius: 3px;\n font: inherit;\n color: inherit;\n cursor: pointer;\n line-height: 1.2\n}\n\n.apexcharts-breadcrumb-item:hover:not(.apexcharts-breadcrumb-current) {\n background: rgba(0, 0, 0, 0.08)\n}\n\n.apexcharts-breadcrumb-arrow {\n margin-right: 4px;\n font-weight: 600;\n user-select: none\n}\n\n.apexcharts-breadcrumb-current {\n cursor: default;\n font-weight: 600;\n opacity: 0.85\n}\n\n.apexcharts-breadcrumb-separator {\n opacity: 0.5;\n user-select: none\n}\n\n.apexcharts-theme-dark .apexcharts-breadcrumb-item:hover:not(.apexcharts-breadcrumb-current) {\n background: rgba(255, 255, 255, 0.12)\n}\n\n.apexcharts-disable-transitions * {\n transition: none !important;\n}';const r=(null==(s=this.opts.chart)?void 0:s.nonce)||this.w.config.chart.nonce;r&&a.setAttribute("nonce",r),e?t.prepend(a):!1!==this.w.config.chart.injectStyleSheet&&i.head.appendChild(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 s,i;const a=t instanceof Error?t:new Error(String(t)),r=a;r.chartId=null==(i=null==(s=this.w)?void 0:s.globals)?void 0:i.chartID,r.el=this.el,e(a)})}else e(new Error("Element not found"))});return this._renderPromise=s,s.catch(()=>{this._renderPromise===s&&(this._renderPromise=null)}),s}create(t,e){var s,i,a,r,o,n;const l=this.w;if(!this.core){new hs(this).initModules()}const c=this.w.globals;if(c.noData=!1,c.animationEnded=!1,!b.elementExists(this.el))return c.animationEnded=!0,null;if(this.responsive.checkResponsiveConfig(e),ht(l),l.config.xaxis.convertedCatToNumeric){new C(l.config).convertCatToNumericXaxis(l.config,this.ctx)}if(this.core.setupElements(),"treemap"===l.config.chart.type&&(l.config.grid.show=!1,l.config.yaxis[0].show=!1),0===c.svgWidth)return c.animationEnded=!0,null;let d=t;t.forEach((t,e)=>{t.hidden&&(d=this.legend.legendHelpers.getSeriesAfterCollapsing({realIndex:e}))});const p=E.checkComboSeries(d,l.config.chart.type);c.comboCharts=p.comboCharts,c.comboBarCount=p.comboBarCount;const g=d.every(t=>t.data&&0===t.data.length);(0===d.length||g&&c.collapsedSeries.length<1)&&this.series.handleNoData(),h.isBrowser()&&this.events.setupEventHandlers();const u=this.data.parseData(d);this._writeParsedSeriesData(u.seriesData),this._writeParsedRangeData(u.rangeData),this._writeParsedCandleData(u.candleData),this._writeParsedLabelData(u.labelData),this._writeParsedAxisFlags(u.axisFlags),null==(s=this.rendererController)||s.resolve(),null==(i=this.weave)||i.dispatch("afterParse"),this.theme.init();new yt(this.w,this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),c.noData&&c.collapsedSeries.length!==l.seriesData.series.length&&!l.config.legend.showForSingleSeries||null==(a=this.legend)||a.init(),this.series.hasAllSeriesEqualX(),c.axisCharts&&(this.core.coreCalculations(),"category"!==l.config.xaxis.type&&this.formatters.setLabelFormatters(),this.ctx.toolbar&&(this.ctx.toolbar.minX=l.globals.minX,this.ctx.toolbar.maxX=l.globals.maxX)),this.formatters.heatmapLabelFormatters();new E(this.w).getLargestMarkerSize();const x=this.dimensions.plotCoords();this._writeLayoutCoords(x.layout);const f=this.core.xySettings();null==(r=this.weave)||r.dispatch("afterScales",{xyRatios:f}),this.grid.createGridMask();const m=this.core.plotChartType(d,f),y=new vt(this.w,this);y.bringForward(),l.config.dataLabels.background.enabled&&y.dataLabelsBackground(),this.core.shiftGraphPosition(),null==(n=null==(o=this.legend)?void 0:o.heatmapGradientLegend)||n.repositionToPlot(),l.globals.dataPoints>50&&l.dom.elWrap.classList.add("apexcharts-disable-transitions");return{elGraph:m,xyRatios:f,dimensions:{plot:{left:l.layout.translateX,top:l.layout.translateY,width:l.layout.gridWidth,height:l.layout.gridHeight}}}}mount(t=null){const e=this,s=e.w;return new Promise((i,a)=>{var r,o,n,l,c,d,p,g,u,x;if(null===e.el)return a(new Error("Not enough data to display or target element not found"));(null===t||s.globals.allSeriesCollapsed)&&e.series.handleNoData(),e.grid=new kt(e.w,e);const f=e.grid.drawGrid(),m=hs._featureRegistry.get("annotations");if(e.annotations=m?new m(e.w,{theme:e.theme,timeScale:e.timeScale}):null,null==(r=e.annotations)||r.drawImageAnnos(),null==(o=e.annotations)||o.drawTextAnnos(),"back"===s.config.grid.position&&(f&&s.dom.elGraphical.add(f.el),(null==(n=null==f?void 0:f.elGridBorders)?void 0:n.node)&&s.dom.elGraphical.add(f.elGridBorders)),Array.isArray(t.elGraph))for(let e=0;e<t.elGraph.length;e++)s.dom.elGraphical.add(t.elGraph[e]);else s.dom.elGraphical.add(t.elGraph);"front"===s.config.grid.position&&(f&&s.dom.elGraphical.add(f.el),(null==(l=null==f?void 0:f.elGridBorders)?void 0:l.node)&&s.dom.elGraphical.add(f.elGridBorders)),"front"===s.config.xaxis.crosshairs.position&&e.crosshairs.drawXCrosshairs(),"front"===s.config.yaxis[0].crosshairs.position&&e.crosshairs.drawYCrosshairs(),"treemap"!==s.config.chart.type&&e.axes.drawAxis(s.config.chart.type,f);const b=new St(this.w,this.ctx,f),y=new Lt(this.w,{theme:this.theme,timeScale:this.timeScale},f);if(null!==f&&(b.xAxisLabelCorrections(),y.setYAxisTextAlignments(),s.config.yaxis.map((t,e)=>{-1===s.globals.ignoreYAxisIndexes.indexOf(e)&&y.yAxisTitleRotate(e,t.opposite)})),null==(c=e.annotations)||c.drawAxesAnnotations(),!s.globals.noData){if(h.isBrowser()&&s.config.tooltip.enabled&&!s.globals.noData&&(null==(d=e.w.globals.tooltip)||d.drawTooltip(t.xyRatios)),s.config.chart.accessibility.enabled&&s.config.chart.accessibility.keyboard.enabled&&s.config.chart.accessibility.keyboard.navigation.enabled&&(null==(p=e.keyboardNavigation)||p.init()),h.isBrowser()&&s.globals.axisCharts&&(s.axisFlags.isXNumeric||s.config.xaxis.convertedCatToNumeric||s.axisFlags.isRangeBar))(s.config.chart.zoom.enabled||s.config.chart.selection&&s.config.chart.selection.enabled||s.config.chart.pan&&s.config.chart.pan.enabled)&&(null==(g=e.zoomPanSelection)||g.init({xyRatios:t.xyRatios}));else{const t=s.config.chart.toolbar.tools;["zoom","zoomin","zoomout","selection","pan","reset"].forEach(e=>{t[e]=!1})}s.config.chart.toolbar.show&&!s.globals.allSeriesCollapsed&&(null==(u=e.toolbar)||u.createToolbar())}null==(x=e.weave)||x.dispatch("draw",{pass:"full",xyRatios:null==t?void 0:t.xyRatios}),s.globals.memory.methodsToExec.length>0&&s.globals.memory.methodsToExec.forEach(t=>{t.method(t.params,!1,t.context)}),s.globals.axisCharts||s.globals.noData||e.core.resizeNonAxisCharts(),i(e)})}destroy(){var t;this._renderPromise=null,h.isBrowser()&&(window.removeEventListener("resize",this.windowResizeHandler),fs(this.el.parentNode,this.parentResizeHandler),clearTimeout(null!=(t=this.w.globals.resizeTimer)?t:void 0));const e=this.w.config.chart.id;e&&Array.isArray(Apex._chartInstances)&&Apex._chartInstances.forEach((t,s)=>{t.id===b.escapeString(e)&&Apex._chartInstances.splice(s,1)}),this._keyboardNavigation&&this._keyboardNavigation.destroy(),new ds(this.ctx).clear({isUpdating:!1})}updateOptions(e,s=!1,i=!0,a=!0,r=!0){const o=this.w;if(o.interact.selection=void 0,this.lastUpdateOptions){if(b.shallowEqual(this.lastUpdateOptions,e))return Promise.resolve(this);if(e.series&&this.lastUpdateOptions.series&&!t._optionsTooBigToCompare(e)&&JSON.stringify(this.lastUpdateOptions.series)===JSON.stringify(e.series)){const t=n({},e),s=n({},this.lastUpdateOptions);if(delete t.series,delete s.series,b.shallowEqual(t,s))return Promise.resolve(this)}}return e.series&&(this.data.resetParsingFlags(),this.series.resetSeries(!1,!0,!1),e.series.length&&e.series[0].data&&(e.series=e.series.map((t,e)=>this.updateHelpers._extendSeries(t,e))),this.updateHelpers.revertDefaultAxisMinMax()),e.xaxis&&(e=this.updateHelpers.forceXAxisUpdate(e)),e.yaxis&&(e=this.updateHelpers.forceYAxisUpdate(e)),o.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),e.theme&&(e=this.theme.updateThemeOptions(e)),this.updateHelpers._updateOptions(e,s,i,a,r)}updateSeries(t=[],e=!0,s=!0){return this.data.resetParsingFlags(),this.series.prepareDataUpdate(),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(t,e,s)}appendSeries(t,e=!0,s=!0){this.data.resetParsingFlags();const i=this.w.config.series.slice();return i.push(t),this.series.prepareDataUpdate(),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(i,e,s)}appendData(t,e=!0){const s=this;s.data.resetParsingFlags(),s.w.globals.dataChanged=!0,s.w.config.chart.animations.enabled&&s.series.getPreviousPaths();const i=s.w.config.series.slice();for(let e=0;e<i.length;e++)if(null!==t[e]&&void 0!==t[e]){const s=t[e],a=i[e];for(let t=0;t<s.data.length;t++)a.data.push(s.data[t])}return function(t,e){const s=e.config.chart.streaming;if(!s||!s.enabled)return;const i=s.maxPoints,a=e.config.xaxis.range,r=t=>null==t?null:Array.isArray(t)?"number"==typeof t[0]?t[0]:null:"object"==typeof t&&"number"==typeof t.x?t.x:null;t.forEach(t=>{var e;const s=null==t?void 0:t.data;if(!Array.isArray(s)||s.length<2)return;if("number"==typeof i&&i>0)return void(s.length>i&&(t.data=s.slice(s.length-i)));if(!a)return;const o=r(s[s.length-1]),n=r(s[0]);if(null==o||null==n||o<=n)return;const l=(o-n)/(s.length-1),c=o-a-2*l;let h=0;for(;h<s.length&&(null!=(e=r(s[h]))?e:c)<c;)h++;h>0&&(t.data=s.slice(h))})}(i,s.w),s.w.config.series=i,e&&(s.w.globals.initialSeries=s.w.config.series),this.update()}static _optionsTooBigToCompare(t){const e=t&&t.series;if(!Array.isArray(e))return!1;let s=0;for(let t=0;t<e.length;t++){const i=e[t]&&e[t].data;if(s+=Array.isArray(i)?i.length:1,s>1e3)return!0}return!1}update(e){return new Promise((s,i)=>{if(e&&this.lastUpdateOptions&&!t._optionsTooBigToCompare(e)&&JSON.stringify(this.lastUpdateOptions)===JSON.stringify(e))return s(this);this.lastUpdateOptions=e&&!t._optionsTooBigToCompare(e)?b.clone(e):null,new ds(this.ctx).clear({isUpdating:!0});const a=this.create(this.w.config.series,null!=e?e:{});if(!a)return s(this);this.mount(a).then(()=>{var t;null==(t=this.morphTypeChange)||t.applyChromeFade(),te(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,s(this)}).catch(t=>{i(t)})})}_fastAxisChromeRefresh(t){const e=this.w,s=e.globals;this._fastAxisBailReason="";try{if(s.isBarHorizontal)return this._fastAxisBailReason="barHorizontal",!1;if(e.config.chart.sparkline.enabled)return!0;const t=e.config.annotations;if(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 i=this.dimensions;if(!i||!i.dimYAxis)return this._fastAxisBailReason="noDimensions",!1;const a=e.layout.yLabelsCoords,r=e.layout.yTitleCoords,o=i.dimYAxis.getyAxisLabelsCoords(),n=i.dimYAxis.getyAxisTitleCoords();e.layout.yLabelsCoords=[],e.layout.yTitleCoords=[],e.config.yaxis.map((t,s)=>{e.layout.yLabelsCoords.push({width:o[s].width,index:s}),e.layout.yTitleCoords.push({width:n[s].width,index:s})});const l=i.dimYAxis.getTotalYAxisWidth();if(l>i.yAxisWidth+2)return e.layout.yLabelsCoords=a,e.layout.yTitleCoords=r,this._fastAxisBailReason=`labelWidth ${l} > ${i.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,g=d?d.nextSibling:h.nextSibling;h.remove(),d&&d.remove(),c.querySelectorAll(".apexcharts-xaxis-tick").forEach(t=>t.remove()),this.grid=new kt(e,this);const u=this.grid.drawGrid();u&&u.el&&(p.insertBefore(u.el.node,g),u.elGridBorders&&u.elGridBorders.node&&p.insertBefore(u.elGridBorders.node,g));const x=new St(this.w,this.ctx,u),f=c.querySelector(".apexcharts-xaxis");if(f){const t=f.parentNode,e=f.nextSibling;f.remove();const s=x.drawXaxis();t.insertBefore(s.node,e)}const m=new Lt(this.w,{theme:this.theme,timeScale:this.timeScale},u);for(let t=0;t<e.config.yaxis.length;t++){if(-1!==s.ignoreYAxisIndexes.indexOf(t))continue;const i=e.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${t}']`);if(!i)return this._fastAxisBailReason="missingYAxisNode",!1;const a=i.parentNode;if(!a)return this._fastAxisBailReason="missingYAxisParent",!1;const r=i.nextSibling;i.remove();const o=m.drawYaxis(t);a.insertBefore(o.node,r)}return null!==u&&(x.xAxisLabelCorrections(),m.setYAxisTextAlignments(),e.config.yaxis.map((t,e)=>{-1===s.ignoreYAxisIndexes.indexOf(e)&&m.yAxisTitleRotate(e,t.opposite)})),!0}catch(t){return this._fastAxisBailReason="error: "+(t&&t.message),!1}}fastUpdate(t,e){return new Promise((s,i)=>{var a,r,o;try{const n=this.w,l=n.globals;l.shouldAnimate=t,l.dataChanged=!0,l.animationEnded=!1,At.invalidateSelectors(n);const c=n.globals;c.maxY=-Number.MAX_VALUE,c.minY=Number.MIN_VALUE,c.minYArr=[],c.maxYArr=[],c.maxX=-Number.MAX_VALUE,c.minX=Number.MAX_VALUE,c.initialMaxX=-Number.MAX_VALUE,c.initialMinX=Number.MAX_VALUE,c.yAxisScale=[],c.xAxisScale=null,c.xAxisTicksPositions=[],c.xRange=0,c.yRange=[],c.zRange=0,c.xTickAmount=0,c.multiAxisTickAmount=0,c.pointsArray=[],c.barCanvasCoords=null,c.dataLabelsRects=[],c.lastDrawnDataLabelsIndexes=[],c.textRectsCache=new Map,c.domCache=new Map,c.cachedSelectors={},c.disableZoomIn=!1,c.disableZoomOut=!1,l.axisCharts&&(this.core.coreCalculations(),"category"!==n.config.xaxis.type&&this.formatters.setLabelFormatters());const d=this.core.xySettings();this._zoomPanSelection&&(this._zoomPanSelection.xyRatios=d);const p=JSON.stringify({y:(l.yAxisScale||[]).map(t=>t?t.result:null),xMin:l.minX,xMax:l.maxX}),g=l.axisCharts&&null!=e&&p!==e;if(g&&!this._fastAxisChromeRefresh(d))return this._updateStats.full++,this.update().then(()=>s(this)).catch(i);g?this._updateStats.fastWithAxes++:this._updateStats.fast++,null==(a=this.weave)||a.dispatch("afterScales",{pass:"fast",xyRatios:d});const u=this.ctx.renderer,x=!!(u&&"canvas"===u.kind&&u.canRepaintInPlace&&u.canRepaintInPlace());x&&(u._repaintHostInPlace=!0);const f=n.dom.elGraphical.node;f.querySelectorAll((x?"":".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)});const m=this.core.plotChartType(n.config.series,d),b=f.querySelector(".apexcharts-grid"),y=f.querySelector(".apexcharts-xaxis"),w=Array.isArray(m)?m:[m],v=b&&"front"===n.config.grid.position?b:y;v?w.forEach(t=>{const e=t&&t.node?t.node:t;e&&f.insertBefore(e,v)}):w.forEach(t=>{n.dom.elGraphical.add(t)});const A=new vt(n,this);A.bringForward(),n.config.dataLabels.background.enabled&&A.dataLabelsBackground(),h.isBrowser()&&n.config.tooltip.enabled&&!l.noData&&(null==(r=n.globals.tooltip)||r.drawTooltip(d)),null==(o=this.weave)||o.dispatch("draw",{pass:"fast",xyRatios:d}),"function"==typeof n.config.chart.events.updated&&n.config.chart.events.updated(this,n),this.events.fireEvent("updated",[this,n]),l.isDirty=!0,s(this)}catch(t){i(t)}})}getSyncedCharts(){const t=this.getGroupedCharts();return t.splice(0,0,this),t}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=b.escapeString(t);if(!Apex._chartInstances)return;const s=Apex._chartInstances.filter(t=>t.id===e)[0];return s&&s.chart}static initOnLoad(){var e;const s=document.querySelectorAll("[data-apexcharts]");for(let i=0;i<s.length;i++){const a=s[i],r=JSON.parse(null!=(e=s[i].getAttribute("data-options"))?e:"");new t(a,r).render()}}static exec(t,e,...s){const i=this.getChartByID(t);if(!i)return;i.w.globals.isExecCalled=!0;let a=null;return-1!==i.publicMethods.indexOf(e)&&(a=i[e](...s)),a}static merge(t,e){return b.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){Fe(t)}static registerFeatures(t){hs.registerFeatures(t)}static registerPlugin(e){return function(t){t&&"string"==typeof t.name&&"function"==typeof t.setup&&(gs()[t.name]=t)}(e),t}static unregisterPlugin(e){return function(t){delete gs()[t]}(e),t}static registerRenderer(t,e){$e.registerRenderer(t,e)}static registerSeriesType(e,s){const i=t._customSeriesFactory;return i&&s&&"function"==typeof s.renderItem?(a=e,De()[a]&&!Le(e)||(Fe({[e]:i(e,s)}),function(t){Te().add(t)}(e)),t):t;var a}static unregisterSeriesType(e){return Le(e)&&function(t){delete De()[t],Te().delete(t)}(e),t}static registerTheme(e,s){return function(t,e){t&&"string"==typeof t&&(null==e||"object"==typeof e&&!Array.isArray(e))&&(ae()[t]=e||{})}(e,s),t}static unregisterTheme(e){return function(t){t&&delete ae()[t]}(e),t}static registerEasing(e,s){return function(t,e){"string"==typeof t&&t&&"function"==typeof e&&it.set(t,e)}(e,s),t}static crossfilter(e){const s=t._crossfilterFactory;return s?s(e):null}static getCrossfilter(e){const s=t._crossfilterGet;return s?s(e):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.resetSeries(t,e)}addEventListener(t,e){this.events.addEventListener(t,e)}removeEventListener(t,e){this.events.removeEventListener(t,e)}addXaxisAnnotation(t,e=!0,s=void 0){var i;let a=this;s&&(a=s),null==(i=a.annotations)||i.addXaxisAnnotationExternal(t,e,a)}addYaxisAnnotation(t,e=!0,s=void 0){var i;let a=this;s&&(a=s),null==(i=a.annotations)||i.addYaxisAnnotationExternal(t,e,a)}addPointAnnotation(t,e=!0,s=void 0){var i;let a=this;s&&(a=s),null==(i=a.annotations)||i.addPointAnnotationExternal(t,e,a)}clearAnnotations(t=void 0){var e;let s=this;t&&(s=t),s.lastUpdateOptions=null,null==(e=s.annotations)||e.clearAnnotations(s)}removeAnnotation(t,e=void 0){var s;let i=this;e&&(i=e),i.lastUpdateOptions=null,null==(s=i.annotations)||s.removeAnnotation(i,t)}getChartArea(){return this.w.dom.baseEl.querySelector(".apexcharts-inner")}getSeriesTotalXRange(t,e){return this.coreUtils.getSeriesTotalsXRange(t,e)}getHighestValueInSeries(t=0){return new Dt(this.w).getMinYMaxY(t).highestY}getLowestValueInSeries(t=0){return new Dt(this.w).getMinYMaxY(t).lowestY}getSeriesTotal(){return this.w.globals.seriesTotals}getState(){const t=this.w,e=t.globals;return{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 s;null==(s=this.ctx.toolbar)||s.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.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.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.ctx.exports.exportToCSV(t)}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()}static _writeDataProps(t,e){for(const s of Object.keys(e)){const i=Object.getOwnPropertyDescriptor(e,s);i&&"value"in i&&(t[s]=i.value)}}_writeParsedSeriesData(e){t._writeDataProps(this.w.seriesData,e)}_writeParsedRangeData(e){t._writeDataProps(this.w.rangeData,e)}_writeParsedCandleData(e){t._writeDataProps(this.w.candleData,e)}_writeParsedLabelData(e){t._writeDataProps(this.w.labelData,e)}_writeParsedAxisFlags(e){t._writeDataProps(this.w.axisFlags,e)}_writeLayoutCoords(e){t._writeDataProps(this.w.layout,e)}_parentResizeCallback(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}_windowResize(){this.w.globals.resizeTimer=window.setTimeout(()=>{this.w.globals.resized=!0,this.w.globals.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()}};c(ms,"perspectives",null);let bs=ms;exports.__apex_Animations=pt,exports.__apex_Animations_applyAnimationPolicy=ht,exports.__apex_Animations_applyProgressiveReveal=ct,exports.__apex_Animations_computeStagger=dt,exports.__apex_Animations_prefersReducedMotion=lt,exports.__apex_Base=_,exports.__apex_BrowserAPIs_BrowserAPIs=m,exports.__apex_ChartFactory_getChartClass=_e,exports.__apex_ChartFactory_isCustom=Le,exports.__apex_ChartFactory_register=Fe,exports.__apex_Config=M,exports.__apex_Constants_LINE_HEIGHT_RATIO=D,exports.__apex_Constants_NICE_SCALE_ALLOWED_MAG_MSD=T,exports.__apex_Constants_NICE_SCALE_DEFAULT_TICKS=L,exports.__apex_Core=Ee,exports.__apex_CoreUtils=E,exports.__apex_Crosshairs=Pt,exports.__apex_DOMShim_SSRClassList=p,exports.__apex_DOMShim_SSRDOMShim=g,exports.__apex_DOMShim_SSRElement=d,exports.__apex_Data=Pe,exports.__apex_DataLabels=vt,exports.__apex_DateTime=y,exports.__apex_Defaults=C,exports.__apex_Environment_Environment=h,exports.__apex_Events=Ft,exports.__apex_Fill=xt,exports.__apex_Filters=gt,exports.__apex_Formatters=w,exports.__apex_Globals=F,exports.__apex_Graphics=ut,exports.__apex_Markers=yt,exports.__apex_Options=k,exports.__apex_PathMorphing_arrayToPath=z,exports.__apex_PathMorphing_morphPaths=U,exports.__apex_PathMorphing_parsePath=I,exports.__apex_PathMorphing_pathBbox=R,exports.__apex_PerformanceCache=At,exports.__apex_Range=Dt,exports.__apex_Resize_addResizeListener=xs,exports.__apex_Resize_removeResizeListener=fs,exports.__apex_Responsive=Nt,exports.__apex_SVGAnimation_SVGAnimationRunner=Q,exports.__apex_SVGAnimation_installAnimationMethods=tt,exports.__apex_SVGContainer=Qe,exports.__apex_SVGDraggable_installDraggable=os,exports.__apex_SVGElement=Ve,exports.__apex_SVGFilter_FilterBuilder=as,exports.__apex_SVGFilter_SVGFilter=is,exports.__apex_SVGFilter_installFilterMethods=rs,exports.__apex_SVGGradient_SVGGradient=qe,exports.__apex_SVGPattern_SVGPattern=Je,exports.__apex_SVGSelectable_installSelectable=ns,exports.__apex_Scales=Mt,exports.__apex_Series=ee,exports.__apex_Theme=le,exports.__apex_ThemePalettes_getThemePalettes=Tt,exports.__apex_TimeScale=Se,exports.__apex_TitleSubtitle=ce,exports.__apex_Utils=b,exports.__apex_axes_Axes=Et,exports.__apex_axes_AxesUtils=Ct,exports.__apex_axes_Grid=kt,exports.__apex_axes_XAxis=St,exports.__apex_axes_YAxis=Lt,exports.__apex_charts_Scatter=wt,exports.__apex_dimensions_Dimensions=ue,exports.__apex_dimensions_Grid=ge,exports.__apex_dimensions_Helpers=he,exports.__apex_dimensions_XAxis=de,exports.__apex_dimensions_YAxis=pe,exports.__apex_helpers_Destroy=ds,exports.__apex_helpers_InitCtxVariables=hs,exports.__apex_helpers_Localization=_t,exports.__apex_helpers_UpdateHelpers=Be,exports.__apex_index_Box=X,exports.__apex_index_SVG=ls,exports.__apex_math_Box=X,exports.__apex_math_Matrix=N,exports.__apex_math_Point=B,exports.__apex_math_SVGNS=P,exports.__apex_tooltip_AxesTooltip=He,exports.__apex_tooltip_Intersect=Ye,exports.__apex_tooltip_Labels=Xe,exports.__apex_tooltip_Marker=ze,exports.__apex_tooltip_Position=Ie,exports.__apex_tooltip_Tooltip=Oe,exports.__apex_tooltip_Utils=Ne,exports.default=bs;
|